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,13 @@
/** @type {Record<'help' | 'version', import('./flag-types.d.ts').BooleanFlag>} */
export const defaultFlags = {
help: {
'default': false,
description: 'Prints this help and exits.',
type: 'boolean',
},
version: {
'default': false,
description: 'Prints current version and exits.',
type: 'boolean',
},
};
@@ -0,0 +1,152 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _iterationDecorator = _interopRequireDefault(require("./util/iterationDecorator"));
var _rolesMap = _interopRequireDefault(require("./rolesMap"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
var elementRoles = [];
var keys = _rolesMap.default.keys();
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var role = _rolesMap.default.get(key);
if (role) {
var concepts = [].concat(role.baseConcepts, role.relatedConcepts);
var _loop = function _loop() {
var relation = concepts[k];
if (relation.module === 'HTML') {
var concept = relation.concept;
if (concept) {
var elementRoleRelation = elementRoles.filter(function (relation) {
return ariaRoleRelationConceptEquals(relation[0], concept);
})[0];
var roles;
if (elementRoleRelation) {
roles = elementRoleRelation[1];
} else {
roles = [];
}
var isUnique = true;
for (var _i = 0; _i < roles.length; _i++) {
if (roles[_i] === key) {
isUnique = false;
break;
}
}
if (isUnique) {
roles.push(key);
}
if (!elementRoleRelation) {
elementRoles.push([concept, roles]);
}
}
}
};
for (var k = 0; k < concepts.length; k++) {
_loop();
}
}
}
var elementRoleMap = {
entries: function entries() {
return elementRoles;
},
forEach: function forEach(fn) {
var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
for (var _i2 = 0, _elementRoles = elementRoles; _i2 < _elementRoles.length; _i2++) {
var _elementRoles$_i = _slicedToArray(_elementRoles[_i2], 2),
_key = _elementRoles$_i[0],
values = _elementRoles$_i[1];
fn.call(thisArg, values, _key, elementRoles);
}
},
get: function get(key) {
var item = elementRoles.filter(function (tuple) {
return key.name === tuple[0].name && ariaRoleRelationConceptAttributeEquals(key.attributes, tuple[0].attributes);
})[0];
return item && item[1];
},
has: function has(key) {
return !!elementRoleMap.get(key);
},
keys: function keys() {
return elementRoles.map(function (_ref) {
var _ref2 = _slicedToArray(_ref, 1),
key = _ref2[0];
return key;
});
},
values: function values() {
return elementRoles.map(function (_ref3) {
var _ref4 = _slicedToArray(_ref3, 2),
values = _ref4[1];
return values;
});
}
};
function ariaRoleRelationConceptEquals(a, b) {
return a.name === b.name && ariaRoleRelationConstraintsEquals(a.constraints, b.constraints) && ariaRoleRelationConceptAttributeEquals(a.attributes, b.attributes);
}
function ariaRoleRelationConstraintsEquals(a, b) {
if (a === undefined && b !== undefined) {
return false;
}
if (a !== undefined && b === undefined) {
return false;
}
if (a !== undefined && b !== undefined) {
if (a.length !== b.length) {
return false;
}
for (var _i3 = 0; _i3 < a.length; _i3++) {
if (a[_i3] !== b[_i3]) {
return false;
}
}
}
return true;
}
function ariaRoleRelationConceptAttributeEquals(a, b) {
if (a === undefined && b !== undefined) {
return false;
}
if (a !== undefined && b === undefined) {
return false;
}
if (a !== undefined && b !== undefined) {
if (a.length !== b.length) {
return false;
}
for (var _i4 = 0; _i4 < a.length; _i4++) {
if (a[_i4].name !== b[_i4].name || a[_i4].value !== b[_i4].value) {
return false;
}
if (a[_i4].constraints === undefined && b[_i4].constraints !== undefined) {
return false;
}
if (a[_i4].constraints !== undefined && b[_i4].constraints === undefined) {
return false;
}
if (a[_i4].constraints !== undefined && b[_i4].constraints !== undefined) {
if (a[_i4].constraints.length !== b[_i4].constraints.length) {
return false;
}
for (var j = 0; j < a[_i4].constraints.length; j++) {
if (a[_i4].constraints[j] !== b[_i4].constraints[j]) {
return false;
}
}
}
}
}
return true;
}
var _default = exports.default = (0, _iterationDecorator.default)(elementRoleMap, elementRoleMap.entries());
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = getEmpty;
var _lang = require("../common/lang");
var _empty = _interopRequireDefault(require("./data/empty"));
var _default = _interopRequireDefault(require("./data/default"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file 获取空的ttf对象
* @author mengke01(kekee000@gmail.com)
*/
function getEmpty() {
var ttf = (0, _lang.clone)(_empty.default);
Object.assign(ttf.name, _default.default.name);
ttf.head.created = ttf.head.modified = Date.now();
return ttf;
}
@@ -0,0 +1,50 @@
# TypeScript
[![CI](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/TypeScript/actions/workflows/ci.yml)
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript)
[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/microsoft/TypeScript/badge)](https://securityscorecards.dev/viewer/?uri=github.com/microsoft/TypeScript)
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript).
Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/).
## Installing
For the latest stable version:
```bash
npm install -D typescript
```
For our nightly builds:
```bash
npm install -D typescript@next
```
## Contribute
There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md) to TypeScript.
* [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
* Review the [source code changes](https://github.com/microsoft/TypeScript/pulls).
* Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript).
* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript).
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter.
* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md).
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com)
with any additional questions or comments.
## Documentation
* [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html)
* [Programming handbook](https://www.typescriptlang.org/docs/handbook/intro.html)
* [Homepage](https://www.typescriptlang.org/)
## Roadmap
For details on our planned features and future direction, please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap).
@@ -0,0 +1,268 @@
# tsconfig-paths
[![npm version][version-image]][version-url]
[![build][build-image]][build-url]
[![Coverage Status][codecov-image]][codecov-url]
[![MIT license][license-image]][license-url]
[![code style: prettier][prettier-image]][prettier-url]
Use this to load modules whose location is specified in the `paths` section of `tsconfig.json`. Both loading at run-time and via API are supported.
Typescript by default mimics the Node.js runtime resolution strategy of modules. But it also allows the use of [path mapping](https://www.typescriptlang.org/docs/handbook/module-resolution.html) which allows arbitrary module paths (that doesn't start with "/" or ".") to be specified and mapped to physical paths in the filesystem. The typescript compiler can resolve these paths from `tsconfig` so it will compile OK. But if you then try to execute the compiled files with node (or ts-node), it will only look in the `node_modules` folders all the way up to the root of the filesystem and thus will not find the modules specified by `paths` in `tsconfig`.
If you require this package's `tsconfig-paths/register` module it will read the `paths` from `tsconfig.json` and convert node's module loading calls into to physical file paths that node can load.
## How to install
```
yarn add --dev tsconfig-paths
```
or
```
npm install --save-dev tsconfig-paths
```
## How to use
### With node
`node -r tsconfig-paths/register main.js`
If `process.env.TS_NODE_BASEURL` is set it will override the value of `baseUrl` in tsconfig.json:
`TS_NODE_BASEURL=./dist node -r tsconfig-paths/register main.js`
### With ts-node
`ts-node -r tsconfig-paths/register main.ts`
If `process.env.TS_NODE_PROJECT` is set it will be used to resolved tsconfig.json
### With webpack
For webpack please use the [tsconfig-paths-webpack-plugin](https://github.com/dividab/tsconfig-paths-webpack-plugin).
### With mocha and ts-node
As of Mocha >= 4.0.0 the `--compiler` was [deprecated](https://github.com/mochajs/mocha/wiki/compilers-deprecation). Instead `--require` should be used. You also have to specify a glob that includes `.ts` files because mocha looks after files with `.js` extension by default.
```bash
mocha -r ts-node/register -r tsconfig-paths/register "test/**/*.ts"
```
### With other commands
As long as the command has something similar to a `--require` option that can load a module before it starts, tsconfig-paths should be able to work with it.
### With `ts-node` and VSCode
The following is an example configuration for the `.vscode/launch.json`.
```js
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Functions",
"request": "launch",
"type": "node",
"runtimeArgs": [
"-r",
"${workspaceFolder}/functions/node_modules/ts-node/register",
"-r",
"${workspaceFolder}/functions/node_modules/tsconfig-paths/register"
],
"args": ["${workspaceFolder}/functions/src/index.ts"],
"cwd": "${workspaceFolder}",
"protocol": "inspector",
"env": {
"NODE_ENV": "development",
"TS_NODE_PROJECT": "${workspaceFolder}/functions/tsconfig.json"
},
"outFiles": ["${workspaceFolder}/functions/lib/**/*.js"]
}
]
}
```
## Bootstrapping with explicit params
If you want more granular control over tsconfig-paths you can bootstrap it. This can be useful if you for instance have compiled with `tsc` to another directory where `tsconfig.json` doesn't exists.
For example, create a wrapper script called `tsconfig-paths-bootstrap.js` with the contents below:
```javascript
const tsConfig = require("./tsconfig.json");
const tsConfigPaths = require("tsconfig-paths");
const baseUrl = "./"; // Either absolute or relative path. If relative it's resolved to current working directory.
const cleanup = tsConfigPaths.register({
baseUrl,
paths: tsConfig.compilerOptions.paths,
});
// When path registration is no longer needed
cleanup();
```
Then run with:
`node -r ./tsconfig-paths-bootstrap.js main.js`
## Configuration Options
You can set options by passing them before the script path, via programmatic usage or via environment variables.
```bash
ts-node --project customLocation/tsconfig.json -r tsconfig-paths/register "test/**/*.ts"
```
### CLI and Programmatic Options
_Environment variable denoted in parentheses._
- `-P, --project [path]` Path to TypeScript JSON project file (`TS_NODE_PROJECT`)
## Config loading process
1. Use explicit params passed to register
2. Use `process.env.TS_NODE_PROJECT` to resolve tsConfig.json and the specified baseUrl and paths.
3. Resolves tsconfig.json from current working directory and the specified baseUrl and paths.
## Programmatic use
The public API consists of these functions:
- [register](#register)
- [loadConfig](#loadConfig)
- [createMatchPath](#createMatchPath) / [createMatchPathAsync](#createMatchPathAsync)
- [matchFromAbsolutePaths](#matchFromAbsolutePaths) / [matchFromAbsolutePathsAsync](#matchFromAbsolutePathsAsync)
### register
```typescript
export interface ExplicitParams {
baseUrl: string;
paths: { [key: string]: Array<string> };
mainFields?: Array<string>;
addMatchAll?: boolean;
}
/**
* Installs a custom module load function that can adhere to paths in tsconfig.
*/
export function register(explicitParams: ExplicitParams): () => void;
```
This function will patch the node's module loading so it will look for modules in paths specified by tsconfig.json.
A function is returned for you to reinstate Node's original module loading.
### loadConfig
```typescript
export function loadConfig(cwd: string = process.cwd()): ConfigLoaderResult;
export type ConfigLoaderResult =
| ConfigLoaderSuccessResult
| ConfigLoaderFailResult;
export interface ConfigLoaderSuccessResult {
resultType: "success";
absoluteBaseUrl: string;
paths: { [key: string]: Array<string> };
}
export interface ConfigLoaderFailResult {
resultType: "failed";
message: string;
}
```
This function loads the tsconfig.json. It will start searching from the specified `cwd` directory. Passing the tsconfig.json file directly instead of a directory also works.
### createMatchPath
```typescript
/**
* Function that can match a path
*/
export interface MatchPath {
(
requestedModule: string,
readJson?: Filesystem.ReadJsonSync,
fileExists?: (name: string) => boolean,
extensions?: ReadonlyArray<string>
): string | undefined;
}
/**
* Creates a function that can resolve paths according to tsconfig paths property.
* @param absoluteBaseUrl Absolute version of baseUrl as specified in tsconfig.
* @param paths The paths as specified in tsconfig.
* @param mainFields A list of package.json field names to try when resolving module files.
* @param addMatchAll Add a match-all "*" rule if none is present
* @returns a function that can resolve paths.
*/
export function createMatchPath(
absoluteBaseUrl: string,
paths: { [key: string]: Array<string> },
mainFields: string[] = ["main"],
addMatchAll: boolean = true
): MatchPath {
```
The `createMatchPath` function will create a function that can match paths. It accepts `baseUrl` and `paths` directly as they are specified in tsconfig and will handle resolving paths to absolute form. The created function has the signature specified by the type `MatchPath` above.
### matchFromAbsolutePaths
```typescript
/**
* Finds a path from tsconfig that matches a module load request.
* @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form.
* @param requestedModule The required module name.
* @param readJson Function that can read json from a path (useful for testing).
* @param fileExists Function that checks for existence of a file at a path (useful for testing).
* @param extensions File extensions to probe for (useful for testing).
* @param mainFields A list of package.json field names to try when resolving module files.
* @returns the found path, or undefined if no path was found.
*/
export function matchFromAbsolutePaths(
absolutePathMappings: ReadonlyArray<MappingEntry.MappingEntry>,
requestedModule: string,
readJson: Filesystem.ReadJsonSync = Filesystem.readJsonFromDiskSync,
fileExists: Filesystem.FileExistsSync = Filesystem.fileExistsSync,
extensions: Array<string> = Object.keys(require.extensions),
mainFields: string[] = ["main"]
): string | undefined {
```
This function is lower level and requires that the paths as already been resolved to absolute form and sorted in correct order into an array.
### createMatchPathAsync
This is the async version of `createMatchPath`. It has the same signature but with a callback parameter for the result.
### matchFromAbsolutePathsAsync
This is the async version of `matchFromAbsolutePaths`. It has the same signature but with a callback parameter for the result.
## How to publish
```
yarn version --patch
yarn version --minor
yarn version --major
```
[version-image]: https://img.shields.io/npm/v/tsconfig-paths.svg?style=flat
[version-url]: https://www.npmjs.com/package/tsconfig-paths
[build-image]: https://github.com/dividab/tsconfig-paths/workflows/CI/badge.svg
[build-url]: https://github.com/dividab/tsconfig-paths/actions/workflows/ci.yml?query=branch%3Amaster
[codecov-image]: https://codecov.io/gh/dividab/tsconfig-paths/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/dividab/tsconfig-paths
[license-image]: https://img.shields.io/github/license/dividab/tsconfig-paths.svg?style=flat
[license-url]: https://opensource.org/licenses/MIT
[prettier-image]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg
[prettier-url]: https://github.com/prettier/prettier
@@ -0,0 +1 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_si=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"si",weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),months:"දුරුතු_නවම්_මැදින්_බක්_වෙසක්_පොසොන්_ඇසළ_නිකිණි_බිනර_වප්_ඉල්_උඳුවප්".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),monthsShort:"දුරු_නව_මැදි_බක්_වෙස_පොසො_ඇස_නිකි_බින_වප්_ඉල්_උඳු".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),ordinal:function(_){return _},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:ss"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"විනාඩිය",mm:"විනාඩි %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"}};return t.default.locale(d,null,!0),d}));
@@ -0,0 +1,48 @@
/*
* 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.
*/ /**
* Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest valid step.
*/ function $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, min = -Infinity, max = Infinity) {
let newValue = Math.min(Math.max(value, min), max);
return newValue;
}
function $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {
let roundedValue = value;
let stepString = step.toString();
let pointIndex = stepString.indexOf('.');
let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;
if (precision > 0) {
let pow = Math.pow(10, precision);
roundedValue = Math.round(roundedValue * pow) / pow;
}
return roundedValue;
}
function $9446cca9a3875146$export$cb6e0bb50bc19463(value, min, max, step) {
min = Number(min);
max = Number(max);
let remainder = (value - (isNaN(min) ? 0 : min)) % step;
let snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);
if (!isNaN(min)) {
if (snappedValue < min) snappedValue = min;
else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;
} else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(max / step, step)) * step;
// correct floating point behavior by rounding to step precision
snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(snappedValue, step);
return snappedValue;
}
function $9446cca9a3875146$export$b6268554fba451f(value, digits, base = 10) {
const pow = Math.pow(base, digits);
return Math.round(value * pow) / pow;
}
export {$9446cca9a3875146$export$7d15b64cf5a3a4c4 as clamp, $9446cca9a3875146$export$e1a7b8e69ef6c52f as roundToStepPrecision, $9446cca9a3875146$export$cb6e0bb50bc19463 as snapValueToStep, $9446cca9a3875146$export$b6268554fba451f as toFixedNumber};
//# sourceMappingURL=number.module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"getResolvedValueNodeBinding.js","sourceRoot":"","sources":["../../../../src/resolution/calculations/getResolvedValueNodeBinding.ts"],"names":[],"mappings":";;AAGA,kEAIC;AAJD,SAAgB,2BAA2B,CACzC,IAAgE;IAEhE,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC"}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('forEach', require('../forEach'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,3 @@
const floatRegex = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
export { floatRegex };
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const vitest_1 = require("vitest");
const __1 = require("../..");
(0, vitest_1.describe)('Issue 1518', () => {
(0, vitest_1.it)('should not throw on deactivating undefined singleton values', async () => {
const container = new __1.Container();
const symbol = Symbol.for('foo');
container.bind(symbol).toConstantValue(undefined);
console.log(container.get(symbol));
await container.unbind('foo');
(0, vitest_1.expect)(() => { }).not.toThrow();
});
});
//# sourceMappingURL=issue_1518.test.js.map
@@ -0,0 +1,300 @@
"use client";
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/navbar.tsx
var navbar_exports = {};
__export(navbar_exports, {
default: () => navbar_default
});
module.exports = __toCommonJS(navbar_exports);
var import_system3 = require("@heroui/system");
var import_react_utils4 = require("@heroui/react-utils");
var import_framer_motion2 = require("framer-motion");
var import_utils4 = require("@react-aria/utils");
// src/navbar-transitions.ts
var import_framer_utils = require("@heroui/framer-utils");
var hideOnScrollVariants = {
visible: {
y: 0,
transition: {
ease: import_framer_utils.TRANSITION_EASINGS.easeOut
}
},
hidden: {
y: "-100%",
transition: {
ease: import_framer_utils.TRANSITION_EASINGS.easeIn
}
}
};
// src/use-navbar.ts
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_react_utils = require("@heroui/react-utils");
var import_shared_utils = require("@heroui/shared-utils");
var import_react = require("react");
var import_utils = require("@react-aria/utils");
var import_use_scroll_position = require("@heroui/use-scroll-position");
var import_utils2 = require("@react-stately/utils");
var import_overlays = require("@react-aria/overlays");
function useNavbar(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.navbar.variantKeys);
const {
ref,
as,
parentRef,
height = "4rem",
shouldHideOnScroll = false,
disableScrollHandler = false,
shouldBlockScroll = true,
onScrollPositionChange,
isMenuOpen: isMenuOpenProp,
isMenuDefaultOpen,
onMenuOpenChange = () => {
},
motionProps,
className,
classNames,
...otherProps
} = props;
const Component = as || "nav";
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const domRef = (0, import_react_utils.useDOMRef)(ref);
const prevWidth = (0, import_react.useRef)(0);
const navHeight = (0, import_react.useRef)(0);
const [isHidden, setIsHidden] = (0, import_react.useState)(false);
const handleMenuOpenChange = (0, import_react.useCallback)(
(isOpen) => {
onMenuOpenChange(isOpen || false);
},
[onMenuOpenChange]
);
const [isMenuOpen, setIsMenuOpen] = (0, import_utils2.useControlledState)(
isMenuOpenProp,
isMenuDefaultOpen != null ? isMenuDefaultOpen : false,
handleMenuOpenChange
);
const updateWidth = () => {
if (domRef.current) {
const width = domRef.current.offsetWidth;
if (width !== prevWidth.current) {
prevWidth.current = width;
}
}
};
(0, import_overlays.usePreventScroll)({
isDisabled: !(shouldBlockScroll && isMenuOpen)
});
(0, import_utils.useResizeObserver)({
ref: domRef,
onResize: () => {
var _a2;
const currentWidth = (_a2 = domRef.current) == null ? void 0 : _a2.offsetWidth;
const scrollWidth = window.innerWidth - document.documentElement.clientWidth;
if (currentWidth && currentWidth + scrollWidth == prevWidth.current) {
return;
}
if (currentWidth !== prevWidth.current) {
updateWidth();
setIsMenuOpen(false);
}
}
});
(0, import_react.useEffect)(() => {
var _a2;
updateWidth();
navHeight.current = ((_a2 = domRef.current) == null ? void 0 : _a2.offsetHeight) || 0;
}, []);
const slots = (0, import_react.useMemo)(
() => (0, import_theme.navbar)({
...variantProps,
disableAnimation,
hideOnScroll: shouldHideOnScroll
}),
[(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation, shouldHideOnScroll]
);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
(0, import_use_scroll_position.useScrollPosition)({
elementRef: parentRef,
isEnabled: shouldHideOnScroll || !disableScrollHandler,
callback: ({ prevPos, currPos }) => {
onScrollPositionChange == null ? void 0 : onScrollPositionChange(currPos.y);
if (shouldHideOnScroll) {
setIsHidden((prev) => {
const next = currPos.y > prevPos.y && currPos.y > navHeight.current;
return next !== prev ? next : prev;
});
}
}
});
const getBaseProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(otherProps, props2),
"data-hidden": (0, import_shared_utils.dataAttr)(isHidden),
"data-menu-open": (0, import_shared_utils.dataAttr)(isMenuOpen),
ref: domRef,
className: slots.base({ class: (0, import_shared_utils.clsx)(baseStyles, props2 == null ? void 0 : props2.className) }),
style: {
"--navbar-height": typeof height === "number" ? `${height}px` : height,
...otherProps == null ? void 0 : otherProps.style,
...props2 == null ? void 0 : props2.style
}
});
const getWrapperProps = (props2 = {}) => ({
...props2,
"data-menu-open": (0, import_shared_utils.dataAttr)(isMenuOpen),
className: slots.wrapper({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.wrapper, props2 == null ? void 0 : props2.className) })
});
return {
Component,
slots,
domRef,
height,
isHidden,
disableAnimation,
shouldHideOnScroll,
isMenuOpen,
classNames,
setIsMenuOpen,
motionProps,
getBaseProps,
getWrapperProps
};
}
// src/navbar-context.ts
var import_react_utils2 = require("@heroui/react-utils");
var [NavbarProvider, useNavbarContext] = (0, import_react_utils2.createContext)({
name: "NavbarContext",
strict: true,
errorMessage: "useNavbarContext: `context` is undefined. Seems you forgot to wrap component within <Navbar />"
});
// src/navbar-menu.tsx
var import_system2 = require("@heroui/system");
var import_react_utils3 = require("@heroui/react-utils");
var import_shared_utils2 = require("@heroui/shared-utils");
var import_framer_motion = require("framer-motion");
var import_utils3 = require("@react-aria/utils");
var import_overlays2 = require("@react-aria/overlays");
// src/navbar-menu-transitions.ts
var menuVariants = {
enter: {
height: "calc(100vh - var(--navbar-height))",
transition: {
duration: 0.3,
easings: "easeOut"
}
},
exit: {
height: 0,
transition: {
duration: 0.25,
easings: "easeIn"
}
}
};
// src/navbar-menu.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var domAnimation = () => import("@heroui/dom-animation").then((res) => res.default);
var NavbarMenu = (0, import_system2.forwardRef)((props, ref) => {
var _a, _b;
const { className, children, portalContainer, motionProps, style, ...otherProps } = props;
const domRef = (0, import_react_utils3.useDOMRef)(ref);
const { slots, isMenuOpen, height, disableAnimation, classNames } = useNavbarContext();
const styles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.menu, className);
if (disableAnimation) {
if (!isMenuOpen)
return null;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.Overlay, { portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"ul",
{
ref: domRef,
className: (_a = slots.menu) == null ? void 0 : _a.call(slots, { class: styles }),
"data-open": (0, import_shared_utils2.dataAttr)(isMenuOpen),
style: {
"--navbar-height": typeof height === "number" ? `${height}px` : height
},
...otherProps,
children
}
) });
}
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { mode: "wait", children: isMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.Overlay, { portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LazyMotion, { features: domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_framer_motion.m.ul,
{
ref: domRef,
layoutScroll: true,
animate: "enter",
className: (_b = slots.menu) == null ? void 0 : _b.call(slots, { class: styles }),
"data-open": (0, import_shared_utils2.dataAttr)(isMenuOpen),
exit: "exit",
initial: "exit",
style: {
"--navbar-height": typeof height === "number" ? `${height}px` : height,
...style
},
variants: menuVariants,
...(0, import_utils3.mergeProps)(motionProps, otherProps),
children
}
) }) }) : null });
});
NavbarMenu.displayName = "HeroUI.NavbarMenu";
var navbar_menu_default = NavbarMenu;
// src/navbar.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var domAnimation2 = () => import("@heroui/dom-animation").then((res) => res.default);
var Navbar = (0, import_system3.forwardRef)((props, ref) => {
const { children, ...otherProps } = props;
const context = useNavbar({ ...otherProps, ref });
const Component = context.Component;
const [childrenWithoutMenu, menu] = (0, import_react_utils4.pickChildren)(children, navbar_menu_default);
const content = /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("header", { ...context.getWrapperProps(), children: childrenWithoutMenu }),
menu
] });
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(NavbarProvider, { value: context, children: context.shouldHideOnScroll ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_framer_motion2.LazyMotion, { features: domAnimation2, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
import_framer_motion2.m.nav,
{
animate: context.isHidden ? "hidden" : "visible",
initial: false,
variants: hideOnScrollVariants,
...(0, import_utils4.mergeProps)(context.getBaseProps(), context.motionProps),
children: content
}
) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, { ...context.getBaseProps(), children: content }) });
});
Navbar.displayName = "HeroUI.Navbar";
var navbar_default = Navbar;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,6 @@
module.exports = {
"dismiss": `Odstranit`
};
//# sourceMappingURL=cs-CZ.main.js.map
@@ -0,0 +1,401 @@
'use strict'
const { describe, it } = require('mocha')
const assert = require('assert')
const processRelease = require('../lib/process-release')
describe('process-release', function () {
it('test process release - process.version = 0.8.20', function () {
var release = processRelease([], { opts: {} }, 'v0.8.20', null)
assert.strictEqual(release.semver.version, '0.8.20')
delete release.semver
assert.deepStrictEqual(release, {
version: '0.8.20',
name: 'node',
baseUrl: 'https://nodejs.org/dist/v0.8.20/',
tarballUrl: 'https://nodejs.org/dist/v0.8.20/node-v0.8.20.tar.gz',
shasumsUrl: 'https://nodejs.org/dist/v0.8.20/SHASUMS256.txt',
versionDir: '0.8.20',
ia32: { libUrl: 'https://nodejs.org/dist/v0.8.20/node.lib', libPath: 'node.lib' },
x64: { libUrl: 'https://nodejs.org/dist/v0.8.20/x64/node.lib', libPath: 'x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/dist/v0.8.20/arm64/node.lib', libPath: 'arm64/node.lib' }
})
})
it('test process release - process.version = 0.10.21', function () {
var release = processRelease([], { opts: {} }, 'v0.10.21', null)
assert.strictEqual(release.semver.version, '0.10.21')
delete release.semver
assert.deepStrictEqual(release, {
version: '0.10.21',
name: 'node',
baseUrl: 'https://nodejs.org/dist/v0.10.21/',
tarballUrl: 'https://nodejs.org/dist/v0.10.21/node-v0.10.21.tar.gz',
shasumsUrl: 'https://nodejs.org/dist/v0.10.21/SHASUMS256.txt',
versionDir: '0.10.21',
ia32: { libUrl: 'https://nodejs.org/dist/v0.10.21/node.lib', libPath: 'node.lib' },
x64: { libUrl: 'https://nodejs.org/dist/v0.10.21/x64/node.lib', libPath: 'x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/dist/v0.10.21/arm64/node.lib', libPath: 'arm64/node.lib' }
})
})
// prior to -headers.tar.gz
it('test process release - process.version = 0.12.9', function () {
var release = processRelease([], { opts: {} }, 'v0.12.9', null)
assert.strictEqual(release.semver.version, '0.12.9')
delete release.semver
assert.deepStrictEqual(release, {
version: '0.12.9',
name: 'node',
baseUrl: 'https://nodejs.org/dist/v0.12.9/',
tarballUrl: 'https://nodejs.org/dist/v0.12.9/node-v0.12.9.tar.gz',
shasumsUrl: 'https://nodejs.org/dist/v0.12.9/SHASUMS256.txt',
versionDir: '0.12.9',
ia32: { libUrl: 'https://nodejs.org/dist/v0.12.9/node.lib', libPath: 'node.lib' },
x64: { libUrl: 'https://nodejs.org/dist/v0.12.9/x64/node.lib', libPath: 'x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/dist/v0.12.9/arm64/node.lib', libPath: 'arm64/node.lib' }
})
})
// prior to -headers.tar.gz
it('test process release - process.version = 0.10.41', function () {
var release = processRelease([], { opts: {} }, 'v0.10.41', null)
assert.strictEqual(release.semver.version, '0.10.41')
delete release.semver
assert.deepStrictEqual(release, {
version: '0.10.41',
name: 'node',
baseUrl: 'https://nodejs.org/dist/v0.10.41/',
tarballUrl: 'https://nodejs.org/dist/v0.10.41/node-v0.10.41.tar.gz',
shasumsUrl: 'https://nodejs.org/dist/v0.10.41/SHASUMS256.txt',
versionDir: '0.10.41',
ia32: { libUrl: 'https://nodejs.org/dist/v0.10.41/node.lib', libPath: 'node.lib' },
x64: { libUrl: 'https://nodejs.org/dist/v0.10.41/x64/node.lib', libPath: 'x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/dist/v0.10.41/arm64/node.lib', libPath: 'arm64/node.lib' }
})
})
// has -headers.tar.gz
it('test process release - process.release ~ node@0.10.42', function () {
var release = processRelease([], { opts: {} }, 'v0.10.42', null)
assert.strictEqual(release.semver.version, '0.10.42')
delete release.semver
assert.deepStrictEqual(release, {
version: '0.10.42',
name: 'node',
baseUrl: 'https://nodejs.org/dist/v0.10.42/',
tarballUrl: 'https://nodejs.org/dist/v0.10.42/node-v0.10.42-headers.tar.gz',
shasumsUrl: 'https://nodejs.org/dist/v0.10.42/SHASUMS256.txt',
versionDir: '0.10.42',
ia32: { libUrl: 'https://nodejs.org/dist/v0.10.42/node.lib', libPath: 'node.lib' },
x64: { libUrl: 'https://nodejs.org/dist/v0.10.42/x64/node.lib', libPath: 'x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/dist/v0.10.42/arm64/node.lib', libPath: 'arm64/node.lib' }
})
})
// has -headers.tar.gz
it('test process release - process.release ~ node@0.12.10', function () {
var release = processRelease([], { opts: {} }, 'v0.12.10', null)
assert.strictEqual(release.semver.version, '0.12.10')
delete release.semver
assert.deepStrictEqual(release, {
version: '0.12.10',
name: 'node',
baseUrl: 'https://nodejs.org/dist/v0.12.10/',
tarballUrl: 'https://nodejs.org/dist/v0.12.10/node-v0.12.10-headers.tar.gz',
shasumsUrl: 'https://nodejs.org/dist/v0.12.10/SHASUMS256.txt',
versionDir: '0.12.10',
ia32: { libUrl: 'https://nodejs.org/dist/v0.12.10/node.lib', libPath: 'node.lib' },
x64: { libUrl: 'https://nodejs.org/dist/v0.12.10/x64/node.lib', libPath: 'x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/dist/v0.12.10/arm64/node.lib', libPath: 'arm64/node.lib' }
})
})
it('test process release - process.release ~ node@4.1.23', function () {
var release = processRelease([], { opts: {} }, 'v4.1.23', {
name: 'node',
headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '4.1.23')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.1.23',
name: 'node',
baseUrl: 'https://nodejs.org/dist/v4.1.23/',
tarballUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz',
shasumsUrl: 'https://nodejs.org/dist/v4.1.23/SHASUMS256.txt',
versionDir: '4.1.23',
ia32: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/dist/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
})
it('test process release - process.release ~ node@4.1.23 / corp build', function () {
var release = processRelease([], { opts: {} }, 'v4.1.23', {
name: 'node',
headersUrl: 'https://some.custom.location/node-v4.1.23-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '4.1.23')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.1.23',
name: 'node',
baseUrl: 'https://some.custom.location/',
tarballUrl: 'https://some.custom.location/node-v4.1.23-headers.tar.gz',
shasumsUrl: 'https://some.custom.location/SHASUMS256.txt',
versionDir: '4.1.23',
ia32: { libUrl: 'https://some.custom.location/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'https://some.custom.location/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'https://some.custom.location/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
})
it('test process release - process.release ~ node@12.8.0 Windows', function () {
var release = processRelease([], { opts: {} }, 'v12.8.0', {
name: 'node',
sourceUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0.tar.gz',
headersUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz',
libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x64/node.lib'
})
assert.strictEqual(release.semver.version, '12.8.0')
delete release.semver
assert.deepStrictEqual(release, {
version: '12.8.0',
name: 'node',
baseUrl: 'https://nodejs.org/download/release/v12.8.0/',
tarballUrl: 'https://nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz',
shasumsUrl: 'https://nodejs.org/download/release/v12.8.0/SHASUMS256.txt',
versionDir: '12.8.0',
ia32: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/download/release/v12.8.0/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
})
it('test process release - process.release ~ node@12.8.0 Windows ARM64', function () {
var release = processRelease([], { opts: {} }, 'v12.8.0', {
name: 'node',
sourceUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0.tar.gz',
headersUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz',
libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-arm64/node.lib'
})
assert.strictEqual(release.semver.version, '12.8.0')
delete release.semver
assert.deepStrictEqual(release, {
version: '12.8.0',
name: 'node',
baseUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/',
tarballUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/node-v12.8.0-headers.tar.gz',
shasumsUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/SHASUMS256.txt',
versionDir: '12.8.0',
ia32: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'https://unofficial-builds.nodejs.org/download/release/v12.8.0/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
})
it('test process release - process.release ~ node@4.1.23 --target=0.10.40', function () {
var release = processRelease([], { opts: { target: '0.10.40' } }, 'v4.1.23', {
name: 'node',
headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '0.10.40')
delete release.semver
assert.deepStrictEqual(release, {
version: '0.10.40',
name: 'node',
baseUrl: 'https://nodejs.org/dist/v0.10.40/',
tarballUrl: 'https://nodejs.org/dist/v0.10.40/node-v0.10.40.tar.gz',
shasumsUrl: 'https://nodejs.org/dist/v0.10.40/SHASUMS256.txt',
versionDir: '0.10.40',
ia32: { libUrl: 'https://nodejs.org/dist/v0.10.40/node.lib', libPath: 'node.lib' },
x64: { libUrl: 'https://nodejs.org/dist/v0.10.40/x64/node.lib', libPath: 'x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/dist/v0.10.40/arm64/node.lib', libPath: 'arm64/node.lib' }
})
})
it('test process release - process.release ~ node@4.1.23 --dist-url=https://foo.bar/baz', function () {
var release = processRelease([], { opts: { 'dist-url': 'https://foo.bar/baz' } }, 'v4.1.23', {
name: 'node',
headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '4.1.23')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.1.23',
name: 'node',
baseUrl: 'https://foo.bar/baz/v4.1.23/',
tarballUrl: 'https://foo.bar/baz/v4.1.23/node-v4.1.23-headers.tar.gz',
shasumsUrl: 'https://foo.bar/baz/v4.1.23/SHASUMS256.txt',
versionDir: '4.1.23',
ia32: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'https://foo.bar/baz/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'https://foo.bar/baz/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
})
it('test process release - process.release ~ frankenstein@4.1.23', function () {
var release = processRelease([], { opts: {} }, 'v4.1.23', {
name: 'frankenstein',
headersUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '4.1.23')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.1.23',
name: 'frankenstein',
baseUrl: 'https://frankensteinjs.org/dist/v4.1.23/',
tarballUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23-headers.tar.gz',
shasumsUrl: 'https://frankensteinjs.org/dist/v4.1.23/SHASUMS256.txt',
versionDir: 'frankenstein-4.1.23',
ia32: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' },
x64: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' },
arm64: { libUrl: 'https://frankensteinjs.org/dist/v4.1.23/win-arm64/frankenstein.lib', libPath: 'win-arm64/frankenstein.lib' }
})
})
it('test process release - process.release ~ frankenstein@4.1.23 --dist-url=http://foo.bar/baz/', function () {
var release = processRelease([], { opts: { 'dist-url': 'http://foo.bar/baz/' } }, 'v4.1.23', {
name: 'frankenstein',
headersUrl: 'https://frankensteinjs.org/dist/v4.1.23/frankenstein-v4.1.23.tar.gz'
})
assert.strictEqual(release.semver.version, '4.1.23')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.1.23',
name: 'frankenstein',
baseUrl: 'http://foo.bar/baz/v4.1.23/',
tarballUrl: 'http://foo.bar/baz/v4.1.23/frankenstein-v4.1.23-headers.tar.gz',
shasumsUrl: 'http://foo.bar/baz/v4.1.23/SHASUMS256.txt',
versionDir: 'frankenstein-4.1.23',
ia32: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x86/frankenstein.lib', libPath: 'win-x86/frankenstein.lib' },
x64: { libUrl: 'http://foo.bar/baz/v4.1.23/win-x64/frankenstein.lib', libPath: 'win-x64/frankenstein.lib' },
arm64: { libUrl: 'http://foo.bar/baz/v4.1.23/win-arm64/frankenstein.lib', libPath: 'win-arm64/frankenstein.lib' }
})
})
it('test process release - process.release ~ node@4.0.0-rc.4', function () {
var release = processRelease([], { opts: {} }, 'v4.0.0-rc.4', {
name: 'node',
headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '4.0.0-rc.4')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.0.0-rc.4',
name: 'node',
baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/',
tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz',
shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt',
versionDir: '4.0.0-rc.4',
ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
})
it('test process release - process.release ~ node@4.0.0-rc.4 passed as argv[0]', function () {
// note the missing 'v' on the arg, it should normalise when checking
// whether we're on the default or not
var release = processRelease(['4.0.0-rc.4'], { opts: {} }, 'v4.0.0-rc.4', {
name: 'node',
headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '4.0.0-rc.4')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.0.0-rc.4',
name: 'node',
baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/',
tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz',
shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt',
versionDir: '4.0.0-rc.4',
ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
})
it('test process release - process.release ~ node@4.0.0-rc.4 - bogus string passed as argv[0]', function () {
// additional arguments can be passed in on the commandline that should be ignored if they
// are not specifying a valid version @ position 0
var release = processRelease(['this is no version!'], { opts: {} }, 'v4.0.0-rc.4', {
name: 'node',
headersUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '4.0.0-rc.4')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.0.0-rc.4',
name: 'node',
baseUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/',
tarballUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/node-v4.0.0-rc.4-headers.tar.gz',
shasumsUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/SHASUMS256.txt',
versionDir: '4.0.0-rc.4',
ia32: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'https://nodejs.org/download/rc/v4.0.0-rc.4/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
})
it('test process release - NODEJS_ORG_MIRROR', function () {
process.env.NODEJS_ORG_MIRROR = 'http://foo.bar'
var release = processRelease([], { opts: {} }, 'v4.1.23', {
name: 'node',
headersUrl: 'https://nodejs.org/dist/v4.1.23/node-v4.1.23-headers.tar.gz'
})
assert.strictEqual(release.semver.version, '4.1.23')
delete release.semver
assert.deepStrictEqual(release, {
version: '4.1.23',
name: 'node',
baseUrl: 'http://foo.bar/v4.1.23/',
tarballUrl: 'http://foo.bar/v4.1.23/node-v4.1.23-headers.tar.gz',
shasumsUrl: 'http://foo.bar/v4.1.23/SHASUMS256.txt',
versionDir: '4.1.23',
ia32: { libUrl: 'http://foo.bar/v4.1.23/win-x86/node.lib', libPath: 'win-x86/node.lib' },
x64: { libUrl: 'http://foo.bar/v4.1.23/win-x64/node.lib', libPath: 'win-x64/node.lib' },
arm64: { libUrl: 'http://foo.bar/v4.1.23/win-arm64/node.lib', libPath: 'win-arm64/node.lib' }
})
delete process.env.NODEJS_ORG_MIRROR
})
})
@@ -0,0 +1,22 @@
import { glob, createGlobalStyles } from '../index';
import { css, setup } from 'goober';
jest.mock('goober', () => ({
css: jest.fn().mockReturnValue('css()')
}));
describe('global', () => {
beforeEach(() => {
css.mockClear();
});
it('type', () => {
expect(typeof glob).toEqual('function');
expect(typeof createGlobalStyles).toEqual('function');
});
it('glob', () => {
glob`a:b`;
expect(css).toBeCalledWith(['a:b']);
});
});
@@ -0,0 +1,7 @@
/**
* @typedef {import('./lib/index.js').Check} Check
* @typedef {import('./lib/index.js').Test} Test
* @typedef {import('./lib/index.js').TestFunction} TestFunction
*/
export {is, convert} from './lib/index.js'
@@ -0,0 +1,21 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes } from "@peculiar/asn1-schema";
import { ContentInfo } from "@peculiar/asn1-cms";
import { MacData } from "./mac_data";
export class PFX {
constructor(params = {}) {
this.version = 3;
this.authSafe = new ContentInfo();
this.macData = new MacData();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], PFX.prototype, "version", void 0);
__decorate([
AsnProp({ type: ContentInfo })
], PFX.prototype, "authSafe", void 0);
__decorate([
AsnProp({ type: MacData, optional: true })
], PFX.prototype, "macData", void 0);
@@ -0,0 +1,110 @@
"use client";
import {
listbox_item_default
} from "./chunk-V45NB7OG.mjs";
// src/listbox-section.tsx
import { listboxSection } from "@heroui/theme";
import { useMemo } from "react";
import { forwardRef } from "@heroui/system";
import { mergeProps } from "@react-aria/utils";
import { clsx } from "@heroui/shared-utils";
import { Divider } from "@heroui/divider";
import { useListBoxSection } from "@react-aria/listbox";
import { jsx, jsxs } from "react/jsx-runtime";
var ListboxSection = forwardRef(
({
item,
state,
as,
variant,
color,
disableAnimation,
className,
classNames,
hideSelectedIcon,
showDivider = false,
dividerProps = {},
itemClasses,
title,
items,
...otherProps
}, _) => {
const Component = as || "li";
const slots = useMemo(() => listboxSection(), []);
const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);
const dividerStyles = clsx(classNames == null ? void 0 : classNames.divider, dividerProps == null ? void 0 : dividerProps.className);
const { itemProps, headingProps, groupProps } = useListBoxSection({
heading: item.rendered,
"aria-label": item["aria-label"]
});
return /* @__PURE__ */ jsxs(
Component,
{
"data-slot": "base",
...mergeProps(itemProps, otherProps),
className: slots.base({ class: baseStyles }),
children: [
item.rendered && /* @__PURE__ */ jsx(
"span",
{
...headingProps,
className: slots.heading({ class: classNames == null ? void 0 : classNames.heading }),
"data-slot": "heading",
children: item.rendered
}
),
/* @__PURE__ */ jsxs(
"ul",
{
...groupProps,
className: slots.group({ class: classNames == null ? void 0 : classNames.group }),
"data-has-title": !!item.rendered,
"data-slot": "group",
children: [
[...item.childNodes].map((node) => {
const { key: nodeKey, props: nodeProps } = node;
let listboxItem = /* @__PURE__ */ jsx(
listbox_item_default,
{
classNames: itemClasses,
color,
disableAnimation,
hideSelectedIcon,
item: node,
state,
variant,
...nodeProps
},
nodeKey
);
if (node.wrapper) {
listboxItem = node.wrapper(listboxItem);
}
return listboxItem;
}),
showDivider && /* @__PURE__ */ jsx(
Divider,
{
as: "li",
className: slots.divider({
class: dividerStyles
}),
...dividerProps
}
)
]
}
)
]
},
item.key
);
}
);
ListboxSection.displayName = "HeroUI.ListboxSection";
var listbox_section_default = ListboxSection;
export {
listbox_section_default
};
@@ -0,0 +1 @@
{"name":"negotiator","version":"0.6.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532126169,"integrity":"sha512-cVxpVYegKHM6CS2xLIzymGrHRdLS+ViWHaqPm5RXdEvmPJUhwNNLWUu04IhKAMXkHhm+uWZuQmURhjwtgkHDNA==","mode":420,"size":1177},"lib/charset.js":{"checkedAt":1794532126170,"integrity":"sha512-bFuI8vVgmQGPE+QPDGdTUiceY+kosDzSVjC9qVBZ5cKJx4dSlH3CnjCeZiZBc9bO18xj/L8FGOlVuhKiur9Tlg==","mode":420,"size":3081},"lib/encoding.js":{"checkedAt":1794532126170,"integrity":"sha512-qVBrV1M2WHowyH/LUTBewWcpveZk1A3ta4musQrXVPhnQNoPFjergLS8sGjaUHNysXw5NdwD8j0OTcxJbXTxog==","mode":420,"size":4155},"index.js":{"checkedAt":1794532126170,"integrity":"sha512-eL7ddNbclkCJXUATcERPQROXkcLnkCRoiRD7sLqLU6jjxclIDO85TE0XVyQliEpE8dpu/S7pt1STxnz+0RhG3g==","mode":420,"size":2495},"lib/language.js":{"checkedAt":1794532126170,"integrity":"sha512-17rG4s4oUl1n4Ljv9OL+GGjRHsafmMMQweYlhQS83vzsrOlnp3If3qvZOqGNDUDRv+VNzt8Jke0SEZr4vedEkA==","mode":420,"size":3409},"lib/mediaType.js":{"checkedAt":1794532126170,"integrity":"sha512-A6l83E9vFoLXSE99mJXsKzCJ64G/r5HEu190fq0k9FvaB6cjAjubqgBBnAldsW0ERTUd77TiiFk8DVB7/+mGOQ==","mode":420,"size":5343},"package.json":{"checkedAt":1794532126170,"integrity":"sha512-enDJ5IrMWt5VQSaIfSmUqnhnM6MdOwpgkGajxQ8nH1+XdqYTb6olKY4wQ3s3wqRqLLGTmB0DwGsF5Hu7db83bw==","mode":420,"size":993},"HISTORY.md":{"checkedAt":1794532126170,"integrity":"sha512-KGugSKzWvqNC56TNdV27UB7EIHjRnmbGhZ4XFnlzDbT0R3+Hdx33JSM9c36t6JAAJ2o5zhIaSR/RnodUBik3Cw==","mode":420,"size":2581},"README.md":{"checkedAt":1794532126170,"integrity":"sha512-SzvHc6AM/uq+/SbH/h7jYrp8fguoWxH3zj9PnUpaW0Nk0r5E+38z5+HBDc1uQ3GNbhwtpeY7AWYd8/ArR5bC9Q==","mode":420,"size":5322}}}
@@ -0,0 +1,24 @@
# @heroui/use-draggable
A Quick description of the component
> This is an internal utility, not intended for public usage.
## Installation
```sh
yarn add @heroui/use-draggable
# or
npm i @heroui/use-draggable
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.stringifyServiceIdentifier = exports.LazyServiceIdentifier = exports.isPromise = void 0;
const isPromise_1 = require("./common/calculations/isPromise");
Object.defineProperty(exports, "isPromise", { enumerable: true, get: function () { return isPromise_1.isPromise; } });
const stringifyServiceIdentifier_1 = require("./services/calculations/stringifyServiceIdentifier");
Object.defineProperty(exports, "stringifyServiceIdentifier", { enumerable: true, get: function () { return stringifyServiceIdentifier_1.stringifyServiceIdentifier; } });
const LazyServiceIdentifier_1 = require("./services/models/LazyServiceIdentifier");
Object.defineProperty(exports, "LazyServiceIdentifier", { enumerable: true, get: function () { return LazyServiceIdentifier_1.LazyServiceIdentifier; } });
//# sourceMappingURL=index.js.map
@@ -0,0 +1,823 @@
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,4 @@
import { QueryParams, SendMessage } from './types';
export declare const parseSocketIOUrl: (url: string) => string;
export declare const appendQueryParams: (url: string, params?: QueryParams) => string;
export declare const setUpSocketIOPing: (sendMessage: SendMessage, interval?: number) => number;
@@ -0,0 +1,11 @@
"use strict";
var _class_apply_descriptor_set = require("./_class_apply_descriptor_set.cjs");
var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs");
function _class_private_field_set(receiver, privateMap, value) {
var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "set");
_class_apply_descriptor_set._(receiver, descriptor, value);
return value;
}
exports._ = _class_private_field_set;
@@ -0,0 +1,10 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-configs.js" script.
*/
"use strict"
module.exports = {
plugins: ["es-x"],
rules: { "es-x/no-intl-datetimeformat-prototype-formattoparts": "error" },
}
@@ -0,0 +1,70 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.1.4](https://github.com/ljharb/define-data-property/compare/v1.1.3...v1.1.4) - 2024-02-13
### Commits
- [Refactor] use `es-define-property` [`90f2f4c`](https://github.com/ljharb/define-data-property/commit/90f2f4cc20298401e71c28e1e08888db12021453)
- [Dev Deps] update `@types/object.getownpropertydescriptors` [`cd929d9`](https://github.com/ljharb/define-data-property/commit/cd929d9a04f5f2fdcfa9d5be140940b91a083153)
## [v1.1.3](https://github.com/ljharb/define-data-property/compare/v1.1.2...v1.1.3) - 2024-02-12
### Commits
- [types] hand-write d.ts instead of emitting it [`0cbc988`](https://github.com/ljharb/define-data-property/commit/0cbc988203c105f2d97948327c7167ebd33bd318)
- [meta] simplify `exports` [`690781e`](https://github.com/ljharb/define-data-property/commit/690781eed28bbf2d6766237efda0ba6dd591609e)
- [Dev Deps] update `hasown`; clean up DT packages [`6cdfd1c`](https://github.com/ljharb/define-data-property/commit/6cdfd1cb2d91d791bfd18cda5d5cab232fd5d8fc)
- [actions] cleanup [`3142bc6`](https://github.com/ljharb/define-data-property/commit/3142bc6a4bc406a51f5b04f31e98562a27f35ffd)
- [meta] add `funding` [`8474423`](https://github.com/ljharb/define-data-property/commit/847442391a79779af3e0f1bf0b5bb923552b7804)
- [Deps] update `get-intrinsic` [`3e9be00`](https://github.com/ljharb/define-data-property/commit/3e9be00e07784ba34e7c77d8bc0fdbc832ad61de)
## [v1.1.2](https://github.com/ljharb/define-data-property/compare/v1.1.1...v1.1.2) - 2024-02-05
### Commits
- [Dev Deps] update @types packages, `object-inspect`, `tape`, `typescript` [`df41bf8`](https://github.com/ljharb/define-data-property/commit/df41bf84ca3456be6226055caab44e38e3a7fd2f)
- [Dev Deps] update DT packages, `aud`, `npmignore`, `tape`, typescript` [`fab0e4e`](https://github.com/ljharb/define-data-property/commit/fab0e4ec709ee02b79f42d6db3ee5f26e0a34b8a)
- [Dev Deps] use `hasown` instead of `has` [`aa51ef9`](https://github.com/ljharb/define-data-property/commit/aa51ef93f6403d49d9bb72a807bcdb6e418978c0)
- [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`d89be50`](https://github.com/ljharb/define-data-property/commit/d89be50571175888d391238605122679f7e65ffc)
- [Deps] update `has-property-descriptors` [`7af887c`](https://github.com/ljharb/define-data-property/commit/7af887c9083b59b195b0079e04815cfed9fcee2b)
- [Deps] update `get-intrinsic` [`bb8728e`](https://github.com/ljharb/define-data-property/commit/bb8728ec42cd998505a7157ae24853a560c20646)
## [v1.1.1](https://github.com/ljharb/define-data-property/compare/v1.1.0...v1.1.1) - 2023-10-12
### Commits
- [Tests] fix tests in ES3 engines [`5c6920e`](https://github.com/ljharb/define-data-property/commit/5c6920edd1f52f675b02f417e539c28135b43f94)
- [Dev Deps] update `@types/es-value-fixtures`, `@types/for-each`, `@types/gopd`, `@types/has-property-descriptors`, `tape`, `typescript` [`7d82dfc`](https://github.com/ljharb/define-data-property/commit/7d82dfc20f778b4465bba06335dd53f6f431aea3)
- [Fix] IE 8 has a broken `Object.defineProperty` [`0672e1a`](https://github.com/ljharb/define-data-property/commit/0672e1af2a9fcc787e7c23b96dea60d290df5548)
- [meta] emit types on prepack [`73acb1f`](https://github.com/ljharb/define-data-property/commit/73acb1f903c21b314ec7156bf10f73c7910530c0)
- [Dev Deps] update `tape`, `typescript` [`9489a77`](https://github.com/ljharb/define-data-property/commit/9489a7738bf2ecf0ac71d5b78ec4ca6ad7ba0142)
## [v1.1.0](https://github.com/ljharb/define-data-property/compare/v1.0.1...v1.1.0) - 2023-09-13
### Commits
- [New] add `loose` arg [`155235a`](https://github.com/ljharb/define-data-property/commit/155235a4c4d7741f6de01cd87c99599a56654b72)
- [New] allow `null` to be passed for the non* args [`7d2fa5f`](https://github.com/ljharb/define-data-property/commit/7d2fa5f06be0392736c13b126f7cd38979f34792)
## [v1.0.1](https://github.com/ljharb/define-data-property/compare/v1.0.0...v1.0.1) - 2023-09-12
### Commits
- [meta] add TS types [`43d763c`](https://github.com/ljharb/define-data-property/commit/43d763c6c883f652de1c9c02ef6216ee507ffa69)
- [Dev Deps] update `@types/tape`, `typescript` [`f444985`](https://github.com/ljharb/define-data-property/commit/f444985811c36f3e6448a03ad2f9b7898917f4c7)
- [meta] add `safe-publish-latest`, [`172bb10`](https://github.com/ljharb/define-data-property/commit/172bb10890896ebb160e64398f6ee55760107bee)
## v1.0.0 - 2023-09-12
### Commits
- Initial implementation, tests, readme [`5b43d6b`](https://github.com/ljharb/define-data-property/commit/5b43d6b44e675a904810467a7d4e0adb7efc3196)
- Initial commit [`35e577a`](https://github.com/ljharb/define-data-property/commit/35e577a6ba59a98befa97776d70d90f3bea9009d)
- npm init [`82a0a04`](https://github.com/ljharb/define-data-property/commit/82a0a04a321ca7de220af02d41e2745e8a9962ed)
- Only apps should have lockfiles [`96df244`](https://github.com/ljharb/define-data-property/commit/96df244a3c6f426f9a2437be825d1c6f5dd7158e)
- [meta] use `npmignore` to autogenerate an npmignore file [`a87ff18`](https://github.com/ljharb/define-data-property/commit/a87ff18cb79e14c2eb5720486c4759fd9a189375)
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_tt=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),_={name:"en-tt",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}};return a.default.locale(_,null,!0),_}));
@@ -0,0 +1,661 @@
import { OctetString, AsnArray } from "@peculiar/asn1-schema";
import * as cms from "@peculiar/asn1-cms";
import * as pfx from "@peculiar/asn1-pfx";
import * as pkcs8 from "@peculiar/asn1-pkcs8";
import * as x509 from "@peculiar/asn1-x509";
/**
* ASN.1 module
*
* This appendix includes all of the ASN.1 type and value definitions
* contained in this document in the form of the ASN.1 module PKCS-9.
*
* PKCS-9 {iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
* pkcs-9(9) modules(0) pkcs-9(1)}
* DEFINITIONS IMPLICIT TAGS ::=
*
* BEGIN
*
* -- EXPORTS All --
* -- All types and values defined in this module is exported for use
* -- in other ASN.1 modules.
*
* IMPORTS
*
* informationFramework, authenticationFramework,
* selectedAttributeTypes, upperBounds , id-at
* FROM UsefulDefinitions {joint-iso-itu-t ds(5) module(1)
* usefulDefinitions(0) 3}
*
* ub-name
* FROM UpperBounds upperBounds
*
* OBJECT-CLASS, ATTRIBUTE, MATCHING-RULE, Attribute, top,
* objectIdentifierMatch
* FROM InformationFramework informationFramework
*
* ALGORITHM, Extensions, Time
* FROM AuthenticationFramework authenticationFramework
*
* DirectoryString, octetStringMatch, caseIgnoreMatch, caseExactMatch,
* generalizedTimeMatch, integerMatch, serialNumber
* FROM SelectedAttributeTypes selectedAttributeTypes
*
* ContentInfo, SignerInfo
* FROM CryptographicMessageSyntax {iso(1) member-body(2) us(840)
* rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) modules(0) cms(1)}
*
* EncryptedPrivateKeyInfo
* FROM PKCS-8 {iso(1) member-body(2) us(840) rsadsi(113549)
* pkcs(1) pkcs-8(8) modules(1) pkcs-8(1)}
*
* PFX
* FROM PKCS-12 {iso(1) member-body(2) us(840) rsadsi(113549)
* pkcs(1) pkcs-12(12) modules(0) pkcs-12(1)}
*
* PKCS15Token
* FROM PKCS-15 {iso(1) member-body(2) us(840) rsadsi(113549)
* pkcs(1) pkcs-15(15) modules(1) pkcs-15(1)};
*
* -- Upper bounds
*
* pkcs-9-ub-pkcs9String INTEGER ::= 255
* pkcs-9-ub-emailAddress INTEGER ::= pkcs-9-ub-pkcs9String
* pkcs-9-ub-unstructuredName INTEGER ::= pkcs-9-ub-pkcs9String
* pkcs-9-ub-unstructuredAddress INTEGER ::= pkcs-9-ub-pkcs9String
* pkcs-9-ub-challengePassword INTEGER ::= pkcs-9-ub-pkcs9String
* pkcs-9-ub-friendlyName INTEGER ::= pkcs-9-ub-pkcs9String
* pkcs-9-ub-signingDescription INTEGER ::= pkcs-9-ub-pkcs9String
* pkcs-9-ub-match INTEGER ::= pkcs-9-ub-pkcs9String
* pkcs-9-ub-pseudonym INTEGER ::= ub-name
* pkcs-9-ub-placeOfBirth INTEGER ::= ub-name
*
* -- Object Identifiers
*/
/**
* pkcs-9 OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840)
* rsadsi(113549) pkcs(1) 9}
*/
export declare const id_pkcs9 = "1.2.840.113549.1.9";
/**
* pkcs-9-mo OBJECT IDENTIFIER ::= {pkcs-9 0} -- Modules branch
*/
export declare const id_pkcs9_mo = "1.2.840.113549.1.9.0";
/**
* pkcs-9-oc OBJECT IDENTIFIER ::= {pkcs-9 24} -- Object class branch
*/
export declare const id_pkcs9_oc = "1.2.840.113549.1.9.24";
/**
* pkcs-9-at OBJECT IDENTIFIER ::= {pkcs-9 25} -- Attribute branch, for
* -- new attributes
*/
export declare const id_pkcs9_at = "1.2.840.113549.1.9.25";
/**
* pkcs-9-sx OBJECT IDENTIFIER ::= {pkcs-9 26} -- For syntaxes (RFC 2252)
*/
export declare const id_pkcs9_sx = "1.2.840.113549.1.9.26";
/**
* pkcs-9-mr OBJECT IDENTIFIER ::= {pkcs-9 27} -- Matching rules
*/
export declare const id_pkcs9_mr = "1.2.840.113549.1.9.27";
/**
* pkcs-9-oc-pkcsEntity OBJECT IDENTIFIER ::= {pkcs-9-oc 1}
*/
export declare const id_pkcs9_oc_pkcsEntity = "1.2.840.113549.1.9.24.1";
/**
* pkcs-9-oc-naturalPerson OBJECT IDENTIFIER ::= {pkcs-9-oc 2}
*/
export declare const id_pkcs9_oc_naturalPerson = "1.2.840.113549.1.9.24.2";
/**
* pkcs-9-at-emailAddress OBJECT IDENTIFIER ::= {pkcs-9 1}
*/
export declare const id_pkcs9_at_emailAddress = "1.2.840.113549.1.9.1";
/**
* pkcs-9-at-unstructuredName OBJECT IDENTIFIER ::= {pkcs-9 2}
*/
export declare const id_pkcs9_at_unstructuredName = "1.2.840.113549.1.9.2";
/**
* pkcs-9-at-contentType OBJECT IDENTIFIER ::= {pkcs-9 3}
*/
export declare const id_pkcs9_at_contentType = "1.2.840.113549.1.9.3";
/**
* pkcs-9-at-messageDigest OBJECT IDENTIFIER ::= {pkcs-9 4}
*/
export declare const id_pkcs9_at_messageDigest = "1.2.840.113549.1.9.4";
/**
* pkcs-9-at-signingTime OBJECT IDENTIFIER ::= {pkcs-9 5}
*/
export declare const id_pkcs9_at_signingTime = "1.2.840.113549.1.9.5";
/**
* pkcs-9-at-counterSignature OBJECT IDENTIFIER ::= {pkcs-9 6}
*/
export declare const id_pkcs9_at_counterSignature = "1.2.840.113549.1.9.6";
/**
* pkcs-9-at-challengePassword OBJECT IDENTIFIER ::= {pkcs-9 7}
*/
export declare const id_pkcs9_at_challengePassword = "1.2.840.113549.1.9.7";
/**
* pkcs-9-at-unstructuredAddress OBJECT IDENTIFIER ::= {pkcs-9 8}
*/
export declare const id_pkcs9_at_unstructuredAddress = "1.2.840.113549.1.9.8";
/**
* pkcs-9-at-extendedCertificateAttributes
* OBJECT IDENTIFIER ::= {pkcs-9 9}
*/
export declare const id_pkcs9_at_extendedCertificateAttributes = "1.2.840.113549.1.9.9";
/**
* -- Obsolete (?) attribute identifiers, purportedly from "tentative
* -- PKCS #9 draft"
* -- pkcs-9-at-issuerAndSerialNumber OBJECT IDENTIFIER ::= {pkcs-9 10}
* -- pkcs-9-at-passwordCheck OBJECT IDENTIFIER ::= {pkcs-9 11}
* -- pkcs-9-at-publicKey OBJECT IDENTIFIER ::= {pkcs-9 12}
*/
/**
* pkcs-9-at-signingDescription OBJECT IDENTIFIER ::= {pkcs-9 13}
*/
export declare const id_pkcs9_at_signingDescription = "1.2.840.113549.1.9.13";
/**
* pkcs-9-at-extensionRequest OBJECT IDENTIFIER ::= {pkcs-9 14}
*/
export declare const id_pkcs9_at_extensionRequest = "1.2.840.113549.1.9.14";
/**
* pkcs-9-at-smimeCapabilities OBJECT IDENTIFIER ::= {pkcs-9 15}
*/
export declare const id_pkcs9_at_smimeCapabilities = "1.2.840.113549.1.9.15";
/**
* -- Unused (?)
* -- pkcs-9-at-? OBJECT IDENTIFIER ::= {pkcs-9 17}
* -- pkcs-9-at-? OBJECT IDENTIFIER ::= {pkcs-9 18}
* -- pkcs-9-at-? OBJECT IDENTIFIER ::= {pkcs-9 19}
*/
/**
* pkcs-9-at-friendlyName OBJECT IDENTIFIER ::= {pkcs-9 20}
*/
export declare const id_pkcs9_at_friendlyName = "1.2.840.113549.1.9.20";
/**
* pkcs-9-at-localKeyId OBJECT IDENTIFIER ::= {pkcs-9 21}
*/
export declare const id_pkcs9_at_localKeyId = "1.2.840.113549.1.9.21";
/**
* pkcs-9-at-userPKCS12 OBJECT IDENTIFIER ::=
* {2 16 840 1 113730 3 1 216}
*/
export declare const id_pkcs9_at_userPKCS12 = "2.16.840.1.113730.3.1.216";
/**
* pkcs-9-at-pkcs15Token OBJECT IDENTIFIER ::= {pkcs-9-at 1}
*/
export declare const id_pkcs9_at_pkcs15Token = "1.2.840.113549.1.9.25.1";
/**
* pkcs-9-at-encryptedPrivateKeyInfo OBJECT IDENTIFIER ::= {pkcs-9-at 2}
*/
export declare const id_pkcs9_at_encryptedPrivateKeyInfo = "1.2.840.113549.1.9.25.2";
/**
* pkcs-9-at-randomNonce OBJECT IDENTIFIER ::= {pkcs-9-at 3}
*/
export declare const id_pkcs9_at_randomNonce = "1.2.840.113549.1.9.25.3";
/**
* pkcs-9-at-sequenceNumber OBJECT IDENTIFIER ::= {pkcs-9-at 4}
*/
export declare const id_pkcs9_at_sequenceNumber = "1.2.840.113549.1.9.25.4";
/**
* pkcs-9-at-pkcs7PDU OBJECT IDENTIFIER ::= {pkcs-9-at 5}
*/
export declare const id_pkcs9_at_pkcs7PDU = "1.2.840.113549.1.9.25.5";
/**
* ietf-at OBJECT IDENTIFIER ::=
* {1 3 6 1 5 5 7 9}
*/
export declare const id_ietf_at = "1.3.6.1.5.5.7.9";
/**
* pkcs-9-at-dateOfBirth OBJECT IDENTIFIER ::= {ietf-at 1}
*/
export declare const id_pkcs9_at_dateOfBirth = "1.3.6.1.5.5.7.9.1";
/**
* pkcs-9-at-placeOfBirth OBJECT IDENTIFIER ::= {ietf-at 2}
*/
export declare const id_pkcs9_at_placeOfBirth = "1.3.6.1.5.5.7.9.2";
/**
* pkcs-9-at-gender OBJECT IDENTIFIER ::= {ietf-at 3}
*/
export declare const id_pkcs9_at_gender = "1.3.6.1.5.5.7.9.3";
/**
* pkcs-9-at-countryOfCitizenship OBJECT IDENTIFIER ::= {ietf-at 4}
*/
export declare const id_pkcs9_at_countryOfCitizenship = "1.3.6.1.5.5.7.9.4";
/**
* pkcs-9-at-countryOfResidence OBJECT IDENTIFIER ::= {ietf-at 5}
*/
export declare const id_pkcs9_at_countryOfResidence = "1.3.6.1.5.5.7.9.5";
/**
* pkcs-9-sx-pkcs9String OBJECT IDENTIFIER ::= {pkcs-9-sx 1}
*/
export declare const id_pkcs9_sx_pkcs9String = "1.2.840.113549.1.9.26.1";
/**
* pkcs-9-sx-signingTime OBJECT IDENTIFIER ::= {pkcs-9-sx 2}
*/
export declare const id_pkcs9_sx_signingTime = "1.2.840.113549.1.9.26.2";
/**
* pkcs-9-mr-caseIgnoreMatch OBJECT IDENTIFIER ::= {pkcs-9-mr 1}
*/
export declare const id_pkcs9_mr_caseIgnoreMatch = "1.2.840.113549.1.9.27.1";
/**
* pkcs-9-mr-signingTimeMatch OBJECT IDENTIFIER ::= {pkcs-9-mr 2}
*/
export declare const id_pkcs9_mr_signingTimeMatch = "1.2.840.113549.1.9.27.2";
/**
* -- Arcs with attributes defined elsewhere
*/
/**
* smime OBJECT IDENTIFIER ::= {pkcs-9 16}
*/
export declare const id_smime = "1.2.840.113549.1.9.16";
/**
* -- Main arc for S/MIME (RFC 2633)
*/
/**
* certTypes OBJECT IDENTIFIER ::= {pkcs-9 22}
*/
export declare const id_certTypes = "1.2.840.113549.1.9.22";
/**
* -- Main arc for certificate types defined in PKCS #12
* crlTypes OBJECT IDENTIFIER ::= {pkcs-9 23}
*/
export declare const crlTypes = "1.2.840.113549.1.9.23";
/**
* -- Main arc for crl types defined in PKCS #12
*
* -- Other object identifiers
*/
/**
* id-at-pseudonym OBJECT IDENTIFIER ::= {id-at 65}
*/
export declare const id_at_pseudonym = "2.5.4.65";
/**
* -- Useful types
*/
/**
* PKCS9String {INTEGER : maxSize} ::= CHOICE {
* ia5String IA5String (SIZE(1..maxSize)),
* directoryString DirectoryString {maxSize}
* }
*/
export declare class PKCS9String extends x509.DirectoryString {
ia5String?: string;
constructor(params?: Partial<PKCS9String>);
toString(): string;
}
/**
*
* -- Object classes
*/
/**
* pkcsEntity OBJECT-CLASS ::= {
* SUBCLASS OF { top }
* KIND auxiliary
* MAY CONTAIN { PKCSEntityAttributeSet }
* ID pkcs-9-oc-pkcsEntity
* }
*
* naturalPerson OBJECT-CLASS ::= {
* SUBCLASS OF { top }
* KIND auxiliary
* MAY CONTAIN { NaturalPersonAttributeSet }
* ID pkcs-9-oc-naturalPerson
* }
*
* -- Attribute sets
*
* PKCSEntityAttributeSet ATTRIBUTE ::= {
* pKCS7PDU |
* userPKCS12 |
* pKCS15Token |
* encryptedPrivateKeyInfo,
* ... -- For future extensions
* }
*
* NaturalPersonAttributeSet ATTRIBUTE ::= {
* emailAddress |
* unstructuredName |
* unstructuredAddress |
* dateOfBirth |
* placeOfBirth |
* gender |
* countryOfCitizenship |
* countryOfResidence |
* pseudonym |
* serialNumber,
* ... -- For future extensions
* }
*
* -- Attributes
*/
/**
* pKCS7PDU ATTRIBUTE ::= {
* WITH SYNTAX ContentInfo
* ID pkcs-9-at-pkcs7PDU
* }
*/
export declare class Pkcs7PDU extends cms.ContentInfo {
}
/**
* userPKCS12 ATTRIBUTE ::= {
* WITH SYNTAX PFX
* ID pkcs-9-at-userPKCS12
* }
*/
export declare class UserPKCS12 extends pfx.PFX {
}
/**
* pKCS15Token ATTRIBUTE ::= {
* WITH SYNTAX PKCS15Token
* ID pkcs-9-at-pkcs15Token
* }
*/
/**
* encryptedPrivateKeyInfo ATTRIBUTE ::= {
* WITH SYNTAX EncryptedPrivateKeyInfo
* ID pkcs-9-at-encryptedPrivateKeyInfo
* }
*/
export declare class EncryptedPrivateKeyInfo extends pkcs8.EncryptedPrivateKeyInfo {
}
/**
* emailAddress ATTRIBUTE ::= {
* WITH SYNTAX IA5String (SIZE(1..pkcs-9-ub-emailAddress))
* EQUALITY MATCHING RULE pkcs9CaseIgnoreMatch
* ID pkcs-9-at-emailAddress
* }
*/
export declare class EmailAddress {
value: string;
constructor(value?: string);
/**
* Returns a string representation of an object.
*/
toString(): string;
}
/**
* unstructuredName ATTRIBUTE ::= {
* WITH SYNTAX PKCS9String {pkcs-9-ub-unstructuredName}
* EQUALITY MATCHING RULE pkcs9CaseIgnoreMatch
* ID pkcs-9-at-unstructuredName
* }
*/
export declare class UnstructuredName extends PKCS9String {
}
/**
* unstructuredAddress ATTRIBUTE ::= {
* WITH SYNTAX DirectoryString {pkcs-9-ub-unstructuredAddress}
* EQUALITY MATCHING RULE caseIgnoreMatch
* ID pkcs-9-at-unstructuredAddress
* }
*/
export declare class UnstructuredAddress extends x509.DirectoryString {
}
/**
* dateOfBirth ATTRIBUTE ::= {
* WITH SYNTAX GeneralizedTime
* EQUALITY MATCHING RULE generalizedTimeMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-dateOfBirth
* }
*/
export declare class DateOfBirth {
value: Date;
constructor(value?: Date);
}
/**
* placeOfBirth ATTRIBUTE ::= {
* WITH SYNTAX DirectoryString {pkcs-9-ub-placeOfBirth}
* EQUALITY MATCHING RULE caseExactMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-placeOfBirth
* }
*/
export declare class PlaceOfBirth extends x509.DirectoryString {
}
export type GenderType = "M" | "F" | "m" | "f";
/**
* gender ATTRIBUTE ::= {
* WITH SYNTAX PrintableString (SIZE(1) ^
* FROM ("M" | "F" | "m" | "f"))
* EQUALITY MATCHING RULE caseIgnoreMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-gender
* }
*/
export declare class Gender {
value: GenderType;
/**
* Initialize Gender object
* @param value Gender object value. Default value is 'M'.
*/
constructor(value?: GenderType);
/**
* Returns a string representation of an object.
*/
toString(): string;
}
/**
* countryOfCitizenship ATTRIBUTE ::= {
* WITH SYNTAX PrintableString (SIZE(2))(CONSTRAINED BY {
* -- Must be a two-letter country acronym in accordance with
* -- ISO/IEC 3166 --})
* EQUALITY MATCHING RULE caseIgnoreMatch
* ID pkcs-9-at-countryOfCitizenship
* }
*/
export declare class CountryOfCitizenship {
/**
* Country name. Must be a two-letter country acronym in accordance with ISO/IEC 3166
*/
value: string;
constructor(value?: string);
/**
* Returns a string representation of an object.
*/
toString(): string;
}
/**
* countryOfResidence ATTRIBUTE ::= {
* WITH SYNTAX PrintableString (SIZE(2))(CONSTRAINED BY {
* -- Must be a two-letter country acronym in accordance with
* -- ISO/IEC 3166 --})
* EQUALITY MATCHING RULE caseIgnoreMatch
* ID pkcs-9-at-countryOfResidence
* }
*/
export declare class CountryOfResidence extends CountryOfCitizenship {
}
/**
* pseudonym ATTRIBUTE ::= {
* WITH SYNTAX DirectoryString {pkcs-9-ub-pseudonym}
* EQUALITY MATCHING RULE caseExactMatch
* ID id-at-pseudonym
* }
*/
export declare class Pseudonym extends x509.DirectoryString {
}
/**
* contentType ATTRIBUTE ::= {
* WITH SYNTAX ContentType
* EQUALITY MATCHING RULE objectIdentifierMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-contentType
* }
*/
export declare class ContentType {
value: string;
constructor(value?: string);
/**
* Returns a string representation of an object.
*/
toString(): string;
}
/**
* MessageDigest ::= OCTET STRING
*
* messageDigest ATTRIBUTE ::= {
* WITH SYNTAX MessageDigest
* EQUALITY MATCHING RULE octetStringMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-messageDigest
* }
*/
export declare class MessageDigest extends OctetString {
}
/**
* SigningTime ::= Time -- imported from ISO/IEC 9594-8
*
* signingTime ATTRIBUTE ::= {
* WITH SYNTAX SigningTime
* EQUALITY MATCHING RULE signingTimeMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-signingTime
* }
*/
export declare class SigningTime extends x509.Time {
}
/**
* RandomNonce ::= OCTET STRING (SIZE(4..MAX))
* -- At least four bytes long
*
* randomNonce ATTRIBUTE ::= {
* WITH SYNTAX RandomNonce
* EQUALITY MATCHING RULE octetStringMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-randomNonce
* }
*/
export declare class RandomNonce extends OctetString {
}
/**
* SequenceNumber ::= INTEGER (1..MAX)
*
* sequenceNumber ATTRIBUTE ::= {
* WITH SYNTAX SequenceNumber
* EQUALITY MATCHING RULE integerMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-sequenceNumber
* }
*/
export declare class SequenceNumber {
value: number;
constructor(value?: number);
/**
* Returns a string representation of an object.
*/
toString(): string;
}
/**
* counterSignature ATTRIBUTE ::= {
* WITH SYNTAX SignerInfo
* ID pkcs-9-at-counterSignature
* }
*/
export declare class CounterSignature extends cms.SignerInfo {
}
/**
* challengePassword ATTRIBUTE ::= {
* WITH SYNTAX DirectoryString {pkcs-9-ub-challengePassword}
* EQUALITY MATCHING RULE caseExactMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-challengePassword
* }
*/
export declare class ChallengePassword extends x509.DirectoryString {
}
/**
* ExtensionRequest ::= Extensions
*
* extensionRequest ATTRIBUTE ::= {
* WITH SYNTAX ExtensionRequest
* SINGLE VALUE TRUE
* ID pkcs-9-at-extensionRequest
* }
*/
export declare class ExtensionRequest extends x509.Extensions {
constructor(items?: x509.Extension[]);
}
/**
* extendedCertificateAttributes ATTRIBUTE ::= {
* WITH SYNTAX SET OF Attribute
* SINGLE VALUE TRUE
* ID pkcs-9-at-extendedCertificateAttributes
* }
*/
export declare class ExtendedCertificateAttributes extends AsnArray<cms.Attribute> {
constructor(items?: cms.Attribute[]);
}
/**
* friendlyName ATTRIBUTE ::= {
* WITH SYNTAX BMPString (SIZE(1..pkcs-9-ub-friendlyName))
* EQUALITY MATCHING RULE caseIgnoreMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-friendlyName
* }
*/
export declare class FriendlyName {
value: string;
constructor(value?: string);
/**
* Returns a string representation of an object.
*/
toString(): string;
}
/**
* localKeyId ATTRIBUTE ::= {
* WITH SYNTAX OCTET STRING
* EQUALITY MATCHING RULE octetStringMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-localKeyId
* }
*/
export declare class LocalKeyId extends OctetString {
}
/**
* signingDescription ATTRIBUTE ::= {
* WITH SYNTAX DirectoryString {pkcs-9-ub-signingDescription}
* EQUALITY MATCHING RULE caseIgnoreMatch
* SINGLE VALUE TRUE
* ID pkcs-9-at-signingDescription
* }
*/
export declare class SigningDescription extends x509.DirectoryString {
}
/**
* SMIMECapability ::= SEQUENCE {
* algorithm ALGORITHM.&id ({SMIMEv3Algorithms}),
* parameters ALGORITHM.&Type ({SMIMEv3Algorithms}{@algorithm})
* }
*
* SMIMEv3Algorithms ALGORITHM ::= {...-- See RFC 2633 --}
*/
export declare class SMIMECapability extends x509.AlgorithmIdentifier {
}
/**
* SMIMECapabilities ::= SEQUENCE OF SMIMECapability
*
* smimeCapabilities ATTRIBUTE ::= {
* WITH SYNTAX SMIMECapabilities
* SINGLE VALUE TRUE
* ID pkcs-9-at-smimeCapabilities
* }
*/
export declare class SMIMECapabilities extends AsnArray<SMIMECapability> {
constructor(items?: SMIMECapability[]);
}
/**
* -- Matching rules
*
* pkcs9CaseIgnoreMatch MATCHING-RULE ::= {
* SYNTAX PKCS9String {pkcs-9-ub-match}
* ID pkcs-9-mr-caseIgnoreMatch
* }
*
* signingTimeMatch MATCHING-RULE ::= {
* SYNTAX SigningTime
* ID pkcs-9-mr-signingTimeMatch
* }
*
* END
*/
@@ -0,0 +1,8 @@
/**
* Determine if the given name is a legal variable name.
*
* This is needed when transforming TypeScript enums; if an enum key is a valid
* variable name, it might be referenced later in the enum, so we need to
* declare a variable.
*/
export default function isIdentifier(name: string): boolean;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},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","2":"C L M G N O P"},C:{"2":"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 HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB 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"},E:{"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 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 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB 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 FD GD HD ID NC uC JD OC"},G:{"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 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:{"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:{"2":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB tD uD vD wD xD QC RC SC yD","2":"J oD pD qD rD sD aC"},Q:{"1":"zD"},R:{"1":"0D"},S:{"2":"1D 2D"}},B:7,C:"IntersectionObserver V2",D:true};
@@ -0,0 +1,6 @@
module.exports = {
"dismiss": `\u{95DC}\u{9589}`
};
//# sourceMappingURL=zh-TW.main.js.map
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `vzestupn\u{11B}`,
"ascendingSort": (args)=>`\u{159}azeno vzestupn\u{11B} podle sloupce ${args.columnName}`,
"columnSize": (args)=>`${args.value} pixel\u{16F}`,
"descending": `sestupn\u{11B}`,
"descendingSort": (args)=>`\u{159}azeno sestupn\u{11B} podle sloupce ${args.columnName}`,
"resizerDescription": `Stisknut\xedm kl\xe1vesy Enter za\u{10D}nete m\u{11B}nit velikost`,
"select": `Vybrat`,
"selectAll": `Vybrat v\u{161}e`,
"sortable": `sloupec s mo\u{17E}nost\xed \u{159}azen\xed`
};
//# sourceMappingURL=cs-CZ.main.js.map
@@ -0,0 +1,24 @@
{
"name": "promise-inflight",
"version": "1.0.1",
"description": "One promise for multiple requests in flight to avoid async duplication",
"main": "inflight.js",
"files": [
"inflight.js"
],
"license": "ISC",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "Rebecca Turner <me@re-becca.org> (http://re-becca.org/)",
"devDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/iarna/promise-inflight.git"
},
"bugs": {
"url": "https://github.com/iarna/promise-inflight/issues"
},
"homepage": "https://github.com/iarna/promise-inflight#readme"
}
@@ -0,0 +1,143 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateCertificatePath = validateCertificatePath;
const x509_1 = require("@peculiar/x509");
const isCertRevoked_js_1 = require("./isCertRevoked.js");
const getWebCrypto_js_1 = require("./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
*/
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 (0, getWebCrypto_js_1.getWebCrypto)();
// Prepare to work with x5c certs
const x5cCertsParsed = x5cCertsPEM.map((certPEM) => new x509_1.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 x509_1.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 (0, isCertRevoked_js_1.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,21 @@
The MIT License (MIT)
Copyright (c) 2015 Brian Donovan
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,4 @@
{
"main": "../build/cjs/value/index.js",
"types": "../build/cjs/value/index.d.ts"
}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('fill', require('../fill'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1 @@
{"version":3,"file":"testUtils.test.js","sourceRoot":"","sources":["../src/testUtils.test.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,SAAgB,SAAS,CAAC,EAAiB,EAAE,OAAe,EAAE,QAAgB;IAC5E,OAAO,IAAI,OAAO,CAAO,UAAC,OAAO,EAAE,MAAM;QACvC,IAAM,UAAU,GAAG,WAAW,CAAC;YAC7B,IAAI,EAAE,EAAE,EAAE;gBACR,aAAa,CAAC,UAAU,CAAC,CAAC;gBAC1B,YAAY,CAAC,SAAS,CAAC,CAAC;gBACxB,OAAO,EAAE,CAAC;aACX;QACH,CAAC,EAAE,QAAQ,CAAC,CAAC;QACb,IAAM,SAAS,GAAG,UAAU,CAAC;YAC3B,aAAa,CAAC,UAAU,CAAC,CAAC;YAC1B,IAAI,EAAE,EAAE,EAAE;gBACR,OAAO,EAAE,CAAC;aACX;iBAAM;gBACL,MAAM,EAAE,CAAC;aACV;QACH,CAAC,EAAE,OAAO,CAAC,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC;AAlBD,8BAkBC"}
@@ -0,0 +1,27 @@
{
"name": "@babel/helper-validator-option",
"version": "7.27.1",
"description": "Validate plugin/preset options",
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-helper-validator-option"
},
"license": "MIT",
"publishConfig": {
"access": "public"
},
"main": "./lib/index.js",
"exports": {
".": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"./package.json": "./package.json"
},
"engines": {
"node": ">=6.9.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}
@@ -0,0 +1,55 @@
{
"name": "undici-types",
"version": "6.21.0",
"description": "A stand-alone types package for Undici",
"homepage": "https://undici.nodejs.org",
"bugs": {
"url": "https://github.com/nodejs/undici/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nodejs/undici.git"
},
"license": "MIT",
"types": "index.d.ts",
"files": [
"*.d.ts"
],
"contributors": [
{
"name": "Daniele Belardi",
"url": "https://github.com/dnlup",
"author": true
},
{
"name": "Ethan Arrowood",
"url": "https://github.com/ethan-arrowood",
"author": true
},
{
"name": "Matteo Collina",
"url": "https://github.com/mcollina",
"author": true
},
{
"name": "Matthew Aitken",
"url": "https://github.com/KhafraDev",
"author": true
},
{
"name": "Robert Nagy",
"url": "https://github.com/ronag",
"author": true
},
{
"name": "Szymon Marczak",
"url": "https://github.com/szmarczak",
"author": true
},
{
"name": "Tomas Della Vedova",
"url": "https://github.com/delvedor",
"author": true
}
]
}
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./equal"), exports);
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isLeapYear=t()}(this,(function(){"use strict";return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}}));
@@ -0,0 +1,176 @@
import { useEffect, useRef, useState, useCallback, useMemo } from 'react';
import { flushSync } from 'react-dom';
import { DEFAULT_OPTIONS, isEventSourceSupported, ReadyState, UNPARSABLE_JSON_OBJECT } from './constants';
import { createOrJoinSocket } from './create-or-join';
import { getUrl } from './get-url';
import websocketWrapper from './proxy';
import {
Options,
ReadyStateState,
SendMessage,
SendJsonMessage,
WebSocketMessage,
WebSocketHook,
WebSocketLike,
} from './types';
import { assertIsWebSocket } from './util';
export const useWebSocket = <T = unknown>(
url: string | (() => string | Promise<string>) | null,
options: Options = DEFAULT_OPTIONS,
connect: boolean = true,
): WebSocketHook<T> => {
const [lastMessage, setLastMessage] = useState<WebSocketEventMap['message'] | null>(null);
const [readyState, setReadyState] = useState<ReadyStateState>({});
const lastJsonMessage: T = useMemo(() => {
if (!options.disableJson && lastMessage) {
try {
return JSON.parse(lastMessage.data);
} catch (e) {
return UNPARSABLE_JSON_OBJECT;
}
}
return null;
}, [lastMessage, options.disableJson]);
const convertedUrl = useRef<string | null>(null);
const webSocketRef = useRef<WebSocketLike | null>(null);
const startRef = useRef<() => void>(() => void 0);
const reconnectCount = useRef<number>(0);
const lastMessageTime = useRef<number>(Date.now());
const messageQueue = useRef<WebSocketMessage[]>([]);
const webSocketProxy = useRef<WebSocketLike | null>(null);
const optionsCache = useRef<Options>(options);
optionsCache.current = options;
const readyStateFromUrl: ReadyState =
convertedUrl.current && readyState[convertedUrl.current] !== undefined ?
readyState[convertedUrl.current] :
url !== null && connect === true ?
ReadyState.CONNECTING :
ReadyState.UNINSTANTIATED;
const stringifiedQueryParams = options.queryParams ? JSON.stringify(options.queryParams) : null;
const sendMessage: SendMessage = useCallback((message, keep = true) => {
if (isEventSourceSupported && webSocketRef.current instanceof EventSource) {
console.warn('Unable to send a message from an eventSource');
return;
}
if (webSocketRef.current?.readyState === ReadyState.OPEN) {
assertIsWebSocket(webSocketRef.current, optionsCache.current.skipAssert);
webSocketRef.current.send(message);
} else if (keep) {
messageQueue.current.push(message);
}
}, []);
const sendJsonMessage: SendJsonMessage = useCallback((message, keep = true) => {
sendMessage(JSON.stringify(message), keep);
}, [sendMessage]);
const getWebSocket = useCallback(() => {
if (optionsCache.current.share !== true || (isEventSourceSupported && webSocketRef.current instanceof EventSource)) {
return webSocketRef.current;
}
if (webSocketProxy.current === null && webSocketRef.current) {
assertIsWebSocket(webSocketRef.current, optionsCache.current.skipAssert);
webSocketProxy.current = websocketWrapper(webSocketRef.current, startRef);
}
return webSocketProxy.current;
}, []);
useEffect(() => {
if (url !== null && connect === true) {
let removeListeners: () => void;
let expectClose = false;
let createOrJoin = true;
const start = async () => {
convertedUrl.current = await getUrl(url, optionsCache);
if (convertedUrl.current === null) {
console.error('Failed to get a valid URL. WebSocket connection aborted.');
convertedUrl.current = 'ABORTED';
flushSync(() => setReadyState(prev => ({
...prev,
ABORTED: ReadyState.CLOSED,
})));
return;
}
const protectedSetLastMessage = (message: WebSocketEventMap['message']) => {
if (!expectClose) {
flushSync(() => setLastMessage(message));
}
};
const protectedSetReadyState = (state: ReadyState) => {
if (!expectClose) {
flushSync(() => setReadyState(prev => ({
...prev,
...(convertedUrl.current && { [convertedUrl.current]: state }),
})));
}
};
if (createOrJoin) {
removeListeners = createOrJoinSocket(
webSocketRef,
convertedUrl.current,
protectedSetReadyState,
optionsCache,
protectedSetLastMessage,
startRef,
reconnectCount,
lastMessageTime,
sendMessage,
);
}
};
startRef.current = () => {
if (!expectClose) {
if (webSocketProxy.current) webSocketProxy.current = null;
removeListeners?.();
start();
}
};
start();
return () => {
expectClose = true;
createOrJoin = false;
if (webSocketProxy.current) webSocketProxy.current = null;
removeListeners?.();
setLastMessage(null);
};
} else if (url === null || connect === false) {
reconnectCount.current = 0; // reset reconnection attempts
setReadyState(prev => ({
...prev,
...(convertedUrl.current && { [convertedUrl.current]: ReadyState.CLOSED }),
}));
}
}, [url, connect, stringifiedQueryParams, sendMessage]);
useEffect(() => {
if (readyStateFromUrl === ReadyState.OPEN) {
messageQueue.current.splice(0).forEach(message => {
sendMessage(message);
});
}
}, [readyStateFromUrl]);
return {
sendMessage,
sendJsonMessage,
lastMessage,
lastJsonMessage,
readyState: readyStateFromUrl,
getWebSocket,
};
};
@@ -0,0 +1,24 @@
# @heroui/chip
A Chip is a small block of essential information that represent an input, attribute, or action.
Please refer to the [documentation](https://heroui.com/docs/components/chip) for more information.
## Installation
```sh
yarn add @heroui/chip
# or
npm i @heroui/chip
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1,9 @@
import { createEffect } from '../utils/create-effect.mjs';
const propEffect = /*@__PURE__*/ createEffect((subject, state, key, value) => {
return state.set(key, value, () => {
subject[key] = state.latest[key];
}, undefined, false);
});
export { propEffect };
@@ -0,0 +1,24 @@
/*!
* humanize-ms - index.js
* Copyright(c) 2014 dead_horse <dead_horse@qq.com>
* MIT Licensed
*/
'use strict';
/**
* Module dependencies.
*/
var util = require('util');
var ms = require('ms');
module.exports = function (t) {
if (typeof t === 'number') return t;
var r = ms(t);
if (r === undefined) {
var err = new Error(util.format('humanize-ms(%j) result undefined', t));
console.warn(err.stack);
}
return r;
};
@@ -0,0 +1,16 @@
name: Trigger CI
on: push
jobs:
build:
name: Dispatch to main repo
runs-on: ubuntu-latest
steps:
- name: Emit repository_dispatch
uses: mvasigh/dispatch-action@main
with:
# You should create a personal access token and store it in your repository
token: ${{ secrets.DISPATCH_AUTH }}
repo: dev
owner: codemirror
event_type: push
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 Brian Vaughn
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,2 @@
export const xlink: import("./util/schema.js").Schema;
//# sourceMappingURL=xlink.d.ts.map
@@ -0,0 +1,11 @@
import React from 'react';
import { Modifiers } from '../../modifiers';
import type { PositionedOverlayProps } from './components';
import type { DropAnimation } from './hooks';
export interface Props extends Pick<PositionedOverlayProps, 'adjustScale' | 'children' | 'className' | 'style' | 'transition'> {
dropAnimation?: DropAnimation | null | undefined;
modifiers?: Modifiers;
wrapperElement?: keyof JSX.IntrinsicElements;
zIndex?: number;
}
export declare const DragOverlay: React.MemoExoticComponent<({ adjustScale, children, dropAnimation: dropAnimationConfig, style, transition, modifiers, wrapperElement, className, zIndex, }: Props) => JSX.Element>;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A wC","129":"B"},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 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","2":"xC TC 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":"D E F A B C L M G 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 K 2C ZC 3C 4C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 OC","2":"F B FD GD HD ID NC uC JD"},G:{"1":"E 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 MD"},H:{"2":"hD"},I:{"1":"I mD nD","2":"TC J iD jD kD lD vC"},J:{"1":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:6,C:"Strict Transport Security",D:true};
@@ -0,0 +1,177 @@
/*
* 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 {
FocusEvent,
KeyboardEvent as ReactKeyboardEvent,
SyntheticEvent
} from 'react';
// Event bubbling can be problematic in real-world applications, so the default for React Spectrum components
// is not to propagate. This can be overridden by calling continuePropagation() on the event.
export type BaseEvent<T extends SyntheticEvent> = T & {
/**
* Use continuePropagation.
* @deprecated */
stopPropagation(): void,
continuePropagation(): void
}
export type KeyboardEvent = BaseEvent<ReactKeyboardEvent<any>>;
export type PointerType = 'mouse' | 'pen' | 'touch' | 'keyboard' | 'virtual';
export interface PressEvent {
/** The type of press event being fired. */
type: 'pressstart' | 'pressend' | 'pressup' | 'press',
/** The pointer type that triggered the press event. */
pointerType: PointerType,
/** The target element of the press event. */
target: Element,
/** Whether the shift keyboard modifier was held during the press event. */
shiftKey: boolean,
/** Whether the ctrl keyboard modifier was held during the press event. */
ctrlKey: boolean,
/** Whether the meta keyboard modifier was held during the press event. */
metaKey: boolean,
/** Whether the alt keyboard modifier was held during the press event. */
altKey: boolean,
/** X position relative to the target. */
x: number,
/** Y position relative to the target. */
y: number,
/**
* By default, press events stop propagation to parent elements.
* In cases where a handler decides not to handle a specific event,
* it can call `continuePropagation()` to allow a parent to handle it.
*/
continuePropagation(): void
}
export interface LongPressEvent extends Omit<PressEvent, 'type' | 'continuePropagation'> {
/** The type of long press event being fired. */
type: 'longpressstart' | 'longpressend' | 'longpress'
}
export interface HoverEvent {
/** The type of hover event being fired. */
type: 'hoverstart' | 'hoverend',
/** The pointer type that triggered the hover event. */
pointerType: 'mouse' | 'pen',
/** The target element of the hover event. */
target: HTMLElement
}
export interface KeyboardEvents {
/** Handler that is called when a key is pressed. */
onKeyDown?: (e: KeyboardEvent) => void,
/** Handler that is called when a key is released. */
onKeyUp?: (e: KeyboardEvent) => void
}
export interface FocusEvents<Target = Element> {
/** Handler that is called when the element receives focus. */
onFocus?: (e: FocusEvent<Target>) => void,
/** Handler that is called when the element loses focus. */
onBlur?: (e: FocusEvent<Target>) => void,
/** Handler that is called when the element's focus status changes. */
onFocusChange?: (isFocused: boolean) => void
}
export interface HoverEvents {
/** Handler that is called when a hover interaction starts. */
onHoverStart?: (e: HoverEvent) => void,
/** Handler that is called when a hover interaction ends. */
onHoverEnd?: (e: HoverEvent) => void,
/** Handler that is called when the hover state changes. */
onHoverChange?: (isHovering: boolean) => void
}
export interface PressEvents {
/** Handler that is called when the press is released over the target. */
onPress?: (e: PressEvent) => void,
/** Handler that is called when a press interaction starts. */
onPressStart?: (e: PressEvent) => void,
/**
* Handler that is called when a press interaction ends, either
* over the target or when the pointer leaves the target.
*/
onPressEnd?: (e: PressEvent) => void,
/** Handler that is called when the press state changes. */
onPressChange?: (isPressed: boolean) => void,
/**
* Handler that is called when a press is released over the target, regardless of
* whether it started on the target or not.
*/
onPressUp?: (e: PressEvent) => void
}
export interface FocusableProps<Target = Element> extends FocusEvents<Target>, KeyboardEvents {
/** Whether the element should receive focus on render. */
autoFocus?: boolean
}
interface BaseMoveEvent {
/** The pointer type that triggered the move event. */
pointerType: PointerType,
/** Whether the shift keyboard modifier was held during the move event. */
shiftKey: boolean,
/** Whether the ctrl keyboard modifier was held during the move event. */
ctrlKey: boolean,
/** Whether the meta keyboard modifier was held during the move event. */
metaKey: boolean,
/** Whether the alt keyboard modifier was held during the move event. */
altKey: boolean
}
export interface MoveStartEvent extends BaseMoveEvent {
/** The type of move event being fired. */
type: 'movestart'
}
export interface MoveMoveEvent extends BaseMoveEvent {
/** The type of move event being fired. */
type: 'move',
/** The amount moved in the X direction since the last event. */
deltaX: number,
/** The amount moved in the Y direction since the last event. */
deltaY: number
}
export interface MoveEndEvent extends BaseMoveEvent {
/** The type of move event being fired. */
type: 'moveend'
}
export type MoveEvent = MoveStartEvent | MoveMoveEvent | MoveEndEvent;
export interface MoveEvents {
/** Handler that is called when a move interaction starts. */
onMoveStart?: (e: MoveStartEvent) => void,
/** Handler that is called when the element is moved. */
onMove?: (e: MoveMoveEvent) => void,
/** Handler that is called when a move interaction ends. */
onMoveEnd?: (e: MoveEndEvent) => void
}
export interface ScrollEvent {
/** The amount moved in the X direction since the last event. */
deltaX: number,
/** The amount moved in the Y direction since the last event. */
deltaY: number
}
export interface ScrollEvents {
/** Handler that is called when the scroll wheel moves. */
onScroll?: (e: ScrollEvent) => void
}
@@ -0,0 +1,37 @@
var isInteger = require('./isInteger');
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
* double precision number which isn't the result of a rounded unsafe integer.
*
* **Note:** This method is based on
* [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
* @example
*
* _.isSafeInteger(3);
* // => true
*
* _.isSafeInteger(Number.MIN_VALUE);
* // => false
*
* _.isSafeInteger(Infinity);
* // => false
*
* _.isSafeInteger('3');
* // => false
*/
function isSafeInteger(value) {
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
}
module.exports = isSafeInteger;
@@ -0,0 +1,78 @@
import { Runtime } from '../parser/index.mjs';
import * as S from './mapping.mjs';
const If = (result, left, right = () => []) => (result.length === 2 ? left(result) : right());
export const GenericReferenceParameterList_0 = (input, context, result = []) => If(If(Type(input, context), ([_0, input]) => If(Runtime.Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => GenericReferenceParameterList_0(input, context, [...result, _0]), () => [result, input]);
export const GenericReferenceParameterList = (input, context = {}) => If(If(GenericReferenceParameterList_0(input, context), ([_0, input]) => If(If(If(Type(input, context), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.GenericReferenceParameterListMapping(_0, context), input]);
export const GenericReference = (input, context = {}) => If(If(Runtime.Token.Ident(input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(GenericReferenceParameterList(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.GenericReferenceMapping(_0, context), input]);
export const GenericArgumentsList_0 = (input, context, result = []) => If(If(Runtime.Token.Ident(input), ([_0, input]) => If(Runtime.Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => GenericArgumentsList_0(input, context, [...result, _0]), () => [result, input]);
export const GenericArgumentsList = (input, context = {}) => If(If(GenericArgumentsList_0(input, context), ([_0, input]) => If(If(If(Runtime.Token.Ident(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.GenericArgumentsListMapping(_0, context), input]);
export const GenericArguments = (input, context = {}) => If(If(Runtime.Token.Const('<', input), ([_0, input]) => If(GenericArgumentsList(input, context), ([_1, input]) => If(Runtime.Token.Const('>', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericArgumentsMapping(_0, context), input]);
export const KeywordString = (input, context = {}) => If(Runtime.Token.Const('string', input), ([_0, input]) => [S.KeywordStringMapping(_0, context), input]);
export const KeywordNumber = (input, context = {}) => If(Runtime.Token.Const('number', input), ([_0, input]) => [S.KeywordNumberMapping(_0, context), input]);
export const KeywordBoolean = (input, context = {}) => If(Runtime.Token.Const('boolean', input), ([_0, input]) => [S.KeywordBooleanMapping(_0, context), input]);
export const KeywordUndefined = (input, context = {}) => If(Runtime.Token.Const('undefined', input), ([_0, input]) => [S.KeywordUndefinedMapping(_0, context), input]);
export const KeywordNull = (input, context = {}) => If(Runtime.Token.Const('null', input), ([_0, input]) => [S.KeywordNullMapping(_0, context), input]);
export const KeywordInteger = (input, context = {}) => If(Runtime.Token.Const('integer', input), ([_0, input]) => [S.KeywordIntegerMapping(_0, context), input]);
export const KeywordBigInt = (input, context = {}) => If(Runtime.Token.Const('bigint', input), ([_0, input]) => [S.KeywordBigIntMapping(_0, context), input]);
export const KeywordUnknown = (input, context = {}) => If(Runtime.Token.Const('unknown', input), ([_0, input]) => [S.KeywordUnknownMapping(_0, context), input]);
export const KeywordAny = (input, context = {}) => If(Runtime.Token.Const('any', input), ([_0, input]) => [S.KeywordAnyMapping(_0, context), input]);
export const KeywordNever = (input, context = {}) => If(Runtime.Token.Const('never', input), ([_0, input]) => [S.KeywordNeverMapping(_0, context), input]);
export const KeywordSymbol = (input, context = {}) => If(Runtime.Token.Const('symbol', input), ([_0, input]) => [S.KeywordSymbolMapping(_0, context), input]);
export const KeywordVoid = (input, context = {}) => If(Runtime.Token.Const('void', input), ([_0, input]) => [S.KeywordVoidMapping(_0, context), input]);
export const Keyword = (input, context = {}) => If(If(KeywordString(input, context), ([_0, input]) => [_0, input], () => If(KeywordNumber(input, context), ([_0, input]) => [_0, input], () => If(KeywordBoolean(input, context), ([_0, input]) => [_0, input], () => If(KeywordUndefined(input, context), ([_0, input]) => [_0, input], () => If(KeywordNull(input, context), ([_0, input]) => [_0, input], () => If(KeywordInteger(input, context), ([_0, input]) => [_0, input], () => If(KeywordBigInt(input, context), ([_0, input]) => [_0, input], () => If(KeywordUnknown(input, context), ([_0, input]) => [_0, input], () => If(KeywordAny(input, context), ([_0, input]) => [_0, input], () => If(KeywordNever(input, context), ([_0, input]) => [_0, input], () => If(KeywordSymbol(input, context), ([_0, input]) => [_0, input], () => If(KeywordVoid(input, context), ([_0, input]) => [_0, input], () => [])))))))))))), ([_0, input]) => [S.KeywordMapping(_0, context), input]);
export const LiteralString = (input, context = {}) => If(Runtime.Token.String(["'", '"', '`'], input), ([_0, input]) => [S.LiteralStringMapping(_0, context), input]);
export const LiteralNumber = (input, context = {}) => If(Runtime.Token.Number(input), ([_0, input]) => [S.LiteralNumberMapping(_0, context), input]);
export const LiteralBoolean = (input, context = {}) => If(If(Runtime.Token.Const('true', input), ([_0, input]) => [_0, input], () => If(Runtime.Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.LiteralBooleanMapping(_0, context), input]);
export const Literal = (input, context = {}) => If(If(LiteralBoolean(input, context), ([_0, input]) => [_0, input], () => If(LiteralNumber(input, context), ([_0, input]) => [_0, input], () => If(LiteralString(input, context), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.LiteralMapping(_0, context), input]);
export const KeyOf = (input, context = {}) => If(If(If(Runtime.Token.Const('keyof', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.KeyOfMapping(_0, context), input]);
export const IndexArray_0 = (input, context, result = []) => If(If(If(Runtime.Token.Const('[', input), ([_0, input]) => If(Type(input, context), ([_1, input]) => If(Runtime.Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(Runtime.Token.Const('[', input), ([_0, input]) => If(Runtime.Token.Const(']', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => IndexArray_0(input, context, [...result, _0]), () => [result, input]);
export const IndexArray = (input, context = {}) => If(IndexArray_0(input, context), ([_0, input]) => [S.IndexArrayMapping(_0, context), input]);
export const Extends = (input, context = {}) => If(If(If(Runtime.Token.Const('extends', input), ([_0, input]) => If(Type(input, context), ([_1, input]) => If(Runtime.Token.Const('?', input), ([_2, input]) => If(Type(input, context), ([_3, input]) => If(Runtime.Token.Const(':', input), ([_4, input]) => If(Type(input, context), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0, context), input]);
export const Base = (input, context = {}) => If(If(If(Runtime.Token.Const('(', input), ([_0, input]) => If(Type(input, context), ([_1, input]) => If(Runtime.Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(Keyword(input, context), ([_0, input]) => [_0, input], () => If(_Object(input, context), ([_0, input]) => [_0, input], () => If(Tuple(input, context), ([_0, input]) => [_0, input], () => If(Literal(input, context), ([_0, input]) => [_0, input], () => If(Constructor(input, context), ([_0, input]) => [_0, input], () => If(Function(input, context), ([_0, input]) => [_0, input], () => If(Mapped(input, context), ([_0, input]) => [_0, input], () => If(AsyncIterator(input, context), ([_0, input]) => [_0, input], () => If(Iterator(input, context), ([_0, input]) => [_0, input], () => If(ConstructorParameters(input, context), ([_0, input]) => [_0, input], () => If(FunctionParameters(input, context), ([_0, input]) => [_0, input], () => If(InstanceType(input, context), ([_0, input]) => [_0, input], () => If(ReturnType(input, context), ([_0, input]) => [_0, input], () => If(Argument(input, context), ([_0, input]) => [_0, input], () => If(Awaited(input, context), ([_0, input]) => [_0, input], () => If(Array(input, context), ([_0, input]) => [_0, input], () => If(Record(input, context), ([_0, input]) => [_0, input], () => If(Promise(input, context), ([_0, input]) => [_0, input], () => If(Partial(input, context), ([_0, input]) => [_0, input], () => If(Required(input, context), ([_0, input]) => [_0, input], () => If(Pick(input, context), ([_0, input]) => [_0, input], () => If(Omit(input, context), ([_0, input]) => [_0, input], () => If(Exclude(input, context), ([_0, input]) => [_0, input], () => If(Extract(input, context), ([_0, input]) => [_0, input], () => If(Uppercase(input, context), ([_0, input]) => [_0, input], () => If(Lowercase(input, context), ([_0, input]) => [_0, input], () => If(Capitalize(input, context), ([_0, input]) => [_0, input], () => If(Uncapitalize(input, context), ([_0, input]) => [_0, input], () => If(Date(input, context), ([_0, input]) => [_0, input], () => If(Uint8Array(input, context), ([_0, input]) => [_0, input], () => If(GenericReference(input, context), ([_0, input]) => [_0, input], () => If(Reference(input, context), ([_0, input]) => [_0, input], () => []))))))))))))))))))))))))))))))))), ([_0, input]) => [S.BaseMapping(_0, context), input]);
export const Factor = (input, context = {}) => If(If(KeyOf(input, context), ([_0, input]) => If(Base(input, context), ([_1, input]) => If(IndexArray(input, context), ([_2, input]) => If(Extends(input, context), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.FactorMapping(_0, context), input]);
export const ExprTermTail = (input, context = {}) => If(If(If(Runtime.Token.Const('&', input), ([_0, input]) => If(Factor(input, context), ([_1, input]) => If(ExprTermTail(input, context), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0, context), input]);
export const ExprTerm = (input, context = {}) => If(If(Factor(input, context), ([_0, input]) => If(ExprTermTail(input, context), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprTermMapping(_0, context), input]);
export const ExprTail = (input, context = {}) => If(If(If(Runtime.Token.Const('|', input), ([_0, input]) => If(ExprTerm(input, context), ([_1, input]) => If(ExprTail(input, context), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTailMapping(_0, context), input]);
export const Expr = (input, context = {}) => If(If(ExprTerm(input, context), ([_0, input]) => If(ExprTail(input, context), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprMapping(_0, context), input]);
export const Type = (input, context = {}) => If(If(If(GenericArguments(input, context), ([_0, input]) => Expr(input, _0), () => []), ([_0, input]) => [_0, input], () => If(Expr(input, context), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.TypeMapping(_0, context), input]);
export const PropertyKey = (input, context = {}) => If(If(Runtime.Token.Ident(input), ([_0, input]) => [_0, input], () => If(Runtime.Token.String(["'", '"'], input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.PropertyKeyMapping(_0, context), input]);
export const Readonly = (input, context = {}) => If(If(If(Runtime.Token.Const('readonly', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ReadonlyMapping(_0, context), input]);
export const Optional = (input, context = {}) => If(If(If(Runtime.Token.Const('?', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.OptionalMapping(_0, context), input]);
export const Property = (input, context = {}) => If(If(Readonly(input, context), ([_0, input]) => If(PropertyKey(input, context), ([_1, input]) => If(Optional(input, context), ([_2, input]) => If(Runtime.Token.Const(':', input), ([_3, input]) => If(Type(input, context), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.PropertyMapping(_0, context), input]);
export const PropertyDelimiter = (input, context = {}) => If(If(If(Runtime.Token.Const(',', input), ([_0, input]) => If(Runtime.Token.Const('\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Runtime.Token.Const(';', input), ([_0, input]) => If(Runtime.Token.Const('\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(Runtime.Token.Const(',', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(Runtime.Token.Const(';', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(Runtime.Token.Const('\n', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))))), ([_0, input]) => [S.PropertyDelimiterMapping(_0, context), input]);
export const PropertyList_0 = (input, context, result = []) => If(If(Property(input, context), ([_0, input]) => If(PropertyDelimiter(input, context), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => PropertyList_0(input, context, [...result, _0]), () => [result, input]);
export const PropertyList = (input, context = {}) => If(If(PropertyList_0(input, context), ([_0, input]) => If(If(If(Property(input, context), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.PropertyListMapping(_0, context), input]);
export const _Object = (input, context = {}) => If(If(Runtime.Token.Const('{', input), ([_0, input]) => If(PropertyList(input, context), ([_1, input]) => If(Runtime.Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.ObjectMapping(_0, context), input]);
export const ElementList_0 = (input, context, result = []) => If(If(Type(input, context), ([_0, input]) => If(Runtime.Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ElementList_0(input, context, [...result, _0]), () => [result, input]);
export const ElementList = (input, context = {}) => If(If(ElementList_0(input, context), ([_0, input]) => If(If(If(Type(input, context), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ElementListMapping(_0, context), input]);
export const Tuple = (input, context = {}) => If(If(Runtime.Token.Const('[', input), ([_0, input]) => If(ElementList(input, context), ([_1, input]) => If(Runtime.Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TupleMapping(_0, context), input]);
export const Parameter = (input, context = {}) => If(If(Runtime.Token.Ident(input), ([_0, input]) => If(Runtime.Token.Const(':', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.ParameterMapping(_0, context), input]);
export const ParameterList_0 = (input, context, result = []) => If(If(Parameter(input, context), ([_0, input]) => If(Runtime.Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => ParameterList_0(input, context, [...result, _0]), () => [result, input]);
export const ParameterList = (input, context = {}) => If(If(ParameterList_0(input, context), ([_0, input]) => If(If(If(Parameter(input, context), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ParameterListMapping(_0, context), input]);
export const Function = (input, context = {}) => If(If(Runtime.Token.Const('(', input), ([_0, input]) => If(ParameterList(input, context), ([_1, input]) => If(Runtime.Token.Const(')', input), ([_2, input]) => If(Runtime.Token.Const('=>', input), ([_3, input]) => If(Type(input, context), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FunctionMapping(_0, context), input]);
export const Constructor = (input, context = {}) => If(If(Runtime.Token.Const('new', input), ([_0, input]) => If(Runtime.Token.Const('(', input), ([_1, input]) => If(ParameterList(input, context), ([_2, input]) => If(Runtime.Token.Const(')', input), ([_3, input]) => If(Runtime.Token.Const('=>', input), ([_4, input]) => If(Type(input, context), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.ConstructorMapping(_0, context), input]);
export const Mapped = (input, context = {}) => If(If(Runtime.Token.Const('{', input), ([_0, input]) => If(Runtime.Token.Const('[', input), ([_1, input]) => If(Runtime.Token.Ident(input), ([_2, input]) => If(Runtime.Token.Const('in', input), ([_3, input]) => If(Type(input, context), ([_4, input]) => If(Runtime.Token.Const(']', input), ([_5, input]) => If(Runtime.Token.Const(':', input), ([_6, input]) => If(Type(input, context), ([_7, input]) => If(Runtime.Token.Const('}', input), ([_8, input]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8], input]))))))))), ([_0, input]) => [S.MappedMapping(_0, context), input]);
export const AsyncIterator = (input, context = {}) => If(If(Runtime.Token.Const('AsyncIterator', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.AsyncIteratorMapping(_0, context), input]);
export const Iterator = (input, context = {}) => If(If(Runtime.Token.Const('Iterator', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.IteratorMapping(_0, context), input]);
export const Argument = (input, context = {}) => If(If(Runtime.Token.Const('Argument', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ArgumentMapping(_0, context), input]);
export const Awaited = (input, context = {}) => If(If(Runtime.Token.Const('Awaited', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.AwaitedMapping(_0, context), input]);
export const Array = (input, context = {}) => If(If(Runtime.Token.Const('Array', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ArrayMapping(_0, context), input]);
export const Record = (input, context = {}) => If(If(Runtime.Token.Const('Record', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const(',', input), ([_3, input]) => If(Type(input, context), ([_4, input]) => If(Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.RecordMapping(_0, context), input]);
export const Promise = (input, context = {}) => If(If(Runtime.Token.Const('Promise', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.PromiseMapping(_0, context), input]);
export const ConstructorParameters = (input, context = {}) => If(If(Runtime.Token.Const('ConstructorParameters', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ConstructorParametersMapping(_0, context), input]);
export const FunctionParameters = (input, context = {}) => If(If(Runtime.Token.Const('Parameters', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.FunctionParametersMapping(_0, context), input]);
export const InstanceType = (input, context = {}) => If(If(Runtime.Token.Const('InstanceType', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.InstanceTypeMapping(_0, context), input]);
export const ReturnType = (input, context = {}) => If(If(Runtime.Token.Const('ReturnType', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ReturnTypeMapping(_0, context), input]);
export const Partial = (input, context = {}) => If(If(Runtime.Token.Const('Partial', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.PartialMapping(_0, context), input]);
export const Required = (input, context = {}) => If(If(Runtime.Token.Const('Required', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.RequiredMapping(_0, context), input]);
export const Pick = (input, context = {}) => If(If(Runtime.Token.Const('Pick', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const(',', input), ([_3, input]) => If(Type(input, context), ([_4, input]) => If(Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.PickMapping(_0, context), input]);
export const Omit = (input, context = {}) => If(If(Runtime.Token.Const('Omit', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const(',', input), ([_3, input]) => If(Type(input, context), ([_4, input]) => If(Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.OmitMapping(_0, context), input]);
export const Exclude = (input, context = {}) => If(If(Runtime.Token.Const('Exclude', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const(',', input), ([_3, input]) => If(Type(input, context), ([_4, input]) => If(Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.ExcludeMapping(_0, context), input]);
export const Extract = (input, context = {}) => If(If(Runtime.Token.Const('Extract', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const(',', input), ([_3, input]) => If(Type(input, context), ([_4, input]) => If(Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.ExtractMapping(_0, context), input]);
export const Uppercase = (input, context = {}) => If(If(Runtime.Token.Const('Uppercase', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.UppercaseMapping(_0, context), input]);
export const Lowercase = (input, context = {}) => If(If(Runtime.Token.Const('Lowercase', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.LowercaseMapping(_0, context), input]);
export const Capitalize = (input, context = {}) => If(If(Runtime.Token.Const('Capitalize', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.CapitalizeMapping(_0, context), input]);
export const Uncapitalize = (input, context = {}) => If(If(Runtime.Token.Const('Uncapitalize', input), ([_0, input]) => If(Runtime.Token.Const('<', input), ([_1, input]) => If(Type(input, context), ([_2, input]) => If(Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.UncapitalizeMapping(_0, context), input]);
export const Date = (input, context = {}) => If(Runtime.Token.Const('Date', input), ([_0, input]) => [S.DateMapping(_0, context), input]);
export const Uint8Array = (input, context = {}) => If(Runtime.Token.Const('Uint8Array', input), ([_0, input]) => [S.Uint8ArrayMapping(_0, context), input]);
export const Reference = (input, context = {}) => If(Runtime.Token.Ident(input), ([_0, input]) => [S.ReferenceMapping(_0, context), input]);
@@ -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 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","2":"xC TC 0C 1C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 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 ZB K D E F"},E:{"1":"B C L M G aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J 2C ZC","132":"ZB K D E F A 3C 4C 5C 6C"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 GD HD ID NC uC JD OC","2":"F FD"},G:{"1":"SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC","132":"E KD vC LD MD ND OD PD QD RD"},H:{"516":"hD"},I:{"1":"I nD","2":"TC iD jD kD","132":"J lD vC mD"},J:{"1":"A","132":"D"},K:{"1":"A B C H NC uC OC"},L:{"1":"I"},M:{"132":"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":"2D","132":"1D"}},B:1,C:"Form validation",D:true};
@@ -0,0 +1,102 @@
/*
* 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 {AriaLabelingProps, DOMProps, RefObject, StyleProps} from '@react-types/shared';
import {OverlayTriggerProps, PositionProps} from '@react-types/overlays';
import {ReactElement, ReactNode} from 'react';
export type SpectrumDialogClose = (close: () => void) => ReactElement;
export interface SpectrumDialogTriggerProps extends OverlayTriggerProps, PositionProps {
/** The Dialog and its trigger element. See the DialogTrigger [Content section](#content) for more information on what to provide as children. */
children: [ReactElement, SpectrumDialogClose | ReactElement],
/**
* The type of Dialog that should be rendered. See the DialogTrigger [types section](#dialog-types) for an explanation on each.
* @default 'modal'
*/
type?: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover',
/** The type of Dialog that should be rendered when on a mobile device. See DialogTrigger [types section](#dialog-types) for an explanation on each. */
mobileType?: 'modal' | 'tray' | 'fullscreen' | 'fullscreenTakeover',
/**
* Whether a popover type Dialog's arrow should be hidden.
*/
hideArrow?: boolean,
/** The ref of the element the Dialog should visually attach itself to. Defaults to the trigger button if not defined. */
targetRef?: RefObject<HTMLElement | null>,
/** Whether a modal type Dialog should be dismissable. */
isDismissable?: boolean,
/** Whether pressing the escape key to close the dialog should be disabled. */
isKeyboardDismissDisabled?: boolean
}
export interface SpectrumDialogContainerProps {
/** The Dialog to display, if any. */
children: ReactNode,
/** Handler that is called when the 'x' button of a dismissable Dialog is clicked. */
onDismiss: () => void,
/**
* The type of Dialog that should be rendered. See the visual options below for examples of each.
* @default 'modal'
*/
type?: 'modal' | 'fullscreen' | 'fullscreenTakeover',
/** Whether the Dialog is dismissable. See the [Dialog docs](Dialog.html#dismissable-dialogs) for more details. */
isDismissable?: boolean,
/** Whether pressing the escape key to close the dialog should be disabled. */
isKeyboardDismissDisabled?: boolean
}
export interface AriaDialogProps extends DOMProps, AriaLabelingProps {
/**
* The accessibility role for the dialog.
* @default 'dialog'
*/
role?: 'dialog' | 'alertdialog'
}
export interface SpectrumDialogProps extends AriaDialogProps, StyleProps {
/** The contents of the Dialog. */
children: ReactNode,
/** The size of the Dialog. Only applies to "modal" type Dialogs. */
size?: 'S' | 'M' | 'L',
/** Whether the Dialog is dismissable. See the [examples](#examples) for more details. */
isDismissable?: boolean,
/** Handler that is called when the 'x' button of a dismissable Dialog is clicked. */
onDismiss?: () => void
}
export interface SpectrumAlertDialogProps extends DOMProps, StyleProps {
/** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */
variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning',
/** The title of the AlertDialog. */
title: string,
/** The contents of the AlertDialog. */
children: ReactNode,
/** The label to display within the cancel button. */
cancelLabel?: string,
/** The label to display within the confirm button. */
primaryActionLabel: string,
/** The label to display within the secondary button. */
secondaryActionLabel?: string,
/** Whether the primary button is disabled. */
isPrimaryActionDisabled?: boolean,
/** Whether the secondary button is disabled. */
isSecondaryActionDisabled?: boolean,
/** Handler that is called when the cancel button is pressed. */
onCancel?: () => void,
/** Handler that is called when the primary button is pressed. */
onPrimaryAction?: () => void,
/** Handler that is called when the secondary button is pressed. */
onSecondaryAction?: () => void,
/** Button to focus by default when the dialog opens. */
autoFocusButton?: 'cancel' | 'primary' | 'secondary'
// allowsKeyboardConfirmation?: boolean, // triggers primary action
}
@@ -0,0 +1,10 @@
"use strict";
const absFloor = require("./absFloor-CImRXpov.js");
const constants = require("./constants-DR3SPJ7u.js");
const parse = require("./parse.js");
function diffInMinutes(date, input, asFloat) {
const parsed = parse(input);
const output = (+date - +parsed) / constants.MS_IN_MINUTE;
return asFloat ? output : absFloor.absFloor(output);
}
module.exports = diffInMinutes;
@@ -0,0 +1,46 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = doUntil;
var _doWhilst = require('./doWhilst.js');
var _doWhilst2 = _interopRequireDefault(_doWhilst);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Like ['doWhilst']{@link module:ControlFlow.doWhilst}, except the `test` is inverted. Note the
* argument ordering differs from `until`.
*
* @name doUntil
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.doWhilst]{@link module:ControlFlow.doWhilst}
* @category Control Flow
* @param {AsyncFunction} iteratee - An async function which is called each time
* `test` fails. Invoked with (callback).
* @param {AsyncFunction} test - asynchronous truth test to perform after each
* execution of `iteratee`. Invoked with (...args, callback), where `...args` are the
* non-error args from the previous callback of `iteratee`
* @param {Function} [callback] - A callback which is called after the test
* function has passed and repeated execution of `iteratee` has stopped. `callback`
* will be passed an error and any arguments passed to the final `iteratee`'s
* callback. Invoked with (err, [results]);
* @returns {Promise} a promise, if no callback is passed
*/
function doUntil(iteratee, test, callback) {
const _test = (0, _wrapAsync2.default)(test);
return (0, _doWhilst2.default)(iteratee, (...args) => {
const cb = args.pop();
_test(...args, (err, truth) => cb(err, !truth));
}, callback);
}
module.exports = exports.default;
@@ -0,0 +1 @@
{"name":"@standard-schema/spec","version":"1.0.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532091693,"integrity":"sha512-E67dV5KShANp2OyYM+Z5kAS5+pnfkO8Y4haU+vStPjzC0A2GHgGk0C65X1e5xGVv3a7y0snCLRcl/r9ZQnPZCA==","mode":420,"size":1071},"dist/index.cjs":{"checkedAt":1794532091693,"integrity":"sha512-6SZ1Ogv4BMIzhMe5XgvAlrz1gbTm7l8owKPnP47+YpqzoaVuqdwdm2gM0T9cDLimWqFMcYEtcIJY0thSC4ySXA==","mode":420,"size":754},"dist/index.d.cts":{"checkedAt":1794532091693,"integrity":"sha512-lmV/ssnAASdH5QeiKnp4petdKBt8W3T/mKYqy3Zo3YSLLATy0WbWu5ddiIy0ZTgfRIToddIJV9Zr2p2R6SDDYw==","mode":420,"size":2499},"dist/index.js":{"checkedAt":1794532091693,"integrity":"sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==","mode":420,"size":0},"package.json":{"checkedAt":1794532091693,"integrity":"sha512-SYWPst8m8yNHGHUSFPPlMQPdPAcL6wLbPlWGAkXzkNyRvwLOtCdlQh0MLh2h12eMPuH51hb2STDNcINApNBjWw==","mode":420,"size":1115},"README.md":{"checkedAt":1794532091694,"integrity":"sha512-T7PhwYyTZWeaq9vKg6znsxoBXuM68XMEDrk+chQGriao9qTaQYF7Sge4BIwevkl8naxi+J+bTP+3XItCCEdJtQ==","mode":420,"size":17070},"dist/index.d.ts":{"checkedAt":1794532091693,"integrity":"sha512-lmV/ssnAASdH5QeiKnp4petdKBt8W3T/mKYqy3Zo3YSLLATy0WbWu5ddiIy0ZTgfRIToddIJV9Zr2p2R6SDDYw==","mode":420,"size":2499}}}
@@ -0,0 +1,685 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __esm = (fn, res) => function __init() {
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils/skip.js
function skip(characters) {
return (text, startIndex, options) => {
const backwards = Boolean(options == null ? void 0 : options.backwards);
if (startIndex === false) {
return false;
}
const { length } = text;
let cursor = startIndex;
while (cursor >= 0 && cursor < length) {
const character = text.charAt(cursor);
if (characters instanceof RegExp) {
if (!characters.test(character)) {
return cursor;
}
} else if (!characters.includes(character)) {
return cursor;
}
backwards ? cursor-- : cursor++;
}
if (cursor === -1 || cursor === length) {
return cursor;
}
return false;
};
}
var skipWhitespace, skipSpaces, skipToLineEnd, skipEverythingButNewLine;
var init_skip = __esm({
"src/utils/skip.js"() {
skipWhitespace = skip(/\s/u);
skipSpaces = skip(" ");
skipToLineEnd = skip(",; ");
skipEverythingButNewLine = skip(/[^\n\r]/u);
}
});
// src/utils/skip-inline-comment.js
function skipInlineComment(text, startIndex) {
if (startIndex === false) {
return false;
}
if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "*") {
for (let i = startIndex + 2; i < text.length; ++i) {
if (text.charAt(i) === "*" && text.charAt(i + 1) === "/") {
return i + 2;
}
}
}
return startIndex;
}
var skip_inline_comment_default;
var init_skip_inline_comment = __esm({
"src/utils/skip-inline-comment.js"() {
skip_inline_comment_default = skipInlineComment;
}
});
// src/utils/skip-newline.js
function skipNewline(text, startIndex, options) {
const backwards = Boolean(options == null ? void 0 : options.backwards);
if (startIndex === false) {
return false;
}
const character = text.charAt(startIndex);
if (backwards) {
if (text.charAt(startIndex - 1) === "\r" && character === "\n") {
return startIndex - 2;
}
if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") {
return startIndex - 1;
}
} else {
if (character === "\r" && text.charAt(startIndex + 1) === "\n") {
return startIndex + 2;
}
if (character === "\n" || character === "\r" || character === "\u2028" || character === "\u2029") {
return startIndex + 1;
}
}
return startIndex;
}
var skip_newline_default;
var init_skip_newline = __esm({
"src/utils/skip-newline.js"() {
skip_newline_default = skipNewline;
}
});
// src/utils/skip-trailing-comment.js
function skipTrailingComment(text, startIndex) {
if (startIndex === false) {
return false;
}
if (text.charAt(startIndex) === "/" && text.charAt(startIndex + 1) === "/") {
return skipEverythingButNewLine(text, startIndex);
}
return startIndex;
}
var skip_trailing_comment_default;
var init_skip_trailing_comment = __esm({
"src/utils/skip-trailing-comment.js"() {
init_skip();
skip_trailing_comment_default = skipTrailingComment;
}
});
// src/utils/get-next-non-space-non-comment-character-index.js
function getNextNonSpaceNonCommentCharacterIndex(text, startIndex) {
let oldIdx = null;
let nextIdx = startIndex;
while (nextIdx !== oldIdx) {
oldIdx = nextIdx;
nextIdx = skipSpaces(text, nextIdx);
nextIdx = skip_inline_comment_default(text, nextIdx);
nextIdx = skip_trailing_comment_default(text, nextIdx);
nextIdx = skip_newline_default(text, nextIdx);
}
return nextIdx;
}
var get_next_non_space_non_comment_character_index_default;
var init_get_next_non_space_non_comment_character_index = __esm({
"src/utils/get-next-non-space-non-comment-character-index.js"() {
init_skip();
init_skip_inline_comment();
init_skip_newline();
init_skip_trailing_comment();
get_next_non_space_non_comment_character_index_default = getNextNonSpaceNonCommentCharacterIndex;
}
});
// src/utils/has-newline.js
function hasNewline(text, startIndex, options = {}) {
const idx = skipSpaces(
text,
options.backwards ? startIndex - 1 : startIndex,
options
);
const idx2 = skip_newline_default(text, idx, options);
return idx !== idx2;
}
var has_newline_default;
var init_has_newline = __esm({
"src/utils/has-newline.js"() {
init_skip();
init_skip_newline();
has_newline_default = hasNewline;
}
});
// src/utils/is-next-line-empty.js
function isNextLineEmpty(text, startIndex) {
let oldIdx = null;
let idx = startIndex;
while (idx !== oldIdx) {
oldIdx = idx;
idx = skipToLineEnd(text, idx);
idx = skip_inline_comment_default(text, idx);
idx = skipSpaces(text, idx);
}
idx = skip_trailing_comment_default(text, idx);
idx = skip_newline_default(text, idx);
return idx !== false && has_newline_default(text, idx);
}
var is_next_line_empty_default;
var init_is_next_line_empty = __esm({
"src/utils/is-next-line-empty.js"() {
init_has_newline();
init_skip();
init_skip_inline_comment();
init_skip_newline();
init_skip_trailing_comment();
is_next_line_empty_default = isNextLineEmpty;
}
});
// src/utils/is-previous-line-empty.js
function isPreviousLineEmpty(text, startIndex) {
let idx = startIndex - 1;
idx = skipSpaces(text, idx, { backwards: true });
idx = skip_newline_default(text, idx, { backwards: true });
idx = skipSpaces(text, idx, { backwards: true });
const idx2 = skip_newline_default(text, idx, { backwards: true });
return idx !== idx2;
}
var is_previous_line_empty_default;
var init_is_previous_line_empty = __esm({
"src/utils/is-previous-line-empty.js"() {
init_skip();
init_skip_newline();
is_previous_line_empty_default = isPreviousLineEmpty;
}
});
// src/main/comments/utils.js
function describeNodeForDebugging(node) {
const nodeType = node.type || node.kind || "(unknown type)";
let nodeName = String(
node.name || node.id && (typeof node.id === "object" ? node.id.name : node.id) || node.key && (typeof node.key === "object" ? node.key.name : node.key) || node.value && (typeof node.value === "object" ? "" : String(node.value)) || node.operator || ""
);
if (nodeName.length > 20) {
nodeName = nodeName.slice(0, 19) + "\u2026";
}
return nodeType + (nodeName ? " " + nodeName : "");
}
function addCommentHelper(node, comment) {
const comments = node.comments ?? (node.comments = []);
comments.push(comment);
comment.printed = false;
comment.nodeDescription = describeNodeForDebugging(node);
}
function addLeadingComment(node, comment) {
comment.leading = true;
comment.trailing = false;
addCommentHelper(node, comment);
}
function addDanglingComment(node, comment, marker) {
comment.leading = false;
comment.trailing = false;
if (marker) {
comment.marker = marker;
}
addCommentHelper(node, comment);
}
function addTrailingComment(node, comment) {
comment.leading = false;
comment.trailing = true;
addCommentHelper(node, comment);
}
var init_utils = __esm({
"src/main/comments/utils.js"() {
}
});
// src/utils/get-alignment-size.js
function getAlignmentSize(text, tabWidth, startIndex = 0) {
let size = 0;
for (let i = startIndex; i < text.length; ++i) {
if (text[i] === " ") {
size = size + tabWidth - size % tabWidth;
} else {
size++;
}
}
return size;
}
var get_alignment_size_default;
var init_get_alignment_size = __esm({
"src/utils/get-alignment-size.js"() {
get_alignment_size_default = getAlignmentSize;
}
});
// src/utils/get-indent-size.js
function getIndentSize(value, tabWidth) {
const lastNewlineIndex = value.lastIndexOf("\n");
if (lastNewlineIndex === -1) {
return 0;
}
return get_alignment_size_default(
// All the leading whitespaces
value.slice(lastNewlineIndex + 1).match(/^[\t ]*/u)[0],
tabWidth
);
}
var get_indent_size_default;
var init_get_indent_size = __esm({
"src/utils/get-indent-size.js"() {
init_get_alignment_size();
get_indent_size_default = getIndentSize;
}
});
// node_modules/escape-string-regexp/index.js
function escapeStringRegexp(string) {
if (typeof string !== "string") {
throw new TypeError("Expected a string");
}
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
}
var init_escape_string_regexp = __esm({
"node_modules/escape-string-regexp/index.js"() {
}
});
// src/utils/get-max-continuous-count.js
function getMaxContinuousCount(text, searchString) {
const results = text.match(
new RegExp(`(${escapeStringRegexp(searchString)})+`, "gu")
);
if (results === null) {
return 0;
}
return results.reduce(
(maxCount, result) => Math.max(maxCount, result.length / searchString.length),
0
);
}
var get_max_continuous_count_default;
var init_get_max_continuous_count = __esm({
"src/utils/get-max-continuous-count.js"() {
init_escape_string_regexp();
get_max_continuous_count_default = getMaxContinuousCount;
}
});
// src/utils/get-next-non-space-non-comment-character.js
function getNextNonSpaceNonCommentCharacter(text, startIndex) {
const index = get_next_non_space_non_comment_character_index_default(text, startIndex);
return index === false ? "" : text.charAt(index);
}
var get_next_non_space_non_comment_character_default;
var init_get_next_non_space_non_comment_character = __esm({
"src/utils/get-next-non-space-non-comment-character.js"() {
init_get_next_non_space_non_comment_character_index();
get_next_non_space_non_comment_character_default = getNextNonSpaceNonCommentCharacter;
}
});
// src/utils/get-preferred-quote.js
function getPreferredQuote(text, preferredQuoteOrPreferSingleQuote) {
const preferred = preferredQuoteOrPreferSingleQuote === true || preferredQuoteOrPreferSingleQuote === SINGLE_QUOTE ? SINGLE_QUOTE : DOUBLE_QUOTE;
const alternate = preferred === SINGLE_QUOTE ? DOUBLE_QUOTE : SINGLE_QUOTE;
let preferredQuoteCount = 0;
let alternateQuoteCount = 0;
for (const character of text) {
if (character === preferred) {
preferredQuoteCount++;
} else if (character === alternate) {
alternateQuoteCount++;
}
}
return preferredQuoteCount > alternateQuoteCount ? alternate : preferred;
}
var SINGLE_QUOTE, DOUBLE_QUOTE, get_preferred_quote_default;
var init_get_preferred_quote = __esm({
"src/utils/get-preferred-quote.js"() {
SINGLE_QUOTE = "'";
DOUBLE_QUOTE = '"';
get_preferred_quote_default = getPreferredQuote;
}
});
// node_modules/emoji-regex/index.mjs
var emoji_regex_default;
var init_emoji_regex = __esm({
"node_modules/emoji-regex/index.mjs"() {
emoji_regex_default = () => {
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC6Line truncated
};
}
});
// node_modules/get-east-asian-width/lookup.js
function isFullWidth(x) {
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
}
function isWide(x) {
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9776 && x <= 9783 || x >= 9800 && x <= 9811 || x === 9855 || x >= 9866 && x <= 9871 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12773 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101631 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x >= 119552 && x <= 119638 || x >= 119648 && x <= 119670 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129673 || x >= 129679 && x <= 129734 || x >= 129742 && x <= 129756 || x >= 129759 && x <= 129769 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
}
var init_lookup = __esm({
"node_modules/get-east-asian-width/lookup.js"() {
}
});
// node_modules/get-east-asian-width/index.js
var _isNarrowWidth;
var init_get_east_asian_width = __esm({
"node_modules/get-east-asian-width/index.js"() {
init_lookup();
_isNarrowWidth = (codePoint) => !(isFullWidth(codePoint) || isWide(codePoint));
}
});
// src/utils/get-string-width.js
function getStringWidth(text) {
if (!text) {
return 0;
}
if (!notAsciiRegex.test(text)) {
return text.length;
}
text = text.replace(emoji_regex_default(), " ");
let width = 0;
for (const character of text) {
const codePoint = character.codePointAt(0);
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
continue;
}
if (codePoint >= 768 && codePoint <= 879) {
continue;
}
width += _isNarrowWidth(codePoint) ? 1 : 2;
}
return width;
}
var notAsciiRegex, get_string_width_default;
var init_get_string_width = __esm({
"src/utils/get-string-width.js"() {
init_emoji_regex();
init_get_east_asian_width();
notAsciiRegex = /[^\x20-\x7F]/u;
get_string_width_default = getStringWidth;
}
});
// src/utils/has-newline-in-range.js
function hasNewlineInRange(text, startIndex, endIndex) {
for (let i = startIndex; i < endIndex; ++i) {
if (text.charAt(i) === "\n") {
return true;
}
}
return false;
}
var has_newline_in_range_default;
var init_has_newline_in_range = __esm({
"src/utils/has-newline-in-range.js"() {
has_newline_in_range_default = hasNewlineInRange;
}
});
// src/utils/has-spaces.js
function hasSpaces(text, startIndex, options = {}) {
const idx = skipSpaces(
text,
options.backwards ? startIndex - 1 : startIndex,
options
);
return idx !== startIndex;
}
var has_spaces_default;
var init_has_spaces = __esm({
"src/utils/has-spaces.js"() {
init_skip();
has_spaces_default = hasSpaces;
}
});
// scripts/build/shims/string-replace-all.js
var stringReplaceAll, string_replace_all_default;
var init_string_replace_all = __esm({
"scripts/build/shims/string-replace-all.js"() {
stringReplaceAll = (isOptionalObject, original, pattern, replacement) => {
if (isOptionalObject && (original === void 0 || original === null)) {
return;
}
if (original.replaceAll) {
return original.replaceAll(pattern, replacement);
}
if (pattern.global) {
return original.replace(pattern, replacement);
}
return original.split(pattern).join(replacement);
};
string_replace_all_default = stringReplaceAll;
}
});
// src/utils/make-string.js
function makeString(rawText, enclosingQuote, unescapeUnnecessaryEscapes) {
const otherQuote = enclosingQuote === '"' ? "'" : '"';
const regex = /\\(.)|(["'])/gsu;
const raw = string_replace_all_default(
/* isOptionalObject */
false,
rawText,
regex,
(match, escaped, quote) => {
if (escaped === otherQuote) {
return escaped;
}
if (quote === enclosingQuote) {
return "\\" + quote;
}
if (quote) {
return quote;
}
return unescapeUnnecessaryEscapes && /^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(escaped) ? escaped : "\\" + escaped;
}
);
return enclosingQuote + raw + enclosingQuote;
}
var make_string_default;
var init_make_string = __esm({
"src/utils/make-string.js"() {
init_string_replace_all();
make_string_default = makeString;
}
});
// src/utils/public.js
var public_exports = {};
__export(public_exports, {
addDanglingComment: () => addDanglingComment,
addLeadingComment: () => addLeadingComment,
addTrailingComment: () => addTrailingComment,
getAlignmentSize: () => get_alignment_size_default,
getIndentSize: () => get_indent_size_default,
getMaxContinuousCount: () => get_max_continuous_count_default,
getNextNonSpaceNonCommentCharacter: () => get_next_non_space_non_comment_character_default,
getNextNonSpaceNonCommentCharacterIndex: () => getNextNonSpaceNonCommentCharacterIndex2,
getPreferredQuote: () => get_preferred_quote_default,
getStringWidth: () => get_string_width_default,
hasNewline: () => has_newline_default,
hasNewlineInRange: () => has_newline_in_range_default,
hasSpaces: () => has_spaces_default,
isNextLineEmpty: () => isNextLineEmpty2,
isNextLineEmptyAfterIndex: () => is_next_line_empty_default,
isPreviousLineEmpty: () => isPreviousLineEmpty2,
makeString: () => make_string_default,
skip: () => skip,
skipEverythingButNewLine: () => skipEverythingButNewLine,
skipInlineComment: () => skip_inline_comment_default,
skipNewline: () => skip_newline_default,
skipSpaces: () => skipSpaces,
skipToLineEnd: () => skipToLineEnd,
skipTrailingComment: () => skip_trailing_comment_default,
skipWhitespace: () => skipWhitespace
});
function legacyGetNextNonSpaceNonCommentCharacterIndex(text, node, locEnd) {
return get_next_non_space_non_comment_character_index_default(
text,
locEnd(node)
);
}
function getNextNonSpaceNonCommentCharacterIndex2(text, startIndex) {
return arguments.length === 2 || typeof startIndex === "number" ? get_next_non_space_non_comment_character_index_default(text, startIndex) : (
// @ts-expect-error -- expected
// eslint-disable-next-line prefer-rest-params
legacyGetNextNonSpaceNonCommentCharacterIndex(...arguments)
);
}
function legacyIsPreviousLineEmpty(text, node, locStart) {
return is_previous_line_empty_default(text, locStart(node));
}
function isPreviousLineEmpty2(text, startIndex) {
return arguments.length === 2 || typeof startIndex === "number" ? is_previous_line_empty_default(text, startIndex) : (
// @ts-expect-error -- expected
// eslint-disable-next-line prefer-rest-params
legacyIsPreviousLineEmpty(...arguments)
);
}
function legacyIsNextLineEmpty(text, node, locEnd) {
return is_next_line_empty_default(text, locEnd(node));
}
function isNextLineEmpty2(text, startIndex) {
return arguments.length === 2 || typeof startIndex === "number" ? is_next_line_empty_default(text, startIndex) : (
// @ts-expect-error -- expected
// eslint-disable-next-line prefer-rest-params
legacyIsNextLineEmpty(...arguments)
);
}
var init_public = __esm({
"src/utils/public.js"() {
init_get_next_non_space_non_comment_character_index();
init_is_next_line_empty();
init_is_previous_line_empty();
init_utils();
init_get_alignment_size();
init_get_indent_size();
init_get_max_continuous_count();
init_get_next_non_space_non_comment_character();
init_get_preferred_quote();
init_get_string_width();
init_has_newline();
init_has_newline_in_range();
init_has_spaces();
init_make_string();
init_skip();
init_skip_inline_comment();
init_skip_newline();
init_skip_trailing_comment();
}
});
// src/main/version.evaluate.js
var version_evaluate_exports = {};
__export(version_evaluate_exports, {
default: () => version_evaluate_default
});
var version_evaluate_default;
var init_version_evaluate = __esm({
"src/main/version.evaluate.js"() {
version_evaluate_default = "3.6.2";
}
});
// src/index.cjs
var prettierPromise = import("./index.mjs");
var functionNames = [
"formatWithCursor",
"format",
"check",
"resolveConfig",
"resolveConfigFile",
"clearConfigCache",
"getFileInfo",
"getSupportInfo"
];
var prettier = /* @__PURE__ */ Object.create(null);
for (const name of functionNames) {
prettier[name] = async (...args) => {
const prettier2 = await prettierPromise;
return prettier2[name](...args);
};
}
var debugApiFunctionNames = [
"parse",
"formatAST",
"formatDoc",
"printToDoc",
"printDocToString"
];
var debugApis = /* @__PURE__ */ Object.create(null);
for (const name of debugApiFunctionNames) {
debugApis[name] = async (...args) => {
const prettier2 = await prettierPromise;
return prettier2.__debug[name](...args);
};
}
prettier.__debug = debugApis;
if (true) {
prettier.util = (init_public(), __toCommonJS(public_exports));
prettier.doc = require("./doc.js");
prettier.version = (init_version_evaluate(), __toCommonJS(version_evaluate_exports)).default;
} else {
Object.defineProperties(prettier, {
util: {
get() {
try {
return null;
} catch {
}
throw new Error(
"prettier.util is not available in development CommonJS version"
);
}
},
doc: {
get() {
try {
return null;
} catch {
}
throw new Error(
"prettier.doc is not available in development CommonJS version"
);
}
}
});
prettier.version = null.version;
}
module.exports = prettier;
@@ -0,0 +1,418 @@
/*
* 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 {chain, isCtrlKeyPressed, mergeProps, openLink, useId, useRouter} from '@react-aria/utils';
import {DOMAttributes, DOMProps, FocusableElement, Key, LongPressEvent, PointerType, PressEvent, RefObject} from '@react-types/shared';
import {focusSafely, PressHookProps, useLongPress, usePress} from '@react-aria/interactions';
import {getCollectionId, isNonContiguousSelectionModifier} from './utils';
import {moveVirtualFocus} from '@react-aria/focus';
import {MultipleSelectionManager} from '@react-stately/selection';
import {useEffect, useRef} from 'react';
export interface SelectableItemOptions extends DOMProps {
/**
* An interface for reading and updating multiple selection state.
*/
selectionManager: MultipleSelectionManager,
/**
* A unique key for the item.
*/
key: Key,
/**
* Ref to the item.
*/
ref: RefObject<FocusableElement | null>,
/**
* By default, selection occurs on pointer down. This can be strange if selecting an
* item causes the UI to disappear immediately (e.g. menus).
*/
shouldSelectOnPressUp?: boolean,
/**
* Whether selection requires the pointer/mouse down and up events to occur on the same target or triggers selection on
* the target of the pointer/mouse up event.
*/
allowsDifferentPressOrigin?: boolean,
/**
* Whether the option is contained in a virtual scroller.
*/
isVirtualized?: boolean,
/**
* Function to focus the item.
*/
focus?: () => void,
/**
* Whether the option should use virtual focus instead of being focused directly.
*/
shouldUseVirtualFocus?: boolean,
/** Whether the item is disabled. */
isDisabled?: boolean,
/**
* Handler that is called when a user performs an action on the item. The exact user event depends on
* the collection's `selectionBehavior` prop and the interaction modality.
*/
onAction?: () => void,
/**
* The behavior of links in the collection.
* - 'action': link behaves like onAction.
* - 'selection': link follows selection interactions (e.g. if URL drives selection).
* - 'override': links override all other interactions (link items are not selectable).
* - 'none': links are disabled for both selection and actions (e.g. handled elsewhere).
* @default 'action'
*/
linkBehavior?: 'action' | 'selection' | 'override' | 'none'
}
export interface SelectableItemStates {
/** Whether the item is currently in a pressed state. */
isPressed: boolean,
/** Whether the item is currently selected. */
isSelected: boolean,
/** Whether the item is currently focused. */
isFocused: boolean,
/**
* Whether the item is non-interactive, i.e. both selection and actions are disabled and the item may
* not be focused. Dependent on `disabledKeys` and `disabledBehavior`.
*/
isDisabled: boolean,
/**
* Whether the item may be selected, dependent on `selectionMode`, `disabledKeys`, and `disabledBehavior`.
*/
allowsSelection: boolean,
/**
* Whether the item has an action, dependent on `onAction`, `disabledKeys`,
* and `disabledBehavior`. It may also change depending on the current selection state
* of the list (e.g. when selection is primary). This can be used to enable or disable hover
* styles or other visual indications of interactivity.
*/
hasAction: boolean
}
export interface SelectableItemAria extends SelectableItemStates {
/**
* Props to be spread on the item root node.
*/
itemProps: DOMAttributes
}
/**
* Handles interactions with an item in a selectable collection.
*/
export function useSelectableItem(options: SelectableItemOptions): SelectableItemAria {
let {
id,
selectionManager: manager,
key,
ref,
shouldSelectOnPressUp,
shouldUseVirtualFocus,
focus,
isDisabled,
onAction,
allowsDifferentPressOrigin,
linkBehavior = 'action'
} = options;
let router = useRouter();
id = useId(id);
let onSelect = (e: PressEvent | LongPressEvent | PointerEvent) => {
if (e.pointerType === 'keyboard' && isNonContiguousSelectionModifier(e)) {
manager.toggleSelection(key);
} else {
if (manager.selectionMode === 'none') {
return;
}
if (manager.isLink(key)) {
if (linkBehavior === 'selection' && ref.current) {
let itemProps = manager.getItemProps(key);
router.open(ref.current, e, itemProps.href, itemProps.routerOptions);
// Always set selected keys back to what they were so that select and combobox close.
manager.setSelectedKeys(manager.selectedKeys);
return;
} else if (linkBehavior === 'override' || linkBehavior === 'none') {
return;
}
}
if (manager.selectionMode === 'single') {
if (manager.isSelected(key) && !manager.disallowEmptySelection) {
manager.toggleSelection(key);
} else {
manager.replaceSelection(key);
}
} else if (e && e.shiftKey) {
manager.extendSelection(key);
} else if (manager.selectionBehavior === 'toggle' || (e && (isCtrlKeyPressed(e) || e.pointerType === 'touch' || e.pointerType === 'virtual'))) {
// if touch or virtual (VO) then we just want to toggle, otherwise it's impossible to multi select because they don't have modifier keys
manager.toggleSelection(key);
} else {
manager.replaceSelection(key);
}
}
};
// Focus the associated DOM node when this item becomes the focusedKey
// TODO: can't make this useLayoutEffect bacause it breaks menus inside dialogs
// However, if this is a useEffect, it runs twice and dispatches two blur events and immediately sets
// aria-activeDescendant in useAutocomplete... I've worked around this for now
useEffect(() => {
let isFocused = key === manager.focusedKey;
if (isFocused && manager.isFocused) {
if (!shouldUseVirtualFocus) {
if (focus) {
focus();
} else if (document.activeElement !== ref.current && ref.current) {
focusSafely(ref.current);
}
} else {
moveVirtualFocus(ref.current);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ref, key, manager.focusedKey, manager.childFocusStrategy, manager.isFocused, shouldUseVirtualFocus]);
isDisabled = isDisabled || manager.isDisabled(key);
// Set tabIndex to 0 if the element is focused, or -1 otherwise so that only the last focused
// item is tabbable. If using virtual focus, don't set a tabIndex at all so that VoiceOver
// on iOS 14 doesn't try to move real DOM focus to the item anyway.
let itemProps: SelectableItemAria['itemProps'] = {};
if (!shouldUseVirtualFocus && !isDisabled) {
itemProps = {
tabIndex: key === manager.focusedKey ? 0 : -1,
onFocus(e) {
if (e.target === ref.current) {
manager.setFocusedKey(key);
}
}
};
} else if (isDisabled) {
itemProps.onMouseDown = (e) => {
// Prevent focus going to the body when clicking on a disabled item.
e.preventDefault();
};
}
// With checkbox selection, onAction (i.e. navigation) becomes primary, and occurs on a single click of the row.
// Clicking the checkbox enters selection mode, after which clicking anywhere on any row toggles selection for that row.
// With highlight selection, onAction is secondary, and occurs on double click. Single click selects the row.
// With touch, onAction occurs on single tap, and long press enters selection mode.
let isLinkOverride = manager.isLink(key) && linkBehavior === 'override';
let isActionOverride = onAction && options['UNSTABLE_itemBehavior'] === 'action';
let hasLinkAction = manager.isLink(key) && linkBehavior !== 'selection' && linkBehavior !== 'none';
let allowsSelection = !isDisabled && manager.canSelectItem(key) && !isLinkOverride && !isActionOverride;
let allowsActions = (onAction || hasLinkAction) && !isDisabled;
let hasPrimaryAction = allowsActions && (
manager.selectionBehavior === 'replace'
? !allowsSelection
: !allowsSelection || manager.isEmpty
);
let hasSecondaryAction = allowsActions && allowsSelection && manager.selectionBehavior === 'replace';
let hasAction = hasPrimaryAction || hasSecondaryAction;
let modality = useRef<PointerType | null>(null);
let longPressEnabled = hasAction && allowsSelection;
let longPressEnabledOnPressStart = useRef(false);
let hadPrimaryActionOnPressStart = useRef(false);
let collectionItemProps = manager.getItemProps(key);
let performAction = (e) => {
if (onAction) {
onAction();
ref.current?.dispatchEvent(new CustomEvent('react-aria-item-action', {bubbles: true}));
}
if (hasLinkAction && ref.current) {
router.open(ref.current, e, collectionItemProps.href, collectionItemProps.routerOptions);
}
};
// By default, selection occurs on pointer down. This can be strange if selecting an
// item causes the UI to disappear immediately (e.g. menus).
// If shouldSelectOnPressUp is true, we use onPressUp instead of onPressStart.
// onPress requires a pointer down event on the same element as pointer up. For menus,
// we want to be able to have the pointer down on the trigger that opens the menu and
// the pointer up on the menu item rather than requiring a separate press.
// For keyboard events, selection still occurs on key down.
let itemPressProps: PressHookProps = {ref};
if (shouldSelectOnPressUp) {
itemPressProps.onPressStart = (e) => {
modality.current = e.pointerType;
longPressEnabledOnPressStart.current = longPressEnabled;
if (e.pointerType === 'keyboard' && (!hasAction || isSelectionKey())) {
onSelect(e);
}
};
// If allowsDifferentPressOrigin and interacting with mouse, make selection happen on pressUp (e.g. open menu on press down, selection on menu item happens on press up.)
// Otherwise, have selection happen onPress (prevents listview row selection when clicking on interactable elements in the row)
if (!allowsDifferentPressOrigin) {
itemPressProps.onPress = (e) => {
if (hasPrimaryAction || (hasSecondaryAction && e.pointerType !== 'mouse')) {
if (e.pointerType === 'keyboard' && !isActionKey()) {
return;
}
performAction(e);
} else if (e.pointerType !== 'keyboard' && allowsSelection) {
onSelect(e);
}
};
} else {
itemPressProps.onPressUp = hasPrimaryAction ? undefined : (e) => {
if (e.pointerType === 'mouse' && allowsSelection) {
onSelect(e);
}
};
itemPressProps.onPress = hasPrimaryAction ? performAction : (e) => {
if (e.pointerType !== 'keyboard' && e.pointerType !== 'mouse' && allowsSelection) {
onSelect(e);
}
};
}
} else {
itemPressProps.onPressStart = (e) => {
modality.current = e.pointerType;
longPressEnabledOnPressStart.current = longPressEnabled;
hadPrimaryActionOnPressStart.current = hasPrimaryAction;
// Select on mouse down unless there is a primary action which will occur on mouse up.
// For keyboard, select on key down. If there is an action, the Space key selects on key down,
// and the Enter key performs onAction on key up.
if (
allowsSelection && (
(e.pointerType === 'mouse' && !hasPrimaryAction) ||
(e.pointerType === 'keyboard' && (!allowsActions || isSelectionKey()))
)
) {
onSelect(e);
}
};
itemPressProps.onPress = (e) => {
// Selection occurs on touch up. Primary actions always occur on pointer up.
// Both primary and secondary actions occur on Enter key up. The only exception
// is secondary actions, which occur on double click with a mouse.
if (
e.pointerType === 'touch' ||
e.pointerType === 'pen' ||
e.pointerType === 'virtual' ||
(e.pointerType === 'keyboard' && hasAction && isActionKey()) ||
(e.pointerType === 'mouse' && hadPrimaryActionOnPressStart.current)
) {
if (hasAction) {
performAction(e);
} else if (allowsSelection) {
onSelect(e);
}
}
};
}
itemProps['data-collection'] = getCollectionId(manager.collection);
itemProps['data-key'] = key;
itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
// When using virtual focus, make sure the focused key gets updated on press.
if (shouldUseVirtualFocus) {
itemPressProps = mergeProps(itemPressProps, {
onPressStart(e) {
if (e.pointerType !== 'touch') {
manager.setFocused(true);
manager.setFocusedKey(key);
}
},
onPress(e) {
if (e.pointerType === 'touch') {
manager.setFocused(true);
manager.setFocusedKey(key);
}
}
});
}
if (collectionItemProps) {
for (let key of ['onPressStart', 'onPressEnd', 'onPressChange', 'onPress', 'onPressUp', 'onClick']) {
if (collectionItemProps[key]) {
itemPressProps[key] = chain(itemPressProps[key], collectionItemProps[key]);
}
}
}
let {pressProps, isPressed} = usePress(itemPressProps);
// Double clicking with a mouse with selectionBehavior = 'replace' performs an action.
let onDoubleClick = hasSecondaryAction ? (e) => {
if (modality.current === 'mouse') {
e.stopPropagation();
e.preventDefault();
performAction(e);
}
} : undefined;
// Long pressing an item with touch when selectionBehavior = 'replace' switches the selection behavior
// to 'toggle'. This changes the single tap behavior from performing an action (i.e. navigating) to
// selecting, and may toggle the appearance of a UI affordance like checkboxes on each item.
let {longPressProps} = useLongPress({
isDisabled: !longPressEnabled,
onLongPress(e) {
if (e.pointerType === 'touch') {
onSelect(e);
manager.setSelectionBehavior('toggle');
}
}
});
// Prevent native drag and drop on long press if we also select on long press.
// Once the user is in selection mode, they can long press again to drag.
// Use a capturing listener to ensure this runs before useDrag, regardless of
// the order the props get merged.
let onDragStartCapture = e => {
if (modality.current === 'touch' && longPressEnabledOnPressStart.current) {
e.preventDefault();
}
};
// Prevent default on link clicks so that we control exactly
// when they open (to match selection behavior).
let onClick = linkBehavior !== 'none' && manager.isLink(key) ? e => {
if (!(openLink as any).isOpening) {
e.preventDefault();
}
} : undefined;
return {
itemProps: mergeProps(
itemProps,
allowsSelection || hasPrimaryAction || (shouldUseVirtualFocus && !isDisabled) ? pressProps : {},
longPressEnabled ? longPressProps : {},
{onDoubleClick, onDragStartCapture, onClick, id},
// Prevent DOM focus from moving on mouse down when using virtual focus
shouldUseVirtualFocus ? {onMouseDown: e => e.preventDefault()} : undefined
),
isPressed,
isSelected: manager.isSelected(key),
isFocused: manager.isFocused && manager.focusedKey === key,
isDisabled,
allowsSelection,
hasAction
};
}
function isActionKey() {
let event = window.event as KeyboardEvent;
return event?.key === 'Enter';
}
function isSelectionKey() {
let event = window.event as KeyboardEvent;
return event?.key === ' ' || event?.code === 'Space';
}
@@ -0,0 +1,5 @@
'use strict';
module.exports = function isStringOrUndefined(item) {
return typeof item === 'string' || typeof item === 'undefined';
};
@@ -0,0 +1,6 @@
export {
ErrorBoundary,
ErrorBoundaryContext,
useErrorBoundary,
withErrorBoundary
} from "./react-error-boundary.cjs.js";
@@ -0,0 +1 @@
{"name":"intl-messageformat","version":"10.7.18","requiresBuild":false,"files":{"lib/src/core.js":{"checkedAt":1794532106121,"integrity":"sha512-OkoXrIdxz+OajubojoEovWy710Vfof/moU8QisSLNSiDSSjeL3e/jo+lP0kS9btciahDIq312e21L/BbPMMsPw==","mode":420,"size":8513},"src/core.js":{"checkedAt":1794532106122,"integrity":"sha512-D7NmbgEaz8oR04nMe249ADA8VW7rA2DoHnraSoIkcxNaH10KscZbmm47NFcjCUPYKoYgPAC7Ic8Vxa2xaes8XA==","mode":420,"size":8876},"lib/src/error.js":{"checkedAt":1794532106122,"integrity":"sha512-lwWIt8nUdhz41Shxc+Th8KP+DrMO7IDZJ25bAXkSxy1mHuZDMTuE/5ed6dm/q7QRxgE9U/Sx9w8cRfm2Hvqqqg==","mode":420,"size":2285},"src/error.js":{"checkedAt":1794532106122,"integrity":"sha512-ss1/Yg8vnQxqOuyxzAboLTsHLO1Eszcx078oBtHf6Sbx5IQnkEeSolXRb2n/Eb0Q4I1ROCTsTp/Rv4g1Ezu3Jg==","mode":420,"size":2608},"lib/src/formatters.js":{"checkedAt":1794532106122,"integrity":"sha512-/+fAe7AF9x9l4PtpRAM4UMlYtnEtM3vsTHNzOWGwA2iortqd6ZvnqrYUvLM2qHv34iX+BjenW5lk22fIMKkEdg==","mode":420,"size":7024},"src/formatters.js":{"checkedAt":1794532106122,"integrity":"sha512-LJX1Nr4zDsQf+uk5aO6+zwZs3Aq3s77IW7ao6lGK6843eh7YCjollWO7kLDFscLyTjQP3NGAOmdcNELiyv2tyw==","mode":420,"size":7446},"index.js":{"checkedAt":1794532106122,"integrity":"sha512-F4TGKwQ792E2x8xBmPEloojuZEt/g5ICI6av369R05UQwovMw/00RecoQsEKe7DajAUpCPQLNUycaWXmMRNgXg==","mode":420,"size":675},"lib/index.js":{"checkedAt":1794532106122,"integrity":"sha512-O7zyXzhclKe4L0Crhxccx3YjVjUXKv8whIMrH3368bdKEQI3dC7329pVbQnnPAGZJSk35Gp/aZP/9Em0VciUNw==","mode":420,"size":354},"intl-messageformat.esm.js":{"checkedAt":1794532106123,"integrity":"sha512-h8DMrNz3MkNiqtDUgiahIs6L0zVJGbssbc5DelXeD3v/xXRNEBuH1j2ugrIc8EE75x9HeGjFU7Erol2fQ/JI8w==","mode":420,"size":81646},"intl-messageformat.iife.js":{"checkedAt":1794532106123,"integrity":"sha512-8C+BJ3INLXwoA/acGEn8G0LDa4OrsZmVCkduke6CYDd8g/D5b1P/ZC5NJv66c+6wmdFtQW1BVx6v5hpRWDfoKA==","mode":420,"size":91494},"package.json":{"checkedAt":1794532106123,"integrity":"sha512-Xnl7IBxIufzzb623mXn0ElE7/SJatsudU6+nClXFquR1xQuDQ2r1W4NE5noFO+Ku1Vbu++b6wXxkF24ZpLLVYQ==","mode":420,"size":1130},"LICENSE.md":{"checkedAt":1794532106123,"integrity":"sha512-hrC/iMWEpMI3L0SUCwim8nOfRNn8BzwLkZzcA4U4vSgGg4DIBUY/0bpt6+8s9fQsrqiNIVfyGmcBVfk+yf+rSw==","mode":420,"size":1560},"README.md":{"checkedAt":1794532106123,"integrity":"sha512-D6ocQG3mffTzMSinxUx9Uu/Aj4Kqt6SfrgSbNEP2ow5zxrYXCgVHOsb+LntBcyhvgFT203Utg1qezVJM9jR6ag==","mode":420,"size":101},"lib/src/core.d.ts":{"checkedAt":1794532106123,"integrity":"sha512-8SE+A4+XgX4YFtTapLeSBp6/Cb5IQdpVSI6sHAzun2797qMkKvJQP1Rj2IkpLj9ERqkL2MJ1mHTbl33/NFFVpQ==","mode":420,"size":1289},"src/core.d.ts":{"checkedAt":1794532106123,"integrity":"sha512-8SE+A4+XgX4YFtTapLeSBp6/Cb5IQdpVSI6sHAzun2797qMkKvJQP1Rj2IkpLj9ERqkL2MJ1mHTbl33/NFFVpQ==","mode":420,"size":1289},"lib/src/error.d.ts":{"checkedAt":1794532106123,"integrity":"sha512-K+sSF0Me9oUuW+6LhvFu2jqKCZzGzBypu4oYiJL1QFJwnq2JZ8THVUUD2Gr4Mu3qQBZUcIs8K+dTvipx57d3wg==","mode":420,"size":980},"src/error.d.ts":{"checkedAt":1794532106123,"integrity":"sha512-K+sSF0Me9oUuW+6LhvFu2jqKCZzGzBypu4oYiJL1QFJwnq2JZ8THVUUD2Gr4Mu3qQBZUcIs8K+dTvipx57d3wg==","mode":420,"size":980},"lib/src/formatters.d.ts":{"checkedAt":1794532106124,"integrity":"sha512-g4dX2kqBTKTWWHb3K2Zd/Fi7mIz8zt9oZCGWON/SA1PCfqe68fyVxahN0F6b9zqK5yXmlcjD6tVxWGpk686KNA==","mode":420,"size":2053},"src/formatters.d.ts":{"checkedAt":1794532106124,"integrity":"sha512-g4dX2kqBTKTWWHb3K2Zd/Fi7mIz8zt9oZCGWON/SA1PCfqe68fyVxahN0F6b9zqK5yXmlcjD6tVxWGpk686KNA==","mode":420,"size":2053},"index.d.ts":{"checkedAt":1794532106124,"integrity":"sha512-3/gbOl455wdZ9BKSGSZe2PZTQ/ygZTFnozlhnKOYYwijL5uMcVJhEZ2XtgH3KhXFCqj9PenKoXOpma9ZCk2nMw==","mode":420,"size":203},"lib/index.d.ts":{"checkedAt":1794532106124,"integrity":"sha512-3/gbOl455wdZ9BKSGSZe2PZTQ/ygZTFnozlhnKOYYwijL5uMcVJhEZ2XtgH3KhXFCqj9PenKoXOpma9ZCk2nMw==","mode":420,"size":203}}}
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var CanvasRole = {
relatedConcepts: [{
module: 'HTML',
concept: {
name: 'canvas'
}
}],
type: 'widget'
};
var _default = CanvasRole;
exports.default = _default;
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC,GAED,gEAAgE;AAChE,gGAAgG;;AAKhG,MAAM,mCAAa,SAAS,gFAAgF;AAC5G,MAAM,0CAAoB,SAAS,4CAA4C;AAC/E,MAAM,4CAAsB;AAC5B,MAAM,0CAAoB;AAC1B,MAAM,4CAAsB;AAE5B,SAAS,yCAAmB,KAAa,EAAE,IAAY,EAAE,KAAa,EAAE,GAAW;IACjF,OAAO,MACL,KAAK,IAAI,CAAC,OAAQ,CAAA,QAAQ,CAAA,KAC1B,AAAC,CAAA,OAAO,CAAA,IAAK,MACb,KAAK,KAAK,CAAC,AAAC,CAAA,IAAI,KAAK,IAAG,IAAK,MAC7B,QAAQ;AACZ;AAEA,SAAS,yCAAmB,QAAkB,EAAE,KAAa,EAAE,EAAU;IACvE,IAAI,OAAO,KAAK,KAAK,CAAC,AAAC,CAAA,KAAM,CAAA,KAAK,KAAI,IAAK,KAAI,IAAK;IACpD,IAAI,QAAQ,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,AAAC,CAAA,KAAM,CAAA,KAAK,yCAAmB,OAAO,MAAM,GAAG,EAAC,CAAC,IAAK,QAAQ;IACjG,IAAI,MAAM,KAAK,yCAAmB,OAAO,MAAM,OAAO,KAAK;IAE3D,OAAO,IAAI,CAAA,GAAA,yCAAW,EAAE,UAAU,MAAM,OAAO;AACjD;AAEA,SAAS,iCAAW,IAAY;IAC9B,OAAO,AAAC,CAAA,KAAK,KAAK,IAAG,IAAK,KAAK;AACjC;AASO,MAAM;IAGX,cAAc,EAAU,EAAgB;QACtC,OAAO,yCAAmB,IAAI,EAAE,kCAAY;IAC9C;IAEA,YAAY,IAAqB,EAAU;QACzC,OAAO,yCAAmB,kCAAY,KAAK,IAAI,EAAE,KAAK,KAAK,EAAE,KAAK,GAAG;IACvE;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,SAAS,KAAK,KAAK,KAAK,GAAG;QAC/B,IAAI,KAAK,KAAK,KAAK,MAAM,iCAAW,KAAK,IAAI,GAC3C;QAGF,OAAO;IACT;IAEA,kBAA0B;QACxB,OAAO;IACT;IAEA,cAAc,IAAqB,EAAU;QAC3C,OAAO,iCAAW,KAAK,IAAI,IAAI,MAAM;IACvC;IAEA,gBAAwB;QACtB,iBAAiB;QACjB,OAAO;IACT;IAEA,UAAoB;QAClB,OAAO;YAAC;SAAK;IACf;;aAlCA,aAAiC;;AAmCnC;AASO,MAAM,kDAA+B;IAG1C,cAAc,EAAU,EAAgB;QACtC,OAAO,yCAAmB,IAAI,EAAE,yCAAmB;IACrD;IAEA,YAAY,IAAqB,EAAU;QACzC,OAAO,yCAAmB,yCAAmB,KAAK,IAAI,EAAE,KAAK,KAAK,EAAE,KAAK,GAAG;IAC9E;;QATK,qBACL,aAAiC;;AASnC;AAEA,4CAA4C;AAC5C,MAAM,sCAAgB;AACtB,IAAI;AACJ,IAAI;AAEJ,SAAS,wCAAkB,IAAY;IACrC,OAAO,4CAAsB,+CAAyB,CAAC,OAAO,0CAAoB;AACpF;AAEA,SAAS,0CAAoB,IAAY,EAAE,KAAa;IACtD,IAAI,MAAO,OAAO;IAClB,IAAI,OAAQ,QAAS,KAAM,CAAA,QAAQ,CAAA;IACnC,IAAI,AAAC,CAAA,0CAAoB,CAAC,IAAI,GAAG,IAAG,MAAO,GACzC,OAAO;SAEP,OAAO;AAEX;AAEA,SAAS,yCAAmB,IAAY,EAAE,KAAa;IACrD,IAAI,MAAM,wCAAkB;IAC5B,IAAK,IAAI,IAAI,GAAG,IAAI,OAAO,IACzB,OAAO,0CAAoB,MAAM;IAEnC,OAAO;AACT;AAEA,SAAS,yCAAmB,IAAY;IACtC,OAAO,+CAAyB,CAAC,OAAO,IAAI,0CAAoB,GAAG,+CAAyB,CAAC,OAAO,0CAAoB;AAC1H;AASO,MAAM,kDAAgC;IAsB3C,cAAc,EAAU,EAAgB;QACtC,IAAI,OAAO,KAAK;QAChB,IAAI,YAAY,wCAAkB;QAClC,IAAI,UAAU,wCAAkB;QAChC,IAAI,OAAO,aAAa,OAAO,SAC7B,OAAO,KAAK,CAAC,cAAc;aACtB;YACL,IAAI,IAAI,4CAAsB;YAC9B,IAAI,IAAI;YACR,IAAI,IAAI;YACR,MAAO,IAAI,EAAG;gBACZ;gBACA,IAAI,OAAO,wCAAkB,KAAK;gBAClC,IAAI,aAAa,yCAAmB;gBACpC,IAAI,MAAM,YAAY;oBACpB,IAAI;oBACJ;gBACF,OAAO,IAAI,IAAI,YAAY;oBACzB,IAAI,cAAc,0CAAoB,GAAG;oBACzC,IAAI;oBACJ,MAAO,IAAI,YAAa;wBACtB,KAAK;wBACL;wBACA,cAAc,0CAAoB,GAAG;oBACvC;oBACA;gBACF;YACF;YAEA,OAAO,IAAI,CAAA,GAAA,yCAAW,EAAE,IAAI,EAAE,GAAG,GAAI,OAAO,yCAAmB,GAAG,KAAK;QACzE;IACF;IAEA,YAAY,IAAqB,EAAU;QACzC,IAAI,KAAK,IAAI,GAAG,6CAAuB,KAAK,IAAI,GAAG,yCACjD,OAAO,KAAK,CAAC,YAAY;QAG3B,OAAO,mCAAa,yCAAmB,KAAK,IAAI,EAAE,KAAK,KAAK,IAAK,CAAA,KAAK,GAAG,GAAG,CAAA;IAC9E;IAEA,eAAe,IAAqB,EAAU;QAC5C,IAAI,KAAK,IAAI,GAAG,6CAAuB,KAAK,IAAI,GAAG,yCACjD,OAAO,KAAK,CAAC,eAAe;QAG9B,OAAO,0CAAoB,KAAK,IAAI,EAAE,KAAK,KAAK;IAClD;IAEA,cAAc,IAAqB,EAAU;QAC3C,IAAI,KAAK,IAAI,GAAG,6CAAuB,KAAK,IAAI,GAAG,yCACjD,OAAO,KAAK,CAAC,cAAc;QAG7B,OAAO,yCAAmB,KAAK,IAAI;IACrC;IA1EA,aAAc;QACZ,KAAK,SAHP,aAAiC;QAI/B,IAAI,CAAC,4CACH,6CAAuB,IAAI,YAAY,WAAW,IAAI,CAAC,KAAK,sCAAgB,CAAA,IAAK,EAAE,UAAU,CAAC,IAAI,MAAM;QAG1G,IAAI,CAAC,iDAA2B;YAC9B,kDAA4B,IAAI,YAAY,0CAAoB,4CAAsB;YAEtF,IAAI,YAAY;YAChB,IAAK,IAAI,OAAO,2CAAqB,QAAQ,yCAAmB,OAAQ;gBACtE,+CAAyB,CAAC,OAAO,0CAAoB,GAAG;gBACxD,IAAK,IAAI,IAAI,GAAG,KAAK,IAAI,IACvB,aAAa,0CAAoB,MAAM;YAE3C;QACF;IACF;AA0DF","sources":["packages/@internationalized/date/src/calendars/IslamicCalendar.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// Portions of the code in this file are based on code from ICU.\n// Original licensing can be found in the NOTICE file in the root directory of this source tree.\n\nimport {AnyCalendarDate, Calendar, CalendarIdentifier} from '../types';\nimport {CalendarDate} from '../CalendarDate';\n\nconst CIVIL_EPOC = 1948440; // CE 622 July 16 Friday (Julian calendar) / CE 622 July 19 (Gregorian calendar)\nconst ASTRONOMICAL_EPOC = 1948439; // CE 622 July 15 Thursday (Julian calendar)\nconst UMALQURA_YEAR_START = 1300;\nconst UMALQURA_YEAR_END = 1600;\nconst UMALQURA_START_DAYS = 460322;\n\nfunction islamicToJulianDay(epoch: number, year: number, month: number, day: number): number {\n return day +\n Math.ceil(29.5 * (month - 1)) +\n (year - 1) * 354 +\n Math.floor((3 + 11 * year) / 30) +\n epoch - 1;\n}\n\nfunction julianDayToIslamic(calendar: Calendar, epLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"InversifyContainerErrorKind.js","sourceRoot":"","sources":["../../../../src/error/models/InversifyContainerErrorKind.ts"],"names":[],"mappings":";;;AAAA,IAAY,2BAEX;AAFD,WAAY,2BAA2B;IACrC,qGAAgB,CAAA;AAClB,CAAC,EAFW,2BAA2B,2CAA3B,2BAA2B,QAEtC"}
@@ -0,0 +1,15 @@
import metaMap from './_metaMap.js';
import noop from './noop.js';
/**
* Gets metadata for `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {*} Returns the metadata for `func`.
*/
var getData = !metaMap ? noop : function(func) {
return metaMap.get(func);
};
export default getData;
@@ -0,0 +1,9 @@
import { memo } from 'motion-utils';
import { supportsFlags } from './flags.mjs';
function memoSupports(callback, supportsFlag) {
const memoized = memo(callback);
return () => supportsFlags[supportsFlag] ?? memoized();
}
export { memoSupports };
@@ -0,0 +1,20 @@
var coreJsData = require('./_coreJsData');
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
module.exports = isMasked;
@@ -0,0 +1,2 @@
'use strict';
require('../register')('native-promise-only', {Promise: require('native-promise-only')})
@@ -0,0 +1,530 @@
import type { EnhancedStore } from '@reduxjs/toolkit'
import { configureStore, createSlice, createAction } from '@reduxjs/toolkit'
import type { PayloadAction } from '@reduxjs/toolkit'
import type {
AbortSignalWithReason,
ForkedTaskExecutor,
TaskResult,
} from '../types'
import { createListenerMiddleware, TaskAbortError } from '../index'
import {
listenerCancelled,
listenerCompleted,
taskCancelled,
taskCompleted,
} from '../exceptions'
function delay(ms: number) {
return new Promise((resolve) => setTimeout(resolve, ms))
}
// @see https://deno.land/std@0.95.0/async/deferred.ts (MIT)
export interface Deferred<T> extends Promise<T> {
resolve(value?: T | PromiseLike<T>): void
reject(reason?: any): void
}
/** Creates a Promise with the `reject` and `resolve` functions
* placed as methods on the promise object itself. It allows you to do:
*
* const p = deferred<number>();
* // ...
* p.resolve(42);
*/
export function deferred<T>(): Deferred<T> {
let methods
const promise = new Promise<T>((resolve, reject): void => {
methods = { resolve, reject }
})
return Object.assign(promise, methods) as Deferred<T>
}
interface CounterSlice {
value: number
}
describe('fork', () => {
const counterSlice = createSlice({
name: 'counter',
initialState: { value: 0 } as CounterSlice,
reducers: {
increment(state) {
state.value += 1
},
decrement(state) {
state.value -= 1
},
// Use the PayloadAction type to declare the contents of `action.payload`
incrementByAmount: (state, action: PayloadAction<number>) => {
state.value += action.payload
},
},
})
const { increment, decrement, incrementByAmount } = counterSlice.actions
let listenerMiddleware = createListenerMiddleware()
let { middleware, startListening, stopListening } = listenerMiddleware
let store = configureStore({
reducer: counterSlice.reducer,
middleware: (gDM) => gDM().prepend(middleware),
})
beforeEach(() => {
listenerMiddleware = createListenerMiddleware()
middleware = listenerMiddleware.middleware
startListening = listenerMiddleware.startListening
stopListening = listenerMiddleware.stopListening
store = configureStore({
reducer: counterSlice.reducer,
middleware: (gDM) => gDM().prepend(middleware),
})
})
it('runs executors in the next microtask', async () => {
let hasRunSyncExector = false
let hasRunAsyncExecutor = false
startListening({
actionCreator: increment,
effect: async (_, listenerApi) => {
listenerApi.fork(() => {
hasRunSyncExector = true
})
listenerApi.fork(async () => {
hasRunAsyncExecutor = true
})
},
})
store.dispatch(increment())
expect(hasRunSyncExector).toBe(false)
expect(hasRunAsyncExecutor).toBe(false)
await Promise.resolve()
expect(hasRunSyncExector).toBe(true)
expect(hasRunAsyncExecutor).toBe(true)
})
test('forkedTask.result rejects TaskAbortError if listener is cancelled', async () => {
const deferredForkedTaskError = deferred()
startListening({
actionCreator: increment,
async effect(_, listenerApi) {
listenerApi.cancelActiveListeners()
listenerApi
.fork(async () => {
await delay(10)
throw new Error('unreachable code')
})
.result.then(
deferredForkedTaskError.resolve,
deferredForkedTaskError.resolve,
)
},
})
store.dispatch(increment())
store.dispatch(increment())
expect(await deferredForkedTaskError).toEqual(
new TaskAbortError(listenerCancelled),
)
})
it('synchronously throws TypeError error if the provided executor is not a function', () => {
const invalidExecutors = [null, {}, undefined, 1]
startListening({
predicate: () => true,
effect: async (_, listenerApi) => {
invalidExecutors.forEach((invalidExecutor) => {
let caughtError
try {
listenerApi.fork(invalidExecutor as any)
} catch (err) {
caughtError = err
}
expect(caughtError).toBeInstanceOf(TypeError)
})
},
})
store.dispatch(increment())
expect.assertions(invalidExecutors.length)
})
it('does not run an executor if the task is synchronously cancelled', async () => {
const storeStateAfter = deferred()
startListening({
actionCreator: increment,
effect: async (action, listenerApi) => {
const forkedTask = listenerApi.fork(() => {
listenerApi.dispatch(decrement())
listenerApi.dispatch(decrement())
listenerApi.dispatch(decrement())
})
forkedTask.cancel()
const result = await forkedTask.result
storeStateAfter.resolve(listenerApi.getState())
},
})
store.dispatch(increment())
await expect(storeStateAfter).resolves.toEqual({ value: 1 })
})
it.each<{
desc: string
executor: ForkedTaskExecutor<any>
cancelAfterMs?: number
expected: TaskResult<any>
}>([
{
desc: 'sync exec - success',
executor: () => 42,
expected: { status: 'ok', value: 42 },
},
{
desc: 'sync exec - error',
executor: () => {
throw new Error('2020')
},
expected: { status: 'rejected', error: new Error('2020') },
},
{
desc: 'sync exec - sync cancel',
executor: () => 42,
cancelAfterMs: -1,
expected: {
status: 'cancelled',
error: new TaskAbortError(taskCancelled),
},
},
{
desc: 'sync exec - async cancel',
executor: () => 42,
cancelAfterMs: 0,
expected: { status: 'ok', value: 42 },
},
{
desc: 'async exec - async cancel',
executor: async (forkApi) => {
await forkApi.delay(100)
throw new Error('2020')
},
cancelAfterMs: 10,
expected: {
status: 'cancelled',
error: new TaskAbortError(taskCancelled),
},
},
{
desc: 'async exec - success',
executor: async () => {
await delay(20)
return Promise.resolve(21)
},
expected: { status: 'ok', value: 21 },
},
{
desc: 'async exec - error',
executor: async () => {
await Promise.resolve()
throw new Error('2020')
},
expected: { status: 'rejected', error: new Error('2020') },
},
{
desc: 'async exec - success with forkApi.pause',
executor: async (forkApi) => {
return forkApi.pause(Promise.resolve(2))
},
expected: { status: 'ok', value: 2 },
},
{
desc: 'async exec - error with forkApi.pause',
executor: async (forkApi) => {
return forkApi.pause(Promise.reject(22))
},
expected: { status: 'rejected', error: 22 },
},
{
desc: 'async exec - success with forkApi.delay',
executor: async (forkApi) => {
await forkApi.delay(10)
return 5
},
expected: { status: 'ok', value: 5 },
},
])('$desc', async ({ executor, expected, cancelAfterMs }) => {
let deferredResult = deferred()
let forkedTask: any = {}
startListening({
predicate: () => true,
effect: async (_, listenerApi) => {
forkedTask = listenerApi.fork(executor)
deferredResult.resolve(await forkedTask.result)
},
})
store.dispatch({ type: '' })
if (typeof cancelAfterMs === 'number') {
if (cancelAfterMs < 0) {
forkedTask.cancel()
} else {
await delay(cancelAfterMs)
forkedTask.cancel()
}
}
const result = await deferredResult
expect(result).toEqual(expected)
})
describe('forkAPI', () => {
test('forkApi.delay rejects as soon as the task is cancelled', async () => {
let deferredResult = deferred()
startListening({
actionCreator: increment,
effect: async (_, listenerApi) => {
const forkedTask = listenerApi.fork(async (forkApi) => {
await forkApi.delay(100)
return 4
})
await listenerApi.delay(10)
forkedTask.cancel()
deferredResult.resolve(await forkedTask.result)
},
})
store.dispatch(increment())
expect(await deferredResult).toEqual({
status: 'cancelled',
error: new TaskAbortError(taskCancelled),
})
})
test('forkApi.delay rejects as soon as the parent listener is cancelled', async () => {
let deferredResult = deferred()
startListening({
actionCreator: increment,
effect: async (_, listenerApi) => {
listenerApi.cancelActiveListeners()
await listenerApi.fork(async (forkApi) => {
await forkApi
.delay(100)
.then(deferredResult.resolve, deferredResult.resolve)
return 4
}).result
deferredResult.resolve(new Error('unreachable'))
},
})
store.dispatch(increment())
await Promise.resolve()
store.dispatch(increment())
expect(await deferredResult).toEqual(
new TaskAbortError(listenerCancelled),
)
})
it.each([
{
autoJoin: true,
expectedAbortReason: taskCompleted,
cancelListener: false,
},
{
autoJoin: false,
expectedAbortReason: listenerCompleted,
cancelListener: false,
},
{
autoJoin: true,
expectedAbortReason: listenerCancelled,
cancelListener: true,
},
{
autoJoin: false,
expectedAbortReason: listenerCancelled,
cancelListener: true,
},
])(
'signal is $expectedAbortReason when autoJoin: $autoJoin, cancelListener: $cancelListener',
async ({ autoJoin, cancelListener, expectedAbortReason }) => {
let deferredResult = deferred()
const unsubscribe = startListening({
actionCreator: increment,
async effect(_, listenerApi) {
listenerApi.fork(
async (forkApi) => {
forkApi.signal.addEventListener('abort', () => {
deferredResult.resolve(
(forkApi.signal as AbortSignalWithReason<unknown>).reason,
)
})
await forkApi.delay(10)
},
{ autoJoin },
)
},
})
store.dispatch(increment())
// let task start
await Promise.resolve()
if (cancelListener) unsubscribe({ cancelActive: true })
expect(await deferredResult).toBe(expectedAbortReason)
},
)
test('fork.delay does not trigger unhandledRejections for completed or cancelled tasks', async () => {
let deferredCompletedEvt = deferred()
let deferredCancelledEvt = deferred()
// Unfortunately we cannot test declaratively unhandleRejections in jest: https://github.com/facebook/jest/issues/5620
// This test just fails if an `unhandledRejection` occurs.
startListening({
actionCreator: increment,
effect: async (_, listenerApi) => {
const completedTask = listenerApi.fork(async (forkApi) => {
forkApi.signal.addEventListener(
'abort',
deferredCompletedEvt.resolve,
{ once: true },
)
forkApi.delay(100) // missing await
return 4
})
deferredCompletedEvt.resolve(await completedTask.result)
const godotPauseTrigger = deferred()
const cancelledTask = listenerApi.fork(async (forkApi) => {
forkApi.signal.addEventListener(
'abort',
deferredCompletedEvt.resolve,
{ once: true },
)
forkApi.delay(1_000) // missing await
await forkApi.pause(godotPauseTrigger)
return 4
})
await Promise.resolve()
cancelledTask.cancel()
deferredCancelledEvt.resolve(await cancelledTask.result)
},
})
store.dispatch(increment())
expect(await deferredCompletedEvt).toBeDefined()
expect(await deferredCancelledEvt).toBeDefined()
})
})
test('forkApi.pause rejects if task is cancelled', async () => {
let deferredResult = deferred()
startListening({
actionCreator: increment,
effect: async (_, listenerApi) => {
const forkedTask = listenerApi.fork(async (forkApi) => {
await forkApi.pause(delay(1_000))
return 4
})
await Promise.resolve()
forkedTask.cancel()
deferredResult.resolve(await forkedTask.result)
},
})
store.dispatch(increment())
expect(await deferredResult).toEqual({
status: 'cancelled',
error: new TaskAbortError(taskCancelled),
})
})
test('forkApi.pause rejects as soon as the parent listener is cancelled', async () => {
let deferredResult = deferred()
startListening({
actionCreator: increment,
effect: async (_, listenerApi) => {
listenerApi.cancelActiveListeners()
const forkedTask = listenerApi.fork(async (forkApi) => {
await forkApi
.pause(delay(100))
.then(deferredResult.resolve, deferredResult.resolve)
return 4
})
await forkedTask.result
deferredResult.resolve(new Error('unreachable'))
},
})
store.dispatch(increment())
await Promise.resolve()
store.dispatch(increment())
expect(await deferredResult).toEqual(new TaskAbortError(listenerCancelled))
})
test('forkApi.pause rejects if listener is cancelled', async () => {
const incrementByInListener = createAction<number>('incrementByInListener')
startListening({
actionCreator: incrementByInListener,
async effect({ payload: amountToIncrement }, listenerApi) {
listenerApi.cancelActiveListeners()
await listenerApi.fork(async (forkApi) => {
await forkApi.pause(delay(10))
listenerApi.dispatch(incrementByAmount(amountToIncrement))
}).result
listenerApi.dispatch(incrementByAmount(2 * amountToIncrement))
},
})
store.dispatch(incrementByInListener(10))
store.dispatch(incrementByInListener(100))
await delay(50)
expect(store.getState().value).toEqual(300)
})
})
@@ -0,0 +1,21 @@
'use strict';
var callBind = require('call-bind');
var implementation = require('./implementation');
var ownSlice = typeof ArrayBuffer === 'function' && new ArrayBuffer(0).slice;
var ownSliceBound = ownSlice && callBind(ownSlice);
var ownSliceWrapper = ownSliceBound && function slice(start, end) {
/* eslint no-invalid-this: 0 */
if (arguments.length < 2) {
return ownSliceBound(this, arguments.length > 0 ? start : 0);
}
return ownSliceBound(this, start, end);
};
module.exports = function getPolyfill() {
return (typeof ArrayBuffer === 'function' && ArrayBuffer.prototype.slice)
|| ownSliceWrapper
|| implementation;
};
@@ -0,0 +1,386 @@
/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/
*,
::before,
::after {
box-sizing: border-box; /* 1 */
border-width: 0; /* 2 */
border-style: solid; /* 2 */
border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */
}
::before,
::after {
--tw-content: '';
}
/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/
html,
:host {
line-height: 1.5; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-moz-tab-size: 4; /* 3 */
tab-size: 4; /* 3 */
font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
-webkit-tap-highlight-color: transparent; /* 7 */
}
/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/
body {
margin: 0; /* 1 */
line-height: inherit; /* 2 */
}
/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/
hr {
height: 0; /* 1 */
color: inherit; /* 2 */
border-top-width: 1px; /* 3 */
}
/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/
abbr:where([title]) {
text-decoration: underline dotted;
}
/*
Remove the default font size and weight for headings.
*/
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: inherit;
font-weight: inherit;
}
/*
Reset links to optimize for opt-in styling instead of opt-out.
*/
a {
color: inherit;
text-decoration: inherit;
}
/*
Add the correct font weight in Edge and Safari.
*/
b,
strong {
font-weight: bolder;
}
/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp,
pre {
font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */
font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */
font-size: 1em; /* 4 */
}
/*
Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/
table {
text-indent: 0; /* 1 */
border-color: inherit; /* 2 */
border-collapse: collapse; /* 3 */
}
/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-feature-settings: inherit; /* 1 */
font-variation-settings: inherit; /* 1 */
font-size: 100%; /* 1 */
font-weight: inherit; /* 1 */
line-height: inherit; /* 1 */
letter-spacing: inherit; /* 1 */
color: inherit; /* 1 */
margin: 0; /* 2 */
padding: 0; /* 3 */
}
/*
Remove the inheritance of text transform in Edge and Firefox.
*/
button,
select {
text-transform: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/
button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
-webkit-appearance: button; /* 1 */
background-color: transparent; /* 2 */
background-image: none; /* 2 */
}
/*
Use the modern Firefox focus style for all focusable elements.
*/
:-moz-focusring {
outline: auto;
}
/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/
:-moz-ui-invalid {
box-shadow: none;
}
/*
Add the correct vertical alignment in Chrome and Firefox.
*/
progress {
vertical-align: baseline;
}
/*
Correct the cursor style of increment and decrement buttons in Safari.
*/
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
height: auto;
}
/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/
[type='search'] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/*
Remove the inner padding in Chrome and Safari on macOS.
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/*
Add the correct display in Chrome and Safari.
*/
summary {
display: list-item;
}
/*
Removes the default spacing and border for appropriate elements.
*/
blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
margin: 0;
}
fieldset {
margin: 0;
padding: 0;
}
legend {
padding: 0;
}
ol,
ul,
menu {
list-style: none;
margin: 0;
padding: 0;
}
/*
Reset default styling for dialogs.
*/
dialog {
padding: 0;
}
/*
Prevent resizing textareas horizontally by default.
*/
textarea {
resize: vertical;
}
/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/
input::placeholder,
textarea::placeholder {
opacity: 1; /* 1 */
color: theme('colors.gray.400', #9ca3af); /* 2 */
}
/*
Set the default cursor for buttons.
*/
button,
[role="button"] {
cursor: pointer;
}
/*
Make sure disabled buttons don't get the pointer cursor.
*/
:disabled {
cursor: default;
}
/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
This can trigger a poorly considered lint error in some tools but is included by design.
*/
img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
display: block; /* 1 */
vertical-align: middle; /* 2 */
}
/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/
img,
video {
max-width: 100%;
height: auto;
}
/* Make elements with the HTML hidden attribute stay hidden by default */
[hidden]:where(:not([hidden="until-found"])) {
display: none;
}
@@ -0,0 +1,15 @@
import { clamp } from '../clamp.mjs';
function steps(numSteps, direction = "end") {
return (progress) => {
progress =
direction === "end"
? Math.min(progress, 0.999)
: Math.max(progress, 0.001);
const expanded = progress * numSteps;
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
return clamp(0, 1, rounded / numSteps);
};
}
export { steps };
@@ -0,0 +1,69 @@
var common = require('../common');
var assert = common.assert;
var retry = require(common.dir.lib + '/retry');
(function testDefaultValues() {
var timeouts = retry.timeouts();
assert.equal(timeouts.length, 10);
assert.equal(timeouts[0], 1000);
assert.equal(timeouts[1], 2000);
assert.equal(timeouts[2], 4000);
})();
(function testDefaultValuesWithRandomize() {
var minTimeout = 5000;
var timeouts = retry.timeouts({
minTimeout: minTimeout,
randomize: true
});
assert.equal(timeouts.length, 10);
assert.ok(timeouts[0] > minTimeout);
assert.ok(timeouts[1] > timeouts[0]);
assert.ok(timeouts[2] > timeouts[1]);
})();
(function testPassedTimeoutsAreUsed() {
var timeoutsArray = [1000, 2000, 3000];
var timeouts = retry.timeouts(timeoutsArray);
assert.deepEqual(timeouts, timeoutsArray);
assert.notStrictEqual(timeouts, timeoutsArray);
})();
(function testTimeoutsAreWithinBoundaries() {
var minTimeout = 1000;
var maxTimeout = 10000;
var timeouts = retry.timeouts({
minTimeout: minTimeout,
maxTimeout: maxTimeout
});
for (var i = 0; i < timeouts; i++) {
assert.ok(timeouts[i] >= minTimeout);
assert.ok(timeouts[i] <= maxTimeout);
}
})();
(function testTimeoutsAreIncremental() {
var timeouts = retry.timeouts();
var lastTimeout = timeouts[0];
for (var i = 0; i < timeouts; i++) {
assert.ok(timeouts[i] > lastTimeout);
lastTimeout = timeouts[i];
}
})();
(function testTimeoutsAreIncrementalForFactorsLessThanOne() {
var timeouts = retry.timeouts({
retries: 3,
factor: 0.5
});
var expected = [250, 500, 1000];
assert.deepEqual(expected, timeouts);
})();
(function testRetries() {
var timeouts = retry.timeouts({retries: 2});
assert.strictEqual(timeouts.length, 2);
})();
@@ -0,0 +1,54 @@
'use strict';
const errorEx = require('error-ex');
const fallback = require('json-parse-even-better-errors');
const {default: LinesAndColumns} = require('lines-and-columns');
const {codeFrameColumns} = require('@babel/code-frame');
const JSONError = errorEx('JSONError', {
fileName: errorEx.append('in %s'),
codeFrame: errorEx.append('\n\n%s\n')
});
const parseJson = (string, reviver, filename) => {
if (typeof reviver === 'string') {
filename = reviver;
reviver = null;
}
try {
try {
return JSON.parse(string, reviver);
} catch (error) {
fallback(string, reviver);
throw error;
}
} catch (error) {
error.message = error.message.replace(/\n/g, '');
const indexMatch = error.message.match(/in JSON at position (\d+) while parsing/);
const jsonError = new JSONError(error);
if (filename) {
jsonError.fileName = filename;
}
if (indexMatch && indexMatch.length > 0) {
const lines = new LinesAndColumns(string);
const index = Number(indexMatch[1]);
const location = lines.locationForIndex(index);
const codeFrame = codeFrameColumns(
string,
{start: {line: location.line + 1, column: location.column + 1}},
{highlightCode: true}
);
jsonError.codeFrame = codeFrame;
}
throw jsonError;
}
};
parseJson.JSONError = JSONError;
module.exports = parseJson;
@@ -0,0 +1,22 @@
'use strict';
var $defineProperty = require('es-define-property');
var hasPropertyDescriptors = function hasPropertyDescriptors() {
return !!$defineProperty;
};
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
// node v0.6 has a bug where array lengths can be Set but not Defined
if (!$defineProperty) {
return null;
}
try {
return $defineProperty([], 'length', { value: 1 }).length !== 1;
} catch (e) {
// In Firefox 4-22, defining length on an array throws an exception.
return true;
}
};
module.exports = hasPropertyDescriptors;
@@ -0,0 +1,252 @@
// jscs:disable requireUseStrict
var test = require('tape');
var functionBind = require('../implementation');
var getCurrentContext = function () { return this; };
test('functionBind is a function', function (t) {
t.equal(typeof functionBind, 'function');
t.end();
});
test('non-functions', function (t) {
var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g];
t.plan(nonFunctions.length);
for (var i = 0; i < nonFunctions.length; ++i) {
try { functionBind.call(nonFunctions[i]); } catch (ex) {
t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i]));
}
}
t.end();
});
test('without a context', function (t) {
t.test('binds properly', function (st) {
var args, context;
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
context = this;
})
};
namespace.func(1, 2, 3);
st.deepEqual(args, [1, 2, 3]);
st.equal(context, getCurrentContext.call());
st.end();
});
t.test('binds properly, and still supplies bound arguments', function (st) {
var args, context;
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
context = this;
}, undefined, 1, 2, 3)
};
namespace.func(4, 5, 6);
st.deepEqual(args, [1, 2, 3, 4, 5, 6]);
st.equal(context, getCurrentContext.call());
st.end();
});
t.test('returns properly', function (st) {
var args;
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
return this;
}, null)
};
var context = namespace.func(1, 2, 3);
st.equal(context, getCurrentContext.call(), 'returned context is namespaced context');
st.deepEqual(args, [1, 2, 3], 'passed arguments are correct');
st.end();
});
t.test('returns properly with bound arguments', function (st) {
var args;
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
return this;
}, null, 1, 2, 3)
};
var context = namespace.func(4, 5, 6);
st.equal(context, getCurrentContext.call(), 'returned context is namespaced context');
st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct');
st.end();
});
t.test('called as a constructor', function (st) {
var thunkify = function (value) {
return function () { return value; };
};
st.test('returns object value', function (sst) {
var expectedReturnValue = [1, 2, 3];
var Constructor = functionBind.call(thunkify(expectedReturnValue), null);
var result = new Constructor();
sst.equal(result, expectedReturnValue);
sst.end();
});
st.test('does not return primitive value', function (sst) {
var Constructor = functionBind.call(thunkify(42), null);
var result = new Constructor();
sst.notEqual(result, 42);
sst.end();
});
st.test('object from bound constructor is instance of original and bound constructor', function (sst) {
var A = function (x) {
this.name = x || 'A';
};
var B = functionBind.call(A, null, 'B');
var result = new B();
sst.ok(result instanceof B, 'result is instance of bound constructor');
sst.ok(result instanceof A, 'result is instance of original constructor');
sst.end();
});
st.end();
});
t.end();
});
test('with a context', function (t) {
t.test('with no bound arguments', function (st) {
var args, context;
var boundContext = {};
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
context = this;
}, boundContext)
};
namespace.func(1, 2, 3);
st.equal(context, boundContext, 'binds a context properly');
st.deepEqual(args, [1, 2, 3], 'supplies passed arguments');
st.end();
});
t.test('with bound arguments', function (st) {
var args, context;
var boundContext = {};
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
context = this;
}, boundContext, 1, 2, 3)
};
namespace.func(4, 5, 6);
st.equal(context, boundContext, 'binds a context properly');
st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments');
st.end();
});
t.test('returns properly', function (st) {
var boundContext = {};
var args;
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
return this;
}, boundContext)
};
var context = namespace.func(1, 2, 3);
st.equal(context, boundContext, 'returned context is bound context');
st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context');
st.deepEqual(args, [1, 2, 3], 'passed arguments are correct');
st.end();
});
t.test('returns properly with bound arguments', function (st) {
var boundContext = {};
var args;
var namespace = {
func: functionBind.call(function () {
args = Array.prototype.slice.call(arguments);
return this;
}, boundContext, 1, 2, 3)
};
var context = namespace.func(4, 5, 6);
st.equal(context, boundContext, 'returned context is bound context');
st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context');
st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct');
st.end();
});
t.test('passes the correct arguments when called as a constructor', function (st) {
var expected = { name: 'Correct' };
var namespace = {
Func: functionBind.call(function (arg) {
return arg;
}, { name: 'Incorrect' })
};
var returned = new namespace.Func(expected);
st.equal(returned, expected, 'returns the right arg when called as a constructor');
st.end();
});
t.test('has the new instance\'s context when called as a constructor', function (st) {
var actualContext;
var expectedContext = { foo: 'bar' };
var namespace = {
Func: functionBind.call(function () {
actualContext = this;
}, expectedContext)
};
var result = new namespace.Func();
st.equal(result instanceof namespace.Func, true);
st.notEqual(actualContext, expectedContext);
st.end();
});
t.end();
});
test('bound function length', function (t) {
t.test('sets a correct length without thisArg', function (st) {
var subject = functionBind.call(function (a, b, c) { return a + b + c; });
st.equal(subject.length, 3);
st.equal(subject(1, 2, 3), 6);
st.end();
});
t.test('sets a correct length with thisArg', function (st) {
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {});
st.equal(subject.length, 3);
st.equal(subject(1, 2, 3), 6);
st.end();
});
t.test('sets a correct length without thisArg and first argument', function (st) {
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1);
st.equal(subject.length, 2);
st.equal(subject(2, 3), 6);
st.end();
});
t.test('sets a correct length with thisArg and first argument', function (st) {
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1);
st.equal(subject.length, 2);
st.equal(subject(2, 3), 6);
st.end();
});
t.test('sets a correct length without thisArg and too many arguments', function (st) {
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4);
st.equal(subject.length, 0);
st.equal(subject(), 6);
st.end();
});
t.test('sets a correct length with thisArg and too many arguments', function (st) {
var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4);
st.equal(subject.length, 0);
st.equal(subject(), 6);
st.end();
});
});
@@ -0,0 +1,50 @@
'use strict';
var $TypeError = require('es-errors/type');
var $setProto = require('set-proto');
var isObject = require('es-object-atoms/isObject');
var OrdinaryGetPrototypeOf = require('./OrdinaryGetPrototypeOf');
// https://262.ecma-international.org/7.0/#sec-ordinarysetprototypeof
module.exports = function OrdinarySetPrototypeOf(O, V) {
if (V !== null && !isObject(V)) {
throw new $TypeError('Assertion failed: V must be Object or Null');
}
/*
var extensible = IsExtensible(O);
var current = OrdinaryGetPrototypeOf(O);
if (SameValue(V, current)) {
return true;
}
if (!extensible) {
return false;
}
*/
try {
$setProto(O, V);
} catch (e) {
return false;
}
return OrdinaryGetPrototypeOf(O) === V;
/*
var p = V;
var done = false;
while (!done) {
if (p === null) {
done = true;
} else if (SameValue(p, O)) {
return false;
} else {
if (wat) {
done = true;
} else {
p = p.[[Prototype]];
}
}
}
O.[[Prototype]] = V;
return true;
*/
};
@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isTypeImport = isTypeImport;
const scope_manager_1 = require("@typescript-eslint/scope-manager");
const utils_1 = require("@typescript-eslint/utils");
/**
* Determine whether a variable definition is a type import. e.g.:
*
* ```ts
* import type { Foo } from 'foo';
* import { type Bar } from 'bar';
* ```
*
* @param definition - The variable definition to check.
*/
function isTypeImport(definition) {
return (definition?.type === scope_manager_1.DefinitionType.ImportBinding &&
(definition.parent.importKind === 'type' ||
(definition.node.type === utils_1.AST_NODE_TYPES.ImportSpecifier &&
definition.node.importKind === 'type')));
}
@@ -0,0 +1,14 @@
module.exports = {
"ascending": `crescente`,
"ascendingSort": (args)=>`in ordine crescente in base alla colonna ${args.columnName}`,
"columnSize": (args)=>`${args.value} pixel`,
"descending": `decrescente`,
"descendingSort": (args)=>`in ordine decrescente in base alla colonna ${args.columnName}`,
"resizerDescription": `Premi Invio per iniziare a ridimensionare`,
"select": `Seleziona`,
"selectAll": `Seleziona tutto`,
"sortable": `colonna ordinabile`
};
//# sourceMappingURL=it-IT.main.js.map
@@ -0,0 +1,77 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = retryable;
var _retry = require('./retry.js');
var _retry2 = _interopRequireDefault(_retry);
var _initialParams = require('./internal/initialParams.js');
var _initialParams2 = _interopRequireDefault(_initialParams);
var _wrapAsync = require('./internal/wrapAsync.js');
var _wrapAsync2 = _interopRequireDefault(_wrapAsync);
var _promiseCallback = require('./internal/promiseCallback.js');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* A close relative of [`retry`]{@link module:ControlFlow.retry}. This method
* wraps a task and makes it retryable, rather than immediately calling it
* with retries.
*
* @name retryable
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.retry]{@link module:ControlFlow.retry}
* @category Control Flow
* @param {Object|number} [opts = {times: 5, interval: 0}| 5] - optional
* options, exactly the same as from `retry`, except for a `opts.arity` that
* is the arity of the `task` function, defaulting to `task.length`
* @param {AsyncFunction} task - the asynchronous function to wrap.
* This function will be passed any arguments passed to the returned wrapper.
* Invoked with (...args, callback).
* @returns {AsyncFunction} The wrapped function, which when invoked, will
* retry on an error, based on the parameters specified in `opts`.
* This function will accept the same parameters as `task`.
* @example
*
* async.auto({
* dep1: async.retryable(3, getFromFlakyService),
* process: ["dep1", async.retryable(3, function (results, cb) {
* maybeProcessData(results.dep1, cb);
* })]
* }, callback);
*/
function retryable(opts, task) {
if (!task) {
task = opts;
opts = null;
}
let arity = opts && opts.arity || task.length;
if ((0, _wrapAsync.isAsync)(task)) {
arity += 1;
}
var _task = (0, _wrapAsync2.default)(task);
return (0, _initialParams2.default)((args, callback) => {
if (args.length < arity - 1 || callback == null) {
args.push(callback);
callback = (0, _promiseCallback.promiseCallback)();
}
function taskFn(cb) {
_task(...args, cb);
}
if (opts) (0, _retry2.default)(opts, taskFn, callback);else (0, _retry2.default)(taskFn, callback);
return callback[_promiseCallback.PROMISE_SYMBOL];
});
}
module.exports = exports.default;
@@ -0,0 +1,76 @@
"use client";
// src/use-link.ts
import { link } from "@heroui/theme";
import { useAriaLink } from "@heroui/use-aria-link";
import { mapPropsVariants, useProviderContext } from "@heroui/system";
import { useDOMRef } from "@heroui/react-utils";
import { useFocusRing } from "@react-aria/focus";
import { dataAttr, objectToDeps } from "@heroui/shared-utils";
import { useMemo, useCallback } from "react";
import { mergeProps } from "@react-aria/utils";
function useLink(originalProps) {
var _a, _b, _c, _d;
const globalContext = useProviderContext();
const [props, variantProps] = mapPropsVariants(originalProps, link.variantKeys);
const {
ref,
as,
children,
anchorIcon,
isExternal = false,
showAnchorIcon = false,
autoFocus = false,
className,
onPress,
onPressStart,
onPressEnd,
onClick,
...otherProps
} = props;
const Component = as || "a";
const domRef = useDOMRef(ref);
const disableAnimation = (_b = (_a = originalProps == null ? void 0 : originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const { linkProps } = useAriaLink(
{
...otherProps,
onPress,
onPressStart,
onPressEnd,
onClick,
isDisabled: originalProps.isDisabled,
elementType: `${as}`
},
domRef
);
const { isFocused, isFocusVisible, focusProps } = useFocusRing({
autoFocus
});
if (isExternal) {
otherProps.rel = (_c = otherProps.rel) != null ? _c : "noopener noreferrer";
otherProps.target = (_d = otherProps.target) != null ? _d : "_blank";
}
const classNames = useMemo(
() => link({
...variantProps,
disableAnimation,
className
}),
[objectToDeps(variantProps), disableAnimation, className]
);
const getLinkProps = useCallback(() => {
return {
ref: domRef,
className: classNames,
"data-focus": dataAttr(isFocused),
"data-disabled": dataAttr(originalProps.isDisabled),
"data-focus-visible": dataAttr(isFocusVisible),
...mergeProps(focusProps, linkProps, otherProps)
};
}, [classNames, isFocused, isFocusVisible, focusProps, linkProps, otherProps]);
return { Component, children, anchorIcon, showAnchorIcon, getLinkProps };
}
export {
useLink
};
@@ -0,0 +1,28 @@
var createWrap = require('./_createWrap');
/** Used to compose bitmasks for function metadata. */
var WRAP_FLIP_FLAG = 512;
/**
* Creates a function that invokes `func` with arguments reversed.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to flip arguments for.
* @returns {Function} Returns the new flipped function.
* @example
*
* var flipped = _.flip(function() {
* return _.toArray(arguments);
* });
*
* flipped('a', 'b', 'c', 'd');
* // => ['d', 'c', 'b', 'a']
*/
function flip(func) {
return createWrap(func, WRAP_FLIP_FLAG);
}
module.exports = flip;
@@ -0,0 +1,141 @@
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.loadTsconfig = exports.walkForTsConfig = exports.tsConfigLoader = void 0;
var path = require("path");
var fs = require("fs");
// tslint:disable:no-require-imports
var JSON5 = require("json5");
var StripBom = require("strip-bom");
function tsConfigLoader(_a) {
var getEnv = _a.getEnv, cwd = _a.cwd, _b = _a.loadSync, loadSync = _b === void 0 ? loadSyncDefault : _b;
var TS_NODE_PROJECT = getEnv("TS_NODE_PROJECT");
var TS_NODE_BASEURL = getEnv("TS_NODE_BASEURL");
// tsconfig.loadSync handles if TS_NODE_PROJECT is a file or directory
// and also overrides baseURL if TS_NODE_BASEURL is available.
var loadResult = loadSync(cwd, TS_NODE_PROJECT, TS_NODE_BASEURL);
return loadResult;
}
exports.tsConfigLoader = tsConfigLoader;
function loadSyncDefault(cwd, filename, baseUrl) {
// Tsconfig.loadSync uses path.resolve. This is why we can use an absolute path as filename
var configPath = resolveConfigPath(cwd, filename);
if (!configPath) {
return {
tsConfigPath: undefined,
baseUrl: undefined,
paths: undefined,
};
}
var config = loadTsconfig(configPath);
return {
tsConfigPath: configPath,
baseUrl: baseUrl ||
(config && config.compilerOptions && config.compilerOptions.baseUrl),
paths: config && config.compilerOptions && config.compilerOptions.paths,
};
}
function resolveConfigPath(cwd, filename) {
if (filename) {
var absolutePath = fs.lstatSync(filename).isDirectory()
? path.resolve(filename, "./tsconfig.json")
: path.resolve(cwd, filename);
return absolutePath;
}
if (fs.statSync(cwd).isFile()) {
return path.resolve(cwd);
}
var configAbsolutePath = walkForTsConfig(cwd);
return configAbsolutePath ? path.resolve(configAbsolutePath) : undefined;
}
function walkForTsConfig(directory, existsSync) {
if (existsSync === void 0) { existsSync = fs.existsSync; }
var configPath = path.join(directory, "./tsconfig.json");
if (existsSync(configPath)) {
return configPath;
}
var parentDirectory = path.join(directory, "../");
// If we reached the top
if (directory === parentDirectory) {
return undefined;
}
return walkForTsConfig(parentDirectory, existsSync);
}
exports.walkForTsConfig = walkForTsConfig;
function loadTsconfig(configFilePath, existsSync, readFileSync) {
if (existsSync === void 0) { existsSync = fs.existsSync; }
if (readFileSync === void 0) { readFileSync = function (filename) {
return fs.readFileSync(filename, "utf8");
}; }
if (!existsSync(configFilePath)) {
return undefined;
}
var configString = readFileSync(configFilePath);
var cleanedJson = StripBom(configString);
var config;
try {
config = JSON5.parse(cleanedJson);
}
catch (e) {
throw new Error("".concat(configFilePath, " is malformed ").concat(e.message));
}
var extendedConfig = config.extends;
if (extendedConfig) {
var base = void 0;
if (Array.isArray(extendedConfig)) {
base = extendedConfig.reduce(function (currBase, extendedConfigElement) {
return mergeTsconfigs(currBase, loadTsconfigFromExtends(configFilePath, extendedConfigElement, existsSync, readFileSync));
}, {});
}
else {
base = loadTsconfigFromExtends(configFilePath, extendedConfig, existsSync, readFileSync);
}
return mergeTsconfigs(base, config);
}
return config;
}
exports.loadTsconfig = loadTsconfig;
/**
* Intended to be called only from loadTsconfig.
* Parameters don't have defaults because they should use the same as loadTsconfig.
*/
function loadTsconfigFromExtends(configFilePath, extendedConfigValue,
// eslint-disable-next-line no-shadow
existsSync, readFileSync) {
var _a;
if (typeof extendedConfigValue === "string" &&
extendedConfigValue.indexOf(".json") === -1) {
extendedConfigValue += ".json";
}
var currentDir = path.dirname(configFilePath);
var extendedConfigPath = path.join(currentDir, extendedConfigValue);
if (extendedConfigValue.indexOf("/") !== -1 &&
extendedConfigValue.indexOf(".") !== -1 &&
!existsSync(extendedConfigPath)) {
extendedConfigPath = path.join(currentDir, "node_modules", extendedConfigValue);
}
var config = loadTsconfig(extendedConfigPath, existsSync, readFileSync) || {};
// baseUrl should be interpreted as relative to extendedConfigPath,
// but we need to update it so it is relative to the original tsconfig being loaded
if ((_a = config.compilerOptions) === null || _a === void 0 ? void 0 : _a.baseUrl) {
var extendsDir = path.dirname(extendedConfigValue);
config.compilerOptions.baseUrl = path.join(extendsDir, config.compilerOptions.baseUrl);
}
return config;
}
function mergeTsconfigs(base, config) {
base = base || {};
config = config || {};
return __assign(__assign(__assign({}, base), config), { compilerOptions: __assign(__assign({}, base.compilerOptions), config.compilerOptions) });
}
//# sourceMappingURL=tsconfig-loader.js.map
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = rewriteThis;
var _core = require("@babel/core");
var _traverse = require("@babel/traverse");
let rewriteThisVisitor;
function rewriteThis(programPath) {
if (!rewriteThisVisitor) {
rewriteThisVisitor = _traverse.visitors.environmentVisitor({
ThisExpression(path) {
path.replaceWith(_core.types.unaryExpression("void", _core.types.numericLiteral(0), true));
}
});
rewriteThisVisitor.noScope = true;
}
(0, _traverse.default)(programPath.node, rewriteThisVisitor);
}
//# sourceMappingURL=rewrite-this.js.map
@@ -0,0 +1,15 @@
var wi=Object.create;var Le=Object.defineProperty;var Pi=Object.getOwnPropertyDescriptor;var Ii=Object.getOwnPropertyNames;var Ni=Object.getPrototypeOf,Li=Object.prototype.hasOwnProperty;var nt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vi=(e,t)=>{for(var i in t)Le(e,i,{get:t[i],enumerable:!0})},Ri=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ii(t))!Li.call(e,r)&&r!==i&&Le(e,r,{get:()=>t[r],enumerable:!(s=Pi(t,r))||s.enumerable});return e};var ot=(e,t,i)=>(i=e!=null?wi(Ni(e)):{},Ri(t||!e||!e.__esModule?Le(i,"default",{value:e,enumerable:!0}):i,e));var zt=nt((fr,Xt)=>{Xt.exports={}});var Xe=nt((dr,We)=>{"use strict";var bs=zt(),Ss=/^[\da-fA-F]+$/,_s=/^\d+$/,Qt=new WeakMap;function Yt(e){e=e.Parser.acorn||e;let t=Qt.get(e);if(!t){let i=e.tokTypes,s=e.TokContext,r=e.TokenType,n=new s("<tag",!1),o=new s("</tag",!1),p=new s("<tag>...</tag>",!0,!0),u={tc_oTag:n,tc_cTag:o,tc_expr:p},c={jsxName:new r("jsxName"),jsxText:new r("jsxText",{beforeExpr:!0}),jsxTagStart:new r("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new r("jsxTagEnd")};c.jsxTagStart.updateContext=function(){this.context.push(p),this.context.push(n),this.exprAllowed=!1},c.jsxTagEnd.updateContext=function(f){let v=this.context.pop();v===n&&f===i.slash||v===o?(this.context.pop(),this.exprAllowed=this.curContext()===p):this.exprAllowed=!0},t={tokContexts:u,tokTypes:c},Qt.set(e,t)}return t}function pe(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return pe(e.object)+"."+pe(e.property)}We.exports=function(e){return e=e||{},function(t){return Ts({allowNamespaces:e.allowNamespaces!==!1,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}};Object.defineProperty(We.exports,"tokTypes",{get:function(){return Yt(void 0).tokTypes},configurable:!0,enumerable:!0});function Ts(e,t){let i=t.acorn||void 0,s=Yt(i),r=i.tokTypes,n=s.tokTypes,o=i.tokContexts,p=s.tokContexts.tc_oTag,u=s.tokContexts.tc_cTag,c=s.tokContexts.tc_expr,f=i.isNewLine,v=i.isIdentifierStart,T=i.isIdentifierChar;return class extends t{static get acornJsx(){return s}jsx_readToken(){let h="",m=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let x=this.input.charCodeAt(this.pos);switch(x){case 60:case 123:return this.pos===this.start?x===60&&this.exprAllowed?(++this.pos,this.finishToken(n.jsxTagStart)):this.getTokenFromCode(x):(h+=this.input.slice(m,this.pos),this.finishToken(n.jsxText,h));case 38:h+=this.input.slice(m,this.pos),h+=this.jsx_readEntity(),m=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(x===62?"&gt;":"&rbrace;")+'` or `{"'+this.input[this.pos]+'"}`?');default:f(x)?(h+=this.input.slice(m,this.pos),h+=this.jsx_readNewLine(!0),m=this.pos):++this.pos}}}jsx_readNewLine(h){let m=this.input.charCodeAt(this.pos),x;return++this.pos,m===13&&this.input.charCodeAt(this.pos)===10?(++this.pos,x=h?`
`:`\r
`):x=String.fromCharCode(m),this.options.locations&&(++this.curLine,this.lineStart=this.pos),x}jsx_readString(h){let m="",x=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let g=this.input.charCodeAt(this.pos);if(g===h)break;g===38?(m+=this.input.slice(x,this.pos),m+=this.jsx_readEntity(),x=this.pos):f(g)?(m+=this.input.slice(x,this.pos),m+=this.jsx_readNewLine(!1),x=this.pos):++this.pos}return m+=this.input.slice(x,this.pos++),this.finishToken(r.string,m)}jsx_readEntity(){let h="",m=0,x,g=this.input[this.pos];g!=="&"&&this.raise(this.pos,"Entity must start with an ampersand");let N=++this.pos;for(;this.pos<this.input.length&&m++<10;){if(g=this.input[this.pos++],g===";"){h[0]==="#"?h[1]==="x"?(h=h.substr(2),Ss.test(h)&&(x=String.fromCharCode(parseInt(h,16)))):(h=h.substr(1),_s.test(h)&&(x=String.fromCharCode(parseInt(h,10)))):x=bs[h];break}h+=g}return x||(this.pos=N,"&")}jsx_readWord(){let h,m=this.pos;do h=this.input.charCodeAt(++this.pos);while(T(h)||h===45);return this.finishToken(n.jsxName,this.input.slice(m,this.pos))}jsx_parseIdentifier(){let h=this.startNode();return this.type===n.jsxName?h.name=this.value:this.type.keyword?h.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(h,"JSXIdentifier")}jsx_parseNamespacedName(){let h=this.start,m=this.startLoc,x=this.jsx_parseIdentifier();if(!e.allowNamespaces||!this.eat(r.colon))return x;var g=this.startNodeAt(h,m);return g.namespace=x,g.name=this.jsx_parseIdentifier(),this.finishNode(g,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===n.jsxTagEnd)return"";let h=this.start,m=this.startLoc,x=this.jsx_parseNamespacedName();for(this.type===r.dot&&x.type==="JSXNamespacedName"&&!e.allowNamespacedObjects&&this.unexpected();this.eat(r.dot);){let g=this.startNodeAt(h,m);g.object=x,g.property=this.jsx_parseIdentifier(),x=this.finishNode(g,"JSXMemberExpression")}return x}jsx_parseAttributeValue(){switch(this.type){case r.braceL:let h=this.jsx_parseExpressionContainer();return h.expression.type==="JSXEmptyExpression"&&this.raise(h.start,"JSX attributes must only be assigned a non-empty expression"),h;case n.jsxTagStart:case r.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let h=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(h,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let h=this.startNode();return this.next(),h.expression=this.type===r.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(r.braceR),this.finishNode(h,"JSXExpressionContainer")}jsx_parseAttribute(){let h=this.startNode();return this.eat(r.braceL)?(this.expect(r.ellipsis),h.argument=this.parseMaybeAssign(),this.expect(r.braceR),this.finishNode(h,"JSXSpreadAttribute")):(h.name=this.jsx_parseNamespacedName(),h.value=this.eat(r.eq)?this.jsx_parseAttributeValue():null,this.finishNode(h,"JSXAttribute"))}jsx_parseOpeningElementAt(h,m){let x=this.startNodeAt(h,m);x.attributes=[];let g=this.jsx_parseElementName();for(g&&(x.name=g);this.type!==r.slash&&this.type!==n.jsxTagEnd;)x.attributes.push(this.jsx_parseAttribute());return x.selfClosing=this.eat(r.slash),this.expect(n.jsxTagEnd),this.finishNode(x,g?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(h,m){let x=this.startNodeAt(h,m),g=this.jsx_parseElementName();return g&&(x.name=g),this.expect(n.jsxTagEnd),this.finishNode(x,g?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(h,m){let x=this.startNodeAt(h,m),g=[],N=this.jsx_parseOpeningElementAt(h,m),le=null;if(!N.selfClosing){e:for(;;)switch(this.type){case n.jsxTagStart:if(h=this.start,m=this.startLoc,this.next(),this.eat(r.slash)){le=this.jsx_parseClosingElementAt(h,m);break e}g.push(this.jsx_parseElementAt(h,m));break;case n.jsxText:g.push(this.parseExprAtom());break;case r.braceL:g.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}pe(le.name)!==pe(N.name)&&this.raise(le.start,"Expected corresponding JSX closing tag for <"+pe(N.name)+">")}let Ne=N.name?"Element":"Fragment";return x["opening"+Ne]=N,x["closing"+Ne]=le,x.children=g,this.type===r.relational&&this.value==="<"&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(x,"JSX"+Ne)}jsx_parseText(){let h=this.parseLiteral(this.value);return h.type="JSXText",h}jsx_parseElement(){let h=this.start,m=this.startLoc;return this.next(),this.jsx_parseElementAt(h,m)}parseExprAtom(h){return this.type===n.jsxText?this.jsx_parseText():this.type===n.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(h)}readToken(h){let m=this.curContext();if(m===c)return this.jsx_readToken();if(m===p||m===u){if(v(h))return this.jsx_readWord();if(h==62)return++this.pos,this.finishToken(n.jsxTagEnd);if((h===34||h===39)&&m==p)return this.jsx_readString(h)}return h===60&&this.exprAllowed&&this.input.charCodeAt(thLine truncated
Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ut(t.onToken)){var s=t.onToken;t.onToken=function(r){return s.push(r)}}return ut(t.onComment)&&(t.onComment=Ki(t,t.onComment)),t}function Ki(e,t){return function(i,s,r,n,o,p){var u={type:i?"Block":"Line",value:s,start:r,end:n};e.locations&&(u.loc=new ge(this,o,p)),e.ranges&&(u.range=[r,n]),t.push(u)}}var ne=1,Z=2,Ue=4,vt=8,Ge=16,bt=32,ve=64,St=128,X=256,oe=512,be=ne|Z|X;function qe(e,t){return Z|(e?Ue:0)|(t?vt:0)}var de=0,Je=1,J=2,_t=3,Tt=4,Ct=5,E=function(t,i,s){this.options=t=Hi(t),this.sourceFile=t.sourceFile,this.keywords=H(Di[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var r="";t.allowReserved!==!0&&(r=Ve[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(r+=" await")),this.reservedWords=H(r);var n=(r?r+" ":"")+Ve.strict;this.reservedWordsStrict=H(n),this.reservedWordsStrictBind=H(n+" "+Ve.strictBind),this.input=String(i),this.containsEsc=!1,s?(this.pos=s,this.lineStart=this.input.lastIndexOf(`
`,s-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(V).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(ne),this.regexpState=null,this.privateNameStack=[]},j={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};E.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};j.inFunction.get=function(){return(this.currentVarScope().flags&Z)>0};j.inGenerator.get=function(){return(this.currentVarScope().flags&vt)>0};j.inAsync.get=function(){return(this.currentVarScope().flags&Ue)>0};j.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(X|oe))return!1;if(i&Z)return(i&Ue)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};j.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&ve)>0||this.options.allowSuperOutsideMethod};j.allowDirectSuper.get=function(){return(this.currentThisScope().flags&St)>0};j.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};j.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(X|oe)||i&Z&&!(i&Ge))return!0}return!1};j.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&X)>0};E.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var s=this,r=0;r<t.length;r++)s=t[r](s);return s};E.parse=function(t,i){return new this(i,t).parse()};E.parseExpressionAt=function(t,i,s){var r=new this(s,t,i);return r.nextToken(),r.parseExpression()};E.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(E.prototype,j);var P=E.prototype,Wi=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;P.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){A.lastIndex=e,e+=A.exec(this.input)[0].length;var t=Wi.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){A.lastIndex=e+t[0].length;var i=A.exec(this.input),s=i.index+i[0].length,r=this.input.charAt(s);return r===";"||r==="}"||V.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(r)||r==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length,A.lastIndex=e,e+=A.exec(this.input)[0].length,this.input[e]===";"&&e++}};P.eat=function(e){return this.type===e?(this.next(),!0):!1};P.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};P.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1};P.expectContextual=function(e){this.eatContextual(e)||this.unexpected()};P.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||V.test(this.input.slice(this.lastTokEnd,this.start))};P.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0};P.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected()};P.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0};P.expect=function(e){this.eat(e)||this.unexpected()};P.unexpected=function(e){this.raise(e??this.start,"Unexpected token")};var Se=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};P.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};P.checkExpressionErrors=function(e,t){if(!e)return!1;var i=e.shorthandAssign,s=e.doubleProto;if(!t)return i>=0||s>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),s>=0&&this.raiseRecoverable(s,"Redefinition of __proto__ property")};P.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.Line truncated
`),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
`),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};y.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var i=this.startNode();this.next(),i.expressions=[];var s=this.parseTemplateElement({isTagged:t});for(i.quasis=[s];!s.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(s=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};y.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!V.test(this.input.slice(this.lastTokEnd,this.start))};y.parseObj=function(e,t){var i=this.startNode(),s=!0,r={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(s)s=!1;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,r,t),i.properties.push(n)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};y.parseProperty=function(e,t){var i=this.startNode(),s,r,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(!1),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(!1,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=!1,i.shorthand=!1,(e||t)&&(n=this.start,o=this.startLoc),e||(s=this.eat(a.star)));var p=this.containsEsc;return this.parsePropertyName(i),!e&&!p&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)?(r=!0,s=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):r=!1,this.parsePropertyValue(i,e,s,r,n,o,t,p),this.finishNode(i,"Property")};y.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var s=e.value.start;e.kind==="get"?this.raiseRecoverable(s,"getter should have no params"):this.raiseRecoverable(s,"setter should have exactly one param")}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};y.parsePropertyValue=function(e,t,i,s,r,n,o,p){(i||s)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(i,s),e.kind="init"):!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||s)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||s)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=r),t?e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(r,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=!0):this.unexpected()};y.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=!1}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};y.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)};y.parseMethod=function(e,t,i){var s=this.startNode(),r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(s),this.options.ecmaVersion>=6&&(s.generator=e),this.options.ecmaVersion>=8&&(s.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qe(t,s.generator)|ve|(i?St:0)),this.expect(a.parenL),s.params=this.parseBindingList(a.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(s,!1,!0,!1),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(s,"FunctionExpression")};y.parseArrowExpression=function(e,t,i,s){var r=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(qe(i,!1)|Ge),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,s),this.yieldPos=r,this.awaitPos=n,this.awaitIdentPos=Line truncated
`;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}};b.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":this.input[this.pos+1]===`
`&&++this.pos;case`
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};b.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return G(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],r=parseInt(s,8);return r>255&&(s=s.slice(0,-1),r=parseInt(s,8)),this.pos+=s.length-1,t=this.input.charCodeAt(this.pos),(s!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(r)}return Y(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};b.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};b.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,i=this.pos,s=this.options.ecmaVersion>=6;this.pos<this.input.length;){var r=this.fullCharCodeAtPos();if(K(r,s))this.pos+=r<=65535?1:2;else if(r===92){this.containsEsc=!0,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?M:K)(o,s)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=G(o),i=this.pos}else break;t=!1}return e+this.input.slice(i,this.pos)};b.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=je[e]),this.finishToken(t,e)};var gs="8.15.0";E.acorn={Parser:E,version:gs,defaultOptions:De,Position:ae,SourceLocation:ge,getLineInfo:gt,Node:_e,TokenType:_,tokTypes:a,keywordTypes:je,TokContext:F,tokContexts:C,isIdentifierChar:K,isIdentifierStart:M,Token:Ke,isNewLine:Y,lineBreak:V,lineBreakG:Ui,nonASCIIwhitespace:xt};var bi=ot(Xe(),1);function Cs(e,t){let i=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(i,t)}var Ce=Cs;function Es(e){let t=[];for(let i of e)try{return i()}catch(s){t.push(s)}throw Object.assign(new Error("All combinations failed"),{errors:t})}var Ee=Es;var ks=(e,t,i)=>{if(!(e&&t==null)){if(t.findLast)return t.findLast(i);for(let s=t.length-1;s>=0;s--){let r=t[s];if(i(r,s,t))return r}}},$t=ks;var As=(e,t,i)=>{if(!(e&&t==null))return Array.isArray(t)||typeof t=="string"?t[i<0?t.length+i:i]:t.at(i)},te=As;var ws=new Proxy(()=>{},{get:()=>ws});function w(e){var s,r,n;let t=((s=e.range)==null?void 0:s[0])??e.start,i=(n=((r=e.declaration)==null?void 0:r.decorators)??e.decorators)==null?void 0:n[0];return i?Math.min(w(i),t):t}function k(e){var i;return((i=e.range)==null?void 0:i[1])??e.end}function Ps(e){let t=new Set(e);return i=>t.has(i==null?void 0:i.type)}var ie=Ps;function Is(e,t,i){let s=e.originalText.slice(t,i);for(let r of e[Symbol.for("comments")]){let n=w(r);if(n>i)break;let o=k(r);if(o<t)continue;let p=o-n;s=s.slice(0,n-t)+" ".repeat(p)+s.slice(o-t)}return s}var Zt=Is;var Ns=ie(["Block","CommentBlock","MultiLine"]),z=Ns;var Ls=ie(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),ze=Ls;var Qe=new WeakMap;function Vs(e){return Qe.has(e)||Qe.set(e,z(e)&&e.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(e.value)),Qe.get(e)}var ei=Vs;function Rs(e){if(!z(e))return!1;let t=`*${e.value}*`.split(`
`);return t.length>1&&t.every(i=>i.trimStart()[0]==="*")}var Ye=new WeakMap;function Os(e){return Ye.has(e)||Ye.set(e,Rs(e)),Ye.get(e)}var $e=Os;function Bs(e){if(e.length<2)return;let t;for(let i=e.length-1;i>=0;i--){let s=e[i];if(t&&k(s)===w(t)&&$e(s)&&$e(t)&&(e.splice(i+1,1),s.value+="*//*"+t.value,s.range=[w(s),k(t)]),!ze(s)&&!z(s))throw new TypeError(`Unknown comment type: "${s.type}".`);t=s}}var ti=Bs;var he=null;function ce(e){if(he!==null&&typeof he.property){let t=he;return he=ce.prototype=null,t}return he=ce.prototype=e??Object.create(null),new ce}var Ds=10;for(let e=0;e<=Ds;e++)ce();function Ze(e){return ce(e)}function Fs(e,t="type"){Ze(e);function i(s){let r=s[t],n=e[r];if(!Array.isArray(n))throw Object.assign(new Error(`Missing visitor keys for '${r}'.`),{node:s});return n}return i}var ii=Fs;var si={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","typeParameters","typeArguments","arguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","typeParameters","typeArguments","arguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["decorators","key","value"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["decorators","properties","typeAnnotation"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","typeParameters","typeArguments","arguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],ImportAttribute:["key","value"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","tLine truncated
`;e=se(!1,e.replace(qs,"").replace(Gs,""),Ws,"$1");let i="";for(;i!==e;)i=e,e=se(!1,e,Ks,`${t}$1 $2${t}`);e=e.replace(ui,"").trimEnd();let s=Object.create(null),r=se(!1,e,pi,"").replace(ui,"").trimEnd(),n;for(;n=pi.exec(e);){let o=se(!1,n[2],Hs,"");if(typeof s[n[1]]=="string"||Array.isArray(s[n[1]])){let p=s[n[1]];s[n[1]]=[...Xs,...Array.isArray(p)?p:[p],o]}else s[n[1]]=o}return{comments:r,pragmas:s}}var li=["noformat","noprettier"],fi=["format","prettier"];function zs(e){if(!e.startsWith("#!"))return"";let t=e.indexOf(`
`);return t===-1?e:e.slice(0,t)}var di=zs;function mi(e){let t=di(e);t&&(e=e.slice(t.length+1));let i=hi(e),{pragmas:s,comments:r}=ci(i);return{shebang:t,text:e,pragmas:s,comments:r}}function xi(e){let{pragmas:t}=mi(e);return fi.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function yi(e){let{pragmas:t}=mi(e);return li.some(i=>Object.prototype.hasOwnProperty.call(t,i))}function Qs(e){return e=typeof e=="function"?{parse:e}:e,{astFormat:"estree",hasPragma:xi,hasIgnorePragma:yi,locStart:w,locEnd:k,...e}}var Ae=Qs;var we="module",gi="script",Pe=[we,gi];function Ie(e){if(typeof e=="string"){if(e=e.toLowerCase(),/\.(?:mjs|mts)$/iu.test(e))return we;if(/\.(?:cjs|cts)$/iu.test(e))return gi}}var Ys={ecmaVersion:"latest",allowReserved:!0,allowReturnOutsideFunction:!0,allowSuperOutsideMethod:!0,checkPrivateFields:!1,locations:!1,ranges:!0,preserveParens:!0};function $s(e){let{message:t,loc:i}=e;if(!i)return e;let{line:s,column:r}=i;return Ce(t.replace(/ \(\d+:\d+\)$/u,""),{loc:{start:{line:s,column:r+1}},cause:e})}var vi,Zs=()=>(vi??(vi=E.extend((0,bi.default)())),vi);function er(e,t){let i=Zs(),s=[],r=i.parse(e,{...Ys,sourceType:t,allowImportExportEverywhere:t===we,onComment:s});return r.comments=s,r}function tr(e,t){let i=Ie(t==null?void 0:t.filepath),s=(i?[i]:Pe).map(n=>()=>er(e,n)),r;try{r=Ee(s)}catch({errors:[n]}){throw $s(n)}return ke(r,{text:e})}var Si=Ae(tr);var Ei=ot(Xe(),1);var I={Boolean:"Boolean",EOF:"<end>",Identifier:"Identifier",PrivateIdentifier:"PrivateIdentifier",Keyword:"Keyword",Null:"Null",Numeric:"Numeric",Punctuator:"Punctuator",String:"String",RegularExpression:"RegularExpression",Template:"Template",JSXIdentifier:"JSXIdentifier",JSXText:"JSXText"};function ir(e,t){let i=e[0],s=te(!1,e,-1),r={type:I.Template,value:t.slice(i.start,s.end)};return i.loc&&(r.loc={start:i.loc.start,end:s.loc.end}),i.range&&(r.start=i.range[0],r.end=s.range[1],r.range=[r.start,r.end]),r}function it(e,t){this._acornTokTypes=e,this._tokens=[],this._curlyBrace=null,this._code=t}it.prototype={constructor:it,translate(e,t){let i=e.type,s=this._acornTokTypes;if(i===s.name)e.type=I.Identifier,e.value==="static"&&(e.type=I.Keyword),t.ecmaVersion>5&&(e.value==="yield"||e.value==="let")&&(e.type=I.Keyword);else if(i===s.privateId)e.type=I.PrivateIdentifier;else if(i===s.semi||i===s.comma||i===s.parenL||i===s.parenR||i===s.braceL||i===s.braceR||i===s.dot||i===s.bracketL||i===s.colon||i===s.question||i===s.bracketR||i===s.ellipsis||i===s.arrow||i===s.jsxTagStart||i===s.incDec||i===s.starstar||i===s.jsxTagEnd||i===s.prefix||i===s.questionDot||i.binop&&!i.keyword||i.isAssign)e.type=I.Punctuator,e.value=this._code.slice(e.start,e.end);else if(i===s.jsxName)e.type=I.JSXIdentifier;else if(i.label==="jsxText"||i===s.jsxAttrValueToken)e.type=I.JSXText;else if(i.keyword)i.keyword==="true"||i.keyword==="false"?e.type=I.Boolean:i.keyword==="null"?e.type=I.Null:e.type=I.Keyword;else if(i===s.num)e.type=I.Numeric,e.value=this._code.slice(e.start,e.end);else if(i===s.string)t.jsxAttrValueToken?(t.jsxAttrValueToken=!1,e.type=I.JSXText):e.type=I.String,e.value=this._code.slice(e.start,e.end);else if(i===s.regexp){e.type=I.RegularExpression;let r=e.value;e.regex={flags:r.flags,pattern:r.pattern},e.value=`/${r.pattern}/${r.flags}`}return e},onToken(e,t){let i=this._acornTokTypes,s=t.tokens,r=this._tokens,n=()=>{s.push(ir(this._tokens,this._code)),this._tokens=[]};if(e.type===i.eof){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t));return}if(e.type===i.backQuote){this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),r.push(e),r.length>1&&n();return}if(e.type===i.dollarBraceL){r.push(e),n();return}if(e.type===i.braceR){this._curlyBrace&&s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=e;return}if(e.type===i.template||e.type===i.invalidTemplate){this._curlyBrace&&(r.push(this._curlyBrace),this._curlyBrace=null),r.push(e);return}this._curlyBrace&&(s.push(this.translate(this._curlyBrace,t)),this._curlyBrace=null),s.push(this.translate(e,t))}};var _i=it;var Ti=[3,5,6,7,8,9,10,11,12,13,14,15,16,17];function sr(){return te(!1,Ti,-1)}function rr(e=5){let t=e==="latest"?sr():e;if(typeof t!="number")throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof e} instead.`);if(t>=2015&&(t-=2009),!Ti.includes(t))throw new Error("Invalid ecmaVersion.");return t}function ar(e="script"){if(e==="script"||e==="module")return e;if(e==="commonjs")return"script";throw new Error("Invalid sourceType.")}function Ci(e){let t=rr(e.ecmaVersion),i=ar(e.sourceType),s=e.range===!0,r=e.loc===!0;if(t!==3&&e.allowReserved)throw new Error("`allowReserved` is only supported when ecmaVersion is 3");if(typeof e.allowReserved<"u"&&typeof e.allowReserved!="boolean")throw new Error("`allowReserved`, when present, must be `true` or `false`");let n=t===3?e.allowReserved||"never":!1,o=e.ecmaFeatures||{},p=e.sourceType==="commonjs"||!!o.globalReturn;if(i==="module"&&t<6)throw new Error("sourceType 'mLine truncated
`,this.lineStart-2)+1,--this.curLine;this.nextToken()}this.end>this.start&&(r+=` ${this.input.slice(this.start,this.end)}`),this.raise(this.start,r)}jsx_readString(s){let r=super.jsx_readString(s);return this.type===t.string&&(this[Q].jsxAttrValueToken=!0),r}[st](s){return s.type==="TemplateElement"&&this[Q].templateElements.push(s),s.type.includes("Function")&&!s.generator&&(s.generator=!1),s}}};var or={_regular:null,_jsx:null,get regular(){return this._regular===null&&(this._regular=E.extend(rt())),this._regular},get jsx(){return this._jsx===null&&(this._jsx=E.extend((0,Ei.default)(),rt())),this._jsx},get(e){return!!(e&&e.ecmaFeatures&&e.ecmaFeatures.jsx)?this.jsx:this.regular}};function ki(e,t){let i=or.get(t);return new i(t,e).parse()}var ur={ecmaVersion:"latest",range:!0,loc:!1,comment:!0,tokens:!1,ecmaFeatures:{jsx:!0,globalReturn:!0,impliedStrict:!1}};function pr(e){let{message:t,lineNumber:i,column:s}=e;return typeof i!="number"?e:Ce(t,{loc:{start:{line:i,column:s}},cause:e})}function hr(e,t){let i=Ie(t==null?void 0:t.filepath),s=(i?[i]:Pe).map(n=>()=>ki(e,{...ur,sourceType:n})),r;try{r=Ee(s)}catch({errors:[n]}){throw pr(n)}return ke(r,{parser:"espree",text:e})}var Ai=Ae(hr);var cr={acorn:Si,espree:Ai};var cn=at;export{cn as default,cr as parsers};
@@ -0,0 +1 @@
{"name":"indent-string","version":"5.0.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532120071,"integrity":"sha512-0fM2/ycrxrltyaBKfQ748Ck23VlPUUBgNAR47ldf4B1V/HoXTfWBSk+vcshGKwEpmOynu4mOP5o+hyBfuRNa8g==","mode":420,"size":1117},"index.js":{"checkedAt":1794532120071,"integrity":"sha512-1CXTaj22qsq2p4t66EGOfkgCoyd5xT7sg/6Uyi43u+h+BbXknIHGEi9HYNJNkmqbea+pGfAVZLN8j1g112/gBw==","mode":420,"size":820},"package.json":{"checkedAt":1794532120072,"integrity":"sha512-NQ0PWP3CUdEtwmHnAW9YSgS4ZevdDOBKLnYRyWSJKiuGvkxVvGk1GyZ2+za9eDQP0a+i08kugvWITaxhp2Zdew==","mode":420,"size":694},"readme.md":{"checkedAt":1794532120072,"integrity":"sha512-FVM7gDyai+63hwcvKKzuXh1EvTiqWOASBOw0VdFWR3Ab0/CWcwpA7p4Esk9D/xPpvuJ2mfWin3UzborcgTp01A==","mode":420,"size":1406},"index.d.ts":{"checkedAt":1794532120072,"integrity":"sha512-dhd9xtdF226e6Pccp4t68kg0PF5UvkVpu/0EnnpHTd7i7rtubxHOnSYxmhwr112AuMGr3gUiD/TBrSTrEIH7NA==","mode":420,"size":707}}}
@@ -0,0 +1,14 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"id-length": 0,
"new-cap": [2, {
"capIsNewExceptions": [
"GetIntrinsic",
],
}],
},
}
@@ -0,0 +1 @@
{"name":"is-arrayish","version":"0.3.4","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532104391,"integrity":"sha512-7//vjzFp/wJ0sSGuB7OHvBEobTIGDrplJXQkJHgmBrhYemDVNbwRqio5YQyr3GUNvnOPswiWp34Lnzyv09n6rg==","mode":420,"size":1077},"index.js":{"checkedAt":1794532104391,"integrity":"sha512-O0OeC4ToKIMQXt6geY3JKHpLl4hWnkQmIz+kPpe0Qu+yS6Jo8OihDO7RUnPZuDez29kgwQ20HUUEjQPIbi1srw==","mode":420,"size":318},"package.json":{"checkedAt":1794532104391,"integrity":"sha512-32DLnFVa7qFklTUMyvsKvb0HrIe66dcdS8jeF2MImlpSLRV8oys5UqFoUPB+2SlabAIBH8TglS2O9Ihzvc+KtQ==","mode":420,"size":1051},"README.md":{"checkedAt":1794532104391,"integrity":"sha512-i+pJiwVe6seM8ZUs/Vgx7XnkDBDyp59+MbQNKX3EGD0V6mbY/hhQj2AWxyWsgy070asAZjEJUT8zL/dkdiwTgQ==","mode":420,"size":704}}}
@@ -0,0 +1,195 @@
# ARIA Query
![CI](https://github.com/A11yance/aria-query/workflows/CI/badge.svg)
Programmatic access to the [WAI-ARIA 1.2 Roles Model](https://www.w3.org/TR/wai-aria-1.2/#roles).
This package tracks the W3C Recommendation (last update: 6 June 2023).
CDN URL: <https://unpkg.com/aria-query>
## Building the `src/etc` files
The files under `src/etc` are generated by the `breakUpAriaJSON` script.
To change them, edit the file `scripts/roles.json` then run:
```bash
node ./scripts/breakUpAriaJSON.js
git add scripts/roles.json src/etc
```
It should work with Node version 6.11.2 or later.
## Utilities
### Interface
These methods are available on each export from the module. The typing here in the documentation is pseudo-typed. Each export will have its own specific types for each method signature.
```javascript
{|
entries: () => Array<$Item>,
get: (key: $Key) => ?$Value,
has: (key: $Key) => boolean,
keys: () => Array<$Key>,
values: () => Array<$Value>,
|};
```
### Roles
```javascript
import { roles } from 'aria-query';
```
A map of role names to the role definition. For example:
```javascript
let alertRole = roles.get('alert');
/**
* Value of alertRole
* {
* "requiredProps": {},
* "props": {
* "aria-atomic": "true",
* "aria-busy": null,
* "aria-controls": null,
* "aria-current": null,
* "aria-describedby": null,
* "aria-details": null,
* "aria-disabled": null,
* "aria-dropeffect": null,
* "aria-errormessage": null,
* "aria-expanded": null,
* "aria-flowto": null,
* "aria-grabbed": null,
* "aria-haspopup": null,
* "aria-hidden": null,
* "aria-invalid": null,
* "aria-keyshortcuts": null,
* "aria-label": null,
* "aria-labelledby": null,
* "aria-live": "assertive",
* "aria-owns": null,
* "aria-relevant": null,
* "aria-roledescription": null
* },
* "abstract": false,
* "childrenPresentational": false,
* "baseConcepts": [],
* "relatedConcepts": [ {
* "module": "XForms",
* "concept": {
* "name": "alert"
* }
* }],
* "superClass": [["roletype", "structure", "section"]]
* }
```
### Elements to Roles
```javascript
import { elementRoles } from 'aria-query';
```
HTML Elements with inherent roles are mapped to those roles. In the case of an element like `<input>`, the element often requires a `type` attribute to map to an ARIA role.
```javascript
[
[ '{"name": "article"}', [ 'article' ] ],
[ '{"name": "button"}', [ 'button' ] ],
[ '{"name": "td"}', [ 'cell', 'gridcell' ] ],
[ '{"name": "input", "attributes": [ {"name": "type", "value": "checkbox"}] }', [ 'checkbox' ] ],
[ '{"name": "th"}', [ 'columnheader' ] ],
[ '{"name": "select"}', [ 'combobox', 'listbox' ] ],
[ '{"name": "menuitem"}', [ 'command', 'menuitem' ] ],
[ '{"name": "dd"}', [ 'definition' ] ],
[ '{"name": "figure"}', [ 'figure' ] ],
[ '{"name": "form"}', [ 'form' ] ],
[ '{"name": "table"}', [ 'grid', 'table' ] ],
[ '{"name": "fieldset"}', [ 'group' ] ],
[ '{"name": "h1"}', [ 'heading' ] ],
[ '{"name": "h2"}', [ 'heading' ] ],
[ '{"name": "h3"}', [ 'heading' ] ],
[ '{"name": "h4"}', [ 'heading' ] ],
[ '{"name": "h5"}', [ 'heading' ] ],
[ '{"name": "h6"}', [ 'heading' ] ],
[ '{"name": "img"}', [ 'img' ] ],
[ '{"name": "a"}', [ 'link' ] ],
[ '{"name": "link"}', [ 'link' ] ],
[ '{"name": "ol"}', [ 'list' ] ],
[ '{"name": "ul"}', [ 'list' ] ],
[ '{"name": "li"}', [ 'listitem' ] ],
[ '{"name": "nav"}', [ 'navigation' ] ],
[ '{"name": "option"}', [ 'option' ] ],
[ '{"name": "input", "attributes": [ {"name": "type", "value": "radio"}] }', [ 'radio' ] ],
[ '{"name": "frame"}', [ 'region' ] ],
[ '{"name": "rel"}', [ 'roletype' ] ],
[ '{"name": "tr"}', [ 'row' ] ],
[ '{"name": "tbody"}', [ 'rowgroup' ] ],
[ '{"name": "tfoot"}', [ 'rowgroup' ] ],
[ '{"name": "thead"}', [ 'rowgroup' ] ],
[ '{"name": "th", "attributes": [ {"name": "scope", "value": "row"}] }', [ 'rowheader' ] ],
[ '{"name": "input", "attributes": [ {"name": "type", "value": "search"}] }', [ 'searchbox' ] ],
[ '{"name": "hr"}', [ 'separator' ] ],
[ '{"name": "dt"}', [ 'term' ] ],
[ '{"name": "dfn"}', [ 'term' ] ],
[ '{"name": "textarea"}', [ 'textbox' ] ],
[ '{"name": "input", "attributes": [ {"name": "type", "value": "text"}] }', [ 'textbox' ] ],
]
```
The map of elements to roles is keyed by an HTML concept. An HTML concept corresponds to the `baseConcepts` and `relatedConcepts` of an ARIA role. Concepts exist in the context of a `module`: HTML, XForms, Dublin Core, for example. The concept representation is an object literal with a name property (the element name) and an optional attributes array.
The roles are provided in a [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set).
### Role to element
```javascript
import { roleElements } from 'aria-query';
```
ARIA roles are mapped to the HTML Elements with the same inherent role. Some roles, such as `columnheader` are only mapped to an HTML element that expresses specific attributes. In the case of `<input>`, the element often requires a `type` attribute to map to an ARIA role.
```javascript
[
[ 'article', [ {"name": "article"} ] ],
[ 'button', [ {"name": "button"} ] ],
[ 'cell', [ {"name": "td"} ] ],
[ 'checkbox', [ {"name": "input", "attributes": [ {"name": "type", "value": "checkbox"}] } ] ],
[ 'columnheader', [ {"name": "th"} ] ],
[ 'combobox', [ {"name": "select"} ] ],
[ 'command', [ {"name": "menuitem"} ] ],
[ 'definition', [ {"name": "dd"}', '{"name": "dfn"} ] ],
[ 'figure', [ {"name": "figure"} ] ],
[ 'form', [ {"name": "form"} ] ],
[ 'grid', [ {"name": "table"} ] ],
[ 'gridcell', [ {"name": "td"} ] ],
[ 'group', [ {"name": "fieldset"} ] ],
[ 'heading', [ {"name": "h1"}', '{"name": "h2"}', '{"name": "h3"}', '{"name": "h4"}', '{"name": "h5"}', '{"name": "h6"} ] ],
[ 'img', [ {"name": "img"} ] ],
[ 'link', [ {"name": "a"}', '{"name": "link"} ] ],
[ 'list', [ {"name": "ol"}', '{"name": "ul"} ] ],
[ 'listbox', [ {"name": "select"} ] ],
[ 'listitem', [ {"name": "li"} ] ],
[ 'menuitem', [ {"name": "menuitem"} ] ],
[ 'navigation', [ {"name": "nav"} ] ],
[ 'option', [ {"name": "option"} ] ],
[ 'radio', [ {"name": "input", "attributes": [ {"name": "type", "value": "radio"}] } ] ],
[ 'region', [ {"name": "frame"} ] ],
[ 'roletype', [ {"name": "rel"} ] ],
[ 'row', [ {"name": "tr"} ] ],
[ 'rowgroup', [ {"name": "tbody"}', '{"name": "tfoot"}', '{"name": "thead"} ] ],
[ 'rowheader', [ {"name": "th", "attributes": [ {"name": "scope", "value": "row"}] }, {"name": "th", "attributes": [ {"name": "scope", "value": "rowgroup"}] } ] ],
[ 'searchbox', [ {"name": "input", "attributes": [ {"name": "type", "value": "search"}] } ] ],
[ 'separator', [ {"name": "hr"} ] ],
[ 'table', [ {"name": "table"} ] ],
[ 'term', [ {"name": "dt"} ] ],
[ 'textbox', [ {"name": "textarea"}', '{"name": "input", "attributes": [ {"name": "type", "value": "text"}] } ] ],
]
```
## License
Copyright (c) 2021 A11yance
@@ -0,0 +1,15 @@
export default (function (o, c) {
var proto = c.prototype;
proto.toObject = function () {
return {
years: this.$y,
months: this.$M,
date: this.$D,
hours: this.$H,
minutes: this.$m,
seconds: this.$s,
milliseconds: this.$ms
};
};
});
@@ -0,0 +1,16 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2019_array = void 0;
const base_config_1 = require("./base-config");
exports.es2019_array = {
libs: [],
variables: [
['FlatArray', base_config_1.TYPE],
['ReadonlyArray', base_config_1.TYPE],
['Array', base_config_1.TYPE],
],
};
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,kBAAkB,CAAC,OAAS,CAAC,gCAAI,EAAE,KAAK,IAAI,CAAC,gBAAE,CAAC;IAClE,qBAAqB,CAAC,gFAAU,CAAC;IACjC,UAAU,CAAC,gBAAE,CAAC;IACd,eAAe,CAAC,gEAAQ,CAAC;IACzB,iBAAiB,CAAC,MAAM,YAAc,GAAG,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE;YAAC,MAAM,CAAC,wDAAO,CAAC;YAAE,KAAK,IAAM,CAAC,yBAAI,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,yBAAI,CAAC;YAAE,OAAO,IAAM,CAAC,yBAAI,EAAE,UAAU,MAAM,CAAC,KAAK,KAAK,EAAE,yBAAI,CAAC;QAAA,GAAG,QAAC,CAAC;IACzM,gBAAgB,CAAC,OAAS,CAAC,gCAAI,EAAE,KAAK,IAAI,CAAC,gBAAE,CAAC;AAChD","sources":["packages/@react-aria/grid/intl/zh-TW.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":"zh-TW.main.js.map"}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('join', require('../join'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,51 @@
import arrayReduce from './_arrayReduce.js';
import baseEach from './_baseEach.js';
import baseIteratee from './_baseIteratee.js';
import baseReduce from './_baseReduce.js';
import isArray from './isArray.js';
/**
* Reduces `collection` to a value which is the accumulated result of running
* each element in `collection` thru `iteratee`, where each successive
* invocation is supplied the return value of the previous. If `accumulator`
* is not given, the first element of `collection` is used as the initial
* value. The iteratee is invoked with four arguments:
* (accumulator, value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.reduce`, `_.reduceRight`, and `_.transform`.
*
* The guarded methods are:
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
* and `sortBy`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @returns {*} Returns the accumulated value.
* @see _.reduceRight
* @example
*
* _.reduce([1, 2], function(sum, n) {
* return sum + n;
* }, 0);
* // => 3
*
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
* (result[value] || (result[value] = [])).push(key);
* return result;
* }, {});
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
*/
function reduce(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduce : baseReduce,
initAccum = arguments.length < 3;
return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
}
export default reduce;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more