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,42 @@
'use strict';
var name = require('fn.name');
/**
* Wrap callbacks to prevent double execution.
*
* @param {Function} fn Function that should only be called once.
* @returns {Function} A wrapped callback which prevents multiple executions.
* @public
*/
module.exports = function one(fn) {
var called = 0
, value;
/**
* The function that prevents double execution.
*
* @private
*/
function onetime() {
if (called) return value;
called = 1;
value = fn.apply(this, arguments);
fn = null;
return value;
}
//
// To make debugging more easy we want to use the name of the supplied
// function. So when you look at the functions that are assigned to event
// listeners you don't see a load of `onetime` functions but actually the
// names of the functions that this module will call.
//
// NOTE: We cannot override the `name` property, as that is `readOnly`
// property, so displayName will have to do.
//
onetime.displayName = name(fn);
return onetime;
};
@@ -0,0 +1,13 @@
"use strict";
/* eslint-disable @typescript-eslint/no-namespace, no-restricted-syntax */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Linter = void 0;
const eslint_1 = require("eslint");
/**
* The Linter object does the actual evaluation of the JavaScript code. It doesn't do any filesystem operations, it
* simply parses and reports on the code. In particular, the Linter object does not process configuration objects
* or files.
*/
class Linter extends eslint_1.Linter {
}
exports.Linter = Linter;
@@ -0,0 +1,24 @@
# @heroui/form
A form is a group of inputs that allows users submit data to a server and supports field validation errors.
Please refer to the [documentation](https://heroui.com/docs/components/form) for more information.
## Installation
```sh
yarn add @heroui/form
# or
npm i @heroui/form
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/heroui-inc/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/heroui-inc/heroui/blob/master/LICENSE).
@@ -0,0 +1,412 @@
flf2a$ 4 3 8 -1 3
Stick Letters By Joan Stark
Website: http://www.geocities.com/SoHo/7373/
Figlet conversion by patorjk, April 17, 2008
$ $@
$ $@
$ $@
$ $@@
/@
/ @
. @
@@
..@
''@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
. @
' @
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
. @
' @@
@
__ @
@
@@
@
@
.@
@@
/ @
/ @
/ @
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
$@
.@
.@
@@
$@
.@
,@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
__ @
_|@
. @
@@
@
@
@
@@
@
/\ @
/~~\ @
@@
__ @
|__) @
|__) @
@@
__ @
/ ` @
\__, @
@@
__ @
| \ @
|__/ @
@@
___ @
|__ @
|___ @
@@
___ @
|__ @
| @
@@
__ @
/ _` @
\__> @
@@
@
|__| @
| | @
@@
@
| @
| @
@@
@
| @
\__/ @
@@
@
|__/ @
| \ @
@@
@
| @
|___ @
@@
@
|\/| @
| | @
@@
@
|\ | @
| \| @
@@
__ @
/ \ @
\__/ @
@@
__ @
|__) @
| @
@@
__ @
/ \ @
\__X @
@@
__ @
|__) @
| \ @
@@
__ @
/__` @
.__/ @
@@
___ @
| @
| @
@@
@
| | @
\__/ @
@@
@
\ / @
\/ @
@@
@
| | @
|/\| @
@@
@
\_/ @
/ \ @
@@
@
\ / @
| @
@@
__ @
/ @
/_ @
@@
@
@
@
@@
\ @
\ @
\ @
@@
@
@
@
@@
@
@
@
@@
@
@
___ @
@@
. @
` @
@
@@
@
/\ @
/~~\ @
@@
__ @
|__) @
|__) @
@@
__ @
/ ` @
\__, @
@@
__ @
| \ @
|__/ @
@@
___ @
|__ @
|___ @
@@
___ @
|__ @
| @
@@
__ @
/ _` @
\__> @
@@
@
|__| @
| | @
@@
@
| @
| @
@@
@
| @
\__/ @
@@
@
|__/ @
| \ @
@@
@
| @
|___ @
@@
@
|\/| @
| | @
@@
@
|\ | @
| \| @
@@
__ @
/ \ @
\__/ @
@@
__ @
|__) @
| @
@@
__ @
/ \ @
\__X @
@@
__ @
|__) @
| \ @
@@
__ @
/__` @
.__/ @
@@
___ @
| @
| @
@@
@
| | @
\__/ @
@@
@
\ / @
\/ @
@@
@
| | @
|/\| @
@@
@
\_/ @
/ \ @
@@
@
\ / @
| @
@@
__ @
/ @
/_ @
@@
@
@
@
@@
| @
| @
| @
| @@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@@ -0,0 +1,16 @@
import { OneBotAction, OneBotRequestToolkit } from '../OneBotAction';
import { NetworkAdapterConfig } from '../../config/config';
export type StreamPacketBasic = {
type: StreamStatus;
data_type?: string;
};
export type StreamPacket<T> = T & StreamPacketBasic;
export enum StreamStatus {
Stream = "stream",// 分片流数据包
Response = "response",// 流最终响应
Reset = "reset",// 重置流
Error = "error"
}
export declare abstract class BasicStream<T, R> extends OneBotAction<T, StreamPacket<R>> {
abstract _handle(_payload: T, _adaptername: string, _config: NetworkAdapterConfig, req: OneBotRequestToolkit): Promise<StreamPacket<R>>;
}
@@ -0,0 +1,2 @@
export declare function getOwnReflectMetadata<TMetadata>(target: object, metadataKey: unknown, propertyKey?: string | symbol): TMetadata | undefined;
//# sourceMappingURL=getOwnReflectMetadata.d.ts.map
@@ -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("./helpers"), exports);
@@ -0,0 +1,25 @@
"use client";
import {
useCardContext
} from "./chunk-XHGGCEVJ.mjs";
// src/card-footer.tsx
import { forwardRef } from "@heroui/system";
import { useDOMRef } from "@heroui/react-utils";
import { clsx } from "@heroui/shared-utils";
import { jsx } from "react/jsx-runtime";
var CardFooter = forwardRef((props, ref) => {
var _a;
const { as, className, children, ...otherProps } = props;
const Component = as || "div";
const domRef = useDOMRef(ref);
const { slots, classNames } = useCardContext();
const footerStyles = clsx(classNames == null ? void 0 : classNames.footer, className);
return /* @__PURE__ */ jsx(Component, { ref: domRef, className: (_a = slots.footer) == null ? void 0 : _a.call(slots, { class: footerStyles }), ...otherProps, children });
});
CardFooter.displayName = "HeroUI.CardFooter";
var card_footer_default = CardFooter;
export {
card_footer_default
};
@@ -0,0 +1,42 @@
import { invariant } from './utils';
export function UnicodeExtensionComponents(extension) {
invariant(extension === extension.toLowerCase(), 'Expected extension to be lowercase');
invariant(extension.slice(0, 3) === '-u-', 'Expected extension to be a Unicode locale extension');
var attributes = [];
var keywords = [];
var keyword;
var size = extension.length;
var k = 3;
while (k < size) {
var e = extension.indexOf('-', k);
var len = void 0;
if (e === -1) {
len = size - k;
}
else {
len = e - k;
}
var subtag = extension.slice(k, k + len);
invariant(len >= 2, 'Expected a subtag to have at least 2 characters');
if (keyword === undefined && len != 2) {
if (attributes.indexOf(subtag) === -1) {
attributes.push(subtag);
}
}
else if (len === 2) {
keyword = { key: subtag, value: '' };
if (keywords.find(function (k) { return k.key === (keyword === null || keyword === void 0 ? void 0 : keyword.key); }) === undefined) {
keywords.push(keyword);
}
}
else if ((keyword === null || keyword === void 0 ? void 0 : keyword.value) === '') {
keyword.value = subtag;
}
else {
invariant(keyword !== undefined, 'Expected keyword to be defined');
keyword.value += '-' + subtag;
}
k += len + 1;
}
return { attributes: attributes, keywords: keywords };
}
@@ -0,0 +1,62 @@
<p align="center">
<a href="http://gulpjs.com">
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
</a>
</p>
# replace-ext
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
Replaces a file extension with another one.
## Usage
```js
var replaceExt = require('replace-ext');
var path = '/some/dir/file.js';
var newPath = replaceExt(path, '.coffee');
console.log(newPath); // /some/dir/file.coffee
```
## API
### `replaceExt(path, extension)`
Replaces the extension from `path` with `extension` and returns the updated path string.
Does not replace the extension if `path` is not a string or is empty.
## replace-ext for enterprise
Available as part of the Tidelift Subscription
The maintainers of replace-ext and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-replace-ext?utm_source=npm-replace-ext&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
## License
MIT
[downloads-image]: http://img.shields.io/npm/dm/replace-ext.svg
[npm-url]: https://www.npmjs.com/package/replace-ext
[npm-image]: http://img.shields.io/npm/v/replace-ext.svg
[azure-pipelines-url]: https://dev.azure.com/gulpjs/replace-ext/_build/latest?branchName=master
[azure-pipelines-image]: https://dev.azure.com/gulpjs/replace-ext/_apis/build/status/replace-ext?branchName=master
[travis-url]: https://travis-ci.org/gulpjs/replace-ext
[travis-image]: http://img.shields.io/travis/gulpjs/replace-ext.svg?label=travis-ci
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/replace-ext
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/replace-ext.svg?label=appveyor
[coveralls-url]: https://coveralls.io/r/gulpjs/replace-ext
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/replace-ext/master.svg
[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
@@ -0,0 +1,88 @@
/**
* @fileoverview Flag shouldComponentUpdate when extending PureComponent
*/
'use strict';
const astUtil = require('../util/ast');
const componentUtil = require('../util/componentUtil');
const docsUrl = require('../util/docsUrl');
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
noShouldCompUpdate: '{{component}} does not need shouldComponentUpdate when extending React.PureComponent.',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow usage of shouldComponentUpdate when extending React.PureComponent',
category: 'Possible Errors',
recommended: false,
url: docsUrl('no-redundant-should-component-update'),
},
messages,
schema: [],
},
create(context) {
/**
* Checks for shouldComponentUpdate property
* @param {ASTNode} node The AST node being checked.
* @returns {boolean} Whether or not the property exists.
*/
function hasShouldComponentUpdate(node) {
const properties = astUtil.getComponentProperties(node);
return properties.some((property) => {
const name = astUtil.getPropertyName(property);
return name === 'shouldComponentUpdate';
});
}
/**
* Get name of node if available
* @param {ASTNode} node The AST node being checked.
* @return {string} The name of the node
*/
function getNodeName(node) {
if (node.id) {
return node.id.name;
}
if (node.parent && node.parent.id) {
return node.parent.id.name;
}
return '';
}
/**
* Checks for violation of rule
* @param {ASTNode} node The AST node being checked.
*/
function checkForViolation(node) {
if (componentUtil.isPureComponent(node, context)) {
const hasScu = hasShouldComponentUpdate(node);
if (hasScu) {
const className = getNodeName(node);
report(context, messages.noShouldCompUpdate, 'noShouldCompUpdate', {
node,
data: {
component: className,
},
});
}
}
}
return {
ClassDeclaration: checkForViolation,
ClassExpression: checkForViolation,
};
},
};
@@ -0,0 +1,177 @@
pako
==========================================
[![CI](https://github.com/nodeca/pako/workflows/CI/badge.svg)](https://github.com/nodeca/pako/actions)
[![NPM version](https://img.shields.io/npm/v/pako.svg)](https://www.npmjs.org/package/pako)
> zlib port to javascript, very fast!
__Why pako is cool:__
- Results are binary equal to well known [zlib](http://www.zlib.net/) (now contains ported zlib v1.2.8).
- Almost as fast in modern JS engines as C implementation (see benchmarks).
- Works in browsers, you can browserify any separate component.
This project was done to understand how fast JS can be and is it necessary to
develop native C modules for CPU-intensive tasks. Enjoy the result!
__Benchmarks:__
node v12.16.3 (zlib 1.2.9), 1mb input sample:
```
deflate-imaya x 4.75 ops/sec ±4.93% (15 runs sampled)
deflate-pako x 10.38 ops/sec ±0.37% (29 runs sampled)
deflate-zlib x 17.74 ops/sec ±0.77% (46 runs sampled)
gzip-pako x 8.86 ops/sec ±1.41% (29 runs sampled)
inflate-imaya x 107 ops/sec ±0.69% (77 runs sampled)
inflate-pako x 131 ops/sec ±1.74% (82 runs sampled)
inflate-zlib x 258 ops/sec ±0.66% (88 runs sampled)
ungzip-pako x 115 ops/sec ±1.92% (80 runs sampled)
```
node v14.15.0 (google's zlib), 1mb output sample:
```
deflate-imaya x 4.93 ops/sec ±3.09% (16 runs sampled)
deflate-pako x 10.22 ops/sec ±0.33% (29 runs sampled)
deflate-zlib x 18.48 ops/sec ±0.24% (48 runs sampled)
gzip-pako x 10.16 ops/sec ±0.25% (28 runs sampled)
inflate-imaya x 110 ops/sec ±0.41% (77 runs sampled)
inflate-pako x 134 ops/sec ±0.66% (83 runs sampled)
inflate-zlib x 402 ops/sec ±0.74% (87 runs sampled)
ungzip-pako x 113 ops/sec ±0.62% (80 runs sampled)
```
zlib's test is partially affected by marshalling (that make sense for inflate only).
You can change deflate level to 0 in benchmark source, to investigate details.
For deflate level 6 results can be considered as correct.
__Install:__
```
npm install pako
```
Examples / API
--------------
Full docs - http://nodeca.github.io/pako/
```javascript
const pako = require('pako');
// Deflate
//
const input = new Uint8Array();
//... fill input data here
const output = pako.deflate(input);
// Inflate (simple wrapper can throw exception on broken stream)
//
const compressed = new Uint8Array();
//... fill data to uncompress here
try {
const result = pako.inflate(compressed);
// ... continue processing
} catch (err) {
console.log(err);
}
//
// Alternate interface for chunking & without exceptions
//
const deflator = new pako.Deflate();
deflator.push(chunk1, false);
deflator.push(chunk2); // second param is false by default.
...
deflator.push(chunk_last, true); // `true` says this chunk is last
if (deflator.err) {
console.log(deflator.msg);
}
const output = deflator.result;
const inflator = new pako.Inflate();
inflator.push(chunk1);
inflator.push(chunk2);
...
inflator.push(chunk_last); // no second param because end is auto-detected
if (inflator.err) {
console.log(inflator.msg);
}
const output = inflator.result;
```
Sometime you can wish to work with strings. For example, to send
stringified objects to server. Pako's deflate detects input data type, and
automatically recode strings to utf-8 prior to compress. Inflate has special
option, to say compressed data has utf-8 encoding and should be recoded to
javascript's utf-16.
```javascript
const pako = require('pako');
const test = { my: 'super', puper: [456, 567], awesome: 'pako' };
const compressed = pako.deflate(JSON.stringify(test));
const restored = JSON.parse(pako.inflate(compressed, { to: 'string' }));
```
Notes
-----
Pako does not contain some specific zlib functions:
- __deflate__ - methods `deflateCopy`, `deflateBound`, `deflateParams`,
`deflatePending`, `deflatePrime`, `deflateTune`.
- __inflate__ - methods `inflateCopy`, `inflateMark`,
`inflatePrime`, `inflateGetDictionary`, `inflateSync`, `inflateSyncPoint`, `inflateUndermine`.
- High level inflate/deflate wrappers (classes) may not support some flush
modes.
pako for enterprise
-------------------
Available as part of the Tidelift Subscription
The maintainers of pako and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-pako?utm_source=npm-pako&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
Authors
-------
- Andrey Tupitsin [@anrd83](https://github.com/andr83)
- Vitaly Puzrin [@puzrin](https://github.com/puzrin)
Personal thanks to:
- Vyacheslav Egorov ([@mraleph](https://github.com/mraleph)) for his awesome
tutorials about optimising JS code for v8, [IRHydra](http://mrale.ph/irhydra/)
tool and his advices.
- David Duponchel ([@dduponchel](https://github.com/dduponchel)) for help with
testing.
Original implementation (in C):
- [zlib](http://zlib.net/) by Jean-loup Gailly and Mark Adler.
License
-------
- MIT - all files, except `/lib/zlib` folder
- ZLIB - `/lib/zlib` content
@@ -0,0 +1,306 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _lang = require("../common/lang");
var _error = _interopRequireDefault(require("./error"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } /**
* @file 数据写入器
* @author mengke01(kekee000@gmail.com)
*/
// 检查数组支持情况
if (typeof ArrayBuffer === 'undefined' || typeof DataView === 'undefined') {
throw new Error('not support ArrayBuffer and DataView');
}
// 数据类型
var dataType = {
Int8: 1,
Int16: 2,
Int32: 4,
Uint8: 1,
Uint16: 2,
Uint32: 4,
Float32: 4,
Float64: 8
};
/**
* 读取器
*
* @constructor
* @param {Array.<byte>} buffer 缓冲数组
* @param {number} offset 起始偏移
* @param {number=} length 数组长度
* @param {boolean=} littleEndian 是否小尾
*/
var Writer = /*#__PURE__*/function () {
function Writer(buffer, offset, length, littleEndian) {
_classCallCheck(this, Writer);
var bufferLength = buffer.byteLength || buffer.length;
this.offset = offset || 0;
this.length = length || bufferLength - this.offset;
this.littleEndian = littleEndian || false;
this.view = new DataView(buffer, this.offset, this.length);
}
/**
* 读取指定的数据类型
*
* @param {string} type 数据类型
* @param {number} value value值
* @param {number=} offset 位移
* @param {boolean=} littleEndian 是否小尾
*
* @return {this}
*/
return _createClass(Writer, [{
key: "write",
value: function write(type, value, offset, littleEndian) {
// 使用当前位移
if (undefined === offset) {
offset = this.offset;
}
// 使用小尾
if (undefined === littleEndian) {
littleEndian = this.littleEndian;
}
// 扩展方法
if (undefined === dataType[type]) {
return this['write' + type](value, offset, littleEndian);
}
var size = dataType[type];
this.offset = offset + size;
this.view['set' + type](offset, value, littleEndian);
return this;
}
/**
* 写入指定的字节数组
*
* @param {ArrayBuffer} value 写入值
* @param {number=} length 数组长度
* @param {number=} offset 起始偏移
* @return {this}
*/
}, {
key: "writeBytes",
value: function writeBytes(value, length, offset) {
length = length || value.byteLength || value.length;
var i;
if (!length) {
return this;
}
if (undefined === offset) {
offset = this.offset;
}
if (length < 0 || offset + length > this.length) {
_error.default.raise(10002, this.length, offset + length);
}
var littleEndian = this.littleEndian;
if (value instanceof ArrayBuffer) {
var view = new DataView(value, 0, length);
for (i = 0; i < length; ++i) {
this.view.setUint8(offset + i, view.getUint8(i, littleEndian), littleEndian);
}
} else {
for (i = 0; i < length; ++i) {
this.view.setUint8(offset + i, value[i], littleEndian);
}
}
this.offset = offset + length;
return this;
}
/**
* 写空数据
*
* @param {number} length 长度
* @param {number=} offset 起始偏移
* @return {this}
*/
}, {
key: "writeEmpty",
value: function writeEmpty(length, offset) {
if (length < 0) {
_error.default.raise(10002, this.length, length);
}
if (undefined === offset) {
offset = this.offset;
}
var littleEndian = this.littleEndian;
for (var i = 0; i < length; ++i) {
this.view.setUint8(offset + i, 0, littleEndian);
}
this.offset = offset + length;
return this;
}
/**
* 写入一个string
*
* @param {string} str 字符串
* @param {number=} length 长度
* @param {number=} offset 偏移
*
* @return {this}
*/
}, {
key: "writeString",
value: function writeString() {
var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var length = arguments.length > 1 ? arguments[1] : undefined;
var offset = arguments.length > 2 ? arguments[2] : undefined;
if (undefined === offset) {
offset = this.offset;
}
// eslint-disable-next-line no-control-regex
length = length || str.replace(/[^\x00-\xff]/g, '11').length;
if (length < 0 || offset + length > this.length) {
_error.default.raise(10002, this.length, offset + length);
}
this.seek(offset);
for (var i = 0, l = str.length, charCode; i < l; ++i) {
charCode = str.charCodeAt(i) || 0;
if (charCode > 127) {
// unicode编码可能会超出2字节,
// 写入与编码有关系,此处不做处理
this.writeUint16(charCode);
} else {
this.writeUint8(charCode);
}
}
this.offset = offset + length;
return this;
}
/**
* 写入一个字符
*
* @param {string} value 字符
* @param {number=} offset 偏移
* @return {this}
*/
}, {
key: "writeChar",
value: function writeChar(value, offset) {
return this.writeString(value, offset);
}
/**
* 写入fixed类型
*
* @param {number} value 写入值
* @param {number=} offset 偏移
* @return {number} float
*/
}, {
key: "writeFixed",
value: function writeFixed(value, offset) {
if (undefined === offset) {
offset = this.offset;
}
this.writeInt32(Math.round(value * 65536), offset);
return this;
}
/**
* 写入长日期
*
* @param {Date} value 日期对象
* @param {number=} offset 偏移
*
* @return {Date} Date对象
*/
}, {
key: "writeLongDateTime",
value: function writeLongDateTime(value, offset) {
if (undefined === offset) {
offset = this.offset;
}
// new Date(1970, 1, 1).getTime() - new Date(1904, 1, 1).getTime();
var delta = -2077545600000;
if (typeof value === 'undefined') {
value = delta;
} else if (typeof value.getTime === 'function') {
value = value.getTime();
} else if (/^\d+$/.test(value)) {
value = +value;
} else {
value = Date.parse(value);
}
var time = Math.round((value - delta) / 1000);
this.writeUint32(0, offset);
this.writeUint32(time, offset + 4);
return this;
}
/**
* 跳转到指定偏移
*
* @param {number=} offset 偏移
* @return {this}
*/
}, {
key: "seek",
value: function seek(offset) {
if (undefined === offset) {
this.offset = 0;
}
if (offset < 0 || offset > this.length) {
_error.default.raise(10002, this.length, offset);
}
this._offset = this.offset;
this.offset = offset;
return this;
}
/**
* 跳转到写入头部位置
*
* @return {this}
*/
}, {
key: "head",
value: function head() {
this.offset = this._offset || 0;
return this;
}
/**
* 获取缓存的byte数组
*
* @return {ArrayBuffer}
*/
}, {
key: "getBuffer",
value: function getBuffer() {
return this.view.buffer;
}
/**
* 注销
*/
}, {
key: "dispose",
value: function dispose() {
delete this.view;
}
}]);
}(); // 直接支持的数据类型
Object.keys(dataType).forEach(function (type) {
Writer.prototype['write' + type] = (0, _lang.curry)(Writer.prototype.write, type);
});
var _default = exports.default = Writer;
@@ -0,0 +1,579 @@
/**
* HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
* separate module.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/https.js)
*/
declare module "https" {
import { NonSharedBuffer } from "node:buffer";
import { Duplex } from "node:stream";
import * as tls from "node:tls";
import * as http from "node:http";
import { URL } from "node:url";
interface ServerOptions<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
> extends http.ServerOptions<Request, Response>, tls.TlsOptions {}
interface RequestOptions extends http.RequestOptions, tls.SecureContextOptions {
checkServerIdentity?:
| ((hostname: string, cert: tls.DetailedPeerCertificate) => Error | undefined)
| undefined;
rejectUnauthorized?: boolean | undefined; // Defaults to true
servername?: string | undefined; // SNI TLS Extension
}
interface AgentOptions extends http.AgentOptions, tls.ConnectionOptions {
maxCachedSessions?: number | undefined;
}
/**
* An `Agent` object for HTTPS similar to `http.Agent`. See {@link request} for more information.
* @since v0.4.5
*/
class Agent extends http.Agent {
constructor(options?: AgentOptions);
options: AgentOptions;
createConnection(
options: RequestOptions,
callback?: (err: Error | null, stream: Duplex) => void,
): Duplex | null | undefined;
getName(options?: RequestOptions): string;
}
interface Server<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
> extends http.Server<Request, Response> {}
/**
* See `http.Server` for more information.
* @since v0.3.4
*/
class Server<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
> extends tls.Server {
constructor(requestListener?: http.RequestListener<Request, Response>);
constructor(
options: ServerOptions<Request, Response>,
requestListener?: http.RequestListener<Request, Response>,
);
/**
* Closes all connections connected to this server.
* @since v18.2.0
*/
closeAllConnections(): void;
/**
* Closes all connections connected to this server which are not sending a request or waiting for a response.
* @since v18.2.0
*/
closeIdleConnections(): void;
addListener(event: string, listener: (...args: any[]) => void): this;
addListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
addListener(
event: "newSession",
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
): this;
addListener(
event: "OCSPRequest",
listener: (
certificate: NonSharedBuffer,
issuer: NonSharedBuffer,
callback: (err: Error | null, resp: Buffer | null) => void,
) => void,
): this;
addListener(
event: "resumeSession",
listener: (
sessionId: NonSharedBuffer,
callback: (err: Error | null, sessionData: Buffer | null) => void,
) => void,
): this;
addListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
addListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
addListener(event: "close", listener: () => void): this;
addListener(event: "connection", listener: (socket: Duplex) => void): this;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "listening", listener: () => void): this;
addListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
addListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
addListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
addListener(
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
addListener(event: "request", listener: http.RequestListener<Request, Response>): this;
addListener(
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
emit(event: string, ...args: any[]): boolean;
emit(event: "keylog", line: NonSharedBuffer, tlsSocket: tls.TLSSocket): boolean;
emit(
event: "newSession",
sessionId: NonSharedBuffer,
sessionData: NonSharedBuffer,
callback: () => void,
): boolean;
emit(
event: "OCSPRequest",
certificate: NonSharedBuffer,
issuer: NonSharedBuffer,
callback: (err: Error | null, resp: Buffer | null) => void,
): boolean;
emit(
event: "resumeSession",
sessionId: NonSharedBuffer,
callback: (err: Error | null, sessionData: Buffer | null) => void,
): boolean;
emit(event: "secureConnection", tlsSocket: tls.TLSSocket): boolean;
emit(event: "tlsClientError", err: Error, tlsSocket: tls.TLSSocket): boolean;
emit(event: "close"): boolean;
emit(event: "connection", socket: Duplex): boolean;
emit(event: "error", err: Error): boolean;
emit(event: "listening"): boolean;
emit(
event: "checkContinue",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean;
emit(
event: "checkExpectation",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean;
emit(event: "clientError", err: Error, socket: Duplex): boolean;
emit(event: "connect", req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer): boolean;
emit(
event: "request",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean;
emit(event: "upgrade", req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer): boolean;
on(event: string, listener: (...args: any[]) => void): this;
on(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
on(
event: "newSession",
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
): this;
on(
event: "OCSPRequest",
listener: (
certificate: NonSharedBuffer,
issuer: NonSharedBuffer,
callback: (err: Error | null, resp: Buffer | null) => void,
) => void,
): this;
on(
event: "resumeSession",
listener: (
sessionId: NonSharedBuffer,
callback: (err: Error | null, sessionData: Buffer | null) => void,
) => void,
): this;
on(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
on(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
on(event: "close", listener: () => void): this;
on(event: "connection", listener: (socket: Duplex) => void): this;
on(event: "error", listener: (err: Error) => void): this;
on(event: "listening", listener: () => void): this;
on(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
on(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
on(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
on(
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
on(event: "request", listener: http.RequestListener<Request, Response>): this;
on(
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
once(event: string, listener: (...args: any[]) => void): this;
once(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
once(
event: "newSession",
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
): this;
once(
event: "OCSPRequest",
listener: (
certificate: NonSharedBuffer,
issuer: NonSharedBuffer,
callback: (err: Error | null, resp: Buffer | null) => void,
) => void,
): this;
once(
event: "resumeSession",
listener: (
sessionId: NonSharedBuffer,
callback: (err: Error | null, sessionData: Buffer | null) => void,
) => void,
): this;
once(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
once(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
once(event: "close", listener: () => void): this;
once(event: "connection", listener: (socket: Duplex) => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "listening", listener: () => void): this;
once(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
once(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
once(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
once(
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
once(event: "request", listener: http.RequestListener<Request, Response>): this;
once(
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
prependListener(event: string, listener: (...args: any[]) => void): this;
prependListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
prependListener(
event: "newSession",
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
): this;
prependListener(
event: "OCSPRequest",
listener: (
certificate: NonSharedBuffer,
issuer: NonSharedBuffer,
callback: (err: Error | null, resp: Buffer | null) => void,
) => void,
): this;
prependListener(
event: "resumeSession",
listener: (
sessionId: NonSharedBuffer,
callback: (err: Error | null, sessionData: Buffer | null) => void,
) => void,
): this;
prependListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependListener(event: "close", listener: () => void): this;
prependListener(event: "connection", listener: (socket: Duplex) => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "listening", listener: () => void): this;
prependListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
prependListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
prependListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
prependListener(
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
prependListener(event: "request", listener: http.RequestListener<Request, Response>): this;
prependListener(
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
prependOnceListener(event: string, listener: (...args: any[]) => void): this;
prependOnceListener(event: "keylog", listener: (line: NonSharedBuffer, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(
event: "newSession",
listener: (sessionId: NonSharedBuffer, sessionData: NonSharedBuffer, callback: () => void) => void,
): this;
prependOnceListener(
event: "OCSPRequest",
listener: (
certificate: NonSharedBuffer,
issuer: NonSharedBuffer,
callback: (err: Error | null, resp: Buffer | null) => void,
) => void,
): this;
prependOnceListener(
event: "resumeSession",
listener: (
sessionId: NonSharedBuffer,
callback: (err: Error | null, sessionData: Buffer | null) => void,
) => void,
): this;
prependOnceListener(event: "secureConnection", listener: (tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: "tlsClientError", listener: (err: Error, tlsSocket: tls.TLSSocket) => void): this;
prependOnceListener(event: "close", listener: () => void): this;
prependOnceListener(event: "connection", listener: (socket: Duplex) => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "listening", listener: () => void): this;
prependOnceListener(event: "checkContinue", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: "checkExpectation", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(event: "clientError", listener: (err: Error, socket: Duplex) => void): this;
prependOnceListener(
event: "connect",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
prependOnceListener(event: "request", listener: http.RequestListener<Request, Response>): this;
prependOnceListener(
event: "upgrade",
listener: (req: InstanceType<Request>, socket: Duplex, head: NonSharedBuffer) => void,
): this;
}
/**
* ```js
* // curl -k https://localhost:8000/
* import https from 'node:https';
* import fs from 'node:fs';
*
* const options = {
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* };
*
* https.createServer(options, (req, res) => {
* res.writeHead(200);
* res.end('hello world\n');
* }).listen(8000);
* ```
*
* Or
*
* ```js
* import https from 'node:https';
* import fs from 'node:fs';
*
* const options = {
* pfx: fs.readFileSync('test/fixtures/test_cert.pfx'),
* passphrase: 'sample',
* };
*
* https.createServer(options, (req, res) => {
* res.writeHead(200);
* res.end('hello world\n');
* }).listen(8000);
* ```
* @since v0.3.4
* @param options Accepts `options` from `createServer`, `createSecureContext` and `createServer`.
* @param requestListener A listener to be added to the `'request'` event.
*/
function createServer<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
>(requestListener?: http.RequestListener<Request, Response>): Server<Request, Response>;
function createServer<
Request extends typeof http.IncomingMessage = typeof http.IncomingMessage,
Response extends typeof http.ServerResponse<InstanceType<Request>> = typeof http.ServerResponse,
>(
options: ServerOptions<Request, Response>,
requestListener?: http.RequestListener<Request, Response>,
): Server<Request, Response>;
/**
* Makes a request to a secure web server.
*
* The following additional `options` from `tls.connect()` are also accepted: `ca`, `cert`, `ciphers`, `clientCertEngine`, `crl`, `dhparam`, `ecdhCurve`, `honorCipherOrder`, `key`, `passphrase`,
* `pfx`, `rejectUnauthorized`, `secureOptions`, `secureProtocol`, `servername`, `sessionIdContext`, `highWaterMark`.
*
* `options` can be an object, a string, or a `URL` object. If `options` is a
* string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
*
* `https.request()` returns an instance of the `http.ClientRequest` class. The `ClientRequest` instance is a writable stream. If one needs to
* upload a file with a POST request, then write to the `ClientRequest` object.
*
* ```js
* import https from 'node:https';
*
* const options = {
* hostname: 'encrypted.google.com',
* port: 443,
* path: '/',
* method: 'GET',
* };
*
* const req = https.request(options, (res) => {
* console.log('statusCode:', res.statusCode);
* console.log('headers:', res.headers);
*
* res.on('data', (d) => {
* process.stdout.write(d);
* });
* });
*
* req.on('error', (e) => {
* console.error(e);
* });
* req.end();
* ```
*
* Example using options from `tls.connect()`:
*
* ```js
* const options = {
* hostname: 'encrypted.google.com',
* port: 443,
* path: '/',
* method: 'GET',
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* };
* options.agent = new https.Agent(options);
*
* const req = https.request(options, (res) => {
* // ...
* });
* ```
*
* Alternatively, opt out of connection pooling by not using an `Agent`.
*
* ```js
* const options = {
* hostname: 'encrypted.google.com',
* port: 443,
* path: '/',
* method: 'GET',
* key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
* cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
* agent: false,
* };
*
* const req = https.request(options, (res) => {
* // ...
* });
* ```
*
* Example using a `URL` as `options`:
*
* ```js
* const options = new URL('https://abc:xyz@example.com');
*
* const req = https.request(options, (res) => {
* // ...
* });
* ```
*
* Example pinning on certificate fingerprint, or the public key (similar to`pin-sha256`):
*
* ```js
* import tls from 'node:tls';
* import https from 'node:https';
* import crypto from 'node:crypto';
*
* function sha256(s) {
* return crypto.createHash('sha256').update(s).digest('base64');
* }
* const options = {
* hostname: 'github.com',
* port: 443,
* path: '/',
* method: 'GET',
* checkServerIdentity: function(host, cert) {
* // Make sure the certificate is issued to the host we are connected to
* const err = tls.checkServerIdentity(host, cert);
* if (err) {
* return err;
* }
*
* // Pin the public key, similar to HPKP pin-sha256 pinning
* const pubkey256 = 'pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=';
* if (sha256(cert.pubkey) !== pubkey256) {
* const msg = 'Certificate verification error: ' +
* `The public key of '${cert.subject.CN}' ` +
* 'does not match our pinned fingerprint';
* return new Error(msg);
* }
*
* // Pin the exact certificate, rather than the pub key
* const cert256 = '25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:' +
* 'D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16';
* if (cert.fingerprint256 !== cert256) {
* const msg = 'Certificate verification error: ' +
* `The certificate of '${cert.subject.CN}' ` +
* 'does not match our pinned fingerprint';
* return new Error(msg);
* }
*
* // This loop is informational only.
* // Print the certificate and public key fingerprints of all certs in the
* // chain. Its common to pin the public key of the issuer on the public
* // internet, while pinning the public key of the service in sensitive
* // environments.
* do {
* console.log('Subject Common Name:', cert.subject.CN);
* console.log(' Certificate SHA256 fingerprint:', cert.fingerprint256);
*
* hash = crypto.createHash('sha256');
* console.log(' Public key ping-sha256:', sha256(cert.pubkey));
*
* lastprint256 = cert.fingerprint256;
* cert = cert.issuerCertificate;
* } while (cert.fingerprint256 !== lastprint256);
*
* },
* };
*
* options.agent = new https.Agent(options);
* const req = https.request(options, (res) => {
* console.log('All OK. Server matched our pinned cert or public key');
* console.log('statusCode:', res.statusCode);
* // Print the HPKP values
* console.log('headers:', res.headers['public-key-pins']);
*
* res.on('data', (d) => {});
* });
*
* req.on('error', (e) => {
* console.error(e.message);
* });
* req.end();
* ```
*
* Outputs for example:
*
* ```text
* Subject Common Name: github.com
* Certificate SHA256 fingerprint: 25:FE:39:32:D9:63:8C:8A:FC:A1:9A:29:87:D8:3E:4C:1D:98:DB:71:E4:1A:48:03:98:EA:22:6A:BD:8B:93:16
* Public key ping-sha256: pL1+qb9HTMRZJmuC/bB/ZI9d302BYrrqiVuRyW+DGrU=
* Subject Common Name: DigiCert SHA2 Extended Validation Server CA
* Certificate SHA256 fingerprint: 40:3E:06:2A:26:53:05:91:13:28:5B:AF:80:A0:D4:AE:42:2C:84:8C:9F:78:FA:D0:1F:C9:4B:C5:B8:7F:EF:1A
* Public key ping-sha256: RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=
* Subject Common Name: DigiCert High Assurance EV Root CA
* Certificate SHA256 fingerprint: 74:31:E5:F4:C3:C1:CE:46:90:77:4F:0B:61:E0:54:40:88:3B:A9:A0:1E:D0:0B:A6:AB:D7:80:6E:D3:B1:18:CF
* Public key ping-sha256: WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18=
* All OK. Server matched our pinned cert or public key
* statusCode: 200
* headers: max-age=0; pin-sha256="WoiWRyIOVNa9ihaBciRSC7XHjliYS9VwUGOIud4PB18="; pin-sha256="RRM1dGqnDFsCJXBTHky16vi1obOlCgFFn/yOhI/y+ho=";
* pin-sha256="k2v657xBsOVe1PQRwOsHsw3bsGT2VzIqz5K+59sNQws="; pin-sha256="K87oWBWM9UZfyddvDfoxL+8lpNyoUB2ptGtn0fv6G2Q="; pin-sha256="IQBnNBEiFuhj+8x6X8XLgh01V9Ic5/V3IRQLNFFc7v4=";
* pin-sha256="iie1VXtL7HzAMF+/PVPR9xzT80kQxdZeJ+zduCB3uj0="; pin-sha256="LvRiGEjRqfzurezaWuj8Wie2gyHMrW5Q06LspMnox7A="; includeSubDomains
* ```
* @since v0.3.6
* @param options Accepts all `options` from `request`, with some differences in default values:
*/
function request(
options: RequestOptions | string | URL,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function request(
url: string | URL,
options: RequestOptions,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
/**
* Like `http.get()` but for HTTPS.
*
* `options` can be an object, a string, or a `URL` object. If `options` is a
* string, it is automatically parsed with `new URL()`. If it is a `URL` object, it will be automatically converted to an ordinary `options` object.
*
* ```js
* import https from 'node:https';
*
* https.get('https://encrypted.google.com/', (res) => {
* console.log('statusCode:', res.statusCode);
* console.log('headers:', res.headers);
*
* res.on('data', (d) => {
* process.stdout.write(d);
* });
*
* }).on('error', (e) => {
* console.error(e);
* });
* ```
* @since v0.3.6
* @param options Accepts the same `options` as {@link request}, with the `method` always set to `GET`.
*/
function get(
options: RequestOptions | string | URL,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
function get(
url: string | URL,
options: RequestOptions,
callback?: (res: http.IncomingMessage) => void,
): http.ClientRequest;
let globalAgent: Agent;
}
declare module "node:https" {
export * from "https";
}
@@ -0,0 +1,14 @@
import type { BasicTarget } from '../utils/domTarget';
interface Rect {
top: number;
left: number;
bottom: number;
right: number;
height: number;
width: number;
}
export interface State extends Rect {
text: string;
}
declare function useTextSelection(target?: BasicTarget<Document | Element>): State;
export default useTextSelection;
@@ -0,0 +1,38 @@
'use strict';
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isArrayBuffer = require('is-array-buffer');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var MessageChannel;
try {
// eslint-disable-next-line global-require
MessageChannel = require('worker_threads').MessageChannel; // node 11.7+
} catch (e) { /**/ }
// https://262.ecma-international.org/6.0/#sec-detacharraybuffer
/* globals postMessage */
module.exports = function DetachArrayBuffer(arrayBuffer) {
if (!isArrayBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot');
}
if (!IsDetachedBuffer(arrayBuffer)) { // node v21.0.0+ throws when you structuredClone a detached buffer
if (typeof structuredClone === 'function') {
structuredClone(arrayBuffer, { transfer: [arrayBuffer] });
} else if (typeof postMessage === 'function') {
postMessage('', '/', [arrayBuffer]); // TODO: see if this might trigger listeners
} else if (MessageChannel) {
(new MessageChannel()).port1.postMessage(null, [arrayBuffer]);
} else {
throw new $SyntaxError('DetachArrayBuffer is not supported in this environment');
}
}
return null;
};
@@ -0,0 +1,45 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $SyntaxError = require('es-errors/syntax');
var $TypeError = require('es-errors/type');
var isObject = require('es-object-atoms/isObject');
var $Promise = GetIntrinsic('%Promise%', true);
var callBound = require('call-bound');
var CreateIteratorResultObject = require('./CreateIteratorResultObject');
var IteratorComplete = require('./IteratorComplete');
var IteratorValue = require('./IteratorValue');
var PromiseResolve = require('./PromiseResolve');
var $then = callBound('Promise.prototype.then', true);
// https://262.ecma-international.org/16.0/#sec-asyncfromsynciteratorcontinuation
module.exports = function AsyncFromSyncIteratorContinuation(result) {
if (!isObject(result)) {
throw new $TypeError('Assertion failed: Type(O) is not Object');
}
if (arguments.length > 1) {
throw new $SyntaxError('although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation');
}
if (!$Promise) {
throw new $SyntaxError('This environment does not support Promises.');
}
return new $Promise(function (resolve) {
var done = IteratorComplete(result); // step 2
var value = IteratorValue(result); // step 4
var valueWrapper = PromiseResolve($Promise, value); // step 6
// eslint-disable-next-line no-shadow
var onFulfilled = function (value) { // steps 8-9
return CreateIteratorResultObject(value, done); // step 8.a
};
resolve($then(valueWrapper, onFulfilled)); // step 11
}); // step 12
};
@@ -0,0 +1,187 @@
declare module "safe-buffer" {
export class Buffer {
length: number
write(string: string, offset?: number, length?: number, encoding?: string): number;
toString(encoding?: string, start?: number, end?: number): string;
toJSON(): { type: 'Buffer', data: any[] };
equals(otherBuffer: Buffer): boolean;
compare(otherBuffer: Buffer, targetStart?: number, targetEnd?: number, sourceStart?: number, sourceEnd?: number): number;
copy(targetBuffer: Buffer, targetStart?: number, sourceStart?: number, sourceEnd?: number): number;
slice(start?: number, end?: number): Buffer;
writeUIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
writeUIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
writeIntLE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
writeIntBE(value: number, offset: number, byteLength: number, noAssert?: boolean): number;
readUIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
readUIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
readIntLE(offset: number, byteLength: number, noAssert?: boolean): number;
readIntBE(offset: number, byteLength: number, noAssert?: boolean): number;
readUInt8(offset: number, noAssert?: boolean): number;
readUInt16LE(offset: number, noAssert?: boolean): number;
readUInt16BE(offset: number, noAssert?: boolean): number;
readUInt32LE(offset: number, noAssert?: boolean): number;
readUInt32BE(offset: number, noAssert?: boolean): number;
readInt8(offset: number, noAssert?: boolean): number;
readInt16LE(offset: number, noAssert?: boolean): number;
readInt16BE(offset: number, noAssert?: boolean): number;
readInt32LE(offset: number, noAssert?: boolean): number;
readInt32BE(offset: number, noAssert?: boolean): number;
readFloatLE(offset: number, noAssert?: boolean): number;
readFloatBE(offset: number, noAssert?: boolean): number;
readDoubleLE(offset: number, noAssert?: boolean): number;
readDoubleBE(offset: number, noAssert?: boolean): number;
swap16(): Buffer;
swap32(): Buffer;
swap64(): Buffer;
writeUInt8(value: number, offset: number, noAssert?: boolean): number;
writeUInt16LE(value: number, offset: number, noAssert?: boolean): number;
writeUInt16BE(value: number, offset: number, noAssert?: boolean): number;
writeUInt32LE(value: number, offset: number, noAssert?: boolean): number;
writeUInt32BE(value: number, offset: number, noAssert?: boolean): number;
writeInt8(value: number, offset: number, noAssert?: boolean): number;
writeInt16LE(value: number, offset: number, noAssert?: boolean): number;
writeInt16BE(value: number, offset: number, noAssert?: boolean): number;
writeInt32LE(value: number, offset: number, noAssert?: boolean): number;
writeInt32BE(value: number, offset: number, noAssert?: boolean): number;
writeFloatLE(value: number, offset: number, noAssert?: boolean): number;
writeFloatBE(value: number, offset: number, noAssert?: boolean): number;
writeDoubleLE(value: number, offset: number, noAssert?: boolean): number;
writeDoubleBE(value: number, offset: number, noAssert?: boolean): number;
fill(value: any, offset?: number, end?: number): this;
indexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
lastIndexOf(value: string | number | Buffer, byteOffset?: number, encoding?: string): number;
includes(value: string | number | Buffer, byteOffset?: number, encoding?: string): boolean;
/**
* Allocates a new buffer containing the given {str}.
*
* @param str String to store in buffer.
* @param encoding encoding to use, optional. Default is 'utf8'
*/
constructor (str: string, encoding?: string);
/**
* Allocates a new buffer of {size} octets.
*
* @param size count of octets to allocate.
*/
constructor (size: number);
/**
* Allocates a new buffer containing the given {array} of octets.
*
* @param array The octets to store.
*/
constructor (array: Uint8Array);
/**
* Produces a Buffer backed by the same allocated memory as
* the given {ArrayBuffer}.
*
*
* @param arrayBuffer The ArrayBuffer with which to share memory.
*/
constructor (arrayBuffer: ArrayBuffer);
/**
* Allocates a new buffer containing the given {array} of octets.
*
* @param array The octets to store.
*/
constructor (array: any[]);
/**
* Copies the passed {buffer} data onto a new {Buffer} instance.
*
* @param buffer The buffer to copy.
*/
constructor (buffer: Buffer);
prototype: Buffer;
/**
* Allocates a new Buffer using an {array} of octets.
*
* @param array
*/
static from(array: any[]): Buffer;
/**
* When passed a reference to the .buffer property of a TypedArray instance,
* the newly created Buffer will share the same allocated memory as the TypedArray.
* The optional {byteOffset} and {length} arguments specify a memory range
* within the {arrayBuffer} that will be shared by the Buffer.
*
* @param arrayBuffer The .buffer property of a TypedArray or a new ArrayBuffer()
* @param byteOffset
* @param length
*/
static from(arrayBuffer: ArrayBuffer, byteOffset?: number, length?: number): Buffer;
/**
* Copies the passed {buffer} data onto a new Buffer instance.
*
* @param buffer
*/
static from(buffer: Buffer): Buffer;
/**
* Creates a new Buffer containing the given JavaScript string {str}.
* If provided, the {encoding} parameter identifies the character encoding.
* If not provided, {encoding} defaults to 'utf8'.
*
* @param str
*/
static from(str: string, encoding?: string): Buffer;
/**
* Returns true if {obj} is a Buffer
*
* @param obj object to test.
*/
static isBuffer(obj: any): obj is Buffer;
/**
* Returns true if {encoding} is a valid encoding argument.
* Valid string encodings in Node 0.12: 'ascii'|'utf8'|'utf16le'|'ucs2'(alias of 'utf16le')|'base64'|'binary'(deprecated)|'hex'
*
* @param encoding string to test.
*/
static isEncoding(encoding: string): boolean;
/**
* Gives the actual byte length of a string. encoding defaults to 'utf8'.
* This is not the same as String.prototype.length since that returns the number of characters in a string.
*
* @param string string to test.
* @param encoding encoding used to evaluate (defaults to 'utf8')
*/
static byteLength(string: string, encoding?: string): number;
/**
* Returns a buffer which is the result of concatenating all the buffers in the list together.
*
* If the list has no items, or if the totalLength is 0, then it returns a zero-length buffer.
* If the list has exactly one item, then the first item of the list is returned.
* If the list has more than one item, then a new Buffer is created.
*
* @param list An array of Buffer objects to concatenate
* @param totalLength Total length of the buffers when concatenated.
* If totalLength is not provided, it is read from the buffers in the list. However, this adds an additional loop to the function, so it is faster to provide the length explicitly.
*/
static concat(list: Buffer[], totalLength?: number): Buffer;
/**
* The same as buf1.compare(buf2).
*/
static compare(buf1: Buffer, buf2: Buffer): number;
/**
* Allocates a new buffer of {size} octets.
*
* @param size count of octets to allocate.
* @param fill if specified, buffer will be initialized by calling buf.fill(fill).
* If parameter is omitted, buffer will be filled with zeros.
* @param encoding encoding used for call to buf.fill while initalizing
*/
static alloc(size: number, fill?: string | Buffer | number, encoding?: string): Buffer;
/**
* Allocates a new buffer of {size} octets, leaving memory not initialized, so the contents
* of the newly created Buffer are unknown and may contain sensitive data.
*
* @param size count of octets to allocate
*/
static allocUnsafe(size: number): Buffer;
/**
* Allocates a new non-pooled buffer of {size} octets, leaving memory not initialized, so the contents
* of the newly created Buffer are unknown and may contain sensitive data.
*
* @param size count of octets to allocate
*/
static allocUnsafeSlow(size: number): Buffer;
}
}
@@ -0,0 +1,13 @@
import { useRef } from 'react';
var defaultShouldUpdate = function (a, b) { return !Object.is(a, b); };
function usePrevious(state, shouldUpdate) {
if (shouldUpdate === void 0) { shouldUpdate = defaultShouldUpdate; }
var prevRef = useRef(undefined);
var curRef = useRef(undefined);
if (shouldUpdate(curRef.current, state)) {
prevRef.current = curRef.current;
curRef.current = state;
}
return prevRef.current;
}
export default usePrevious;
@@ -0,0 +1,6 @@
{
"private": true,
"types": "../dist/react-m.d.ts",
"main": "../dist/cjs/react-m.js",
"module": "../dist/es/react-m.mjs"
}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/focus/src/index.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\nexport {FocusScope, useFocusManager, getFocusableTreeWalker, createFocusManager, isElementInChildOfActiveScope, isFocusable} from './FocusScope';\nexport {FocusRing} from './FocusRing';\nexport {FocusableProvider, useFocusable} from './useFocusable';\nexport {useFocusRing} from './useFocusRing';\nexport {focusSafely} from './focusSafely';\nexport {useHasTabbableChild} from './useHasTabbableChild';\n\nexport type {FocusScopeProps, FocusManager, FocusManagerOptions} from './FocusScope';\nexport type {FocusRingProps} from './FocusRing';\nexport type {FocusableAria, FocusableOptions, FocusableProviderProps} from './useFocusable';\nexport type {AriaFocusRingProps, FocusRingAria} from './useFocusRing';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -0,0 +1,7 @@
export default (function (o, c) {
var proto = c.prototype;
var pluralAliases = ['milliseconds', 'seconds', 'minutes', 'hours', 'days', 'weeks', 'isoWeeks', 'months', 'quarters', 'years', 'dates'];
pluralAliases.forEach(function (alias) {
proto[alias] = proto[alias.replace(/s$/, '')];
});
});
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_throw.cjs",
"module": "../../esm/_throw.js"
}
@@ -0,0 +1,570 @@
import { createRequire } from "module";
import { basename, dirname, normalize, relative, resolve, sep } from "path";
import * as nativeFs from "fs";
//#region rolldown:runtime
var __require = /* @__PURE__ */ createRequire(import.meta.url);
//#endregion
//#region src/utils.ts
function cleanPath(path) {
let normalized = normalize(path);
if (normalized.length > 1 && normalized[normalized.length - 1] === sep) normalized = normalized.substring(0, normalized.length - 1);
return normalized;
}
const SLASHES_REGEX = /[\\/]/g;
function convertSlashes(path, separator) {
return path.replace(SLASHES_REGEX, separator);
}
const WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
function isRootDirectory(path) {
return path === "/" || WINDOWS_ROOT_DIR_REGEX.test(path);
}
function normalizePath(path, options) {
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
const pathNeedsCleaning = process.platform === "win32" && path.includes("/") || path.startsWith(".");
if (resolvePaths) path = resolve(path);
if (normalizePath$1 || pathNeedsCleaning) path = cleanPath(path);
if (path === ".") return "";
const needsSeperator = path[path.length - 1] !== pathSeparator;
return convertSlashes(needsSeperator ? path + pathSeparator : path, pathSeparator);
}
//#endregion
//#region src/api/functions/join-path.ts
function joinPathWithBasePath(filename, directoryPath) {
return directoryPath + filename;
}
function joinPathWithRelativePath(root, options) {
return function(filename, directoryPath) {
const sameRoot = directoryPath.startsWith(root);
if (sameRoot) return directoryPath.slice(root.length) + filename;
else return convertSlashes(relative(root, directoryPath), options.pathSeparator) + options.pathSeparator + filename;
};
}
function joinPath(filename) {
return filename;
}
function joinDirectoryPath(filename, directoryPath, separator) {
return directoryPath + filename + separator;
}
function build$7(root, options) {
const { relativePaths, includeBasePath } = options;
return relativePaths && root ? joinPathWithRelativePath(root, options) : includeBasePath ? joinPathWithBasePath : joinPath;
}
//#endregion
//#region src/api/functions/push-directory.ts
function pushDirectoryWithRelativePath(root) {
return function(directoryPath, paths) {
paths.push(directoryPath.substring(root.length) || ".");
};
}
function pushDirectoryFilterWithRelativePath(root) {
return function(directoryPath, paths, filters) {
const relativePath = directoryPath.substring(root.length) || ".";
if (filters.every((filter) => filter(relativePath, true))) paths.push(relativePath);
};
}
const pushDirectory = (directoryPath, paths) => {
paths.push(directoryPath || ".");
};
const pushDirectoryFilter = (directoryPath, paths, filters) => {
const path = directoryPath || ".";
if (filters.every((filter) => filter(path, true))) paths.push(path);
};
const empty$2 = () => {};
function build$6(root, options) {
const { includeDirs, filters, relativePaths } = options;
if (!includeDirs) return empty$2;
if (relativePaths) return filters && filters.length ? pushDirectoryFilterWithRelativePath(root) : pushDirectoryWithRelativePath(root);
return filters && filters.length ? pushDirectoryFilter : pushDirectory;
}
//#endregion
//#region src/api/functions/push-file.ts
const pushFileFilterAndCount = (filename, _paths, counts, filters) => {
if (filters.every((filter) => filter(filename, false))) counts.files++;
};
const pushFileFilter = (filename, paths, _counts, filters) => {
if (filters.every((filter) => filter(filename, false))) paths.push(filename);
};
const pushFileCount = (_filename, _paths, counts, _filters) => {
counts.files++;
};
const pushFile = (filename, paths) => {
paths.push(filename);
};
const empty$1 = () => {};
function build$5(options) {
const { excludeFiles, filters, onlyCounts } = options;
if (excludeFiles) return empty$1;
if (filters && filters.length) return onlyCounts ? pushFileFilterAndCount : pushFileFilter;
else if (onlyCounts) return pushFileCount;
else return pushFile;
}
//#endregion
//#region src/api/functions/get-array.ts
const getArray = (paths) => {
return paths;
};
const getArrayGroup = () => {
return [""].slice(0, 0);
};
function build$4(options) {
return options.group ? getArrayGroup : getArray;
}
//#endregion
//#region src/api/functions/group-files.ts
const groupFiles = (groups, directory, files) => {
groups.push({
directory,
files,
dir: directory
});
};
const empty = () => {};
function build$3(options) {
return options.group ? groupFiles : empty;
}
//#endregion
//#region src/api/functions/resolve-symlink.ts
const resolveSymlinksAsync = function(path, state, callback$1) {
const { queue, fs, options: { suppressErrors } } = state;
queue.enqueue();
fs.realpath(path, (error, resolvedPath) => {
if (error) return queue.dequeue(suppressErrors ? null : error, state);
fs.stat(resolvedPath, (error$1, stat) => {
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return queue.dequeue(null, state);
callback$1(stat, resolvedPath);
queue.dequeue(null, state);
});
});
};
const resolveSymlinks = function(path, state, callback$1) {
const { queue, fs, options: { suppressErrors } } = state;
queue.enqueue();
try {
const resolvedPath = fs.realpathSync(path);
const stat = fs.statSync(resolvedPath);
if (stat.isDirectory() && isRecursive(path, resolvedPath, state)) return;
callback$1(stat, resolvedPath);
} catch (e) {
if (!suppressErrors) throw e;
}
};
function build$2(options, isSynchronous) {
if (!options.resolveSymlinks || options.excludeSymlinks) return null;
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
}
function isRecursive(path, resolved, state) {
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
let parent = dirname(path);
let depth = 1;
while (parent !== state.root && depth < 2) {
const resolvedPath = state.symlinks.get(parent);
const isSameRoot = !!resolvedPath && (resolvedPath === resolved || resolvedPath.startsWith(resolved) || resolved.startsWith(resolvedPath));
if (isSameRoot) depth++;
else parent = dirname(parent);
}
state.symlinks.set(path, resolved);
return depth > 1;
}
function isRecursiveUsingRealPaths(resolved, state) {
return state.visited.includes(resolved + state.options.pathSeparator);
}
//#endregion
//#region src/api/functions/invoke-callback.ts
const onlyCountsSync = (state) => {
return state.counts;
};
const groupsSync = (state) => {
return state.groups;
};
const defaultSync = (state) => {
return state.paths;
};
const limitFilesSync = (state) => {
return state.paths.slice(0, state.options.maxFiles);
};
const onlyCountsAsync = (state, error, callback$1) => {
report(error, callback$1, state.counts, state.options.suppressErrors);
return null;
};
const defaultAsync = (state, error, callback$1) => {
report(error, callback$1, state.paths, state.options.suppressErrors);
return null;
};
const limitFilesAsync = (state, error, callback$1) => {
report(error, callback$1, state.paths.slice(0, state.options.maxFiles), state.options.suppressErrors);
return null;
};
const groupsAsync = (state, error, callback$1) => {
report(error, callback$1, state.groups, state.options.suppressErrors);
return null;
};
function report(error, callback$1, output, suppressErrors) {
if (error && !suppressErrors) callback$1(error, output);
else callback$1(null, output);
}
function build$1(options, isSynchronous) {
const { onlyCounts, group, maxFiles } = options;
if (onlyCounts) return isSynchronous ? onlyCountsSync : onlyCountsAsync;
else if (group) return isSynchronous ? groupsSync : groupsAsync;
else if (maxFiles) return isSynchronous ? limitFilesSync : limitFilesAsync;
else return isSynchronous ? defaultSync : defaultAsync;
}
//#endregion
//#region src/api/functions/walk-directory.ts
const readdirOpts = { withFileTypes: true };
const walkAsync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
state.queue.enqueue();
if (currentDepth < 0) return state.queue.dequeue(null, state);
const { fs } = state;
state.visited.push(crawlPath);
state.counts.directories++;
fs.readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
callback$1(entries, directoryPath, currentDepth);
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
});
};
const walkSync = (state, crawlPath, directoryPath, currentDepth, callback$1) => {
const { fs } = state;
if (currentDepth < 0) return;
state.visited.push(crawlPath);
state.counts.directories++;
let entries = [];
try {
entries = fs.readdirSync(crawlPath || ".", readdirOpts);
} catch (e) {
if (!state.options.suppressErrors) throw e;
}
callback$1(entries, directoryPath, currentDepth);
};
function build(isSynchronous) {
return isSynchronous ? walkSync : walkAsync;
}
//#endregion
//#region src/api/queue.ts
/**
* This is a custom stateless queue to track concurrent async fs calls.
* It increments a counter whenever a call is queued and decrements it
* as soon as it completes. When the counter hits 0, it calls onQueueEmpty.
*/
var Queue = class {
count = 0;
constructor(onQueueEmpty) {
this.onQueueEmpty = onQueueEmpty;
}
enqueue() {
this.count++;
return this.count;
}
dequeue(error, output) {
if (this.onQueueEmpty && (--this.count <= 0 || error)) {
this.onQueueEmpty(error, output);
if (error) {
output.controller.abort();
this.onQueueEmpty = void 0;
}
}
}
};
//#endregion
//#region src/api/counter.ts
var Counter = class {
_files = 0;
_directories = 0;
set files(num) {
this._files = num;
}
get files() {
return this._files;
}
set directories(num) {
this._directories = num;
}
get directories() {
return this._directories;
}
/**
* @deprecated use `directories` instead
*/
/* c8 ignore next 3 */
get dirs() {
return this._directories;
}
};
//#endregion
//#region src/api/aborter.ts
/**
* AbortController is not supported on Node 14 so we use this until we can drop
* support for Node 14.
*/
var Aborter = class {
aborted = false;
abort() {
this.aborted = true;
}
};
//#endregion
//#region src/api/walker.ts
var Walker = class {
root;
isSynchronous;
state;
joinPath;
pushDirectory;
pushFile;
getArray;
groupFiles;
resolveSymlink;
walkDirectory;
callbackInvoker;
constructor(root, options, callback$1) {
this.isSynchronous = !callback$1;
this.callbackInvoker = build$1(options, this.isSynchronous);
this.root = normalizePath(root, options);
this.state = {
root: isRootDirectory(this.root) ? this.root : this.root.slice(0, -1),
paths: [""].slice(0, 0),
groups: [],
counts: new Counter(),
options,
queue: new Queue((error, state) => this.callbackInvoker(state, error, callback$1)),
symlinks: /* @__PURE__ */ new Map(),
visited: [""].slice(0, 0),
controller: new Aborter(),
fs: options.fs || nativeFs
};
this.joinPath = build$7(this.root, options);
this.pushDirectory = build$6(this.root, options);
this.pushFile = build$5(options);
this.getArray = build$4(options);
this.groupFiles = build$3(options);
this.resolveSymlink = build$2(options, this.isSynchronous);
this.walkDirectory = build(this.isSynchronous);
}
start() {
this.pushDirectory(this.root, this.state.paths, this.state.options.filters);
this.walkDirectory(this.state, this.root, this.root, this.state.options.maxDepth, this.walk);
return this.isSynchronous ? this.callbackInvoker(this.state, null) : null;
}
walk = (entries, directoryPath, depth) => {
const { paths, options: { filters, resolveSymlinks: resolveSymlinks$1, excludeSymlinks, exclude, maxFiles, signal, useRealPaths, pathSeparator }, controller } = this.state;
if (controller.aborted || signal && signal.aborted || maxFiles && paths.length > maxFiles) return;
const files = this.getArray(this.state.paths);
for (let i = 0; i < entries.length; ++i) {
const entry = entries[i];
if (entry.isFile() || entry.isSymbolicLink() && !resolveSymlinks$1 && !excludeSymlinks) {
const filename = this.joinPath(entry.name, directoryPath);
this.pushFile(filename, files, this.state.counts, filters);
} else if (entry.isDirectory()) {
let path = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
if (exclude && exclude(entry.name, path)) continue;
this.pushDirectory(path, paths, filters);
this.walkDirectory(this.state, path, path, depth - 1, this.walk);
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
let path = joinPathWithBasePath(entry.name, directoryPath);
this.resolveSymlink(path, this.state, (stat, resolvedPath) => {
if (stat.isDirectory()) {
resolvedPath = normalizePath(resolvedPath, this.state.options);
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path + pathSeparator)) return;
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path + pathSeparator, depth - 1, this.walk);
} else {
resolvedPath = useRealPaths ? resolvedPath : path;
const filename = basename(resolvedPath);
const directoryPath$1 = normalizePath(dirname(resolvedPath), this.state.options);
resolvedPath = this.joinPath(filename, directoryPath$1);
this.pushFile(resolvedPath, files, this.state.counts, filters);
}
});
}
}
this.groupFiles(this.state.groups, directoryPath, files);
};
};
//#endregion
//#region src/api/async.ts
function promise(root, options) {
return new Promise((resolve$1, reject) => {
callback(root, options, (err, output) => {
if (err) return reject(err);
resolve$1(output);
});
});
}
function callback(root, options, callback$1) {
let walker = new Walker(root, options, callback$1);
walker.start();
}
//#endregion
//#region src/api/sync.ts
function sync(root, options) {
const walker = new Walker(root, options);
return walker.start();
}
//#endregion
//#region src/builder/api-builder.ts
var APIBuilder = class {
constructor(root, options) {
this.root = root;
this.options = options;
}
withPromise() {
return promise(this.root, this.options);
}
withCallback(cb) {
callback(this.root, this.options, cb);
}
sync() {
return sync(this.root, this.options);
}
};
//#endregion
//#region src/builder/index.ts
let pm = null;
/* c8 ignore next 6 */
try {
__require.resolve("picomatch");
pm = __require("picomatch");
} catch {}
var Builder = class {
globCache = {};
options = {
maxDepth: Infinity,
suppressErrors: true,
pathSeparator: sep,
filters: []
};
globFunction;
constructor(options) {
this.options = {
...this.options,
...options
};
this.globFunction = this.options.globFunction;
}
group() {
this.options.group = true;
return this;
}
withPathSeparator(separator) {
this.options.pathSeparator = separator;
return this;
}
withBasePath() {
this.options.includeBasePath = true;
return this;
}
withRelativePaths() {
this.options.relativePaths = true;
return this;
}
withDirs() {
this.options.includeDirs = true;
return this;
}
withMaxDepth(depth) {
this.options.maxDepth = depth;
return this;
}
withMaxFiles(limit) {
this.options.maxFiles = limit;
return this;
}
withFullPaths() {
this.options.resolvePaths = true;
this.options.includeBasePath = true;
return this;
}
withErrors() {
this.options.suppressErrors = false;
return this;
}
withSymlinks({ resolvePaths = true } = {}) {
this.options.resolveSymlinks = true;
this.options.useRealPaths = resolvePaths;
return this.withFullPaths();
}
withAbortSignal(signal) {
this.options.signal = signal;
return this;
}
normalize() {
this.options.normalizePath = true;
return this;
}
filter(predicate) {
this.options.filters.push(predicate);
return this;
}
onlyDirs() {
this.options.excludeFiles = true;
this.options.includeDirs = true;
return this;
}
exclude(predicate) {
this.options.exclude = predicate;
return this;
}
onlyCounts() {
this.options.onlyCounts = true;
return this;
}
crawl(root) {
return new APIBuilder(root || ".", this.options);
}
withGlobFunction(fn) {
this.globFunction = fn;
return this;
}
/**
* @deprecated Pass options using the constructor instead:
* ```ts
* new fdir(options).crawl("/path/to/root");
* ```
* This method will be removed in v7.0
*/
/* c8 ignore next 4 */
crawlWithOptions(root, options) {
this.options = {
...this.options,
...options
};
return new APIBuilder(root || ".", this.options);
}
glob(...patterns) {
if (this.globFunction) return this.globWithOptions(patterns);
return this.globWithOptions(patterns, ...[{ dot: true }]);
}
globWithOptions(patterns, ...options) {
const globFn = this.globFunction || pm;
/* c8 ignore next 5 */
if (!globFn) throw new Error("Please specify a glob function to use glob matching.");
var isMatch = this.globCache[patterns.join("\0")];
if (!isMatch) {
isMatch = globFn(patterns, ...options);
this.globCache[patterns.join("\0")] = isMatch;
}
this.options.filters.push((path) => isMatch(path));
return this;
}
};
//#endregion
export { Builder as fdir };
@@ -0,0 +1,33 @@
{
"name": "@tokenizer/token",
"version": "0.3.0",
"description": "TypeScript definition for strtok3 token",
"main": "",
"types": "index.d.ts",
"files": [
"index.d.ts"
],
"keywords": [
"token",
"interface",
"tokenizer",
"TypeScript"
],
"author": {
"name": "Borewit",
"url": "https://github.com/Borewit"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/Borewit/tokenizer-token.git"
},
"bugs": {
"url": "https://github.com/Borewit/tokenizer-token/issues"
},
"typeScriptVersion": "3.0",
"dependencies": {},
"devDependencies": {
"@types/node": "^13.1.0"
}
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MappedResult = MappedResult;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
// prettier-ignore
function MappedResult(properties) {
return (0, type_1.CreateType)({
[index_1.Kind]: 'MappedResult',
properties
});
}
@@ -0,0 +1,13 @@
import type { TSESTree } from '@typescript-eslint/utils';
import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util';
declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"initialized" | "notInitialized", ["always" | "never", ({
ignoreForLoopInit?: boolean;
} | undefined)?], unknown, {
'VariableDeclaration:exit'(node: TSESTree.VariableDeclaration): void;
}>;
export type Options = InferOptionsTypeFromRule<typeof baseRule>;
export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"initialized" | "notInitialized", ["always" | "never", ({
ignoreForLoopInit?: boolean;
} | undefined)?], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"injectBase.d.ts","sourceRoot":"","sources":["../../../../src/metadata/decorators/injectBase.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAEhF,wBAAgB,UAAU,CACxB,cAAc,EAAE,CACd,QAAQ,EAAE,yBAAyB,GAAG,SAAS,KAC5C,yBAAyB,EAC9B,+BAA+B,EAAE,CAC/B,MAAM,EAAE,MAAM,KACX,CAAC,QAAQ,EAAE,yBAAyB,GAAG,SAAS,KAAK,IAAI,GAC7D,eAAe,GAAG,kBAAkB,GAAG,iBAAiB,CAAC;AAC5D,wBAAgB,UAAU,CACxB,cAAc,EAAE,CACd,QAAQ,EAAE,yBAAyB,GAAG,SAAS,KAC5C,yBAAyB,EAC9B,+BAA+B,EAAE,CAC/B,MAAM,EAAE,MAAM,KACX,CAAC,QAAQ,EAAE,yBAAyB,GAAG,SAAS,KAAK,IAAI,GAC7D,CAAC,CAAC,EACH,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,EACxC,cAAc,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAAC,CAAC,CAAC,KACjD,IAAI,CAAC"}
@@ -0,0 +1,2 @@
declare function isEqual<A = any, B = any>(a: A, b: B): boolean;
export = isEqual;
@@ -0,0 +1,44 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateAuthenticationOptions = generateAuthenticationOptions;
const index_js_1 = require("../helpers/iso/index.js");
const generateChallenge_js_1 = require("../helpers/generateChallenge.js");
/**
* Prepare a value to pass into navigator.credentials.get(...) for authenticator authentication
*
* **Options:**
*
* @param rpID - Valid domain name (after `https://`)
* @param allowCredentials **(Optional)** - Authenticators previously registered by the user, if any. If undefined the client will ask the user which credential they want to use
* @param challenge **(Optional)** - Random value the authenticator needs to sign and pass back user for authentication. Defaults to generating a random value
* @param timeout **(Optional)** - How long (in ms) the user can take to complete authentication. Defaults to `60000`
* @param userVerification **(Optional)** - Set to `'discouraged'` when asserting as part of a 2FA flow, otherwise set to `'preferred'` or `'required'` as desired. Defaults to `"preferred"`
* @param extensions **(Optional)** - Additional plugins the authenticator or browser should use during authentication
*/
async function generateAuthenticationOptions(options) {
const { allowCredentials, challenge = await (0, generateChallenge_js_1.generateChallenge)(), timeout = 60000, userVerification = 'preferred', extensions, rpID, } = options;
/**
* Preserve ability to specify `string` values for challenges
*/
let _challenge = challenge;
if (typeof _challenge === 'string') {
_challenge = index_js_1.isoUint8Array.fromUTF8String(_challenge);
}
return {
rpId: rpID,
challenge: index_js_1.isoBase64URL.fromBuffer(_challenge),
allowCredentials: allowCredentials?.map((cred) => {
if (!index_js_1.isoBase64URL.isBase64URL(cred.id)) {
throw new Error(`allowCredential id "${cred.id}" is not a valid base64url string`);
}
return {
...cred,
id: index_js_1.isoBase64URL.trimPadding(cred.id),
type: 'public-key',
};
}),
timeout,
userVerification,
extensions,
};
}
@@ -0,0 +1 @@
{"name":"tsx","version":"4.21.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532090853,"integrity":"sha512-GTo7rtO9J+JCun/8mWPCIRC8N3ftZ72dpYEsqKXapL8Zz/ZGReM0DtAHQhw8GLG8KlR1nCYGkYNAkHcitlr1JA==","mode":420,"size":1088},"dist/cli.cjs":{"checkedAt":1794532090853,"integrity":"sha512-iraH1CSYH5Bh0aesfOxV4fFXleM2memwwAkPdpIDsoDYWq1TcWTl7g62e68ZIP+nDcIbeMqMBO62NdtxgKg5oQ==","mode":493,"size":120491},"dist/client-D6NvIMSC.cjs":{"checkedAt":1794532090854,"integrity":"sha512-0UElZRSZfeCYxAgiCwyVfiV8kpK/ftJ1YC3DcCYcKfdsmZYCjACaG8dJyli5Uhl+GDWW8LbAOAukAKtYrlH3cw==","mode":420,"size":549},"dist/get-pipe-path-BoR10qr8.cjs":{"checkedAt":1794532090854,"integrity":"sha512-Kac0ft8Qzx1grm0tPuD9Sn0+HruGz/HyQ7/pgUraBXT8rv98H1kvEhaAShWOTKwOSiouYir8jb65T4uWFwGf3A==","mode":420,"size":435},"dist/index-BWFBUo6r.cjs":{"checkedAt":1794532090854,"integrity":"sha512-8CpKIuOodGZ2Cdm1cbb+5oc5wroRJf2xAO/HPRybUMq+dZFBbIze0G34qTFAdoyGJWzMjLqg01Gzgyg8147vmQ==","mode":420,"size":1181},"dist/index-gckBtVBf.cjs":{"checkedAt":1794532090855,"integrity":"sha512-NCZv13Gj9/hYyACzp9H/voMWZns2x2MXl2jwgsQ+HeTO6pDqRo32WP6TTg3W+VutyfKeQatAnuOrP4pEQWiYLg==","mode":420,"size":52353},"dist/cjs/api/index.cjs":{"checkedAt":1794532090855,"integrity":"sha512-sIog3ApGieP8vUQIy+N53ddgRmtn6mKhawCzDzJMAYOyKez2+smq3d8QzDTP35gDV6Vdbr6DUfb3hysnQfHyZA==","mode":493,"size":586},"dist/cjs/index.cjs":{"checkedAt":1794532090855,"integrity":"sha512-gIU8k8BAeZVmFKDBW4yetT70maaji/zAEYPGlDKllOt1iAn3x8RAPxKWXnIzqR5AfNBWSC4Ga4KtHjuqFZM9fw==","mode":493,"size":484},"dist/esm/api/index.cjs":{"checkedAt":1794532090856,"integrity":"sha512-/FFDlF6aDiazdperEEOV27htyuDI473TtLokKH4QgwO/sI+mYssw3KLDmOnf+GNnyIvGVUmHk0oyMhLPsZWhpw==","mode":493,"size":1255},"dist/esm/index.cjs":{"checkedAt":1794532090856,"integrity":"sha512-+fD92Pc8qUPbk2BTNfP+d3V0cW+8ipxl12NeXTfXmKVoMcpqX3HzSNo4ktOgqxUCpbxT4EiFkj7+YGbPYQffWw==","mode":493,"size":7652},"dist/lexer-DgIbo0BU.cjs":{"checkedAt":1794532090856,"integrity":"sha512-ey/fcRZcBwv52UMTj2Eh2hk8B/hyrQK03hHSnCGlFw4UEikdQf6OTMLrhs6VDEGMH/zIQLOhPcZpTWDOlvXXbA==","mode":420,"size":13507},"dist/loader.cjs":{"checkedAt":1794532090856,"integrity":"sha512-gM0PCr6YKltbrxE4F68Ku0lRuCrSxNIa+w3F8wuoxfl7DZJhFw9ygpMYBChoBwui8twccTwMcucMVNocwnb8xQ==","mode":493,"size":1032},"dist/node-features-roYmp9jK.cjs":{"checkedAt":1794532090856,"integrity":"sha512-vufj2aD4BSPKFWTL/LOm776lAZ/kroOqB3hBu8R26TugMkt6p+VFObn9LJzCRiYv+82YjgNcxNNgbzJD09EiPQ==","mode":420,"size":628},"dist/package-Dxt5kIHw.cjs":{"checkedAt":1794532090857,"integrity":"sha512-/le0+Vd6+BwVVrdkjC+D6+Slt6CpjkBBl195k5Q8lKSVbHQmBqd/EnchOthWEZYqXg4z3ep/yJdVabBbTQteBg==","mode":420,"size":47},"dist/patch-repl.cjs":{"checkedAt":1794532090857,"integrity":"sha512-AsfCbJoZlllgtrse6KazufBKD69SFKAuv4oV0xWuFYkUVDthLIqTShF8+o9Gvu8IxHES/V4/lJZUZDP6xv1P9g==","mode":493,"size":506},"dist/preflight.cjs":{"checkedAt":1794532090857,"integrity":"sha512-NuE7fnI3GyxFCN38X12esS4qGf8xxWcDF8uTGG6XcCq9ScLNAXrCuKg/Sw6CLZggEXH9gRuNTjYSy0yuTCfTvw==","mode":493,"size":1008},"dist/register-2sWVXuRQ.cjs":{"checkedAt":1794532090857,"integrity":"sha512-ZDaA47cRJqxbRr6zMvRB1QIjSMpTwQZFslFhnM3iAS10hUn9MqKHT6B9+5YnFvPlDMdYv2VqwuWougkjekRp1Q==","mode":420,"size":1664},"dist/register-D46fvsV_.cjs":{"checkedAt":1794532090857,"integrity":"sha512-oY5zU9EVEewsOlQWka65F00VguafMz89AXkbrJh53vE6BZeh5Aboa5fWxY16kmC4zwBErqZwKbMJ0Y7Sz5vg4Q==","mode":420,"size":8003},"dist/repl.cjs":{"checkedAt":1794532090857,"integrity":"sha512-9z5n4his6F4o8mndgGtYYwCYyEGomCIcRN6rxj5y7IcVF27a4rjKiZFAcj7WGDMJ8DUCmYE8j9nEXJNI5DCZ8Q==","mode":493,"size":758},"dist/require-D4F1Lv60.cjs":{"checkedAt":1794532090858,"integrity":"sha512-rHe9qwwXnScOWe7dCk6XJvm7HOyFcSLLbnx9o/CRqwmWvVgKT90vkSGNeTjF4fo/6QszR9y9LiGFT0HJ7AeLsw==","mode":420,"size":524},"dist/suppress-warnings.cjs":{"checkedAt":1794532090858,"integrity":"sha512-HHlhqjbBNaumGvmiAe1jM/BPV/StJFuW3GgPZFkNl/Qu8ti8DpS6mjmEqTC0+dhdifncHHVCfBTVHDLWvRyK6w==","mode":493,"size":497},"dist/temporary-directory-B83uKxJF.cjs":{"checkedAt":1794532090858,"integrity":"sha512-hCQEIc1czLVnxi/yCIvDioAOC4Ipa+9gq0DOYqF/38UGyAood/mmtkL+pDOiZt6FCb/SltJG9gwLKH3lgqI+BQ==","mode":420,"size":166},"dist/cjs/api/index.d.cts":{"checkedAt":1794532090858,"integrity":"sha512-aNYa3QM6RKrWzfWPnOePho863N8wLTI6BgETZv+89jLuggiO435bX3xZebvLHn5HFwTWsFuVkHMd/MvjCVX64A==","mode":420,"size":1090},"dist/esm/api/index.d.cts":{"checkedAt":1794532090859,"integrity":"sha512-ccNCOAsnHkFJSJM0/p+5Ud9oewlZLglvOswW07d8+ce0eQgPA/xrc2lrJb6yL1FYURBIGeMtYMqsvPcDdKOIJg==","mode":420,"size":1152},"package.json":{"checkedAt":1794532090859,"integrity":"sha512-5XZ0hQxclFg4GbfRncFDlt7BKWZmFMktgKSCn+hUZ8eIEWqW/q/s4IEpb9iSGlCSBTm+/78n4U9UDzQzpCG7Aw==","mode":420,"size":1624},"README.md":{"checkedAt":1794532090859,"integrity":"sha512-dg0tIT5jD0LGwhm/93iXFjn8XgWbICmhuU0FpVFopkidyRT6hjnaEWmi/nkdoSTQWBYU0Io7/eVkCEPSjnYmUQ==","mode":420,"size":1375},"dist/cli.mjs":{"checkedAt":1794532090859,"integrity":"sha512-IbL0jEfQQY/jmBR3wDZSNGVIKVfvd60rCGYsyFlzZ7Yb3RkoHcbQ+mvWcJyZwM5PLine truncated
@@ -0,0 +1,32 @@
let pendingRules = {};
let style = null;
const css = {
set: (selector, values) => {
pendingRules[selector] = values;
},
commit: () => {
if (!style) {
style = document.createElement("style");
style.id = "motion-view";
}
let cssText = "";
for (const selector in pendingRules) {
const rule = pendingRules[selector];
cssText += `${selector} {\n`;
for (const [property, value] of Object.entries(rule)) {
cssText += ` ${property}: ${value};\n`;
}
cssText += "}\n";
}
style.textContent = cssText;
document.head.appendChild(style);
pendingRules = {};
},
remove: () => {
if (style && style.parentElement) {
style.parentElement.removeChild(style);
}
},
};
export { css };
@@ -0,0 +1,102 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { ReferenceTracker } = require("@eslint-community/eslint-utils")
const {
checkUnsupportedBuiltins,
checkUnsupportedBuiltinReferences,
messages,
} = require("../../util/check-unsupported-builtins")
const enumeratePropertyNames = require("../../util/enumerate-property-names")
const getConfiguredNodeVersion = require("../../util/get-configured-node-version")
const { getSourceCode } = require("../../util/eslint-compat")
const {
NodeBuiltinGlobals,
NodeBuiltinModules,
NodeBuiltinImportMeta,
} = require("../../unsupported-features/node-builtins.js")
const traceMap = {
globals: NodeBuiltinGlobals,
modules: NodeBuiltinModules,
}
/** @type {import('../rule-module').RuleModule} */
module.exports = {
meta: {
docs: {
description:
"disallow unsupported Node.js built-in APIs on the specified version",
recommended: true,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unsupported-features/node-builtins.md",
},
type: "problem",
fixable: null,
schema: [
{
type: "object",
properties: {
version: getConfiguredNodeVersion.schema,
allowExperimental: { type: "boolean" },
ignores: {
type: "array",
items: {
enum: Array.from(
new Set([
...enumeratePropertyNames(traceMap.globals),
...enumeratePropertyNames(traceMap.modules),
...[
...enumeratePropertyNames(
NodeBuiltinImportMeta
),
].map(s => `import.meta.${s}`),
])
),
},
uniqueItems: true,
},
},
additionalProperties: false,
},
],
messages,
},
create(context) {
const sourceCode = getSourceCode(context)
const tracker = new ReferenceTracker(
/** @type {NonNullable<typeof sourceCode.scopeManager.globalScope>} */ (
sourceCode.scopeManager.globalScope
)
)
return {
"Program:exit"() {
checkUnsupportedBuiltins(context, traceMap)
},
"MetaProperty:exit"(node) {
if (
node.meta.name !== "import" ||
node.property.name !== "meta"
) {
return
}
const references = [
...tracker.iteratePropertyReferences(
node,
NodeBuiltinImportMeta
),
].map(reference => {
return {
...reference,
path: ["import.meta", ...reference.path],
}
})
checkUnsupportedBuiltinReferences(context, references)
},
}
},
}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access
exports.version = require('../package.json').version;
@@ -0,0 +1,16 @@
The ISC License
Copyright (c) 2015, Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice
appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE
LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES
OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,4 @@
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.");
}
export { _nonIterableRest as default };
@@ -0,0 +1 @@
{"name":"one-time","version":"1.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532101482,"integrity":"sha512-TrnHzyVaK3YvFIl5jKpVDnfbyhEnKPhVirFmhliv5pODHF/pP5bPbBCl8uPdvBqSGXy37RQAFgECOeYWy0UdFQ==","mode":420,"size":734},"async.js":{"checkedAt":1794532101482,"integrity":"sha512-dDXId0KcTCDvuiLjY2TsyEGtd7UhzLFjeAVIp//ugTorvoXoKNNH0lJ1KJvwbNbriYO1O5n5mRwc4L6Ir/jh5A==","mode":420,"size":1056},"index.js":{"checkedAt":1794532101482,"integrity":"sha512-5ALCpO8/wjcbQZGgwdY000aTrofIzc/QH7+Be/M8v+5KC/lOK+bVwpj3TeQw+FTesqT3PbjmM1oTcGtGYdh4+w==","mode":420,"size":1027},"LICENSE":{"checkedAt":1794532101482,"integrity":"sha512-gBfM1Xurid644DK979VfvuQlnAOSXf6CuZ4HeJRuhlgtGizw1iSpH3xACtcScZF332Xe/89KaGYEDwlYCrsGYQ==","mode":420,"size":1115},"README.md":{"checkedAt":1794532101483,"integrity":"sha512-FMXj7FSlZihJ4X7FR54s8u4ZHKVdBk4zkWO/4n6CFCW+/oTWK4nuPTqPjeqwhtZyA98v2F5ti1pB6Adl0blX+Q==","mode":420,"size":2157}}}
@@ -0,0 +1,418 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.fecha = {})));
}(this, (function (exports) { 'use strict';
var token = /d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g;
var twoDigitsOptional = "\\d\\d?";
var twoDigits = "\\d\\d";
var threeDigits = "\\d{3}";
var fourDigits = "\\d{4}";
var word = "[^\\s]+";
var literal = /\[([^]*?)\]/gm;
function shorten(arr, sLen) {
var newArr = [];
for (var i = 0, len = arr.length; i < len; i++) {
newArr.push(arr[i].substr(0, sLen));
}
return newArr;
}
var monthUpdate = function (arrName) { return function (v, i18n) {
var lowerCaseArr = i18n[arrName].map(function (v) { return v.toLowerCase(); });
var index = lowerCaseArr.indexOf(v.toLowerCase());
if (index > -1) {
return index;
}
return null;
}; };
function assign(origObj) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {
var obj = args_1[_a];
for (var key in obj) {
// @ts-ignore ex
origObj[key] = obj[key];
}
}
return origObj;
}
var dayNames = [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
];
var monthNames = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
var monthNamesShort = shorten(monthNames, 3);
var dayNamesShort = shorten(dayNames, 3);
var defaultI18n = {
dayNamesShort: dayNamesShort,
dayNames: dayNames,
monthNamesShort: monthNamesShort,
monthNames: monthNames,
amPm: ["am", "pm"],
DoFn: function (dayOfMonth) {
return (dayOfMonth +
["th", "st", "nd", "rd"][dayOfMonth % 10 > 3
? 0
: ((dayOfMonth - (dayOfMonth % 10) !== 10 ? 1 : 0) * dayOfMonth) % 10]);
}
};
var globalI18n = assign({}, defaultI18n);
var setGlobalDateI18n = function (i18n) {
return (globalI18n = assign(globalI18n, i18n));
};
var regexEscape = function (str) {
return str.replace(/[|\\{()[^$+*?.-]/g, "\\$&");
};
var pad = function (val, len) {
if (len === void 0) { len = 2; }
val = String(val);
while (val.length < len) {
val = "0" + val;
}
return val;
};
var formatFlags = {
D: function (dateObj) { return String(dateObj.getDate()); },
DD: function (dateObj) { return pad(dateObj.getDate()); },
Do: function (dateObj, i18n) {
return i18n.DoFn(dateObj.getDate());
},
d: function (dateObj) { return String(dateObj.getDay()); },
dd: function (dateObj) { return pad(dateObj.getDay()); },
ddd: function (dateObj, i18n) {
return i18n.dayNamesShort[dateObj.getDay()];
},
dddd: function (dateObj, i18n) {
return i18n.dayNames[dateObj.getDay()];
},
M: function (dateObj) { return String(dateObj.getMonth() + 1); },
MM: function (dateObj) { return pad(dateObj.getMonth() + 1); },
MMM: function (dateObj, i18n) {
return i18n.monthNamesShort[dateObj.getMonth()];
},
MMMM: function (dateObj, i18n) {
return i18n.monthNames[dateObj.getMonth()];
},
YY: function (dateObj) {
return pad(String(dateObj.getFullYear()), 4).substr(2);
},
YYYY: function (dateObj) { return pad(dateObj.getFullYear(), 4); },
h: function (dateObj) { return String(dateObj.getHours() % 12 || 12); },
hh: function (dateObj) { return pad(dateObj.getHours() % 12 || 12); },
H: function (dateObj) { return String(dateObj.getHours()); },
HH: function (dateObj) { return pad(dateObj.getHours()); },
m: function (dateObj) { return String(dateObj.getMinutes()); },
mm: function (dateObj) { return pad(dateObj.getMinutes()); },
s: function (dateObj) { return String(dateObj.getSeconds()); },
ss: function (dateObj) { return pad(dateObj.getSeconds()); },
S: function (dateObj) {
return String(Math.round(dateObj.getMilliseconds() / 100));
},
SS: function (dateObj) {
return pad(Math.round(dateObj.getMilliseconds() / 10), 2);
},
SSS: function (dateObj) { return pad(dateObj.getMilliseconds(), 3); },
a: function (dateObj, i18n) {
return dateObj.getHours() < 12 ? i18n.amPm[0] : i18n.amPm[1];
},
A: function (dateObj, i18n) {
return dateObj.getHours() < 12
? i18n.amPm[0].toUpperCase()
: i18n.amPm[1].toUpperCase();
},
ZZ: function (dateObj) {
var offset = dateObj.getTimezoneOffset();
return ((offset > 0 ? "-" : "+") +
pad(Math.floor(Math.abs(offset) / 60) * 100 + (Math.abs(offset) % 60), 4));
},
Z: function (dateObj) {
var offset = dateObj.getTimezoneOffset();
return ((offset > 0 ? "-" : "+") +
pad(Math.floor(Math.abs(offset) / 60), 2) +
":" +
pad(Math.abs(offset) % 60, 2));
}
};
var monthParse = function (v) { return +v - 1; };
var emptyDigits = [null, twoDigitsOptional];
var emptyWord = [null, word];
var amPm = [
"isPm",
word,
function (v, i18n) {
var val = v.toLowerCase();
if (val === i18n.amPm[0]) {
return 0;
}
else if (val === i18n.amPm[1]) {
return 1;
}
return null;
}
];
var timezoneOffset = [
"timezoneOffset",
"[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",
function (v) {
var parts = (v + "").match(/([+-]|\d\d)/gi);
if (parts) {
var minutes = +parts[1] * 60 + parseInt(parts[2], 10);
return parts[0] === "+" ? minutes : -minutes;
}
return 0;
}
];
var parseFlags = {
D: ["day", twoDigitsOptional],
DD: ["day", twoDigits],
Do: ["day", twoDigitsOptional + word, function (v) { return parseInt(v, 10); }],
M: ["month", twoDigitsOptional, monthParse],
MM: ["month", twoDigits, monthParse],
YY: [
"year",
twoDigits,
function (v) {
var now = new Date();
var cent = +("" + now.getFullYear()).substr(0, 2);
return +("" + (+v > 68 ? cent - 1 : cent) + v);
}
],
h: ["hour", twoDigitsOptional, undefined, "isPm"],
hh: ["hour", twoDigits, undefined, "isPm"],
H: ["hour", twoDigitsOptional],
HH: ["hour", twoDigits],
m: ["minute", twoDigitsOptional],
mm: ["minute", twoDigits],
s: ["second", twoDigitsOptional],
ss: ["second", twoDigits],
YYYY: ["year", fourDigits],
S: ["millisecond", "\\d", function (v) { return +v * 100; }],
SS: ["millisecond", twoDigits, function (v) { return +v * 10; }],
SSS: ["millisecond", threeDigits],
d: emptyDigits,
dd: emptyDigits,
ddd: emptyWord,
dddd: emptyWord,
MMM: ["month", word, monthUpdate("monthNamesShort")],
MMMM: ["month", word, monthUpdate("monthNames")],
a: amPm,
A: amPm,
ZZ: timezoneOffset,
Z: timezoneOffset
};
// Some common format strings
var globalMasks = {
default: "ddd MMM DD YYYY HH:mm:ss",
shortDate: "M/D/YY",
mediumDate: "MMM D, YYYY",
longDate: "MMMM D, YYYY",
fullDate: "dddd, MMMM D, YYYY",
isoDate: "YYYY-MM-DD",
isoDateTime: "YYYY-MM-DDTHH:mm:ssZ",
shortTime: "HH:mm",
mediumTime: "HH:mm:ss",
longTime: "HH:mm:ss.SSS"
};
var setGlobalDateMasks = function (masks) { return assign(globalMasks, masks); };
/***
* Format a date
* @method format
* @param {Date|number} dateObj
* @param {string} mask Format of the date, i.e. 'mm-dd-yy' or 'shortDate'
* @returns {string} Formatted date string
*/
var format = function (dateObj, mask, i18n) {
if (mask === void 0) { mask = globalMasks["default"]; }
if (i18n === void 0) { i18n = {}; }
if (typeof dateObj === "number") {
dateObj = new Date(dateObj);
}
if (Object.prototype.toString.call(dateObj) !== "[object Date]" ||
isNaN(dateObj.getTime())) {
throw new Error("Invalid Date pass to format");
}
mask = globalMasks[mask] || mask;
var literals = [];
// Make literals inactive by replacing them with @@@
mask = mask.replace(literal, function ($0, $1) {
literals.push($1);
return "@@@";
});
var combinedI18nSettings = assign(assign({}, globalI18n), i18n);
// Apply formatting rules
mask = mask.replace(token, function ($0) {
return formatFlags[$0](dateObj, combinedI18nSettings);
});
// Inline literal values back into the formatted value
return mask.replace(/@@@/g, function () { return literals.shift(); });
};
/**
* Parse a date string into a Javascript Date object /
* @method parse
* @param {string} dateStr Date string
* @param {string} format Date parse format
* @param {i18n} I18nSettingsOptional Full or subset of I18N settings
* @returns {Date|null} Returns Date object. Returns null what date string is invalid or doesn't match format
*/
function parse(dateStr, format, i18n) {
if (i18n === void 0) { i18n = {}; }
if (typeof format !== "string") {
throw new Error("Invalid format in fecha parse");
}
// Check to see if the format is actually a mask
format = globalMasks[format] || format;
// Avoid regular expression denial of service, fail early for really long strings
// https://www.owasp.org/index.php/Regular_expression_Denial_of_Service_-_ReDoS
if (dateStr.length > 1000) {
return null;
}
// Default to the beginning of the year.
var today = new Date();
var dateInfo = {
year: today.getFullYear(),
month: 0,
day: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0,
isPm: null,
timezoneOffset: null
};
var parseInfo = [];
var literals = [];
// Replace all the literals with @@@. Hopefully a string that won't exist in the format
var newFormat = format.replace(literal, function ($0, $1) {
literals.push(regexEscape($1));
return "@@@";
});
var specifiedFields = {};
var requiredFields = {};
// Change every token that we find into the correct regex
newFormat = regexEscape(newFormat).replace(token, function ($0) {
var info = parseFlags[$0];
var field = info[0], regex = info[1], requiredField = info[3];
// Check if the person has specified the same field twice. This will lead to confusing results.
if (specifiedFields[field]) {
throw new Error("Invalid format. " + field + " specified twice in format");
}
specifiedFields[field] = true;
// Check if there are any required fields. For instance, 12 hour time requires AM/PM specified
if (requiredField) {
requiredFields[requiredField] = true;
}
parseInfo.push(info);
return "(" + regex + ")";
});
// Check all the required fields are present
Object.keys(requiredFields).forEach(function (field) {
if (!specifiedFields[field]) {
throw new Error("Invalid format. " + field + " is required in specified format");
}
});
// Add back all the literals after
newFormat = newFormat.replace(/@@@/g, function () { return literals.shift(); });
// Check if the date string matches the format. If it doesn't return null
var matches = dateStr.match(new RegExp(newFormat, "i"));
if (!matches) {
return null;
}
var combinedI18nSettings = assign(assign({}, globalI18n), i18n);
// For each match, call the parser function for that date part
for (var i = 1; i < matches.length; i++) {
var _a = parseInfo[i - 1], field = _a[0], parser = _a[2];
var value = parser
? parser(matches[i], combinedI18nSettings)
: +matches[i];
// If the parser can't make sense of the value, return null
if (value == null) {
return null;
}
dateInfo[field] = value;
}
if (dateInfo.isPm === 1 && dateInfo.hour != null && +dateInfo.hour !== 12) {
dateInfo.hour = +dateInfo.hour + 12;
}
else if (dateInfo.isPm === 0 && +dateInfo.hour === 12) {
dateInfo.hour = 0;
}
var dateTZ;
if (dateInfo.timezoneOffset == null) {
dateTZ = new Date(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute, dateInfo.second, dateInfo.millisecond);
var validateFields = [
["month", "getMonth"],
["day", "getDate"],
["hour", "getHours"],
["minute", "getMinutes"],
["second", "getSeconds"]
];
for (var i = 0, len = validateFields.length; i < len; i++) {
// Check to make sure the date field is within the allowed range. Javascript dates allows values
// outside the allowed range. If the values don't match the value was invalid
if (specifiedFields[validateFields[i][0]] &&
dateInfo[validateFields[i][0]] !== dateTZ[validateFields[i][1]]()) {
return null;
}
}
}
else {
dateTZ = new Date(Date.UTC(dateInfo.year, dateInfo.month, dateInfo.day, dateInfo.hour, dateInfo.minute - dateInfo.timezoneOffset, dateInfo.second, dateInfo.millisecond));
// We can't validate dates in another timezone unfortunately. Do a basic check instead
if (dateInfo.month > 11 ||
dateInfo.month < 0 ||
dateInfo.day > 31 ||
dateInfo.day < 1 ||
dateInfo.hour > 23 ||
dateInfo.hour < 0 ||
dateInfo.minute > 59 ||
dateInfo.minute < 0 ||
dateInfo.second > 59 ||
dateInfo.second < 0) {
return null;
}
}
// Don't allow invalid dates
return dateTZ;
}
var fecha = {
format: format,
parse: parse,
defaultI18n: defaultI18n,
setGlobalDateI18n: setGlobalDateI18n,
setGlobalDateMasks: setGlobalDateMasks
};
exports.assign = assign;
exports.default = fecha;
exports.format = format;
exports.parse = parse;
exports.defaultI18n = defaultI18n;
exports.setGlobalDateI18n = setGlobalDateI18n;
exports.setGlobalDateMasks = setGlobalDateMasks;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=fecha.umd.js.map
@@ -0,0 +1,24 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.esnext_full = void 0;
const dom_1 = require("./dom");
const dom_asynciterable_1 = require("./dom.asynciterable");
const dom_iterable_1 = require("./dom.iterable");
const esnext_1 = require("./esnext");
const scripthost_1 = require("./scripthost");
const webworker_importscripts_1 = require("./webworker.importscripts");
exports.esnext_full = {
libs: [
esnext_1.esnext,
dom_1.dom,
webworker_importscripts_1.webworker_importscripts,
scripthost_1.scripthost,
dom_iterable_1.dom_iterable,
dom_asynciterable_1.dom_asynciterable,
],
variables: [],
};
@@ -0,0 +1,111 @@
/**
* In strict assertion mode, non-strict methods behave like their corresponding
* strict methods. For example, `assert.deepEqual()` will behave like
* `assert.deepStrictEqual()`.
*
* In strict assertion mode, error messages for objects display a diff. In legacy
* assertion mode, error messages for objects display the objects, often truncated.
*
* To use strict assertion mode:
*
* ```js
* import { strict as assert } from 'node:assert';
* ```
*
* ```js
* import assert from 'node:assert/strict';
* ```
*
* Example error diff:
*
* ```js
* import { strict as assert } from 'node:assert';
*
* assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]);
* // AssertionError: Expected inputs to be strictly deep-equal:
* // + actual - expected ... Lines skipped
* //
* // [
* // [
* // ...
* // 2,
* // + 3
* // - '3'
* // ],
* // ...
* // 5
* // ]
* ```
*
* To deactivate the colors, use the `NO_COLOR` or `NODE_DISABLE_COLORS`
* environment variables. This will also deactivate the colors in the REPL. For
* more on color support in terminal environments, read the tty
* [`getColorDepth()`](https://nodejs.org/docs/latest-v22.x/api/tty.html#writestreamgetcolordepthenv) documentation.
* @since v15.0.0
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/assert/strict.js)
*/
declare module "assert/strict" {
import {
Assert,
AssertionError,
AssertionErrorOptions,
AssertOptions,
AssertPredicate,
AssertStrict,
CallTracker,
CallTrackerCall,
CallTrackerReportInformation,
deepStrictEqual,
doesNotMatch,
doesNotReject,
doesNotThrow,
fail,
ifError,
match,
notDeepStrictEqual,
notStrictEqual,
ok,
partialDeepStrictEqual,
rejects,
strictEqual,
throws,
} from "node:assert";
function strict(value: unknown, message?: string | Error): asserts value;
namespace strict {
export {
Assert,
AssertionError,
AssertionErrorOptions,
AssertOptions,
AssertPredicate,
AssertStrict,
CallTracker,
CallTrackerCall,
CallTrackerReportInformation,
deepStrictEqual,
deepStrictEqual as deepEqual,
doesNotMatch,
doesNotReject,
doesNotThrow,
fail,
ifError,
match,
notDeepStrictEqual,
notDeepStrictEqual as notDeepEqual,
notStrictEqual,
notStrictEqual as notEqual,
ok,
partialDeepStrictEqual,
rejects,
strict,
strictEqual,
strictEqual as equal,
throws,
};
}
export = strict;
}
declare module "node:assert/strict" {
import strict = require("assert/strict");
export = strict;
}
@@ -0,0 +1 @@
{"name":"@humanfs/core","version":"0.19.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532093697,"integrity":"sha512-3Gto0TuM+VlkS5NfEZKwLHGqelz2U71DtEgPqJ7sjU0/FqInjsjDtAqx/bIzsxc6eP2DWQ1vc54Mno/1bCglVw==","mode":420,"size":11357},"src/errors.js":{"checkedAt":1794532093697,"integrity":"sha512-7d4urUGBanMj5KlcwdArBy2tUsz+b7rUnVss10Z/Ww4dFqBOvReDSiONaIy0P1SvrQIaK+vrvPVpUpUq3+sbCQ==","mode":420,"size":1792},"src/hfs.js":{"checkedAt":1794532093697,"integrity":"sha512-lVRa429m/nuZI6feGuwihuuOMcNYQfvSRLeOjbPTzlbIXdiyxayxlk7xLnzE05lpB3GduXuwb/dVoEKvb1wXPQ==","mode":420,"size":22870},"src/index.js":{"checkedAt":1794532093697,"integrity":"sha512-gUIQi4z3DrmgAimtVeImOJxvYjVbnFw88WLBQZrsHxvq2Gaf7+DNYKXG1wfUDjIS03bWOBeFEMIIY/XfFGl5Kw==","mode":420,"size":178},"src/path.js":{"checkedAt":1794532093697,"integrity":"sha512-JQDaWtJWb9/XLhch+ndjf5kYjymwjDe/01QyGJKeq8REDLeEicTrkxHgngkRWUEs3LZXrpaYaVmPW1GiVFRZIw==","mode":420,"size":6001},"package.json":{"checkedAt":1794532093698,"integrity":"sha512-JXfC1T2U9HTZmtQC6hsIUxLr4oIpDuDe/G6O0+RzZD9J0pMTMuuX6tAbUkRQoZIuLoWMdwYd3yxNIMV4gcX04A==","mode":420,"size":1072},"README.md":{"checkedAt":1794532093698,"integrity":"sha512-XUeEotdw9L7TmDslhIYvkk+l5fr4NXZTs3cM/9SMKoJ1LllIwgEiqPHF7uCqqSVxcZQGDZx6ccHjJhlOGICbAQ==","mode":420,"size":3336},"dist/errors.d.ts":{"checkedAt":1794532093698,"integrity":"sha512-VdSd+Ikj4wa4SwWC9CuSz4Wd8rmyUGsoKmFrMqNebFyTNhn8BSoS3iCIo5T3nBDrBP8QOhju6eW6QIss301UgA==","mode":420,"size":1333},"dist/fsx.d.ts":{"checkedAt":1794532093698,"integrity":"sha512-92nUyHz05DNuDdS5EeVAZ9I6b12132syQT1GneG0hHKo0eGi9A6PD87JJzo5t0QDr3vq3Ag6sP8bsF1yPwLqNA==","mode":420,"size":8091},"dist/hfs.d.ts":{"checkedAt":1794532093698,"integrity":"sha512-C2MXux55bQQyWUBzgQq64hDOxFiAM0vte0uTVINF0Z+QdDJs/rWD7MTSTNUatOxG2xUB05nenYV2zt5l+QWFPA==","mode":420,"size":13528},"dist/index.d.ts":{"checkedAt":1794532093699,"integrity":"sha512-hgnFXvx6VdENhIHOg66CaB7P+rVZIWNXJmfe+lHa/hVxxiYoccX4CaQc3ZjkW+SsJM8xd3MrxUs8o4pSbF2IaQ==","mode":420,"size":95},"dist/path.d.ts":{"checkedAt":1794532093699,"integrity":"sha512-8AbhW+zXDKOhw9gKC2gaqu/+ly0scGHuRL/cFhypi2z+fwBISZD6IewSST/gqZNIZ3sI4TG32X+CSf+WjeS5qw==","mode":420,"size":3082}}}
@@ -0,0 +1,38 @@
var $1ztb7$reactariautils = require("@react-aria/utils");
var $1ztb7$reactariainteractions = require("@react-aria/interactions");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useTooltip", () => $199fa2aaa84f20b7$export$1c4b08e0eca38426);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $199fa2aaa84f20b7$export$1c4b08e0eca38426(props, state) {
let domProps = (0, $1ztb7$reactariautils.filterDOMProps)(props, {
labelable: true
});
let { hoverProps: hoverProps } = (0, $1ztb7$reactariainteractions.useHover)({
onHoverStart: ()=>state === null || state === void 0 ? void 0 : state.open(true),
onHoverEnd: ()=>state === null || state === void 0 ? void 0 : state.close()
});
return {
tooltipProps: (0, $1ztb7$reactariautils.mergeProps)(domProps, hoverProps, {
role: 'tooltip'
})
};
}
//# sourceMappingURL=useTooltip.main.js.map
@@ -0,0 +1,7 @@
/**
* Parses a color into red, gree, blue, alpha parts
*
* @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color
*/
declare function parseToRgba(color: string): [number, number, number, number];
export default parseToRgba;
@@ -0,0 +1 @@
{"name":"@rollup/pluginutils","version":"5.3.0","requiresBuild":false,"files":{"dist/cjs/index.js":{"checkedAt":1794532090938,"integrity":"sha512-DYx/TcG7C/je8Lm7gnZAef3Rfxjxi0r/UGbvIMQBtW8imDuRO/P66O7GBk3h7RBjxE28glrAVCs4lWpg5WmUmw==","mode":420,"size":15827},"dist/es/index.js":{"checkedAt":1794532090938,"integrity":"sha512-79AZ0KPfx+91u9w1W2+YikCZ1dLgDVwvKlsUsRr505Pmw85Oei3EevXNt9X+3IVRKcyc18b+L7xQL+4iHvM8/Q==","mode":420,"size":15441},"dist/es/package.json":{"checkedAt":1794532090043,"integrity":"sha512-Cj8csVIsbnWVGGqaVO0HP/pZCybH0xsId/Gckl+EcDfp+XIGa/7WJgmxkOsrwh/3sxUU4Iw95keA/vWYLLsh8g==","mode":420,"size":17},"README.md":{"checkedAt":1794532090939,"integrity":"sha512-luePS91uZ2bPpyWzFDqQVqJ8i1Sjyvc1BX4JfuJFRs7zbYj7xgtRjmJSsBHaIigLUzOllSHdmgJfVBk+vssoHA==","mode":420,"size":8015},"types/index.d.ts":{"checkedAt":1794532090939,"integrity":"sha512-kcZTIJKUXfNe5wyl2JgmwEp5nghg2YdlKDQphdfIiMwYjerWOX79sm4quTlQLHG1WJu1WfNmoXESJkQBnAjjsw==","mode":420,"size":4409},"LICENSE":{"checkedAt":1794532090939,"integrity":"sha512-+MNMf6Un82mOjt6EL3mKgq094wsLdm3KbCSStF8EU7VRzI9wDsofMWGddLacEU23NCrQfFAH5RjWjg4Ubw9Ppw==","mode":420,"size":1151},"package.json":{"checkedAt":1794532090939,"integrity":"sha512-RxC5OXnq5NNYQQ9qtKznjYiV+ayZNGNU1VYMfbaQyW0XovtQjxyQkr+jmPJS24NSendZxX/aEKbVHpb0F9qFPw==","mode":420,"size":2361}}}
@@ -0,0 +1,49 @@
import { SCHEMES } from "../uri";
const NID$ = "(?:[0-9A-Za-z][0-9A-Za-z\\-]{1,31})";
const PCT_ENCODED$ = "(?:\\%[0-9A-Fa-f]{2})";
const TRANS$$ = "[0-9A-Za-z\\(\\)\\+\\,\\-\\.\\:\\=\\@\\;\\$\\_\\!\\*\\'\\/\\?\\#]";
const NSS$ = "(?:(?:" + PCT_ENCODED$ + "|" + TRANS$$ + ")+)";
const URN_SCHEME = new RegExp("^urn\\:(" + NID$ + ")$");
const URN_PATH = new RegExp("^(" + NID$ + ")\\:(" + NSS$ + ")$");
const URN_PARSE = /^([^\:]+)\:(.*)/;
const URN_EXCLUDED = /[\x00-\x20\\\"\&\<\>\[\]\^\`\{\|\}\~\x7F-\xFF]/g;
//RFC 2141
const handler = {
scheme: "urn",
parse: function (components, options) {
const matches = components.path && components.path.match(URN_PARSE);
let urnComponents = components;
if (matches) {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = matches[1].toLowerCase();
const nss = matches[2];
const urnScheme = `${scheme}:${options.nid || nid}`;
const schemeHandler = SCHEMES[urnScheme];
urnComponents.nid = nid;
urnComponents.nss = nss;
urnComponents.path = undefined;
if (schemeHandler) {
urnComponents = schemeHandler.parse(urnComponents, options);
}
}
else {
urnComponents.error = urnComponents.error || "URN can not be parsed.";
}
return urnComponents;
},
serialize: function (urnComponents, options) {
const scheme = options.scheme || urnComponents.scheme || "urn";
const nid = urnComponents.nid;
const urnScheme = `${scheme}:${options.nid || nid}`;
const schemeHandler = SCHEMES[urnScheme];
if (schemeHandler) {
urnComponents = schemeHandler.serialize(urnComponents, options);
}
const uriComponents = urnComponents;
const nss = urnComponents.nss;
uriComponents.path = `${nid || options.nid}:${nss}`;
return uriComponents;
},
};
export default handler;
//# sourceMappingURL=urn.js.map
@@ -0,0 +1,75 @@
import { _array, _tuple, _unknown } from "./api.js";
import { parse, parseAsync } from "./parse.js";
import * as schemas from "./schemas.js";
import { $ZodTuple } from "./schemas.js";
export class $ZodFunction {
constructor(def) {
this._def = def;
this.def = def;
}
implement(func) {
if (typeof func !== "function") {
throw new Error("implement() must be called with a function");
}
const impl = ((...args) => {
const parsedArgs = this._def.input ? parse(this._def.input, args, undefined, { callee: impl }) : args;
if (!Array.isArray(parsedArgs)) {
throw new Error("Invalid arguments schema: not an array or tuple schema.");
}
const output = func(...parsedArgs);
return this._def.output ? parse(this._def.output, output, undefined, { callee: impl }) : output;
});
return impl;
}
implementAsync(func) {
if (typeof func !== "function") {
throw new Error("implement() must be called with a function");
}
const impl = (async (...args) => {
const parsedArgs = this._def.input ? await parseAsync(this._def.input, args, undefined, { callee: impl }) : args;
if (!Array.isArray(parsedArgs)) {
throw new Error("Invalid arguments schema: not an array or tuple schema.");
}
const output = await func(...parsedArgs);
return this._def.output ? parseAsync(this._def.output, output, undefined, { callee: impl }) : output;
});
return impl;
}
input(...args) {
const F = this.constructor;
if (Array.isArray(args[0])) {
return new F({
type: "function",
input: new $ZodTuple({
type: "tuple",
items: args[0],
rest: args[1],
}),
output: this._def.output,
});
}
return new F({
type: "function",
input: args[0],
output: this._def.output,
});
}
output(output) {
const F = this.constructor;
return new F({
type: "function",
input: this._def.input,
output,
});
}
}
function _function(params) {
return new $ZodFunction({
type: "function",
input: Array.isArray(params?.input)
? _tuple(schemas.$ZodTuple, params?.input)
: (params?.input ?? _array(schemas.$ZodArray, _unknown(schemas.$ZodUnknown))),
output: params?.output ?? _unknown(schemas.$ZodUnknown),
});
}
export { _function as function };
@@ -0,0 +1,47 @@
'use strict';
var Scalar = require('../../nodes/Scalar.js');
var stringifyNumber = require('../../stringify/stringifyNumber.js');
const floatNaN = {
identify: value => typeof value === 'number',
default: true,
tag: 'tag:yaml.org,2002:float',
test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,
resolve: str => str.slice(-3).toLowerCase() === 'nan'
? NaN
: str[0] === '-'
? Number.NEGATIVE_INFINITY
: Number.POSITIVE_INFINITY,
stringify: stringifyNumber.stringifyNumber
};
const floatExp = {
identify: value => typeof value === 'number',
default: true,
tag: 'tag:yaml.org,2002:float',
format: 'EXP',
test: /^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,
resolve: str => parseFloat(str),
stringify(node) {
const num = Number(node.value);
return isFinite(num) ? num.toExponential() : stringifyNumber.stringifyNumber(node);
}
};
const float = {
identify: value => typeof value === 'number',
default: true,
tag: 'tag:yaml.org,2002:float',
test: /^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,
resolve(str) {
const node = new Scalar.Scalar(parseFloat(str));
const dot = str.indexOf('.');
if (dot !== -1 && str[str.length - 1] === '0')
node.minFractionDigits = str.length - dot - 1;
return node;
},
stringify: stringifyNumber.stringifyNumber
};
exports.float = float;
exports.floatExp = floatExp;
exports.floatNaN = floatNaN;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/interactions/src/index.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\nexport {Pressable} from './Pressable';\nexport {PressResponder, ClearPressResponder} from './PressResponder';\nexport {useFocus} from './useFocus';\nexport {\n isFocusVisible,\n getInteractionModality,\n setInteractionModality,\n addWindowFocusTracking,\n useInteractionModality,\n useFocusVisible,\n useFocusVisibleListener\n} from './useFocusVisible';\nexport {useFocusWithin} from './useFocusWithin';\nexport {useHover} from './useHover';\nexport {useInteractOutside} from './useInteractOutside';\nexport {useKeyboard} from './useKeyboard';\nexport {useMove} from './useMove';\nexport {usePress} from './usePress';\nexport {useScrollWheel} from './useScrollWheel';\nexport {useLongPress} from './useLongPress';\n\nexport type {FocusProps, FocusResult} from './useFocus';\nexport type {FocusVisibleHandler, FocusVisibleProps, FocusVisibleResult, Modality} from './useFocusVisible';\nexport type {FocusWithinProps, FocusWithinResult} from './useFocusWithin';\nexport type {HoverProps, HoverResult} from './useHover';\nexport type {InteractOutsideProps} from './useInteractOutside';\nexport type {KeyboardProps, KeyboardResult} from './useKeyboard';\nexport type {PressProps, PressHookProps, PressResult} from './usePress';\nexport type {PressEvent, PressEvents, MoveStartEvent, MoveMoveEvent, MoveEndEvent, MoveEvents, HoverEvent, HoverEvents, FocusEvents, KeyboardEvents} from '@react-types/shared';\nexport type {MoveResult} from './useMove';\nexport type {LongPressProps, LongPressResult} from './useLongPress';\nexport type {ScrollWheelProps} from './useScrollWheel';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -0,0 +1,42 @@
module.exports = isexe
isexe.sync = sync
var fs = require('fs')
function checkPathExt (path, options) {
var pathext = options.pathExt !== undefined ?
options.pathExt : process.env.PATHEXT
if (!pathext) {
return true
}
pathext = pathext.split(';')
if (pathext.indexOf('') !== -1) {
return true
}
for (var i = 0; i < pathext.length; i++) {
var p = pathext[i].toLowerCase()
if (p && path.substr(-p.length).toLowerCase() === p) {
return true
}
}
return false
}
function checkStat (stat, path, options) {
if (!stat.isSymbolicLink() && !stat.isFile()) {
return false
}
return checkPathExt(path, options)
}
function isexe (path, options, cb) {
fs.stat(path, function (er, stat) {
cb(er, er ? false : checkStat(stat, path, options))
})
}
function sync (path, options) {
return checkStat(fs.statSync(path), path, options)
}
@@ -0,0 +1 @@
{"version":3,"file":"resolveScoped.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveScoped.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('startCase', require('../startCase'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,53 @@
tooltipMargin = 8px
.ql-snow
.ql-tooltip
background-color: #fff
border: 1px solid borderColor
box-shadow: 0px 0px 5px shadowColor
color: textColor
padding: 5px 12px
white-space: nowrap
&::before
content: "Visit URL:"
line-height: 26px
margin-right: tooltipMargin
input[type=text]
display: none
border: 1px solid borderColor
font-size: 13px
height: 26px
margin: 0px
padding: 3px 5px
width: 170px
a.ql-preview
display: inline-block
max-width: 200px
overflow-x: hidden
text-overflow: ellipsis
vertical-align: top
a.ql-action::after
border-right: 1px solid borderColor
content: 'Edit'
margin-left: tooltipMargin*2
padding-right: tooltipMargin
a.ql-remove::before
content: 'Remove'
margin-left: tooltipMargin
a
line-height: 26px
.ql-tooltip.ql-editing
a.ql-preview, a.ql-remove
display: none
input[type=text]
display: inline-block
a.ql-action::after
border-right: 0px
content: 'Save'
padding-right: 0px
.ql-tooltip[data-mode=link]::before
content: "Enter link:"
.ql-tooltip[data-mode=formula]::before
content: "Enter formula:"
.ql-tooltip[data-mode=video]::before
content: "Enter video:"
@@ -0,0 +1,42 @@
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "createEventHandler", () => $951fbcbbca8db6ce$export$48d1ea6320830260);
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/ function $951fbcbbca8db6ce$export$48d1ea6320830260(handler) {
if (!handler) return undefined;
let shouldStopPropagation = true;
return (e)=>{
let event = {
...e,
preventDefault () {
e.preventDefault();
},
isDefaultPrevented () {
return e.isDefaultPrevented();
},
stopPropagation () {
console.error('stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.');
},
continuePropagation () {
shouldStopPropagation = false;
}
};
handler(event);
if (shouldStopPropagation) e.stopPropagation();
};
}
//# sourceMappingURL=createEventHandler.main.js.map
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.classIsInjectableFlagReflectKey = void 0;
exports.classIsInjectableFlagReflectKey = '@inversifyjs/core/classIsInjectableFlagReflectKey';
//# sourceMappingURL=classIsInjectableFlagReflectKey.js.map
@@ -0,0 +1,13 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { PatternVisitorCallback, PatternVisitorOptions } from './PatternVisitor';
import type { VisitorOptions } from './VisitorBase';
import { VisitorBase } from './VisitorBase';
interface VisitPatternOptions extends PatternVisitorOptions {
processRightHandNodes?: boolean;
}
export declare class Visitor extends VisitorBase {
#private;
constructor(optionsOrVisitor: Visitor | VisitorOptions);
protected visitPattern(node: TSESTree.Node, callback: PatternVisitorCallback, options?: VisitPatternOptions): void;
}
export { VisitorBase, type VisitorOptions } from './VisitorBase';
@@ -0,0 +1,17 @@
const createAxisDelta = () => ({
translate: 0,
scale: 1,
origin: 0,
originPoint: 0,
});
const createDelta = () => ({
x: createAxisDelta(),
y: createAxisDelta(),
});
const createAxis = () => ({ min: 0, max: 0 });
const createBox = () => ({
x: createAxis(),
y: createAxis(),
});
export { createAxis, createAxisDelta, createBox, createDelta };
@@ -0,0 +1,13 @@
/**
* 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-locale": "error",
"es-x/no-intl-relativetimeformat": "error",
},
}
@@ -0,0 +1 @@
{"name":"std-env","version":"3.10.0","requiresBuild":false,"files":{"LICENCE":{"checkedAt":1794532092348,"integrity":"sha512-yL7y4ft4BROkEQxsbPMqBzO8b8Qwpf4hTR5Nh+lcNjJSeRJavPEN1N3iRQSx5RIM3OGWZcIdxaqNv4e0phXQ9A==","mode":420,"size":1079},"dist/index.cjs":{"checkedAt":1794532092349,"integrity":"sha512-Tn6dYqwyu2+GJgrPFGt19ariNTJYSZBsXCV/i/Q1No79O65hmCw1jFvuKEtgeN/A39lrjr6at+f+O/EIktLPqA==","mode":420,"size":5343},"dist/index.d.cts":{"checkedAt":1794532092349,"integrity":"sha512-lSTnZR1WrTCwYuNDTjSqTWgyLIhD5cew04vffHyp0+XN1yF0QyHESrEeLUF43H7GoZx2VOMRrDpbMP1omExTLQ==","mode":420,"size":3962},"package.json":{"checkedAt":1794532092349,"integrity":"sha512-aB5wi+/4mPCiIYfLHCU3BoRc7eR0XVIK9lAFTqhEDTewdYWjvPv5tZvNeaZyCjCDcX55HP7z4OSc6+Abcy0Uuw==","mode":420,"size":1333},"README.md":{"checkedAt":1794532092349,"integrity":"sha512-jC1lbA1mETi9yg2ni933HTSen4irACNX2f8A9msX4684m4IH1RL6kWrUVGv1doLSBLNpui1a29LoLd3jGE7CUg==","mode":420,"size":2702},"dist/index.mjs":{"checkedAt":1794532092349,"integrity":"sha512-peEUYvsx6YvdT1IW9vUdli2WiPnlQ4+KE3S6oltjJghV9Cn+50XylwAKUAH2CL0Q3dY6N3vo2sq3DCvYivrgaQ==","mode":420,"size":3712},"dist/index.d.mts":{"checkedAt":1794532092349,"integrity":"sha512-lSTnZR1WrTCwYuNDTjSqTWgyLIhD5cew04vffHyp0+XN1yF0QyHESrEeLUF43H7GoZx2VOMRrDpbMP1omExTLQ==","mode":420,"size":3962},"dist/index.d.ts":{"checkedAt":1794532092349,"integrity":"sha512-lSTnZR1WrTCwYuNDTjSqTWgyLIhD5cew04vffHyp0+XN1yF0QyHESrEeLUF43H7GoZx2VOMRrDpbMP1omExTLQ==","mode":420,"size":3962}}}
@@ -0,0 +1,6 @@
import {
ChevronRightIcon
} from "./chunk-534KRDYK.mjs";
export {
ChevronRightIcon
};
@@ -0,0 +1,34 @@
'use strict';
var $TypeError = require('es-errors/type');
var AllCharacters = require('./AllCharacters');
var CharSet = require('../helpers/CharSet').CharSet;
var isRegExpRecord = require('../helpers/records/regexp-record');
// https://262.ecma-international.org/15.0/#sec-charactercomplement
module.exports = function CharacterComplement(rer, S) {
if (!isRegExpRecord(rer)) {
throw new $TypeError('Assertion failed: `rer` must be a RegExp Record');
}
if (!(S instanceof CharSet)) {
throw new $TypeError('Assertion failed: S must be a CharSet');
}
var A = AllCharacters(rer); // step 1
// 2. Return the CharSet containing the CharSetElements of A which are not also CharSetElements of S.
return new CharSet(
function (x) { return !S.test(x) && A.test(x); },
function (emit) {
A.yield(function (x) {
if (!S.test(x)) {
emit(x);
}
});
}
);
};
@@ -0,0 +1,15 @@
const TagPath = require("./TagPath");
class TagPathMatcher{
constructor(stack,node){
this.stack = stack;
this.node= node;
}
match(path){
const tagPath = new TagPath(path);
return tagPath.match(this.stack, this.node);
}
}
module.exports = TagPathMatcher;
@@ -0,0 +1,237 @@
# micromark-extension-gfm-tagfilter
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
[micromark][] extension to support GFM [tag filter][].
## Contents
* [What is this?](#what-is-this)
* [When to use this](#when-to-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`gfmTagfilterHtml()`](#gfmtagfilterhtml)
* [Authoring](#authoring)
* [HTML](#html)
* [CSS](#css)
* [Syntax](#syntax)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package contains an extension that adds support for the tagfilter enabled
by GFM to [`micromark`][micromark].
The tagfilter is kinda weird and kinda useless.
This package exists for completeness.
The tag filter is a naïve attempt at XSS protection.
You should use a proper HTML sanitizing algorithm.
## When to use this
This project is useful when you want to match how GitHub works.
You can use this extension when you are working with [`micromark`][micromark]
already.
When you do, you can instead use
[`micromark-extension-gfm`][micromark-extension-gfm], which includes this
extension, to support all GFM features.
When you want to deal with syntax trees, you should instead use
[`hast-util-sanitize`][hast-util-sanitize].
When you use remark and rehype, you should use
[`rehype-sanitize`][rehype-sanitize].
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-extension-gfm-tagfilter
```
In Deno with [`esm.sh`][esmsh]:
```js
import {gfmTagfilterHtml} from 'https://esm.sh/micromark-extension-gfm-tagfilter@2'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {gfmTagfilterHtml} from 'https://esm.sh/micromark-extension-gfm-tagfilter@2?bundle'
</script>
```
## Use
```js
import {micromark} from 'micromark'
import {gfmTagfilterHtml} from 'micromark-extension-gfm-tagfilter'
const output = micromark('XSS! <script>alert(1)</script>', {
allowDangerousHtml: true,
htmlExtensions: [gfmTagfilterHtml()]
})
console.log(output)
```
Yields:
```html
<p>XSS! &lt;script>alert(1)&lt;/script></p>
```
## API
This package exports the identifier
[`gfmTagfilterHtml`][api-gfm-tagfilter-html].
There is no default export.
### `gfmTagfilterHtml()`
Create an HTML extension for `micromark` to support GitHubs weird and
useless tagfilter when serializing to HTML.
###### Returns
Extension for `micromark` that can be passed in `htmlExtensions` to support
GitHubs weird and useless tagfilter when serializing to HTML
([`HtmlExtension`][micromark-html-extension]).
## Authoring
This package relates to malicious authors, not decent authors.
## HTML
GFM tagfilter removes certain dangerous HTML tags: `iframe`, `noembed`,
`noframes`, `plaintext`, `script`, `style`, `title`, `textarea`, and `xmp`.
## CSS
This package does not relate to CSS.
## Syntax
This package does not change how markdown is parsed.
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-extension-gfm-tagfilter@^2`, compatible with Node.js 16.
This package works with `micromark` version `3` and later.
## Security
While micromark is safe by default, this extension only does something when
`allowDangerousHtml: true` is passed, which is an unsafe option.
This package is **not safe**.
## Related
* [`micromark-extension-gfm`][micromark-extension-gfm]
— support all of GFM
* [`hast-util-sanitize`][hast-util-sanitize]
— hast utility to make trees safe
* [`rehype-sanitize`][rehype-sanitize]
— rehype plugin to sanitize HTML
## Contribute
See [`contributing.md` in `micromark/.github`][contributing] for ways to get
started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/micromark/micromark-extension-gfm-tagfilter/workflows/main/badge.svg
[build]: https://github.com/micromark/micromark-extension-gfm-tagfilter/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark-extension-gfm-tagfilter.svg
[coverage]: https://codecov.io/github/micromark/micromark-extension-gfm-tagfilter
[downloads-badge]: https://img.shields.io/npm/dm/micromark-extension-gfm-tagfilter.svg
[downloads]: https://www.npmjs.com/package/micromark-extension-gfm-tagfilter
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-extension-gfm-tagfilter
[size]: https://bundlejs.com/?q=micromark-extension-gfm-tagfilter
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
[npm]: https://docs.npmjs.com/cli/install
[esmsh]: https://esm.sh
[license]: license
[author]: https://wooorm.com
[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
[support]: https://github.com/micromark/.github/blob/main/support.md
[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[typescript]: https://www.typescriptlang.org
[micromark]: https://github.com/micromark/micromark
[micromark-html-extension]: https://github.com/micromark/micromark#htmlextension
[micromark-extension-gfm]: https://github.com/micromark/micromark-extension-gfm
[rehype-sanitize]: https://github.com/rehypejs/rehype-sanitize
[hast-util-sanitize]: https://github.com/syntax-tree/hast-util-sanitize
[tag filter]: https://github.github.com/gfm/#disallowed-raw-html-extension-
[api-gfm-tagfilter-html]: #gfmtagfilterhtml
@@ -0,0 +1 @@
{"name":"mdast-util-gfm-autolink-literal","version":"2.0.1","requiresBuild":false,"files":{"license":{"checkedAt":1794532112717,"integrity":"sha512-fzvkEDDVqhfCJpKNt4nSfCdql95dXnYBu6QTwaEDV5dX/EtSGYys2u3y/9LaRjp4jUgB4qbz5csHGjJjcZAb2Q==","mode":420,"size":1099},"index.js":{"checkedAt":1794532115595,"integrity":"sha512-HeRwovJtsm79GQlqM2ogimg9zu5Qj6uw/gv5tD8PH/3PpYe9NWDnko67d4ZWKhdZUcDf+W0i04/a89FamKgQ6A==","mode":420,"size":98},"lib/index.js":{"checkedAt":1794532115596,"integrity":"sha512-jwy9JjN0Inq/uP5PDUXpeoylcJTCPHkAsjiFhBKt3xQA1KmTGP/sGeRucDdfQACt+bTM96g34gwlbCboAR9LKQ==","mode":420,"size":6709},"package.json":{"checkedAt":1794532115596,"integrity":"sha512-pkpxZl073W4HNW03lPcKa3buVGlwWmi/DRKf/+38LWOuj4zUUEW9pejArhQUYJd3oBFQFKLxKiktUy3X0SDFdw==","mode":420,"size":2746},"readme.md":{"checkedAt":1794532115596,"integrity":"sha512-uRStPhMjc8CeNMBdHp1blrsA+wBfnCfwIRRAU6rE6p8EzmRbZfRmO2ciMHNOdT2PZSICU9CooJcujRGJbH6f7Q==","mode":420,"size":10204},"index.d.ts":{"checkedAt":1794532115596,"integrity":"sha512-9qAxYGpbZknhPTlfaWyNUOo1qUdgKreTl5yhqui2RuNSwuJ41zHh8ZY5ft63xd3+3bY7p7WhANlImPIsyPl3Dg==","mode":420,"size":95},"lib/index.d.ts":{"checkedAt":1794532115596,"integrity":"sha512-JYCJc8ODdn7VhgBzpCNEzBoQIxCoX/SI19PonXZ2ish25KH6Lo74Z85OFU+w1USppq8nly9mhzIQGlO6zl+pyw==","mode":420,"size":752}}}
@@ -0,0 +1,67 @@
var SetCache = require('./_SetCache'),
arrayIncludes = require('./_arrayIncludes'),
arrayIncludesWith = require('./_arrayIncludesWith'),
arrayMap = require('./_arrayMap'),
baseUnary = require('./_baseUnary'),
cacheHas = require('./_cacheHas');
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/**
* The base implementation of methods like `_.difference` without support
* for excluding multiple arrays or iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Array} values The values to exclude.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
isCommon = true,
length = array.length,
result = [],
valuesLength = values.length;
if (!length) {
return result;
}
if (iteratee) {
values = arrayMap(values, baseUnary(iteratee));
}
if (comparator) {
includes = arrayIncludesWith;
isCommon = false;
}
else if (values.length >= LARGE_ARRAY_SIZE) {
includes = cacheHas;
isCommon = false;
values = new SetCache(values);
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee == null ? value : iteratee(value);
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
continue outer;
}
}
result.push(value);
}
else if (!includes(values, computed, comparator)) {
result.push(value);
}
}
return result;
}
module.exports = baseDifference;
@@ -0,0 +1,9 @@
"use client";
import {
checkbox_group_default
} from "./chunk-ITDNPVX3.mjs";
import "./chunk-LLMGIUXO.mjs";
import "./chunk-LK575OWX.mjs";
export {
checkbox_group_default as default
};
@@ -0,0 +1,38 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _keywords = require('../parser/tokenizer/keywords');
/**
* Determine whether this optional chain or nullish coalescing operation has any await statements in
* it. If so, we'll need to transpile to an async operation.
*
* We compute this by walking the length of the operation and returning true if we see an await
* keyword used as a real await (rather than an object key or property access). Nested optional
* chain/nullish operations need to be tracked but don't silence await, but a nested async function
* (or any other nested scope) will make the await not count.
*/
function isAsyncOperation(tokens) {
let index = tokens.currentIndex();
let depth = 0;
const startToken = tokens.currentToken();
do {
const token = tokens.tokens[index];
if (token.isOptionalChainStart) {
depth++;
}
if (token.isOptionalChainEnd) {
depth--;
}
depth += token.numNullishCoalesceStarts;
depth -= token.numNullishCoalesceEnds;
if (
token.contextualKeyword === _keywords.ContextualKeyword._await &&
token.identifierRole == null &&
token.scopeDepth === startToken.scopeDepth
) {
return true;
}
index += 1;
} while (depth > 0 && index < tokens.tokens.length);
return false;
} exports.default = isAsyncOperation;
@@ -0,0 +1,17 @@
import {useToolbar as $2680b1829e803644$export$fa142eb1681c520} from "./useToolbar.module.js";
/*
* Copyright 2023 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$2680b1829e803644$export$fa142eb1681c520 as useToolbar};
//# sourceMappingURL=module.js.map
@@ -0,0 +1,62 @@
"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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.createSourceFile = createSourceFile;
exports.createNoProgram = createNoProgram;
const debug_1 = __importDefault(require("debug"));
const ts = __importStar(require("typescript"));
const source_files_1 = require("../source-files");
const getScriptKind_1 = require("./getScriptKind");
const log = (0, debug_1.default)('typescript-eslint:typescript-estree:create-program:createSourceFile');
function createSourceFile(parseSettings) {
log('Getting AST without type information in %s mode for: %s', parseSettings.jsx ? 'TSX' : 'TS', parseSettings.filePath);
return (0, source_files_1.isSourceFile)(parseSettings.code)
? parseSettings.code
: ts.createSourceFile(parseSettings.filePath, parseSettings.codeFullText, {
jsDocParsingMode: parseSettings.jsDocParsingMode,
languageVersion: ts.ScriptTarget.Latest,
setExternalModuleIndicator: parseSettings.setExternalModuleIndicator,
},
/* setParentNodes */ true, (0, getScriptKind_1.getScriptKind)(parseSettings.filePath, parseSettings.jsx));
}
function createNoProgram(parseSettings) {
return {
ast: createSourceFile(parseSettings),
program: null,
};
}
@@ -0,0 +1,191 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/image.tsx
var image_exports = {};
__export(image_exports, {
default: () => image_default
});
module.exports = __toCommonJS(image_exports);
var import_react3 = require("react");
var import_system2 = require("@heroui/system");
// src/use-image.ts
var import_react = require("react");
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_use_image = require("@heroui/use-image");
var import_react2 = require("react");
function useImage(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.image.variantKeys);
const {
ref,
as,
src,
className,
classNames,
loading,
isBlurred,
fallbackSrc,
isLoading: isLoadingProp,
disableSkeleton = !!fallbackSrc,
removeWrapper = false,
onError,
onLoad,
srcSet,
sizes,
crossOrigin,
...otherProps
} = props;
const imageStatus = (0, import_use_image.useImage)({
src,
loading,
onError,
onLoad,
ignoreFallback: false,
srcSet,
sizes,
crossOrigin
});
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const isImgLoaded = imageStatus === "loaded" && !isLoadingProp;
const isLoading = imageStatus === "loading" || isLoadingProp;
const isZoomed = originalProps.isZoomed;
const Component = as || "img";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const { w, h } = (0, import_react2.useMemo)(() => {
return {
w: props.width ? typeof props.width === "number" ? `${props.width}px` : props.width : "fit-content",
h: props.height ? typeof props.height === "number" ? `${props.height}px` : props.height : "auto"
};
}, [props == null ? void 0 : props.width, props == null ? void 0 : props.height]);
const showFallback = (!src || !isImgLoaded) && !!fallbackSrc;
const showSkeleton = isLoading && !disableSkeleton;
const slots = (0, import_react2.useMemo)(
() => (0, import_theme.image)({
...variantProps,
disableAnimation,
showSkeleton
}),
[(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation, showSkeleton]
);
const baseStyles = (0, import_shared_utils.clsx)(className, classNames == null ? void 0 : classNames.img);
const getImgProps = (props2 = {}) => {
const imgStyles = (0, import_shared_utils.clsx)(baseStyles, props2 == null ? void 0 : props2.className);
return {
src,
ref: domRef,
"data-loaded": (0, import_shared_utils.dataAttr)(isImgLoaded),
className: slots.img({ class: imgStyles }),
loading,
srcSet,
sizes,
crossOrigin,
...otherProps,
style: {
...(otherProps == null ? void 0 : otherProps.height) && { height: h },
...props2.style,
...otherProps.style
}
};
};
const getWrapperProps = (0, import_react.useCallback)(() => {
const fallbackStyle = showFallback ? {
backgroundImage: `url(${fallbackSrc})`
} : {};
return {
className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
style: {
...fallbackStyle,
maxWidth: w
}
};
}, [slots, showFallback, fallbackSrc, classNames == null ? void 0 : classNames.wrapper, w]);
const getBlurredImgProps = (0, import_react.useCallback)(() => {
return {
src,
"aria-hidden": (0, import_shared_utils.dataAttr)(true),
className: slots.blurredImg({ class: classNames == null ? void 0 : classNames.blurredImg })
};
}, [slots, src, classNames == null ? void 0 : classNames.blurredImg]);
return {
Component,
domRef,
slots,
classNames,
isBlurred,
disableSkeleton,
fallbackSrc,
removeWrapper,
isZoomed,
isLoading,
getImgProps,
getWrapperProps,
getBlurredImgProps
};
}
// src/image.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Image = (0, import_system2.forwardRef)((props, ref) => {
const {
Component,
domRef,
slots,
classNames,
isBlurred,
isZoomed,
fallbackSrc,
removeWrapper,
disableSkeleton,
getImgProps,
getWrapperProps,
getBlurredImgProps
} = useImage({
...props,
ref
});
const img = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ref: domRef, ...getImgProps() });
if (removeWrapper) {
return img;
}
const zoomed = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: slots.zoomedWrapper({ class: classNames == null ? void 0 : classNames.zoomedWrapper }), children: img });
if (isBlurred) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getWrapperProps(), children: [
isZoomed ? zoomed : img,
(0, import_react3.cloneElement)(img, getBlurredImgProps())
] });
}
if (isZoomed || !disableSkeleton || fallbackSrc) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getWrapperProps(), children: [
" ",
isZoomed ? zoomed : img
] });
}
return img;
});
Image.displayName = "HeroUI.Image";
var image_default = Image;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1 @@
{"version":3,"file":"text.js","names":["TextBlot","Text","entityMap","escapeText","text","replace","s","default"],"sources":["../../src/blots/text.ts"],"sourcesContent":["import { TextBlot } from 'parchment';\n\nclass Text extends TextBlot {}\n\n// https://lodash.com/docs#escape\nconst entityMap: Record<string, string> = {\n '&': '&amp;',\n '<': '&lt;',\n '>': '&gt;',\n '\"': '&quot;',\n \"'\": '&#39;',\n};\n\nfunction escapeText(text: string) {\n return text.replace(/[&<>\"']/g, (s) => entityMap[s]);\n}\n\nexport { Text as default, escapeText };\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,WAAW;AAEpC,MAAMC,IAAI,SAASD,QAAQ,CAAC;;AAE5B;AACA,MAAME,SAAiC,GAAG;EACxC,GAAG,EAAE,OAAO;EACZ,GAAG,EAAE,MAAM;EACX,GAAG,EAAE,MAAM;EACX,GAAG,EAAE,QAAQ;EACb,GAAG,EAAE;AACP,CAAC;AAED,SAASC,UAAUA,CAACC,IAAY,EAAE;EAChC,OAAOA,IAAI,CAACC,OAAO,CAAC,UAAU,EAAGC,CAAC,IAAKJ,SAAS,CAACI,CAAC,CAAC,CAAC;AACtD;AAEA,SAASL,IAAI,IAAIM,OAAO,EAAEJ,UAAU","ignoreList":[]}
@@ -0,0 +1,11 @@
import type { TSchema, SchemaOptions } from '../schema/index';
import type { TProperties } from '../object/index';
import { type TMappedResult } from '../mapped/index';
import { type TExtends } from './extends';
type TFromProperties<P extends TProperties, Right extends TSchema, False extends TSchema, True extends TSchema> = ({
[K2 in keyof P]: TExtends<P[K2], Right, False, True>;
});
type TFromMappedResult<Left extends TMappedResult, Right extends TSchema, True extends TSchema, False extends TSchema> = (TFromProperties<Left['properties'], Right, True, False>);
export type TExtendsFromMappedResult<Left extends TMappedResult, Right extends TSchema, True extends TSchema, False extends TSchema, P extends TProperties = TFromMappedResult<Left, Right, True, False>> = (TMappedResult<P>);
export declare function ExtendsFromMappedResult<Left extends TMappedResult, Right extends TSchema, True extends TSchema, False extends TSchema, P extends TProperties = TFromMappedResult<Left, Right, True, False>>(Left: Left, Right: Right, True: True, False: False, options?: SchemaOptions): TMappedResult<P>;
export {};
@@ -0,0 +1,24 @@
var $97d95f6660b1bb14$exports = require("./SSRProvider.main.js");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "SSRProvider", () => $97d95f6660b1bb14$exports.SSRProvider);
$parcel$export(module.exports, "useSSRSafeId", () => $97d95f6660b1bb14$exports.useSSRSafeId);
$parcel$export(module.exports, "useIsSSR", () => $97d95f6660b1bb14$exports.useIsSSR);
/*
* 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.
*/
//# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
{"name":"@swc/helpers","version":"0.5.17","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532090301,"integrity":"sha512-KaPDXQ2136OHVOndmkddqkbv1GN5ZYnhNh8e8hMxQvlVBX/zNsnxtxAlibYw3tQShhgxEXhr3es2jhLUEJMERg==","mode":420,"size":10836},"cjs/_apply_decorated_descriptor.cjs":{"checkedAt":1794532090438,"integrity":"sha512-hLNK68TPmKzYT85j2fmli2T2Pl6kTvV5SyYXhqexMW2nOncURP0HpiHuDI+TYFI2mumOys7ka4sG3cB5hi/t+A==","mode":420,"size":1178},"cjs/_apply_decs_2203_r.cjs":{"checkedAt":1794532090438,"integrity":"sha512-aSXnQG8Oxkdcc/gUaonqLA53gS2BxBRmAcB87D1edycZqtyiBHBnU0XuyrnxtP7RFT83d08fru4pnWDT/Kr2KQ==","mode":420,"size":17069},"cjs/_array_like_to_array.cjs":{"checkedAt":1794532090438,"integrity":"sha512-THaY7dvXhcp9k+FvobIfmRYoruYB2evy75o9UuaxR0qnmNPP5BdlyE7L9YVTCsFzUClEQTKIvn25m0KuYbMUxg==","mode":420,"size":246},"cjs/_array_with_holes.cjs":{"checkedAt":1794532090438,"integrity":"sha512-jC5GLiBrmN6sBQ9hxIIjuHm0Vlklwq/sNTWXYZ7p+xd4rUeoAm4JkaYN/PavwrH2a4yHfo03ZpSkIe2A8OgSfw==","mode":420,"size":122},"cjs/_array_without_holes.cjs":{"checkedAt":1794532090439,"integrity":"sha512-cw/79TqDmy182Wvik15QJUSlyxaQQ9W4Sd8FCmIFqt2F0bj8NZ211ZLun0cCNw2dgCX59Ws5D58Y6ow8cQ94Nw==","mode":420,"size":219},"cjs/_assert_this_initialized.cjs":{"checkedAt":1794532090439,"integrity":"sha512-XiUklALOwzrIds9zdfUgXz5nhOZIMa3UPHhRo7C6QEW81iBFWlU1PmOjylPzOIGFhUJFnbHFuZsS+Vb3Ym38Ow==","mode":420,"size":227},"cjs/_async_generator_delegate.cjs":{"checkedAt":1794532090439,"integrity":"sha512-73udxY8OM/MONcAOKRmUSPFeDK2SZATYXxVYG93K5wxTXG3RQ5UMjFd2zc65nNmW9PbMgGWWefqpamSgiqlaXQ==","mode":420,"size":1253},"cjs/_async_generator.cjs":{"checkedAt":1794532090439,"integrity":"sha512-bUar6VViA0LKFrIPpTKVvox+/ME0eUsb5OfOl/AXPKmRxbk7N9/vW4gqsA2TOGzqRPdLbGZ7fEX9hFxxWKPo1A==","mode":420,"size":2260},"cjs/_async_iterator.cjs":{"checkedAt":1794532090439,"integrity":"sha512-o4M01Tutm3fSFNqgGInXYwAGK4zHJ07+Mc72zZOlUC8JUL/YQzEo7B6zm67AptcV+5NdKxwCvLEzo/e0f/Dzaw==","mode":420,"size":1727},"cjs/_async_to_generator.cjs":{"checkedAt":1794532090439,"integrity":"sha512-DzlG+83jBEPkk42TQWjIXTFTi3GkG/zxCSImuED8iPjWTv4ZKmi2FzR07Pu+aKe7/F0H+sKJJhm3lfWXd1nYsQ==","mode":420,"size":888},"cjs/_await_async_generator.cjs":{"checkedAt":1794532090439,"integrity":"sha512-narHTn0PumCIeuLbn4d4DEOmObb+MvlJJvbO293GjUmzUX/49w4Vp+qz/AH7WnJc4S+RImc7PZ+5ktKM5NC5Jw==","mode":420,"size":213},"cjs/_await_value.cjs":{"checkedAt":1794532090439,"integrity":"sha512-RPzW6zNnuVEwUGwcYLKJBNY3mWxTW29zx+07HLC+4/YjwIlbPGrB0ii1Z6GA+G9NNmRirdDQEnGCiKkWd4ZXgg==","mode":420,"size":100},"cjs/_call_super.cjs":{"checkedAt":1794532090440,"integrity":"sha512-HnbCQ6NRuQ7HEhoE04uP3OT+xGwaY7zugdeMCdRhN9B9Sv7tDFCNzXUcrRqsyMz740cmQxItFvueJCNj4S+M2w==","mode":420,"size":698},"cjs/_check_private_redeclaration.cjs":{"checkedAt":1794532090440,"integrity":"sha512-K94C4k0DgCPqOhYmyh42glu2vW7lla8IEuQtOH/C3JOa3PLQ0Fm5O9RJauXuBqnqmS6noQJqoMUv89S0ACoDXQ==","mode":420,"size":262},"cjs/_class_apply_descriptor_destructure.cjs":{"checkedAt":1794532090440,"integrity":"sha512-JUIe5dG6DFvrMmVrHAzetMNakfHytNqig0HyJnKAYJI25aHP/Ih48diSDAeF2TgxxePOuRlS5wB9KRTci3CJBg==","mode":420,"size":757},"cjs/_class_apply_descriptor_get.cjs":{"checkedAt":1794532090440,"integrity":"sha512-4iLcWqOL6mvB5WKtchAuE/YUAGXKlrXzStW9YxdUjOO4O7nhZaf9PcQwpi36abx0oNZX3x7ylEkcyMzbu0TxCw==","mode":420,"size":211},"cjs/_class_apply_descriptor_set.cjs":{"checkedAt":1794532090440,"integrity":"sha512-UGZAVFwUT2IwQrNilvOYWZ6H7VTGt4LdKftVGzq2h4XaNuEsxsSkt9UVLBArWeoL2CLNR1i2wYdQ5/u4Lvl2Mg==","mode":420,"size":538},"cjs/_class_apply_descriptor_update.cjs":{"checkedAt":1794532090440,"integrity":"sha512-KoFdSgSAkUiUIpKGFq6XrA0NXsMPZlC/j3DOsmThy033UNsSHGtw0g9sy73s56Qfpp6f4cZCGxh1LwOFyJW0kw==","mode":420,"size":961},"cjs/_class_call_check.cjs":{"checkedAt":1794532090440,"integrity":"sha512-gk13vmVcU8hjEX+w3g5V3ocq/HsLXhFrWFyG0PwN7fTmBoj7DxpAN7fuZGmXBTAuaN6+n0u3JenLrlry51ibYQ==","mode":420,"size":202},"cjs/_class_check_private_static_access.cjs":{"checkedAt":1794532090441,"integrity":"sha512-Lz1cFjH4P1e9kZ84LDOHeSyhhg436q8U4zEQgEgZxATZZXSDFmqkLHVpVbwwJt1fxRHNtiwTEcek36sgKmb4eA==","mode":420,"size":244},"cjs/_class_check_private_static_field_descriptor.cjs":{"checkedAt":1794532090441,"integrity":"sha512-ZByuIq15+GeUfwgG2xJM7LT/hheXOfHyO5FrR8bhzXy6PqfU3JxgxbUq7wCoGIV4vkzU2kMR7e1ahgKMziTcXg==","mode":420,"size":297},"cjs/_class_extract_field_descriptor.cjs":{"checkedAt":1794532090441,"integrity":"sha512-Ab58N/+9T37mLT6LaIFfpKvPlTWwHBAbUQ+YJYnXigQiRA3hLVOr5DmAhHsFpd5MaF25cVZfUU+uQk1wDdrHCg==","mode":420,"size":290},"cjs/_class_name_tdz_error.cjs":{"checkedAt":1794532090441,"integrity":"sha512-I+Q/4vfGZaCsJ0XGaOiYNWUd+L2BZho+MTWMq13gZbp9iUxjdD7UQlxFOrYij30ZQcDg3Fie/S8B6yUKWlbqYQ==","mode":420,"size":186},"cjs/_class_private_field_destructure.cjs":{"checkedAt":1794532090441,"integrity":"sha512-f26xK5WXfhL8pq5+jiFML+vzGosCi71TSQaKr2vWH1D3RkUoAr87s6Me6vtEzfugl9uYBk7tcvX0lhSoVxtdCg==","mode":420,"size":471},"cjs/_class_private_field_get.cjs":{"checkedAt":1794532090441,"integrityLine truncated
@@ -0,0 +1,46 @@
'use strict';
var $TypeError = require('es-errors/type');
var CreateIteratorResultObject = require('./CreateIteratorResultObject');
var IsCallable = require('./IsCallable');
var SLOT = require('internal-slot');
var isObject = require('es-object-atoms/isObject');
// https://262.ecma-international.org/16.0/#sec-generatorstart
module.exports = function GeneratorStart(generator, closure) {
SLOT.assert(generator, '[[GeneratorState]]');
SLOT.assert(generator, '[[GeneratorContext]]');
SLOT.assert(generator, '[[GeneratorBrand]]');
SLOT.assert(generator, '[[Sentinel]]'); // our userland slot
SLOT.assert(generator, '[[CloseIfAbrupt]]'); // our second userland slot
if (!IsCallable(closure) || closure.length !== 0) {
throw new $TypeError('`closure` must be a function that takes no arguments');
}
var sentinel = SLOT.get(closure, '[[Sentinel]]');
if (!isObject(sentinel)) {
throw new $TypeError('`closure.[[Sentinel]]` must be an object');
}
SLOT.set(generator, '[[GeneratorContext]]', function () { // steps 2-5
try {
var result = closure();
if (result === sentinel) {
SLOT.set(generator, '[[GeneratorState]]', 'COMPLETED');
SLOT.set(generator, '[[GeneratorContext]]', null);
return CreateIteratorResultObject(void undefined, true);
}
SLOT.set(generator, '[[GeneratorState]]', 'SUSPENDED-YIELD');
return CreateIteratorResultObject(result, false);
} catch (e) {
SLOT.set(generator, '[[GeneratorState]]', 'COMPLETED');
SLOT.set(generator, '[[GeneratorContext]]', null);
throw e;
}
});
SLOT.set(generator, '[[GeneratorState]]', 'SUSPENDED-START'); // step 6
};
@@ -0,0 +1 @@
{"version":3,"file":"buildInstanceBinding.spec.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/buildInstanceBinding.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,59 @@
"use strict"
// builtin tooling
const path = require("path")
// placeholder tooling
let sugarss
module.exports = function processContent(
result,
content,
filename,
options,
postcss
) {
const { plugins } = options
const ext = path.extname(filename)
const parserList = []
// SugarSS support:
if (ext === ".sss") {
if (!sugarss) {
try {
sugarss = require("sugarss")
} catch {} // Ignore
}
if (sugarss)
return runPostcss(postcss, content, filename, plugins, [sugarss])
}
// Syntax support:
if (result.opts.syntax?.parse) {
parserList.push(result.opts.syntax.parse)
}
// Parser support:
if (result.opts.parser) parserList.push(result.opts.parser)
// Try the default as a last resort:
parserList.push(null)
return runPostcss(postcss, content, filename, plugins, parserList)
}
function runPostcss(postcss, content, filename, plugins, parsers, index) {
if (!index) index = 0
return postcss(plugins)
.process(content, {
from: filename,
parser: parsers[index],
})
.catch(err => {
// If there's an error, try the next parser
index++
// If there are no parsers left, throw it
if (index === parsers.length) throw err
return runPostcss(postcss, content, filename, plugins, parsers, index)
})
}
@@ -0,0 +1,126 @@
'use strict';
var utils = require('../utils.js');
var utils$1 = require('@typescript-eslint/utils');
var astUtils = require('@typescript-eslint/utils/ast-utils');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
var spaceBeforeFunctionParen = utils.createRule({
name: "space-before-function-paren",
package: "ts",
meta: {
type: "layout",
docs: {
description: "Enforce consistent spacing before function parenthesis"
},
fixable: "whitespace",
schema: [
{
oneOf: [
{
type: "string",
enum: ["always", "never"]
},
{
type: "object",
properties: {
anonymous: {
type: "string",
enum: ["always", "never", "ignore"]
},
named: {
type: "string",
enum: ["always", "never", "ignore"]
},
asyncArrow: {
type: "string",
enum: ["always", "never", "ignore"]
}
},
additionalProperties: false
}
]
}
],
messages: {
unexpectedSpace: "Unexpected space before function parentheses.",
missingSpace: "Missing space before function parentheses."
}
},
defaultOptions: ["always"],
create(context, [firstOption]) {
const sourceCode = context.sourceCode;
const baseConfig = typeof firstOption === "string" ? firstOption : "always";
const overrideConfig = typeof firstOption === "object" ? firstOption : {};
function isNamedFunction(node) {
if (node.id != null)
return true;
const parent = node.parent;
return parent.type === utils$1.AST_NODE_TYPES.MethodDefinition || parent.type === utils$1.AST_NODE_TYPES.TSAbstractMethodDefinition || parent.type === utils$1.AST_NODE_TYPES.Property && (parent.kind === "get" || parent.kind === "set" || parent.method);
}
function getConfigForFunction(node) {
if (node.type === utils$1.AST_NODE_TYPES.ArrowFunctionExpression) {
if (node.async && astUtils.isOpeningParenToken(sourceCode.getFirstToken(node, { skip: 1 }))) {
return overrideConfig.asyncArrow ?? baseConfig;
}
} else if (isNamedFunction(node)) {
return overrideConfig.named ?? baseConfig;
} else if (!node.generator) {
return overrideConfig.anonymous ?? baseConfig;
}
return "ignore";
}
function checkFunction(node) {
const functionConfig = getConfigForFunction(node);
if (functionConfig === "ignore")
return;
let leftToken;
let rightToken;
if (node.typeParameters) {
leftToken = sourceCode.getLastToken(node.typeParameters);
rightToken = sourceCode.getTokenAfter(leftToken);
} else {
rightToken = sourceCode.getFirstToken(node, astUtils.isOpeningParenToken);
leftToken = sourceCode.getTokenBefore(rightToken);
}
const hasSpacing = sourceCode.isSpaceBetween(leftToken, rightToken);
if (hasSpacing && functionConfig === "never") {
context.report({
node,
loc: {
start: leftToken.loc.end,
end: rightToken.loc.start
},
messageId: "unexpectedSpace",
fix: (fixer) => {
const comments = sourceCode.getCommentsBefore(rightToken);
if (comments.some((comment) => comment.type === "Line"))
return null;
return fixer.replaceTextRange(
[leftToken.range[1], rightToken.range[0]],
comments.reduce((text, comment) => text + sourceCode.getText(comment), "")
);
}
});
} else if (!hasSpacing && functionConfig === "always" && (!node.typeParameters || node.id)) {
context.report({
node,
loc: rightToken.loc,
messageId: "missingSpace",
fix: (fixer) => fixer.insertTextAfter(leftToken, " ")
});
}
}
return {
ArrowFunctionExpression: checkFunction,
FunctionDeclaration: checkFunction,
FunctionExpression: checkFunction,
TSEmptyBodyFunctionExpression: checkFunction,
TSDeclareFunction: checkFunction
};
}
});
module.exports = spaceBeforeFunctionParen;
@@ -0,0 +1,69 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var _useUpdateEffect = _interopRequireDefault(require("../../../useUpdateEffect"));
var _isDocumentVisible = _interopRequireDefault(require("../utils/isDocumentVisible"));
var _subscribeReVisible = _interopRequireDefault(require("../utils/subscribeReVisible"));
var usePollingPlugin = function usePollingPlugin(fetchInstance, _a) {
var pollingInterval = _a.pollingInterval,
_b = _a.pollingWhenHidden,
pollingWhenHidden = _b === void 0 ? true : _b,
_c = _a.pollingErrorRetryCount,
pollingErrorRetryCount = _c === void 0 ? -1 : _c;
var timerRef = (0, _react.useRef)(undefined);
var unsubscribeRef = (0, _react.useRef)(undefined);
var countRef = (0, _react.useRef)(0);
var stopPolling = function stopPolling() {
var _a;
if (timerRef.current) {
clearTimeout(timerRef.current);
}
(_a = unsubscribeRef.current) === null || _a === void 0 ? void 0 : _a.call(unsubscribeRef);
};
(0, _useUpdateEffect["default"])(function () {
if (!pollingInterval) {
stopPolling();
}
}, [pollingInterval]);
if (!pollingInterval) {
return {};
}
return {
onBefore: function onBefore() {
stopPolling();
},
onError: function onError() {
countRef.current += 1;
},
onSuccess: function onSuccess() {
countRef.current = 0;
},
onFinally: function onFinally() {
if (pollingErrorRetryCount === -1 ||
// When an error occurs, the request is not repeated after pollingErrorRetryCount retries
pollingErrorRetryCount !== -1 && countRef.current <= pollingErrorRetryCount) {
timerRef.current = setTimeout(function () {
// if pollingWhenHidden = false && document is hidden, then stop polling and subscribe revisible
if (!pollingWhenHidden && !(0, _isDocumentVisible["default"])()) {
unsubscribeRef.current = (0, _subscribeReVisible["default"])(function () {
fetchInstance.refresh();
});
} else {
fetchInstance.refresh();
}
}, pollingInterval);
} else {
countRef.current = 0;
}
},
onCancel: function onCancel() {
stopPolling();
}
};
};
var _default = exports["default"] = usePollingPlugin;
@@ -0,0 +1,96 @@
declare namespace callsites {
interface CallSite {
/**
Returns the value of `this`.
*/
getThis(): unknown | undefined;
/**
Returns the type of `this` as a string. This is the name of the function stored in the constructor field of `this`, if available, otherwise the object's `[[Class]]` internal property.
*/
getTypeName(): string | null;
/**
Returns the current function.
*/
getFunction(): Function | undefined;
/**
Returns the name of the current function, typically its `name` property. If a name property is not available an attempt will be made to try to infer a name from the function's context.
*/
getFunctionName(): string | null;
/**
Returns the name of the property of `this` or one of its prototypes that holds the current function.
*/
getMethodName(): string | undefined;
/**
Returns the name of the script if this function was defined in a script.
*/
getFileName(): string | null;
/**
Returns the current line number if this function was defined in a script.
*/
getLineNumber(): number | null;
/**
Returns the current column number if this function was defined in a script.
*/
getColumnNumber(): number | null;
/**
Returns a string representing the location where `eval` was called if this function was created using a call to `eval`.
*/
getEvalOrigin(): string | undefined;
/**
Returns `true` if this is a top-level invocation, that is, if it's a global object.
*/
isToplevel(): boolean;
/**
Returns `true` if this call takes place in code defined by a call to `eval`.
*/
isEval(): boolean;
/**
Returns `true` if this call is in native V8 code.
*/
isNative(): boolean;
/**
Returns `true` if this is a constructor call.
*/
isConstructor(): boolean;
}
}
declare const callsites: {
/**
Get callsites from the V8 stack trace API.
@returns An array of `CallSite` objects.
@example
```
import callsites = require('callsites');
function unicorn() {
console.log(callsites()[0].getFileName());
//=> '/Users/sindresorhus/dev/callsites/test.js'
}
unicorn();
```
*/
(): callsites.CallSite[];
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function callsites(): callsites.CallSite[];
// export = callsites;
default: typeof callsites;
};
export = callsites;
@@ -0,0 +1,45 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
export declare const GetFilePayloadSchema: import("@sinclair/typebox").TObject<{
file: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
file_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
export type GetFilePayload = Static<typeof GetFilePayloadSchema>;
export declare const GetFileReturnSchema: import("@sinclair/typebox").TObject<{
file: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
url: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
file_size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
file_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
base64: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
export type GetFileResponse = Static<typeof GetFileReturnSchema>;
export declare class GetFileBase extends OneBotAction<GetFilePayload, GetFileResponse> {
payloadSchema: import("@sinclair/typebox").TObject<{
file: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
file_id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
returnSchema: import("@sinclair/typebox").TObject<{
file: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
url: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
file_size: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
file_name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
base64: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
}>;
actionTags: string[];
_handle(payload: GetFilePayload): Promise<GetFileResponse>;
}
export default class GetFile extends GetFileBase {
actionName: "get_file";
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
file: string;
};
returnExample: {
file: string;
url: string;
file_size: number;
file_name: string;
};
}
@@ -0,0 +1,4 @@
//#region src/index.d.ts
declare function stableHash(arg: unknown, crossRealm?: boolean): string;
//#endregion
export { stableHash as hash, stableHash };
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docPartRole = {
abstract: false,
accessibleNameRequired: true,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'part [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark']]
};
var _default = exports.default = docPartRole;
@@ -0,0 +1,3 @@
declare function _exports(node: ASTNode): boolean;
export = _exports;
//# sourceMappingURL=isCreateContext.d.ts.map
@@ -0,0 +1,35 @@
import { w as workerInit } from '../chunks/init-threads.C7T0-YMD.js';
import { r as runVmTests } from '../chunks/vm.DXN8eCh2.js';
import 'node:worker_threads';
import '../chunks/init.BQhNfT0h.js';
import 'node:fs';
import 'node:module';
import 'node:url';
import 'pathe';
import 'vite/module-runner';
import '../chunks/startModuleRunner.DLjmA_wU.js';
import '@vitest/utils/helpers';
import '../path.js';
import 'node:path';
import '@vitest/utils/serialize';
import '../module-evaluator.js';
import 'node:vm';
import '@vitest/mocker';
import '../chunks/index.BfmpdV5p.js';
import 'node:console';
import '@vitest/utils/error';
import '../chunks/rpc.BytlcPfC.js';
import '@vitest/utils/timers';
import '../chunks/index.0kCJoeWi.js';
import '../chunks/utils.DvEY5TfP.js';
import '@vitest/utils/source-map';
import '../chunks/inspector.CvyFGlXm.js';
import '../chunks/evaluatedModules.Dg1zASAC.js';
import '../chunks/console.Cf-YriPC.js';
import 'node:stream';
import 'tinyrainbow';
import '../chunks/date.Bq6ZW5rf.js';
import '@vitest/utils/resolver';
import '@vitest/utils/constants';
workerInit({ runTests: runVmTests });
@@ -0,0 +1,92 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
// Portions of the code in this file are based on code from ICU.
// Original licensing can be found in the NOTICE file in the root directory of this source tree.
import {AnyCalendarDate, Calendar} from '../types';
import {CalendarDate} from '../CalendarDate';
import {mod} from '../utils';
const PERSIAN_EPOCH = 1948320;
// Number of days from the start of the year to the start of each month.
const MONTH_START = [
0, // Farvardin
31, // Ordibehesht
62, // Khordad
93, // Tir
124, // Mordad
155, // Shahrivar
186, // Mehr
216, // Aban
246, // Azar
276, // Dey
306, // Bahman
336 // Esfand
];
/**
* The Persian calendar is the main calendar used in Iran and Afghanistan. It has 12 months
* in each year, the first 6 of which have 31 days, and the next 5 have 30 days. The 12th month
* has either 29 or 30 days depending on whether it is a leap year. The Persian year starts
* around the March equinox.
*/
export class PersianCalendar implements Calendar {
identifier = 'persian';
fromJulianDay(jd: number): CalendarDate {
let daysSinceEpoch = jd - PERSIAN_EPOCH;
let year = 1 + Math.floor((33 * daysSinceEpoch + 3) / 12053);
let farvardin1 = 365 * (year - 1) + Math.floor((8 * year + 21) / 33);
let dayOfYear = daysSinceEpoch - farvardin1;
let month = dayOfYear < 216
? Math.floor(dayOfYear / 31)
: Math.floor((dayOfYear - 6) / 30);
let day = dayOfYear - MONTH_START[month] + 1;
return new CalendarDate(this, year, month + 1, day);
}
toJulianDay(date: AnyCalendarDate): number {
let jd = PERSIAN_EPOCH - 1 + 365 * (date.year - 1) + Math.floor((8 * date.year + 21) / 33);
jd += MONTH_START[date.month - 1];
jd += date.day;
return jd;
}
getMonthsInYear(): number {
return 12;
}
getDaysInMonth(date: AnyCalendarDate): number {
if (date.month <= 6) {
return 31;
}
if (date.month <= 11) {
return 30;
}
let isLeapYear = mod(25 * date.year + 11, 33) < 8;
return isLeapYear ? 30 : 29;
}
getEras() {
return ['AP'];
}
getYearsInEra(): number {
// 9378-10-10 persian is 9999-12-31 gregorian.
// Round down to 9377 to set the maximum full year.
return 9377;
}
}
@@ -0,0 +1 @@
{"version":3,"file":"tryBuildGetPlanOptionsFromManagedClassElementMetadata.d.ts","sourceRoot":"","sources":["../../../../src/planning/calculations/tryBuildGetPlanOptionsFromManagedClassElementMetadata.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AAEhG,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG1D,wBAAgB,qDAAqD,CACnE,eAAe,EAAE,2BAA2B,GAC3C,cAAc,GAAG,SAAS,CAsC5B"}
@@ -0,0 +1,7 @@
import classApplyDescriptorGet from "./classApplyDescriptorGet.js";
import classPrivateFieldGet2 from "./classPrivateFieldGet2.js";
function _classPrivateFieldGet(e, t) {
var r = classPrivateFieldGet2(t, e);
return classApplyDescriptorGet(e, r);
}
export { _classPrivateFieldGet as default };
@@ -0,0 +1,19 @@
# @babel/compat-data
> The compat-data to determine required Babel plugins
See our website [@babel/compat-data](https://babeljs.io/docs/babel-compat-data) for more information.
## Install
Using npm:
```sh
npm install --save @babel/compat-data
```
or using yarn:
```sh
yarn add @babel/compat-data
```
@@ -0,0 +1,428 @@
export default `flf2a$ 4 3 10 -1 18
3 lines tall font by LESTER
=============================
-> Conversion to FigLet font by MEPH. (Part of ASCII Editor Service Pack I)
(http://studenten.freepage.de/meph/ascii/ascii/editor/_index.htm)
-> Defined: ASCII code alphanumeric + most used symbols
-> Uppercase characters only.
.-~~-.
(_^..^_)
Lester||||AMC - Anthony Cucchiara
*Mythos Online : Internet Magazine of Lovecraftian Horror - Dead Alice*
http://www.fortunecity.com/victorian/redlion/157/deadal.htm
*Visit my web page ANSI/ASCII/Fonts*
http://members.aol.com/lester5374/
$@
$@
$@
$@@
. @
| @
. @
@@
\`' @
\`; @
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
\`' @
\`' @
@
@@
. @
( @
\` @
@@
. @
) @
' @
@@
@
@
@
@@
@
@
@
@@
@
@
, @
@@
@
@
@
@@
@
@
. @
@@
, @
,' @
' @
@@
.-. @
|\\| @
\`-' @
@@
. @
'| @
' @
@@
.-. @
.'' @
\`-- @
@@
-. @
-| @
-' @
@@
. . @
\`-| @
' @
@@
.-. @
\`\`. @
--' @
@@
.-. @
|-. @
\`-' @
@@
.-. @
.' @
' @
@@
.-. @
)-( @
\`-' @
@@
.-. @
\`-| @
\`-' @
@@
| @
@
| @
@@
| @
@
| @
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
.-. @
.' @
. @
@@
@
@
@
@@
.-. @
|-| @
\` ' @
@@
.-. @
|( @
\`-' @
@@
.-. @
| @
\`-' @
@@
.-. @
| )@
\`-' @
@@
.-. @
|- @
\`-' @
@@
.-. @
|- @
' @
@@
.-. @
|.. @
\`-' @
@@
. . @
|-| @
' \` @
@@
.-. @
| @
\`-' @
@@
. @
| @
\`-' @
@@
. . @
|< @
' \` @
@@
. @
| @
\`-' @
@@
. . @
|\\/| @
' \` @
@@
. . @
|\\| @
' \` @
@@
.-. @
| | @
\`-' @
@@
.-. @
|-' @
' @
@@
.-. @
|.| @
\`-\`.@
@@
.-. @
|( @
' ' @
@@
.-. @
\`-. @
\`-' @
@@
.-. @
| @
' @
@@
. . @
| | @
\`-' @
@@
. . @
| | @
\`.' @
@@
. . . @
| | | @
\`.'.' @
@@
. . @
)( @
' \` @
@@
. . @
| @
\` @
@@
.-. @
/ @
\`-' @
@@
.' @
( @
\`. @
@@
, @
\`, @
\` @
@@
\`. @
) @
.' @
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
.-. @
|-| @
\` ' @
@@
.-. @
|( @
\`-' @
@@
.-. @
| @
\`-' @
@@
.-. @
| )@
\`-' @
@@
.-. @
|- @
\`-' @
@@
.-. @
|- @
' @
@@
.-. @
|.. @
\`-' @
@@
. . @
|-| @
' \` @
@@
.-. @
| @
\`-' @
@@
. @
| @
\`-' @
@@
. . @
|< @
' \` @
@@
. @
| @
\`-' @
@@
. . @
|\\/| @
' \` @
@@
. . @
|\\| @
' \` @
@@
.-. @
| | @
\`-' @
@@
.-. @
|-' @
' @
@@
.-. @
|.| @
\`-\`.@
@@
.-. @
|( @
' ' @
@@
.-. @
\`-. @
\`-' @
@@
.-. @
| @
' @
@@
. . @
| | @
\`-' @
@@
. . @
| | @
\`.' @
@@
. . . @
| | | @
\`.'.' @
@@
. . @
)( @
' \` @
@@
. . @
| @
\` @
@@
.-. @
/ @
\`-' @
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
@
@
@
@@
`
@@ -0,0 +1,17 @@
import { Time } from "./time";
export interface IValidityParams {
notBefore: Date;
notAfter: Date;
}
/**
* ```asn1
* Validity ::= SEQUENCE {
* notBefore Time,
* notAfter Time }
* ```
*/
export declare class Validity {
notBefore: Time;
notAfter: Time;
constructor(params?: IValidityParams);
}
@@ -0,0 +1,43 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
var _tslib = require("tslib");
var _lodashPolyfill = require("../utils/lodash-polyfill");
var _react = require("react");
var _useLatest = _interopRequireDefault(require("../useLatest"));
var _useUnmount = _interopRequireDefault(require("../useUnmount"));
var _utils = require("../utils");
var _isDev = _interopRequireDefault(require("../utils/isDev"));
function useDebounceFn(fn, options) {
var _a;
if (_isDev["default"]) {
if (!(0, _utils.isFunction)(fn)) {
console.error("useDebounceFn expected parameter is a function, got ".concat((0, _typeof2["default"])(fn)));
}
}
var fnRef = (0, _useLatest["default"])(fn);
var wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1000;
var debounced = (0, _react.useMemo)(function () {
return (0, _lodashPolyfill.debounce)(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return fnRef.current.apply(fnRef, (0, _tslib.__spreadArray)([], (0, _tslib.__read)(args), false));
}, wait, options);
}, []);
(0, _useUnmount["default"])(function () {
debounced.cancel();
});
return {
run: debounced,
cancel: debounced.cancel,
flush: debounced.flush
};
}
var _default = exports["default"] = useDebounceFn;
@@ -0,0 +1 @@
{"processes":{"68e78020-c804-4f37-a68a-a967c6380da9":{"parent":null,"children":[]}},"files":{"/Users/dabh/winston-transport/index.js":["68e78020-c804-4f37-a68a-a967c6380da9"],"/Users/dabh/winston-transport/modern.js":["68e78020-c804-4f37-a68a-a967c6380da9"],"/Users/dabh/winston-transport/legacy.js":["68e78020-c804-4f37-a68a-a967c6380da9"]},"externalIds":{}}
@@ -0,0 +1,3 @@
export type MessageIds = 'unnecessaryTypeParameter';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"unnecessaryTypeParameter", [], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,52 @@
import {PressResponderContext as $ae1eeba8b9eafd08$export$5165eccb35aaadb5} from "./context.mjs";
import {useObjectRef as $87RPk$useObjectRef, mergeProps as $87RPk$mergeProps, useSyncRef as $87RPk$useSyncRef} from "@react-aria/utils";
import $87RPk$react, {useRef as $87RPk$useRef, useContext as $87RPk$useContext, useEffect as $87RPk$useEffect, useMemo as $87RPk$useMemo} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
const $f1ab8c75478c6f73$export$3351871ee4b288b8 = /*#__PURE__*/ (0, $87RPk$react).forwardRef(({ children: children, ...props }, ref)=>{
let isRegistered = (0, $87RPk$useRef)(false);
let prevContext = (0, $87RPk$useContext)((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5));
ref = (0, $87RPk$useObjectRef)(ref || (prevContext === null || prevContext === void 0 ? void 0 : prevContext.ref));
let context = (0, $87RPk$mergeProps)(prevContext || {}, {
...props,
ref: ref,
register () {
isRegistered.current = true;
if (prevContext) prevContext.register();
}
});
(0, $87RPk$useSyncRef)(prevContext, ref);
(0, $87RPk$useEffect)(()=>{
if (!isRegistered.current) {
if (process.env.NODE_ENV !== 'production') console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component.");
isRegistered.current = true; // only warn once in strict mode.
}
}, []);
return /*#__PURE__*/ (0, $87RPk$react).createElement((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5).Provider, {
value: context
}, children);
});
function $f1ab8c75478c6f73$export$cf75428e0b9ed1ea({ children: children }) {
let context = (0, $87RPk$useMemo)(()=>({
register: ()=>{}
}), []);
return /*#__PURE__*/ (0, $87RPk$react).createElement((0, $ae1eeba8b9eafd08$export$5165eccb35aaadb5).Provider, {
value: context
}, children);
}
export {$f1ab8c75478c6f73$export$3351871ee4b288b8 as PressResponder, $f1ab8c75478c6f73$export$cf75428e0b9ed1ea as ClearPressResponder};
//# sourceMappingURL=PressResponder.module.js.map
@@ -0,0 +1,185 @@
/*
* Copyright 2023 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 {focusWithoutScrolling, isMac, isWebKit} from './index';
import {Href, LinkDOMProps, RouterOptions} from '@react-types/shared';
import {isFirefox, isIPad} from './platform';
import React, {createContext, ReactNode, useContext, useMemo} from 'react';
interface Router {
isNative: boolean,
open: (target: Element, modifiers: Modifiers, href: Href, routerOptions: RouterOptions | undefined) => void,
useHref: (href: Href) => string
}
const RouterContext = createContext<Router>({
isNative: true,
open: openSyntheticLink,
useHref: (href) => href
});
interface RouterProviderProps {
navigate: (path: Href, routerOptions: RouterOptions | undefined) => void,
useHref?: (href: Href) => string,
children: ReactNode
}
/**
* A RouterProvider accepts a `navigate` function from a framework or client side router,
* and provides it to all nested React Aria links to enable client side navigation.
*/
export function RouterProvider(props: RouterProviderProps) {
let {children, navigate, useHref} = props;
let ctx = useMemo(() => ({
isNative: false,
open: (target: Element, modifiers: Modifiers, href: Href, routerOptions: RouterOptions | undefined) => {
getSyntheticLink(target, link => {
if (shouldClientNavigate(link, modifiers)) {
navigate(href, routerOptions);
} else {
openLink(link, modifiers);
}
});
},
useHref: useHref || ((href) => href)
}), [navigate, useHref]);
return (
<RouterContext.Provider value={ctx}>
{children}
</RouterContext.Provider>
);
}
export function useRouter(): Router {
return useContext(RouterContext);
}
interface Modifiers {
metaKey?: boolean,
ctrlKey?: boolean,
altKey?: boolean,
shiftKey?: boolean
}
export function shouldClientNavigate(link: HTMLAnchorElement, modifiers: Modifiers) {
// Use getAttribute here instead of link.target. Firefox will default link.target to "_parent" when inside an iframe.
let target = link.getAttribute('target');
return (
(!target || target === '_self') &&
link.origin === location.origin &&
!link.hasAttribute('download') &&
!modifiers.metaKey && // open in new tab (mac)
!modifiers.ctrlKey && // open in new tab (windows)
!modifiers.altKey && // download
!modifiers.shiftKey
);
}
export function openLink(target: HTMLAnchorElement, modifiers: Modifiers, setOpening = true) {
let {metaKey, ctrlKey, altKey, shiftKey} = modifiers;
// Firefox does not recognize keyboard events as a user action by default, and the popup blocker
// will prevent links with target="_blank" from opening. However, it does allow the event if the
// Command/Control key is held, which opens the link in a background tab. This seems like the best we can do.
// See https://bugzilla.mozilla.org/show_bug.cgi?id=257870 and https://bugzilla.mozilla.org/show_bug.cgi?id=746640.
if (isFirefox() && window.event?.type?.startsWith('key') && target.target === '_blank') {
if (isMac()) {
metaKey = true;
} else {
ctrlKey = true;
}
}
// WebKit does not support firing click events with modifier keys, but does support keyboard events.
// https://github.com/WebKit/WebKit/blob/c03d0ac6e6db178f90923a0a63080b5ca210d25f/Source/WebCore/html/HTMLAnchorElement.cpp#L184
let event = isWebKit() && isMac() && !isIPad() && process.env.NODE_ENV !== 'test'
// @ts-ignore - keyIdentifier is a non-standard property, but it's what webkit expects
? new KeyboardEvent('keydown', {keyIdentifier: 'Enter', metaKey, ctrlKey, altKey, shiftKey})
: new MouseEvent('click', {metaKey, ctrlKey, altKey, shiftKey, bubbles: true, cancelable: true});
(openLink as any).isOpening = setOpening;
focusWithoutScrolling(target);
target.dispatchEvent(event);
(openLink as any).isOpening = false;
}
// https://github.com/parcel-bundler/parcel/issues/8724
(openLink as any).isOpening = false;
function getSyntheticLink(target: Element, open: (link: HTMLAnchorElement) => void) {
if (target instanceof HTMLAnchorElement) {
open(target);
} else if (target.hasAttribute('data-href')) {
let link = document.createElement('a');
link.href = target.getAttribute('data-href')!;
if (target.hasAttribute('data-target')) {
link.target = target.getAttribute('data-target')!;
}
if (target.hasAttribute('data-rel')) {
link.rel = target.getAttribute('data-rel')!;
}
if (target.hasAttribute('data-download')) {
link.download = target.getAttribute('data-download')!;
}
if (target.hasAttribute('data-ping')) {
link.ping = target.getAttribute('data-ping')!;
}
if (target.hasAttribute('data-referrer-policy')) {
link.referrerPolicy = target.getAttribute('data-referrer-policy')!;
}
target.appendChild(link);
open(link);
target.removeChild(link);
}
}
function openSyntheticLink(target: Element, modifiers: Modifiers) {
getSyntheticLink(target, link => openLink(link, modifiers));
}
export function useSyntheticLinkProps(props: LinkDOMProps) {
let router = useRouter();
const href = router.useHref(props.href ?? '');
return {
'data-href': props.href ? href : undefined,
'data-target': props.target,
'data-rel': props.rel,
'data-download': props.download,
'data-ping': props.ping,
'data-referrer-policy': props.referrerPolicy
};
}
/** @deprecated - For backward compatibility. */
export function getSyntheticLinkProps(props: LinkDOMProps) {
return {
'data-href': props.href,
'data-target': props.target,
'data-rel': props.rel,
'data-download': props.download,
'data-ping': props.ping,
'data-referrer-policy': props.referrerPolicy
};
}
export function useLinkProps(props?: LinkDOMProps) {
let router = useRouter();
const href = router.useHref(props?.href ?? '');
return {
href: props?.href ? href : undefined,
target: props?.target,
rel: props?.rel,
download: props?.download,
ping: props?.ping,
referrerPolicy: props?.referrerPolicy
};
}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAmDM,SAAS,0CAAwB,KAAoC,EAAE,KAAgC,EAAE,GAAuC;IACrJ,IAAI,EAAC,QAAQ,IAAI,cAAE,UAAU,cAAE,UAAU,iBAAE,aAAa,YAAE,QAAQ,eAAE,WAAW,EAAE,cAAc,SAAS,EAAC,GAAG;IAC5G,MAAM,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAClE,IAAI,KAAK,CAAA,GAAA,2BAAI;IACb,IAAI,aAAa,MAAM,cAAc,KAAK,KAAK,GAAG;IAClD,IAAI,gBAAgB,CAAA,GAAA,mBAAK,EAAE;IAC3B,IAAI,WAAW,CAAA,GAAA,mBAAK,EAA+B;IACnD,IAAI,0BAA0B,CAAA,GAAA,mBAAK,EAAE;IACrC,IAAI,kBAAkB,MAAM,UAAU,CAAC,4BAA4B;IAEnE,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,iBAAC,aAAa,EAAC,GAAG,CAAA,GAAA,wCAAU,EAAE;QAChC,WAAW,CAAC;YACV,IAAI,iBACF;gBAAA,IAAI,EAAE,GAAG,KAAK,YAAY,EAAE,GAAG,KAAK,WAAW,EAAE,GAAG,KAAK,OAAO,EAAE,GAAG,KAAK,OAAO;oBAC/E,EAAE,cAAc;oBAChB,UAAU;gBACZ;YAAA,OACK;gBACL,gHAAgH;gBAChH,EAAE,mBAAmB;gBAErB,IAAI,EAAE,GAAG,KAAK,SACZ,YAAY;YAEhB;QACF;IACF;IAEA,IAAI,cAAc,CAAA,GAAA,oCAAa,EAAE,CAAC;QAChC,IAAI,CAAC,cAAc,OAAO,EAAE;YAC1B,SAAS,OAAO,GAAG,MAAM,oBAAoB,CAAC,KAAK,GAAG,EAAE,MAAM,cAAc,CAAC,KAAK,GAAG;YACrF,MAAM,WAAW,CAAC,KAAK,GAAG;YAC1B,MAAM,UAAU,CAAC,6BAA6B,CAAC;YAC/C,0BAAA,oCAAA,cAAgB,SAAS,OAAO;QAClC;QACA,cAAc,OAAO,GAAG;IAC1B;IAEA,IAAI,SAAS,CAAA,GAAA,oCAAa,EAAE,CAAC,MAAM;QACjC,IAAI,QAAQ,MAAM,oBAAoB,CAAC,KAAK,GAAG,EAAE;QACjD,qBAAA,+BAAA,SAAW;QACX,SAAS,OAAO,GAAG;IACrB;IAEA,IAAI,YAAY,CAAA,GAAA,oCAAa,EAAE,CAAC;QAC9B,IAAI,cAAc,OAAO,EAAE;YACzB,IAAI,SAAS,OAAO,IAAI,MACtB,SAAS,OAAO,GAAG,MAAM,oBAAoB,CAAC,KAAK,GAAG,EAAE,MAAM,cAAc,CAAC,KAAK,GAAG;YAGvF,MAAM,SAAS;YACf,MAAM,UAAU,CAAC,6BAA6B,CAAC;YAC/C,wBAAA,kCAAA,YAAc,SAAS,OAAO;YAC9B,cAAc,OAAO,GAAG;YAExB,IAAI,CAAA,uBAAA,iCAAA,WAAY,OAAO,KAAI,CAAC,wBAAwB,OAAO,EACzD,uGAAuG;YACvG,CAAA,GAAA,wCAAU,EAAE,WAAW,OAAO;QAElC;QACA,SAAS,OAAO,GAAG;IACrB;IAEA,MAAM,uBAAuB,CAAA,GAAA,mBAAK,EAAU;IAC5C,MAAM,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,oCAAM,EAAE;QAC1B;YACE,qBAAqB,OAAO,GAAG,MAAM,cAAc,CAAC,KAAK,GAAG;YAC5D,YAAY;QACd;QACA,QAAO,CAAC;YACN,IAAI,UAAC,MAAM,UAAE,MAAM,eAAE,WAAW,EAAC,GAAG;YACpC,IAAI,cAAc,OAChB,UAAU;YAEZ,IAAI,gBAAgB,YAAY;gBAC9B,IAAI,WAAW,KAAK,WAAW,GAC7B,SAAS,SAAS;gBAEpB,UAAU;YACZ;YACA,4CAA4C;YAC5C,IAAI,WAAW,GAAG;gBAChB,qBAAqB,OAAO,IAAI;gBAChC,OAAO,MAAM,qBAAqB,OAAO;YAC3C;QACF;QACA,WAAU,CAAC;YACT,IAAI,eAAC,WAAW,EAAC,GAAG;YACpB,qBAAqB,OAAO,GAAG;YAC/B,IAAI,gBAAgB,WAAY,gBAAgB,WAAW,wBAAwB,OAAO,EACxF,UAAU;QAEd;IACF;IAEA,IAAI,YAAY,CAAA,GAAA,wBAAU,EAAE,CAAC;YAEzB;QADF,IAAI,kBACF,uBAAA,UAAU,SAAS,cAAnB,2CAAA,0BAAA,WAAsB;IAE1B,GAAG;QAAC;QAAiB;KAAU;IAG/B,IAAI,MAAM,KAAK,KAAK,CAAC,MAAM,iBAAiB,CAAC,KAAK,GAAG;IACrD,IAAI,MAAM,KAAK,KAAK,CAAC,MAAM,iBAAiB,CAAC,KAAK,GAAG;IACrD,IAAI,QAAQ,UACV,MAAM,OAAO,gBAAgB;IAE/B,IAAI,QAAQ,KAAK,KAAK,CAAC,MAAM,cAAc,CAAC,KAAK,GAAG;IACpD,IAAI,WAA0B,CAAA,GAAA,mDAAqB;IACnD,IAAI,aAAa,aAAe,OAAO,WAAW,eAAe,kBAAkB,QACjF,WAAW;IAEb,IAAI,cAAc,CAAA,uBAAA,iCAAA,WAAY,OAAO,KAAI,QAAS,CAAA,aAAa,cAAc,aAAa,SAAQ,KAAM,CAAC,aAAa,gBAAgB,MAAM,CAAC,wBAAwB;IACrK,IAAI,mBAAmB,CAAA,GAAA,oCAAa,EAAE;IACtC,IAAI,YAAY;QACd,cAAc;QACd,oBAAoB;QACpB,mBAAmB,GAAG,GAAG,CAAC,EAAE,CAAA,GAAA,2CAAgB,EAAE,MAAM,UAAU,EAAE,KAAK,GAAG,GAAG;QAC3E,kBAAkB,gBAAgB,MAAM,CAAC,cAAc;mBAAC;QAAK;QAC7D,QAAQ;aACR;aACA;eACA;QACA,GAAG,gBAAgB;IACrB;IAEA,MAAM,aAAa,CAAA,GAAA,wBAAU,EAAE;QAC7B,IAAI,IAAI,OAAO,EACb,CAAA,GAAA,wCAAU,EAAE,IAAI,OAAO;IAE3B,GAAG;QAAC;KAAI;IAER,IAAI,iBAAiB,MAAM,cAAc;IACzC,IAAI,qBAAqB,CAAA,GAAA,mBAAK,EAAc;IAC5C,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,mBAAmB,OAAO,KAAK,kBAAkB,kBAAkB,QAAQ,mBAAmB,KAAK,GAAG,EAAE;YAC1G,wBAAwB,OAAO,GAAG,SAAS,aAAa,KAAK,IAAI,OAAO;YACxE,YAAY;YACZ,kJAAkJ;YAClJ,IAAI,UAAU,WAAW,IAAM,cAAc;YAC7C,gEAAgE;YAChE,IAAI,YAAY,WAAW,YAAY;YACvC,OAAO;gBACL,aAAa;gBACb,aAAa;YACf;QACF;QACA,mBAAmB,OAAO,GAAG;IAC/B,GAAG;QAAC;QAAgB;QAAM;QAAY;QAAK;KAAY;IAEvD,IAAI,WAAW,CAAC;QACd,IAAI,eAAe,MAAM,cAAc,CAAC,KAAK,GAAG;QAChD,IAAI,YAAY,WAAW,EAAE,MAAM,CAAC,KAAK;QAEzC,IAAI,YAAY,cACd,YAAY,eAAe;aAE3B,YAAY,eAAe;QAE7B,OAAO,MAAM;IACf;IAEA,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,qCAAO,EAAE;QAC1B,qBAAqB;QACrB,cAAc,CAAC;YACb,IAAI,EAAE,OAAO,IAAI,EAAE,MAAM,IAAI,EAAE,OAAO,IAAI,EAAE,QAAQ,IAAI,EAAE,WAAW,KAAK,YACxE;YAEF,IAAI,EAAE,WAAW,KAAK,aAAa,MAAM,cAAc,IAAI,MAAM;gBAC/D,UAAU;gBACV;YACF;YAEA,0GAA0G;YAC1G,iCAAiC;YACjC;YAEA,gIAAgI;YAChI,kDAAkD;YAClD,IAAI,EAAE,WAAW,KAAK,WACpB,YAAY;QAEhB;QACA,SAAS,CAAC;YACR,IAAI,AAAC,CAAA,AAAC,EAAE,WAAW,KAAK,WAAW,wBAAwB,OAAO,IAAK,EAAE,WAAW,KAAK,OAAM,KAAM,MAAM,cAAc,IAAI,MAC3H,UAAU;QAEd;IACF;IACA,IAAI,uBAAC,mBAAmB,EAAC,GAAG,CAAA,GAAA,gDAAgB;IAE5C,OAAO;QACL,cAAc,CAAA,GAAA,gCAAS,EACrB,eACA;YAAC,GAAG,SAAS;uBAAE;QAAS,GACxB,YACA;YAAC,OAAO;gBAAC,aAAa;YAAM;QAAC;QAE/B,YAAY,CAAA,GAAA,gCAAS,EACnB,qBACA;gBACE;YACA,QAAQ;gBACN,UAAU;YACZ;sBACA;YACA,UAAU;QACZ,GACA;oBAEF;IACF;AACF","sources":["packages/@react-aria/table/src/useTableColumnResize.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 Line truncated
@@ -0,0 +1,48 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/chevron-right.tsx
var chevron_right_exports = {};
__export(chevron_right_exports, {
ChevronRightIcon: () => ChevronRightIcon
});
module.exports = __toCommonJS(chevron_right_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var ChevronRightIcon = (props) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
fill: "none",
focusable: "false",
height: "1em",
role: "presentation",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m9 18 6-6-6-6" })
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
ChevronRightIcon
});
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more