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,94 @@
When using `node-gyp` you might see an error like this when attempting to compile/install a node.js native addon:
```
$ npm install bcrypt
npm http GET https://registry.npmjs.org/bcrypt/0.7.5
npm http 304 https://registry.npmjs.org/bcrypt/0.7.5
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0
> bcrypt@0.7.5 install /home/ubuntu/public/song-swap/node_modules/bcrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:69:16)
gyp ERR! stack at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:56:37)
gyp ERR! stack at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:219:20)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:105:9
gyp ERR! stack at ChildProcess.exithandler (child_process.js:630:7)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at maybeClose (child_process.js:730:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:5)
gyp ERR! System Linux 3.5.0-21-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/public/song-swap/node_modules/bcrypt
gyp ERR! node -v v0.11.2-pre
gyp ERR! node-gyp -v v0.9.5
gyp ERR! not ok
npm ERR! bcrypt@0.7.5 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the bcrypt@0.7.5 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.5.0-21-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "bcrypt"
npm ERR! cwd /home/ubuntu/public/song-swap
npm ERR! node -v v0.11.2-pre
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/ubuntu/public/song-swap/npm-debug.log
npm ERR! not ok code 0
```
The main error here is:
```
Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
```
This error is caused when you attempt to compile a native addon using a version of node.js with `-pre` at the end of the version number:
``` bash
$ node -v
v0.10.4-pre
```
## How to avoid (the short answer)
To avoid this error completely just use a stable release of node.js. i.e. `v0.10.4`, and __not__ `v0.10.4-pre`.
## How to fix (the long answer)
This error happens because `node-gyp` does not know what header files were used to compile your "pre" version of node, and therefore it needs you to specify the node source code directory path using the `--nodedir` flag.
For example, if I compiled my development ("pre") version of node.js using the source code in `/Users/nrajlich/node`, then I could invoke `node-gyp` like:
``` bash
$ node-gyp rebuild --nodedir=/Users/nrajlich/node
```
Or install an native addon through `npm` like:
``` bash
$ npm install bcrypt --nodedir=/Users/nrajlich/node
```
### Always use `--nodedir`
__Note:__ This is for advanced users who use `-pre` versions of node more often than tagged releases.
If you're invoking `node-gyp` through `npm`, then you can leverage `npm`'s configuration system and not have to specify the `--nodedir` flag all the time:
``` bash
$ npm config set nodedir /Users/nrajlich/node
```
@@ -0,0 +1,15 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
@@ -0,0 +1,140 @@
import { X509Certificate } from '@peculiar/x509';
import { isCertRevoked } from './isCertRevoked.js';
import { getWebCrypto } from './iso/isoCrypto/getWebCrypto.js';
/**
* Traverse an array of PEM certificates and ensure they form a proper chain
* @param x5cCertsPEM Typically the result of `x5c.map(convertASN1toPEM)`
* @param trustAnchorsPEM PEM-formatted certs that an attestation statement x5c may chain back to
*/
export async function validateCertificatePath(x5cCertsPEM, trustAnchorsPEM = []) {
if (trustAnchorsPEM.length === 0) {
// We have no trust anchors to chain back to, so skip path validation
return true;
}
const WebCrypto = await getWebCrypto();
// Prepare to work with x5c certs
const x5cCertsParsed = x5cCertsPEM.map((certPEM) => new X509Certificate(certPEM));
// Check for any expired or temporally invalid certs in x5c
for (let i = 0; i < x5cCertsParsed.length; i++) {
const cert = x5cCertsParsed[i];
const certPEM = x5cCertsPEM[i];
try {
await assertCertNotRevoked(cert);
}
catch (_err) {
throw new Error(`Found revoked certificate in x5c:\n${certPEM}`);
}
try {
assertCertIsWithinValidTimeWindow(cert.notBefore, cert.notAfter);
}
catch (_err) {
throw new Error(`Found certificate out of validity period in x5c:\n${certPEM}`);
}
}
// Prepare to work with trust anchor certs
const trustAnchorsParsed = trustAnchorsPEM.map((certPEM) => {
try {
return new X509Certificate(certPEM);
}
catch (err) {
const _err = err;
throw new Error(`Could not parse trust anchor certificate:\n${certPEM}`, { cause: _err });
}
});
// Filter out any expired or temporally invalid trust anchors certs
const validTrustAnchors = [];
for (let i = 0; i < trustAnchorsParsed.length; i++) {
const cert = trustAnchorsParsed[i];
try {
await assertCertNotRevoked(cert);
}
catch (_err) {
// Continue processing the other certs
continue;
}
try {
assertCertIsWithinValidTimeWindow(cert.notBefore, cert.notAfter);
}
catch (_err) {
// Continue processing the other certs
continue;
}
validTrustAnchors.push(cert);
}
if (validTrustAnchors.length === 0) {
throw new Error('No specified trust anchor was valid for verifying x5c');
}
// Try to verify x5c with each trust anchor
let invalidSubjectAndIssuerError = false;
for (const anchor of trustAnchorsParsed) {
try {
const x5cWithTrustAnchor = x5cCertsParsed.concat([anchor]);
if (new Set(x5cWithTrustAnchor).size !== x5cWithTrustAnchor.length) {
throw new Error('Invalid certificate path: found duplicate certificates');
}
// Check signatures, and notBefore and notAfter
for (let i = 0; i < x5cWithTrustAnchor.length - 1; i++) {
const subject = x5cWithTrustAnchor[i];
const issuer = x5cWithTrustAnchor[i + 1];
// Leaf or intermediate cert, make sure the next cert in the chain signed it
const issuerSignedSubject = await subject.verify({ publicKey: issuer.publicKey, signatureOnly: true }, WebCrypto);
if (!issuerSignedSubject) {
throw new InvalidSubjectAndIssuer();
}
if (issuer.subject === issuer.issuer) {
// Root cert detected, make sure it signed itself
const issuerSignedIssuer = await issuer.verify({ publicKey: issuer.publicKey, signatureOnly: true }, WebCrypto);
if (!issuerSignedIssuer) {
throw new InvalidSubjectAndIssuer();
}
// Don't process anything else after a root cert
break;
}
}
// If we successfully validated a path then there's no need to continue. Reset any existing
// errors that were thrown by earlier trust anchors
invalidSubjectAndIssuerError = false;
break;
}
catch (err) {
if (err instanceof InvalidSubjectAndIssuer) {
invalidSubjectAndIssuerError = true;
}
else {
throw new Error('Unexpected error while validating certificate path', { cause: err });
}
}
}
// We tried multiple trust anchors and none of them worked
if (invalidSubjectAndIssuerError) {
throw new InvalidSubjectAndIssuer();
}
return true;
}
/**
* Check if the certificate is revoked or not. If it is, raise an error
*/
async function assertCertNotRevoked(certificate) {
// Check for certificate revocation
const subjectCertRevoked = await isCertRevoked(certificate);
if (subjectCertRevoked) {
throw new Error('Found revoked certificate in certificate path');
}
}
/**
* Require the cert to be within its notBefore and notAfter time window
*/
function assertCertIsWithinValidTimeWindow(certNotBefore, certNotAfter) {
const now = new Date(Date.now());
if (certNotBefore > now || certNotAfter < now) {
throw new Error('Certificate is not yet valid or expired');
}
}
// Custom errors to help pass on certain errors
class InvalidSubjectAndIssuer extends Error {
constructor() {
const message = 'Subject issuer did not match issuer subject';
super(message);
this.name = 'InvalidSubjectAndIssuer';
}
}
@@ -0,0 +1,51 @@
/**
Create an error from multiple errors.
*/
declare class AggregateError<T extends Error = Error> extends Error implements Iterable<T> {
readonly name: 'AggregateError';
/**
@param errors - If a string, a new `Error` is created with the string as the error message. If a non-Error object, a new `Error` is created with all properties from the object copied over.
@returns An Error that is also an [`Iterable`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators#Iterables) for the individual errors.
@example
```
import AggregateError = require('aggregate-error');
const error = new AggregateError([new Error('foo'), 'bar', {message: 'baz'}]);
throw error;
// AggregateError:
// Error: foo
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:33)
// Error: bar
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
// Error: baz
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
// at AggregateError (/Users/sindresorhus/dev/aggregate-error/index.js:19:3)
// at Object.<anonymous> (/Users/sindresorhus/dev/aggregate-error/example.js:3:13)
// at Module._compile (module.js:556:32)
// at Object.Module._extensions..js (module.js:565:10)
// at Module.load (module.js:473:32)
// at tryModuleLoad (module.js:432:12)
// at Function.Module._load (module.js:424:3)
// at Module.runMain (module.js:590:10)
// at run (bootstrap_node.js:394:7)
// at startup (bootstrap_node.js:149:9)
for (const individualError of error) {
console.log(individualError);
}
//=> [Error: foo]
//=> [Error: bar]
//=> [Error: baz]
```
*/
constructor(errors: ReadonlyArray<T | {[key: string]: any} | string>);
[Symbol.iterator](): IterableIterator<T>;
}
export = AggregateError;
@@ -0,0 +1,56 @@
/// <reference types="node" />
import { IncomingHttpHeaders } from "http";
type StaticOrigin = boolean | string | RegExp | Array<boolean | string | RegExp>;
type CustomOrigin = (
requestOrigin: string | undefined,
callback: (err: Error | null, origin?: StaticOrigin) => void,
) => void;
declare namespace e {
interface CorsRequest {
method?: string | undefined;
headers: IncomingHttpHeaders;
}
interface CorsOptions {
/**
* @default '*'
*/
origin?: StaticOrigin | CustomOrigin | undefined;
/**
* @default 'GET,HEAD,PUT,PATCH,POST,DELETE'
*/
methods?: string | string[] | undefined;
allowedHeaders?: string | string[] | undefined;
exposedHeaders?: string | string[] | undefined;
credentials?: boolean | undefined;
maxAge?: number | undefined;
/**
* @default false
*/
preflightContinue?: boolean | undefined;
/**
* @default 204
*/
optionsSuccessStatus?: number | undefined;
}
type CorsOptionsDelegate<T extends CorsRequest = CorsRequest> = (
req: T,
callback: (err: Error | null, options?: CorsOptions) => void,
) => void;
}
declare function e<T extends e.CorsRequest = e.CorsRequest>(
options?: e.CorsOptions | e.CorsOptionsDelegate<T>,
): (
req: T,
res: {
statusCode?: number | undefined;
setHeader(key: string, value: string): any;
end(): any;
},
next: (err?: any) => any,
) => void;
export = e;
@@ -0,0 +1,6 @@
module.exports = {
"longPressMessage": `\u{414}\u{43E}\u{432}\u{433}\u{43E} \u{430}\u{431}\u{43E} \u{437}\u{432}\u{438}\u{447}\u{430}\u{439}\u{43D}\u{43E} \u{43D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} \u{43A}\u{43E}\u{43C}\u{431}\u{456}\u{43D}\u{430}\u{446}\u{456}\u{44E} \u{43A}\u{43B}\u{430}\u{432}\u{456}\u{448} Alt \u{456} \u{441}\u{442}\u{440}\u{456}\u{43B}\u{43A}\u{430} \u{432}\u{43D}\u{438}\u{437}, \u{449}\u{43E}\u{431} \u{432}\u{456}\u{434}\u{43A}\u{440}\u{438}\u{442}\u{438} \u{43C}\u{435}\u{43D}\u{44E}`
};
//# sourceMappingURL=uk-UA.main.js.map
@@ -0,0 +1,228 @@
import { cleanUrl, extractQueryWithoutFragment } from './utils.js';
class And {
kind;
args;
constructor(...args) {
if (args.length === 0) {
throw new Error('`And` expects at least one operand');
}
this.args = args;
this.kind = 'and';
}
}
class Or {
kind;
args;
constructor(...args) {
if (args.length === 0) {
throw new Error('`Or` expects at least one operand');
}
this.args = args;
this.kind = 'or';
}
}
class Not {
kind;
expr;
constructor(expr) {
this.expr = expr;
this.kind = 'not';
}
}
class Id {
kind;
pattern;
params;
constructor(pattern, params) {
this.pattern = pattern;
this.kind = 'id';
this.params = params ?? {
cleanUrl: false,
};
}
}
class ModuleType {
kind;
pattern;
constructor(pattern) {
this.pattern = pattern;
this.kind = 'moduleType';
}
}
class Code {
kind;
pattern;
constructor(expr) {
this.pattern = expr;
this.kind = 'code';
}
}
class Query {
kind;
key;
pattern;
constructor(key, pattern) {
this.pattern = pattern;
this.key = key;
this.kind = 'query';
}
}
class Include {
kind;
expr;
constructor(expr) {
this.expr = expr;
this.kind = 'include';
}
}
class Exclude {
kind;
expr;
constructor(expr) {
this.expr = expr;
this.kind = 'exclude';
}
}
export function and(...args) {
return new And(...args);
}
export function or(...args) {
return new Or(...args);
}
export function not(expr) {
return new Not(expr);
}
export function id(pattern, params) {
return new Id(pattern, params);
}
export function moduleType(pattern) {
return new ModuleType(pattern);
}
export function code(pattern) {
return new Code(pattern);
}
/*
* There are three kinds of conditions are supported:
* 1. `boolean`: if the value is `true`, the key must exist and be truthy. if the value is `false`, the key must not exist or be falsy.
* 2. `string`: the key must exist and be equal to the value.
* 3. `RegExp`: the key must exist and match the value.
*/
export function query(key, pattern) {
return new Query(key, pattern);
}
export function include(expr) {
return new Include(expr);
}
export function exclude(expr) {
return new Exclude(expr);
}
/**
* convert a queryObject to FilterExpression like
* ```js
* and(query(k1, v1), query(k2, v2))
* ```
* @param queryFilterObject The query filter object needs to be matched.
* @returns a `And` FilterExpression
*/
export function queries(queryFilter) {
let arr = Object.entries(queryFilter).map(([key, value]) => {
return new Query(key, value);
});
return and(...arr);
}
export function interpreter(exprs, code, id, moduleType) {
let arr = [];
if (Array.isArray(exprs)) {
arr = exprs;
}
else {
arr = [exprs];
}
return interpreterImpl(arr, code, id, moduleType);
}
export function interpreterImpl(expr, code, id, moduleType, ctx = {}) {
let hasInclude = false;
for (const e of expr) {
switch (e.kind) {
case 'include': {
hasInclude = true;
if (exprInterpreter(e.expr, code, id, moduleType, ctx)) {
return true;
}
break;
}
case 'exclude': {
if (exprInterpreter(e.expr, code, id, moduleType)) {
return false;
}
break;
}
}
}
return !hasInclude;
}
export function exprInterpreter(expr, code, id, moduleType, ctx = {}) {
switch (expr.kind) {
case 'and': {
return expr.args.every((e) => exprInterpreter(e, code, id, moduleType, ctx));
}
case 'or': {
return expr.args.some((e) => exprInterpreter(e, code, id, moduleType, ctx));
}
case 'not': {
return !exprInterpreter(expr.expr, code, id, moduleType, ctx);
}
case 'id': {
if (id === undefined) {
throw new Error('`id` is required for `id` expression');
}
if (expr.params.cleanUrl) {
id = cleanUrl(id);
}
return typeof expr.pattern === 'string'
? id === expr.pattern
: expr.pattern.test(id);
}
case 'moduleType': {
if (moduleType === undefined) {
throw new Error('`moduleType` is required for `moduleType` expression');
}
return moduleType === expr.pattern;
}
case 'code': {
if (code === undefined) {
throw new Error('`code` is required for `code` expression');
}
return typeof expr.pattern === 'string'
? code.includes(expr.pattern)
: expr.pattern.test(code);
}
case 'query': {
if (id === undefined) {
throw new Error('`id` is required for `Query` expression');
}
if (!ctx.urlSearchParamsCache) {
let queryString = extractQueryWithoutFragment(id);
ctx.urlSearchParamsCache = new URLSearchParams(queryString);
}
let urlParams = ctx.urlSearchParamsCache;
if (typeof expr.pattern === 'boolean') {
if (expr.pattern) {
return urlParams.has(expr.key);
}
else {
return !urlParams.has(expr.key);
}
}
else if (typeof expr.pattern === 'string') {
return urlParams.get(expr.key) === expr.pattern;
}
else {
return expr.pattern.test(urlParams.get(expr.key) ?? '');
}
}
default: {
throw new Error(`Expression ${JSON.stringify(expr)} is not expected.`);
}
}
}
@@ -0,0 +1,38 @@
{
"name": "react-refresh",
"description": "React is a JavaScript library for building user interfaces.",
"keywords": [
"react"
],
"version": "0.17.0",
"homepage": "https://react.dev/",
"bugs": "https://github.com/facebook/react/issues",
"license": "MIT",
"files": [
"LICENSE",
"README.md",
"babel.js",
"runtime.js",
"cjs/"
],
"main": "runtime.js",
"exports": {
".": "./runtime.js",
"./runtime": "./runtime.js",
"./babel": "./babel.js",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "https://github.com/facebook/react.git",
"directory": "packages/react"
},
"engines": {
"node": ">=0.10.0"
},
"devDependencies": {
"react-16-8": "npm:react@16.8.0",
"react-dom-16-8": "npm:react-dom@16.8.0",
"scheduler-0-13": "npm:scheduler@0.13.0"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"getDefaultClassMetadata.spec.d.ts","sourceRoot":"","sources":["../../../../src/metadata/calculations/getDefaultClassMetadata.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var rangeRole = {
abstract: true,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-valuemax': null,
'aria-valuemin': null,
'aria-valuenow': null
},
relatedConcepts: [],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure']]
};
var _default = exports.default = rangeRole;
@@ -0,0 +1,78 @@
var AND_REGEXP = /^\s+and\s+(.*)/i
var OR_REGEXP = /^(?:,\s*|\s+or\s+)(.*)/i
function flatten(array) {
if (!Array.isArray(array)) return [array]
return array.reduce(function (a, b) {
return a.concat(flatten(b))
}, [])
}
function find(string, predicate) {
for (var max = string.length, n = 1; n <= max; n++) {
var parsed = string.substr(-n, n)
if (predicate(parsed, n, max)) {
return string.slice(0, -n)
}
}
return ''
}
function matchQuery(all, query) {
var node = { query: query }
if (query.indexOf('not ') === 0) {
node.not = true
query = query.slice(4)
}
for (var name in all) {
var type = all[name]
var match = query.match(type.regexp)
if (match) {
node.type = name
for (var i = 0; i < type.matches.length; i++) {
node[type.matches[i]] = match[i + 1]
}
return node
}
}
node.type = 'unknown'
return node
}
function matchBlock(all, string, qs) {
var node
return find(string, function (parsed, n, max) {
if (AND_REGEXP.test(parsed)) {
node = matchQuery(all, parsed.match(AND_REGEXP)[1])
node.compose = 'and'
qs.unshift(node)
return true
} else if (OR_REGEXP.test(parsed)) {
node = matchQuery(all, parsed.match(OR_REGEXP)[1])
node.compose = 'or'
qs.unshift(node)
return true
} else if (n === max) {
node = matchQuery(all, parsed.trim())
node.compose = 'or'
qs.unshift(node)
return true
}
return false
})
}
module.exports = function parse(all, queries) {
if (!Array.isArray(queries)) queries = [queries]
return flatten(
queries.map(function (block) {
var qs = []
do {
block = matchBlock(all, block, qs)
} while (block)
return qs
})
)
}
@@ -0,0 +1,80 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $Number = GetIntrinsic('%Number%');
var $TypeError = require('es-errors/type');
var $isNaN = require('math-intrinsics/isNaN');
var IsStringPrefix = require('./IsStringPrefix');
var StringToBigInt = require('./StringToBigInt');
var ToNumeric = require('./ToNumeric');
var ToPrimitive = require('./ToPrimitive');
var BigIntLessThan = require('./BigInt/lessThan');
var NumberLessThan = require('./Number/lessThan');
var isSameType = require('../helpers/isSameType');
// https://262.ecma-international.org/11.0/#sec-abstract-relational-comparison
// eslint-disable-next-line max-statements, max-lines-per-function
module.exports = function AbstractRelationalComparison(x, y, LeftFirst) {
if (typeof LeftFirst !== 'boolean') {
throw new $TypeError('Assertion failed: LeftFirst argument must be a Boolean');
}
var px;
var py;
if (LeftFirst) {
px = ToPrimitive(x, $Number);
py = ToPrimitive(y, $Number);
} else {
py = ToPrimitive(y, $Number);
px = ToPrimitive(x, $Number);
}
if (typeof px === 'string' && typeof py === 'string') {
if (IsStringPrefix(py, px)) {
return false;
}
if (IsStringPrefix(px, py)) {
return true;
}
return px < py; // both strings, neither a prefix of the other. shortcut for steps 3 c-f
}
var nx;
var ny;
if (typeof px === 'bigint' && typeof py === 'string') {
ny = StringToBigInt(py);
if ($isNaN(ny)) {
return void undefined;
}
return BigIntLessThan(px, ny);
}
if (typeof px === 'string' && typeof py === 'bigint') {
nx = StringToBigInt(px);
if ($isNaN(nx)) {
return void undefined;
}
return BigIntLessThan(nx, py);
}
nx = ToNumeric(px);
ny = ToNumeric(py);
if (isSameType(nx, ny)) {
return typeof nx === 'number' ? NumberLessThan(nx, ny) : BigIntLessThan(nx, ny);
}
if ($isNaN(nx) || $isNaN(ny)) {
return void undefined;
}
if (nx === -Infinity || ny === Infinity) {
return true;
}
if (nx === Infinity || ny === -Infinity) {
return false;
}
return nx < ny; // by now, these are both nonzero, finite, and not equal
};
@@ -0,0 +1,33 @@
/// <reference types="node" />
// See https://github.com/nodejs/undici/issues/1740
export type DOMException = typeof globalThis extends { DOMException: infer T }
? T
: any
export interface EventInit {
bubbles?: boolean
cancelable?: boolean
composed?: boolean
}
export interface EventListenerOptions {
capture?: boolean
}
export interface AddEventListenerOptions extends EventListenerOptions {
once?: boolean
passive?: boolean
signal?: AbortSignal
}
export type EventListenerOrEventListenerObject = EventListener | EventListenerObject
export interface EventListenerObject {
handleEvent (object: Event): void
}
export interface EventListener {
(evt: Event): void
}
@@ -0,0 +1,334 @@
'use strict';
var defineProperties = require('define-properties');
var test = require('tape');
var callBind = require('call-bind');
var functionsHaveNames = require('functions-have-names')();
var hasStrictMode = require('has-strict-mode')();
var forEach = require('for-each');
var debug = require('object-inspect');
var v = require('es-value-fixtures');
var hasSymbols = require('has-symbols/shams')();
var hasPropertyDescriptors = require('has-property-descriptors')();
var iterate = require('iterate-iterator');
var index = require('../Iterator.prototype.filter');
var impl = require('../Iterator.prototype.filter/implementation');
var fnName = 'filter';
var isEnumerable = Object.prototype.propertyIsEnumerable;
var testIterator = require('./helpers/testIterator');
module.exports = {
tests: function (filter, name, t) {
t['throws'](
function () { return new filter(); }, // eslint-disable-line new-cap
TypeError,
'`' + name + '` is not a constructor'
);
forEach(v.primitives.concat(v.objects), function (nonIterator) {
t['throws'](
function () { iterate(filter(nonIterator, function () {})); },
TypeError,
debug(nonIterator) + ' is not an Object with a callable `next` method'
);
var badNext = { next: nonIterator };
t['throws'](
function () { iterate(filter(badNext, function () {})); },
TypeError,
debug(badNext) + ' is not an Object with a callable `next` method'
);
});
forEach(v.nonFunctions, function (nonFunction) {
t['throws'](
function () { filter({ next: function () {} }, nonFunction); },
TypeError,
debug(nonFunction) + ' is not a function'
);
});
t.test('observable lookups', { skip: !hasPropertyDescriptors }, function (st) {
var effects = [];
var obj = {};
Object.defineProperty(obj, 'next', {
configurable: true,
enumerable: true,
get: function next() {
effects.push('get next');
return function () {
return { done: true, value: undefined };
};
}
});
st['throws'](
function () { filter(obj, null); },
TypeError
);
st.deepEqual(effects, []);
st.end();
});
t.test('actual iteration', { skip: !hasSymbols }, function (st) {
var arr = [1, 2, 3];
var iterator = callBind(arr[Symbol.iterator], arr);
st['throws'](
function () { return new filter(iterator()); }, // eslint-disable-line new-cap
TypeError,
'`' + name + '` iterator is not a constructor'
);
st['throws'](
function () { return new filter(iterator(), function () {}); }, // eslint-disable-line new-cap
TypeError,
'`' + name + '` iterator is not a constructor'
);
testIterator(iterator(), [1, 2, 3], st, 'original');
testIterator(filter(iterator(), function () { return false; }), [], st, 'filter for always-false');
testIterator(filter(iterator(), function () { return true; }), [1, 2, 3], st, 'filter for always-true');
testIterator(filter(iterator(), function (x, i) { return x === 2 && i === 1; }), [2], st, 'filter returns value for matching value/index');
st.end();
});
t.test('262: test/built-ins/Iterator/prototype/filter/predicate-args', function (st) {
var g = function g() {
var arr = ['a', 'b', 'c'];
var i = 0;
return {
next: function () {
try {
return {
value: arr[i],
done: i >= arr.length
};
} finally {
i += 1;
}
}
};
};
var assertionCount = 0;
var iter = filter(
g(),
function (value, count) {
if (value === 'a') {
st.equal(count, 0, 'first iteration');
} else if (value === 'b') {
st.equal(count, 1, 'second iteration');
} else if (value === 'c') {
st.equal(count, 2, 'third iteration');
} else {
st.fail('unexpected iteration');
}
assertionCount += 1;
return true;
}
);
st.equal(assertionCount, 0, 'prior to iteration');
testIterator(iter, ['a', 'b', 'c'], st, 'iteration');
st.equal(assertionCount, 3);
st.end();
});
t.test('262: test/built-ins/Iterator/prototype/filter/predicate-throws', function (st) {
var returnCalls = 0;
var iter = {
next: function () {
return {
done: false,
value: 1
};
},
'return': function () {
returnCalls += 1;
return {};
}
};
var callbackCalls = 0;
var iterator = filter(iter, function () {
callbackCalls += 1;
throw new SyntaxError();
});
st['throws'](function () { iterator.next(); }, SyntaxError, 'next() throws');
st.equal(callbackCalls, 1);
st.equal(returnCalls, 1);
st.end();
});
t.test('262: test/built-ins/Iterator/prototype/filter/predicate-throws-then-closing-iterator-also-throws', function (st) {
var iter = {
next: function next() {
return {
done: false,
value: 1
};
},
'return': function () {
throw new EvalError();
}
};
var iterator = filter(iter, function () {
throw new SyntaxError();
});
st['throws'](
function () { iterator.next(); },
SyntaxError,
'when the predicate and return() both throw, the predicate’s exception wins'
);
st.end();
});
t.test('262: test/built-ins/Iterator/prototype/filter/get-return-method-throws', { skip: !hasPropertyDescriptors }, function (st) {
var badIterator = {
next: function next() {
return {
done: false,
value: 1
};
}
};
Object.defineProperty(badIterator, 'return', { get: function () { throw new SyntaxError(); } });
var iter = filter(badIterator, function () { return true; });
iter.next();
st['throws'](
function () { iter['return'](); },
SyntaxError,
'gets the `return` method, whose getter throws'
);
st.end();
});
t.test('262: test/built-ins/Iterator/prototype/drop/return-is-forwarded', function (st) {
var returnCount = 0;
var badIterator = {
next: function next() {
return {
done: false,
value: 1
};
},
'return': function () {
returnCount += 1;
return {};
}
};
var iter1 = filter(badIterator, function () { return false; });
st.equal(returnCount, 0, 'iter1, before return()');
iter1['return']();
st.equal(returnCount, 1, 'iter1, after return()');
st.end();
});
t.test('262: test/built-ins/Iterator/prototype/drop/return-is-not-forwarded-after-exhaustion', { skip: !hasPropertyDescriptors }, function (st) {
var makeBadIterator = function makeBadIterator() {
return {
next: function next() {
return {
done: true,
value: undefined
};
},
'return': function () {
throw new SyntaxError();
}
};
};
var iter1 = filter(makeBadIterator(), function () { return true; });
st['throws'](
function () { iter1['return'](); },
SyntaxError,
'iter1, return() throws'
);
iter1.next();
iter1['return']();
// 3 filters (i wish i had pipeline)
var iter2 = filter(
filter(
filter(
makeBadIterator(),
function () { return true; }
),
function () { return true; }
),
function () { return true; }
);
st['throws'](
function () { iter2['return'](); },
SyntaxError,
'iter2, return() throws'
);
iter2.next();
iter2['return']();
st.end();
});
},
index: function () {
test('Iterator.prototype.' + fnName + ': index', function (t) {
module.exports.tests(index, 'Iterator.prototype.' + fnName, t);
t.end();
});
},
implementation: function () {
test('Iterator.prototype.' + fnName + ': implementation', function (t) {
module.exports.tests(callBind(impl), 'Iterator.prototype.' + fnName, t);
t.end();
});
},
shimmed: function () {
test('Iterator.prototype.' + fnName + ': shimmed', function (t) {
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
st.equal(Iterator.prototype[fnName].name, fnName, 'Iterator#' + fnName + ' has name "' + fnName + '"');
st.end();
});
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
et.equal(false, isEnumerable.call(Iterator.prototype, fnName), 'Iterator#' + fnName + ' is not enumerable');
et.end();
});
t.test('bad string/this value', { skip: !hasStrictMode }, function (st) {
st['throws'](function () { return Iterator.prototype[fnName].call(undefined, 'a'); }, TypeError, 'undefined is not an object');
st['throws'](function () { return Iterator.prototype[fnName].call(null, 'a'); }, TypeError, 'null is not an object');
st.end();
});
module.exports.tests(callBind(Iterator.prototype[fnName]), 'Iterator.prototype.' + fnName, t);
t.end();
});
}
};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D wC","132":"E","260":"F A B"},B:{"1":"0 1 2 3 4 5 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","260":"C L G N O P","772":"M"},C:{"1":"0 1 2 3 4 5 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 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 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 0C 1C"},D:{"1":"0 1 2 3 4 5 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 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"},E:{"1":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C 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"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C 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 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 FD GD HD ID NC uC JD OC"},G:{"1":"E ZC KD vC LD MD ND OD PD QD RD 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"},H:{"1":"hD"},I:{"1":"TC J I iD jD kD lD vC mD nD"},J:{"1":"D A"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"260":"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:6,C:"Data URIs",D:true};
@@ -0,0 +1 @@
{"version":3,"names":["_assert","require","_t","_importBuilder","_isModule","identifier","importSpecifier","numericLiteral","sequenceExpression","isImportDeclaration","ImportInjector","constructor","path","importedSource","opts","_defaultOpts","importedType","importedInterop","importingInterop","ensureLiveReference","ensureNoContext","importPosition","programPath","find","p","isProgram","_programPath","_programScope","scope","_hub","hub","_applyDefaults","addDefault","importedSourceIn","addNamed","importName","assert","_generateImport","addNamespace","addSideEffect","isInit","newOpts","Object","assign","nameHint","undefined","blockHoist","isDefault","isNamed","isNamespace","name","isMod","isModule","isModuleForNode","isModuleForBabel","Error","builder","ImportBuilder","import","namespace","named","es6Default","default","var","wildcardInterop","defaultInterop","read","prop","statements","resultName","done","_insertStatements","type","_insertStatementsAfter","_insertStatementsBefore","unshiftContainer","length","isValueImport","firstImportDecl","get","node","source","value","maybeAppendImportSpecifiers","forEach","_blockHoist","targetPath","val","Number","isFinite","insertBefore","statementsSet","Set","importDeclarations","Map","statement","has","set","push","lastImportPath","bodyStmt","newImports","decl","delete","size","insertAfter","Array","from","exports","importKind","hasNamespaceImport","specifiers","hasDefaultImport","target","local","unshift","shift"],"sources":["../src/import-injector.ts"],"sourcesContent":["import assert from \"node:assert\";\nimport {\n identifier,\n importSpecifier,\n numericLiteral,\n sequenceExpression,\n isImportDeclaration,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport type { NodePath, Scope, HubInterface } from \"@babel/traverse\";\n\nimport ImportBuilder from \"./import-builder.ts\";\nimport isModule from \"./is-module.ts\";\n\nexport type ImportOptions = {\n /**\n * The module being referenced.\n */\n importedSource: string | null;\n /**\n * The type of module being imported:\n *\n * * 'es6' - An ES6 module.\n * * 'commonjs' - A CommonJS module. (Default)\n */\n importedType: \"es6\" | \"commonjs\";\n /**\n * The type of interop behavior for namespace/default/named when loading\n * CommonJS modules.\n *\n * ## 'babel' (Default)\n *\n * Load using Babel's interop.\n *\n * If '.__esModule' is true, treat as 'compiled', else:\n *\n * * Namespace: A copy of the module.exports with .default\n * populated by the module.exports object.\n * * Default: The module.exports value.\n * * Named: The .named property of module.exports.\n *\n * The 'ensureLiveReference' has no effect on the liveness of these.\n *\n * ## 'compiled'\n *\n * Assume the module is ES6 compiled to CommonJS. Useful to avoid injecting\n * interop logic if you are confident that the module is a certain format.\n *\n * * Namespace: The root module.exports object.\n * * Default: The .default property of the namespace.\n * * Named: The .named property of the namespace.\n *\n * Will return erroneous results if the imported module is _not_ compiled\n * from ES6 with Babel.\n *\n * ## 'uncompiled'\n *\n * Assume the module is _not_ ES6 compiled to CommonJS. Used a simplified\n * access pattern that doesn't require additional function calls.\n *\n * Will return erroneous results if the imported module _is_ compiled\n * from ES6 with Babel.\n *\n * * Namespace: The module.exports object.\n * * Default: The module.exports object.\n * * Named: The .named property of module.exports.\n */\n importedInterop: \"babel\" | \"node\" | \"compiled\" | \"uncompiled\";\n /**\n * The type of CommonJS interop included in the environment that will be\n * loading the output code.\n *\n * * 'babel' - CommonJS modules load with Babel's interop. (Default)\n * * 'node' - CommonJS modules load with Node's interop.\n *\n * See descriptions in 'importedInterop' for more details.\n */\n importingInterop: \"babel\" | \"node\";\n /**\n * Define whether we explicitly care that the import be a live reference.\n * Only applies when importing default and named imports, not the namespace.\n *\n * * true - Force imported values to be live references.\n * * false - No particular requirements. Keeps the code simplest. (Default)\n */\n ensureLiveReference: boolean;\n /**\n * Define if we explicitly care that the result not be a property reference.\n *\n * * true - Force calls to exclude context. Useful if the value is going to\n * be used as function callee.\n * * false - No particular requirements for context of the access. (Default)\n */\n ensureNoContext: boolean;\n /**\n * Define whether the import should be loaded before or after the existing imports.\n * \"after\" is only allowed inside ECMAScript modules, since it's not possible to\n *Line truncated
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var VideoRole = {
relatedConcepts: [{
module: 'HTML',
concept: {
name: 'video'
}
}],
type: 'widget'
};
var _default = VideoRole;
exports.default = _default;
@@ -0,0 +1,56 @@
{
"name": "file-entry-cache",
"version": "8.0.0",
"description": "Super simple cache for file metadata, useful for process that work o a given series of files and that only need to repeat the job on the changed ones since the previous run of the process",
"repository": "jaredwray/file-entry-cache",
"license": "MIT",
"author": {
"name": "Jared Wray",
"url": "https://jaredwray.com"
},
"main": "cache.js",
"files": [
"cache.js"
],
"engines": {
"node": ">=16.0.0"
},
"scripts": {
"eslint": "eslint --cache --cache-location=node_modules/.cache/ 'cache.js' 'test/**/*.js' 'perf.js'",
"autofix": "npm run eslint -- --fix",
"clean": "rimraf ./node_modules ./package-lock.json ./yarn.lock",
"test": "npm run eslint --silent && c8 mocha -R spec test/specs",
"test:ci": "npm run eslint --silent && c8 --reporter=lcov mocha -R spec test/specs",
"perf": "node perf.js"
},
"prepush": [
"npm run eslint --silent"
],
"precommit": [
"npm run eslint --silent"
],
"keywords": [
"file cache",
"task cache files",
"file cache",
"key par",
"key value",
"cache"
],
"devDependencies": {
"c8": "^8.0.1",
"chai": "^4.3.10",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-mocha": "^10.2.0",
"eslint-plugin-prettier": "^5.0.1",
"glob-expand": "^0.2.1",
"mocha": "^10.2.0",
"prettier": "^3.1.1",
"rimraf": "^5.0.5",
"write": "^2.0.0"
},
"dependencies": {
"flat-cache": "^4.0.0"
}
}
@@ -0,0 +1,8 @@
# `@peculiar/asn1-pkcs8`
[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://raw.githubusercontent.com/PeculiarVentures/asn1-schema/master/packages/pkcs8/LICENSE.md)
[![npm version](https://badge.fury.io/js/%40peculiar%2Fasn1-pkcs8.svg)](https://badge.fury.io/js/%40peculiar%2Fasn1-pkcs8)
[![NPM](https://nodei.co/npm/@peculiar/asn1-pkcs8.png)](https://nodei.co/npm/@peculiar/asn1-pkcs8/)
[RFC 5208](https://tools.ietf.org/html/rfc5208) Public-Key Cryptography Standards (PKCS) #8: Private-Key Information Syntax Specification Version 1.2
@@ -0,0 +1 @@
const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I="ERR_PACKAGE_PATH_NOT_EXPORTED",P="ERR_PACKAGE_IMPORT_NOT_DEFINED",R=/^\d+$/,O=/^(\.{1,2}|node_modules)$/i,w=/\/|\\/;var h=(r=>(r.Export="exports",r.Import="imports",r))(h||{});const f=(r,t,e,o,c)=>{if(t==null)return[];if(typeof t=="string"){const[n,...i]=t.split(w);if(n===".."||i.some(l=>O.test(l)))throw a(E,`Invalid "${r}" target "${t}" defined in the package config`);return[c?t.replace(/\*/g,c):t]}if(Array.isArray(t))return t.flatMap(n=>f(r,n,e,o,c));if(A(t)){for(const n of Object.keys(t)){if(R.test(n))throw a(_,"Cannot contain numeric property keys");if(n==="default"||o.includes(n))return f(r,t[n],e,o,c)}return[]}throw a(E,`Invalid "${r}" target "${t}"`)},s="*",m=(r,t)=>{const e=r.indexOf(s),o=t.indexOf(s);return e===o?t.length>r.length:o>e};function d(r,t){if(!t.includes(s)&&r.hasOwnProperty(t))return[t];let e,o;for(const c of Object.keys(r))if(c.includes(s)){const[n,i,l]=c.split(s);if(l===void 0&&t.startsWith(n)&&t.endsWith(i)){const g=t.slice(n.length,-i.length||void 0);g&&(!e||m(e,c))&&(e=c,o=g)}}return[e,o]}const p=r=>Object.keys(r).reduce((t,e)=>{const o=e===""||e[0]!==".";if(t===void 0||t===o)return o;throw a(_,'"exports" cannot contain some keys starting with "." and some not')},void 0),u=/^\w+:/,v=(r,t,e)=>{if(!r)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof r=="string"||Array.isArray(r)||A(r)&&p(r))&&(r={".":r});const[o,c]=d(r,t),n=f(h.Export,r[o],t,e,c);if(n.length===0)throw a(I,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of n)if(!i.startsWith("./")&&!u.test(i))throw a(E,`Invalid "exports" target "${i}" defined in the package config`);return n},T=(r,t,e)=>{if(!r)throw new Error('"imports" is required');const[o,c]=d(r,t),n=f(h.Import,r[o],t,e,c);if(n.length===0)throw a(P,`Package import specifier "${t}" is not defined in package`);return n};export{v as resolveExports,T as resolveImports};
@@ -0,0 +1,31 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/base/listbox-section-base.tsx
var listbox_section_base_exports = {};
__export(listbox_section_base_exports, {
default: () => listbox_section_base_default
});
module.exports = __toCommonJS(listbox_section_base_exports);
var import_aria_utils = require("@heroui/aria-utils");
var ListboxSectionBase = import_aria_utils.BaseSection;
var listbox_section_base_default = ListboxSectionBase;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,39 @@
'use strict';
var $TypeError = require('es-errors/type');
var GetValueFromBuffer = require('./GetValueFromBuffer');
var IsValidIntegerIndex = require('./IsValidIntegerIndex');
var typedArrayBuffer = require('typed-array-buffer');
var typedArrayByteOffset = require('typed-array-byte-offset');
var whichTypedArray = require('which-typed-array');
var tableTAO = require('./tables/typed-array-objects');
// https://262.ecma-international.org/12.0/#sec-integerindexedelementget
module.exports = function IntegerIndexedElementGet(O, index) {
var arrayTypeName = whichTypedArray(O); // step 4
if (!arrayTypeName) {
throw new $TypeError('Assertion failed: `O` must be a TypedArray'); // step 1
}
if (typeof index !== 'number') {
throw new $TypeError('Assertion failed: `index` must be a Number');
}
if (!IsValidIntegerIndex(O, index)) {
return void undefined; // step 2
}
var offset = typedArrayByteOffset(O); // step 3
var elementType = tableTAO.name['$' + arrayTypeName]; // step 7
var elementSize = tableTAO.size['$' + elementType]; // step 5
var indexedPosition = (index * elementSize) + offset; // step 6
return GetValueFromBuffer(typedArrayBuffer(O), indexedPosition, elementType, true, 'Unordered'); // step 11
};
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,eAAe,CAAC,gBAAgB,CAAC;AACrD","sources":["packages/@react-aria/breadcrumbs/intl/fi-FI.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Navigointilinkit\"\n}\n"],"names":[],"version":3,"file":"fi-FI.main.js.map"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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 P Q H R S T U V W X Y Z a b c d e","322":"f g h"},C:{"1":"0 1 2 3 4 5 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 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 WC S T U V W X Y Z a b c 0C 1C","194":"d e f"},D:{"1":"0 1 2 3 4 5 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 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","322":"f g h"},E:{"1":"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 B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC"},F:{"1":"0 1 2 3 4 5 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 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 FD GD HD ID NC uC JD OC"},G:{"1":"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 bD cD dD bC"},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 AB BB CB DB EB FB SC yD","2":"J oD pD qD rD sD aC tD uD vD wD xD QC RC"},Q:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:4,C:"CSS Cascade Layers",D:true};
@@ -0,0 +1,18 @@
/**
* Converts `iterator` to an array.
*
* @private
* @param {Object} iterator The iterator to convert.
* @returns {Array} Returns the converted array.
*/
function iteratorToArray(iterator) {
var data,
result = [];
while (!(data = iterator.next()).done) {
result.push(data.value);
}
return result;
}
module.exports = iteratorToArray;
@@ -0,0 +1,37 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
/**
* Splits the `@prefix` from remaining `Spec.lines[].token.description` into the `tag` token,
* and populates `spec.tag`
*/
function tagTokenizer() {
return spec => {
const {
tokens
} = spec.source[0];
const match = tokens.description.match(/\s*(@(\S+))(\s*)/);
if (match === null) {
spec.problems.push({
code: 'spec:tag:prefix',
message: 'tag should start with "@" symbol',
line: spec.source[0].number,
critical: true
});
return spec;
}
tokens.tag = match[1];
tokens.postTag = match[3];
tokens.description = tokens.description.slice(match[0].length);
spec.tag = match[2];
return spec;
};
}
exports.default = tagTokenizer;
//# sourceMappingURL=tag.cjs.map
@@ -0,0 +1,824 @@
export default `flf2a$ 8 8 20 -1 6
3-D font created by Daniel Henninger <dahennin@eos.ncsu.edu>
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
**@
/**@
/**@
/**@
/**@
// @
**@
// @@
* *@
/* /*@
/ / @
@
@
@
@
@@
@
** ** @
************@
///**////**/ @
/** /** @
************@
///**////**/ @
// // @@
* @
*****@
/*/*/ @
/*****@
///*/*@
*****@
///*/ @
/ @@
@
** ** @
// ** @
** @
** @
** @
** ** @
// // @@
** @
*/ * @
/ ** @
*/ * *@
* / * @
/* /* @
/ **** *@
//// / @@
**@
//*@
/ @
@
@
@
@
@@
**@
** @
** @
/** @
/** @
//** @
//**@
// @@
** @
//** @
//**@
/**@
/**@
** @
** @
// @@
** @
** /** ** @
//** /** ** @
**************@
///**//**//**/ @
** /** //** @
// /** // @
// @@
@
* @
/* @
*********@
/////*/// @
/* @
/ @
@@
@
@
@
@
@
**@
//*@
/ @@
@
@
@
*****@
///// @
@
@
@@
@
@
@
@
@
**@
/**@
// @@
**@
** @
** @
** @
** @
** @
** @
// @@
**** @
*///**@
/* */*@
/* * /*@
/** /*@
/* /*@
/ **** @
//// @@
** @
*** @
//** @
/** @
/** @
/** @
****@
//// @@
**** @
*/// *@
/ /*@
*** @
*// @
* @
/******@
////// @@
**** @
*/// *@
/ /*@
*** @
/// *@
* /*@
/ **** @
//// @@
** @
*/* @
* /* @
******@
/////* @
/* @
/* @
/ @@
******@
/*//// @
/***** @
///// *@
/*@
* /*@
/ **** @
//// @@
**** @
*/// *@
/* / @
/***** @
/*/// *@
/* /*@
/ **** @
//// @@
******@
//////*@
/*@
* @
* @
* @
* @
/ @@
**** @
*/// *@
/* /*@
/ **** @
*/// *@
/* /*@
/ **** @
//// @@
**** @
*/// *@
/* /*@
/ **** @
///* @
* @
* @
/ @@
@
@
@
@
**@
// @
**@
// @@
@
@
@
**@
// @
**@
//*@
/ @@
**@
**/ @
**/ @
**/ @
// ** @
// ** @
// **@
// @@
@
@
******@
////// @
******@
////// @
@
@@
** @
// ** @
// ** @
// **@
**/ @
**/ @
**/ @
// @@
**** @
**//**@
/** /**@
// ** @
** @
// @
** @
// @@
**** @
*/// *@
/* **/*@
/*/* /*@
/*/ ** @
/* // @
/ *****@
///// @@
** @
**** @
**//** @
** //** @
**********@
/**//////**@
/** /**@
// // @@
****** @
/*////** @
/* /** @
/****** @
/*//// **@
/* /**@
/******* @
/////// @@
****** @
**////**@
** // @
/** @
/** @
//** **@
//****** @
////// @@
******* @
/**////** @
/** /**@
/** /**@
/** /**@
/** ** @
/******* @
/////// @@
********@
/**///// @
/** @
/******* @
/**//// @
/** @
/********@
//////// @@
********@
/**///// @
/** @
/******* @
/**//// @
/** @
/** @
// @@
******** @
**//////**@
** // @
/** @
/** *****@
//** ////**@
//******** @
//////// @@
** **@
/** /**@
/** /**@
/**********@
/**//////**@
/** /**@
/** /**@
// // @@
**@
/**@
/**@
/**@
/**@
/**@
/**@
// @@
**@
/**@
/**@
/**@
/**@
** /**@
//***** @
///// @@
** **@
/** ** @
/** ** @
/**** @
/**/** @
/**//** @
/** //**@
// // @@
** @
/** @
/** @
/** @
/** @
/** @
/********@
//////// @@
**** ****@
/**/** **/**@
/**//** ** /**@
/** //*** /**@
/** //* /**@
/** / /**@
/** /**@
// // @@
**** **@
/**/** /**@
/**//** /**@
/** //** /**@
/** //**/**@
/** //****@
/** //***@
// /// @@
******* @
**/////** @
** //**@
/** /**@
/** /**@
//** ** @
//******* @
/////// @@
******* @
/**////**@
/** /**@
/******* @
/**//// @
/** @
/** @
// @@
******* @
**/////** @
** //** @
/** /** @
/** **/** @
//** // ** @
//******* **@
/////// // @@
******* @
/**////** @
/** /** @
/******* @
/**///** @
/** //** @
/** //**@
// // @@
********@
**////// @
/** @
/*********@
////////**@
/**@
******** @
//////// @@
**********@
/////**/// @
/** @
/** @
/** @
/** @
/** @
// @@
** **@
/** /**@
/** /**@
/** /**@
/** /**@
/** /**@
//******* @
/////// @@
** **@
/** /**@
/** /**@
//** ** @
//** ** @
//**** @
//** @
// @@
** **@
/** /**@
/** * /**@
/** *** /**@
/** **/**/**@
/**** //****@
/**/ ///**@
// // @@
** **@
//** ** @
//** ** @
//*** @
**/** @
** //** @
** //**@
// // @@
** **@
//** ** @
//**** @
//** @
/** @
/** @
/** @
// @@
********@
//////** @
** @
** @
** @
** @
********@
//////// @@
*****@
/**// @
/** @
/** @
/** @
/** @
/*****@
///// @@
** @
//** @
//** @
//** @
//** @
//** @
//**@
// @@
*****@
////**@
/**@
/**@
/**@
/**@
*****@
///// @@
** @
**/ ** @
** // **@
// // @
@
@
@
@@
@
@
@
@
@
@
*****@
///// @@
**@
/* @
/ @
@
@
@
@
@@
@
@
****** @
//////** @
******* @
**////** @
//********@
//////// @@
** @
/** @
/** @
/****** @
/**///**@
/** /**@
/****** @
///// @@
@
@
***** @
**///**@
/** // @
/** **@
//***** @
///// @@
**@
/**@
/**@
******@
**///**@
/** /**@
//******@
////// @@
@
@
***** @
**///**@
/*******@
/**//// @
//******@
////// @@
****@
/**/ @
******@
///**/ @
/** @
/** @
/** @
// @@
@
***** @
**///**@
/** /**@
//******@
/////**@
***** @
///// @@
** @
/** @
/** @
/****** @
/**///**@
/** /**@
/** /**@
// // @@
**@
// @
**@
/**@
/**@
/**@
/**@
// @@
**@
// @
**@
/**@
/**@
**/**@
//*** @
/// @@
** @
/** @
/** **@
/** ** @
/**** @
/**/** @
/**//**@
// // @@
**@
/**@
/**@
/**@
/**@
/**@
***@
/// @@
@
@
********** @
//**//**//**@
/** /** /**@
/** /** /**@
*** /** /**@
/// // // @@
@
@
******* @
//**///**@
/** /**@
/** /**@
*** /**@
/// // @@
@
@
****** @
**////**@
/** /**@
/** /**@
//****** @
////// @@
@
****** @
/**///**@
/** /**@
/****** @
/**/// @
/** @
// @@
@
**** @
**//** @
/** /** @
//***** @
////** @
/***@
/// @@
@
@
******@
//**//*@
/** / @
/** @
/*** @
/// @@
@
@
******@
**//// @
//***** @
/////**@
****** @
////// @@
** @
/** @
******@
///**/ @
/** @
/** @
//** @
// @@
@
@
** **@
/** /**@
/** /**@
/** /**@
//******@
////// @@
@
@
** **@
/** /**@
//** /** @
//**** @
//** @
// @@
@
@
*** **@
//** * /**@
/** ***/**@
/****/****@
***/ ///**@
/// /// @@
@
@
** **@
//** ** @
//*** @
**/** @
** //**@
// // @@
@
** **@
//** ** @
//*** @
/** @
** @
** @
// @@
@
@
******@
////** @
** @
** @
******@
////// @@
***@
**/ @
/** @
*** @
///** @
/** @
//***@
/// @@
*@
/*@
/*@
/ @
*@
/*@
/*@
/ @@
*** @
///** @
/** @
//***@
**/ @
/** @
*** @
/// @@
** *** @
//***//**@
/// // @
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,43 @@
{
"name": "finalhandler",
"description": "Node.js final http responder",
"version": "2.1.0",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"license": "MIT",
"repository": "pillarjs/finalhandler",
"dependencies": {
"debug": "^4.4.0",
"encodeurl": "^2.0.0",
"escape-html": "^1.0.3",
"on-finished": "^2.4.1",
"parseurl": "^1.3.3",
"statuses": "^2.0.1"
},
"devDependencies": {
"eslint": "7.32.0",
"eslint-config-standard": "14.1.1",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.1.0",
"mocha": "^11.0.1",
"nyc": "^17.1.0",
"supertest": "^7.0.0"
},
"files": [
"LICENSE",
"HISTORY.md",
"index.js"
],
"engines": {
"node": ">= 0.8"
},
"scripts": {
"lint": "eslint .",
"test": "mocha --reporter spec --check-leaks test/",
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
"test-cov": "nyc --reporter=html --reporter=text npm test",
"test-inspect": "mocha --reporter spec --inspect --inspect-brk test/"
}
}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Denis Rul
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,89 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/components/spacer.ts
var spacer_exports = {};
__export(spacer_exports, {
spacer: () => spacer
});
module.exports = __toCommonJS(spacer_exports);
// src/utils/tv.ts
var import_tailwind_variants = require("tailwind-variants");
// src/utils/tw-merge-config.ts
var COMMON_UNITS = ["small", "medium", "large"];
var twMergeConfig = {
theme: {
opacity: ["disabled"],
spacing: ["divider"],
borderWidth: COMMON_UNITS,
borderRadius: COMMON_UNITS
},
classGroups: {
shadow: [{ shadow: COMMON_UNITS }],
"font-size": [{ text: ["tiny", ...COMMON_UNITS] }],
"bg-image": [
"bg-stripe-gradient-default",
"bg-stripe-gradient-primary",
"bg-stripe-gradient-secondary",
"bg-stripe-gradient-success",
"bg-stripe-gradient-warning",
"bg-stripe-gradient-danger"
]
}
};
// src/utils/tv.ts
var tv = (options, config) => {
var _a, _b, _c;
return (0, import_tailwind_variants.tv)(options, {
...config,
twMerge: (_a = config == null ? void 0 : config.twMerge) != null ? _a : true,
twMergeConfig: {
...config == null ? void 0 : config.twMergeConfig,
theme: {
...(_b = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _b.theme,
...twMergeConfig.theme
},
classGroups: {
...(_c = config == null ? void 0 : config.twMergeConfig) == null ? void 0 : _c.classGroups,
...twMergeConfig.classGroups
}
}
});
};
// src/components/spacer.ts
var spacer = tv({
base: "w-px h-px inline-block",
variants: {
isInline: {
true: "inline-block",
false: "block"
}
},
defaultVariants: {
isInline: false
}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
spacer
});
@@ -0,0 +1 @@
{"name":"minipass-fetch","version":"2.1.2","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532122843,"integrity":"sha512-3/HehuHV3kbe+5p2IxBU9CeZvn2uEjOgrRZBh6w6txF8DuodLM1pkta8csHgFIoEY1V7/W5mccld3+f5iPludw==","mode":420,"size":1308},"lib/abort-error.js":{"checkedAt":1794532122843,"integrity":"sha512-1eH+x+3BztYDFxUTS8B3KSAAPmg1ElEXtwSCgshHxhbmg0w9j57pLgxwcFl/a+UxmrNpIPqvPBXkoI3Llo58Wg==","mode":420,"size":362},"lib/blob.js":{"checkedAt":1794532122844,"integrity":"sha512-Jolui1YeX1pHtnX02mCw81o9XmISxWmH0UmI/Xu0TFxClBkXIg2Iy1i77rDr6M5fB1UlABpMjYQR+Zsn3b9seg==","mode":420,"size":2330},"lib/body.js":{"checkedAt":1794532122844,"integrity":"sha512-xUuxrNlON4LNalkr7PSY4la1dorAgVXfLuQb0+Np1gn1+SE7BYdaSf6oHpWdnZMnZn5ZluEnuCSkyCtrYFGubg==","mode":420,"size":10552},"lib/fetch-error.js":{"checkedAt":1794532122844,"integrity":"sha512-2cXDQbln6d1emsq8y/qv2D9ldZwyAUjJ0sFbSN4yTgKDJG8yhH0Nc98Ue8S7uUPh7RHyZ60+n5uciy2S0emEkA==","mode":420,"size":713},"lib/headers.js":{"checkedAt":1794532122844,"integrity":"sha512-V6KZ55V6Q+FFqmMTIK4if/NqJ6km/9ApXKThFNg6QnUi2wD6nRpBlTEyjdAkECBGbIFXdhZSpEgEk/y+jtfI0A==","mode":420,"size":6547},"lib/index.js":{"checkedAt":1794532122844,"integrity":"sha512-seAz13DkAW5HMaesqbFhQJkofxnDmyO0Nzel0E+ys6vE++u59hVGUgv1a/Kij4EjslJ+nwzqFwWpwvQ1lnof3Q==","mode":420,"size":12681},"lib/request.js":{"checkedAt":1794532122844,"integrity":"sha512-ko2Etw7p0sOezza7TTGEcbWHtcFXHxuSQ1wyFdZF3rqrdscV2ZWkwXLkayP76YZ4fEkXxxQycDsv/WqFaSny8w==","mode":420,"size":7137},"lib/response.js":{"checkedAt":1794532122844,"integrity":"sha512-wUxzuqntpiRSbOo0tdCqCqlFd+H1JDAQaqjTYnLoTPJD9yDnfHgb/iCPk8mCLm0B5v3P04rA67yGuJLszhZGew==","mode":420,"size":1952},"package.json":{"checkedAt":1794532122845,"integrity":"sha512-QdxcnTMtgCxbfxAMpA/h9kSycQtcU5gaBC1N/s1z4hOfnkiw4GuFaXQ0Pen2a896bX6DB0qQ3rGCKyUDoXw/jw==","mode":420,"size":1719},"README.md":{"checkedAt":1794532122845,"integrity":"sha512-sPUozh1DIXwgnwcgc2jYcLbPUPRAq119hBJyy1jTuqMzenYXpNTpp+b/xEEYDrU2SI57S+iQ6ThlDgWspnb4Hw==","mode":420,"size":988}}}
@@ -0,0 +1,62 @@
'use strict';
var fo = require('../../file-operations');
var readStream = require('../../src/read-contents/read-stream');
function writeStream(file, optResolver, onWritten) {
var flags = fo.getFlags({
overwrite: optResolver.resolve('overwrite', file),
append: optResolver.resolve('append', file),
});
var opt = {
mode: file.stat.mode,
// TODO: need to test this
flags: flags,
};
// TODO: is this the best API?
var outStream = fo.createWriteStream(file.path, opt, onFlush);
file.contents.once('error', onComplete);
outStream.once('error', onComplete);
outStream.once('finish', onComplete);
// TODO: should this use a clone?
file.contents.pipe(outStream);
function onComplete(streamErr) {
// Cleanup event handlers before closing
file.contents.removeListener('error', onComplete);
outStream.removeListener('error', onComplete);
outStream.removeListener('finish', onComplete);
// Need to guarantee the fd is closed before forwarding the error
outStream.once('close', onClose);
outStream.end();
function onClose(closeErr) {
onWritten(streamErr || closeErr);
}
}
// Cleanup
function onFlush(fd, callback) {
// TODO: removing this before readStream because it replaces the stream
file.contents.removeListener('error', onComplete);
// TODO: this is doing sync stuff & the callback seems unnecessary
// TODO: Replace the contents stream or use a clone?
readStream(file, complete);
function complete() {
if (typeof fd !== 'number') {
return callback();
}
fo.updateMetadata(fd, file, callback);
}
}
}
module.exports = writeStream;
@@ -0,0 +1,2 @@
export type { Modifier, Modifiers } from './types';
export { applyModifiers } from './applyModifiers';
@@ -0,0 +1,50 @@
'use strict'
var consoleControl = require('console-control-strings')
var renderTemplate = require('./render-template.js')
var validate = require('aproba')
var Plumbing = module.exports = function (theme, template, width) {
if (!width) {
width = 80
}
validate('OAN', [theme, template, width])
this.showing = false
this.theme = theme
this.width = width
this.template = template
}
Plumbing.prototype = {}
Plumbing.prototype.setTheme = function (theme) {
validate('O', [theme])
this.theme = theme
}
Plumbing.prototype.setTemplate = function (template) {
validate('A', [template])
this.template = template
}
Plumbing.prototype.setWidth = function (width) {
validate('N', [width])
this.width = width
}
Plumbing.prototype.hide = function () {
return consoleControl.gotoSOL() + consoleControl.eraseLine()
}
Plumbing.prototype.hideCursor = consoleControl.hideCursor
Plumbing.prototype.showCursor = consoleControl.showCursor
Plumbing.prototype.show = function (status) {
var values = Object.create(this.theme)
for (var key in status) {
values[key] = status[key]
}
return renderTemplate(this.width, this.template, values).trim() +
consoleControl.color('reset') +
consoleControl.eraseLine() + consoleControl.gotoSOL()
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"wC","8":"K D E F A","164":"B"},B:{"1":"0 1 2 3 4 5 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","513":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 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 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","8":"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 0C 1C","66":"dB eB"},D:{"1":"0 1 2 3 4 5 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","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"},E:{"1":"B C L M G 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","8":"J ZB K D 2C ZC 3C 4C","289":"E F A 5C 6C aC"},F:{"1":"0 1 2 3 4 5 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","8":"6 7 8 9 F B C G N O P aB FD GD HD ID NC uC JD OC"},G:{"1":"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","8":"ZC KD vC LD MD ND","289":"E OD PD QD RD SD"},H:{"2":"hD"},I:{"1":"I","8":"TC J iD jD kD lD vC mD nD"},J:{"8":"D A"},K:{"1":"H","8":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"8":"A","164":"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:2,C:"Web Cryptography",D:true};
@@ -0,0 +1,28 @@
import { Ensure } from '../helpers/index.mjs';
import type { SchemaOptions, TSchema } from '../schema/index.mjs';
import type { Static } from '../static/index.mjs';
import { Kind } from '../symbols/index.mjs';
export interface ArrayOptions extends SchemaOptions {
/** The minimum number of items in this array */
minItems?: number;
/** The maximum number of items in this array */
maxItems?: number;
/** Should this schema contain unique items */
uniqueItems?: boolean;
/** A schema for which some elements should match */
contains?: TSchema;
/** A minimum number of contains schema matches */
minContains?: number;
/** A maximum number of contains schema matches */
maxContains?: number;
}
type ArrayStatic<T extends TSchema, P extends unknown[]> = Ensure<Static<T, P>[]>;
export interface TArray<T extends TSchema = TSchema> extends TSchema, ArrayOptions {
[Kind]: 'Array';
static: ArrayStatic<T, this['params']>;
type: 'array';
items: T;
}
/** `[Json]` Creates an Array type */
export declare function Array<Type extends TSchema>(items: Type, options?: ArrayOptions): TArray<Type>;
export {};
@@ -0,0 +1,15 @@
'use strict';
var $TypeError = require('es-errors/type');
// https://262.ecma-international.org/16.0/#sec-createiterresultobject
module.exports = function CreateIteratorResultObject(value, done) {
if (typeof done !== 'boolean') {
throw new $TypeError('Assertion failed: Type(done) is not Boolean');
}
return {
value: value,
done: done
};
};
@@ -0,0 +1,362 @@
var $4ae0260a69729f1d$exports = require("./conversion.main.js");
var $af14c9812fdceb33$exports = require("./GregorianCalendar.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "add", () => $5c0571aa5b6fb5da$export$e16d8520af44a096);
$parcel$export(module.exports, "constrain", () => $5c0571aa5b6fb5da$export$c4e2ecac49351ef2);
$parcel$export(module.exports, "subtract", () => $5c0571aa5b6fb5da$export$4e2d2ead65e5f7e3);
$parcel$export(module.exports, "set", () => $5c0571aa5b6fb5da$export$adaa4cf7ef1b65be);
$parcel$export(module.exports, "setTime", () => $5c0571aa5b6fb5da$export$e5d5e1c1822b6e56);
$parcel$export(module.exports, "constrainTime", () => $5c0571aa5b6fb5da$export$7555de1e070510cb);
$parcel$export(module.exports, "addTime", () => $5c0571aa5b6fb5da$export$7ed87b6bc2506470);
$parcel$export(module.exports, "subtractTime", () => $5c0571aa5b6fb5da$export$fe34d3a381cd7501);
$parcel$export(module.exports, "cycleDate", () => $5c0571aa5b6fb5da$export$d52ced6badfb9a4c);
$parcel$export(module.exports, "cycleTime", () => $5c0571aa5b6fb5da$export$dd02b3e0007dfe28);
$parcel$export(module.exports, "addZoned", () => $5c0571aa5b6fb5da$export$96b1d28349274637);
$parcel$export(module.exports, "subtractZoned", () => $5c0571aa5b6fb5da$export$6814caac34ca03c7);
$parcel$export(module.exports, "cycleZoned", () => $5c0571aa5b6fb5da$export$9a297d111fc86b79);
$parcel$export(module.exports, "setZoned", () => $5c0571aa5b6fb5da$export$31b5430eb18be4f8);
/*
* 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.
*/
const $5c0571aa5b6fb5da$var$ONE_HOUR = 3600000;
function $5c0571aa5b6fb5da$export$e16d8520af44a096(date, duration) {
let mutableDate = date.copy();
let days = 'hour' in mutableDate ? $5c0571aa5b6fb5da$var$addTimeFields(mutableDate, duration) : 0;
$5c0571aa5b6fb5da$var$addYears(mutableDate, duration.years || 0);
if (mutableDate.calendar.balanceYearMonth) mutableDate.calendar.balanceYearMonth(mutableDate, date);
mutableDate.month += duration.months || 0;
$5c0571aa5b6fb5da$var$balanceYearMonth(mutableDate);
$5c0571aa5b6fb5da$var$constrainMonthDay(mutableDate);
mutableDate.day += (duration.weeks || 0) * 7;
mutableDate.day += duration.days || 0;
mutableDate.day += days;
$5c0571aa5b6fb5da$var$balanceDay(mutableDate);
if (mutableDate.calendar.balanceDate) mutableDate.calendar.balanceDate(mutableDate);
// Constrain in case adding ended up with a date outside the valid range for the calendar system.
// The behavior here is slightly different than when constraining in the `set` function in that
// we adjust smaller fields to their minimum/maximum values rather than constraining each field
// individually. This matches the general behavior of `add` vs `set` regarding how fields are balanced.
if (mutableDate.year < 1) {
mutableDate.year = 1;
mutableDate.month = 1;
mutableDate.day = 1;
}
let maxYear = mutableDate.calendar.getYearsInEra(mutableDate);
if (mutableDate.year > maxYear) {
var _mutableDate_calendar_isInverseEra, _mutableDate_calendar;
let isInverseEra = (_mutableDate_calendar_isInverseEra = (_mutableDate_calendar = mutableDate.calendar).isInverseEra) === null || _mutableDate_calendar_isInverseEra === void 0 ? void 0 : _mutableDate_calendar_isInverseEra.call(_mutableDate_calendar, mutableDate);
mutableDate.year = maxYear;
mutableDate.month = isInverseEra ? 1 : mutableDate.calendar.getMonthsInYear(mutableDate);
mutableDate.day = isInverseEra ? 1 : mutableDate.calendar.getDaysInMonth(mutableDate);
}
if (mutableDate.month < 1) {
mutableDate.month = 1;
mutableDate.day = 1;
}
let maxMonth = mutableDate.calendar.getMonthsInYear(mutableDate);
if (mutableDate.month > maxMonth) {
mutableDate.month = maxMonth;
mutableDate.day = mutableDate.calendar.getDaysInMonth(mutableDate);
}
mutableDate.day = Math.max(1, Math.min(mutableDate.calendar.getDaysInMonth(mutableDate), mutableDate.day));
return mutableDate;
}
function $5c0571aa5b6fb5da$var$addYears(date, years) {
var _date_calendar_isInverseEra, _date_calendar;
if ((_date_calendar_isInverseEra = (_date_calendar = date.calendar).isInverseEra) === null || _date_calendar_isInverseEra === void 0 ? void 0 : _date_calendar_isInverseEra.call(_date_calendar, date)) years = -years;
date.year += years;
}
function $5c0571aa5b6fb5da$var$balanceYearMonth(date) {
while(date.month < 1){
$5c0571aa5b6fb5da$var$addYears(date, -1);
date.month += date.calendar.getMonthsInYear(date);
}
let monthsInYear = 0;
while(date.month > (monthsInYear = date.calendar.getMonthsInYear(date))){
date.month -= monthsInYear;
$5c0571aa5b6fb5da$var$addYears(date, 1);
}
}
function $5c0571aa5b6fb5da$var$balanceDay(date) {
while(date.day < 1){
date.month--;
$5c0571aa5b6fb5da$var$balanceYearMonth(date);
date.day += date.calendar.getDaysInMonth(date);
}
while(date.day > date.calendar.getDaysInMonth(date)){
date.day -= date.calendar.getDaysInMonth(date);
date.month++;
$5c0571aa5b6fb5da$var$balanceYearMonth(date);
}
}
function $5c0571aa5b6fb5da$var$constrainMonthDay(date) {
date.month = Math.max(1, Math.min(date.calendar.getMonthsInYear(date), date.month));
date.day = Math.max(1, Math.min(date.calendar.getDaysInMonth(date), date.day));
}
function $5c0571aa5b6fb5da$export$c4e2ecac49351ef2(date) {
if (date.calendar.constrainDate) date.calendar.constrainDate(date);
date.year = Math.max(1, Math.min(date.calendar.getYearsInEra(date), date.year));
$5c0571aa5b6fb5da$var$constrainMonthDay(date);
}
function $5c0571aa5b6fb5da$export$3e2544e88a25bff8(duration) {
let inverseDuration = {};
for(let key in duration)if (typeof duration[key] === 'number') inverseDuration[key] = -duration[key];
return inverseDuration;
}
function $5c0571aa5b6fb5da$export$4e2d2ead65e5f7e3(date, duration) {
return $5c0571aa5b6fb5da$export$e16d8520af44a096(date, $5c0571aa5b6fb5da$export$3e2544e88a25bff8(duration));
}
function $5c0571aa5b6fb5da$export$adaa4cf7ef1b65be(date, fields) {
let mutableDate = date.copy();
if (fields.era != null) mutableDate.era = fields.era;
if (fields.year != null) mutableDate.year = fields.year;
if (fields.month != null) mutableDate.month = fields.month;
if (fields.day != null) mutableDate.day = fields.day;
$5c0571aa5b6fb5da$export$c4e2ecac49351ef2(mutableDate);
return mutableDate;
}
function $5c0571aa5b6fb5da$export$e5d5e1c1822b6e56(value, fields) {
let mutableValue = value.copy();
if (fields.hour != null) mutableValue.hour = fields.hour;
if (fields.minute != null) mutableValue.minute = fields.minute;
if (fields.second != null) mutableValue.second = fields.second;
if (fields.millisecond != null) mutableValue.millisecond = fields.millisecond;
$5c0571aa5b6fb5da$export$7555de1e070510cb(mutableValue);
return mutableValue;
}
function $5c0571aa5b6fb5da$var$balanceTime(time) {
time.second += Math.floor(time.millisecond / 1000);
time.millisecond = $5c0571aa5b6fb5da$var$nonNegativeMod(time.millisecond, 1000);
time.minute += Math.floor(time.second / 60);
time.second = $5c0571aa5b6fb5da$var$nonNegativeMod(time.second, 60);
time.hour += Math.floor(time.minute / 60);
time.minute = $5c0571aa5b6fb5da$var$nonNegativeMod(time.minute, 60);
let days = Math.floor(time.hour / 24);
time.hour = $5c0571aa5b6fb5da$var$nonNegativeMod(time.hour, 24);
return days;
}
function $5c0571aa5b6fb5da$export$7555de1e070510cb(time) {
time.millisecond = Math.max(0, Math.min(time.millisecond, 1000));
time.second = Math.max(0, Math.min(time.second, 59));
time.minute = Math.max(0, Math.min(time.minute, 59));
time.hour = Math.max(0, Math.min(time.hour, 23));
}
function $5c0571aa5b6fb5da$var$nonNegativeMod(a, b) {
let result = a % b;
if (result < 0) result += b;
return result;
}
function $5c0571aa5b6fb5da$var$addTimeFields(time, duration) {
time.hour += duration.hours || 0;
time.minute += duration.minutes || 0;
time.second += duration.seconds || 0;
time.millisecond += duration.milliseconds || 0;
return $5c0571aa5b6fb5da$var$balanceTime(time);
}
function $5c0571aa5b6fb5da$export$7ed87b6bc2506470(time, duration) {
let res = time.copy();
$5c0571aa5b6fb5da$var$addTimeFields(res, duration);
return res;
}
function $5c0571aa5b6fb5da$export$fe34d3a381cd7501(time, duration) {
return $5c0571aa5b6fb5da$export$7ed87b6bc2506470(time, $5c0571aa5b6fb5da$export$3e2544e88a25bff8(duration));
}
function $5c0571aa5b6fb5da$export$d52ced6badfb9a4c(value, field, amount, options) {
let mutable = value.copy();
switch(field){
case 'era':
{
let eras = value.calendar.getEras();
let eraIndex = eras.indexOf(value.era);
if (eraIndex < 0) throw new Error('Invalid era: ' + value.era);
eraIndex = $5c0571aa5b6fb5da$var$cycleValue(eraIndex, amount, 0, eras.length - 1, options === null || options === void 0 ? void 0 : options.round);
mutable.era = eras[eraIndex];
// Constrain the year and other fields within the era, so the era doesn't change when we balance below.
$5c0571aa5b6fb5da$export$c4e2ecac49351ef2(mutable);
break;
}
case 'year':
var _mutable_calendar_isInverseEra, _mutable_calendar;
if ((_mutable_calendar_isInverseEra = (_mutable_calendar = mutable.calendar).isInverseEra) === null || _mutable_calendar_isInverseEra === void 0 ? void 0 : _mutable_calendar_isInverseEra.call(_mutable_calendar, mutable)) amount = -amount;
// The year field should not cycle within the era as that can cause weird behavior affecting other fields.
// We need to also allow values < 1 so that decrementing goes to the previous era. If we get -Infinity back
// we know we wrapped around after reaching 9999 (the maximum), so set the year back to 1.
mutable.year = $5c0571aa5b6fb5da$var$cycleValue(value.year, amount, -Infinity, 9999, options === null || options === void 0 ? void 0 : options.round);
if (mutable.year === -Infinity) mutable.year = 1;
if (mutable.calendar.balanceYearMonth) mutable.calendar.balanceYearMonth(mutable, value);
break;
case 'month':
mutable.month = $5c0571aa5b6fb5da$var$cycleValue(value.month, amount, 1, value.calendar.getMonthsInYear(value), options === null || options === void 0 ? void 0 : options.round);
break;
case 'day':
mutable.day = $5c0571aa5b6fb5da$var$cycleValue(value.day, amount, 1, value.calendar.getDaysInMonth(value), options === null || options === void 0 ? void 0 : options.round);
break;
default:
throw new Error('Unsupported field ' + field);
}
if (value.calendar.balanceDate) value.calendar.balanceDate(mutable);
$5c0571aa5b6fb5da$export$c4e2ecac49351ef2(mutable);
return mutable;
}
function $5c0571aa5b6fb5da$export$dd02b3e0007dfe28(value, field, amount, options) {
let mutable = value.copy();
switch(field){
case 'hour':
{
let hours = value.hour;
let min = 0;
let max = 23;
if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
let isPM = hours >= 12;
min = isPM ? 12 : 0;
max = isPM ? 23 : 11;
}
mutable.hour = $5c0571aa5b6fb5da$var$cycleValue(hours, amount, min, max, options === null || options === void 0 ? void 0 : options.round);
break;
}
case 'minute':
mutable.minute = $5c0571aa5b6fb5da$var$cycleValue(value.minute, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
break;
case 'second':
mutable.second = $5c0571aa5b6fb5da$var$cycleValue(value.second, amount, 0, 59, options === null || options === void 0 ? void 0 : options.round);
break;
case 'millisecond':
mutable.millisecond = $5c0571aa5b6fb5da$var$cycleValue(value.millisecond, amount, 0, 999, options === null || options === void 0 ? void 0 : options.round);
break;
default:
throw new Error('Unsupported field ' + field);
}
return mutable;
}
function $5c0571aa5b6fb5da$var$cycleValue(value, amount, min, max, round = false) {
if (round) {
value += Math.sign(amount);
if (value < min) value = max;
let div = Math.abs(amount);
if (amount > 0) value = Math.ceil(value / div) * div;
else value = Math.floor(value / div) * div;
if (value > max) value = min;
} else {
value += amount;
if (value < min) value = max - (min - value - 1);
else if (value > max) value = min + (value - max - 1);
}
return value;
}
function $5c0571aa5b6fb5da$export$96b1d28349274637(dateTime, duration) {
let ms;
if (duration.years != null && duration.years !== 0 || duration.months != null && duration.months !== 0 || duration.weeks != null && duration.weeks !== 0 || duration.days != null && duration.days !== 0) {
let res = $5c0571aa5b6fb5da$export$e16d8520af44a096((0, $4ae0260a69729f1d$exports.toCalendarDateTime)(dateTime), {
years: duration.years,
months: duration.months,
weeks: duration.weeks,
days: duration.days
});
// Changing the date may change the timezone offset, so we need to recompute
// using the 'compatible' disambiguation.
ms = (0, $4ae0260a69729f1d$exports.toAbsolute)(res, dateTime.timeZone);
} else // Otherwise, preserve the offset of the original date.
ms = (0, $4ae0260a69729f1d$exports.epochFromDate)(dateTime) - dateTime.offset;
// Perform time manipulation in milliseconds rather than on the original time fields to account for DST.
// For example, adding one hour during a DST transition may result in the hour field staying the same or
// skipping an hour. This results in the offset field changing value instead of the specified field.
ms += duration.milliseconds || 0;
ms += (duration.seconds || 0) * 1000;
ms += (duration.minutes || 0) * 60000;
ms += (duration.hours || 0) * 3600000;
let res = (0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, dateTime.timeZone);
return (0, $4ae0260a69729f1d$exports.toCalendar)(res, dateTime.calendar);
}
function $5c0571aa5b6fb5da$export$6814caac34ca03c7(dateTime, duration) {
return $5c0571aa5b6fb5da$export$96b1d28349274637(dateTime, $5c0571aa5b6fb5da$export$3e2544e88a25bff8(duration));
}
function $5c0571aa5b6fb5da$export$9a297d111fc86b79(dateTime, field, amount, options) {
// For date fields, we want the time to remain consistent and the UTC offset to potentially change to account for DST changes.
// For time fields, we want the time to change by the amount given. This may result in the hour field staying the same, but the UTC
// offset changing in the case of a backward DST transition, or skipping an hour in the case of a forward DST transition.
switch(field){
case 'hour':
{
let min = 0;
let max = 23;
if ((options === null || options === void 0 ? void 0 : options.hourCycle) === 12) {
let isPM = dateTime.hour >= 12;
min = isPM ? 12 : 0;
max = isPM ? 23 : 11;
}
// The minimum and maximum hour may be affected by daylight saving time.
// For example, it might jump forward at midnight, and skip 1am.
// Or it might end at midnight and repeat the 11pm hour. To handle this, we get
// the possible absolute times for the min and max, and find the maximum range
// that is within the current day.
let plainDateTime = (0, $4ae0260a69729f1d$exports.toCalendarDateTime)(dateTime);
let minDate = (0, $4ae0260a69729f1d$exports.toCalendar)($5c0571aa5b6fb5da$export$e5d5e1c1822b6e56(plainDateTime, {
hour: min
}), new (0, $af14c9812fdceb33$exports.GregorianCalendar)());
let minAbsolute = [
(0, $4ae0260a69729f1d$exports.toAbsolute)(minDate, dateTime.timeZone, 'earlier'),
(0, $4ae0260a69729f1d$exports.toAbsolute)(minDate, dateTime.timeZone, 'later')
].filter((ms)=>(0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, dateTime.timeZone).day === minDate.day)[0];
let maxDate = (0, $4ae0260a69729f1d$exports.toCalendar)($5c0571aa5b6fb5da$export$e5d5e1c1822b6e56(plainDateTime, {
hour: max
}), new (0, $af14c9812fdceb33$exports.GregorianCalendar)());
let maxAbsolute = [
(0, $4ae0260a69729f1d$exports.toAbsolute)(maxDate, dateTime.timeZone, 'earlier'),
(0, $4ae0260a69729f1d$exports.toAbsolute)(maxDate, dateTime.timeZone, 'later')
].filter((ms)=>(0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, dateTime.timeZone).day === maxDate.day).pop();
// Since hours may repeat, we need to operate on the absolute time in milliseconds.
// This is done in hours from the Unix epoch so that cycleValue works correctly,
// and then converted back to milliseconds.
let ms = (0, $4ae0260a69729f1d$exports.epochFromDate)(dateTime) - dateTime.offset;
let hours = Math.floor(ms / $5c0571aa5b6fb5da$var$ONE_HOUR);
let remainder = ms % $5c0571aa5b6fb5da$var$ONE_HOUR;
ms = $5c0571aa5b6fb5da$var$cycleValue(hours, amount, Math.floor(minAbsolute / $5c0571aa5b6fb5da$var$ONE_HOUR), Math.floor(maxAbsolute / $5c0571aa5b6fb5da$var$ONE_HOUR), options === null || options === void 0 ? void 0 : options.round) * $5c0571aa5b6fb5da$var$ONE_HOUR + remainder;
// Now compute the new timezone offset, and convert the absolute time back to local time.
return (0, $4ae0260a69729f1d$exports.toCalendar)((0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, dateTime.timeZone), dateTime.calendar);
}
case 'minute':
case 'second':
case 'millisecond':
// @ts-ignore
return $5c0571aa5b6fb5da$export$dd02b3e0007dfe28(dateTime, field, amount, options);
case 'era':
case 'year':
case 'month':
case 'day':
{
let res = $5c0571aa5b6fb5da$export$d52ced6badfb9a4c((0, $4ae0260a69729f1d$exports.toCalendarDateTime)(dateTime), field, amount, options);
let ms = (0, $4ae0260a69729f1d$exports.toAbsolute)(res, dateTime.timeZone);
return (0, $4ae0260a69729f1d$exports.toCalendar)((0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, dateTime.timeZone), dateTime.calendar);
}
default:
throw new Error('Unsupported field ' + field);
}
}
function $5c0571aa5b6fb5da$export$31b5430eb18be4f8(dateTime, fields, disambiguation) {
// Set the date/time fields, and recompute the UTC offset to account for DST changes.
// We also need to validate by converting back to a local time in case hours are skipped during forward DST transitions.
let plainDateTime = (0, $4ae0260a69729f1d$exports.toCalendarDateTime)(dateTime);
let res = $5c0571aa5b6fb5da$export$e5d5e1c1822b6e56($5c0571aa5b6fb5da$export$adaa4cf7ef1b65be(plainDateTime, fields), fields);
// If the resulting plain date time values are equal, return the original time.
// We don't want to change the offset when setting the time to the same value.
if (res.compare(plainDateTime) === 0) return dateTime;
let ms = (0, $4ae0260a69729f1d$exports.toAbsolute)(res, dateTime.timeZone, disambiguation);
return (0, $4ae0260a69729f1d$exports.toCalendar)((0, $4ae0260a69729f1d$exports.fromAbsolute)(ms, dateTime.timeZone), dateTime.calendar);
}
//# sourceMappingURL=manipulation.main.js.map
@@ -0,0 +1,4 @@
export interface NodeIYellowFaceService {
download(resourceConfigJson: string, resourceDir: string, cacheDir: string, force: boolean): void;
setHistory(fullMd5: string): void;
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F wC"},B:{"1":"0 1 2 3 4 5 C L 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"},C:{"1":"0 1 2 3 4 5 6 7 8 9 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 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 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 0C 1C","2":"xC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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 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","4":"ZB K D"},E:{"1":"K D E F A B C L M G 4C 5C 6C 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 2C ZC 3C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 F B C 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 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 FD GD HD ID NC uC JD OC"},G:{"1":"E MD ND OD PD QD RD 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":"ZC KD vC LD"},H:{"1":"hD"},I:{"1":"I mD nD","2":"TC J iD jD kD lD vC"},J:{"1":"A","2":"D"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"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:2,C:"SVG filters",D:true};
@@ -0,0 +1 @@
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}export function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}export default clsx;
@@ -0,0 +1,4 @@
import type { Coordinates } from '../../types';
export declare function getScrollOffsets(scrollableAncestors: Element[]): Coordinates;
export declare function getScrollXOffset(scrollableAncestors: Element[]): number;
export declare function getScrollYOffset(scrollableAncestors: Element[]): number;
@@ -0,0 +1,43 @@
import type { SourceMapSegment } from './sourcemap-segment';
export interface SourceMapV3 {
file?: string | null;
names: readonly string[];
sourceRoot?: string;
sources: readonly (string | null)[];
sourcesContent?: readonly (string | null)[];
version: 3;
ignoreList?: readonly number[];
}
export interface EncodedSourceMap extends SourceMapV3 {
mappings: string;
}
export interface DecodedSourceMap extends SourceMapV3 {
mappings: readonly SourceMapSegment[][];
}
export interface Pos {
line: number;
column: number;
}
export interface OriginalPos extends Pos {
source: string;
}
export interface BindingExpressionRange {
start: Pos;
expression: string;
}
export type Mapping = {
generated: Pos;
source: undefined;
original: undefined;
name: undefined;
} | {
generated: Pos;
source: string;
original: Pos;
name: string;
} | {
generated: Pos;
source: string;
original: Pos;
name: undefined;
};
@@ -0,0 +1 @@
{"version":3,"names":["_t","require","createFlowUnionType","createTSUnionType","createUnionTypeAnnotation","isFlowType","isTSType","createUnionType","types","every","v"],"sources":["../../../src/path/inference/util.ts"],"sourcesContent":["import {\n createFlowUnionType,\n createTSUnionType,\n createUnionTypeAnnotation,\n isFlowType,\n isTSType,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\n\nexport function createUnionType(\n types: (t.FlowType | t.TSType)[],\n): t.FlowType | t.TSType | undefined {\n if (process.env.BABEL_8_BREAKING) {\n if (types.every(v => isFlowType(v))) {\n return createFlowUnionType(types);\n }\n if (types.every(v => isTSType(v))) {\n return createTSUnionType(types);\n }\n } else {\n if (types.every(v => isFlowType(v))) {\n if (createFlowUnionType) {\n return createFlowUnionType(types);\n }\n\n return createUnionTypeAnnotation(types);\n } else if (types.every(v => isTSType(v))) {\n if (createTSUnionType) {\n return createTSUnionType(types);\n }\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,EAAA,GAAAC,OAAA;AAMsB;EALpBC,mBAAmB;EACnBC,iBAAiB;EACjBC,yBAAyB;EACzBC,UAAU;EACVC;AAAQ,IAAAN,EAAA;AAIH,SAASO,eAAeA,CAC7BC,KAAgC,EACG;EAQ5B;IACL,IAAIA,KAAK,CAACC,KAAK,CAACC,CAAC,IAAIL,UAAU,CAACK,CAAC,CAAC,CAAC,EAAE;MACnC,IAAIR,mBAAmB,EAAE;QACvB,OAAOA,mBAAmB,CAACM,KAAK,CAAC;MACnC;MAEA,OAAOJ,yBAAyB,CAACI,KAAK,CAAC;IACzC,CAAC,MAAM,IAAIA,KAAK,CAACC,KAAK,CAACC,CAAC,IAAIJ,QAAQ,CAACI,CAAC,CAAC,CAAC,EAAE;MACxC,IAAIP,iBAAiB,EAAE;QACrB,OAAOA,iBAAiB,CAACK,KAAK,CAAC;MACjC;IACF;EACF;AACF","ignoreList":[]}
@@ -0,0 +1,220 @@
/**
* DO NOT MODIFY THESE FILES!
*
* These files were copied from the **types** package. To update this file, make changes to those
* files instead and then run the following command from the monorepo root folder:
*
* deno task codegen:types
*/
import type { AttestationConveyancePreference, AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs, AuthenticatorAssertionResponse, AuthenticatorAttachment, AuthenticatorAttestationResponse, AuthenticatorSelectionCriteria, COSEAlgorithmIdentifier, PublicKeyCredential, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, PublicKeyCredentialParameters, PublicKeyCredentialRequestOptions, PublicKeyCredentialRpEntity, PublicKeyCredentialType, UserVerificationRequirement } from './dom.js';
export type { AttestationConveyancePreference, AuthenticationExtensionsClientInputs, AuthenticationExtensionsClientOutputs, AuthenticatorAssertionResponse, AuthenticatorAttachment, AuthenticatorAttestationResponse, AuthenticatorSelectionCriteria, AuthenticatorTransport, COSEAlgorithmIdentifier, Crypto, PublicKeyCredential, PublicKeyCredentialCreationOptions, PublicKeyCredentialDescriptor, PublicKeyCredentialParameters, PublicKeyCredentialRequestOptions, PublicKeyCredentialRpEntity, PublicKeyCredentialType, PublicKeyCredentialUserEntity, ResidentKeyRequirement, UserVerificationRequirement, } from './dom.js';
/**
* A variant of PublicKeyCredentialCreationOptions suitable for JSON transmission to the browser to
* (eventually) get passed into navigator.credentials.create(...) in the browser.
*
* This should eventually get replaced with official TypeScript DOM types when WebAuthn L3 types
* eventually make it into the language:
*
* https://w3c.github.io/webauthn/#dictdef-publickeycredentialcreationoptionsjson
*/
export interface PublicKeyCredentialCreationOptionsJSON {
rp: PublicKeyCredentialRpEntity;
user: PublicKeyCredentialUserEntityJSON;
challenge: Base64URLString;
pubKeyCredParams: PublicKeyCredentialParameters[];
timeout?: number;
excludeCredentials?: PublicKeyCredentialDescriptorJSON[];
authenticatorSelection?: AuthenticatorSelectionCriteria;
hints?: PublicKeyCredentialHint[];
attestation?: AttestationConveyancePreference;
attestationFormats?: AttestationFormat[];
extensions?: AuthenticationExtensionsClientInputs;
}
/**
* A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to
* (eventually) get passed into navigator.credentials.get(...) in the browser.
*/
export interface PublicKeyCredentialRequestOptionsJSON {
challenge: Base64URLString;
timeout?: number;
rpId?: string;
allowCredentials?: PublicKeyCredentialDescriptorJSON[];
userVerification?: UserVerificationRequirement;
hints?: PublicKeyCredentialHint[];
extensions?: AuthenticationExtensionsClientInputs;
}
/**
* https://w3c.github.io/webauthn/#dictdef-publickeycredentialdescriptorjson
*/
export interface PublicKeyCredentialDescriptorJSON {
id: Base64URLString;
type: PublicKeyCredentialType;
transports?: AuthenticatorTransportFuture[];
}
/**
* https://w3c.github.io/webauthn/#dictdef-publickeycredentialuserentityjson
*/
export interface PublicKeyCredentialUserEntityJSON {
id: string;
name: string;
displayName: string;
}
/**
* The value returned from navigator.credentials.create()
*/
export interface RegistrationCredential extends PublicKeyCredentialFuture {
response: AuthenticatorAttestationResponseFuture;
}
/**
* A slightly-modified RegistrationCredential to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*
* https://w3c.github.io/webauthn/#dictdef-registrationresponsejson
*/
export interface RegistrationResponseJSON {
id: Base64URLString;
rawId: Base64URLString;
response: AuthenticatorAttestationResponseJSON;
authenticatorAttachment?: AuthenticatorAttachment;
clientExtensionResults: AuthenticationExtensionsClientOutputs;
type: PublicKeyCredentialType;
}
/**
* The value returned from navigator.credentials.get()
*/
export interface AuthenticationCredential extends PublicKeyCredentialFuture {
response: AuthenticatorAssertionResponse;
}
/**
* A slightly-modified AuthenticationCredential to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*
* https://w3c.github.io/webauthn/#dictdef-authenticationresponsejson
*/
export interface AuthenticationResponseJSON {
id: Base64URLString;
rawId: Base64URLString;
response: AuthenticatorAssertionResponseJSON;
authenticatorAttachment?: AuthenticatorAttachment;
clientExtensionResults: AuthenticationExtensionsClientOutputs;
type: PublicKeyCredentialType;
}
/**
* A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*
* https://w3c.github.io/webauthn/#dictdef-authenticatorattestationresponsejson
*/
export interface AuthenticatorAttestationResponseJSON {
clientDataJSON: Base64URLString;
attestationObject: Base64URLString;
authenticatorData?: Base64URLString;
transports?: AuthenticatorTransportFuture[];
publicKeyAlgorithm?: COSEAlgorithmIdentifier;
publicKey?: Base64URLString;
}
/**
* A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*
* https://w3c.github.io/webauthn/#dictdef-authenticatorassertionresponsejson
*/
export interface AuthenticatorAssertionResponseJSON {
clientDataJSON: Base64URLString;
authenticatorData: Base64URLString;
signature: Base64URLString;
userHandle?: Base64URLString;
}
/**
* Public key credential information needed to verify authentication responses
*/
export type WebAuthnCredential = {
id: Base64URLString;
publicKey: Uint8Array_;
counter: number;
transports?: AuthenticatorTransportFuture[];
};
/**
* An attempt to communicate that this isn't just any string, but a Base64URL-encoded string
*/
export type Base64URLString = string;
/**
* AuthenticatorAttestationResponse in TypeScript's DOM lib is outdated (up through v3.9.7).
* Maintain an augmented version here so we can implement additional properties as the WebAuthn
* spec evolves.
*
* See https://www.w3.org/TR/webauthn-2/#iface-authenticatorattestationresponse
*
* Properties marked optional are not supported in all browsers.
*/
export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAttestationResponse {
getTransports(): AuthenticatorTransportFuture[];
}
/**
* A super class of TypeScript's `AuthenticatorTransport` that includes support for the latest
* transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to
* know about it (sometime after 4.6.3)
*/
export type AuthenticatorTransportFuture = 'ble' | 'cable' | 'hybrid' | 'internal' | 'nfc' | 'smart-card' | 'usb';
/**
* A super class of TypeScript's `PublicKeyCredentialDescriptor` that knows about the latest
* transports. Should eventually be replaced by TypeScript's when TypeScript gets updated to
* know about it (sometime after 4.6.3)
*/
export interface PublicKeyCredentialDescriptorFuture extends Omit<PublicKeyCredentialDescriptor, 'transports'> {
transports?: AuthenticatorTransportFuture[];
}
/** */
export type PublicKeyCredentialJSON = RegistrationResponseJSON | AuthenticationResponseJSON;
/**
* A super class of TypeScript's `PublicKeyCredential` that knows about upcoming WebAuthn features
*/
export interface PublicKeyCredentialFuture extends PublicKeyCredential {
type: PublicKeyCredentialType;
isConditionalMediationAvailable?(): Promise<boolean>;
parseCreationOptionsFromJSON?(options: PublicKeyCredentialCreationOptionsJSON): PublicKeyCredentialCreationOptions;
parseRequestOptionsFromJSON?(options: PublicKeyCredentialRequestOptionsJSON): PublicKeyCredentialRequestOptions;
toJSON?(): PublicKeyCredentialJSON;
}
/**
* The two types of credentials as defined by bit 3 ("Backup Eligibility") in authenticator data:
* - `"singleDevice"` credentials will never be backed up
* - `"multiDevice"` credentials can be backed up
*/
export type CredentialDeviceType = 'singleDevice' | 'multiDevice';
/**
* Categories of authenticators that Relying Parties can pass along to browsers during
* registration. Browsers that understand these values can optimize their modal experience to
* start the user off in a particular registration flow:
*
* - `hybrid`: A platform authenticator on a mobile device
* - `security-key`: A portable FIDO2 authenticator capable of being used on multiple devices via a USB or NFC connection
* - `client-device`: The device that WebAuthn is being called on. Typically synonymous with platform authenticators
*
* See https://w3c.github.io/webauthn/#enumdef-publickeycredentialhint
*
* These values are less strict than `authenticatorAttachment`
*/
export type PublicKeyCredentialHint = 'hybrid' | 'security-key' | 'client-device';
/**
* Values for an attestation object's `fmt`
*
* See https://www.iana.org/assignments/webauthn/webauthn.xhtml#webauthn-attestation-statement-format-ids
*/
export type AttestationFormat = 'fido-u2f' | 'packed' | 'android-safetynet' | 'android-key' | 'tpm' | 'apple' | 'none';
/**
* Equivalent to `Uint8Array` before TypeScript 5.7, and `Uint8Array<ArrayBuffer>` in TypeScript 5.7
* and beyond.
*
* **Context**
*
* `Uint8Array` became a generic type in TypeScript 5.7, requiring types defined simply as
* `Uint8Array` to be refactored to `Uint8Array<ArrayBuffer>` starting in Deno 2.2. `Uint8Array` is
* _not_ generic in Deno 2.1.x and earlier, though, so this type helps bridge this gap.
*
* Inspired by Deno's std library:
*
* https://github.com/denoland/std/blob/b5a5fe4f96b91c1fe8dba5cc0270092dd11d3287/bytes/_types.ts#L11
*/
export type Uint8Array_ = ReturnType<Uint8Array['slice']>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
import type { DeepPartial, FieldValues, Names } from '../types';
declare const _default: <T>(names: string | string[] | undefined, _names: Names, formValues?: FieldValues, isGlobal?: boolean, defaultValue?: DeepPartial<T> | unknown) => any;
export default _default;
//# sourceMappingURL=generateWatchOutput.d.ts.map
@@ -0,0 +1,50 @@
# object.fromentries <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
An ES spec-proposal-compliant `Object.fromEntries` shim. Invoke its "shim" method to shim `Object.fromEntries` if it is unavailable or noncompliant.
This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [proposed spec](https://tc39.github.io/proposal-object-from-entries/).
Most common usage:
```js
var assert = require('assert');
var fromEntries = require('object.fromentries');
var obj = { a: 1, b: 2, c: 3 };
var actual = fromEntries(Object.entries(obj));
assert.deepEqual(obj, actual);
if (!Object.fromEntries) {
fromEntries.shim();
}
assert.deepEqual(Object.fromEntries(Object.entries(obj)), obj);
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
[package-url]: https://npmjs.com/package/object.fromentries
[npm-version-svg]: https://versionbadg.es/es-shims/Object.fromEntries.svg
[deps-svg]: https://david-dm.org/es-shims/Object.fromEntries.svg
[deps-url]: https://david-dm.org/es-shims/Object.fromEntries
[dev-deps-svg]: https://david-dm.org/es-shims/Object.fromEntries/dev-status.svg
[dev-deps-url]: https://david-dm.org/es-shims/Object.fromEntries#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/object.fromentries.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/object.fromentries.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/object.fromentries.svg
[downloads-url]: https://npm-stat.com/charts.html?package=object.fromentries
[codecov-image]: https://codecov.io/gh/es-shims/Object.fromEntries/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/es-shims/Object.fromEntries/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/Object.fromEntries
[actions-url]: https://github.com/es-shims/Object.fromEntries/actions
@@ -0,0 +1,95 @@
export const cuid = /^[cC][^\s-]{8,}$/;
export const cuid2 = /^[0-9a-z]+$/;
export const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
export const xid = /^[0-9a-vA-V]{20}$/;
export const ksuid = /^[A-Za-z0-9]{27}$/;
export const nanoid = /^[a-zA-Z0-9_-]{21}$/;
/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
export const duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */
export const extendedDuration = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
export const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
/** Returns a regex for validating an RFC 4122 UUID.
*
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
export const uuid = (version) => {
if (!version)
return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/;
return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
};
export const uuid4 = /*@__PURE__*/ uuid(4);
export const uuid6 = /*@__PURE__*/ uuid(6);
export const uuid7 = /*@__PURE__*/ uuid(7);
/** Practical email validation */
export const email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */
export const html5Email = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
/** The classic emailregex.com regex for RFC 5322-compliant emails */
export const rfc5322Email = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */
export const unicodeEmail = /^[^\s@"]{1,64}@[^\s@]{1,255}$/u;
export const browserEmail = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression
export const _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
export function emoji() {
return new RegExp(_emoji, "u");
}
export const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
export const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/;
export const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
export const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript
export const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
export const base64url = /^[A-Za-z0-9_-]*$/;
// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address
// export const hostname: RegExp =
// /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/;
export const hostname = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/;
export const domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces)
export const e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
// const dateSource = `((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`;
const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
export const date = /*@__PURE__*/ new RegExp(`^${dateSource}$`);
function timeSource(args) {
const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
const regex = typeof args.precision === "number"
? args.precision === -1
? `${hhmm}`
: args.precision === 0
? `${hhmm}:[0-5]\\d`
: `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}`
: `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
return regex;
}
export function time(args) {
return new RegExp(`^${timeSource(args)}$`);
}
// Adapted from https://stackoverflow.com/a/3143231
export function datetime(args) {
const time = timeSource({ precision: args.precision });
const opts = ["Z"];
if (args.local)
opts.push("");
if (args.offset)
opts.push(`([+-]\\d{2}:\\d{2})`);
const timeRegex = `${time}(?:${opts.join("|")})`;
return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
}
export const string = (params) => {
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
return new RegExp(`^${regex}$`);
};
export const bigint = /^\d+n?$/;
export const integer = /^\d+$/;
export const number = /^-?\d+(?:\.\d+)?/i;
export const boolean = /true|false/i;
const _null = /null/i;
export { _null as null };
const _undefined = /undefined/i;
export { _undefined as undefined };
// regex for string with no uppercase letters
export const lowercase = /^[^A-Z]*$/;
// regex for string with no lowercase letters
export const uppercase = /^[^a-z]*$/;
@@ -0,0 +1,18 @@
import { BufferSource } from "pvtsutils";
import { IEmptyConstructor } from "./types";
export declare class AsnConvert {
static serialize(obj: unknown): ArrayBuffer;
static parse<T>(data: BufferSource, target: IEmptyConstructor<T>): T;
/**
* Returns a string representation of an ASN.1 encoded data
* @param data ASN.1 encoded buffer source
* @returns String representation of ASN.1 structure
*/
static toString(data: BufferSource): string;
/**
* Returns a string representation of an ASN.1 schema
* @param obj Object which can be serialized to ASN.1 schema
* @returns String representation of ASN.1 structure
*/
static toString(obj: unknown): string;
}
@@ -0,0 +1,54 @@
;(function (root, factory, undef) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory(require("./core"), require("./cipher-core"));
}
else if (typeof define === "function" && define.amd) {
// AMD
define(["./core", "./cipher-core"], factory);
}
else {
// Global (browser)
factory(root.CryptoJS);
}
}(this, function (CryptoJS) {
/**
* Output Feedback block mode.
*/
CryptoJS.mode.OFB = (function () {
var OFB = CryptoJS.lib.BlockCipherMode.extend();
var Encryptor = OFB.Encryptor = OFB.extend({
processBlock: function (words, offset) {
// Shortcuts
var cipher = this._cipher
var blockSize = cipher.blockSize;
var iv = this._iv;
var keystream = this._keystream;
// Generate keystream
if (iv) {
keystream = this._keystream = iv.slice(0);
// Remove IV for subsequent blocks
this._iv = undefined;
}
cipher.encryptBlock(keystream, 0);
// Encrypt
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
});
OFB.Decryptor = Encryptor;
return OFB;
}());
return CryptoJS.mode.OFB;
}));
@@ -0,0 +1,22 @@
"use strict";
// const defaultLogger = debug('SimpleWebAuthn');
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLogger = getLogger;
/**
* Generate an instance of a `debug` logger that extends off of the "simplewebauthn" namespace for
* consistent naming.
*
* See https://www.npmjs.com/package/debug for information on how to control logging output when
* using @simplewebauthn/server
*
* Example:
*
* ```
* const log = getLogger('mds');
* log('hello'); // simplewebauthn:mds hello +0ms
* ```
*/
function getLogger(_name) {
// This is a noop for now while I search for a better debug logger technique
return (_message, ..._rest) => { };
}
@@ -0,0 +1,2 @@
declare const useUnmountedRef: () => import("react").RefObject<boolean>;
export default useUnmountedRef;
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,aAAa,CAAC,6BAAiB,CAAC;IAClD,iBAAiB,CAAC,OAAS,CAAC,gCAA0B,EAAE,KAAK,UAAU,CAAC,8BAAkB,CAAC;IAC3F,cAAc,CAAC,OAAS,GAAG,KAAK,KAAK,CAAC,MAAM,CAAC;IAC7C,cAAc,CAAC,mCAAiB,CAAC;IACjC,kBAAkB,CAAC,OAAS,CAAC,gCAA0B,EAAE,KAAK,UAAU,CAAC,oCAAkB,CAAC;IAC5F,sBAAsB,CAAC,gFAAgD,CAAC;IACxE,UAAU,CAAC,UAAU,CAAC;IACtB,aAAa,CAAC,sBAAgB,CAAC;IAC/B,YAAY,CAAC,qBAAqB,CAAC;AACrC","sources":["packages/@react-aria/table/intl/lt-LT.json"],"sourcesContent":["{\n \"ascending\": \"didėjančia tvarka\",\n \"ascendingSort\": \"surikiuota pagal stulpelį {columnName} didėjančia tvarka\",\n \"columnSize\": \"{value} piks.\",\n \"descending\": \"mažėjančia tvarka\",\n \"descendingSort\": \"surikiuota pagal stulpelį {columnName} mažėjančia tvarka\",\n \"resizerDescription\": \"Paspauskite „Enter“, kad pradėtumėte keisti dydį\",\n \"select\": \"Pasirinkti\",\n \"selectAll\": \"Pasirinkti viską\",\n \"sortable\": \"rikiuojamas stulpelis\"\n}\n"],"names":[],"version":3,"file":"lt-LT.main.js.map"}
@@ -0,0 +1,8 @@
import { NumberFormatInternal, NumberFormatPart } from '../types/number';
/**
* https://tc39.es/ecma402/#sec-collapsenumberrange
* LDML: https://unicode-org.github.io/cldr/ldml/tr35-numbers.html#collapsing-number-ranges
*/
export declare function CollapseNumberRange(numberFormat: Intl.NumberFormat, result: NumberFormatPart[], { getInternalSlots, }: {
getInternalSlots(nf: Intl.NumberFormat): NumberFormatInternal;
}): NumberFormatPart[];
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2017_sharedmemory: LibDefinition;
@@ -0,0 +1,23 @@
import toString from './toString.js';
import upperFirst from './upperFirst.js';
/**
* Converts the first character of `string` to upper case and the remaining
* to lower case.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to capitalize.
* @returns {string} Returns the capitalized string.
* @example
*
* _.capitalize('FRED');
* // => 'Fred'
*/
function capitalize(string) {
return upperFirst(toString(string).toLowerCase());
}
export default capitalize;
@@ -0,0 +1,70 @@
/**
* @typedef {import('hast').Element} Element
* @typedef {import('mdast').FootnoteReference} FootnoteReference
* @typedef {import('../state.js').State} State
*/
import {normalizeUri} from 'micromark-util-sanitize-uri'
/**
* Turn an mdast `footnoteReference` node into hast.
*
* @param {State} state
* Info passed around.
* @param {FootnoteReference} node
* mdast node.
* @returns {Element}
* hast node.
*/
export function footnoteReference(state, node) {
const clobberPrefix =
typeof state.options.clobberPrefix === 'string'
? state.options.clobberPrefix
: 'user-content-'
const id = String(node.identifier).toUpperCase()
const safeId = normalizeUri(id.toLowerCase())
const index = state.footnoteOrder.indexOf(id)
/** @type {number} */
let counter
let reuseCounter = state.footnoteCounts.get(id)
if (reuseCounter === undefined) {
reuseCounter = 0
state.footnoteOrder.push(id)
counter = state.footnoteOrder.length
} else {
counter = index + 1
}
reuseCounter += 1
state.footnoteCounts.set(id, reuseCounter)
/** @type {Element} */
const link = {
type: 'element',
tagName: 'a',
properties: {
href: '#' + clobberPrefix + 'fn-' + safeId,
id:
clobberPrefix +
'fnref-' +
safeId +
(reuseCounter > 1 ? '-' + reuseCounter : ''),
dataFootnoteRef: true,
ariaDescribedBy: ['footnote-label']
},
children: [{type: 'text', value: String(counter)}]
}
state.patch(node, link)
/** @type {Element} */
const sup = {
type: 'element',
tagName: 'sup',
properties: {},
children: [link]
}
state.patch(node, sup)
return state.applyData(node, sup)
}
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=boolean-prop-naming.d.ts.map
@@ -0,0 +1,41 @@
var createRange = require('./_createRange');
/**
* This method is like `_.range` except that it populates values in
* descending order.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @param {number} [step=1] The value to increment or decrement by.
* @returns {Array} Returns the range of numbers.
* @see _.inRange, _.range
* @example
*
* _.rangeRight(4);
* // => [3, 2, 1, 0]
*
* _.rangeRight(-4);
* // => [-3, -2, -1, 0]
*
* _.rangeRight(1, 5);
* // => [4, 3, 2, 1]
*
* _.rangeRight(0, 20, 5);
* // => [15, 10, 5, 0]
*
* _.rangeRight(0, -4, -1);
* // => [-3, -2, -1, 0]
*
* _.rangeRight(1, 4, 0);
* // => [1, 1, 1]
*
* _.rangeRight(0);
* // => []
*/
var rangeRight = createRange(true);
module.exports = rangeRight;
@@ -0,0 +1 @@
{"version":3,"file":"electron.js","sourceRoot":"","sources":["../../src/config/electron.ts"],"names":[],"mappings":"AAGA,eAAe;IACb,QAAQ,EAAE;QACR,uBAAuB,EAAE,CAAC,UAAU,CAAC;KACtC;CACqB,CAAA"}
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=resolveBindingsDeactivations.spec.d.ts.map
@@ -0,0 +1,125 @@
import { TSConfckCache } from './cache.js';
export interface TSConfckFindOptions {
/**
* A cache to improve performance for multiple calls in the same project
*
* Warning: You must clear this cache in case tsconfig files are added/removed during it's lifetime
*/
cache?: TSConfckCache<TSConfckParseResult | TSConfckParseNativeResult>;
/**
* project root dir, does not continue scanning outside of this directory.
*
* Improves performance but may lead to different results from native typescript when no tsconfig is found inside root
*/
root?: string;
/**
* set to true if you don't want to find tsconfig for files inside node_modules
*
* This is useful if you want to use the output with esbuild.transform as esbuild itself also ignores node_modules
*
* @default false
*/
ignoreNodeModules?: boolean;
/**
* Override the default name of the config file to find.
*
* Use `jsconfig.json` in projects that have typechecking for js files with jsconfig.json
*
* @default tsconfig.json
*/
configName?: string;
}
export interface TSConfckParseOptions extends TSConfckFindOptions {
// same as find options
}
export interface TSConfckFindAllOptions {
/**
* helper to skip subdirectories when scanning for tsconfig.json
*
* eg ` dir => dir === 'node_modules' || dir === '.git'`
*/
skip?: (dir: string) => boolean;
/**
* list of config filenames to include, use ["tsconfig.json","jsconfig.json"] if you need both
*
* @default ["tsconfig.json"]
*/
configNames?: string[];
}
export interface TSConfckParseResult {
/**
* absolute path to parsed tsconfig.json
*/
tsconfigFile: string;
/**
* parsed result, including merged values from extended
*/
tsconfig: any;
/**
* ParseResult for parent solution
*/
solution?: TSConfckParseResult;
/**
* ParseResults for all tsconfig files referenced in a solution
*/
referenced?: TSConfckParseResult[];
/**
* ParseResult for all tsconfig files
*
* [a,b,c] where a extends b and b extends c
*/
extended?: TSConfckParseResult[];
}
export interface TSConfckParseNativeOptions extends TSConfckParseOptions {
/**
* Set this option to true to force typescript to ignore all source files.
*
* This is faster - especially for large projects - but comes with 2 caveats
*
* 1) output tsconfig always has `files: [],include: []` instead of any real values configured.
* 2) as a result of 1), it won't be able to resolve solution-style references and always return the closest tsconfig
*/
ignoreSourceFiles?: boolean;
}
export interface TSConfckParseNativeResult {
/**
* absolute path to parsed tsconfig.json
*/
tsconfigFile: string;
/**
* parsed result, including merged values from extended and normalized
*/
tsconfig: any;
/**
* ParseResult for parent solution
*/
solution?: TSConfckParseNativeResult;
/**
* ParseNativeResults for all tsconfig files referenced in a solution
*/
referenced?: TSConfckParseNativeResult[];
/**
* full output of ts.parseJsonConfigFileContent
*/
result: any;
}
// eslint-disable-next-line n/no-missing-import
export * from './index.js';
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,WAAW,CAAC,mCAAK,CAAC;AACtC","sources":["packages/@react-aria/overlays/intl/ar-AE.json"],"sourcesContent":["{\n \"dismiss\": \"تجاهل\"\n}\n"],"names":[],"version":3,"file":"ar-AE.module.js.map"}
@@ -0,0 +1 @@
{"version":3,"file":"align.js","names":["Attributor","ClassAttributor","Scope","StyleAttributor","config","scope","BLOCK","whitelist","AlignAttribute","AlignClass","AlignStyle"],"sources":["../../src/formats/align.ts"],"sourcesContent":["import { Attributor, ClassAttributor, Scope, StyleAttributor } from 'parchment';\n\nconst config = {\n scope: Scope.BLOCK,\n whitelist: ['right', 'center', 'justify'],\n};\n\nconst AlignAttribute = new Attributor('align', 'align', config);\nconst AlignClass = new ClassAttributor('align', 'ql-align', config);\nconst AlignStyle = new StyleAttributor('align', 'text-align', config);\n\nexport { AlignAttribute, AlignClass, AlignStyle };\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,eAAe,EAAEC,KAAK,EAAEC,eAAe,QAAQ,WAAW;AAE/E,MAAMC,MAAM,GAAG;EACbC,KAAK,EAAEH,KAAK,CAACI,KAAK;EAClBC,SAAS,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS;AAC1C,CAAC;AAED,MAAMC,cAAc,GAAG,IAAIR,UAAU,CAAC,OAAO,EAAE,OAAO,EAAEI,MAAM,CAAC;AAC/D,MAAMK,UAAU,GAAG,IAAIR,eAAe,CAAC,OAAO,EAAE,UAAU,EAAEG,MAAM,CAAC;AACnE,MAAMM,UAAU,GAAG,IAAIP,eAAe,CAAC,OAAO,EAAE,YAAY,EAAEC,MAAM,CAAC;AAErE,SAASI,cAAc,EAAEC,UAAU,EAAEC,UAAU","ignoreList":[]}
@@ -0,0 +1,45 @@
// Korean [ko]
import dayjs from '../index';
var locale = {
name: 'ko',
weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),
weekdaysShort: '일_월_화_수_목_금_토'.split('_'),
weekdaysMin: '일_월_화_수_목_금_토'.split('_'),
months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),
ordinal: function ordinal(n) {
return n + "\uC77C";
},
formats: {
LT: 'A h:mm',
LTS: 'A h:mm:ss',
L: 'YYYY.MM.DD.',
LL: 'YYYY년 MMMM D일',
LLL: 'YYYY년 MMMM D일 A h:mm',
LLLL: 'YYYY년 MMMM D일 dddd A h:mm',
l: 'YYYY.MM.DD.',
ll: 'YYYY년 MMMM D일',
lll: 'YYYY년 MMMM D일 A h:mm',
llll: 'YYYY년 MMMM D일 dddd A h:mm'
},
meridiem: function meridiem(hour) {
return hour < 12 ? '오전' : '오후';
},
relativeTime: {
future: '%s 후',
past: '%s 전',
s: '몇 초',
m: '1분',
mm: '%d분',
h: '한 시간',
hh: '%d시간',
d: '하루',
dd: '%d일',
M: '한 달',
MM: '%d달',
y: '일 년',
yy: '%d년'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAYM,SAAS,yCAAe,KAAuB,EAAE,GAAkC;IACxF,IAAI,YAAC,QAAQ,cAAE,UAAU,EAAC,GAAG;IAC7B,IAAI,kBAAkB,CAAA,GAAA,wBAAU,EAAE,CAAC;QACjC,+DAA+D;QAC/D,IAAI,EAAE,OAAO,EACX;QAGF,0BAA0B;QAC1B,EAAE,cAAc;QAChB,EAAE,eAAe;QAEjB,IAAI,UACF,SAAS;YAAC,QAAQ,EAAE,MAAM;YAAE,QAAQ,EAAE,MAAM;QAAA;IAEhD,GAAG;QAAC;KAAS;IAEb,CAAA,GAAA,8BAAO,EAAE,KAAK,SAAS,aAAa,YAAY;AAClD","sources":["packages/@react-aria/interactions/src/useScrollWheel.ts"],"sourcesContent":["/*\n * Copyright 2021 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 {RefObject, ScrollEvents} from '@react-types/shared';\nimport {useCallback} from 'react';\nimport {useEvent} from '@react-aria/utils';\n\nexport interface ScrollWheelProps extends ScrollEvents {\n /** Whether the scroll listener should be disabled. */\n isDisabled?: boolean\n}\n\n// scroll wheel needs to be added not passively so it's cancelable, small helper hook to remember that\nexport function useScrollWheel(props: ScrollWheelProps, ref: RefObject<HTMLElement | null>): void {\n let {onScroll, isDisabled} = props;\n let onScrollHandler = useCallback((e) => {\n // If the ctrlKey is pressed, this is a zoom event, do nothing.\n if (e.ctrlKey) {\n return;\n }\n\n // stop scrolling the page\n e.preventDefault();\n e.stopPropagation();\n\n if (onScroll) {\n onScroll({deltaX: e.deltaX, deltaY: e.deltaY});\n }\n }, [onScroll]);\n\n useEvent(ref, 'wheel', isDisabled ? undefined : onScrollHandler);\n}\n"],"names":[],"version":3,"file":"useScrollWheel.main.js.map"}
@@ -0,0 +1,115 @@
/*
* 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.
*/
import {HTMLAttributes, MutableRefObject, ReactElement, ReactNode} from 'react';
import {StyleProps} from '@react-types/shared';
export type Placement = 'bottom' | 'bottom left' | 'bottom right' | 'bottom start' | 'bottom end' |
'top' | 'top left' | 'top right' | 'top start' | 'top end' |
'left' | 'left top' | 'left bottom' | 'start' | 'start top' | 'start bottom' |
'right' | 'right top' | 'right bottom' | 'end' | 'end top' | 'end bottom';
export type Axis = 'top' | 'bottom' | 'left' | 'right';
export type SizeAxis = 'width' | 'height';
export type PlacementAxis = Axis | 'center';
export interface PositionProps {
/**
* The placement of the element with respect to its anchor element.
* @default 'bottom'
*/
placement?: Placement,
/**
* The placement padding that should be applied between the element and its
* surrounding container.
* @default 12
*/
containerPadding?: number,
/**
* The additional offset applied along the main axis between the element and its
* anchor element.
* @default 0
*/
offset?: number,
/**
* The additional offset applied along the cross axis between the element and its
* anchor element.
* @default 0
*/
crossOffset?: number,
/**
* Whether the element should flip its orientation (e.g. top to bottom or left to right) when
* there is insufficient room for it to render completely.
* @default true
*/
shouldFlip?: boolean,
// /**
// * The element that should be used as the bounding container when calculating container offset
// * or whether it should flip.
// */
// boundaryElement?: Element,
/** Whether the element is rendered. */
isOpen?: boolean
}
export interface OverlayProps {
children: ReactNode,
isOpen?: boolean,
container?: Element,
isKeyboardDismissDisabled?: boolean,
onEnter?: () => void,
onEntering?: () => void,
onEntered?: () => void,
onExit?: () => void,
onExiting?: () => void,
onExited?: () => void,
nodeRef: MutableRefObject<HTMLElement | null>,
disableFocusManagement?: boolean
}
export interface ModalProps extends StyleProps, Omit<OverlayProps, 'nodeRef'> {
children: ReactElement,
isOpen?: boolean,
onClose?: () => void,
type?: 'modal' | 'fullscreen' | 'fullscreenTakeover',
isDismissable?: boolean
}
export interface PopoverProps extends StyleProps, Omit<OverlayProps, 'nodeRef'> {
children: ReactNode,
placement?: PlacementAxis,
arrowProps?: HTMLAttributes<HTMLElement>,
hideArrow?: boolean,
isOpen?: boolean,
onClose?: () => void,
shouldCloseOnBlur?: boolean,
isNonModal?: boolean,
isDismissable?: boolean
}
export interface TrayProps extends StyleProps, Omit<OverlayProps, 'nodeRef'> {
children: ReactElement,
isOpen?: boolean,
onClose?: () => void,
shouldCloseOnBlur?: boolean,
isFixedHeight?: boolean,
isNonModal?: boolean
}
export interface OverlayTriggerProps {
/** Whether the overlay is open by default (controlled). */
isOpen?: boolean,
/** Whether the overlay is open by default (uncontrolled). */
defaultOpen?: boolean,
/** Handler that is called when the overlay's open state changes. */
onOpenChange?: (isOpen: boolean) => void
}
@@ -0,0 +1,7 @@
export { ItemProps } from './item.mjs';
export { SectionProps } from './section.mjs';
export { CollectionProps } from './types.mjs';
export { Item as BaseItem, Section as BaseSection, PartialNode } from '@react-stately/collections';
import '@react-types/shared';
import '@heroui/system';
import 'react';
@@ -0,0 +1,15 @@
var shuffleSelf = require('./_shuffleSelf'),
values = require('./values');
/**
* The base implementation of `_.shuffle`.
*
* @private
* @param {Array|Object} collection The collection to shuffle.
* @returns {Array} Returns the new shuffled array.
*/
function baseShuffle(collection) {
return shuffleSelf(values(collection));
}
module.exports = baseShuffle;
@@ -0,0 +1,11 @@
"use client";
import { useAnimationFrame } from '../utils/use-animation-frame.mjs';
import { useMotionValue } from './use-motion-value.mjs';
function useTime() {
const time = useMotionValue(0);
useAnimationFrame((t) => time.set(t));
return time;
}
export { useTime };
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,kBAAkB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,yFAAY,CAAC;IACxE,qBAAqB,CAAC,gIAAgB,CAAC;IACvC,UAAU,CAAC,gBAAE,CAAC;IACd,eAAe,CAAC,gHAAc,CAAC;IAC/B,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,gGAAY,CAAC;YAAE,KAAK,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,yEAAU,CAAC;YAAE,OAAO,IAAM,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,yEAAU,CAAC;QAAA,GAAG,QAAC,CAAC;IAClN,gBAAgB,CAAC,OAAS,GAAG,KAAK,IAAI,CAAC,iEAAS,CAAC;AACnD","sources":["packages/@react-aria/grid/intl/ja-JP.json"],"sourcesContent":["{\n \"deselectedItem\": \"{item} が選択されていません。\",\n \"longPressToSelect\": \"長押しして選択モードを開きます。\",\n \"select\": \"選択\",\n \"selectedAll\": \"すべての項目を選択しました。\",\n \"selectedCount\": \"{count, plural, =0 {項目が選択されていません} one {# 項目を選択しました} other {# 項目を選択しました}}。\",\n \"selectedItem\": \"{item} を選択しました。\"\n}\n"],"names":[],"version":3,"file":"ja-JP.main.js.map"}
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=prefer-exact-props.d.ts.map
@@ -0,0 +1,29 @@
import baseLt from './_baseLt.js';
import createRelationalOperation from './_createRelationalOperation.js';
/**
* Checks if `value` is less than `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than `other`,
* else `false`.
* @see _.gt
* @example
*
* _.lt(1, 3);
* // => true
*
* _.lt(3, 3);
* // => false
*
* _.lt(3, 1);
* // => false
*/
var lt = createRelationalOperation(baseLt);
export default lt;
@@ -0,0 +1,4 @@
/** Used to match template delimiters. */
var reEscape = /<%-([\s\S]+?)%>/g;
export default reEscape;
@@ -0,0 +1,73 @@
'use strict';
var utils = require('../utils.js');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var dotLocation = utils.createRule({
name: "dot-location",
package: "js",
meta: {
type: "layout",
docs: {
description: "Enforce consistent newlines before and after dots"
},
schema: [
{
type: "string",
enum: ["object", "property"]
}
],
fixable: "code",
messages: {
expectedDotAfterObject: "Expected dot to be on same line as object.",
expectedDotBeforeProperty: "Expected dot to be on same line as property."
}
},
create(context) {
const config = context.options[0];
const onObject = config === "object" || !config;
const sourceCode = context.sourceCode;
function checkDotLocation(node) {
const property = node.property;
const dotToken = sourceCode.getTokenBefore(property);
if (onObject && dotToken) {
const tokenBeforeDot = sourceCode.getTokenBefore(dotToken);
if (tokenBeforeDot && !utils.isTokenOnSameLine(tokenBeforeDot, dotToken)) {
context.report({
node,
loc: dotToken.loc,
messageId: "expectedDotAfterObject",
*fix(fixer) {
if (dotToken.value.startsWith(".") && utils.isDecimalIntegerNumericToken(tokenBeforeDot))
yield fixer.insertTextAfter(tokenBeforeDot, ` ${dotToken.value}`);
else
yield fixer.insertTextAfter(tokenBeforeDot, dotToken.value);
yield fixer.remove(dotToken);
}
});
}
} else if (!utils.isTokenOnSameLine(dotToken, property) && dotToken) {
context.report({
node,
loc: dotToken.loc,
messageId: "expectedDotBeforeProperty",
*fix(fixer) {
yield fixer.remove(dotToken);
yield fixer.insertTextBefore(property, dotToken.value);
}
});
}
}
function checkNode(node) {
if (node.type === "MemberExpression" && !node.computed)
checkDotLocation(node);
}
return {
MemberExpression: checkNode
};
}
});
module.exports = dotLocation;
@@ -0,0 +1,6 @@
import { Tokenizer } from './index.js';
/**
* Splits the `@prefix` from remaining `Spec.lines[].token.description` into the `tag` token,
* and populates `spec.tag`
*/
export default function tagTokenizer(): Tokenizer;
@@ -0,0 +1,683 @@
var $625cf83917e112ad$exports = require("./utils.main.js");
var $f7e14e656343df57$exports = require("./textSelection.main.js");
var $01d3f539e91688c8$exports = require("./context.main.js");
var $bBqCQ$swchelperscjs_class_private_field_getcjs = require("@swc/helpers/cjs/_class_private_field_get.cjs");
var $bBqCQ$swchelperscjs_class_private_field_initcjs = require("@swc/helpers/cjs/_class_private_field_init.cjs");
var $bBqCQ$swchelperscjs_class_private_field_setcjs = require("@swc/helpers/cjs/_class_private_field_set.cjs");
var $bBqCQ$reactariautils = require("@react-aria/utils");
var $bBqCQ$reactdom = require("react-dom");
var $bBqCQ$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "usePress", () => $0294ea432cd92340$export$45712eceda6fad21);
/*
* 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 react.
// Original licensing for the following can be found in the
// NOTICE file in the root directory of this source tree.
// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions
function $0294ea432cd92340$var$usePressResponderContext(props) {
// Consume context from <PressResponder> and merge with props.
let context = (0, $bBqCQ$react.useContext)((0, $01d3f539e91688c8$exports.PressResponderContext));
if (context) {
let { register: register, ...contextProps } = context;
props = (0, $bBqCQ$reactariautils.mergeProps)(contextProps, props);
register();
}
(0, $bBqCQ$reactariautils.useSyncRef)(context, props.ref);
return props;
}
var $0294ea432cd92340$var$_shouldStopPropagation = /*#__PURE__*/ new WeakMap();
class $0294ea432cd92340$var$PressEvent {
continuePropagation() {
(0, $bBqCQ$swchelperscjs_class_private_field_setcjs._)(this, $0294ea432cd92340$var$_shouldStopPropagation, false);
}
get shouldStopPropagation() {
return (0, $bBqCQ$swchelperscjs_class_private_field_getcjs._)(this, $0294ea432cd92340$var$_shouldStopPropagation);
}
constructor(type, pointerType, originalEvent, state){
(0, $bBqCQ$swchelperscjs_class_private_field_initcjs._)(this, $0294ea432cd92340$var$_shouldStopPropagation, {
writable: true,
value: void 0
});
(0, $bBqCQ$swchelperscjs_class_private_field_setcjs._)(this, $0294ea432cd92340$var$_shouldStopPropagation, true);
var _state_target;
let currentTarget = (_state_target = state === null || state === void 0 ? void 0 : state.target) !== null && _state_target !== void 0 ? _state_target : originalEvent.currentTarget;
const rect = currentTarget === null || currentTarget === void 0 ? void 0 : currentTarget.getBoundingClientRect();
let x, y = 0;
let clientX, clientY = null;
if (originalEvent.clientX != null && originalEvent.clientY != null) {
clientX = originalEvent.clientX;
clientY = originalEvent.clientY;
}
if (rect) {
if (clientX != null && clientY != null) {
x = clientX - rect.left;
y = clientY - rect.top;
} else {
x = rect.width / 2;
y = rect.height / 2;
}
}
this.type = type;
this.pointerType = pointerType;
this.target = originalEvent.currentTarget;
this.shiftKey = originalEvent.shiftKey;
this.metaKey = originalEvent.metaKey;
this.ctrlKey = originalEvent.ctrlKey;
this.altKey = originalEvent.altKey;
this.x = x;
this.y = y;
}
}
const $0294ea432cd92340$var$LINK_CLICKED = Symbol('linkClicked');
const $0294ea432cd92340$var$STYLE_ID = 'react-aria-pressable-style';
const $0294ea432cd92340$var$PRESSABLE_ATTRIBUTE = 'data-react-aria-pressable';
function $0294ea432cd92340$export$45712eceda6fad21(props) {
let { onPress: onPress, onPressChange: onPressChange, onPressStart: onPressStart, onPressEnd: onPressEnd, onPressUp: onPressUp, onClick: onClick, isDisabled: isDisabled, isPressed: isPressedProp, preventFocusOnPress: preventFocusOnPress, shouldCancelOnPointerExit: shouldCancelOnPointerExit, allowTextSelectionOnPress: allowTextSelectionOnPress, ref: domRef, ...domProps } = $0294ea432cd92340$var$usePressResponderContext(props);
let [isPressed, setPressed] = (0, $bBqCQ$react.useState)(false);
let ref = (0, $bBqCQ$react.useRef)({
isPressed: false,
ignoreEmulatedMouseEvents: false,
didFirePressStart: false,
isTriggeringEvent: false,
activePointerId: null,
target: null,
isOverTarget: false,
pointerType: null,
disposables: []
});
let { addGlobalListener: addGlobalListener, removeAllGlobalListeners: removeAllGlobalListeners } = (0, $bBqCQ$reactariautils.useGlobalListeners)();
let triggerPressStart = (0, $bBqCQ$reactariautils.useEffectEvent)((originalEvent, pointerType)=>{
let state = ref.current;
if (isDisabled || state.didFirePressStart) return false;
let shouldStopPropagation = true;
state.isTriggeringEvent = true;
if (onPressStart) {
let event = new $0294ea432cd92340$var$PressEvent('pressstart', pointerType, originalEvent);
onPressStart(event);
shouldStopPropagation = event.shouldStopPropagation;
}
if (onPressChange) onPressChange(true);
state.isTriggeringEvent = false;
state.didFirePressStart = true;
setPressed(true);
return shouldStopPropagation;
});
let triggerPressEnd = (0, $bBqCQ$reactariautils.useEffectEvent)((originalEvent, pointerType, wasPressed = true)=>{
let state = ref.current;
if (!state.didFirePressStart) return false;
state.didFirePressStart = false;
state.isTriggeringEvent = true;
let shouldStopPropagation = true;
if (onPressEnd) {
let event = new $0294ea432cd92340$var$PressEvent('pressend', pointerType, originalEvent);
onPressEnd(event);
shouldStopPropagation = event.shouldStopPropagation;
}
if (onPressChange) onPressChange(false);
setPressed(false);
if (onPress && wasPressed && !isDisabled) {
let event = new $0294ea432cd92340$var$PressEvent('press', pointerType, originalEvent);
onPress(event);
shouldStopPropagation && (shouldStopPropagation = event.shouldStopPropagation);
}
state.isTriggeringEvent = false;
return shouldStopPropagation;
});
let triggerPressUp = (0, $bBqCQ$reactariautils.useEffectEvent)((originalEvent, pointerType)=>{
let state = ref.current;
if (isDisabled) return false;
if (onPressUp) {
state.isTriggeringEvent = true;
let event = new $0294ea432cd92340$var$PressEvent('pressup', pointerType, originalEvent);
onPressUp(event);
state.isTriggeringEvent = false;
return event.shouldStopPropagation;
}
return true;
});
let cancel = (0, $bBqCQ$reactariautils.useEffectEvent)((e)=>{
let state = ref.current;
if (state.isPressed && state.target) {
if (state.didFirePressStart && state.pointerType != null) triggerPressEnd($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType, false);
state.isPressed = false;
state.isOverTarget = false;
state.activePointerId = null;
state.pointerType = null;
removeAllGlobalListeners();
if (!allowTextSelectionOnPress) (0, $f7e14e656343df57$exports.restoreTextSelection)(state.target);
for (let dispose of state.disposables)dispose();
state.disposables = [];
}
});
let cancelOnPointerExit = (0, $bBqCQ$reactariautils.useEffectEvent)((e)=>{
if (shouldCancelOnPointerExit) cancel(e);
});
let triggerClick = (0, $bBqCQ$reactariautils.useEffectEvent)((e)=>{
if (isDisabled) return;
onClick === null || onClick === void 0 ? void 0 : onClick(e);
});
let triggerSyntheticClick = (0, $bBqCQ$reactariautils.useEffectEvent)((e, target)=>{
if (isDisabled) return;
// Some third-party libraries pass in onClick instead of onPress.
// Create a fake mouse event and trigger onClick as well.
// This matches the browser's native activation behavior for certain elements (e.g. button).
// https://html.spec.whatwg.org/#activation
// https://html.spec.whatwg.org/#fire-a-synthetic-pointer-event
if (onClick) {
let event = new MouseEvent('click', e);
(0, $625cf83917e112ad$exports.setEventTarget)(event, target);
onClick((0, $625cf83917e112ad$exports.createSyntheticEvent)(event));
}
});
let pressProps = (0, $bBqCQ$react.useMemo)(()=>{
let state = ref.current;
let pressProps = {
onKeyDown (e) {
if ($0294ea432cd92340$var$isValidKeyboardEvent(e.nativeEvent, e.currentTarget) && (0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) {
var _state_metaKeyEvents;
if ($0294ea432cd92340$var$shouldPreventDefaultKeyboard((0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent), e.key)) e.preventDefault();
// If the event is repeating, it may have started on a different element
// after which focus moved to the current element. Ignore these events and
// only handle the first key down event.
let shouldStopPropagation = true;
if (!state.isPressed && !e.repeat) {
state.target = e.currentTarget;
state.isPressed = true;
state.pointerType = 'keyboard';
shouldStopPropagation = triggerPressStart(e, 'keyboard');
// Focus may move before the key up event, so register the event on the document
// instead of the same element where the key down event occurred. Make it capturing so that it will trigger
// before stopPropagation from useKeyboard on a child element may happen and thus we can still call triggerPress for the parent element.
let originalTarget = e.currentTarget;
let pressUp = (e)=>{
if ($0294ea432cd92340$var$isValidKeyboardEvent(e, originalTarget) && !e.repeat && (0, $bBqCQ$reactariautils.nodeContains)(originalTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e)) && state.target) triggerPressUp($0294ea432cd92340$var$createEvent(state.target, e), 'keyboard');
};
addGlobalListener((0, $bBqCQ$reactariautils.getOwnerDocument)(e.currentTarget), 'keyup', (0, $bBqCQ$reactariautils.chain)(pressUp, onKeyUp), true);
}
if (shouldStopPropagation) e.stopPropagation();
// Keep track of the keydown events that occur while the Meta (e.g. Command) key is held.
// macOS has a bug where keyup events are not fired while the Meta key is down.
// When the Meta key itself is released we will get an event for that, and we'll act as if
// all of these other keys were released as well.
// https://bugs.chromium.org/p/chromium/issues/detail?id=1393524
// https://bugs.webkit.org/show_bug.cgi?id=55291
// https://bugzilla.mozilla.org/show_bug.cgi?id=1299553
if (e.metaKey && (0, $bBqCQ$reactariautils.isMac)()) (_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 ? void 0 : _state_metaKeyEvents.set(e.key, e.nativeEvent);
} else if (e.key === 'Meta') state.metaKeyEvents = new Map();
},
onClick (e) {
if (e && !(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
if (e && e.button === 0 && !state.isTriggeringEvent && !(0, $bBqCQ$reactariautils.openLink).isOpening) {
let shouldStopPropagation = true;
if (isDisabled) e.preventDefault();
// If triggered from a screen reader or by using element.click(),
// trigger as if it were a keyboard click.
if (!state.ignoreEmulatedMouseEvents && !state.isPressed && (state.pointerType === 'virtual' || (0, $bBqCQ$reactariautils.isVirtualClick)(e.nativeEvent))) {
let stopPressStart = triggerPressStart(e, 'virtual');
let stopPressUp = triggerPressUp(e, 'virtual');
let stopPressEnd = triggerPressEnd(e, 'virtual');
triggerClick(e);
shouldStopPropagation = stopPressStart && stopPressUp && stopPressEnd;
} else if (state.isPressed && state.pointerType !== 'keyboard') {
let pointerType = state.pointerType || e.nativeEvent.pointerType || 'virtual';
let stopPressUp = triggerPressUp($0294ea432cd92340$var$createEvent(e.currentTarget, e), pointerType);
let stopPressEnd = triggerPressEnd($0294ea432cd92340$var$createEvent(e.currentTarget, e), pointerType, true);
shouldStopPropagation = stopPressUp && stopPressEnd;
state.isOverTarget = false;
triggerClick(e);
cancel(e);
}
state.ignoreEmulatedMouseEvents = false;
if (shouldStopPropagation) e.stopPropagation();
}
}
};
let onKeyUp = (e)=>{
var _state_metaKeyEvents;
if (state.isPressed && state.target && $0294ea432cd92340$var$isValidKeyboardEvent(e, state.target)) {
var _state_metaKeyEvents1;
if ($0294ea432cd92340$var$shouldPreventDefaultKeyboard((0, $bBqCQ$reactariautils.getEventTarget)(e), e.key)) e.preventDefault();
let target = (0, $bBqCQ$reactariautils.getEventTarget)(e);
let wasPressed = (0, $bBqCQ$reactariautils.nodeContains)(state.target, (0, $bBqCQ$reactariautils.getEventTarget)(e));
triggerPressEnd($0294ea432cd92340$var$createEvent(state.target, e), 'keyboard', wasPressed);
if (wasPressed) triggerSyntheticClick(e, state.target);
removeAllGlobalListeners();
// If a link was triggered with a key other than Enter, open the URL ourselves.
// This means the link has a role override, and the default browser behavior
// only applies when using the Enter key.
if (e.key !== 'Enter' && $0294ea432cd92340$var$isHTMLAnchorLink(state.target) && (0, $bBqCQ$reactariautils.nodeContains)(state.target, target) && !e[$0294ea432cd92340$var$LINK_CLICKED]) {
// Store a hidden property on the event so we only trigger link click once,
// even if there are multiple usePress instances attached to the element.
e[$0294ea432cd92340$var$LINK_CLICKED] = true;
(0, $bBqCQ$reactariautils.openLink)(state.target, e, false);
}
state.isPressed = false;
(_state_metaKeyEvents1 = state.metaKeyEvents) === null || _state_metaKeyEvents1 === void 0 ? void 0 : _state_metaKeyEvents1.delete(e.key);
} else if (e.key === 'Meta' && ((_state_metaKeyEvents = state.metaKeyEvents) === null || _state_metaKeyEvents === void 0 ? void 0 : _state_metaKeyEvents.size)) {
var _state_target;
// If we recorded keydown events that occurred while the Meta key was pressed,
// and those haven't received keyup events already, fire keyup events ourselves.
// See comment above for more info about the macOS bug causing this.
let events = state.metaKeyEvents;
state.metaKeyEvents = undefined;
for (let event of events.values())(_state_target = state.target) === null || _state_target === void 0 ? void 0 : _state_target.dispatchEvent(new KeyboardEvent('keyup', event));
}
};
if (typeof PointerEvent !== 'undefined') {
pressProps.onPointerDown = (e)=>{
// Only handle left clicks, and ignore events that bubbled through portals.
if (e.button !== 0 || !(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
// iOS safari fires pointer events from VoiceOver with incorrect coordinates/target.
// Ignore and let the onClick handler take care of it instead.
// https://bugs.webkit.org/show_bug.cgi?id=222627
// https://bugs.webkit.org/show_bug.cgi?id=223202
if ((0, $bBqCQ$reactariautils.isVirtualPointerEvent)(e.nativeEvent)) {
state.pointerType = 'virtual';
return;
}
state.pointerType = e.pointerType;
let shouldStopPropagation = true;
if (!state.isPressed) {
state.isPressed = true;
state.isOverTarget = true;
state.activePointerId = e.pointerId;
state.target = e.currentTarget;
if (!allowTextSelectionOnPress) (0, $f7e14e656343df57$exports.disableTextSelection)(state.target);
shouldStopPropagation = triggerPressStart(e, state.pointerType);
// Release pointer capture so that touch interactions can leave the original target.
// This enables onPointerLeave and onPointerEnter to fire.
let target = (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent);
if ('releasePointerCapture' in target) target.releasePointerCapture(e.pointerId);
addGlobalListener((0, $bBqCQ$reactariautils.getOwnerDocument)(e.currentTarget), 'pointerup', onPointerUp, false);
addGlobalListener((0, $bBqCQ$reactariautils.getOwnerDocument)(e.currentTarget), 'pointercancel', onPointerCancel, false);
}
if (shouldStopPropagation) e.stopPropagation();
};
pressProps.onMouseDown = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
if (e.button === 0) {
if (preventFocusOnPress) {
let dispose = (0, $625cf83917e112ad$exports.preventFocus)(e.target);
if (dispose) state.disposables.push(dispose);
}
e.stopPropagation();
}
};
pressProps.onPointerUp = (e)=>{
// iOS fires pointerup with zero width and height, so check the pointerType recorded during pointerdown.
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent)) || state.pointerType === 'virtual') return;
// Only handle left clicks. If isPressed is true, delay until onClick.
if (e.button === 0 && !state.isPressed) triggerPressUp(e, state.pointerType || e.pointerType);
};
pressProps.onPointerEnter = (e)=>{
if (e.pointerId === state.activePointerId && state.target && !state.isOverTarget && state.pointerType != null) {
state.isOverTarget = true;
triggerPressStart($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType);
}
};
pressProps.onPointerLeave = (e)=>{
if (e.pointerId === state.activePointerId && state.target && state.isOverTarget && state.pointerType != null) {
state.isOverTarget = false;
triggerPressEnd($0294ea432cd92340$var$createEvent(state.target, e), state.pointerType, false);
cancelOnPointerExit(e);
}
};
let onPointerUp = (e)=>{
if (e.pointerId === state.activePointerId && state.isPressed && e.button === 0 && state.target) {
if ((0, $bBqCQ$reactariautils.nodeContains)(state.target, (0, $bBqCQ$reactariautils.getEventTarget)(e)) && state.pointerType != null) {
// Wait for onClick to fire onPress. This avoids browser issues when the DOM
// is mutated between onPointerUp and onClick, and is more compatible with third party libraries.
// https://github.com/adobe/react-spectrum/issues/1513
// https://issues.chromium.org/issues/40732224
// However, iOS and Android do not focus or fire onClick after a long press.
// We work around this by triggering a click ourselves after a timeout.
// This timeout is canceled during the click event in case the real one fires first.
// The timeout must be at least 32ms, because Safari on iOS delays the click event on
// non-form elements without certain ARIA roles (for hover emulation).
// https://github.com/WebKit/WebKit/blob/dccfae42bb29bd4bdef052e469f604a9387241c0/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm#L875-L892
let clicked = false;
let timeout = setTimeout(()=>{
if (state.isPressed && state.target instanceof HTMLElement) {
if (clicked) cancel(e);
else {
(0, $bBqCQ$reactariautils.focusWithoutScrolling)(state.target);
state.target.click();
}
}
}, 80);
// Use a capturing listener to track if a click occurred.
// If stopPropagation is called it may never reach our handler.
addGlobalListener(e.currentTarget, 'click', ()=>clicked = true, true);
state.disposables.push(()=>clearTimeout(timeout));
} else cancel(e);
// Ignore subsequent onPointerLeave event before onClick on touch devices.
state.isOverTarget = false;
}
};
let onPointerCancel = (e)=>{
cancel(e);
};
pressProps.onDragStart = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
// Safari does not call onPointerCancel when a drag starts, whereas Chrome and Firefox do.
cancel(e);
};
} else if (process.env.NODE_ENV === 'test') {
// NOTE: this fallback branch is entirely used by unit tests.
// All browsers now support pointer events, but JSDOM still does not.
pressProps.onMouseDown = (e)=>{
// Only handle left clicks
if (e.button !== 0 || !(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
if (state.ignoreEmulatedMouseEvents) {
e.stopPropagation();
return;
}
state.isPressed = true;
state.isOverTarget = true;
state.target = e.currentTarget;
state.pointerType = (0, $bBqCQ$reactariautils.isVirtualClick)(e.nativeEvent) ? 'virtual' : 'mouse';
// Flush sync so that focus moved during react re-renders occurs before we yield back to the browser.
let shouldStopPropagation = (0, $bBqCQ$reactdom.flushSync)(()=>triggerPressStart(e, state.pointerType));
if (shouldStopPropagation) e.stopPropagation();
if (preventFocusOnPress) {
let dispose = (0, $625cf83917e112ad$exports.preventFocus)(e.target);
if (dispose) state.disposables.push(dispose);
}
addGlobalListener((0, $bBqCQ$reactariautils.getOwnerDocument)(e.currentTarget), 'mouseup', onMouseUp, false);
};
pressProps.onMouseEnter = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
let shouldStopPropagation = true;
if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
state.isOverTarget = true;
shouldStopPropagation = triggerPressStart(e, state.pointerType);
}
if (shouldStopPropagation) e.stopPropagation();
};
pressProps.onMouseLeave = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
let shouldStopPropagation = true;
if (state.isPressed && !state.ignoreEmulatedMouseEvents && state.pointerType != null) {
state.isOverTarget = false;
shouldStopPropagation = triggerPressEnd(e, state.pointerType, false);
cancelOnPointerExit(e);
}
if (shouldStopPropagation) e.stopPropagation();
};
pressProps.onMouseUp = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
if (!state.ignoreEmulatedMouseEvents && e.button === 0 && !state.isPressed) triggerPressUp(e, state.pointerType || 'mouse');
};
let onMouseUp = (e)=>{
// Only handle left clicks
if (e.button !== 0) return;
if (state.ignoreEmulatedMouseEvents) {
state.ignoreEmulatedMouseEvents = false;
return;
}
if (state.target && state.target.contains(e.target) && state.pointerType != null) ;
else cancel(e);
state.isOverTarget = false;
};
pressProps.onTouchStart = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
let touch = $0294ea432cd92340$var$getTouchFromEvent(e.nativeEvent);
if (!touch) return;
state.activePointerId = touch.identifier;
state.ignoreEmulatedMouseEvents = true;
state.isOverTarget = true;
state.isPressed = true;
state.target = e.currentTarget;
state.pointerType = 'touch';
if (!allowTextSelectionOnPress) (0, $f7e14e656343df57$exports.disableTextSelection)(state.target);
let shouldStopPropagation = triggerPressStart($0294ea432cd92340$var$createTouchEvent(state.target, e), state.pointerType);
if (shouldStopPropagation) e.stopPropagation();
addGlobalListener((0, $bBqCQ$reactariautils.getOwnerWindow)(e.currentTarget), 'scroll', onScroll, true);
};
pressProps.onTouchMove = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
if (!state.isPressed) {
e.stopPropagation();
return;
}
let touch = $0294ea432cd92340$var$getTouchById(e.nativeEvent, state.activePointerId);
let shouldStopPropagation = true;
if (touch && $0294ea432cd92340$var$isOverTarget(touch, e.currentTarget)) {
if (!state.isOverTarget && state.pointerType != null) {
state.isOverTarget = true;
shouldStopPropagation = triggerPressStart($0294ea432cd92340$var$createTouchEvent(state.target, e), state.pointerType);
}
} else if (state.isOverTarget && state.pointerType != null) {
state.isOverTarget = false;
shouldStopPropagation = triggerPressEnd($0294ea432cd92340$var$createTouchEvent(state.target, e), state.pointerType, false);
cancelOnPointerExit($0294ea432cd92340$var$createTouchEvent(state.target, e));
}
if (shouldStopPropagation) e.stopPropagation();
};
pressProps.onTouchEnd = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
if (!state.isPressed) {
e.stopPropagation();
return;
}
let touch = $0294ea432cd92340$var$getTouchById(e.nativeEvent, state.activePointerId);
let shouldStopPropagation = true;
if (touch && $0294ea432cd92340$var$isOverTarget(touch, e.currentTarget) && state.pointerType != null) {
triggerPressUp($0294ea432cd92340$var$createTouchEvent(state.target, e), state.pointerType);
shouldStopPropagation = triggerPressEnd($0294ea432cd92340$var$createTouchEvent(state.target, e), state.pointerType);
triggerSyntheticClick(e.nativeEvent, state.target);
} else if (state.isOverTarget && state.pointerType != null) shouldStopPropagation = triggerPressEnd($0294ea432cd92340$var$createTouchEvent(state.target, e), state.pointerType, false);
if (shouldStopPropagation) e.stopPropagation();
state.isPressed = false;
state.activePointerId = null;
state.isOverTarget = false;
state.ignoreEmulatedMouseEvents = true;
if (state.target && !allowTextSelectionOnPress) (0, $f7e14e656343df57$exports.restoreTextSelection)(state.target);
removeAllGlobalListeners();
};
pressProps.onTouchCancel = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
e.stopPropagation();
if (state.isPressed) cancel($0294ea432cd92340$var$createTouchEvent(state.target, e));
};
let onScroll = (e)=>{
if (state.isPressed && (0, $bBqCQ$reactariautils.nodeContains)((0, $bBqCQ$reactariautils.getEventTarget)(e), state.target)) cancel({
currentTarget: state.target,
shiftKey: false,
ctrlKey: false,
metaKey: false,
altKey: false
});
};
pressProps.onDragStart = (e)=>{
if (!(0, $bBqCQ$reactariautils.nodeContains)(e.currentTarget, (0, $bBqCQ$reactariautils.getEventTarget)(e.nativeEvent))) return;
cancel(e);
};
}
return pressProps;
}, [
addGlobalListener,
isDisabled,
preventFocusOnPress,
removeAllGlobalListeners,
allowTextSelectionOnPress,
cancel,
cancelOnPointerExit,
triggerPressEnd,
triggerPressStart,
triggerPressUp,
triggerClick,
triggerSyntheticClick
]);
// Avoid onClick delay for double tap to zoom by default.
(0, $bBqCQ$react.useEffect)(()=>{
if (!domRef || process.env.NODE_ENV === 'test') return;
const ownerDocument = (0, $bBqCQ$reactariautils.getOwnerDocument)(domRef.current);
if (!ownerDocument || !ownerDocument.head || ownerDocument.getElementById($0294ea432cd92340$var$STYLE_ID)) return;
const style = ownerDocument.createElement('style');
style.id = $0294ea432cd92340$var$STYLE_ID;
// touchAction: 'manipulation' is supposed to be equivalent, but in
// Safari it causes onPointerCancel not to fire on scroll.
// https://bugs.webkit.org/show_bug.cgi?id=240917
style.textContent = `
@layer {
[${$0294ea432cd92340$var$PRESSABLE_ATTRIBUTE}] {
touch-action: pan-x pan-y pinch-zoom;
}
}
`.trim();
ownerDocument.head.prepend(style);
}, [
domRef
]);
// Remove user-select: none in case component unmounts immediately after pressStart
(0, $bBqCQ$react.useEffect)(()=>{
let state = ref.current;
return ()=>{
var _state_target;
if (!allowTextSelectionOnPress) (0, $f7e14e656343df57$exports.restoreTextSelection)((_state_target = state.target) !== null && _state_target !== void 0 ? _state_target : undefined);
for (let dispose of state.disposables)dispose();
state.disposables = [];
};
}, [
allowTextSelectionOnPress
]);
return {
isPressed: isPressedProp || isPressed,
pressProps: (0, $bBqCQ$reactariautils.mergeProps)(domProps, pressProps, {
[$0294ea432cd92340$var$PRESSABLE_ATTRIBUTE]: true
})
};
}
function $0294ea432cd92340$var$isHTMLAnchorLink(target) {
return target.tagName === 'A' && target.hasAttribute('href');
}
function $0294ea432cd92340$var$isValidKeyboardEvent(event, currentTarget) {
const { key: key, code: code } = event;
const element = currentTarget;
const role = element.getAttribute('role');
// Accessibility for keyboards. Space and Enter only.
// "Spacebar" is for IE 11
return (key === 'Enter' || key === ' ' || key === 'Spacebar' || code === 'Space') && !(element instanceof (0, $bBqCQ$reactariautils.getOwnerWindow)(element).HTMLInputElement && !$0294ea432cd92340$var$isValidInputKey(element, key) || element instanceof (0, $bBqCQ$reactariautils.getOwnerWindow)(element).HTMLTextAreaElement || element.isContentEditable) && // Links should only trigger with Enter key
!((role === 'link' || !role && $0294ea432cd92340$var$isHTMLAnchorLink(element)) && key !== 'Enter');
}
function $0294ea432cd92340$var$getTouchFromEvent(event) {
const { targetTouches: targetTouches } = event;
if (targetTouches.length > 0) return targetTouches[0];
return null;
}
function $0294ea432cd92340$var$getTouchById(event, pointerId) {
const changedTouches = event.changedTouches;
for(let i = 0; i < changedTouches.length; i++){
const touch = changedTouches[i];
if (touch.identifier === pointerId) return touch;
}
return null;
}
function $0294ea432cd92340$var$createTouchEvent(target, e) {
let clientX = 0;
let clientY = 0;
if (e.targetTouches && e.targetTouches.length === 1) {
clientX = e.targetTouches[0].clientX;
clientY = e.targetTouches[0].clientY;
}
return {
currentTarget: target,
shiftKey: e.shiftKey,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
clientX: clientX,
clientY: clientY
};
}
function $0294ea432cd92340$var$createEvent(target, e) {
let clientX = e.clientX;
let clientY = e.clientY;
return {
currentTarget: target,
shiftKey: e.shiftKey,
ctrlKey: e.ctrlKey,
metaKey: e.metaKey,
altKey: e.altKey,
clientX: clientX,
clientY: clientY
};
}
function $0294ea432cd92340$var$getPointClientRect(point) {
let offsetX = 0;
let offsetY = 0;
if (point.width !== undefined) offsetX = point.width / 2;
else if (point.radiusX !== undefined) offsetX = point.radiusX;
if (point.height !== undefined) offsetY = point.height / 2;
else if (point.radiusY !== undefined) offsetY = point.radiusY;
return {
top: point.clientY - offsetY,
right: point.clientX + offsetX,
bottom: point.clientY + offsetY,
left: point.clientX - offsetX
};
}
function $0294ea432cd92340$var$areRectanglesOverlapping(a, b) {
// check if they cannot overlap on x axis
if (a.left > b.right || b.left > a.right) return false;
// check if they cannot overlap on y axis
if (a.top > b.bottom || b.top > a.bottom) return false;
return true;
}
function $0294ea432cd92340$var$isOverTarget(point, target) {
let rect = target.getBoundingClientRect();
let pointRect = $0294ea432cd92340$var$getPointClientRect(point);
return $0294ea432cd92340$var$areRectanglesOverlapping(rect, pointRect);
}
function $0294ea432cd92340$var$shouldPreventDefaultUp(target) {
if (target instanceof HTMLInputElement) return false;
if (target instanceof HTMLButtonElement) return target.type !== 'submit' && target.type !== 'reset';
if ($0294ea432cd92340$var$isHTMLAnchorLink(target)) return false;
return true;
}
function $0294ea432cd92340$var$shouldPreventDefaultKeyboard(target, key) {
if (target instanceof HTMLInputElement) return !$0294ea432cd92340$var$isValidInputKey(target, key);
return $0294ea432cd92340$var$shouldPreventDefaultUp(target);
}
const $0294ea432cd92340$var$nonTextInputTypes = new Set([
'checkbox',
'radio',
'range',
'color',
'file',
'image',
'button',
'submit',
'reset'
]);
function $0294ea432cd92340$var$isValidInputKey(target, key) {
// Only space should toggle checkboxes and radios, not enter.
return target.type === 'checkbox' || target.type === 'radio' ? key === ' ' : $0294ea432cd92340$var$nonTextInputTypes.has(target.type);
}
//# sourceMappingURL=usePress.main.js.map
@@ -0,0 +1,97 @@
{
"name": "get-intrinsic",
"version": "1.3.0",
"description": "Get and robustly cache all JS language-level intrinsics at first require time",
"main": "index.js",
"exports": {
".": "./index.js",
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"prelint": "evalmd README.md",
"lint": "eslint --ext=.js,.mjs .",
"pretest": "npm run lint",
"tests-only": "nyc tape 'test/**/*.js'",
"test": "npm run tests-only",
"posttest": "npx npm@'>= 10.2' audit --production",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/ljharb/get-intrinsic.git"
},
"keywords": [
"javascript",
"ecmascript",
"es",
"js",
"intrinsic",
"getintrinsic",
"es-abstract"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"funding": {
"url": "https://github.com/sponsors/ljharb"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/ljharb/get-intrinsic/issues"
},
"homepage": "https://github.com/ljharb/get-intrinsic#readme",
"dependencies": {
"call-bind-apply-helpers": "^1.0.2",
"es-define-property": "^1.0.1",
"es-errors": "^1.3.0",
"es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2",
"get-proto": "^1.0.1",
"gopd": "^1.2.0",
"has-symbols": "^1.1.0",
"hasown": "^2.0.2",
"math-intrinsics": "^1.1.0"
},
"devDependencies": {
"@ljharb/eslint-config": "^21.1.1",
"auto-changelog": "^2.5.0",
"call-bound": "^1.0.3",
"encoding": "^0.1.13",
"es-abstract": "^1.23.9",
"es-value-fixtures": "^1.7.1",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.5",
"make-async-function": "^1.0.0",
"make-async-generator-function": "^1.0.0",
"make-generator-function": "^2.0.0",
"mock-property": "^1.1.0",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.4",
"safe-publish-latest": "^2.0.0",
"tape": "^5.9.0"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"testling": {
"files": "test/GetIntrinsic.js"
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,477 @@
"use strict"
const { findVariable } = require("@eslint-community/eslint-utils")
const { getSourceCode } = require("eslint-compat-utils")
module.exports = { buildObjectTypeChecker, buildExpressionTypeProvider }
/**
* @typedef {import("eslint").Rule.RuleContext} RuleContext
* @typedef {import("estree").MemberExpression} MemberExpression
* @typedef {import("estree").Expression} Expression
*/
/**
* @typedef {"Array"
* | "Date"
* | "Function"
* | "Intl.Collator"
* | "Intl.DateTimeFormat"
* | "Intl.ListFormat"
* | "Intl.NumberFormat"
* | "Intl.PluralRules"
* | "Intl.RelativeTimeFormat"
* | "Intl.Segmenter"
* | "Promise"
* | "RegExp"
* | "String"
* | "Symbol"
* | "Int8Array"
* | "Uint8Array"
* | "Uint8ClampedArray"
* | "Int16Array"
* | "Uint16Array"
* | "Int32Array"
* | "Uint32Array"
* | "Float32Array"
* | "Float64Array"
* | "BigInt64Array"
* | "BigUint64Array"
* | "Object"
* | "Number"
* | "Boolean"
* | "BigInt"
* | "null"
* | "undefined"
* } TypeName
*/
/**
* @typedef {Record<
* string,
* WellKnownGlobalFunction
* | WellKnownGlobalObject
* | { type: "undefined" }
* | { type: "Number" }
* | undefined>
* } WellKnownGlobals
*/
/**
* @typedef {object} WellKnownGlobalFunction
* @property {"Function"} type
* @property {TypeName} returnType
*/
/**
* @typedef {object} WellKnownGlobalObject
* @property {"Object"} type
* @property {WellKnownGlobals} properties
*/
/** @type {WellKnownGlobals} */
const WELLKNOWN_GLOBALS = {
String: { type: "Function", returnType: "String" },
Number: { type: "Function", returnType: "Number" },
Boolean: { type: "Function", returnType: "Boolean" },
Symbol: { type: "Function", returnType: "Symbol" },
BigInt: { type: "Function", returnType: "BigInt" },
Object: { type: "Function", returnType: "Object" },
Function: { type: "Function", returnType: "Function" },
Array: { type: "Function", returnType: "Array" },
RegExp: { type: "Function", returnType: "RegExp" },
Date: { type: "Function", returnType: "Date" },
Promise: { type: "Function", returnType: "Promise" },
Int8Array: { type: "Function", returnType: "Int8Array" },
Uint8Array: { type: "Function", returnType: "Uint8Array" },
Uint8ClampedArray: { type: "Function", returnType: "Uint8ClampedArray" },
Int16Array: { type: "Function", returnType: "Int16Array" },
Uint16Array: { type: "Function", returnType: "Uint16Array" },
Int32Array: { type: "Function", returnType: "Int32Array" },
Uint32Array: { type: "Function", returnType: "Uint32Array" },
Float32Array: { type: "Function", returnType: "Float32Array" },
Float64Array: { type: "Function", returnType: "Float64Array" },
BigInt64Array: { type: "Function", returnType: "BigInt64Array" },
BigUint64Array: { type: "Function", returnType: "BigUint64Array" },
ArrayBuffer: { type: "Function", returnType: "ArrayBuffer" },
SharedArrayBuffer: { type: "Function", returnType: "SharedArrayBuffer" },
Intl: {
type: "Object",
properties: {
Collator: { type: "Function", returnType: "Intl.Collator" },
DateTimeFormat: {
type: "Function",
returnType: "Intl.DateTimeFormat",
},
ListFormat: {
type: "Function",
returnType: "Intl.ListFormat",
},
NumberFormat: {
type: "Function",
returnType: "Intl.NumberFormat",
},
PluralRules: {
type: "Function",
returnType: "Intl.PluralRules",
},
RelativeTimeFormat: {
type: "Function",
returnType: "Intl.RelativeTimeFormat",
},
Segmenter: { type: "Function", returnType: "Intl.Segmenter" },
},
},
undefined: { type: "undefined" },
NaN: { type: "Number" },
Infinity: { type: "Number" },
}
/**
* Build object type checker.
* @param {RuleContext} context The rule context.
* @param {boolean} aggressiveResult The value to return if the type cannot be determined.
* @returns {((memberAccessNode: MemberExpression, className: string) => boolean)} Returns an object type checker.
*/
function buildObjectTypeChecker(context, aggressiveResult) {
const getType = buildExpressionTypeProvider(context)
return function (memberAccessNode, className) {
const type = getType(memberAccessNode.object)
if (type == null) {
return aggressiveResult
}
return type === className
}
}
const cache = new WeakMap()
/**
* Build expression type provider.
* @param {RuleContext} context The rule context.
* @returns {((node: Expression) => TypeName | null)} Returns an expression type provider.
*/
function buildExpressionTypeProvider(context) {
const key = getSourceCode(context).ast
let result = cache.get(key)
if (!result) {
cache.set(key, (result = buildExpressionTypeProviderImpl(context)))
}
return result
}
/**
* Build expression type provider.
* @param {RuleContext} context The rule context.
* @returns {((node: Expression) => TypeName | null)} Returns an expression type provider.
*/
function buildExpressionTypeProviderImpl(context) {
/** @type {Record<Expression['type'], (node: Expression) => TypeName | null>} */
const GET_TYPES = {
ArrayExpression: () => "Array",
ObjectExpression: () => "Object",
ArrowFunctionExpression: () => "Function",
FunctionExpression: () => "Function",
Literal: getLiteralType,
TemplateLiteral: () => "String",
Identifier: getIdentifierType,
/** @param {import("estree").BinaryExpression} node */
BinaryExpression: (node) =>
getOperatorType(node.operator, node.left, node.right),
/** @param {import("estree").LogicalExpression} node */
LogicalExpression: (node) =>
getOperatorType(node.operator, node.left, node.right),
/** @param {import("estree").AssignmentExpression} node */
AssignmentExpression: (node) =>
getOperatorType(node.operator, node.left, node.right),
UnaryExpression: getUnaryExpressionType,
UpdateExpression: () => "Number",
ClassExpression: () => "Function",
ChainExpression: (node) => getType(node.expression),
/** @param {import("estree").SequenceExpression} node */
SequenceExpression: (node) =>
getType(node.expressions[node.expressions.length - 1]),
CallExpression: getCallExpressionType,
NewExpression: getCallExpressionType,
TaggedTemplateExpression: getCallExpressionType,
/** @param {import("estree").ConditionalExpression} node */
ConditionalExpression(node) {
const consequent = getType(node.consequent)
const alternate = getType(node.alternate)
return consequent === alternate ? consequent : null
},
}
const tracked = new Map()
return getType
/**
* Gets the type name of the given node.
* @param {Expression} node The Expression node
* @returns {TypeName | null} The type name of expression.
*/
function getType(node) {
if (tracked.has(node)) {
return tracked.get(node)
}
tracked.set(node, null)
try {
const result = GET_TYPES[node.type]?.(node) ?? null
tracked.set(node, result)
return result
} catch {
return null
}
}
/**
* @param {import("estree").Identifier} node
* @returns {import("eslint").Scope.Variable | null}
*/
function findVariableFromIdentifier(node) {
return findVariable(
getSourceCode(context).scopeManager.globalScope,
node,
)
}
/**
* @param {import("estree").Literal} node
* @returns {TypeName | null}
*/
function getLiteralType(node) {
if (node.regex) {
return "RegExp"
}
if (node.bigint) {
return "BigInt"
}
if (node.value == null) {
return "null"
}
const valueType = typeof node.value
if (valueType === "string") {
return "String"
}
if (valueType === "number") {
return "Number"
}
if (valueType === "boolean") {
return "Boolean"
}
return valueType[0].toUpperCase() + valueType.slice(1)
}
/**
* @param {import("estree").Identifier} node
* @returns {TypeName | null}
*/
function getIdentifierType(node) {
const variable = findVariableFromIdentifier(node)
if (variable) {
if (variable.defs.length === 0) {
// It is a global variable
return WELLKNOWN_GLOBALS[node.name]?.type ?? null
} else if (variable.defs.length === 1) {
const def = variable.defs[0]
if (def.type === "Variable") {
if (
// It has an initial value.
def.node.init &&
// It does not write new values.
(def.parent.kind === "const" ||
variable.references.every(
(ref) =>
ref.isReadOnly() ||
ref.identifier === def.name,
))
) {
// The type of the initial value is the type of the variable.
return getType(def.node.init)
}
} else if (def.type === "FunctionName") {
return "Function"
}
}
}
return null
}
/**
* @param {import("estree").BinaryOperator
* | import("estree").LogicalOperator
* | import("estree").AssignmentOperator} operator
* @param {import("estree").Expression} leftNode
* @param {import("estree").Expression} rightNode
* @returns {TypeName | null}
*/
// eslint-disable-next-line complexity
function getOperatorType(operator, leftNode, rightNode) {
if (operator === "=") {
return getType(rightNode)
}
if (operator === "+" || operator === "+=") {
return getPlusOperatorType(leftNode, rightNode)
}
if (
operator === "==" ||
operator === "!=" ||
operator === "===" ||
operator === "!==" ||
operator === "<" ||
operator === "<=" ||
operator === ">" ||
operator === ">=" ||
operator === "in" ||
operator === "instanceof"
) {
return "Boolean"
}
if (
operator === "-" ||
operator === "-=" ||
operator === "*" ||
operator === "*=" ||
operator === "/" ||
operator === "/=" ||
operator === "%" ||
operator === "%=" ||
operator === "^" ||
operator === "^=" ||
operator === "**" ||
operator === "**=" ||
operator === "&" ||
operator === "&=" ||
operator === "|" ||
operator === "|="
) {
const left = getType(leftNode)
const right = getType(rightNode)
if (left === "BigInt" || right === "BigInt") {
return "BigInt"
}
return left == null && right == null ? null : "Number"
}
if (
operator === "<<" ||
operator === "<<=" ||
operator === ">>" ||
operator === ">>=" ||
operator === ">>>" ||
operator === ">>>="
) {
return "Number"
}
if (
operator === "&&" ||
operator === "&&=" ||
operator === "||" ||
operator === "||=" ||
operator === "??" ||
operator === "??="
) {
const left = getType(leftNode)
const right = getType(rightNode)
return left === right ? left : null
}
return null
}
/**
* @param {import("estree").Expression} leftNode
* @param {import("estree").Expression} rightNode
* @returns {TypeName | null}
*/
function getPlusOperatorType(leftNode, rightNode) {
const left = getType(leftNode)
const right = getType(rightNode)
if (left === "String" || right === "String") {
return "String"
}
if (left === "BigInt" || right === "BigInt") {
return "BigInt"
}
if (right === "Number") {
return "Number"
}
if (left === "Number") {
if (right === "null" || right === "undefined") {
return "Number"
}
}
if (right == null) {
return null
}
return "String"
}
/**
* @param {import("estree").UnaryExpression} node
* @returns {TypeName | null}
*/
function getUnaryExpressionType(node) {
if (node.operator === "!" || node.operator === "delete") {
return "Boolean"
}
if (node.operator === "+") {
return "Number"
}
if (node.operator === "-" || node.operator === "~") {
const argument = getType(node.argument)
if (argument === "BigInt") {
return argument
}
return argument == null ? null : "Number"
}
if (node.operator === "typeof") {
return "String"
}
if (node.operator === "void") {
return "undefined"
}
return null
}
/**
* @param {import("estree").SimpleCallExpression | import("estree").NewExpression | import("estree").TaggedTemplateExpression} node
* @returns {TypeName | null}
*/
function getCallExpressionType(node) {
const callee =
node.type === "CallExpression" || node.type === "NewExpression"
? node.callee
: node.tag
if (callee.type === "Identifier") {
if (!isGlobalObject(callee)) {
return null
}
const obj = WELLKNOWN_GLOBALS[callee.name]
return obj?.type === "Function" ? obj.returnType : null
} else if (callee.type === "MemberExpression") {
if (
callee.computed ||
callee.property.type !== "Identifier" ||
!isGlobalObject(callee.object)
) {
return null
}
const obj = WELLKNOWN_GLOBALS[callee.object.name]
if (obj?.type === "Object") {
const prop = obj.properties[callee.property.name]
return prop?.type === "Function" ? prop.returnType : null
}
}
return null
}
/**
* @param {import("estree").Node} node
* @returns {node is import("estree").Identifier}
*/
function isGlobalObject(node) {
if (node.type !== "Identifier") {
return false
}
const variable = findVariableFromIdentifier(node)
return Boolean(variable && variable.defs.length === 0)
}
}
@@ -0,0 +1,52 @@
'use strict';
/*
* Displays a helpful message and the source of
* the format when it is invalid.
*/
class InvalidFormatError extends Error {
constructor(formatFn) {
super(`Format functions must be synchronous taking a two arguments: (info, opts)
Found: ${formatFn.toString().split('\n')[0]}\n`);
Error.captureStackTrace(this, InvalidFormatError);
}
}
/*
* function format (formatFn)
* Returns a create function for the `formatFn`.
*/
module.exports = formatFn => {
if (formatFn.length > 2) {
throw new InvalidFormatError(formatFn);
}
/*
* function Format (options)
* Base prototype which calls a `_format`
* function and pushes the result.
*/
function Format(options = {}) {
this.options = options;
}
Format.prototype.transform = formatFn;
//
// Create a function which returns new instances of
// FormatWrap for simple syntax like:
//
// require('winston').formats.json();
//
function createFormatWrap(opts) {
return new Format(opts);
}
//
// Expose the FormatWrap through the create function
// for testability.
//
createFormatWrap.Format = Format;
return createFormatWrap;
};
@@ -0,0 +1,34 @@
export {gfmFootnoteFromMarkdown, gfmFootnoteToMarkdown} from './lib/index.js'
export interface ToMarkdownOptions {
// To do: next major: change default.
/**
* Use a blank line for the first line of footnote definitions
* (`boolean`, default: `false`).
*/
firstLineBlank?: boolean | null | undefined
}
declare module 'mdast-util-to-markdown' {
interface ConstructNameMap {
/**
* Footnote definition.
*
* ```markdown
* > | [^a]: B.
* ^^^^^^^^
* ```
*/
footnoteDefinition: 'footnoteDefinition'
/**
* Footnote reference.
*
* ```markdown
* > | A[^b].
* ^^^^
* ```
*/
footnoteReference: 'footnoteReference'
}
}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2022_string: LibDefinition;
@@ -0,0 +1,101 @@
/**
* @import {Extension} from 'micromark-util-types'
*/
import {
attention,
autolink,
blockQuote,
characterEscape,
characterReference,
codeFenced,
codeIndented,
codeText,
definition,
hardBreakEscape,
headingAtx,
htmlFlow,
htmlText,
labelEnd,
labelStartImage,
labelStartLink,
lineEnding,
list,
setextUnderline,
thematicBreak
} from 'micromark-core-commonmark'
import {codes} from 'micromark-util-symbol'
import {resolver as resolveText} from './initialize/text.js'
/** @satisfies {Extension['document']} */
export const document = {
[codes.asterisk]: list,
[codes.plusSign]: list,
[codes.dash]: list,
[codes.digit0]: list,
[codes.digit1]: list,
[codes.digit2]: list,
[codes.digit3]: list,
[codes.digit4]: list,
[codes.digit5]: list,
[codes.digit6]: list,
[codes.digit7]: list,
[codes.digit8]: list,
[codes.digit9]: list,
[codes.greaterThan]: blockQuote
}
/** @satisfies {Extension['contentInitial']} */
export const contentInitial = {
[codes.leftSquareBracket]: definition
}
/** @satisfies {Extension['flowInitial']} */
export const flowInitial = {
[codes.horizontalTab]: codeIndented,
[codes.virtualSpace]: codeIndented,
[codes.space]: codeIndented
}
/** @satisfies {Extension['flow']} */
export const flow = {
[codes.numberSign]: headingAtx,
[codes.asterisk]: thematicBreak,
[codes.dash]: [setextUnderline, thematicBreak],
[codes.lessThan]: htmlFlow,
[codes.equalsTo]: setextUnderline,
[codes.underscore]: thematicBreak,
[codes.graveAccent]: codeFenced,
[codes.tilde]: codeFenced
}
/** @satisfies {Extension['string']} */
export const string = {
[codes.ampersand]: characterReference,
[codes.backslash]: characterEscape
}
/** @satisfies {Extension['text']} */
export const text = {
[codes.carriageReturn]: lineEnding,
[codes.lineFeed]: lineEnding,
[codes.carriageReturnLineFeed]: lineEnding,
[codes.exclamationMark]: labelStartImage,
[codes.ampersand]: characterReference,
[codes.asterisk]: attention,
[codes.lessThan]: [autolink, htmlText],
[codes.leftSquareBracket]: labelStartLink,
[codes.backslash]: [hardBreakEscape, characterEscape],
[codes.rightSquareBracket]: labelEnd,
[codes.underscore]: attention,
[codes.graveAccent]: codeText
}
/** @satisfies {Extension['insideSpan']} */
export const insideSpan = {null: [attention, resolveText]}
/** @satisfies {Extension['attentionMarkers']} */
export const attentionMarkers = {null: [codes.asterisk, codes.underscore]}
/** @satisfies {Extension['disable']} */
export const disable = {null: []}
@@ -0,0 +1 @@
{"version":3,"file":"ServiceReferenceManager.spec.d.ts","sourceRoot":"","sources":["../../../../src/container/services/ServiceReferenceManager.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
import { useEffect, useRef } from 'react';
var diffTwoDeps = function (deps1, deps2) {
// Let's do a reference equality check on 2 dependency list.
// If deps1 is defined, we iterate over deps1 and do comparison on each element with equivalent element from deps2
// As this func is used only in this hook, we assume 2 deps always have same length.
return deps1
? deps1
.map(function (_, idx) { return (!Object.is(deps1[idx], deps2 === null || deps2 === void 0 ? void 0 : deps2[idx]) ? idx : -1); })
.filter(function (ele) { return ele >= 0; })
: deps2
? deps2.map(function (_, idx) { return idx; })
: [];
};
var useTrackedEffect = function (effect, deps) {
var previousDepsRef = useRef(undefined);
useEffect(function () {
var changes = diffTwoDeps(previousDepsRef.current, deps);
var previousDeps = previousDepsRef.current;
previousDepsRef.current = deps;
return effect(changes, previousDeps, deps);
}, deps);
};
export default useTrackedEffect;
@@ -0,0 +1,68 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _ariaQuery = require("aria-query");
var _jsxAstUtils = require("jsx-ast-utils");
var _schemas = require("../util/schemas");
var _getElementType = _interopRequireDefault(require("../util/getElementType"));
var _isHiddenFromScreenReader = _interopRequireDefault(require("../util/isHiddenFromScreenReader"));
var _isInteractiveElement = _interopRequireDefault(require("../util/isInteractiveElement"));
var _isPresentationRole = _interopRequireDefault(require("../util/isPresentationRole"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
/**
* @fileoverview Enforce a clickable non-interactive element has at least 1 keyboard event listener.
* @author Ethan Cohen
*/
// ----------------------------------------------------------------------------
// Rule Definition
// ----------------------------------------------------------------------------
var errorMessage = 'Visible, non-interactive elements with click handlers must have at least one keyboard listener.';
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/click-events-have-key-events.md',
description: 'Enforce a clickable non-interactive element has at least one keyboard event listener.'
},
schema: [schema]
},
create: function create(context) {
var elementType = (0, _getElementType["default"])(context);
return {
JSXOpeningElement: function JSXOpeningElement(node) {
var props = node.attributes;
if ((0, _jsxAstUtils.getProp)(props, 'onclick') === undefined) {
return;
}
var type = elementType(node);
var requiredProps = ['onkeydown', 'onkeyup', 'onkeypress'];
if (!_ariaQuery.dom.has(type)) {
// Do not test higher level JSX components, as we do not know what
// low-level DOM element this maps to.
return;
}
if ((0, _isHiddenFromScreenReader["default"])(type, props) || (0, _isPresentationRole["default"])(type, props)) {
return;
}
if ((0, _isInteractiveElement["default"])(type, props)) {
return;
}
if ((0, _jsxAstUtils.hasAnyProp)(props, requiredProps)) {
return;
}
// Visible, non-interactive elements with click handlers require one keyboard event listener.
context.report({
node,
message: errorMessage
});
}
};
}
};
module.exports = exports.default;
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,6DAfW,OAAO,MAEP,KAAK,OAEL,KAAK,QAEL,SAAS,cAET,SAAS,cAET,SAAS,GAEP,KAAK,CAkIjB;6BArKS,sBAAsB;2BAAtB,sBAAsB;+BAAtB,sBAAsB;qCAAtB,sBAAsB"}
@@ -0,0 +1,78 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "ROOT_CONFIG_FILENAMES", {
enumerable: true,
get: function () {
return _configuration.ROOT_CONFIG_FILENAMES;
}
});
Object.defineProperty(exports, "findConfigUpwards", {
enumerable: true,
get: function () {
return _configuration.findConfigUpwards;
}
});
Object.defineProperty(exports, "findPackageData", {
enumerable: true,
get: function () {
return _package.findPackageData;
}
});
Object.defineProperty(exports, "findRelativeConfig", {
enumerable: true,
get: function () {
return _configuration.findRelativeConfig;
}
});
Object.defineProperty(exports, "findRootConfig", {
enumerable: true,
get: function () {
return _configuration.findRootConfig;
}
});
Object.defineProperty(exports, "loadConfig", {
enumerable: true,
get: function () {
return _configuration.loadConfig;
}
});
Object.defineProperty(exports, "loadPlugin", {
enumerable: true,
get: function () {
return _plugins.loadPlugin;
}
});
Object.defineProperty(exports, "loadPreset", {
enumerable: true,
get: function () {
return _plugins.loadPreset;
}
});
Object.defineProperty(exports, "resolvePlugin", {
enumerable: true,
get: function () {
return _plugins.resolvePlugin;
}
});
Object.defineProperty(exports, "resolvePreset", {
enumerable: true,
get: function () {
return _plugins.resolvePreset;
}
});
Object.defineProperty(exports, "resolveShowConfigPath", {
enumerable: true,
get: function () {
return _configuration.resolveShowConfigPath;
}
});
var _package = require("./package.js");
var _configuration = require("./configuration.js");
var _plugins = require("./plugins.js");
({});
0 && 0;
//# sourceMappingURL=index.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 `Math.imul` method.",
category: "ES2015",
recommended: false,
url: "http://eslint-community.github.io/eslint-plugin-es-x/rules/no-math-imul.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({
Math: {
imul: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,45 @@
# path-browserify [![Build Status](https://travis-ci.org/browserify/path-browserify.png?branch=master)](https://travis-ci.org/browserify/path-browserify)
> The `path` module from Node.js for browsers
This implements the Node.js [`path`][path] module for environments that do not have it, like browsers.
> `path-browserify` currently matches the **Node.js 10.3** API.
## Install
You usually do not have to install `path-browserify` yourself! If your code runs in Node.js, `path` is built in. If your code runs in the browser, bundlers like [browserify](https://github.com/browserify/browserify) or [webpack](https://github.com/webpack/webpack) include the `path-browserify` module by default.
But if none of those apply, with npm do:
```
npm install path-browserify
```
## Usage
```javascript
var path = require('path')
var filename = 'logo.png';
var logo = path.join('./assets/img', filename);
document.querySelector('#logo').src = logo;
```
## API
See the [Node.js path docs][path]. `path-browserify` currently matches the Node.js 10.3 API.
`path-browserify` only implements the POSIX functions, not the win32 ones.
## Contributing
PRs are very welcome! The main way to contribute to `path-browserify` is by porting features, bugfixes and tests from Node.js. Ideally, code contributions to this module are copy-pasted from Node.js and transpiled to ES5, rather than reimplemented from scratch. Matching the Node.js code as closely as possible makes maintenance simpler when new changes land in Node.js.
This module intends to provide exactly the same API as Node.js, so features that are not available in the core `path` module will not be accepted. Feature requests should instead be directed at [nodejs/node](https://github.com/nodejs/node) and will be added to this module once they are implemented in Node.js.
If there is a difference in behaviour between Node.js's `path` module and this module, please open an issue!
## License
[MIT](./LICENSE)
[path]: https://nodejs.org/docs/v10.3.0/api/path.html
@@ -0,0 +1 @@
{"version":3,"file":"proxies.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/node/proxies.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('size', require('../size'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"names":["_using","stack","value","isAwait","Object","TypeError","dispose","Symbol","asyncDispose","for","push","v","d","a"],"sources":["../../src/helpers/using.js"],"sourcesContent":["/* @minVersion 7.22.0 */\n/* @onlyBabel7 */\n\nexport default function _using(stack, value, isAwait) {\n if (value === null || value === void 0) return value;\n if (Object(value) !== value) {\n throw new TypeError(\n \"using declarations can only be used with objects, functions, null, or undefined.\",\n );\n }\n // core-js-pure uses Symbol.for for polyfilling well-known symbols\n if (isAwait) {\n var dispose =\n value[Symbol.asyncDispose || Symbol.for(\"Symbol.asyncDispose\")];\n }\n if (dispose === null || dispose === void 0) {\n dispose = value[Symbol.dispose || Symbol.for(\"Symbol.dispose\")];\n }\n if (typeof dispose !== \"function\") {\n throw new TypeError(`Property [Symbol.dispose] is not a function.`);\n }\n stack.push({ v: value, d: dispose, a: isAwait });\n return value;\n}\n"],"mappings":";;;;;;AAGe,SAASA,MAAMA,CAACC,KAAK,EAAEC,KAAK,EAAEC,OAAO,EAAE;EACpD,IAAID,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAK,KAAK,CAAC,EAAE,OAAOA,KAAK;EACpD,IAAIE,MAAM,CAACF,KAAK,CAAC,KAAKA,KAAK,EAAE;IAC3B,MAAM,IAAIG,SAAS,CACjB,kFACF,CAAC;EACH;EAEA,IAAIF,OAAO,EAAE;IACX,IAAIG,OAAO,GACTJ,KAAK,CAACK,MAAM,CAACC,YAAY,IAAID,MAAM,CAACE,GAAG,CAAC,qBAAqB,CAAC,CAAC;EACnE;EACA,IAAIH,OAAO,KAAK,IAAI,IAAIA,OAAO,KAAK,KAAK,CAAC,EAAE;IAC1CA,OAAO,GAAGJ,KAAK,CAACK,MAAM,CAACD,OAAO,IAAIC,MAAM,CAACE,GAAG,CAAC,gBAAgB,CAAC,CAAC;EACjE;EACA,IAAI,OAAOH,OAAO,KAAK,UAAU,EAAE;IACjC,MAAM,IAAID,SAAS,CAAC,8CAA8C,CAAC;EACrE;EACAJ,KAAK,CAACS,IAAI,CAAC;IAAEC,CAAC,EAAET,KAAK;IAAEU,CAAC,EAAEN,OAAO;IAAEO,CAAC,EAAEV;EAAQ,CAAC,CAAC;EAChD,OAAOD,KAAK;AACd","ignoreList":[]}
@@ -0,0 +1,126 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// 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.
// a duplex stream is just a stream that is both readable and writable.
// Since JS doesn't have multiple prototypal inheritance, this class
// prototypally inherits from Readable, and then parasitically from
// Writable.
'use strict';
/*<replacement>*/
var objectKeys = Object.keys || function (obj) {
var keys = [];
for (var key in obj) keys.push(key);
return keys;
};
/*</replacement>*/
module.exports = Duplex;
var Readable = require('./_stream_readable');
var Writable = require('./_stream_writable');
require('inherits')(Duplex, Readable);
{
// Allow the keys array to be GC'ed.
var keys = objectKeys(Writable.prototype);
for (var v = 0; v < keys.length; v++) {
var method = keys[v];
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
}
}
function Duplex(options) {
if (!(this instanceof Duplex)) return new Duplex(options);
Readable.call(this, options);
Writable.call(this, options);
this.allowHalfOpen = true;
if (options) {
if (options.readable === false) this.readable = false;
if (options.writable === false) this.writable = false;
if (options.allowHalfOpen === false) {
this.allowHalfOpen = false;
this.once('end', onend);
}
}
}
Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
// making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
get: function get() {
return this._writableState.highWaterMark;
}
});
Object.defineProperty(Duplex.prototype, 'writableBuffer', {
// making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
get: function get() {
return this._writableState && this._writableState.getBuffer();
}
});
Object.defineProperty(Duplex.prototype, 'writableLength', {
// making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
get: function get() {
return this._writableState.length;
}
});
// the no-half-open enforcer
function onend() {
// If the writable side ended, then we're ok.
if (this._writableState.ended) return;
// no more data can be written.
// But allow more writes to happen in this tick.
process.nextTick(onEndNT, this);
}
function onEndNT(self) {
self.end();
}
Object.defineProperty(Duplex.prototype, 'destroyed', {
// making it explicit this property is not enumerable
// because otherwise some prototype manipulation in
// userland will fail
enumerable: false,
get: function get() {
if (this._readableState === undefined || this._writableState === undefined) {
return false;
}
return this._readableState.destroyed && this._writableState.destroyed;
},
set: function set(value) {
// we ignore the value if the stream
// has not been initialized yet
if (this._readableState === undefined || this._writableState === undefined) {
return;
}
// backward compatibility, the user is explicitly
// managing destroyed
this._readableState.destroyed = value;
this._writableState.destroyed = value;
}
});
@@ -0,0 +1 @@
{"name":"p-locate","version":"5.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532094497,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532094497,"integrity":"sha512-brExehVMRrL6K6wPEuLMo4dsnm0PdPsXNTMCHkI7WpwXTxCidrANrBDRxcgGQvhB+2eHRwWWTG3COlhBHkgaUg==","mode":420,"size":1157},"package.json":{"checkedAt":1794532094497,"integrity":"sha512-H0eUvKthvpUDHGNdgyEIiHcovo3oRPLPiBbRbA+fGQ4j5IMZIdzmZ4rQFfZ/5UAeb3ekkxAfBr2LphEd4L+Oew==","mode":420,"size":942},"readme.md":{"checkedAt":1794532094497,"integrity":"sha512-POZgJNm+q5KAJUReK0Jr2wfaQp78pppmib7NVMFPtkfvN/Aw/7h/dRjnMoucFkOp9X7yxDnUpw7boJRoYofk1Q==","mode":420,"size":2557},"index.d.ts":{"checkedAt":1794532094497,"integrity":"sha512-A80/8QHgP7IOKhdEhkY5lz4j3qR9z3rBNzktnuAOpyGQTfwdTOUHdTfhCTO+/d1G5STvZNVI2wYL66itS9jHSg==","mode":420,"size":1467}}}
@@ -0,0 +1,148 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var lr = require('@lezer/lr');
var highlight = require('@lezer/highlight');
// This file was generated by lezer-generator. You probably shouldn't edit it.
const descendantOp = 122,
Unit = 1,
identifier = 123,
callee = 124,
VariableName = 2,
queryIdentifier = 125,
queryVariableName = 3,
QueryCallee = 4;
/* Hand-written tokenizers for CSS tokens that can't be
expressed by Lezer's built-in tokenizer. */
const space = [9, 10, 11, 12, 13, 32, 133, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197,
8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288];
const colon = 58, parenL = 40, underscore = 95, bracketL = 91, dash = 45, period = 46,
hash = 35, percent = 37, ampersand = 38, backslash = 92, newline = 10, asterisk = 42;
function isAlpha(ch) { return ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122 || ch >= 161 }
function isDigit(ch) { return ch >= 48 && ch <= 57 }
function isHex(ch) { return isDigit(ch) || ch >= 97 && ch <= 102 || ch >= 65 && ch <= 70 }
const identifierTokens = (id, varName, callee) => (input, stack) => {
for (let inside = false, dashes = 0, i = 0;; i++) {
let {next} = input;
if (isAlpha(next) || next == dash || next == underscore || (inside && isDigit(next))) {
if (!inside && (next != dash || i > 0)) inside = true;
if (dashes === i && next == dash) dashes++;
input.advance();
} else if (next == backslash && input.peek(1) != newline) {
input.advance();
if (isHex(input.next)) {
do { input.advance(); } while (isHex(input.next))
if (input.next == 32) input.advance();
} else if (input.next > -1) {
input.advance();
}
inside = true;
} else {
if (inside) input.acceptToken(
dashes == 2 && stack.canShift(VariableName) ? varName : next == parenL ? callee : id
);
break
}
}
};
const identifiers = new lr.ExternalTokenizer(
identifierTokens(identifier, VariableName, callee)
);
const queryIdentifiers = new lr.ExternalTokenizer(
identifierTokens(queryIdentifier, queryVariableName, QueryCallee)
);
const descendant = new lr.ExternalTokenizer(input => {
if (space.includes(input.peek(-1))) {
let {next} = input;
if (isAlpha(next) || next == underscore || next == hash || next == period ||
next == asterisk || next == bracketL || next == colon && isAlpha(input.peek(1)) ||
next == dash || next == ampersand)
input.acceptToken(descendantOp);
}
});
const unitToken = new lr.ExternalTokenizer(input => {
if (!space.includes(input.peek(-1))) {
let {next} = input;
if (next == percent) { input.advance(); input.acceptToken(Unit); }
if (isAlpha(next)) {
do { input.advance(); } while (isAlpha(input.next) || isDigit(input.next))
input.acceptToken(Unit);
}
}
});
const cssHighlighting = highlight.styleTags({
"AtKeyword import charset namespace keyframes media supports": highlight.tags.definitionKeyword,
"from to selector": highlight.tags.keyword,
NamespaceName: highlight.tags.namespace,
KeyframeName: highlight.tags.labelName,
KeyframeRangeName: highlight.tags.operatorKeyword,
TagName: highlight.tags.tagName,
ClassName: highlight.tags.className,
PseudoClassName: highlight.tags.constant(highlight.tags.className),
IdName: highlight.tags.labelName,
"FeatureName PropertyName": highlight.tags.propertyName,
AttributeName: highlight.tags.attributeName,
NumberLiteral: highlight.tags.number,
KeywordQuery: highlight.tags.keyword,
UnaryQueryOp: highlight.tags.operatorKeyword,
"CallTag ValueName": highlight.tags.atom,
VariableName: highlight.tags.variableName,
Callee: highlight.tags.operatorKeyword,
Unit: highlight.tags.unit,
"UniversalSelector NestingSelector": highlight.tags.definitionOperator,
"MatchOp CompareOp": highlight.tags.compareOperator,
"ChildOp SiblingOp, LogicOp": highlight.tags.logicOperator,
BinOp: highlight.tags.arithmeticOperator,
Important: highlight.tags.modifier,
Comment: highlight.tags.blockComment,
ColorLiteral: highlight.tags.color,
"ParenthesizedContent StringLiteral": highlight.tags.string,
":": highlight.tags.punctuation,
"PseudoOp #": highlight.tags.derefOperator,
"; ,": highlight.tags.separator,
"( )": highlight.tags.paren,
"[ ]": highlight.tags.squareBracket,
"{ }": highlight.tags.brace
});
// This file was generated by lezer-generator. You probably shouldn't edit it.
const spec_callee = {__proto__:null,lang:38, "nth-child":38, "nth-last-child":38, "nth-of-type":38, "nth-last-of-type":38, dir:38, "host-context":38, if:84, url:124, "url-prefix":124, domain:124, regexp:124};
const spec_queryIdentifier = {__proto__:null,or:98, and:98, not:106, only:106, layer:170};
const spec_QueryCallee = {__proto__:null,selector:112, layer:166};
const spec_AtKeyword = {__proto__:null,"@import":162, "@media":174, "@charset":178, "@namespace":182, "@keyframes":188, "@supports":200, "@scope":204};
const spec_identifier = {__proto__:null,to:207};
const parser = lr.LRParser.deserialize({
version: 14,
states: "EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP'#Cn'#CnOOQO'#Dn'#DnOOQP,59V,59VO*hQ`O,59VO*mQ`O,59VOOQP'#Dq'#DqOOQP,5:[,5:[OOQO'#Ds'#DsO*rQpO,5:^O+]QaO,5:aO+sQaO,5:dOOQW'#DZ'#DZO,ZQhO'#DdO,xQhO'#FaO'tQhO'#DbO-WQ`O'#DhOOQW'#F['#F[O-]Q`O,5;SO-eQ`O'#DeOOQS-E8i-E8iOOQ['#Cs'#CsO-jQdO'#CtO.QQdO'#CzO.hQdO'#C}O/OQ!pO'#DPO1RQ!jO,5:jOOQO'#DU'#DUO*mQ`O'#DTO1cQ!nO'#FXO3`Q`O'#DVO3eQ`O'#DkOOQ['#FX'#FXO-`Q`O,5:pO3jQ!bO,5:rOOQS'#E['#E[O3rQ`O,5:tO3wQdO,5:tOOQO'#E_'#E_O4PQ`O,5:wO4UQhO,5:}O%_QdO'#DgOOQS,5;P,5;PO-eQ`O,5;PO4^QdO,5;PO4fQdO,5:gO4vQdO'#EtO5TQ`O,5;zO5TQ`O,5;zPOOO'#Ej'#EjP5`O&jO,58{POOO,58{,58{OOQP1G.n1G.nOOQP1G.q1G.qO*hQ`O1G.qO*mQ`O1G.qOOQP1G/v1G/vO5kQpO1G/xO5sQaO1G/{O6ZQaO1G/}O6qQaO1G0OO7XQaO,5;^OOQO-E8p-E8pOOQS1G.i1G.iO7cQ`O,5:fO7hQdO'#DoO7oQdO'#CrOOQP1G/x1G/xO&lQdO1G/xO7vQ!jO'#DZO8UQ!bO,59vO8^QhO,5:OOOQO'#F]'#F]O8XQ!bO,59zO'tQhO,59xO8fQhO'#EvO8sQ`O,5;{O9OQhO,59|O9uQhO'#DiOOQW,5:S,5:SOOQS1G0n1G0nOOQW,5:P,5:PO9|Q!fO'#FYOOQS'#FY'#FYOOQS'#Em'#EmO;^QdO,59`OOQ[,59`,59`O;tQdO,59fOOQ[,59f,59fO<[QdO,59iOOQ[,59i,59iOOQ[,59k,59kO&lQdO,59mO<rQhO'#EQOOQW'#EQ'#EQO=WQ`O1G0UO1[QhO1G0UOOQ[,59o,59oO'tQhO'#DXOOQ[,59q,59qO=]Q#tO,5:VOOQS1G0[1G0[OOQS1G0^1G0^OOQS1G0`1G0`O=hQ`O1G0`O=mQdO'#E`OOQS1G0c1G0cOOQS1G0i1G0iO=xQaO,5:RO-`Q`O1G0kOOQS1G0k1G0kO-eQ`O1G0kO>PQ!fO1G0ROOQO1G0R1G0ROOQO,5;`,5;`O>gQdO,5;`OOQO-E8r-E8rO>tQ`O1G1fPOOO-E8h-E8hPOOO1G.g1G.gOOQP7+$]7+$]OOQP7+%d7+%dO&lQdO7+%dOOQS1G0Q1G0QO?PQaO'#F_O?ZQ`O,5:ZO?`Q!fO'#ElO@^QdO'#FWO@hQ`O,59^O@mQ!bO7+%dO&lQdO1G/bO@uQhO1G/fOOQW1G/j1G/jOOQW1G/d1G/dOAWQhO,5;bOOQO-E8t-E8tOAfQhO'#DZOAtQhO'#F^OBPQ`O'#F^OBUQ`O,5:TOOQS-E8k-E8kOOQ[1G.z1G.zOOQ[1G/Q1G/QOOQ[1G/T1G/TOOQ[1G/X1G/XOBZQdO,5:lOOQS7+%p7+%pOB`Q`O7+%pOBeQhO'#DYOBmQ`O,59sO'tQhO,59sOOQ[1G/q1G/qOBuQ`O1G/qOOQS7+%z7+%zOBzQbO'#DPOOQO'#Eb'#EbOCYQ`O'#EaOOQO'#Ea'#EaOCeQ`O'#EwOCmQdO,5:zOOQS,5:z,5:zOOQ[1G/m1G/mOOQS7+&V7+&VO-`Q`O7+&VOCxQ!fO'#EsO&lQdO'#EsOEPQdO7+%mOOQO7+%m7+%mOOQO1G0z1G0zOEdQ!bO<<IOOElQdO'#EqOEvQ`O,5;yOOQP1G/u1G/uOOQS-E8j-E8jOFOQdO'#EpOFYQ`O,5;rOOQ]1G.x1G.xOOQP<<IO<<IOOFbQdO7+$|OOQO'#D]'#D]OFiQ!bO7+%QOFqQhO'#EoOF{Q`O,5;xO&lQdO,5;xOOQW1G/o1G/oOOQO'#ES'#ESOGTQ`O1G0WOOQS<<I[<<I[O&lQdO,59tOGnQhO1G/_OOQ[1G/_1G/_OGuQ`O1G/_OOQW-E8l-E8lOOQ[7+%]7+%]OOQO,5:{,5:{O=pQdO'#ExOCeQ`O,5;cOOQS,5;c,5;cOOQS-E8u-E8uOOQS1G0f1G0fOOQS<<Iq<<IqOG}Q!fO,5;_OOQS-E8q-E8qOOQO<<IX<<IXOOQPAN>jAN>jOIUQaO,5;]OOQO-E8o-E8oOI`QdO,5;[OOQO-E8n-E8nOOQW<<Hh<<HhOOQW<<Hl<<HlOIjQhO<<HlOI{QhO,5;ZOJWQ`O,5;ZOOQO-E8m-E8mOJ]QdO1G1dOBZQdO'#EuOJgQ`O7+%rOOQW7+%r7+%rOJoQ!bO1G/`OOQ[7+$y7+$yOJzQhO7+$yPKRQ`O'#EnOOQO,5;d,5;dOOQO-E8v-E8vOOQS1G0}1G0}OKWQ`OAN>WO&lQdO1G0uOK]Q`O7+'OOOQO,5;a,5;aOOQO-E8s-E8sOOQW<<I^<<I^OOQ[<<He<<HePOQW,5;Y,5;YOOQWG23rG23rOKeQdO7+&a",
stateData: "Kx~O#sOS#tQQ~OW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#oRO~OQiOW[OZ[O]TO`VOaVOi]OjWOmXO!jYO!mZO!saO!ybO!{cO!}dO#QeO#WfO#YgO#ohO~O#m$SP~P!dO#tmO~O#ooO~O]qO`rOarOjsOmtO!juO!mwO#nvO~OpzO!^xO~P$SOc!QO#o|O#p}O~O#o!RO~O#o!TO~OW[OZ[O]TO`VOaVOjWOmXO!jYO!mZO#oRO~OS!]Oe!YO!V![O!Y!`O#q!XOp$TP~Ok$TP~P&POQ!jOe!cOm!dOp!eOr!mOt!mOz!kO!`!lO#o!bO#p!hO#}!fO~Ot!qO!`!lO#o!pO~Ot!sO#o!sO~OS!]Oe!YO!V![O!Y!`O#q!XO~Oe!vOpzO#Z!xO~O]YX`YX`!pXaYXjYXmYXpYX!^YX!jYX!mYX#nYX~O`!zO~Ok!{O#m$SXo$SX~O#m$SXo$SX~P!dO#u#OO#v#OO#w#QO~Oc#UO#o|O#p}O~OpzO!^xO~Oo$SP~P!dOe#`O~Oe#aO~Ol#bO!h#cO~O]qO`rOarOjsOmtO~Op!ia!^!ia!j!ia!m!ia#n!iad!ia~P*zOp!la!^!la!j!la!m!la#n!lad!la~P*zOR#gOS!]Oe!YOr#gOt#gO!V![O!Y!`O#q#dO#}!fO~O!R#iO!^#jOk$TXp$TX~Oe#mO~Ok#oOpzO~Oe!vO~O]#rO`#rOd#uOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl#wO~P&lO]#rO`#rOi#rOj#rOk#rOo#yO~P&lOP#zOSsXesXksXvsX!VsX!YsX!usX!wsX#qsX!TsXQsX]sX`sXdsXisXjsXmsXpsXrsXtsXzsX!`sX#osX#psX#}sXlsXosX!^sX!qsX#msX~Ov#{O!u#|O!w#}Ok$TP~P'tOe#aOS#{Xk#{Xv#{X!V#{X!Y#{X!u#{X!w#{X#q#{XQ#{X]#{X`#{Xd#{Xi#{Xj#{Xm#{Xp#{Xr#{Xt#{Xz#{X!`#{X#o#{X#p#{X#}#{Xl#{Xo#{X!^#{X!q#{X#m#{X~Oe$RO~Oe$TO~Ok$VOv#{O~Ok$WO~Ot$XO!`!lO~Op$YO~OpzO!R#iO~OpzO#Z$`O~O!q$bOk!oa#m!oao!oa~P&lOk#hX#m#hXo#hX~P!dOk!{O#m$Sao$Sa~O#u#OO#v#OO#w$hO~Ol$jO!h$kO~Op!ii!^!ii!j!ii!m!ii#n!iid!ii~P*zOp!ki!^!ki!j!ki!m!ki#n!kid!ki~P*zOp!li!^!li!j!li!m!li#n!lid!li~P*zOp#fa!^#fa~P$SOo$lO~Od$RP~P%_Od#zP~P&lO`!PXd}X!R}X!T!PX~O`$sO!T$tO~Od$uO!R#iO~Ok#jXp#jX!^#jX~P'tO!^#jOk$Tap$Ta~O!R#iOk!Uap!Ua!^!Uad!Ua`!Ua~OS!]Oe!YO!V![O!Y!`O#q$yO~Od$QP~P9dOv#{OQ#|X]#|X`#|Xd#|Xe#|Xi#|Xj#|Xk#|Xm#|Xp#|Xr#|Xt#|Xz#|X!`#|X#o#|X#p#|X#}#|Xl#|Xo#|X~O]#rO`#rOd%OOi#rOj#rOk#rO~P&lO]#rO`#rOi#rOj#rOk#rOl%PO~P&lO]#rO`#rOi#rOj#rOk#rOo%QO~P&lOe%SOS!tXk!tX!V!tX!Y!tX#q!tX~Ok%TO~Od%YOt%ZO!a%ZO~Ok%[O~Oo%cO#o%^O#}%]O~Od%dO~P$SOv#{O!^%hO!q%jOk!oi#m!oio!oi~P&lOk#ha#m#hao#ha~P!dOk!{O#m$Sio$Si~O!^%mOd$RX~P$SOd%oO~Ov#{OQ#`Xd#`Xe#`Xm#`Xp#`Xr#`Xt#`Xz#`X!^#`X!`#`X#o#`X#p#`X#}#`X~O!^%qOd#zX~P&lOd%sO~Ol%tOv#{O~OR#gOr#gOt#gO#q%vO#}!fO~O!R#iOk#jap#ja!^#ja~O`!PXd}X!R}X!^}X~O!R#iO!^%xOd$QX~O`%zO~Od%{O~O#o%|O~Ok&OO~O`&PO!R#iO~Od&ROk&QO~Od&UO~OP#zOpsX!^sXdsX~O#}%]Op#TX!^#TX~OpzO!^&WO~Oo&[O#o%^O#}%]O~Ov#{OQ#gXe#gXk#gXm#gXp#gXr#gXt#gXz#gX!^#gX!`#gX!q#gX#m#gX#o#gX#p#gX#}#gXo#gX~O!^%hO!q&`Ok!oq#m!oqo!oq~P&lOl&aOv#{O~Od#eX!^#eX~P%_O!^%mOd$Ra~Od#dX!^#dX~P&lO!^%qOd#za~Od&fO~P&lOd&gO!T&hO~Od#cX!^#cX~P9dO!^%xOd$Qa~O]&mOd&oO~OS#bae#ba!V#ba!Y#ba#q#ba~Od&qO~PG]Od&qOk&rO~Ov#{OQ#gae#gak#gam#gap#gar#gat#gaz#ga!^#ga!`#ga!q#ga#m#ga#o#ga#p#ga#}#gao#ga~Od#ea!^#ea~P$SOd#da!^#da~P&lOR#gOr#gOt#gO#q%vO#}%]O~O!R#iOd#ca!^#ca~O`&xO~O!^%xOd$Qi~P&lO]&mOd&|O~Ov#{Od|ik|i~Od&}O~PG]Ok'OO~Od'PO~O!^%xOd$Qq~Od#cq!^#cq~P&lO#s!a#t#}]#}v!m~",
goto: "2h$UPPPPP$VP$YP$c$uP$cP%X$cPP%_PPP%e%o%oPPPPP%oPP%oP&]P%oP%o'W%oP't'w'}'}(^'}P'}P'}P'}'}P(m'}(yP(|PP)p)v$c)|$c*SP$cP$c$cP*Y*{+YP$YP+aP+dP$YP$YP$YP+j$YP+m+p+s+z$YP$YPP$YP,P,V,f,|-[-b-l-r-x.O.U.`.f.l.rPPPPPPPPPPP.x/R/w/z0|P1U1u2O2R2U2[RnQ_^OP`kz!{$dq[OPYZ`kuvwxz!v!{#`$d%mqSOPYZ`kuvwxz!v!{#`$d%mQpTR#RqQ!OVR#SrQ#S!QS$Q!i!jR$i#U!V!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'Q!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QU#g!Y$t&hU%`$Y%b&WR&V%_!V!iac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QR$S!kQ%W$RR&S%Xk!^]bf!Y![!g#i#j#m$P$R%X%xQ#e!YQ${#mQ%w$tQ&j%xR&w&hQ!ygQ#p!`Q$^!xR%f$`R#n!]!U!mac!c!d!e!z#a#c#t#v#x#{$a$k$p$s%h%i%q%u%z&P&d&l&x'QQ!qdR$X!rQ!PVR#TrQ#S!PR$i#TQ!SWR#VsQ!UXR#WtQ{UQ!wgQ#^yQ#o!_Q$U!nQ$[!uQ$_!yQ%e$^Q&Y%aQ&]%fR&v&XSjPzQ!}kQ$c!{R%k$dZiPkz!{$dR$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",
nodeNames: "⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to AtRule Styles",
maxTerm: 143,
nodeProps: [
["isolate", -2,5,36,""],
["openedBy", 20,"(",28,"[",31,"{"],
["closedBy", 21,")",29,"]",32,"}"]
],
propSources: [cssHighlighting],
skippedNodes: [0,5,106],
repeatNodeCount: 15,
tokenData: "JQ~R!YOX$qX^%i^p$qpq%iqr({rs-ust/itu6Wuv$qvw7Qwx7cxy9Qyz9cz{9h{|:R|}>t}!O?V!O!P?t!P!Q@]!Q![AU![!]BP!]!^B{!^!_C^!_!`DY!`!aDm!a!b$q!b!cEn!c!}$q!}#OG{#O#P$q#P#QH^#Q#R6W#R#o$q#o#pHo#p#q6W#q#rIQ#r#sIc#s#y$q#y#z%i#z$f$q$f$g%i$g#BY$q#BY#BZ%i#BZ$IS$q$IS$I_%i$I_$I|$q$I|$JO%i$JO$JT$q$JT$JU%i$JU$KV$q$KV$KW%i$KW&FU$q&FU&FV%i&FV;'S$q;'S;=`Iz<%lO$q`$tSOy%Qz;'S%Q;'S;=`%c<%lO%Q`%VS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q`%fP;=`<%l%Q~%nh#s~OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Q~'ah#s~!a`OX%QX^'Y^p%Qpq'Yqy%Qz#y%Q#y#z'Y#z$f%Q$f$g'Y$g#BY%Q#BY#BZ'Y#BZ$IS%Q$IS$I_'Y$I_$I|%Q$I|$JO'Y$JO$JT%Q$JT$JU'Y$JU$KV%Q$KV$KW'Y$KW&FU%Q&FU&FV'Y&FV;'S%Q;'S;=`%c<%lO%Qj)OUOy%Qz#]%Q#]#^)b#^;'S%Q;'S;=`%c<%lO%Qj)gU!a`Oy%Qz#a%Q#a#b)y#b;'S%Q;'S;=`%c<%lO%Qj*OU!a`Oy%Qz#d%Q#d#e*b#e;'S%Q;'S;=`%c<%lO%Qj*gU!a`Oy%Qz#c%Q#c#d*y#d;'S%Q;'S;=`%c<%lO%Qj+OU!a`Oy%Qz#f%Q#f#g+b#g;'S%Q;'S;=`%c<%lO%Qj+gU!a`Oy%Qz#h%Q#h#i+y#i;'S%Q;'S;=`%c<%lO%Qj,OU!a`Oy%Qz#T%Q#T#U,b#U;'S%Q;'S;=`%c<%lO%Qj,gU!a`Oy%Qz#b%Q#b#c,y#c;'S%Q;'S;=`%c<%lO%Qj-OU!a`Oy%Qz#h%Q#h#i-b#i;'S%Q;'S;=`%c<%lO%Qj-iS!qY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Q~-xWOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c<%lO-u~.gOt~~.jRO;'S-u;'S;=`.s;=`O-u~.vXOY-uZr-urs.bs#O-u#O#P.g#P;'S-u;'S;=`/c;=`<%l-u<%lO-u~/fP;=`<%l-uj/nYjYOy%Qz!Q%Q!Q![0^![!c%Q!c!i0^!i#T%Q#T#Z0^#Z;'S%Q;'S;=`%c<%lO%Qj0cY!a`Oy%Qz!Q%Q!Q![1R![!c%Q!c!i1R!i#T%Q#T#Z1R#Z;'S%Q;'S;=`%c<%lO%Qj1WY!a`Oy%Qz!Q%Q!Q![1v![!c%Q!c!i1v!i#T%Q#T#Z1v#Z;'S%Q;'S;=`%c<%lO%Qj1}YrY!a`Oy%Qz!Q%Q!Q![2m![!c%Q!c!i2m!i#T%Q#T#Z2m#Z;'S%Q;'S;=`%c<%lO%Qj2tYrY!a`Oy%Qz!Q%Q!Q![3d![!c%Q!c!i3d!i#T%Q#T#Z3d#Z;'S%Q;'S;=`%c<%lO%Qj3iY!a`Oy%Qz!Q%Q!Q![4X![!c%Q!c!i4X!i#T%Q#T#Z4X#Z;'S%Q;'S;=`%c<%lO%Qj4`YrY!a`Oy%Qz!Q%Q!Q![5O![!c%Q!c!i5O!i#T%Q#T#Z5O#Z;'S%Q;'S;=`%c<%lO%Qj5TY!a`Oy%Qz!Q%Q!Q![5s![!c%Q!c!i5s!i#T%Q#T#Z5s#Z;'S%Q;'S;=`%c<%lO%Qj5zSrY!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qd6ZUOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qd6tS!hS!a`Oy%Qz;'S%Q;'S;=`%c<%lO%Qb7VSZQOy%Qz;'S%Q;'S;=`%c<%lO%Q~7fWOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z<%lO7c~8RRO;'S7c;'S;=`8[;=`O7c~8_XOY7cZw7cwx.bx#O7c#O#P8O#P;'S7c;'S;=`8z;=`<%l7c<%lO7c~8}P;=`<%l7cj9VSeYOy%Qz;'S%Q;'S;=`%c<%lO%Q~9hOd~n9oUWQvWOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Qj:YWvW!mQOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj:wU!a`Oy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Qj;bY!a`#}YOy%Qz!Q%Q!Q![;Z![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj<VY!a`Oy%Qz{%Q{|<u|}%Q}!O<u!O!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj<zU!a`Oy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj=eU!a`#}YOy%Qz!Q%Q!Q![=^![;'S%Q;'S;=`%c<%lO%Qj>O[!a`#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%Qj>yS!^YOy%Qz;'S%Q;'S;=`%c<%lO%Qj?[WvWOy%Qz!O%Q!O!P:r!P!Q%Q!Q![=w![;'S%Q;'S;=`%c<%lO%Qj?yU]YOy%Qz!Q%Q!Q![;Z![;'S%Q;'S;=`%c<%lO%Q~@bTvWOy%Qz{@q{;'S%Q;'S;=`%c<%lO%Q~@xS!a`#t~Oy%Qz;'S%Q;'S;=`%c<%lO%QjAZ[#}YOy%Qz!O%Q!O!P;Z!P!Q%Q!Q![=w![!g%Q!g!h<Q!h#X%Q#X#Y<Q#Y;'S%Q;'S;=`%c<%lO%QjBUU`YOy%Qz![%Q![!]Bh!];'S%Q;'S;=`%c<%lO%QbBoSaQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjCQSkYOy%Qz;'S%Q;'S;=`%c<%lO%QhCcU!TWOy%Qz!_%Q!_!`Cu!`;'S%Q;'S;=`%c<%lO%QhC|S!TW!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QlDaS!TW!hSOy%Qz;'S%Q;'S;=`%c<%lO%QjDtV!jQ!TWOy%Qz!_%Q!_!`Cu!`!aEZ!a;'S%Q;'S;=`%c<%lO%QbEbS!jQ!a`Oy%Qz;'S%Q;'S;=`%c<%lO%QjEqYOy%Qz}%Q}!OFa!O!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjFfW!a`Oy%Qz!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjGV[iY!a`Oy%Qz}%Q}!OGO!O!Q%Q!Q![GO![!c%Q!c!}GO!}#T%Q#T#oGO#o;'S%Q;'S;=`%c<%lO%QjHQSmYOy%Qz;'S%Q;'S;=`%c<%lO%QnHcSl^Oy%Qz;'S%Q;'S;=`%c<%lO%QjHtSpYOy%Qz;'S%Q;'S;=`%c<%lO%QjIVSoYOy%Qz;'S%Q;'S;=`%c<%lO%QfIhU!mQOy%Qz!_%Q!_!`6m!`;'S%Q;'S;=`%c<%lO%Q`I}P;=`<%l$q",
tokenizers: [descendant, unitToken, identifiers, queryIdentifiers, 1, 2, 3, 4, new lr.LocalTokenGroup("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~", 28, 129)],
topRules: {"StyleSheet":[0,6],"Styles":[1,105]},
specialized: [{term: 124, get: (value) => spec_callee[value] || -1},{term: 125, get: (value) => spec_queryIdentifier[value] || -1},{term: 4, get: (value) => spec_QueryCallee[value] || -1},{term: 25, get: (value) => spec_AtKeyword[value] || -1},{term: 123, get: (value) => spec_identifier[value] || -1}],
tokenPrec: 1963
});
exports.parser = parser;
@@ -0,0 +1,14 @@
'use strict';
var define = require('define-properties');
var getPolyfill = require('./polyfill');
module.exports = function shimArrayPrototypeIncludes() {
var polyfill = getPolyfill();
define(
Array.prototype,
{ includes: polyfill },
{ includes: function () { return Array.prototype.includes !== polyfill; } }
);
return polyfill;
};
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more