docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s

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 @@
{"name":"strip-json-comments","version":"2.0.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532102182,"integrity":"sha512-FB20xJDE2pqKfaswo9d/RGeftTA2Z6SAkTtYO98UexEzNVs/WjYqVSmRCf6gdeVyO31+if/AuvIlSvAlsNeczQ==","mode":420,"size":749},"index.js":{"checkedAt":1794532102182,"integrity":"sha512-eGq4bURLplcChHX+jbnkeyx4dpztyomoDn7tJkTo6pp+cbgbG+aSE/a3YTBxGJAaCB3ot5wOpx9yXkwHfSTiEA==","mode":420,"size":1700},"license":{"checkedAt":1794532102182,"integrity":"sha512-rnnnpCCaRRrva3j3sLiBcOeiIzUSasNFUiv06v4IGNpYZarhUHxdwCJO+FRUjHId+ahDcYIvNtUMvNl/qUbu6Q==","mode":420,"size":1119},"readme.md":{"checkedAt":1794532102182,"integrity":"sha512-R8GmjRZ6F3kXbs3wP7sTyScNUqRY7y8MHorysiUFZAkyu+As1Alc8mBV/rJ3qJ9yJ45O/DjEL97GPG05kBqJcQ==","mode":420,"size":1493}}}
@@ -0,0 +1,12 @@
declare function swapColorValues<T extends Object>(colors: T): {};
declare function removeDefaultKeys<T extends Object>(obj: T): {};
/**
*
* Flatten theme object and remove default keys
*
* @param obj theme object
* @returns object with flattened keys
*/
declare const flattenThemeObject: <TTarget>(obj: TTarget) => {};
export { flattenThemeObject, removeDefaultKeys, swapColorValues };
@@ -0,0 +1,81 @@
{
"name": "color2k",
"version": "2.0.3",
"description": "a color parsing and manipulation lib served in roughly 2kB",
"repository": {
"type": "git",
"url": "https://github.com/ricokahler/color2k.git"
},
"license": "MIT",
"author": {
"name": "Rico Kahler",
"email": "ricokahler@me.com",
"url": "https://github.com/ricokahler"
},
"keywords": [
"color",
"css-in-js",
"tinycolor",
"color-parser",
"color-manipulation",
"polished",
"chroma-js"
],
"sideEffects": false,
"main": "./dist/index.main.cjs.js",
"unpkg": "./dist/index.unpkg.umd.js",
"jsdelivr": "./dist/index.unpkg.umd.js",
"module": "./dist/index.module.es.js",
"types": "./dist/index.d.ts",
"exports": {
".": [
{
"types": "./dist/index.d.ts",
"import": "./dist/index.exports.import.es.mjs",
"default": "./dist/index.exports.require.cjs.js"
},
"./dist/index.exports.require.cjs.js"
],
"./package.json": "./package.json"
},
"scripts": {
"build": "./scripts/build",
"lint": "eslint src --ext .ts,.tsx,.js,.jsx",
"prepare": "npm run build",
"test": "jest",
"website": "node ./scripts/website.js"
},
"devDependencies": {
"@babel/core": "7.22.11",
"@babel/node": "7.22.10",
"@babel/preset-env": "7.22.14",
"@babel/preset-react": "7.22.5",
"@babel/preset-typescript": "7.22.11",
"@babel/register": "7.22.5",
"@rollup/plugin-alias": "4.0.4",
"@rollup/plugin-babel": "6.0.4",
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-terser": "0.4.4",
"@sanity/eslint-config-studio": "2.0.4",
"@types/jest": "29.5.10",
"@types/react": "18.2.21",
"@types/react-dom": "18.2.7",
"@types/showdown": "2.0.6",
"autoprefixer": "10.4.16",
"@babel/eslint-parser": "7.22.11",
"babel-plugin-module-resolver": "5.0.0",
"cssnano": "5.1.15",
"eslint": "8.54.0",
"jest": "29.7.0",
"postcss": "8.4.31",
"preact": "10.19.2",
"preact-render-to-string": "5.2.6",
"prettier": "2.8.8",
"react": "18.2.0",
"react-dom": "18.2.0",
"rollup": "3.29.4",
"semantic-release": "19.0.5",
"showdown": "2.1.0",
"typescript": "4.9.5"
}
}
@@ -0,0 +1 @@
exports._default = require("./use-isomorphic-layout-effect.browser.cjs.js").default;
@@ -0,0 +1 @@
{"name":"internal-slot","version":"1.1.0","requiresBuild":false,"files":{".editorconfig":{"checkedAt":1794532097055,"integrity":"sha512-gD3iQtgC7ZgFS97pyZqR0FPjMNyRAfat8dipbSL28iiJ6B1MP5dDeDYeEnP5sYMTz8whQIk3E5vltk2kcyJJEQ==","mode":420,"size":286},".eslintrc":{"checkedAt":1794532097055,"integrity":"sha512-gJl0mITb/CWBq/npzC0EmBktZYntD1JGIPgrKMKPNIyCgCzjLl+gsLv9wE+zE2Eo2lBX2QE+W5jcXGQfcZmqXw==","mode":420,"size":171},".nycrc":{"checkedAt":1794532097055,"integrity":"sha512-2vm1RFz8Ajl/OYrfoCWPJIm3Bpnf7Gyn5bha/lZx/cq+We3uMy9xj15XeP6x4wF3jf/pO7KMHAkU9mllm605xg==","mode":420,"size":139},"LICENSE":{"checkedAt":1794532089199,"integrity":"sha512-d2fjYr50p8QKjqC0qhH5nWv3sgAsKHHicw91kVzLPCZ54cpPIRw8zJk+nn45Y6q/yJ/T/xdxK77zBLuAvFgmVg==","mode":420,"size":1071},"index.js":{"checkedAt":1794532097055,"integrity":"sha512-LhjXUF30+jBnOOmTaAP99vENuDsbGWVVsBR8k7djXRHitqGmuIg0d7GmA2bYOe3AL9uxmt3pJtCXjQV/VB7wiA==","mode":420,"size":2042},"test/index.js":{"checkedAt":1794532097055,"integrity":"sha512-OD6v9nw0nzr5SThXbZxrWpWci9JTnxl4tEhzNamW/MX428Hh7NRWTGmZb/oEa/xy5xnnsnnEgGdDE9WeV3htsQ==","mode":420,"size":3221},".attw.json":{"checkedAt":1794532097056,"integrity":"sha512-6Ma9fMCTsOIsNSaZxoiGPeqq9T7nqFUscEeAcMb1Gq2GAflXjnWGTDEvWcj+A0KWnAUb+f5D15/7peD51HzZmw==","mode":420,"size":43},"package.json":{"checkedAt":1794532097056,"integrity":"sha512-L33sJEm63OhCZsBGTQThieACE5HQh89ATy5QL8A3AHjFom5+QCUYnJwnbX7HB2cmrRdJk5nXIQV28kA9fVkktw==","mode":420,"size":2036},"tsconfig.json":{"checkedAt":1794532089361,"integrity":"sha512-7JUI6f+Uo7d5m7hRnFHTwvIq4b3fu8OVANjUmh2Vgklh8YVT+z+8++cBMFqiaB6XR0NsioNs+wCDn7qKiSAmww==","mode":420,"size":118},"CHANGELOG.md":{"checkedAt":1794532097056,"integrity":"sha512-B1ZxP0/56FFKlPP9jvt00fpVZNNt/n8FV0TGHzGibTiolyeqsm9GhikgRmdZHPUlLFk2wLx+Z2AEwkut03Lgvg==","mode":420,"size":10598},"README.md":{"checkedAt":1794532097056,"integrity":"sha512-iouQD79fc1Zrw76XbNxiC5jaqQQAkQc667lDlUo5VN5MyIoqgHF9VCUvOrci+PDEeHFKIvxzsDR19Ni188tC4A==","mode":420,"size":2343},"index.d.ts":{"checkedAt":1794532097056,"integrity":"sha512-oDSTHeAc2X85KS7zEkO3qzmJTYK3sXB0XI/Q0oRu2BTay5+ZIidTVTFDDCAMoIWJwkHoJt6rQXTAlLvzUQ5GAw==","mode":420,"size":382},".github/FUNDING.yml":{"checkedAt":1794532097056,"integrity":"sha512-RC/bhZeerhgwAf5RcJ2uiAymBfcfb5qFSnDaOXfTmv1j48pfwOgTx8psXngpnLMgQrS2pw4+qhxIx156AD8q1Q==","mode":420,"size":559}}}
@@ -0,0 +1,59 @@
'use strict';
// var Construct = require('es-abstract/2024/Construct');
var CreateRegExpStringIterator = require('es-abstract/2024/CreateRegExpStringIterator');
var Get = require('es-abstract/2024/Get');
var Set = require('es-abstract/2024/Set');
var SpeciesConstructor = require('es-abstract/2024/SpeciesConstructor');
var ToLength = require('es-abstract/2024/ToLength');
var ToString = require('es-abstract/2024/ToString');
var Type = require('es-abstract/2024/Type');
var flagsGetter = require('regexp.prototype.flags');
var setFunctionName = require('set-function-name');
var callBound = require('call-bound');
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $indexOf = callBound('String.prototype.indexOf');
var OrigRegExp = GetIntrinsic('%RegExp%');
var supportsConstructingWithFlags = 'flags' in OrigRegExp.prototype;
var constructRegexWithFlags = function constructRegex(C, R) {
var matcher;
// workaround for older engines that lack RegExp.prototype.flags
var flags = 'flags' in R ? Get(R, 'flags') : ToString(flagsGetter(R));
if (supportsConstructingWithFlags && typeof flags === 'string') {
matcher = new C(R, flags);
} else if (C === OrigRegExp) {
// workaround for older engines that can not construct a RegExp with flags
matcher = new C(R.source, flags);
} else {
matcher = new C(R, flags);
}
return { flags: flags, matcher: matcher };
};
var regexMatchAll = setFunctionName(function SymbolMatchAll(string) {
var R = this;
if (Type(R) !== 'Object') {
throw new $TypeError('"this" value must be an Object');
}
var S = ToString(string);
var C = SpeciesConstructor(R, OrigRegExp);
var tmp = constructRegexWithFlags(C, R);
// var flags = ToString(Get(R, 'flags'));
var flags = tmp.flags;
// var matcher = Construct(C, [R, flags]);
var matcher = tmp.matcher;
var lastIndex = ToLength(Get(R, 'lastIndex'));
Set(matcher, 'lastIndex', lastIndex, true);
var global = $indexOf(flags, 'g') > -1;
var fullUnicode = $indexOf(flags, 'u') > -1;
return CreateRegExpStringIterator(matcher, S, global, fullUnicode);
}, '[Symbol.matchAll]', true);
module.exports = regexMatchAll;
@@ -0,0 +1,16 @@
import { PacketHighwayContext } from '../../packet/highway/highwayContext';
import { NapCatCore } from '../../index';
import { PacketLogger } from '../../packet/context/loggerContext';
import { NapCoreContext } from '../../packet/context/napCoreContext';
import { PacketClientContext } from '../../packet/context/clientContext';
import { PacketOperationContext } from '../../packet/context/operationContext';
import { PacketMsgConverter } from '../../packet/message/converter';
export declare class PacketContext {
readonly msgConverter: PacketMsgConverter;
readonly napcore: NapCoreContext;
readonly logger: PacketLogger;
readonly client: PacketClientContext;
readonly highway: PacketHighwayContext;
readonly operation: PacketOperationContext;
constructor(core: NapCatCore);
}
@@ -0,0 +1,21 @@
import type { TSESTree } from '@typescript-eslint/utils';
import type { InferMessageIdsTypeFromRule, InferOptionsTypeFromRule } from '../util';
declare const baseRule: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useBrackets" | "useDot", [{
allowIndexSignaturePropertyAccess?: boolean;
allowKeywords?: boolean;
allowPattern?: string;
allowPrivateClassPropertyAccess?: boolean;
allowProtectedClassPropertyAccess?: boolean;
}], unknown, {
MemberExpression(node: TSESTree.MemberExpression): void;
}>;
export type Options = InferOptionsTypeFromRule<typeof baseRule>;
export type MessageIds = InferMessageIdsTypeFromRule<typeof baseRule>;
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"useBrackets" | "useDot", [{
allowIndexSignaturePropertyAccess?: boolean;
allowKeywords?: boolean;
allowPattern?: string;
allowPrivateClassPropertyAccess?: boolean;
allowProtectedClassPropertyAccess?: boolean;
}], import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,QAAQ,CAAC;AAC7C","sources":["packages/@react-aria/breadcrumbs/intl/sl-SI.json"],"sourcesContent":["{\n \"breadcrumbs\": \"Drobtine\"\n}\n"],"names":[],"version":3,"file":"sl-SI.module.js.map"}
@@ -0,0 +1,6 @@
'use strict';
module.exports = {
MASK_MODE: parseInt('7777', 8),
DEFAULT_FILE_MODE: parseInt('0666', 8),
};
@@ -0,0 +1,49 @@
import type { ChildNode, ParentNode } from "domhandler";
/**
* Remove an element from the dom
*
* @category Manipulation
* @param elem The element to be removed
*/
export declare function removeElement(elem: ChildNode): void;
/**
* Replace an element in the dom
*
* @category Manipulation
* @param elem The element to be replaced
* @param replacement The element to be added
*/
export declare function replaceElement(elem: ChildNode, replacement: ChildNode): void;
/**
* Append a child to an element.
*
* @category Manipulation
* @param parent The element to append to.
* @param child The element to be added as a child.
*/
export declare function appendChild(parent: ParentNode, child: ChildNode): void;
/**
* Append an element after another.
*
* @category Manipulation
* @param elem The element to append after.
* @param next The element be added.
*/
export declare function append(elem: ChildNode, next: ChildNode): void;
/**
* Prepend a child to an element.
*
* @category Manipulation
* @param parent The element to prepend before.
* @param child The element to be added as a child.
*/
export declare function prependChild(parent: ParentNode, child: ChildNode): void;
/**
* Prepend an element before another.
*
* @category Manipulation
* @param elem The element to prepend before.
* @param prev The element be added.
*/
export declare function prepend(elem: ChildNode, prev: ChildNode): void;
//# sourceMappingURL=manipulation.d.ts.map
@@ -0,0 +1 @@
export { NullifiedContextProvider } from './NullifiedContextProvider';
@@ -0,0 +1,27 @@
var baseIsRegExp = require('./_baseIsRegExp'),
baseUnary = require('./_baseUnary'),
nodeUtil = require('./_nodeUtil');
/* Node.js helper references. */
var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
/**
* Checks if `value` is classified as a `RegExp` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
* @example
*
* _.isRegExp(/abc/);
* // => true
*
* _.isRegExp('/abc/');
* // => false
*/
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
module.exports = isRegExp;
@@ -0,0 +1,8 @@
"use strict";
function _class_apply_descriptor_get(receiver, descriptor) {
if (descriptor.get) return descriptor.get.call(receiver);
return descriptor.value;
}
exports._ = _class_apply_descriptor_get;
@@ -0,0 +1,40 @@
import assignValue from './_assignValue.js';
import baseAssignValue from './_baseAssignValue.js';
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: undefined;
if (newValue === undefined) {
newValue = source[key];
}
if (isNew) {
baseAssignValue(object, key, newValue);
} else {
assignValue(object, key, newValue);
}
}
return object;
}
export default copyObject;
@@ -0,0 +1,18 @@
Copyright 2014–present Olivier Lalonde <olalonde@gmail.com>, James Talmage <james@talmage.io>, Ruben Verborgh
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,140 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*
* Based on the Base 64 VLQ implementation in Closure Compiler:
* https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
*
* Copyright 2011 The Closure Compiler Authors. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var base64 = require('./base64');
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
// the next four bits are the actual value, and the 6th bit is the
// continuation bit. The continuation bit tells us whether there are more
// digits in this value following this digit.
//
// Continuation
// | Sign
// | |
// V V
// 101011
var VLQ_BASE_SHIFT = 5;
// binary: 100000
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
// binary: 011111
var VLQ_BASE_MASK = VLQ_BASE - 1;
// binary: 100000
var VLQ_CONTINUATION_BIT = VLQ_BASE;
/**
* Converts from a two-complement value to a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
* 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
*/
function toVLQSigned(aValue) {
return aValue < 0
? ((-aValue) << 1) + 1
: (aValue << 1) + 0;
}
/**
* Converts to a two-complement value from a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
* 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
*/
function fromVLQSigned(aValue) {
var isNegative = (aValue & 1) === 1;
var shifted = aValue >> 1;
return isNegative
? -shifted
: shifted;
}
/**
* Returns the base 64 VLQ encoded value.
*/
exports.encode = function base64VLQ_encode(aValue) {
var encoded = "";
var digit;
var vlq = toVLQSigned(aValue);
do {
digit = vlq & VLQ_BASE_MASK;
vlq >>>= VLQ_BASE_SHIFT;
if (vlq > 0) {
// There are still more digits in this value, so we must make sure the
// continuation bit is marked.
digit |= VLQ_CONTINUATION_BIT;
}
encoded += base64.encode(digit);
} while (vlq > 0);
return encoded;
};
/**
* Decodes the next base 64 VLQ value from the given string and returns the
* value and the rest of the string via the out parameter.
*/
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
var strLen = aStr.length;
var result = 0;
var shift = 0;
var continuation, digit;
do {
if (aIndex >= strLen) {
throw new Error("Expected more digits in base 64 VLQ value.");
}
digit = base64.decode(aStr.charCodeAt(aIndex++));
if (digit === -1) {
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
}
continuation = !!(digit & VLQ_CONTINUATION_BIT);
digit &= VLQ_BASE_MASK;
result = result + (digit << shift);
shift += VLQ_BASE_SHIFT;
} while (continuation);
aOutParam.value = fromVLQSigned(result);
aOutParam.rest = aIndex;
};
@@ -0,0 +1,42 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
function checkErrors(a: z.ZodTypeAny, bad: any) {
let expected: any;
try {
a.parse(bad);
} catch (error) {
expected = (error as z.ZodError).formErrors;
}
try {
a.nullable().parse(bad);
} catch (error) {
expect((error as z.ZodError).formErrors).toEqual(expected);
}
}
test("Should have error messages appropriate for the underlying type", () => {
checkErrors(z.string().min(2), 1);
z.string().min(2).nullable().parse(null);
checkErrors(z.number().gte(2), 1);
z.number().gte(2).nullable().parse(null);
checkErrors(z.boolean(), "");
z.boolean().nullable().parse(null);
checkErrors(z.null(), null);
z.null().nullable().parse(null);
checkErrors(z.null(), {});
z.null().nullable().parse(null);
checkErrors(z.object({}), 1);
z.object({}).nullable().parse(null);
checkErrors(z.tuple([]), 1);
z.tuple([]).nullable().parse(null);
checkErrors(z.unknown(), 1);
z.unknown().nullable().parse(null);
});
test("unwrap", () => {
const unwrapped = z.string().nullable().unwrap();
expect(unwrapped).toBeInstanceOf(z.ZodString);
});
@@ -0,0 +1,256 @@
import {fromAbsolute as $11d87f3f76e88657$export$1b96692a1ba042ac, toAbsolute as $11d87f3f76e88657$export$5107c82f94518f5c, toCalendar as $11d87f3f76e88657$export$b4a036af3fc0b032, toCalendarDate as $11d87f3f76e88657$export$93522d1a439f3617} from "./conversion.mjs";
import {weekStartData as $2fe286d2fb449abb$export$7a5acbd77d414bd9} from "./weekStartData.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $14e0f24ef4ac5c92$export$ea39ec197993aef0(a, b) {
b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);
return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;
}
function $14e0f24ef4ac5c92$export$a18c89cbd24170ff(a, b) {
b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);
// In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month.
a = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(a);
b = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(b);
return a.era === b.era && a.year === b.year && a.month === b.month;
}
function $14e0f24ef4ac5c92$export$5841f9eb9773f25f(a, b) {
b = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(b, a.calendar);
a = $14e0f24ef4ac5c92$export$f91e89d3d0406102(a);
b = $14e0f24ef4ac5c92$export$f91e89d3d0406102(b);
return a.era === b.era && a.year === b.year;
}
function $14e0f24ef4ac5c92$export$91b62ebf2ba703ee(a, b) {
return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day;
}
function $14e0f24ef4ac5c92$export$5a8da0c44a3afdf2(a, b) {
a = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(a);
b = $14e0f24ef4ac5c92$export$a5a3b454ada2268e(b);
return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year && a.month === b.month;
}
function $14e0f24ef4ac5c92$export$ea840f5a6dda8147(a, b) {
a = $14e0f24ef4ac5c92$export$f91e89d3d0406102(a);
b = $14e0f24ef4ac5c92$export$f91e89d3d0406102(b);
return a.calendar.identifier === b.calendar.identifier && a.era === b.era && a.year === b.year;
}
function $14e0f24ef4ac5c92$export$629b0a497aa65267(date, timeZone) {
return $14e0f24ef4ac5c92$export$ea39ec197993aef0(date, $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone));
}
function $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date, locale) {
let julian = date.calendar.toJulianDay(date);
// If julian is negative, then julian % 7 will be negative, so we adjust
// accordingly. Julian day 0 is Monday.
let dayOfWeek = Math.ceil(julian + 1 - $14e0f24ef4ac5c92$var$getWeekStart(locale)) % 7;
if (dayOfWeek < 0) dayOfWeek += 7;
return dayOfWeek;
}
function $14e0f24ef4ac5c92$export$461939dd4422153(timeZone) {
return (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(Date.now(), timeZone);
}
function $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3(timeZone) {
return (0, $11d87f3f76e88657$export$93522d1a439f3617)($14e0f24ef4ac5c92$export$461939dd4422153(timeZone));
}
function $14e0f24ef4ac5c92$export$68781ddf31c0090f(a, b) {
return a.calendar.toJulianDay(a) - b.calendar.toJulianDay(b);
}
function $14e0f24ef4ac5c92$export$c19a80a9721b80f6(a, b) {
return $14e0f24ef4ac5c92$var$timeToMs(a) - $14e0f24ef4ac5c92$var$timeToMs(b);
}
function $14e0f24ef4ac5c92$var$timeToMs(a) {
return a.hour * 3600000 + a.minute * 60000 + a.second * 1000 + a.millisecond;
}
function $14e0f24ef4ac5c92$export$126c91c941de7e(a, timeZone) {
let ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(a, timeZone);
let tomorrow = a.add({
days: 1
});
let tomorrowMs = (0, $11d87f3f76e88657$export$5107c82f94518f5c)(tomorrow, timeZone);
return (tomorrowMs - ms) / 3600000;
}
let $14e0f24ef4ac5c92$var$localTimeZone = null;
function $14e0f24ef4ac5c92$export$aa8b41735afcabd2() {
// TODO: invalidate this somehow?
if ($14e0f24ef4ac5c92$var$localTimeZone == null) $14e0f24ef4ac5c92$var$localTimeZone = new Intl.DateTimeFormat().resolvedOptions().timeZone;
return $14e0f24ef4ac5c92$var$localTimeZone;
}
function $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date) {
// Use `subtract` instead of `set` so we don't get constrained in an era.
return date.subtract({
days: date.day - 1
});
}
function $14e0f24ef4ac5c92$export$a2258d9c4118825c(date) {
return date.add({
days: date.calendar.getDaysInMonth(date) - date.day
});
}
function $14e0f24ef4ac5c92$export$f91e89d3d0406102(date) {
return $14e0f24ef4ac5c92$export$a5a3b454ada2268e(date.subtract({
months: date.month - 1
}));
}
function $14e0f24ef4ac5c92$export$8b7aa55c66d5569e(date) {
return $14e0f24ef4ac5c92$export$a2258d9c4118825c(date.add({
months: date.calendar.getMonthsInYear(date) - date.month
}));
}
function $14e0f24ef4ac5c92$export$5412ac11713b72ad(date) {
if (date.calendar.getMinimumMonthInYear) return date.calendar.getMinimumMonthInYear(date);
return 1;
}
function $14e0f24ef4ac5c92$export$b2f4953d301981d5(date) {
if (date.calendar.getMinimumDayInMonth) return date.calendar.getMinimumDayInMonth(date);
return 1;
}
function $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(date, locale) {
let dayOfWeek = $14e0f24ef4ac5c92$export$2061056d06d7cdf7(date, locale);
return date.subtract({
days: dayOfWeek
});
}
function $14e0f24ef4ac5c92$export$ef8b6d9133084f4e(date, locale) {
return $14e0f24ef4ac5c92$export$42c81a444fbfb5d4(date, locale).add({
days: 6
});
}
const $14e0f24ef4ac5c92$var$cachedRegions = new Map();
function $14e0f24ef4ac5c92$var$getRegion(locale) {
// If the Intl.Locale API is available, use it to get the region for the locale.
// @ts-ignore
if (Intl.Locale) {
// Constructing an Intl.Locale is expensive, so cache the result.
let region = $14e0f24ef4ac5c92$var$cachedRegions.get(locale);
if (!region) {
// @ts-ignore
region = new Intl.Locale(locale).maximize().region;
if (region) $14e0f24ef4ac5c92$var$cachedRegions.set(locale, region);
}
return region;
}
// If not, just try splitting the string.
// If the second part of the locale string is 'u',
// then this is a unicode extension, so ignore it.
// Otherwise, it should be the region.
let part = locale.split('-')[1];
return part === 'u' ? undefined : part;
}
function $14e0f24ef4ac5c92$var$getWeekStart(locale) {
// TODO: use Intl.Locale for this once browsers support the weekInfo property
// https://github.com/tc39/proposal-intl-locale-info
let region = $14e0f24ef4ac5c92$var$getRegion(locale);
return region ? (0, $2fe286d2fb449abb$export$7a5acbd77d414bd9)[region] || 0 : 0;
}
function $14e0f24ef4ac5c92$export$ccc1b2479e7dd654(date, locale) {
let days = date.calendar.getDaysInMonth(date);
return Math.ceil(($14e0f24ef4ac5c92$export$2061056d06d7cdf7($14e0f24ef4ac5c92$export$a5a3b454ada2268e(date), locale) + days) / 7);
}
function $14e0f24ef4ac5c92$export$5c333a116e949cdd(a, b) {
if (a && b) return a.compare(b) <= 0 ? a : b;
return a || b;
}
function $14e0f24ef4ac5c92$export$a75f2bff57811055(a, b) {
if (a && b) return a.compare(b) >= 0 ? a : b;
return a || b;
}
const $14e0f24ef4ac5c92$var$WEEKEND_DATA = {
AF: [
4,
5
],
AE: [
5,
6
],
BH: [
5,
6
],
DZ: [
5,
6
],
EG: [
5,
6
],
IL: [
5,
6
],
IQ: [
5,
6
],
IR: [
5,
5
],
JO: [
5,
6
],
KW: [
5,
6
],
LY: [
5,
6
],
OM: [
5,
6
],
QA: [
5,
6
],
SA: [
5,
6
],
SD: [
5,
6
],
SY: [
5,
6
],
YE: [
5,
6
]
};
function $14e0f24ef4ac5c92$export$618d60ea299da42(date, locale) {
let julian = date.calendar.toJulianDay(date);
// If julian is negative, then julian % 7 will be negative, so we adjust
// accordingly. Julian day 0 is Monday.
let dayOfWeek = Math.ceil(julian + 1) % 7;
if (dayOfWeek < 0) dayOfWeek += 7;
let region = $14e0f24ef4ac5c92$var$getRegion(locale);
// Use Intl.Locale for this once weekInfo is supported.
// https://github.com/tc39/proposal-intl-locale-info
let [start, end] = $14e0f24ef4ac5c92$var$WEEKEND_DATA[region] || [
6,
0
];
return dayOfWeek === start || dayOfWeek === end;
}
function $14e0f24ef4ac5c92$export$ee9d87258e1d19ed(date, locale) {
return !$14e0f24ef4ac5c92$export$618d60ea299da42(date, locale);
}
export {$14e0f24ef4ac5c92$export$ea39ec197993aef0 as isSameDay, $14e0f24ef4ac5c92$export$a18c89cbd24170ff as isSameMonth, $14e0f24ef4ac5c92$export$a5a3b454ada2268e as startOfMonth, $14e0f24ef4ac5c92$export$5841f9eb9773f25f as isSameYear, $14e0f24ef4ac5c92$export$f91e89d3d0406102 as startOfYear, $14e0f24ef4ac5c92$export$91b62ebf2ba703ee as isEqualDay, $14e0f24ef4ac5c92$export$5a8da0c44a3afdf2 as isEqualMonth, $14e0f24ef4ac5c92$export$ea840f5a6dda8147 as isEqualYear, $14e0f24ef4ac5c92$export$629b0a497aa65267 as isToday, $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3 as today, $14e0f24ef4ac5c92$export$2061056d06d7cdf7 as getDayOfWeek, $14e0f24ef4ac5c92$export$461939dd4422153 as now, $14e0f24ef4ac5c92$export$68781ddf31c0090f as compareDate, $14e0f24ef4ac5c92$export$c19a80a9721b80f6 as compareTime, $14e0f24ef4ac5c92$export$126c91c941de7e as getHoursInDay, $14e0f24ef4ac5c92$export$aa8b41735afcabd2 as getLocalTimeZone, $14e0f24ef4ac5c92$export$a2258d9c4118825c as endOfMonth, $14e0f24ef4ac5c92$export$8b7aa55c66d5569e as endOfYear, $14e0f24ef4ac5c92$export$5412ac11713b72ad as getMinimumMonthInYear, $14e0f24ef4ac5c92$export$b2f4953d301981d5 as getMinimumDayInMonth, $14e0f24ef4ac5c92$export$42c81a444fbfb5d4 as startOfWeek, $14e0f24ef4ac5c92$export$ef8b6d9133084f4e as endOfWeek, $14e0f24ef4ac5c92$export$ccc1b2479e7dd654 as getWeeksInMonth, $14e0f24ef4ac5c92$export$5c333a116e949cdd as minDate, $14e0f24ef4ac5c92$export$a75f2bff57811055 as maxDate, $14e0f24ef4ac5c92$export$618d60ea299da42 as isWeekend, $14e0f24ef4ac5c92$export$ee9d87258e1d19ed as isWeekday};
//# sourceMappingURL=queries.module.js.map
@@ -0,0 +1,38 @@
// Hindi [hi]
import dayjs from '../index';
var locale = {
name: 'hi',
weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),
months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'),
weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),
monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),
weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'A h:mm बजे',
LTS: 'A h:mm:ss बजे',
L: 'DD/MM/YYYY',
LL: 'D MMMM YYYY',
LLL: 'D MMMM YYYY, A h:mm बजे',
LLLL: 'dddd, D MMMM YYYY, A h:mm बजे'
},
relativeTime: {
future: '%s में',
past: '%s पहले',
s: 'कुछ ही क्षण',
m: 'एक मिनट',
mm: '%d मिनट',
h: 'एक घंटा',
hh: '%d घंटे',
d: 'एक दिन',
dd: '%d दिन',
M: 'एक महीने',
MM: '%d महीने',
y: 'एक वर्ष',
yy: '%d वर्ष'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,49 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _tslib = require("tslib");
var _react = require("react");
var _useMemoizedFn = _interopRequireDefault(require("../useMemoizedFn"));
function useMap(initialValue) {
var getInitValue = function getInitValue() {
return new Map(initialValue);
};
var _a = (0, _tslib.__read)((0, _react.useState)(getInitValue), 2),
map = _a[0],
setMap = _a[1];
var set = function set(key, entry) {
setMap(function (prev) {
var temp = new Map(prev);
temp.set(key, entry);
return temp;
});
};
var setAll = function setAll(newMap) {
setMap(new Map(newMap));
};
var remove = function remove(key) {
setMap(function (prev) {
var temp = new Map(prev);
temp["delete"](key);
return temp;
});
};
var reset = function reset() {
return setMap(getInitValue());
};
var get = function get(key) {
return map.get(key);
};
return [map, {
set: (0, _useMemoizedFn["default"])(set),
setAll: (0, _useMemoizedFn["default"])(setAll),
remove: (0, _useMemoizedFn["default"])(remove),
reset: (0, _useMemoizedFn["default"])(reset),
get: (0, _useMemoizedFn["default"])(get)
}];
}
var _default = exports["default"] = useMap;
@@ -0,0 +1,50 @@
{
"name": "merge-descriptors",
"version": "2.0.0",
"description": "Merge objects using their property descriptors",
"license": "MIT",
"repository": "sindresorhus/merge-descriptors",
"funding": "https://github.com/sponsors/sindresorhus",
"contributors": [
"Jonathan Ong <me@jongleberry.com>",
"Douglas Christopher Wilson <doug@somethingdoug.com>",
"Mike Grabowski <grabbou@gmail.com>",
"Sindre Sorhus <sindresorhus@gmail.com>"
],
"exports": {
"types": "./index.d.ts",
"default": "./index.js"
},
"main": "./index.js",
"types": "./index.d.ts",
"sideEffects": false,
"engines": {
"node": ">=18"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"merge",
"descriptors",
"object",
"property",
"properties",
"merging",
"getter",
"setter"
],
"devDependencies": {
"ava": "^5.3.1",
"xo": "^0.56.0"
},
"xo": {
"rules": {
"unicorn/prefer-module": "off"
}
}
}
@@ -0,0 +1,22 @@
import { ElementType, RefObject, ButtonHTMLAttributes, AnchorHTMLAttributes, HTMLAttributes, InputHTMLAttributes } from 'react';
import { AriaButtonProps as AriaButtonProps$1 } from '@react-types/button';
import { DOMAttributes } from '@react-types/shared';
type AriaButtonProps<T extends ElementType = "button"> = AriaButtonProps$1<T> & {
/** Whether text selection should be enabled on the pressable element. */
allowTextSelectionOnPress?: boolean;
};
interface ButtonAria<T> {
/** Props for the button element. */
buttonProps: T;
/** Whether the button is currently pressed. */
isPressed: boolean;
}
declare function useAriaButton(props: AriaButtonProps<"button">, ref: RefObject<HTMLButtonElement>): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;
declare function useAriaButton(props: AriaButtonProps<"a">, ref: RefObject<HTMLAnchorElement>): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;
declare function useAriaButton(props: AriaButtonProps<"div">, ref: RefObject<HTMLDivElement>): ButtonAria<HTMLAttributes<HTMLDivElement>>;
declare function useAriaButton(props: AriaButtonProps<"input">, ref: RefObject<HTMLInputElement>): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;
declare function useAriaButton(props: AriaButtonProps<"span">, ref: RefObject<HTMLSpanElement>): ButtonAria<HTMLAttributes<HTMLSpanElement>>;
declare function useAriaButton(props: AriaButtonProps<ElementType>, ref: RefObject<Element>): ButtonAria<DOMAttributes>;
export { AriaButtonProps, ButtonAria, useAriaButton };
@@ -0,0 +1 @@
!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_rn=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var t=e(a),u={name:"rn",weekdays:"Ku wa Mungu_Ku wa Mbere_Ku wa Kabiri_Ku wa Gatatu_Ku wa Kane_Ku wa Gatanu_Ku wa Gatandatu".split("_"),weekdaysShort:"Kngu_Kmbr_Kbri_Ktat_Kkan_Ktan_Kdat".split("_"),weekdaysMin:"K7_K1_K2_K3_K4_K5_K6".split("_"),months:"Nzero_Ruhuhuma_Ntwarante_Ndamukiza_Rusama_Ruhenshi_Mukakaro_Myandagaro_Nyakanga_Gitugutu_Munyonyo_Kigarama".split("_"),monthsShort:"Nzer_Ruhuh_Ntwar_Ndam_Rus_Ruhen_Muk_Myand_Nyak_Git_Muny_Kig".split("_"),weekStart:1,ordinal:function(a){return a},relativeTime:{future:"mu %s",past:"%s",s:"amasegonda",m:"Umunota",mm:"%d iminota",h:"isaha",hh:"%d amasaha",d:"Umunsi",dd:"%d iminsi",M:"ukwezi",MM:"%d amezi",y:"umwaka",yy:"%d imyaka"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return t.default.locale(u,null,!0),u}));
@@ -0,0 +1,231 @@
"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;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'restrict-plus-operands',
meta: {
type: 'problem',
docs: {
description: 'Require both operands of addition to be the same type and be `bigint`, `number`, or `string`',
recommended: {
recommended: true,
strict: [
{
allowAny: false,
allowBoolean: false,
allowNullish: false,
allowNumberAndString: false,
allowRegExp: false,
},
],
},
requiresTypeChecking: true,
},
messages: {
bigintAndNumber: "Numeric '+' operations must either be both bigints or both numbers. Got `{{left}}` + `{{right}}`.",
invalid: "Invalid operand for a '+' operation. Operands must each be a number or {{stringLike}}. Got `{{type}}`.",
mismatched: "Operands of '+' operations must be a number or {{stringLike}}. Got `{{left}}` + `{{right}}`.",
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
allowAny: {
type: 'boolean',
description: 'Whether to allow `any` typed values.',
},
allowBoolean: {
type: 'boolean',
description: 'Whether to allow `boolean` typed values.',
},
allowNullish: {
type: 'boolean',
description: 'Whether to allow potentially `null` or `undefined` typed values.',
},
allowNumberAndString: {
type: 'boolean',
description: 'Whether to allow `bigint`/`number` typed values and `string` typed values to be added together.',
},
allowRegExp: {
type: 'boolean',
description: 'Whether to allow `regexp` typed values.',
},
skipCompoundAssignments: {
type: 'boolean',
description: 'Whether to skip compound assignments such as `+=`.',
},
},
},
],
},
defaultOptions: [
{
allowAny: true,
allowBoolean: true,
allowNullish: true,
allowNumberAndString: true,
allowRegExp: true,
skipCompoundAssignments: false,
},
],
create(context, [{ allowAny, allowBoolean, allowNullish, allowNumberAndString, allowRegExp, skipCompoundAssignments, },]) {
const services = (0, util_1.getParserServices)(context);
const typeChecker = services.program.getTypeChecker();
const stringLikes = [
allowAny && '`any`',
allowBoolean && '`boolean`',
allowNullish && '`null`',
allowRegExp && '`RegExp`',
allowNullish && '`undefined`',
].filter((value) => typeof value === 'string');
const stringLike = stringLikes.length
? stringLikes.length === 1
? `string, allowing a string + ${stringLikes[0]}`
: `string, allowing a string + any of: ${stringLikes.join(', ')}`
: 'string';
function getTypeConstrained(node) {
return typeChecker.getBaseTypeOfLiteralType((0, util_1.getConstrainedTypeAtLocation)(services, node));
}
function checkPlusOperands(node) {
const leftType = getTypeConstrained(node.left);
const rightType = getTypeConstrained(node.right);
if (leftType === rightType &&
tsutils.isTypeFlagSet(leftType, ts.TypeFlags.BigIntLike |
ts.TypeFlags.NumberLike |
ts.TypeFlags.StringLike)) {
return;
}
let hadIndividualComplaint = false;
for (const [baseNode, baseType, otherType] of [
[node.left, leftType, rightType],
[node.right, rightType, leftType],
]) {
if (isTypeFlagSetInUnion(baseType, ts.TypeFlags.ESSymbolLike |
ts.TypeFlags.Never |
ts.TypeFlags.Unknown) ||
(!allowAny && isTypeFlagSetInUnion(baseType, ts.TypeFlags.Any)) ||
(!allowBoolean &&
isTypeFlagSetInUnion(baseType, ts.TypeFlags.BooleanLike)) ||
(!allowNullish &&
(0, util_1.isTypeFlagSet)(baseType, ts.TypeFlags.Null | ts.TypeFlags.Undefined))) {
context.report({
node: baseNode,
messageId: 'invalid',
data: {
type: typeChecker.typeToString(baseType),
stringLike,
},
});
hadIndividualComplaint = true;
continue;
}
// RegExps also contain ts.TypeFlags.Any & ts.TypeFlags.Object
for (const subBaseType of tsutils.unionConstituents(baseType)) {
const typeName = (0, util_1.getTypeName)(typeChecker, subBaseType);
if (typeName === 'RegExp'
? !allowRegExp ||
tsutils.isTypeFlagSet(otherType, ts.TypeFlags.NumberLike)
: (!allowAny && (0, util_1.isTypeAnyType)(subBaseType)) ||
isDeeplyObjectType(subBaseType)) {
context.report({
node: baseNode,
messageId: 'invalid',
data: {
type: typeChecker.typeToString(subBaseType),
stringLike,
},
});
hadIndividualComplaint = true;
continue;
}
}
}
if (hadIndividualComplaint) {
return;
}
for (const [baseType, otherType] of [
[leftType, rightType],
[rightType, leftType],
]) {
if (!allowNumberAndString &&
isTypeFlagSetInUnion(baseType, ts.TypeFlags.StringLike) &&
isTypeFlagSetInUnion(otherType, ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike)) {
return context.report({
node,
messageId: 'mismatched',
data: {
left: typeChecker.typeToString(leftType),
right: typeChecker.typeToString(rightType),
stringLike,
},
});
}
if (isTypeFlagSetInUnion(baseType, ts.TypeFlags.NumberLike) &&
isTypeFlagSetInUnion(otherType, ts.TypeFlags.BigIntLike)) {
return context.report({
node,
messageId: 'bigintAndNumber',
data: {
left: typeChecker.typeToString(leftType),
right: typeChecker.typeToString(rightType),
},
});
}
}
}
return {
"BinaryExpression[operator='+']": checkPlusOperands,
...(!skipCompoundAssignments && {
"AssignmentExpression[operator='+=']"(node) {
checkPlusOperands(node);
},
}),
};
},
});
function isDeeplyObjectType(type) {
return type.isIntersection()
? tsutils.intersectionConstituents(type).every(tsutils.isObjectType)
: tsutils.unionConstituents(type).every(tsutils.isObjectType);
}
function isTypeFlagSetInUnion(type, flag) {
return tsutils
.unionConstituents(type)
.some(subType => tsutils.isTypeFlagSet(subType, flag));
}
@@ -0,0 +1,9 @@
"use client";
import {
CardProvider,
useCardContext
} from "./chunk-XHGGCEVJ.mjs";
export {
CardProvider,
useCardContext
};
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;AAOD,SAAS,0BAAO,KAAkB;IAChC,OAAO;AACT;AAEA,0BAAI,iBAAiB,GAAG,UAAU,kBAAqB,KAAkB,EAAE,OAAoC;IAC7G,IAAI,YAAC,QAAQ,aAAE,SAAS,uBAAE,mBAAmB,EAAC,GAAG;IAEjD,MAAM;QACJ,MAAM;QACN,OAAO;mBACP;QACA,cAAc,KAAK,CAAC,aAAa;QACjC,eAAe;QACf,CAAC;YACC,sBAAsB;YACtB,IAAI,QAAQ,eAAe,EACzB,MAAM;gBACJ,MAAM;gBACN,KAAK;gBACL,OAAO;oBACL,kBAAkB;gBACpB;YACF;YAGF,IAAI,QAAQ,uBAAuB,IAAI,QAAQ,aAAa,KAAK,QAC/D,MAAM;gBACJ,MAAM;gBACN,KAAK;gBACL,OAAO;oBACL,iBAAiB;gBACnB;YACF;YAGF,IAAI,OAAO,aAAa,YAAY;gBAClC,KAAK,IAAI,UAAU,QAAQ,OAAO,CAChC,MAAM;oBACJ,MAAM;oBACN,SAAS,SAAS,OAAO,GAAG;oBAC5B,KAAK,OAAO,GAAG,CAAC,yDAAyD;gBAC3E;gBAGF,IAAI,qBACF,KAAK,IAAI,SAAS,oBAChB,kKAAkK;gBAClK,iIAAiI;gBACjI,MAAM;oBACJ,MAAM;oBACN,OAAO;gBACT;YAGN,OAAO;gBACL,IAAI,QAA0B,EAAE;gBAChC,IAAI,YAA8B,EAAE;gBACpC,IAAI,cAAc;gBAClB,CAAA,GAAA,sCAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAA;oBAC/B,IAAI,KAAK,IAAI,KAAK,2BAAK;wBACrB,IAAI,MAAM,MAAM,GAAG,QAAQ,OAAO,CAAC,MAAM,EACvC,MAAM,IAAI,MAAM;wBAGlB,UAAU,IAAI,CAAC;4BACb,MAAM;4BACN,SAAS;wBACX;oBACF,OAAO;wBACL,MAAM,IAAI,CAAC;4BACT,MAAM;4BACN,SAAS;wBACX;4BACe;wBAAf,eAAe,CAAA,sBAAA,KAAK,KAAK,CAAC,OAAO,cAAlB,iCAAA,sBAAsB;oBACvC;gBACF;gBAEA,IAAI,gBAAgB,QAAQ,OAAO,CAAC,MAAM,EACxC,MAAM,IAAI,MAAM,CAAC,0CAA0C,EAAE,YAAY,WAAW,EAAE,QAAQ,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC;gBAGzH,OAAO;gBACP,OAAO;YACT;QACF;QACA,kBAAiB,UAAuC;YACtD,8CAA8C;YAC9C,OAAO,WAAW,OAAO,CAAC,MAAM,KAAK,QAAQ,OAAO,CAAC,MAAM,IACzD,WAAW,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAM,EAAE,GAAG,KAAK,QAAQ,OAAO,CAAC,EAAE,CAAC,GAAG,KAClE,WAAW,uBAAuB,KAAK,QAAQ,uBAAuB,IACtE,WAAW,eAAe,KAAK,QAAQ,eAAe,IACtD,WAAW,aAAa,KAAK,QAAQ,aAAa;QACtD;IACF;AACF;AAEA;;;;CAIC,GACD,oEAAoE;AACpE,IAAI,4CAAO","sources":["packages/@react-stately/table/src/Row.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {CollectionBuilderContext} from './useTableState';\nimport {PartialNode} from '@react-stately/collections';\nimport React, {JSX, ReactElement} from 'react';\nimport {RowProps} from '@react-types/table';\n\nfunction Row<T>(props: RowProps<T>): ReactElement | null { // eslint-disable-line @typescript-eslint/no-unused-vars\n return null;\n}\n\nRow.getCollectionNode = function* getCollectionNode<T>(props: RowProps<T>, context: CollectionBuilderContext<T>): Generator<PartialNode<T>> {\n let {children, textValue, UNSTABLE_childItems} = props;\n\n yield {\n type: 'item',\n props: props,\n textValue,\n 'aria-label': props['aria-label'],\n hasChildNodes: true,\n *childNodes() {\n // Process cells first\n if (context.showDragButtons) {\n yield {\n type: 'cell',\n key: 'header-drag', // this is combined with the row key by CollectionBuilder\n props: {\n isDragButtonCell: true\n }\n };\n }\n\n if (context.showSelectionCheckboxes && context.selectionMode !== 'none') {\n yield {\n type: 'cell',\n key: 'header', // this is combined with the row key by CollectionBuilder\n props: {\n isSelectionCell: true\n }\n };\n }\n\n if (typeof children === 'function') {\n for (let column of context.columns) {\n yield {\n type: 'cell',\n element: children(column.key),\n key: column.key // this is combined with the row key by CollectionBuilder\n };\n }\n\n if (UNSTABLE_childItems) {\n for (let child of UNSTABLE_childItems) {\n // Note: in order to reuse the render function of TableBody for our child rows, we just need to yield a type and a value here. CollectionBuilder will then look up\n // the parent renderer and use that to build the full node of this child row, using the value provided here to generate the cells\n yield {\n type: 'item',\n value: child\n };\n }\n }\n } else {\n let cells: PartialNode<T>[] = [];\n let childRows: PartialNode<T>[] = [];\n let columnCount = 0;\n React.Children.forEach(children, node => {\n if (node.type === Row) {\n if (cells.length < context.columns.length) {\n throw new Error('All of a Row\\'s child Cells must be positioned before any child Rows.');\n }\n\n childRows.push({\n type: 'item',\n element: node\n });\n } elseLine truncated
@@ -0,0 +1,94 @@
'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = require('es-errors/type');
var $Uint8Array = GetIntrinsic('%Uint8Array%', true);
var isInteger = require('math-intrinsics/isInteger');
var callBound = require('call-bound');
var $slice = callBound('Array.prototype.slice');
var IsDetachedBuffer = require('./IsDetachedBuffer');
var RawBytesToNumber = require('./RawBytesToNumber');
var isArrayBuffer = require('is-array-buffer');
var isSharedArrayBuffer = require('is-shared-array-buffer');
var safeConcat = require('safe-array-concat');
var tableTAO = require('./tables/typed-array-objects');
var defaultEndianness = require('../helpers/defaultEndianness');
// https://262.ecma-international.org/10.0/#sec-getvaluefrombuffer
module.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) {
var isSAB = isSharedArrayBuffer(arrayBuffer);
if (!isArrayBuffer(arrayBuffer) && !isSAB) {
throw new $TypeError('Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer');
}
if (!isInteger(byteIndex)) {
throw new $TypeError('Assertion failed: `byteIndex` must be an integer');
}
if (typeof type !== 'string') {
throw new $TypeError('Assertion failed: `type` must be a string');
}
if (typeof isTypedArray !== 'boolean') {
throw new $TypeError('Assertion failed: `isTypedArray` must be a boolean');
}
if (typeof order !== 'string') {
throw new $TypeError('Assertion failed: `order` must be a string');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean') {
throw new $TypeError('Assertion failed: `isLittleEndian` must be a boolean, if present');
}
if (IsDetachedBuffer(arrayBuffer)) {
throw new $TypeError('Assertion failed: `arrayBuffer` is detached'); // step 1
}
// 2. Assert: There are sufficient bytes in arrayBuffer starting at byteIndex to represent a value of type.
if (byteIndex < 0) {
throw new $TypeError('Assertion failed: `byteIndex` must be non-negative'); // step 3
}
// 4. Let block be arrayBuffer.[[ArrayBufferData]].
var elementSize = tableTAO.size['$' + type]; // step 5
if (!elementSize) {
throw new $TypeError('Assertion failed: `type` must be one of ' + tableTAO.choices);
}
var rawValue;
if (isSAB) { // step 6
/*
a. Let execution be the [[CandidateExecution]] field of the surrounding agent's Agent Record.
b. Let eventList be the [[EventList]] field of the element in execution.[[EventsRecords]] whose [[AgentSignifier]] is AgentSignifier().
c. If isTypedArray is true and type is "Int8", "Uint8", "Int16", "Uint16", "Int32", or "Uint32", let noTear be true; otherwise let noTear be false.
d. Let rawValue be a List of length elementSize of nondeterministically chosen byte values.
e. NOTE: In implementations, rawValue is the result of a non-atomic or atomic read instruction on the underlying hardware. The nondeterminism is a semantic prescription of the memory model to describe observable behaviour of hardware with weak consistency.
f. Let readEvent be ReadSharedMemory{ [[Order]]: order, [[NoTear]]: noTear, [[Block]]: block, [[ByteIndex]]: byteIndex, [[ElementSize]]: elementSize }.
g. Append readEvent to eventList.
h. Append Chosen Value Record { [[Event]]: readEvent, [[ChosenValue]]: rawValue } to execution.[[ChosenValues]].
*/
} else {
// 7. Let rawValue be a List of elementSize containing, in order, the elementSize sequence of bytes starting with block[byteIndex].
rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); // step 6
}
// 8. If isLittleEndian is not present, set isLittleEndian to either true or false. The choice is implementation dependent and should be the alternative that is most efficient for the implementation. An implementation must use the same value each time this step is executed and the same value must be used for the corresponding step in the SetValueInBuffer abstract operation.
var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === 'little'; // step 8
var bytes = isLittleEndian
? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize)
: $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize);
return RawBytesToNumber(type, bytes, isLittleEndian);
};
@@ -0,0 +1,17 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var TermRole = {
relatedConcepts: [{
module: 'ARIA',
concept: {
name: 'term'
}
}],
type: 'structure'
};
var _default = TermRole;
exports.default = _default;
@@ -0,0 +1 @@
{"version":3,"file":"verifyOKP.d.ts","sourceRoot":"","sources":["../../../../src/helpers/iso/isoCrypto/verifyOKP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,gBAAgB,EAAa,MAAM,eAAe,CAAC;AAKpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,wBAAsB,SAAS,CAAC,IAAI,EAAE;IACpC,aAAa,EAAE,gBAAgB,CAAC;IAChC,SAAS,EAAE,WAAW,CAAC;IACvB,IAAI,EAAE,WAAW,CAAC;CACnB,GAAG,OAAO,CAAC,OAAO,CAAC,CAyDnB"}
@@ -0,0 +1,84 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _types = require('../parser/tokenizer/types');
var _getImportExportSpecifierInfo = require('./getImportExportSpecifierInfo'); var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
/**
* Special case code to scan for imported names in ESM TypeScript. We need to do this so we can
* properly get globals so we can compute shadowed globals.
*
* This is similar to logic in CJSImportProcessor, but trimmed down to avoid logic with CJS
* replacement and flow type imports.
*/
function getTSImportedNames(tokens) {
const importedNames = new Set();
for (let i = 0; i < tokens.tokens.length; i++) {
if (
tokens.matches1AtIndex(i, _types.TokenType._import) &&
!tokens.matches3AtIndex(i, _types.TokenType._import, _types.TokenType.name, _types.TokenType.eq)
) {
collectNamesForImport(tokens, i, importedNames);
}
}
return importedNames;
} exports.default = getTSImportedNames;
function collectNamesForImport(
tokens,
index,
importedNames,
) {
index++;
if (tokens.matches1AtIndex(index, _types.TokenType.parenL)) {
// Dynamic import, so nothing to do
return;
}
if (tokens.matches1AtIndex(index, _types.TokenType.name)) {
importedNames.add(tokens.identifierNameAtIndex(index));
index++;
if (tokens.matches1AtIndex(index, _types.TokenType.comma)) {
index++;
}
}
if (tokens.matches1AtIndex(index, _types.TokenType.star)) {
// * as
index += 2;
importedNames.add(tokens.identifierNameAtIndex(index));
index++;
}
if (tokens.matches1AtIndex(index, _types.TokenType.braceL)) {
index++;
collectNamesForNamedImport(tokens, index, importedNames);
}
}
function collectNamesForNamedImport(
tokens,
index,
importedNames,
) {
while (true) {
if (tokens.matches1AtIndex(index, _types.TokenType.braceR)) {
return;
}
const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, tokens, index);
index = specifierInfo.endIndex;
if (!specifierInfo.isType) {
importedNames.add(specifierInfo.rightName);
}
if (tokens.matches2AtIndex(index, _types.TokenType.comma, _types.TokenType.braceR)) {
return;
} else if (tokens.matches1AtIndex(index, _types.TokenType.braceR)) {
return;
} else if (tokens.matches1AtIndex(index, _types.TokenType.comma)) {
index++;
} else {
throw new Error(`Unexpected token: ${JSON.stringify(tokens.tokens[index])}`);
}
}
}
@@ -0,0 +1,48 @@
"use client";
import { wrap } from 'motion-utils';
import { useRef, useState, useCallback } from 'react';
/**
* Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.
*
* An index value can be passed to the returned `cycle` function to cycle to a specific index.
*
* ```jsx
* import * as React from "react"
* import { motion, useCycle } from "framer-motion"
*
* export const MyComponent = () => {
* const [x, cycleX] = useCycle(0, 50, 100)
*
* return (
* <motion.div
* animate={{ x: x }}
* onTap={() => cycleX()}
* />
* )
* }
* ```
*
* @param items - items to cycle through
* @returns [currentState, cycleState]
*
* @public
*/
function useCycle(...items) {
const index = useRef(0);
const [item, setItem] = useState(items[index.current]);
const runCycle = useCallback((next) => {
index.current =
typeof next !== "number"
? wrap(0, items.length, index.current + 1)
: next;
setItem(items[index.current]);
},
// The array will change on each call, but by putting items.length at
// the front of this array, we guarantee the dependency comparison will match up
// eslint-disable-next-line react-hooks/exhaustive-deps
[items.length, ...items]);
return [item, runCycle];
}
export { useCycle };
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2020_date: LibDefinition;
@@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [ljharb]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/is-weakref
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,86 @@
{
"name": "object.groupby",
"version": "1.0.3",
"description": "An ESnext spec-compliant `Object.groupBy` shim/polyfill/replacement that works as far down as ES3.",
"main": "index.js",
"exports": {
".": "./index.js",
"./auto": "./auto.js",
"./polyfill": "./polyfill.js",
"./implementation": "./implementation.js",
"./shim": "./shim.js",
"./package.json": "./package.json"
},
"scripts": {
"prepack": "npmignore --auto --commentLines=autogenerated",
"prepublish": "not-in-publish || npm run prepublishOnly",
"prepublishOnly": "safe-publish-latest",
"pretest": "npm run --silent lint",
"test": "npm run tests-only",
"posttest": "aud --production",
"tests-only": "nyc tape 'test/**/*.js'",
"lint": "eslint --ext=js,mjs .",
"postlint": "es-shim-api --bound && evalmd README.md",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"repository": {
"type": "git",
"url": "git+https://github.com/es-shims/Object.groupBy.git"
},
"keywords": [
"ecmascript",
"javascript",
"polyfill",
"shim",
"es-shim API",
"array",
"object",
"group",
"groupBy"
],
"author": "Jordan Harband <ljharb@gmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/es-shims/Object.groupBy/issues"
},
"homepage": "https://github.com/es-shims/Object.groupBy#readme",
"devDependencies": {
"@es-shims/api": "^2.4.2",
"@ljharb/eslint-config": "^21.1.0",
"aud": "^2.0.4",
"auto-changelog": "^2.4.0",
"es-value-fixtures": "^1.4.2",
"eslint": "=8.8.0",
"evalmd": "^0.0.19",
"for-each": "^0.3.3",
"functions-have-names": "^1.2.3",
"in-publish": "^2.0.1",
"npmignore": "^0.3.1",
"nyc": "^10.3.2",
"object-inspect": "^1.13.1",
"safe-publish-latest": "^2.0.0",
"tape": "^5.7.5"
},
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.2"
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false,
"hideCredit": true
},
"publishConfig": {
"ignore": [
".github/workflows"
]
},
"engines": {
"node": ">= 0.4"
}
}
@@ -0,0 +1,10 @@
'use strict';
var $Object = require('./');
var RequireObjectCoercible = require('./RequireObjectCoercible');
/** @type {import('./ToObject')} */
module.exports = function ToObject(value) {
RequireObjectCoercible(value);
return $Object(value);
};
@@ -0,0 +1,13 @@
import { OverlayPlacement } from './types.js';
import { Placement, PlacementAxis } from '@react-types/overlays';
declare const getTransformOrigins: (placement: OverlayPlacement) => {
originX?: number | undefined;
originY?: number | undefined;
};
declare const toReactAriaPlacement: (placement: OverlayPlacement) => Placement;
declare const toOverlayPlacement: (placement: PlacementAxis) => OverlayPlacement;
declare const getShouldUseAxisPlacement: (axisPlacement: PlacementAxis, overlayPlacement: OverlayPlacement) => boolean;
declare const getArrowPlacement: (dynamicPlacement: PlacementAxis, placement: OverlayPlacement) => string;
export { getArrowPlacement, getShouldUseAxisPlacement, getTransformOrigins, toOverlayPlacement, toReactAriaPlacement };
@@ -0,0 +1,20 @@
'use strict';
var $SyntaxError = require('es-errors/syntax');
var callBound = require('call-bound');
var $SymbolValueOf = callBound('Symbol.prototype.valueOf', true);
// https://262.ecma-international.org/9.0/#sec-thissymbolvalue
module.exports = function thisSymbolValue(value) {
if (typeof value === 'symbol') {
return value;
}
if (!$SymbolValueOf) {
throw new $SyntaxError('Symbols are not supported; thisSymbolValue requires that `value` be a Symbol or a Symbol object');
}
return $SymbolValueOf(value);
};
@@ -0,0 +1,27 @@
var baseIsDate = require('./_baseIsDate'),
baseUnary = require('./_baseUnary'),
nodeUtil = require('./_nodeUtil');
/* Node.js helper references. */
var nodeIsDate = nodeUtil && nodeUtil.isDate;
/**
* Checks if `value` is classified as a `Date` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
* @example
*
* _.isDate(new Date);
* // => true
*
* _.isDate('Mon April 23 2012');
* // => false
*/
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
module.exports = isDate;
@@ -0,0 +1,13 @@
The MIT License (MIT)
=====================
Copyright (c) 2013-2019 bl contributors
----------------------------------
*bl contributors listed at <https://github.com/rvagg/bl#contributors>*
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,12 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-configs.js" script.
*/
"use strict"
module.exports = {
extends: [
require.resolve("./no-new-in-es2023"),
require.resolve("./no-new-in-es2022"),
],
}
@@ -0,0 +1,2 @@
import type * as ts from 'typescript/lib/tsserverlibrary';
export declare function getParsedConfigFileFromTSServer(tsserver: typeof ts, defaultProject: string, throwOnFailure: boolean, tsconfigRootDir?: string): ts.ParsedCommandLine | undefined;
@@ -0,0 +1,965 @@
import type {
Parents,
PhrasingContent,
TableCell,
TableRow,
Association,
Nodes
} from 'mdast'
import type {Point} from 'unist'
/**
* Get an identifier from an association to match it to others.
*
* Associations are nodes that match to something else through an ID:
* <https://github.com/syntax-tree/mdast#association>.
*
* The `label` of an association is the string value: character escapes and
* references work, and casing is intact.
* The `identifier` is used to match one association to another:
* controversially, character escapes and references don’t work in this
* matching: `&copy;` does not match `©`, and `\+` does not match `+`.
*
* But casing is ignored (and whitespace) is trimmed and collapsed: ` A\nb`
* matches `a b`.
* So, we do prefer the label when figuring out how we’re going to serialize:
* it has whitespace, casing, and we can ignore most useless character
* escapes and all character references.
*
* @param node
* Node that includes an association.
* @returns
* ID.
*/
export type AssociationId = (node: Association) => string
/**
* Compile an unsafe pattern to a regex.
*
* @param info
* Pattern.
* @returns
* Regex.
*/
export type CompilePattern = (info: Unsafe) => RegExp
/**
* Interface of registered constructs.
*
* When working on extensions that use new constructs, extend the corresponding
* interface to register its name:
*
* ```ts
* declare module 'mdast-util-to-markdown' {
* interface ConstructNameMap {
* // Register a new construct name (value is used, key should match it).
* gfmStrikethrough: 'gfmStrikethrough'
* }
* }
* ```
*/
export interface ConstructNameMap {
/**
* Whole autolink.
*
* ```markdown
* > | <https://example.com> and <admin@example.com>
* ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^
* ```
*/
autolink: 'autolink'
/**
* Whole block quote.
*
* ```markdown
* > | > a
* ^^^
* > | b
* ^
* ```
*/
blockquote: 'blockquote'
/**
* Whole code (indented).
*
* ```markdown
* ␠␠␠␠console.log(1)
* ^^^^^^^^^^^^^^^^^^
* ```
*/
codeIndented: 'codeIndented'
/**
* Whole code (fenced).
*
* ````markdown
* > | ```js
* ^^^^^
* > | console.log(1)
* ^^^^^^^^^^^^^^
* > | ```
* ^^^
* ````
*/
codeFenced: 'codeFenced'
/**
* Code (fenced) language, when fenced with grave accents.
*
* ````markdown
* > | ```js
* ^^
* | console.log(1)
* | ```
* ````
*/
codeFencedLangGraveAccent: 'codeFencedLangGraveAccent'
/**
* Code (fenced) language, when fenced with tildes.
*
* ````markdown
* > | ~~~js
* ^^
* | console.log(1)
* | ~~~
* ````
*/
codeFencedLangTilde: 'codeFencedLangTilde'
/**
* Code (fenced) meta string, when fenced with grave accents.
*
* ````markdown
* > | ```js eval
* ^^^^
* | console.log(1)
* | ```
* ````
*/
codeFencedMetaGraveAccent: 'codeFencedMetaGraveAccent'
/**
* Code (fenced) meta string, when fenced with tildes.
*
* ````markdown
* > | ~~~js eval
* ^^^^
* | console.log(1)
* | ~~~
* ````
*/
codeFencedMetaTilde: 'codeFencedMetaTilde'
/**
* Whole definition.
*
* ```markdown
* > | [a]: b "c"
* ^^^^^^^^^^
* ```
*/
definition: 'definition'
/**
* Destination (literal) (occurs in definition, image, link).
*
* ```markdown
* > | [a]: <b> "c"
* ^^^
* > | a ![b](<c> "d") e
* ^^^
* ```
*/
destinationLiteral: 'destinationLiteral'
/**
* Destination (raw) (occurs in definition, image, link).
*
* ```markdown
* > | [a]: b "c"
* ^
* > | a ![b](c "d") e
* ^
* ```
*/
destinationRaw: 'destinationRaw'
/**
* Emphasis.
*
* ```markdown
* > | *a*
* ^^^
* ```
*/
emphasis: 'emphasis'
/**
* Whole heading (atx).
*
* ```markdown
* > | # alpha
* ^^^^^^^
* ```
*/
headingAtx: 'headingAtx'
/**
* Whole heading (setext).
*
* ```markdown
* > | alpha
* ^^^^^
* > | =====
* ^^^^^
* ```
*/
headingSetext: 'headingSetext'
/**
* Whole image.
*
* ```markdown
* > | ![a](b)
* ^^^^^^^
* > | ![c]
* ^^^^
* ```
*/
image: 'image'
/**
* Whole image reference.
*
* ```markdown
* > | ![a]
* ^^^^
* ```
*/
imageReference: 'imageReference'
/**
* Label (occurs in definitions, image reference, image, link reference,
* link).
*
* ```markdown
* > | [a]: b "c"
* ^^^
* > | a [b] c
* ^^^
* > | a ![b][c] d
* ^^^^
* > | a [b](c) d
* ^^^
* ```
*/
label: 'label'
/**
* Whole link.
*
* ```markdown
* > | [a](b)
* ^^^^^^
* > | [c]
* ^^^
* ```
*/
link: 'link'
/**
* Whole link reference.
*
* ```markdown
* > | [a]
* ^^^
* ```
*/
linkReference: 'linkReference'
/**
* List.
*
* ```markdown
* > | * a
* ^^^
* > | 1. b
* ^^^^
* ```
*/
list: 'list'
/**
* List item.
*
* ```markdown
* > | * a
* ^^^
* > | 1. b
* ^^^^
* ```
*/
listItem: 'listItem'
/**
* Paragraph.
*
* ```markdown
* > | a b
* ^^^
* > | c.
* ^^
* ```
*/
paragraph: 'paragraph'
/**
* Phrasing (occurs in headings, paragraphs, etc).
*
* ```markdown
* > | a
* ^
* ```
*/
phrasing: 'phrasing'
/**
* Reference (occurs in image, link).
*
* ```markdown
* > | [a][]
* ^^
* ```
*/
reference: 'reference'
/**
* Strong.
*
* ```markdown
* > | **a**
* ^^^^^
* ```
*/
strong: 'strong'
/**
* Title using single quotes (occurs in definition, image, link).
*
* ```markdown
* > | [a](b 'c')
* ^^^
* ```
*/
titleApostrophe: 'titleApostrophe'
/**
* Title using double quotes (occurs in definition, image, link).
*
* ```markdown
* > | [a](b "c")
* ^^^
* ```
*/
titleQuote: 'titleQuote'
}
/**
* Construct names for things generated by `mdast-util-to-markdown`.
*
* This is an enum of strings, each being a semantic label, useful to know when
* serializing whether we’re for example in a double (`"`) or single (`'`)
* quoted title.
*/
export type ConstructName = ConstructNameMap[keyof ConstructNameMap]
/**
* Serialize the children of a parent that contains flow children.
*
* These children will typically be joined by blank lines.
* What they are joined by exactly is defined by `Join` functions.
*
* @param parent
* Parent of flow nodes.
* @param info
* Info on where we are in the document we are generating.
* @returns
* Serialized children, joined by (blank) lines.
*/
export type ContainerFlow = (parent: FlowParents, info: TrackFields) => string
/**
* Serialize the children of a parent that contains phrasing children.
*
* These children will be joined flush together.
*
* @param parent
* Parent of phrasing nodes.
* @param info
* Info on where we are in the document we are generating.
* @returns
* Serialized children, joined together.
*/
export type ContainerPhrasing = (parent: PhrasingParents, info: Info) => string
/**
* Track positional info in the output.
*
* This info isn’t used yet but such functionality will allow line wrapping,
* source maps, etc.
*
* @param info
* Info on where we are in the document we are generating.
* @returns
* Tracker.
*/
export type CreateTracker = (info: TrackFields) => Tracker
/**
* Whether to encode things — with fields representing the surrounding of a
* whole.
*/
export interface EncodeSurrounding {
/**
* Whether to encode after.
*/
after: boolean
/**
* Whether to encode before.
*/
before: boolean
}
/**
* Whether to encode things — with fields representing the relationship to a
* whole.
*/
export interface EncodeSides {
/**
* Whether to encode inside.
*/
inside: boolean
/**
* Whether to encode before.
*/
outside: boolean
}
/**
* Enter something.
*
* @param name
* Label, more similar to a micromark event than an mdast node type.
* @returns
* Revert.
*/
export type Enter = (name: ConstructName) => Exit
/**
* Exit something.
*
* @returns
* Nothing.
*/
export type Exit = () => undefined
/**
* Children of flow nodes.
*/
export type FlowChildren = FlowParents extends {
children: Array<infer T>
}
? T
: never
/**
* Parents that are not phrasing,
* or similar.
*/
export type FlowParents = Exclude<
Parents,
PhrasingContent | TableCell | TableRow
>
/**
* Handle particular nodes.
*
* Each key is a node type, each value its corresponding handler.
*/
export type Handlers = Record<Nodes['type'], Handle>
/**
* Handle a particular node.
*
* @param node
* Expected mdast node.
* @param parent
* Parent of `node`.
* @param state
* Info passed around about the current state.
* @param Info
* Info on the surrounding of the node that is serialized.
* @returns
* Serialized markdown representing `node`.
*/
export type Handle = (
node: any,
parent: Parents | undefined,
state: State,
Info: Info
) => string
/**
* Pad serialized markdown.
*
* @param value
* Whole fragment of serialized markdown.
* @param map
* Map function.
* @returns
* Padded value.
*/
export type IndentLines = (value: string, map: Map) => string
/**
* Info on the surrounding of the node that is serialized.
*/
export interface Info extends SafeFields, TrackFields {}
/**
* How to join two blocks.
*
* “Blocks” are typically joined by one blank line.
* Sometimes it’s nicer to have them flush next to each other, yet other
* times they cannot occur together at all.
*
* Join functions receive two adjacent siblings and their parent and what
* they return defines how many blank lines to use between them.
*
* @param left
* First of two adjacent siblings.
* @param right
* Second of two adjacent siblings.
* @param parent
* Parent of the two siblings.
* @param state
* Info passed around about the current state.
* @returns
* How many blank lines to use between the siblings.
*
* Where `true` is as passing `1` and `false` means the nodes cannot be
* joined by a blank line, such as two adjacent block quotes or indented code
* after a list, in which case a comment will be injected to break them up:
*
* ```markdown
* > Quote 1
*
* <!---->
*
* > Quote 2
* ```
*
* > 👉 **Note**: abusing this feature will break markdown.
* > One such example is when returning `0` for two paragraphs, which will
* > result in the text running together, and in the future to be seen as
* > one paragraph.
*/
export type Join = (
left: FlowChildren,
right: FlowChildren,
parent: FlowParents,
state: State
) => boolean | number | null | undefined | void
/**
* Map function to pad a single line.
*
* @param value
* A single line of serialized markdown.
* @param line
* Line number relative to the fragment.
* @param blank
* Whether the line is considered blank in markdown.
* @returns
* Padded line.
*/
export type Map = (value: string, line: number, blank: boolean) => string
/**
* Configuration (optional).
*/
export interface Options {
/**
* Marker to use in certain cases where the primary bullet doesn’t work
* (default: `'-'` when `bullet` is `'*'`, `'*'` otherwise).
*
* Cannot be equal to `bullet`.
*/
bulletOther?: '*' | '+' | '-' | null | undefined
/**
* Marker to use for bullets of items in ordered lists (default: `'.'`).
*
* There is one case where the primary bullet for ordered items cannot be
* used:
*
* * when two ordered lists appear next to each other: `1. a\n2) b`; to
* solve
* that, `'.'` will be used when `bulletOrdered` is `')'`, and `'.'`
* otherwise
*/
bulletOrdered?: '.' | ')' | null | undefined
/**
* Marker to use for bullets of items in unordered lists (default: `'*'`).
*
* There are three cases where the primary bullet cannot be used:
*
* * when three or more list items are on their own, the last one is empty,
* and `bullet` is also a valid `rule`: `* - +`; this would turn into a
* thematic break if serialized with three primary bullets; `bulletOther`
* is used for the last item
* * when a thematic break is the first child of a list item and `bullet` is
* the same character as `rule`: `- ***`; this would turn into a single
* thematic break if serialized with primary bullets; `bulletOther` is used
* for the item
* * when two unordered lists appear next to each other: `* a\n- b`;
* `bulletOther` is used for such lists
*/
bullet?: '*' | '+' | '-' | null | undefined
/**
* Whether to add the same number of number signs (`#`) at the end of an ATX
* heading as the opening sequence (default: `false`).
*/
closeAtx?: boolean | null | undefined
/**
* Marker to use for emphasis (default: `'*'`).
*/
emphasis?: '*' | '_' | null | undefined
/**
* List of extensions to include (optional).
*
* Each `ToMarkdownExtension` is an object with the same interface as
* `Options` here.
*/
extensions?: Array<Options> | null | undefined
/**
* Whether to use fenced code always (default: `true`).
*
* The default is to use fenced code if there is a language defined, if the
* code is empty, or if it starts or ends in blank lines.
*/
fences?: boolean | null | undefined
/**
* Marker to use for fenced code (default: ``'`'``).
*/
fence?: '`' | '~' | null | undefined
/**
* Handle particular nodes (optional).
*
* Each key is a node type, each value its corresponding handler.
*/
handlers?: Partial<Handlers> | null | undefined
/**
* Whether to increment the counter of ordered lists items (default: `true`).
*/
incrementListMarker?: boolean | null | undefined
/**
* How to join blocks (optional).
*/
join?: Array<Join> | null | undefined
/**
* How to indent the content of list items (default: `'one'`).
*
* Either with the size of the bullet plus one space (when `'one'`), a tab
* stop (`'tab'`), or depending on the item and its parent list (`'mixed'`,
* uses `'one'` if the item and list are tight and `'tab'` otherwise).
*/
listItemIndent?: 'mixed' | 'one' | 'tab' | null | undefined
/**
* Marker to use for titles (default: `'"'`).
*/
quote?: '"' | "'" | null | undefined
/**
* Whether to always use resource links (default: `false`).
*
* The default is to use autolinks (`<https://example.com>`) when possible
* and resource links (`[text](url)`) otherwise.
*/
resourceLink?: boolean | null | undefined
/**
* Number of markers to use for thematic breaks (default: `3`).
*/
ruleRepetition?: number | null | undefined
/**
* Whether to add spaces between markers in thematic breaks (default:
* `false`).
*/
ruleSpaces?: boolean | null | undefined
/**
* Marker to use for thematic breaks (default: `'*'`).
*/
rule?: '*' | '-' | '_' | null | undefined
/**
* Whether to use setext headings when possible (default: `false`).
*
* The default is to always use ATX headings (`# heading`) instead of setext
* headings (`heading\n=======`).
* Setext headings cannot be used for empty headings or headings with a rank
* of three or more.
*/
setext?: boolean | null | undefined
/**
* Marker to use for strong (default: `'*'`).
*/
strong?: '*' | '_' | null | undefined
/**
* Whether to join definitions without a blank line (default: `false`).
*
* The default is to add blank lines between any flow (“block”) construct.
* Turning this option on is a shortcut for a join function like so:
*
* ```js
* function joinTightDefinitions(left, right) {
* if (left.type === 'definition' && right.type === 'definition') {
* return 0
* }
* }
* ```
*/
tightDefinitions?: boolean | null | undefined
/**
* Schemas that define when characters cannot occur (optional).
*/
unsafe?: Array<Unsafe> | null | undefined
}
/**
* Parent of phrasing nodes.
*/
export type PhrasingParents = Parents extends {
children: Array<infer T>
}
? PhrasingContent extends T
? Parents
: never
: never
/**
* Configuration for `safe`
*/
export interface SafeConfig extends SafeFields {
/**
* Extra characters that *must* be encoded (as character references) instead
* of escaped (character escapes) (optional).
*
* Only ASCII punctuation will use character escapes, so you never need to
* pass non-ASCII-punctuation here.
*/
encode?: Array<string> | null | undefined
}
/**
* Info on the characters that are around the current thing we are generating.
*/
export interface SafeFields {
/**
* Characters after this (guaranteed to be one, can be more).
*/
after: string
/**
* Characters before this (guaranteed to be one, can be more).
*/
before: string
}
/**
* Make a string safe for embedding in markdown constructs.
*
* In markdown, almost all punctuation characters can, in certain cases,
* result in something.
* Whether they do is highly subjective to where they happen and in what
* they happen.
*
* To solve this, `mdast-util-to-markdown` tracks:
*
* * Characters before and after something;
* * What “constructs” we are in.
*
* This information is then used by this function to escape or encode
* special characters.
*
* @param input
* Raw value to make safe.
* @param config
* Configuration.
* @returns
* Serialized markdown safe for embedding.
*/
export type Safe = (
input: string | null | undefined,
config: SafeConfig
) => string
/**
* Info passed around about the current state.
*/
export interface State {
/**
* Get an identifier from an association to match it to others.
*/
associationId: AssociationId
/**
* Info on whether to encode the surrounding of *attention*.
*
* Whether attention (emphasis, strong, strikethrough) forms
* depends on the characters inside and outside them.
* The characters inside can be handled by *attention* itself.
* However the outside characters are already handled.
* Or handled afterwards.
* This field can be used to signal from *attention* that some parent
* function (practically `containerPhrasing`) has to handle the surrounding.
*/
attentionEncodeSurroundingInfo: EncodeSurrounding | undefined
/**
* List marker currently in use.
*/
bulletCurrent: string | undefined
/**
* List marker previously in use.
*/
bulletLastUsed: string | undefined
/**
* Compile an unsafe pattern to a regex.
*/
compilePattern: CompilePattern
/**
* Serialize the children of a parent that contains phrasing children.
*/
containerPhrasing: ContainerPhrasing
/**
* Serialize the children of a parent that contains flow children.
*/
containerFlow: ContainerFlow
/**
* Track positional info in the output.
*/
createTracker: CreateTracker
/**
* Enter a construct (returns a corresponding exit function).
*/
enter: Enter
/**
* Applied handlers.
*/
handlers: Handlers
/**
* Call the configured handler for the given node.
*/
handle: Handle
/**
* Pad serialized markdown.
*/
indentLines: IndentLines
/**
* Positions of child nodes in their parents.
*/
indexStack: Array<number>
/**
* Applied join handlers.
*/
join: Array<Join>
/**
* Applied user configuration.
*/
options: Options
/**
* Serialize the children of a parent that contains flow children.
*/
safe: Safe
/**
* Stack of constructs we’re in.
*/
stack: Array<ConstructName>
/**
* Applied unsafe patterns.
*/
unsafe: Array<Unsafe>
}
/**
* Get current tracked info.
*
* @returns
* Current tracked info.
*/
export type TrackCurrent = () => TrackFields
/**
* Info on where we are in the document we are generating.
*/
export interface TrackFields {
/**
* Number of columns each line will be shifted by wrapping nodes.
*/
lineShift: number
/**
* Current point.
*/
now: Point
}
/**
* Move past some generated markdown.
*
* @param value
* Generated markdown.
* @returns
* Given markdown.
*/
export type TrackMove = (value: string | null | undefined) => string
/**
* Define a relative increased line shift (the typical indent for lines).
*
* @param value
* Relative increment in how much each line will be padded.
* @returns
* Nothing.
*/
export type TrackShift = (value: number) => undefined
/**
* Track positional info in the output.
*
* This info isn’t used yet but such functionality will allow line wrapping,
* source maps, etc.
*/
export interface Tracker {
/**
* Get the current tracked info.
*/
current: TrackCurrent
/**
* Move past some generated markdown.
*/
move: TrackMove
/**
* Define an increased line shift (the typical indent for lines).
*/
shift: TrackShift
}
/**
* Schema that defines when a character cannot occur.
*/
export interface Unsafe {
/**
* The unsafe pattern (this whole object) compiled as a regex (do not use).
*
* This is internal and must not be defined.
*/
_compiled?: RegExp | null | undefined
/**
* `character` is bad when this is after it (optional).
*/
after?: string | null | undefined
/**
* `character` is bad at a break (cannot be used together with `before`) (optional).
*/
atBreak?: boolean | null | undefined
/**
* `character` is bad when this is before it (cannot be used together with
* `atBreak`) (optional).
*/
before?: string | null | undefined
/**
* Single unsafe character.
*/
character: string
/**
* Constructs where this is bad (optional).
*/
inConstruct?: Array<ConstructName> | ConstructName | null | undefined
/**
* Constructs where this is fine again (optional).
*/
notInConstruct?: Array<ConstructName> | ConstructName | null | undefined
}
@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlgorithmIdentifier = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const pvtsutils = require("pvtsutils");
class AlgorithmIdentifier {
constructor(params = {}) {
this.algorithm = "";
Object.assign(this, params);
}
isEqual(data) {
return (data instanceof AlgorithmIdentifier &&
data.algorithm == this.algorithm &&
((data.parameters &&
this.parameters &&
pvtsutils.isEqual(data.parameters, this.parameters)) ||
data.parameters === this.parameters));
}
}
exports.AlgorithmIdentifier = AlgorithmIdentifier;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_1.AsnPropTypes.ObjectIdentifier,
})
], AlgorithmIdentifier.prototype, "algorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({
type: asn1_schema_1.AsnPropTypes.Any,
optional: true,
})
], AlgorithmIdentifier.prototype, "parameters", void 0);
@@ -0,0 +1,40 @@
"use client";
// src/checkbox-icon.tsx
import { jsx } from "react/jsx-runtime";
function CheckIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ jsx(
"svg",
{
"aria-hidden": "true",
fill: "none",
role: "presentation",
stroke: "currentColor",
strokeDasharray: 22,
strokeDashoffset: isSelected ? 44 : 66,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 2,
style: !disableAnimation && isSelected ? {
transition: "stroke-dashoffset 250ms linear 0.2s"
} : {},
viewBox: "0 0 17 18",
...otherProps,
children: /* @__PURE__ */ jsx("polyline", { points: "1 9 7 14 15 4" })
}
);
}
function IndeterminateIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ jsx("svg", { stroke: "currentColor", strokeWidth: 3, viewBox: "0 0 24 24", ...otherProps, children: /* @__PURE__ */ jsx("line", { x1: "21", x2: "3", y1: "12", y2: "12" }) });
}
function CheckboxIcon(props) {
const { isIndeterminate, ...otherProps } = props;
const BaseIcon = isIndeterminate ? IndeterminateIcon : CheckIcon;
return /* @__PURE__ */ jsx(BaseIcon, { ...otherProps });
}
export {
CheckboxIcon
};
@@ -0,0 +1,10 @@
"use strict";
const absFloor = require("./absFloor-CImRXpov.js");
const constants = require("./constants-DR3SPJ7u.js");
const parse = require("./parse.js");
function diffInHours(date, input, asFloat) {
const parsed = parse(input);
const output = (+date - +parsed) / constants.MS_IN_HOUR;
return asFloat ? output : absFloor.absFloor(output);
}
module.exports = diffInHours;
@@ -0,0 +1,66 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToIntlMathematicalValue = exports.ZERO = exports.invariant = exports.createMemoizedPluralRules = exports.createMemoizedNumberFormat = exports.createMemoizedLocale = exports.createMemoizedListFormat = exports.createMemoizedDateTimeFormat = exports.isMissingLocaleDataError = exports.setMultiInternalSlots = exports.setInternalSlot = exports.isLiteralPart = exports.getMultiInternalSlots = exports.getInternalSlot = exports.defineProperty = exports.createDataProperty = exports._formatToParts = void 0;
var tslib_1 = require("tslib");
tslib_1.__exportStar(require("./CanonicalizeLocaleList"), exports);
tslib_1.__exportStar(require("./CanonicalizeTimeZoneName"), exports);
tslib_1.__exportStar(require("./CoerceOptionsToObject"), exports);
tslib_1.__exportStar(require("./GetNumberOption"), exports);
tslib_1.__exportStar(require("./GetOption"), exports);
tslib_1.__exportStar(require("./GetOptionsObject"), exports);
tslib_1.__exportStar(require("./GetStringOrBooleanOption"), exports);
tslib_1.__exportStar(require("./IsSanctionedSimpleUnitIdentifier"), exports);
tslib_1.__exportStar(require("./IsValidTimeZoneName"), exports);
tslib_1.__exportStar(require("./IsWellFormedCurrencyCode"), exports);
tslib_1.__exportStar(require("./IsWellFormedUnitIdentifier"), exports);
tslib_1.__exportStar(require("./NumberFormat/ApplyUnsignedRoundingMode"), exports);
tslib_1.__exportStar(require("./NumberFormat/CollapseNumberRange"), exports);
tslib_1.__exportStar(require("./NumberFormat/ComputeExponent"), exports);
tslib_1.__exportStar(require("./NumberFormat/ComputeExponentForMagnitude"), exports);
tslib_1.__exportStar(require("./NumberFormat/CurrencyDigits"), exports);
var format_to_parts_1 = require("./NumberFormat/format_to_parts");
Object.defineProperty(exports, "_formatToParts", { enumerable: true, get: function () { return tslib_1.__importDefault(format_to_parts_1).default; } });
tslib_1.__exportStar(require("./NumberFormat/FormatApproximately"), exports);
tslib_1.__exportStar(require("./NumberFormat/FormatNumeric"), exports);
tslib_1.__exportStar(require("./NumberFormat/FormatNumericRange"), exports);
tslib_1.__exportStar(require("./NumberFormat/FormatNumericRangeToParts"), exports);
tslib_1.__exportStar(require("./NumberFormat/FormatNumericToParts"), exports);
tslib_1.__exportStar(require("./NumberFormat/FormatNumericToString"), exports);
tslib_1.__exportStar(require("./NumberFormat/GetUnsignedRoundingMode"), exports);
tslib_1.__exportStar(require("./NumberFormat/InitializeNumberFormat"), exports);
tslib_1.__exportStar(require("./NumberFormat/PartitionNumberPattern"), exports);
tslib_1.__exportStar(require("./NumberFormat/PartitionNumberRangePattern"), exports);
tslib_1.__exportStar(require("./NumberFormat/SetNumberFormatDigitOptions"), exports);
tslib_1.__exportStar(require("./NumberFormat/SetNumberFormatUnitOptions"), exports);
tslib_1.__exportStar(require("./NumberFormat/ToRawFixed"), exports);
tslib_1.__exportStar(require("./NumberFormat/ToRawPrecision"), exports);
tslib_1.__exportStar(require("./PartitionPattern"), exports);
tslib_1.__exportStar(require("./SupportedLocales"), exports);
var utils_1 = require("./utils");
Object.defineProperty(exports, "createDataProperty", { enumerable: true, get: function () { return utils_1.createDataProperty; } });
Object.defineProperty(exports, "defineProperty", { enumerable: true, get: function () { return utils_1.defineProperty; } });
Object.defineProperty(exports, "getInternalSlot", { enumerable: true, get: function () { return utils_1.getInternalSlot; } });
Object.defineProperty(exports, "getMultiInternalSlots", { enumerable: true, get: function () { return utils_1.getMultiInternalSlots; } });
Object.defineProperty(exports, "isLiteralPart", { enumerable: true, get: function () { return utils_1.isLiteralPart; } });
Object.defineProperty(exports, "setInternalSlot", { enumerable: true, get: function () { return utils_1.setInternalSlot; } });
Object.defineProperty(exports, "setMultiInternalSlots", { enumerable: true, get: function () { return utils_1.setMultiInternalSlots; } });
tslib_1.__exportStar(require("./262"), exports);
var data_1 = require("./data");
Object.defineProperty(exports, "isMissingLocaleDataError", { enumerable: true, get: function () { return data_1.isMissingLocaleDataError; } });
tslib_1.__exportStar(require("./types/date-time"), exports);
tslib_1.__exportStar(require("./types/displaynames"), exports);
tslib_1.__exportStar(require("./types/list"), exports);
tslib_1.__exportStar(require("./types/number"), exports);
tslib_1.__exportStar(require("./types/plural-rules"), exports);
tslib_1.__exportStar(require("./types/relative-time"), exports);
var utils_2 = require("./utils");
Object.defineProperty(exports, "createMemoizedDateTimeFormat", { enumerable: true, get: function () { return utils_2.createMemoizedDateTimeFormat; } });
Object.defineProperty(exports, "createMemoizedListFormat", { enumerable: true, get: function () { return utils_2.createMemoizedListFormat; } });
Object.defineProperty(exports, "createMemoizedLocale", { enumerable: true, get: function () { return utils_2.createMemoizedLocale; } });
Object.defineProperty(exports, "createMemoizedNumberFormat", { enumerable: true, get: function () { return utils_2.createMemoizedNumberFormat; } });
Object.defineProperty(exports, "createMemoizedPluralRules", { enumerable: true, get: function () { return utils_2.createMemoizedPluralRules; } });
Object.defineProperty(exports, "invariant", { enumerable: true, get: function () { return utils_2.invariant; } });
var constants_1 = require("./constants");
Object.defineProperty(exports, "ZERO", { enumerable: true, get: function () { return constants_1.ZERO; } });
var ToIntlMathematicalValue_1 = require("./ToIntlMathematicalValue");
Object.defineProperty(exports, "ToIntlMathematicalValue", { enumerable: true, get: function () { return ToIntlMathematicalValue_1.ToIntlMathematicalValue; } });
@@ -0,0 +1,179 @@
"use client";
// src/use-checkbox-group.ts
import { useProviderContext } from "@heroui/system";
import { useCallback, useMemo } from "react";
import { checkboxGroup } from "@heroui/theme";
import { useCheckboxGroup as useReactAriaCheckboxGroup } from "@react-aria/checkbox";
import { useCheckboxGroupState } from "@react-stately/checkbox";
import { filterDOMProps, useDOMRef } from "@heroui/react-utils";
import { clsx, safeAriaLabel, chain, mergeProps } from "@heroui/shared-utils";
import { FormContext, useSlottedContext } from "@heroui/form";
function useCheckboxGroup(props) {
var _a, _b;
const globalContext = useProviderContext();
const { validationBehavior: formValidationBehavior } = useSlottedContext(FormContext) || {};
const {
as,
ref,
classNames,
children,
label,
radius,
value,
name,
defaultValue,
isInvalid: isInvalidProp,
validationState,
size = "md",
color = "primary",
orientation = "vertical",
lineThrough = false,
isDisabled = false,
validationBehavior = (_a = formValidationBehavior != null ? formValidationBehavior : globalContext == null ? void 0 : globalContext.validationBehavior) != null ? _a : "native",
disableAnimation = (_b = globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false,
isReadOnly,
isRequired,
onValueChange,
description,
errorMessage,
className,
...otherProps
} = props;
const Component = as || "div";
const shouldFilterDOMProps = typeof Component === "string";
const domRef = useDOMRef(ref);
const checkboxGroupProps = useMemo(() => {
return {
...otherProps,
value,
name,
"aria-label": safeAriaLabel(otherProps["aria-label"], label),
defaultValue,
isRequired,
isReadOnly,
orientation,
validationBehavior,
isInvalid: validationState === "invalid" || isInvalidProp,
onChange: chain(props.onChange, onValueChange)
};
}, [
value,
name,
label,
defaultValue,
isRequired,
isReadOnly,
orientation,
onValueChange,
isInvalidProp,
validationState,
validationBehavior,
otherProps["aria-label"],
otherProps
]);
const groupState = useCheckboxGroupState(checkboxGroupProps);
const {
labelProps,
groupProps,
descriptionProps,
errorMessageProps,
validationErrors,
validationDetails
} = useReactAriaCheckboxGroup(checkboxGroupProps, groupState);
const context = useMemo(
() => ({
size,
color,
radius,
lineThrough,
isInvalid: groupState.isInvalid,
isDisabled,
disableAnimation,
validationBehavior,
groupState
}),
[
size,
color,
radius,
lineThrough,
isDisabled,
disableAnimation,
validationBehavior,
groupState.value,
groupState.isDisabled,
groupState.isReadOnly,
groupState.isInvalid,
groupState.isSelected
]
);
const slots = useMemo(
() => checkboxGroup({ isRequired, isInvalid: groupState.isInvalid, disableAnimation }),
[isRequired, groupState.isInvalid, , disableAnimation]
);
const baseStyles = clsx(classNames == null ? void 0 : classNames.base, className);
const getGroupProps = useCallback(() => {
return {
ref: domRef,
className: slots.base({ class: baseStyles }),
...mergeProps(
groupProps,
filterDOMProps(otherProps, {
enabled: shouldFilterDOMProps
})
)
};
}, [slots, domRef, baseStyles, groupProps, otherProps]);
const getLabelProps = useCallback(() => {
return {
className: slots.label({ class: classNames == null ? void 0 : classNames.label }),
...labelProps
};
}, [slots, labelProps, classNames == null ? void 0 : classNames.label]);
const getWrapperProps = useCallback(() => {
return {
className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
role: "presentation",
"data-orientation": orientation
};
}, [slots, orientation, classNames == null ? void 0 : classNames.wrapper]);
const getDescriptionProps = useCallback(
(props2 = {}) => {
return {
...props2,
...descriptionProps,
className: slots.description({ class: clsx(classNames == null ? void 0 : classNames.description, props2 == null ? void 0 : props2.className) })
};
},
[slots, descriptionProps, classNames == null ? void 0 : classNames.description]
);
const getErrorMessageProps = useCallback(
(props2 = {}) => {
return {
...props2,
...errorMessageProps,
className: slots.errorMessage({ class: clsx(classNames == null ? void 0 : classNames.errorMessage, props2 == null ? void 0 : props2.className) })
};
},
[slots, errorMessageProps, classNames == null ? void 0 : classNames.errorMessage]
);
return {
Component,
children,
label,
context,
description,
isInvalid: groupState.isInvalid,
errorMessage: typeof errorMessage === "function" ? errorMessage({ isInvalid: groupState.isInvalid, validationErrors, validationDetails }) : errorMessage || (validationErrors == null ? void 0 : validationErrors.join(" ")),
getGroupProps,
getLabelProps,
getWrapperProps,
getDescriptionProps,
getErrorMessageProps
};
}
export {
useCheckboxGroup
};
@@ -0,0 +1,56 @@
import isLaziable from './_isLaziable.js';
import setData from './_setData.js';
import setWrapToString from './_setWrapToString.js';
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1,
WRAP_BIND_KEY_FLAG = 2,
WRAP_CURRY_BOUND_FLAG = 4,
WRAP_CURRY_FLAG = 8,
WRAP_PARTIAL_FLAG = 32,
WRAP_PARTIAL_RIGHT_FLAG = 64;
/**
* Creates a function that wraps `func` to continue currying.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {Function} wrapFunc The function to create the `func` wrapper.
* @param {*} placeholder The placeholder value.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to
* the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
var isCurry = bitmask & WRAP_CURRY_FLAG,
newHolders = isCurry ? holders : undefined,
newHoldersRight = isCurry ? undefined : holders,
newPartials = isCurry ? partials : undefined,
newPartialsRight = isCurry ? undefined : partials;
bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
}
var newData = [
func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
newHoldersRight, argPos, ary, arity
];
var result = wrapFunc.apply(undefined, newData);
if (isLaziable(func)) {
setData(result, newData);
}
result.placeholder = placeholder;
return setWrapToString(result, func, bitmask);
}
export default createRecurry;
@@ -0,0 +1,152 @@
import { MenuItemSelectedIconProps, MenuItemBaseProps } from './base/menu-item-base.js';
import * as _heroui_theme from '@heroui/theme';
import { MenuItemVariantProps } from '@heroui/theme';
import * as tailwind_variants from 'tailwind-variants';
import * as react from 'react';
import * as _heroui_system from '@heroui/system';
import { HTMLHeroUIProps, PropGetter } from '@heroui/system';
import { Node } from '@react-types/shared';
import { TreeState } from '@react-stately/tree';
import '@react-aria/menu';
import '@heroui/aria-utils';
interface Props<T extends object> extends MenuItemBaseProps<T> {
item: Node<T>;
state: TreeState<T>;
}
type UseMenuItemProps<T extends object> = Props<T> & Omit<HTMLHeroUIProps<"li">, keyof Props<T>> & MenuItemVariantProps;
declare function useMenuItem<T extends object>(originalProps: UseMenuItemProps<T>): {
Component: _heroui_system.As<any>;
domRef: react.RefObject<HTMLLIElement>;
slots: {
base: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
wrapper: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
title: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
description: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
selectedIcon: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
shortcut: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
} & {
base: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
wrapper: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
title: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
description: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
selectedIcon: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
shortcut: (slotProps?: ({
color?: "default" | "primary" | "secondary" | "success" | "warning" | "danger" | undefined;
disableAnimation?: boolean | undefined;
isDisabled?: boolean | undefined;
variant?: "flat" | "shadow" | "solid" | "bordered" | "light" | "faded" | undefined;
showDivider?: boolean | undefined;
hasTitleTextChild?: boolean | undefined;
hasDescriptionTextChild?: boolean | undefined;
} & tailwind_variants.ClassProp<ClassValue>) | undefined) => string;
} & {};
classNames: _heroui_theme.SlotsToClasses<"base" | "title" | "description" | "wrapper" | "selectedIcon" | "shortcut"> | undefined;
isSelectable: boolean;
isSelected: boolean;
isDisabled: boolean;
rendered: react.ReactNode;
shortcut: react.ReactNode;
description: react.ReactNode;
startContent: react.ReactNode;
endContent: react.ReactNode;
selectedIcon: react.ReactNode | ((props: MenuItemSelectedIconProps) => react.ReactNode);
disableAnimation: boolean;
getItemProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getLabelProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
hideSelectedIcon: boolean;
getDescriptionProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getKeyboardShortcutProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
getSelectedIconProps: PropGetter<Record<string, unknown>, _heroui_system.DOMAttributes<_heroui_system.DOMElement>>;
};
type UseMenuReturn = ReturnType<typeof useMenuItem>;
export { UseMenuItemProps, UseMenuReturn, useMenuItem };
@@ -0,0 +1,16 @@
var $4e11db3c25a38112$exports = {};
$4e11db3c25a38112$exports = {
"ascending": `t\xf5usev j\xe4rjestus`,
"ascendingSort": (args)=>`sorditud veeru j\xe4rgi ${args.columnName} t\xf5usvas j\xe4rjestuses`,
"columnSize": (args)=>`${args.value} pikslit`,
"descending": `laskuv j\xe4rjestus`,
"descendingSort": (args)=>`sorditud veeru j\xe4rgi ${args.columnName} laskuvas j\xe4rjestuses`,
"resizerDescription": `Suuruse muutmise alustamiseks vajutage klahvi Enter`,
"select": `Vali`,
"selectAll": `Vali k\xf5ik`,
"sortable": `sorditav veerg`
};
export {$4e11db3c25a38112$exports as default};
//# sourceMappingURL=et-EE.module.js.map
@@ -0,0 +1,2 @@
import 'reflect-metadata';
//# sourceMappingURL=getReflectMetadata.spec.d.ts.map
@@ -0,0 +1,936 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.ResizeObserver = factory());
}(this, (function () { 'use strict';
/**
* A collection of shims that provide minimal functionality of the ES6 collections.
*
* These implementations are not meant to be used outside of the ResizeObserver
* modules as they cover only a limited range of use cases.
*/
/* eslint-disable require-jsdoc, valid-jsdoc */
var MapShim = (function () {
if (typeof Map !== 'undefined') {
return Map;
}
/**
* Returns index in provided array that matches the specified key.
*
* @param {Array<Array>} arr
* @param {*} key
* @returns {number}
*/
function getIndex(arr, key) {
var result = -1;
arr.some(function (entry, index) {
if (entry[0] === key) {
result = index;
return true;
}
return false;
});
return result;
}
return /** @class */ (function () {
function class_1() {
this.__entries__ = [];
}
Object.defineProperty(class_1.prototype, "size", {
/**
* @returns {boolean}
*/
get: function () {
return this.__entries__.length;
},
enumerable: true,
configurable: true
});
/**
* @param {*} key
* @returns {*}
*/
class_1.prototype.get = function (key) {
var index = getIndex(this.__entries__, key);
var entry = this.__entries__[index];
return entry && entry[1];
};
/**
* @param {*} key
* @param {*} value
* @returns {void}
*/
class_1.prototype.set = function (key, value) {
var index = getIndex(this.__entries__, key);
if (~index) {
this.__entries__[index][1] = value;
}
else {
this.__entries__.push([key, value]);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.delete = function (key) {
var entries = this.__entries__;
var index = getIndex(entries, key);
if (~index) {
entries.splice(index, 1);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.has = function (key) {
return !!~getIndex(this.__entries__, key);
};
/**
* @returns {void}
*/
class_1.prototype.clear = function () {
this.__entries__.splice(0);
};
/**
* @param {Function} callback
* @param {*} [ctx=null]
* @returns {void}
*/
class_1.prototype.forEach = function (callback, ctx) {
if (ctx === void 0) { ctx = null; }
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
var entry = _a[_i];
callback.call(ctx, entry[1], entry[0]);
}
};
return class_1;
}());
})();
/**
* Detects whether window and document objects are available in current environment.
*/
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
// Returns global object of a current environment.
var global$1 = (function () {
if (typeof global !== 'undefined' && global.Math === Math) {
return global;
}
if (typeof self !== 'undefined' && self.Math === Math) {
return self;
}
if (typeof window !== 'undefined' && window.Math === Math) {
return window;
}
// eslint-disable-next-line no-new-func
return Function('return this')();
})();
/**
* A shim for the requestAnimationFrame which falls back to the setTimeout if
* first one is not supported.
*
* @returns {number} Requests' identifier.
*/
var requestAnimationFrame$1 = (function () {
if (typeof requestAnimationFrame === 'function') {
// It's required to use a bounded function because IE sometimes throws
// an "Invalid calling object" error if rAF is invoked without the global
// object on the left hand side.
return requestAnimationFrame.bind(global$1);
}
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
})();
// Defines minimum timeout before adding a trailing call.
var trailingTimeout = 2;
/**
* Creates a wrapper function which ensures that provided callback will be
* invoked only once during the specified delay period.
*
* @param {Function} callback - Function to be invoked after the delay period.
* @param {number} delay - Delay after which to invoke callback.
* @returns {Function}
*/
function throttle (callback, delay) {
var leadingCall = false, trailingCall = false, lastCallTime = 0;
/**
* Invokes the original callback function and schedules new invocation if
* the "proxy" was called during current request.
*
* @returns {void}
*/
function resolvePending() {
if (leadingCall) {
leadingCall = false;
callback();
}
if (trailingCall) {
proxy();
}
}
/**
* Callback invoked after the specified delay. It will further postpone
* invocation of the original function delegating it to the
* requestAnimationFrame.
*
* @returns {void}
*/
function timeoutCallback() {
requestAnimationFrame$1(resolvePending);
}
/**
* Schedules invocation of the original function.
*
* @returns {void}
*/
function proxy() {
var timeStamp = Date.now();
if (leadingCall) {
// Reject immediately following calls.
if (timeStamp - lastCallTime < trailingTimeout) {
return;
}
// Schedule new call to be in invoked when the pending one is resolved.
// This is important for "transitions" which never actually start
// immediately so there is a chance that we might miss one if change
// happens amids the pending invocation.
trailingCall = true;
}
else {
leadingCall = true;
trailingCall = false;
setTimeout(timeoutCallback, delay);
}
lastCallTime = timeStamp;
}
return proxy;
}
// Minimum delay before invoking the update of observers.
var REFRESH_DELAY = 20;
// A list of substrings of CSS properties used to find transition events that
// might affect dimensions of observed elements.
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
// Check if MutationObserver is available.
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
/**
* Singleton controller class which handles updates of ResizeObserver instances.
*/
var ResizeObserverController = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserverController.
*
* @private
*/
function ResizeObserverController() {
/**
* Indicates whether DOM listeners have been added.
*
* @private {boolean}
*/
this.connected_ = false;
/**
* Tells that controller has subscribed for Mutation Events.
*
* @private {boolean}
*/
this.mutationEventsAdded_ = false;
/**
* Keeps reference to the instance of MutationObserver.
*
* @private {MutationObserver}
*/
this.mutationsObserver_ = null;
/**
* A list of connected observers.
*
* @private {Array<ResizeObserverSPI>}
*/
this.observers_ = [];
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
}
/**
* Adds observer to observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be added.
* @returns {void}
*/
ResizeObserverController.prototype.addObserver = function (observer) {
if (!~this.observers_.indexOf(observer)) {
this.observers_.push(observer);
}
// Add listeners if they haven't been added yet.
if (!this.connected_) {
this.connect_();
}
};
/**
* Removes observer from observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be removed.
* @returns {void}
*/
ResizeObserverController.prototype.removeObserver = function (observer) {
var observers = this.observers_;
var index = observers.indexOf(observer);
// Remove observer if it's present in registry.
if (~index) {
observers.splice(index, 1);
}
// Remove listeners if controller has no connected observers.
if (!observers.length && this.connected_) {
this.disconnect_();
}
};
/**
* Invokes the update of observers. It will continue running updates insofar
* it detects changes.
*
* @returns {void}
*/
ResizeObserverController.prototype.refresh = function () {
var changesDetected = this.updateObservers_();
// Continue running updates if changes have been detected as there might
// be future ones caused by CSS transitions.
if (changesDetected) {
this.refresh();
}
};
/**
* Updates every observer from observers list and notifies them of queued
* entries.
*
* @private
* @returns {boolean} Returns "true" if any observer has detected changes in
* dimensions of it's elements.
*/
ResizeObserverController.prototype.updateObservers_ = function () {
// Collect observers that have active observations.
var activeObservers = this.observers_.filter(function (observer) {
return observer.gatherActive(), observer.hasActive();
});
// Deliver notifications in a separate cycle in order to avoid any
// collisions between observers, e.g. when multiple instances of
// ResizeObserver are tracking the same element and the callback of one
// of them changes content dimensions of the observed target. Sometimes
// this may result in notifications being blocked for the rest of observers.
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
return activeObservers.length > 0;
};
/**
* Initializes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.connect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already added.
if (!isBrowser || this.connected_) {
return;
}
// Subscription to the "Transitionend" event is used as a workaround for
// delayed transitions. This way it's possible to capture at least the
// final state of an element.
document.addEventListener('transitionend', this.onTransitionEnd_);
window.addEventListener('resize', this.refresh);
if (mutationObserverSupported) {
this.mutationsObserver_ = new MutationObserver(this.refresh);
this.mutationsObserver_.observe(document, {
attributes: true,
childList: true,
characterData: true,
subtree: true
});
}
else {
document.addEventListener('DOMSubtreeModified', this.refresh);
this.mutationEventsAdded_ = true;
}
this.connected_ = true;
};
/**
* Removes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.disconnect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already removed.
if (!isBrowser || !this.connected_) {
return;
}
document.removeEventListener('transitionend', this.onTransitionEnd_);
window.removeEventListener('resize', this.refresh);
if (this.mutationsObserver_) {
this.mutationsObserver_.disconnect();
}
if (this.mutationEventsAdded_) {
document.removeEventListener('DOMSubtreeModified', this.refresh);
}
this.mutationsObserver_ = null;
this.mutationEventsAdded_ = false;
this.connected_ = false;
};
/**
* "Transitionend" event handler.
*
* @private
* @param {TransitionEvent} event
* @returns {void}
*/
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
// Detect whether transition may affect dimensions of an element.
var isReflowProperty = transitionKeys.some(function (key) {
return !!~propertyName.indexOf(key);
});
if (isReflowProperty) {
this.refresh();
}
};
/**
* Returns instance of the ResizeObserverController.
*
* @returns {ResizeObserverController}
*/
ResizeObserverController.getInstance = function () {
if (!this.instance_) {
this.instance_ = new ResizeObserverController();
}
return this.instance_;
};
/**
* Holds reference to the controller's instance.
*
* @private {ResizeObserverController}
*/
ResizeObserverController.instance_ = null;
return ResizeObserverController;
}());
/**
* Defines non-writable/enumerable properties of the provided target object.
*
* @param {Object} target - Object for which to define properties.
* @param {Object} props - Properties to be defined.
* @returns {Object} Target object.
*/
var defineConfigurable = (function (target, props) {
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
var key = _a[_i];
Object.defineProperty(target, key, {
value: props[key],
enumerable: false,
writable: false,
configurable: true
});
}
return target;
});
/**
* Returns the global object associated with provided element.
*
* @param {Object} target
* @returns {Object}
*/
var getWindowOf = (function (target) {
// Assume that the element is an instance of Node, which means that it
// has the "ownerDocument" property from which we can retrieve a
// corresponding global object.
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
// Return the local global object if it's not possible extract one from
// provided element.
return ownerGlobal || global$1;
});
// Placeholder of an empty content rectangle.
var emptyRect = createRectInit(0, 0, 0, 0);
/**
* Converts provided string to a number.
*
* @param {number|string} value
* @returns {number}
*/
function toFloat(value) {
return parseFloat(value) || 0;
}
/**
* Extracts borders size from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @param {...string} positions - Borders positions (top, right, ...)
* @returns {number}
*/
function getBordersSize(styles) {
var positions = [];
for (var _i = 1; _i < arguments.length; _i++) {
positions[_i - 1] = arguments[_i];
}
return positions.reduce(function (size, position) {
var value = styles['border-' + position + '-width'];
return size + toFloat(value);
}, 0);
}
/**
* Extracts paddings sizes from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @returns {Object} Paddings box.
*/
function getPaddings(styles) {
var positions = ['top', 'right', 'bottom', 'left'];
var paddings = {};
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
var position = positions_1[_i];
var value = styles['padding-' + position];
paddings[position] = toFloat(value);
}
return paddings;
}
/**
* Calculates content rectangle of provided SVG element.
*
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
* to be calculated.
* @returns {DOMRectInit}
*/
function getSVGContentRect(target) {
var bbox = target.getBBox();
return createRectInit(0, 0, bbox.width, bbox.height);
}
/**
* Calculates content rectangle of provided HTMLElement.
*
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
* @returns {DOMRectInit}
*/
function getHTMLElementContentRect(target) {
// Client width & height properties can't be
// used exclusively as they provide rounded values.
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
// By this condition we can catch all non-replaced inline, hidden and
// detached elements. Though elements with width & height properties less
// than 0.5 will be discarded as well.
//
// Without it we would need to implement separate methods for each of
// those cases and it's not possible to perform a precise and performance
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
// gives wrong results for elements with width & height less than 0.5.
if (!clientWidth && !clientHeight) {
return emptyRect;
}
var styles = getWindowOf(target).getComputedStyle(target);
var paddings = getPaddings(styles);
var horizPad = paddings.left + paddings.right;
var vertPad = paddings.top + paddings.bottom;
// Computed styles of width & height are being used because they are the
// only dimensions available to JS that contain non-rounded values. It could
// be possible to utilize the getBoundingClientRect if only it's data wasn't
// affected by CSS transformations let alone paddings, borders and scroll bars.
var width = toFloat(styles.width), height = toFloat(styles.height);
// Width & height include paddings and borders when the 'border-box' box
// model is applied (except for IE).
if (styles.boxSizing === 'border-box') {
// Following conditions are required to handle Internet Explorer which
// doesn't include paddings and borders to computed CSS dimensions.
//
// We can say that if CSS dimensions + paddings are equal to the "client"
// properties then it's either IE, and thus we don't need to subtract
// anything, or an element merely doesn't have paddings/borders styles.
if (Math.round(width + horizPad) !== clientWidth) {
width -= getBordersSize(styles, 'left', 'right') + horizPad;
}
if (Math.round(height + vertPad) !== clientHeight) {
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
}
}
// Following steps can't be applied to the document's root element as its
// client[Width/Height] properties represent viewport area of the window.
// Besides, it's as well not necessary as the <html> itself neither has
// rendered scroll bars nor it can be clipped.
if (!isDocumentElement(target)) {
// In some browsers (only in Firefox, actually) CSS width & height
// include scroll bars size which can be removed at this step as scroll
// bars are the only difference between rounded dimensions + paddings
// and "client" properties, though that is not always true in Chrome.
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
// Chrome has a rather weird rounding of "client" properties.
// E.g. for an element with content width of 314.2px it sometimes gives
// the client width of 315px and for the width of 314.7px it may give
// 314px. And it doesn't happen all the time. So just ignore this delta
// as a non-relevant.
if (Math.abs(vertScrollbar) !== 1) {
width -= vertScrollbar;
}
if (Math.abs(horizScrollbar) !== 1) {
height -= horizScrollbar;
}
}
return createRectInit(paddings.left, paddings.top, width, height);
}
/**
* Checks whether provided element is an instance of the SVGGraphicsElement.
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
var isSVGGraphicsElement = (function () {
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
// interface.
if (typeof SVGGraphicsElement !== 'undefined') {
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
}
// If it's so, then check that element is at least an instance of the
// SVGElement and that it has the "getBBox" method.
// eslint-disable-next-line no-extra-parens
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
typeof target.getBBox === 'function'); };
})();
/**
* Checks whether provided element is a document element (<html>).
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
function isDocumentElement(target) {
return target === getWindowOf(target).document.documentElement;
}
/**
* Calculates an appropriate content rectangle for provided html or svg element.
*
* @param {Element} target - Element content rectangle of which needs to be calculated.
* @returns {DOMRectInit}
*/
function getContentRect(target) {
if (!isBrowser) {
return emptyRect;
}
if (isSVGGraphicsElement(target)) {
return getSVGContentRect(target);
}
return getHTMLElementContentRect(target);
}
/**
* Creates rectangle with an interface of the DOMRectReadOnly.
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
*
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
* @returns {DOMRectReadOnly}
*/
function createReadOnlyRect(_a) {
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
var rect = Object.create(Constr.prototype);
// Rectangle's properties are not writable and non-enumerable.
defineConfigurable(rect, {
x: x, y: y, width: width, height: height,
top: y,
right: x + width,
bottom: height + y,
left: x
});
return rect;
}
/**
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
*
* @param {number} x - X coordinate.
* @param {number} y - Y coordinate.
* @param {number} width - Rectangle's width.
* @param {number} height - Rectangle's height.
* @returns {DOMRectInit}
*/
function createRectInit(x, y, width, height) {
return { x: x, y: y, width: width, height: height };
}
/**
* Class that is responsible for computations of the content rectangle of
* provided DOM element and for keeping track of it's changes.
*/
var ResizeObservation = /** @class */ (function () {
/**
* Creates an instance of ResizeObservation.
*
* @param {Element} target - Element to be observed.
*/
function ResizeObservation(target) {
/**
* Broadcasted width of content rectangle.
*
* @type {number}
*/
this.broadcastWidth = 0;
/**
* Broadcasted height of content rectangle.
*
* @type {number}
*/
this.broadcastHeight = 0;
/**
* Reference to the last observed content rectangle.
*
* @private {DOMRectInit}
*/
this.contentRect_ = createRectInit(0, 0, 0, 0);
this.target = target;
}
/**
* Updates content rectangle and tells whether it's width or height properties
* have changed since the last broadcast.
*
* @returns {boolean}
*/
ResizeObservation.prototype.isActive = function () {
var rect = getContentRect(this.target);
this.contentRect_ = rect;
return (rect.width !== this.broadcastWidth ||
rect.height !== this.broadcastHeight);
};
/**
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
* from the corresponding properties of the last observed content rectangle.
*
* @returns {DOMRectInit} Last observed content rectangle.
*/
ResizeObservation.prototype.broadcastRect = function () {
var rect = this.contentRect_;
this.broadcastWidth = rect.width;
this.broadcastHeight = rect.height;
return rect;
};
return ResizeObservation;
}());
var ResizeObserverEntry = /** @class */ (function () {
/**
* Creates an instance of ResizeObserverEntry.
*
* @param {Element} target - Element that is being observed.
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
*/
function ResizeObserverEntry(target, rectInit) {
var contentRect = createReadOnlyRect(rectInit);
// According to the specification following properties are not writable
// and are also not enumerable in the native implementation.
//
// Property accessors are not being used as they'd require to define a
// private WeakMap storage which may cause memory leaks in browsers that
// don't support this type of collections.
defineConfigurable(this, { target: target, contentRect: contentRect });
}
return ResizeObserverEntry;
}());
var ResizeObserverSPI = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback function that is invoked
* when one of the observed elements changes it's content dimensions.
* @param {ResizeObserverController} controller - Controller instance which
* is responsible for the updates of observer.
* @param {ResizeObserver} callbackCtx - Reference to the public
* ResizeObserver instance which will be passed to callback function.
*/
function ResizeObserverSPI(callback, controller, callbackCtx) {
/**
* Collection of resize observations that have detected changes in dimensions
* of elements.
*
* @private {Array<ResizeObservation>}
*/
this.activeObservations_ = [];
/**
* Registry of the ResizeObservation instances.
*
* @private {Map<Element, ResizeObservation>}
*/
this.observations_ = new MapShim();
if (typeof callback !== 'function') {
throw new TypeError('The callback provided as parameter 1 is not a function.');
}
this.callback_ = callback;
this.controller_ = controller;
this.callbackCtx_ = callbackCtx;
}
/**
* Starts observing provided element.
*
* @param {Element} target - Element to be observed.
* @returns {void}
*/
ResizeObserverSPI.prototype.observe = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
var observations = this.observations_;
// Do nothing if element is already being observed.
if (observations.has(target)) {
return;
}
observations.set(target, new ResizeObservation(target));
this.controller_.addObserver(this);
// Force the update of observations.
this.controller_.refresh();
};
/**
* Stops observing provided element.
*
* @param {Element} target - Element to stop observing.
* @returns {void}
*/
ResizeObserverSPI.prototype.unobserve = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
var observations = this.observations_;
// Do nothing if element is not being observed.
if (!observations.has(target)) {
return;
}
observations.delete(target);
if (!observations.size) {
this.controller_.removeObserver(this);
}
};
/**
* Stops observing all elements.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.disconnect = function () {
this.clearActive();
this.observations_.clear();
this.controller_.removeObserver(this);
};
/**
* Collects observation instances the associated element of which has changed
* it's content rectangle.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.gatherActive = function () {
var _this = this;
this.clearActive();
this.observations_.forEach(function (observation) {
if (observation.isActive()) {
_this.activeObservations_.push(observation);
}
});
};
/**
* Invokes initial callback function with a list of ResizeObserverEntry
* instances collected from active resize observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.broadcastActive = function () {
// Do nothing if observer doesn't have active observations.
if (!this.hasActive()) {
return;
}
var ctx = this.callbackCtx_;
// Create ResizeObserverEntry instance for every active observation.
var entries = this.activeObservations_.map(function (observation) {
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
});
this.callback_.call(ctx, entries, ctx);
this.clearActive();
};
/**
* Clears the collection of active observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.clearActive = function () {
this.activeObservations_.splice(0);
};
/**
* Tells whether observer has active observations.
*
* @returns {boolean}
*/
ResizeObserverSPI.prototype.hasActive = function () {
return this.activeObservations_.length > 0;
};
return ResizeObserverSPI;
}());
// Registry of internal observers. If WeakMap is not available use current shim
// for the Map collection as it has all required methods and because WeakMap
// can't be fully polyfilled anyway.
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
/**
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
* exposing only those methods and properties that are defined in the spec.
*/
var ResizeObserver = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback that is invoked when
* dimensions of the observed elements change.
*/
function ResizeObserver(callback) {
if (!(this instanceof ResizeObserver)) {
throw new TypeError('Cannot call a class as a function.');
}
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
var controller = ResizeObserverController.getInstance();
var observer = new ResizeObserverSPI(callback, controller, this);
observers.set(this, observer);
}
return ResizeObserver;
}());
// Expose public methods of ResizeObserver.
[
'observe',
'unobserve',
'disconnect'
].forEach(function (method) {
ResizeObserver.prototype[method] = function () {
var _a;
return (_a = observers.get(this))[method].apply(_a, arguments);
};
});
var index = (function () {
// Export existing implementation if available.
if (typeof global$1.ResizeObserver !== 'undefined') {
return global$1.ResizeObserver;
}
return ResizeObserver;
})();
return index;
})));
@@ -0,0 +1,21 @@
/**
* DON'T EDIT THIS FILE.
* This file was generated by "scripts/update-lib-flat-configs.js" script.
*/
"use strict"
module.exports = {
plugins: {
get "es-x"() {
return require("../../index.js")
},
},
rules: {
"es-x/no-logical-assignment-operators": "error",
"es-x/no-numeric-separators": "error",
"es-x/no-promise-any": "error",
"es-x/no-regexp-unicode-property-escapes-2021": "error",
"es-x/no-string-prototype-replaceall": "error",
"es-x/no-weakrefs": "error",
},
}
@@ -0,0 +1 @@
{"mappings":"AAAA;;;;;;;;;;CAUC,GAIM,MAAM;IAwDX,CAAC,CAAC,OAAO,QAAQ,CAAC,GAA8B;QAC9C,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,IAAI,OAAe;QACjB,OAAO,IAAI,CAAC,KAAK;IACnB;IAEA,UAAiC;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI;IACzB;IAEA,aAAa,GAAQ,EAAc;QACjC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,YAAY,GAAQ,EAAc;QAChC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;YACb;QAAd,OAAO,OAAO,CAAA,gBAAA,KAAK,OAAO,cAAZ,2BAAA,gBAAgB,OAAO;IACvC;IAEA,cAA0B;QACxB,OAAO,IAAI,CAAC,QAAQ;IACtB;IAEA,aAAyB;QACvB,OAAO,IAAI,CAAC,OAAO;IACrB;IAEA,QAAQ,GAAQ,EAAkB;YACzB;QAAP,OAAO,CAAA,mBAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAhB,8BAAA,mBAAwB;IACjC;IAEA,GAAG,GAAW,EAAkB;QAC9B,MAAM,OAAO;eAAI,IAAI,CAAC,OAAO;SAAG;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI;IAC/B;IAEA,YAAY,GAAQ,EAAqB;QACvC,IAAI,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;QAC3B,OAAO,CAAA,iBAAA,2BAAA,KAAM,UAAU,KAAI,EAAE;IAC/B;IA3FA,YAAY,KAAwB,CAAE;aAN9B,SAA4B,IAAI;aAEhC,WAAuB;aACvB,UAAsB;QAI5B,IAAI,CAAC,QAAQ,GAAG;QAEhB,IAAI,QAAQ,CAAC;YACX,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,GAAG,EAAE;YAE1B,IAAI,KAAK,UAAU,IAAI,KAAK,IAAI,KAAK,WACnC,KAAK,IAAI,SAAS,KAAK,UAAU,CAC/B,MAAM;QAGZ;QAEA,KAAK,IAAI,QAAQ,MACf,MAAM;QAGR,IAAI,OAAuB;QAC3B,IAAI,QAAQ;QACZ,IAAI,OAAO;QACX,KAAK,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,MAAM,CAAE;YACnC,IAAI,MAAM;gBACR,KAAK,OAAO,GAAG;gBACf,KAAK,OAAO,GAAG,KAAK,GAAG;YACzB,OAAO;gBACL,IAAI,CAAC,QAAQ,GAAG;gBAChB,KAAK,OAAO,GAAG;YACjB;YAEA,IAAI,KAAK,IAAI,KAAK,QAChB,KAAK,KAAK,GAAG;YAGf,8DAA8D;YAC9D,gFAAgF;YAChF,IAAI,KAAK,IAAI,KAAK,aAAa,KAAK,IAAI,KAAK,QAC3C;YAGF,OAAO;YAEP,6DAA6D;YAC7D,iFAAiF;YACjF,KAAK,OAAO,GAAG;QACjB;QACA,IAAI,CAAC,KAAK,GAAG;YACE;QAAf,IAAI,CAAC,OAAO,GAAG,CAAA,YAAA,iBAAA,2BAAA,KAAM,GAAG,cAAT,uBAAA,YAAa;IAC9B;AA6CF","sources":["packages/@react-stately/list/src/ListCollection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key, Node} from '@react-types/shared';\n\nexport class ListCollection<T> implements Collection<Node<T>> {\n private keyMap: Map<Key, Node<T>> = new Map();\n private iterable: Iterable<Node<T>>;\n private firstKey: Key | null = null;\n private lastKey: Key | null = null;\n private _size: number;\n\n constructor(nodes: Iterable<Node<T>>) {\n this.iterable = nodes;\n\n let visit = (node: Node<T>) => {\n this.keyMap.set(node.key, node);\n\n if (node.childNodes && node.type === 'section') {\n for (let child of node.childNodes) {\n visit(child);\n }\n }\n };\n\n for (let node of nodes) {\n visit(node);\n }\n\n let last: Node<T> | null = null;\n let index = 0;\n let size = 0;\n for (let [key, node] of this.keyMap) {\n if (last) {\n last.nextKey = key;\n node.prevKey = last.key;\n } else {\n this.firstKey = key;\n node.prevKey = undefined;\n }\n\n if (node.type === 'item') {\n node.index = index++;\n }\n\n // Only count sections and items when determining size so that\n // loaders and separators in RAC/S2 don't influence the emptyState determination\n if (node.type === 'section' || node.type === 'item') {\n size++;\n }\n\n last = node;\n\n // Set nextKey as undefined since this might be the last node\n // If it isn't the last node, last.nextKey will properly set at start of new loop\n last.nextKey = undefined;\n }\n this._size = size;\n this.lastKey = last?.key ?? null;\n }\n\n *[Symbol.iterator](): IterableIterator<Node<T>> {\n yield* this.iterable;\n }\n\n get size(): number {\n return this._size;\n }\n\n getKeys(): IterableIterator<Key> {\n return this.keyMap.keys();\n }\n\n getKeyBefore(key: Key): Key | null {\n let node = this.keyMap.get(key);\n return node ? node.prevKey ?? null : null;\n }\n\n getKeyAfter(key: Key): Key | null {\n let node = this.keyMap.get(key);\n return node ? node.nextKey ?? null : null;\n }\n\n getFirstKey(): Key | null {\n return this.firstKey;\n }\n\n getLastKey(): Key | null {\n return this.lastKey;\n }\n\n getItem(key: Key): Node<T> | null {\n return this.keyMap.get(key) ?? null;\n }\n\n at(idx: number): Node<T> | null {\n const keys = [...this.getKeys()];\n return this.getItem(keys[idx]);\n }\n\n getChildren(key: Key): Iterable<Node<T>> {\n let node = this.keyMap.get(key);\n return node?.childNodes || [];\n }\n}\n"],Line truncated
@@ -0,0 +1,3 @@
import { PlanParams } from '../models/PlanParams';
export declare function handlePlanError(params: PlanParams, error: unknown): never;
//# sourceMappingURL=handlePlanError.d.ts.map
@@ -0,0 +1,8 @@
"use client";
import {
useCheckbox
} from "./chunk-5JTA22ZA.mjs";
import "./chunk-LK575OWX.mjs";
export {
useCheckbox
};
@@ -0,0 +1,2 @@
'use strict';
require('../register')('q', {Promise: require('q').Promise})
@@ -0,0 +1,15 @@
import Dispatcher from "./dispatcher";
export declare class RedirectHandler implements Dispatcher.DispatchHandlers {
constructor(
dispatch: Dispatcher,
maxRedirections: number,
opts: Dispatcher.DispatchOptions,
handler: Dispatcher.DispatchHandlers,
redirectionLimitReached: boolean
);
}
export declare class DecoratorHandler implements Dispatcher.DispatchHandlers {
constructor(handler: Dispatcher.DispatchHandlers);
}
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-aria/live-announcer/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 */\nexport {announce, clearAnnouncer, destroyAnnouncer} from './LiveAnnouncer';\n"],"names":[],"version":3,"file":"main.js.map"}
@@ -0,0 +1,17 @@
/*
@license
Rollup.js v4.53.2
Mon, 10 Nov 2025 08:56:08 GMT - commit d8b0150971681d9efa4f173de5edd2c79a6e03d9
https://github.com/rollup/rollup
Released under the MIT License.
*/
export { version as VERSION, defineConfig, rollup, watch } from './shared/node-entry.js';
import './shared/parseAst.js';
import '../native.js';
import 'node:path';
import 'path';
import 'node:process';
import 'node:perf_hooks';
import 'node:fs/promises';
@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekYear=t()}(this,(function(){"use strict";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}));
@@ -0,0 +1 @@
{"version":3,"file":"buildClassElementMetadataFromMaybeClassElementMetadata.d.ts","sourceRoot":"","sources":["../../../../src/metadata/calculations/buildClassElementMetadataFromMaybeClassElementMetadata.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAEtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAC;AAE9F,KAAK,EAAE,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,GACjE,KAAK,GAAG,EAAE,CAAC,IAAI,CAAC,GAChB,KAAK,CAAC;AAEV,KAAK,4BAA4B,CAC/B,OAAO,SAAS,OAAO,EAAE,EAAE,EAC3B,OAAO,IACL,OAAO,SAAS;IAClB,MAAM,KAAK,SAAS,OAAO,EAAE;IAC7B,GAAG,MAAM,IAAI,SAAS,OAAO,EAAE,EAAE;CAClC,GACG,CAAC,CAAC,GAAG,MAAM,EAAE,KAAK,KAAK,OAAO,CAAC,GAC7B,4BAA4B,CAAC,IAAI,EAAE,OAAO,CAAC,GAE7C,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC;AAElC,KAAK,6CAA6C,CAChD,OAAO,SAAS,OAAO,EAAE,EAAE,EAC3B,OAAO,IACL,OAAO,SAAS;IAClB,MAAM,KAAK,SAAS,OAAO,EAAE;IAC7B,GAAG,MAAM,IAAI,SAAS,OAAO,EAAE,EAAE;CAClC,GACG,CAAC,CACC,QAAQ,EAAE,gCAAgC,GAAG,2BAA2B,EACxE,GAAG,MAAM,EAAE,KAAK,KACb,OAAO,CAAC,GACX,6CAA6C,CAAC,IAAI,EAAE,OAAO,CAAC,GAC9D,CACE,QAAQ,EAAE,gCAAgC,GAAG,2BAA2B,EAExE,GAAG,MAAM,EAAE,GAAG,EAAE,KACb,OAAO,CAAC;AAEjB,wBAAgB,sDAAsD,CACpE,OAAO,SAAS,OAAO,EAAE,EAAE,EAE3B,oBAAoB,EAAE,4BAA4B,CAChD,OAAO,EACP,oBAAoB,CACrB,EACD,qCAAqC,EAAE,6CAA6C,CAClF,OAAO,EACP,oBAAoB,CACrB,GACA,CACD,GAAG,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,KACnB,CAAC,QAAQ,EAAE,yBAAyB,GAAG,SAAS,KAAK,oBAAoB,CAgB7E"}
@@ -0,0 +1,46 @@
# `@img/sharp-libvips-linux-x64`
Prebuilt libvips and dependencies for use with sharp on Linux (glibc) x64.
## Licensing
This software contains third-party libraries
used under the terms of the following licences:
| Library | Used under the terms of |
|---------------|-----------------------------------------------------------------------------------------------------------|
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
| cairo | Mozilla Public License 2.0 |
| cgif | MIT Licence |
| expat | MIT Licence |
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
| fribidi | LGPLv3 |
| glib | LGPLv3 |
| harfbuzz | MIT Licence |
| highway | Apache-2.0 License, BSD 3-Clause |
| lcms | MIT Licence |
| libarchive | BSD 2-Clause |
| libexif | LGPLv3 |
| libffi | MIT Licence |
| libheif | LGPLv3 |
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
| libnsgif | MIT Licence |
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
| librsvg | LGPLv3 |
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
| libvips | LGPLv3 |
| libwebp | New BSD License |
| libxml2 | MIT Licence |
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
| pango | LGPLv3 |
| pixman | MIT Licence |
| proxy-libintl | LGPLv3 |
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
Use of libraries under the terms of the LGPLv3 is via the
"any later version" clause of the LGPLv2 or LGPLv2.1.
Please report any errors or omissions via
https://github.com/lovell/sharp-libvips/issues/new
@@ -0,0 +1,39 @@
var createPadding = require('./_createPadding'),
stringSize = require('./_stringSize'),
toInteger = require('./toInteger'),
toString = require('./toString');
/**
* Pads `string` on the left side if it's shorter than `length`. Padding
* characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.padStart('abc', 6);
* // => ' abc'
*
* _.padStart('abc', 6, '_-');
* // => '_-_abc'
*
* _.padStart('abc', 3);
* // => 'abc'
*/
function padStart(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return (length && strLength < length)
? (createPadding(length - strLength, chars) + string)
: string;
}
module.exports = padStart;
@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _typeof;
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
exports.default = _typeof = function (obj) {
return typeof obj;
};
} else {
exports.default = _typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
//# sourceMappingURL=typeof.js.map
@@ -0,0 +1,15 @@
/**
* Copyright (c) 2017, Daniel Imms (MIT License).
* Copyright (c) 2018, Microsoft Corporation (MIT License).
*/
export type ArgvOrCommandLine = string[] | string;
export interface IExitEvent {
exitCode: number;
signal: number | undefined;
}
export interface IDisposable {
dispose(): void;
}
@@ -0,0 +1,4 @@
import { Binding } from '../../binding/models/Binding';
import { DeactivationParams } from '../models/DeactivationParams';
export declare function resolveBindingsDeactivations(params: DeactivationParams, bindings: Iterable<Binding> | undefined): void | Promise<void>;
//# sourceMappingURL=resolveBindingsDeactivations.d.ts.map
@@ -0,0 +1,69 @@
export { Activity, AddNoteBulk, Camera, CartIcon, ChevronDown, ChevronDownBold, CopyDocumentBulk, Delete, DeleteDocumentBulk, Edit, EditDocumentBulk, Eye, Flash, Lock, Mail, Minus, Moon, NewFile, Notification, Password, Plus, Scale, Search, Server, Sun, TagUser, Unlock, User, VolumeUp } from './icons.js';
export { CopyIcon } from './copy.js';
export { CheckIcon, CheckIconProps } from './check.js';
export { AvatarIcon } from './avatar.js';
export { CloseIcon } from './close.js';
export { CloseFilledIcon } from './close-filled.js';
export { ChevronIcon } from './chevron.js';
export { ChevronUpIcon } from './chevron-up.js';
export { ChevronDownIcon } from './chevron-down.js';
export { ChevronLeftIcon } from './chevron-left.js';
export { ChevronRightIcon } from './chevron-right.js';
export { EllipsisIcon } from './ellipsis.js';
export { ForwardIcon } from './forward.js';
export { SunIcon } from './sun.js';
export { SunFilledIcon } from './sun-filled.js';
export { SortIcon } from './sort.js';
export { MailIcon } from './mail.js';
export { MailFilledIcon } from './mail-filled.js';
export { MoonIcon } from './moon.js';
export { MoonFilledIcon } from './moon-filled.js';
export { HeadphonesIcon } from './headphones.js';
export { AnchorIcon } from './anchor.js';
export { InfoFilledIcon } from './info-filled.js';
export { InfoIcon } from './info.js';
export { ShieldSecurityIcon } from './shield-security.js';
export { MonitorMobileIcon } from './monitor-mobile.js';
export { InvalidCardIcon } from './invalid-card.js';
export { EyeFilledIcon } from './eye-filled.js';
export { EyeSlashFilledIcon } from './eye-slash-filled.js';
export { SearchIcon } from './search.js';
export { LockFilledIcon } from './lock-filled.js';
export { LoadingIcon } from './loading.js';
export { EditIcon } from './edit.js';
export { DeleteIcon } from './delete.js';
export { EyeIcon } from './eye.js';
export { ArrowRightIcon } from './arrow-right.js';
export { ArrowLeftIcon } from './arrow-left.js';
export { LinkIcon } from './link.js';
export { SelectorIcon } from './selector.js';
export { InfoCircleIcon } from './info-circle.js';
export { WarningIcon } from './warning.js';
export { DangerIcon } from './danger.js';
export { SuccessIcon } from './success.js';
export { AddNoteBulkIcon } from './bulk/add-note.js';
export { CopyDocumentBulkIcon } from './bulk/copy-document.js';
export { DeleteDocumentBulkIcon } from './bulk/delete-document.js';
export { EditDocumentBulkIcon } from './bulk/edit-document.js';
export { AlignTopBoldIcon } from './bold/align-top.js';
export { AlignBottomBoldIcon } from './bold/align-bottom.js';
export { AlignLeftBoldIcon } from './bold/align-left.js';
export { AlignRightBoldIcon } from './bold/align-right.js';
export { AlignVerticallyBoldIcon } from './bold/align-vertically.js';
export { AlignHorizontallyBoldIcon } from './bold/align-horizontally.js';
export { PetBoldIcon } from './bold/pet.js';
export { VolumeHighBoldIcon } from './bold/volume-high.js';
export { VolumeLowBoldIcon } from './bold/volume-low.js';
export { ShoppingCartBoldIcon } from './bold/shopping-cart.js';
export { SendFilledIcon } from './bold/send.js';
export { PlusFilledIcon } from './bold/plus.js';
export { CalendarBoldIcon } from './bold/calendar-bold.js';
export { ClockSquareBoldIcon } from './bold/clock-square-bold.js';
export { CheckLinearIcon } from './linear/check.js';
export { CopyLinearIcon } from './linear/copy.js';
export { ChevronCircleTopLinearIcon } from './linear/chevron-circle-top.js';
export { SearchLinearIcon } from './linear/search.js';
export { ClockCircleLinearIcon } from './linear/clock-circle-linear.js';
export { IconSvgProps } from './types.js';
import 'react';
import 'react/jsx-runtime';
@@ -0,0 +1,23 @@
import { DOMProps, AriaLabelingProps, Orientation, DOMAttributes } from '@react-types/shared';
interface SeparatorProps extends DOMProps, AriaLabelingProps {
/**
* The orientation of the separator.
* @default 'horizontal'
*/
orientation?: Orientation;
/** The HTML element type that will be used to render the separator. */
elementType?: string;
}
interface SeparatorAria {
/** Props for the separator element. */
separatorProps: DOMAttributes;
}
/**
* Provides the accessibility implementation for a separator.
* A separator is a visual divider between two groups of content,
* e.g. groups of menu items or sections of a page.
*/
declare function useSeparator(props: SeparatorProps): SeparatorAria;
export { type SeparatorAria, type SeparatorProps, useSeparator };
@@ -0,0 +1,940 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var acorn = require('acorn');
var jsx = require('acorn-jsx');
var visitorKeys = require('eslint-visitor-keys');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var acorn__namespace = /*#__PURE__*/_interopNamespace(acorn);
var jsx__default = /*#__PURE__*/_interopDefaultLegacy(jsx);
var visitorKeys__namespace = /*#__PURE__*/_interopNamespace(visitorKeys);
/**
* @fileoverview Translates tokens between Acorn format and Esprima format.
* @author Nicholas C. Zakas
*/
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
// none!
//------------------------------------------------------------------------------
// Private
//------------------------------------------------------------------------------
// Esprima Token Types
const Token = {
Boolean: "Boolean",
EOF: "<end>",
Identifier: "Identifier",
PrivateIdentifier: "PrivateIdentifier",
Keyword: "Keyword",
Null: "Null",
Numeric: "Numeric",
Punctuator: "Punctuator",
String: "String",
RegularExpression: "RegularExpression",
Template: "Template",
JSXIdentifier: "JSXIdentifier",
JSXText: "JSXText"
};
/**
* Converts part of a template into an Esprima token.
* @param {AcornToken[]} tokens The Acorn tokens representing the template.
* @param {string} code The source code.
* @returns {EsprimaToken} The Esprima equivalent of the template token.
* @private
*/
function convertTemplatePart(tokens, code) {
const firstToken = tokens[0],
lastTemplateToken = tokens.at(-1);
const token = {
type: Token.Template,
value: code.slice(firstToken.start, lastTemplateToken.end)
};
if (firstToken.loc) {
token.loc = {
start: firstToken.loc.start,
end: lastTemplateToken.loc.end
};
}
if (firstToken.range) {
token.start = firstToken.range[0];
token.end = lastTemplateToken.range[1];
token.range = [token.start, token.end];
}
return token;
}
/**
* Contains logic to translate Acorn tokens into Esprima tokens.
* @param {Object} acornTokTypes The Acorn token types.
* @param {string} code The source code Acorn is parsing. This is necessary
* to correct the "value" property of some tokens.
* @constructor
*/
function TokenTranslator(acornTokTypes, code) {
// token types
this._acornTokTypes = acornTokTypes;
// token buffer for templates
this._tokens = [];
// track the last curly brace
this._curlyBrace = null;
// the source code
this._code = code;
}
TokenTranslator.prototype = {
constructor: TokenTranslator,
/**
* Translates a single Esprima token to a single Acorn token. This may be
* inaccurate due to how templates are handled differently in Esprima and
* Acorn, but should be accurate for all other tokens.
* @param {AcornToken} token The Acorn token to translate.
* @param {Object} extra Espree extra object.
* @returns {EsprimaToken} The Esprima version of the token.
*/
translate(token, extra) {
const type = token.type,
tt = this._acornTokTypes;
if (type === tt.name) {
token.type = Token.Identifier;
// TODO: See if this is an Acorn bug
if (token.value === "static") {
token.type = Token.Keyword;
}
if (extra.ecmaVersion > 5 && (token.value === "yield" || token.value === "let")) {
token.type = Token.Keyword;
}
} else if (type === tt.privateId) {
token.type = Token.PrivateIdentifier;
} else if (type === tt.semi || type === tt.comma ||
type === tt.parenL || type === tt.parenR ||
type === tt.braceL || type === tt.braceR ||
type === tt.dot || type === tt.bracketL ||
type === tt.colon || type === tt.question ||
type === tt.bracketR || type === tt.ellipsis ||
type === tt.arrow || type === tt.jsxTagStart ||
type === tt.incDec || type === tt.starstar ||
type === tt.jsxTagEnd || type === tt.prefix ||
type === tt.questionDot ||
(type.binop && !type.keyword) ||
type.isAssign) {
token.type = Token.Punctuator;
token.value = this._code.slice(token.start, token.end);
} else if (type === tt.jsxName) {
token.type = Token.JSXIdentifier;
} else if (type.label === "jsxText" || type === tt.jsxAttrValueToken) {
token.type = Token.JSXText;
} else if (type.keyword) {
if (type.keyword === "true" || type.keyword === "false") {
token.type = Token.Boolean;
} else if (type.keyword === "null") {
token.type = Token.Null;
} else {
token.type = Token.Keyword;
}
} else if (type === tt.num) {
token.type = Token.Numeric;
token.value = this._code.slice(token.start, token.end);
} else if (type === tt.string) {
if (extra.jsxAttrValueToken) {
extra.jsxAttrValueToken = false;
token.type = Token.JSXText;
} else {
token.type = Token.String;
}
token.value = this._code.slice(token.start, token.end);
} else if (type === tt.regexp) {
token.type = Token.RegularExpression;
const value = token.value;
token.regex = {
flags: value.flags,
pattern: value.pattern
};
token.value = `/${value.pattern}/${value.flags}`;
}
return token;
},
/**
* Function to call during Acorn's onToken handler.
* @param {AcornToken} token The Acorn token.
* @param {Object} extra The Espree extra object.
* @returns {void}
*/
onToken(token, extra) {
const tt = this._acornTokTypes,
tokens = extra.tokens,
templateTokens = this._tokens;
/**
* Flushes the buffered template tokens and resets the template
* tracking.
* @returns {void}
* @private
*/
const translateTemplateTokens = () => {
tokens.push(convertTemplatePart(this._tokens, this._code));
this._tokens = [];
};
if (token.type === tt.eof) {
// might be one last curlyBrace
if (this._curlyBrace) {
tokens.push(this.translate(this._curlyBrace, extra));
}
return;
}
if (token.type === tt.backQuote) {
// if there's already a curly, it's not part of the template
if (this._curlyBrace) {
tokens.push(this.translate(this._curlyBrace, extra));
this._curlyBrace = null;
}
templateTokens.push(token);
// it's the end
if (templateTokens.length > 1) {
translateTemplateTokens();
}
return;
}
if (token.type === tt.dollarBraceL) {
templateTokens.push(token);
translateTemplateTokens();
return;
}
if (token.type === tt.braceR) {
// if there's already a curly, it's not part of the template
if (this._curlyBrace) {
tokens.push(this.translate(this._curlyBrace, extra));
}
// store new curly for later
this._curlyBrace = token;
return;
}
if (token.type === tt.template || token.type === tt.invalidTemplate) {
if (this._curlyBrace) {
templateTokens.push(this._curlyBrace);
this._curlyBrace = null;
}
templateTokens.push(token);
return;
}
if (this._curlyBrace) {
tokens.push(this.translate(this._curlyBrace, extra));
this._curlyBrace = null;
}
tokens.push(this.translate(token, extra));
}
};
/**
* @fileoverview A collection of methods for processing Espree's options.
* @author Kai Cataldo
*/
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
const SUPPORTED_VERSIONS = [
3,
5,
6, // 2015
7, // 2016
8, // 2017
9, // 2018
10, // 2019
11, // 2020
12, // 2021
13, // 2022
14, // 2023
15, // 2024
16, // 2025
17 // 2026
];
/**
* Get the latest ECMAScript version supported by Espree.
* @returns {number} The latest ECMAScript version.
*/
function getLatestEcmaVersion() {
return SUPPORTED_VERSIONS.at(-1);
}
/**
* Get the list of ECMAScript versions supported by Espree.
* @returns {number[]} An array containing the supported ECMAScript versions.
*/
function getSupportedEcmaVersions() {
return [...SUPPORTED_VERSIONS];
}
/**
* Normalize ECMAScript version from the initial config
* @param {(number|"latest")} ecmaVersion ECMAScript version from the initial config
* @throws {Error} throws an error if the ecmaVersion is invalid.
* @returns {number} normalized ECMAScript version
*/
function normalizeEcmaVersion(ecmaVersion = 5) {
let version = ecmaVersion === "latest" ? getLatestEcmaVersion() : ecmaVersion;
if (typeof version !== "number") {
throw new Error(`ecmaVersion must be a number or "latest". Received value of type ${typeof ecmaVersion} instead.`);
}
// Calculate ECMAScript edition number from official year version starting with
// ES2015, which corresponds with ES6 (or a difference of 2009).
if (version >= 2015) {
version -= 2009;
}
if (!SUPPORTED_VERSIONS.includes(version)) {
throw new Error("Invalid ecmaVersion.");
}
return version;
}
/**
* Normalize sourceType from the initial config
* @param {string} sourceType to normalize
* @throws {Error} throw an error if sourceType is invalid
* @returns {string} normalized sourceType
*/
function normalizeSourceType(sourceType = "script") {
if (sourceType === "script" || sourceType === "module") {
return sourceType;
}
if (sourceType === "commonjs") {
return "script";
}
throw new Error("Invalid sourceType.");
}
/**
* Normalize parserOptions
* @param {Object} options the parser options to normalize
* @throws {Error} throw an error if found invalid option.
* @returns {Object} normalized options
*/
function normalizeOptions(options) {
const ecmaVersion = normalizeEcmaVersion(options.ecmaVersion);
const sourceType = normalizeSourceType(options.sourceType);
const ranges = options.range === true;
const locations = options.loc === true;
if (ecmaVersion !== 3 && options.allowReserved) {
// a value of `false` is intentionally allowed here, so a shared config can overwrite it when needed
throw new Error("`allowReserved` is only supported when ecmaVersion is 3");
}
if (typeof options.allowReserved !== "undefined" && typeof options.allowReserved !== "boolean") {
throw new Error("`allowReserved`, when present, must be `true` or `false`");
}
const allowReserved = ecmaVersion === 3 ? (options.allowReserved || "never") : false;
const ecmaFeatures = options.ecmaFeatures || {};
const allowReturnOutsideFunction = options.sourceType === "commonjs" ||
Boolean(ecmaFeatures.globalReturn);
if (sourceType === "module" && ecmaVersion < 6) {
throw new Error("sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding `{ ecmaVersion: 2015 }` to the parser options.");
}
return Object.assign({}, options, {
ecmaVersion,
sourceType,
ranges,
locations,
allowReserved,
allowReturnOutsideFunction
});
}
/* eslint no-param-reassign: 0 -- stylistic choice */
const STATE = Symbol("espree's internal state");
const ESPRIMA_FINISH_NODE = Symbol("espree's esprimaFinishNode");
/**
* Converts an Acorn comment to a Esprima comment.
* @param {boolean} block True if it's a block comment, false if not.
* @param {string} text The text of the comment.
* @param {int} start The index at which the comment starts.
* @param {int} end The index at which the comment ends.
* @param {Location} startLoc The location at which the comment starts.
* @param {Location} endLoc The location at which the comment ends.
* @param {string} code The source code being parsed.
* @returns {Object} The comment object.
* @private
*/
function convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code) {
let type;
if (block) {
type = "Block";
} else if (code.slice(start, start + 2) === "#!") {
type = "Hashbang";
} else {
type = "Line";
}
const comment = {
type,
value: text
};
if (typeof start === "number") {
comment.start = start;
comment.end = end;
comment.range = [start, end];
}
if (typeof startLoc === "object") {
comment.loc = {
start: startLoc,
end: endLoc
};
}
return comment;
}
var espree = () => Parser => {
const tokTypes = Object.assign({}, Parser.acorn.tokTypes);
if (Parser.acornJsx) {
Object.assign(tokTypes, Parser.acornJsx.tokTypes);
}
return class Espree extends Parser {
constructor(opts, code) {
if (typeof opts !== "object" || opts === null) {
opts = {};
}
if (typeof code !== "string" && !(code instanceof String)) {
code = String(code);
}
// save original source type in case of commonjs
const originalSourceType = opts.sourceType;
const options = normalizeOptions(opts);
const ecmaFeatures = options.ecmaFeatures || {};
const tokenTranslator =
options.tokens === true
? new TokenTranslator(tokTypes, code)
: null;
/*
* Data that is unique to Espree and is not represented internally
* in Acorn.
*
* For ES2023 hashbangs, Espree will call `onComment()` during the
* constructor, so we must define state before having access to
* `this`.
*/
const state = {
originalSourceType: originalSourceType || options.sourceType,
tokens: tokenTranslator ? [] : null,
comments: options.comment === true ? [] : null,
impliedStrict: ecmaFeatures.impliedStrict === true && options.ecmaVersion >= 5,
ecmaVersion: options.ecmaVersion,
jsxAttrValueToken: false,
lastToken: null,
templateElements: []
};
// Initialize acorn parser.
super({
// do not use spread, because we don't want to pass any unknown options to acorn
ecmaVersion: options.ecmaVersion,
sourceType: options.sourceType,
ranges: options.ranges,
locations: options.locations,
allowReserved: options.allowReserved,
// Truthy value is true for backward compatibility.
allowReturnOutsideFunction: options.allowReturnOutsideFunction,
// Collect tokens
onToken(token) {
if (tokenTranslator) {
// Use `tokens`, `ecmaVersion`, and `jsxAttrValueToken` in the state.
tokenTranslator.onToken(token, state);
}
if (token.type !== tokTypes.eof) {
state.lastToken = token;
}
},
// Collect comments
onComment(block, text, start, end, startLoc, endLoc) {
if (state.comments) {
const comment = convertAcornCommentToEsprimaComment(block, text, start, end, startLoc, endLoc, code);
state.comments.push(comment);
}
}
}, code);
/*
* We put all of this data into a symbol property as a way to avoid
* potential naming conflicts with future versions of Acorn.
*/
this[STATE] = state;
}
tokenize() {
do {
this.next();
} while (this.type !== tokTypes.eof);
// Consume the final eof token
this.next();
const extra = this[STATE];
const tokens = extra.tokens;
if (extra.comments) {
tokens.comments = extra.comments;
}
return tokens;
}
finishNode(...args) {
const result = super.finishNode(...args);
return this[ESPRIMA_FINISH_NODE](result);
}
finishNodeAt(...args) {
const result = super.finishNodeAt(...args);
return this[ESPRIMA_FINISH_NODE](result);
}
parse() {
const extra = this[STATE];
const program = super.parse();
program.sourceType = extra.originalSourceType;
if (extra.comments) {
program.comments = extra.comments;
}
if (extra.tokens) {
program.tokens = extra.tokens;
}
/*
* Adjust opening and closing position of program to match Esprima.
* Acorn always starts programs at range 0 whereas Esprima starts at the
* first AST node's start (the only real difference is when there's leading
* whitespace or leading comments). Acorn also counts trailing whitespace
* as part of the program whereas Esprima only counts up to the last token.
*/
if (program.body.length) {
const [firstNode] = program.body;
if (program.range) {
program.range[0] = firstNode.range[0];
}
if (program.loc) {
program.loc.start = firstNode.loc.start;
}
program.start = firstNode.start;
}
if (extra.lastToken) {
if (program.range) {
program.range[1] = extra.lastToken.range[1];
}
if (program.loc) {
program.loc.end = extra.lastToken.loc.end;
}
program.end = extra.lastToken.end;
}
/*
* https://github.com/eslint/espree/issues/349
* Ensure that template elements have correct range information.
* This is one location where Acorn produces a different value
* for its start and end properties vs. the values present in the
* range property. In order to avoid confusion, we set the start
* and end properties to the values that are present in range.
* This is done here, instead of in finishNode(), because Acorn
* uses the values of start and end internally while parsing, making
* it dangerous to change those values while parsing is ongoing.
* By waiting until the end of parsing, we can safely change these
* values without affect any other part of the process.
*/
this[STATE].templateElements.forEach(templateElement => {
const startOffset = -1;
const endOffset = templateElement.tail ? 1 : 2;
templateElement.start += startOffset;
templateElement.end += endOffset;
if (templateElement.range) {
templateElement.range[0] += startOffset;
templateElement.range[1] += endOffset;
}
if (templateElement.loc) {
templateElement.loc.start.column += startOffset;
templateElement.loc.end.column += endOffset;
}
});
return program;
}
parseTopLevel(node) {
if (this[STATE].impliedStrict) {
this.strict = true;
}
return super.parseTopLevel(node);
}
/**
* Overwrites the default raise method to throw Esprima-style errors.
* @param {int} pos The position of the error.
* @param {string} message The error message.
* @throws {SyntaxError} A syntax error.
* @returns {void}
*/
raise(pos, message) {
const loc = Parser.acorn.getLineInfo(this.input, pos);
const err = new SyntaxError(message);
err.index = pos;
err.lineNumber = loc.line;
err.column = loc.column + 1; // acorn uses 0-based columns
throw err;
}
/**
* Overwrites the default raise method to throw Esprima-style errors.
* @param {int} pos The position of the error.
* @param {string} message The error message.
* @throws {SyntaxError} A syntax error.
* @returns {void}
*/
raiseRecoverable(pos, message) {
this.raise(pos, message);
}
/**
* Overwrites the default unexpected method to throw Esprima-style errors.
* @param {int} pos The position of the error.
* @throws {SyntaxError} A syntax error.
* @returns {void}
*/
unexpected(pos) {
let message = "Unexpected token";
if (pos !== null && pos !== void 0) {
this.pos = pos;
if (this.options.locations) {
while (this.pos < this.lineStart) {
this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
--this.curLine;
}
}
this.nextToken();
}
if (this.end > this.start) {
message += ` ${this.input.slice(this.start, this.end)}`;
}
this.raise(this.start, message);
}
/*
* Esprima-FB represents JSX strings as tokens called "JSXText", but Acorn-JSX
* uses regular tt.string without any distinction between this and regular JS
* strings. As such, we intercept an attempt to read a JSX string and set a flag
* on extra so that when tokens are converted, the next token will be switched
* to JSXText via onToken.
*/
jsx_readString(quote) { // eslint-disable-line camelcase -- required by API
const result = super.jsx_readString(quote);
if (this.type === tokTypes.string) {
this[STATE].jsxAttrValueToken = true;
}
return result;
}
/**
* Performs last-minute Esprima-specific compatibility checks and fixes.
* @param {ASTNode} result The node to check.
* @returns {ASTNode} The finished node.
*/
[ESPRIMA_FINISH_NODE](result) {
// Acorn doesn't count the opening and closing backticks as part of templates
// so we have to adjust ranges/locations appropriately.
if (result.type === "TemplateElement") {
// save template element references to fix start/end later
this[STATE].templateElements.push(result);
}
if (result.type.includes("Function") && !result.generator) {
result.generator = false;
}
return result;
}
};
};
const version$1 = "10.4.0";
/**
* @fileoverview Main Espree file that converts Acorn into Esprima output.
*
* This file contains code from the following MIT-licensed projects:
* 1. Acorn
* 2. Babylon
* 3. Babel-ESLint
*
* This file also contains code from Esprima, which is BSD licensed.
*
* Acorn is Copyright 2012-2015 Acorn Contributors (https://github.com/marijnh/acorn/blob/master/AUTHORS)
* Babylon is Copyright 2014-2015 various contributors (https://github.com/babel/babel/blob/master/packages/babylon/AUTHORS)
* Babel-ESLint is Copyright 2014-2015 Sebastian McKenzie <sebmck@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Esprima is Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// To initialize lazily.
const parsers = {
_regular: null,
_jsx: null,
get regular() {
if (this._regular === null) {
this._regular = acorn__namespace.Parser.extend(espree());
}
return this._regular;
},
get jsx() {
if (this._jsx === null) {
this._jsx = acorn__namespace.Parser.extend(jsx__default["default"](), espree());
}
return this._jsx;
},
get(options) {
const useJsx = Boolean(
options &&
options.ecmaFeatures &&
options.ecmaFeatures.jsx
);
return useJsx ? this.jsx : this.regular;
}
};
//------------------------------------------------------------------------------
// Tokenizer
//------------------------------------------------------------------------------
/**
* Tokenizes the given code.
* @param {string} code The code to tokenize.
* @param {Object} options Options defining how to tokenize.
* @returns {Token[]} An array of tokens.
* @throws {SyntaxError} If the input code is invalid.
* @private
*/
function tokenize(code, options) {
const Parser = parsers.get(options);
// Ensure to collect tokens.
if (!options || options.tokens !== true) {
options = Object.assign({}, options, { tokens: true }); // eslint-disable-line no-param-reassign -- stylistic choice
}
return new Parser(options, code).tokenize();
}
//------------------------------------------------------------------------------
// Parser
//------------------------------------------------------------------------------
/**
* Parses the given code.
* @param {string} code The code to tokenize.
* @param {Object} options Options defining how to tokenize.
* @returns {ASTNode} The "Program" AST node.
* @throws {SyntaxError} If the input code is invalid.
*/
function parse(code, options) {
const Parser = parsers.get(options);
return new Parser(options, code).parse();
}
//------------------------------------------------------------------------------
// Public
//------------------------------------------------------------------------------
const version = version$1;
const name = "espree";
/* istanbul ignore next */
const VisitorKeys = (function() {
return visitorKeys__namespace.KEYS;
}());
// Derive node types from VisitorKeys
/* istanbul ignore next */
const Syntax = (function() {
let key,
types = {};
if (typeof Object.create === "function") {
types = Object.create(null);
}
for (key in VisitorKeys) {
if (Object.hasOwn(VisitorKeys, key)) {
types[key] = key;
}
}
if (typeof Object.freeze === "function") {
Object.freeze(types);
}
return types;
}());
const latestEcmaVersion = getLatestEcmaVersion();
const supportedEcmaVersions = getSupportedEcmaVersions();
exports.Syntax = Syntax;
exports.VisitorKeys = VisitorKeys;
exports.latestEcmaVersion = latestEcmaVersion;
exports.name = name;
exports.parse = parse;
exports.supportedEcmaVersions = supportedEcmaVersions;
exports.tokenize = tokenize;
exports.version = version;
@@ -0,0 +1 @@
{"name":"@tokenizer/inflate","version":"0.3.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532099325,"integrity":"sha512-JyrgLWtf/dJzAwDQ9B0D1iyQCX/NU0pSiAZbM5H2lKxZmOQf66ZnJKiA4o03x0evO8VEGeWvU5jBnxa3+xeLvw==","mode":420,"size":1086},"lib/GzipHandler.js":{"checkedAt":1794532099325,"integrity":"sha512-K6HJzYotEMFVLzgFeqWUlERTwfNrEmP7ZnppkWBXqAFv3p2fUPUq10iIhz6O0qo7ymcvd1ujwfEhGgDVqBRN1g==","mode":420,"size":1809},"lib/index.js":{"checkedAt":1794532099326,"integrity":"sha512-bYPqvrvUk6sjKMIJTSkGscGedk/A9y78grmPAn1DffGYGht1WxP3qDw1W7EyP3nh1C5dMT395MTqB7Wc70YFag==","mode":420,"size":94},"lib/ZipHandler.js":{"checkedAt":1794532099326,"integrity":"sha512-JAOZKhrIkMZ7fjRre3yWiYF+bR7M27E59DhDIuBSfTIJqANkD6/G6SlrfP8cZ2rgHk5s3QT4ZV8uIh9PrnUjDw==","mode":420,"size":9325},"lib/ZipToken.js":{"checkedAt":1794532099326,"integrity":"sha512-X8AhKi12vACxyJ7WjmRFEEJKcd6Y9lnmv16GDkVI5WTCxUPjOiUIWWwC17I6UdzcZT3P2zDKph4UBloC05/aLw==","mode":420,"size":4836},"package.json":{"checkedAt":1794532099326,"integrity":"sha512-520KcWVpPqc8JXaRXi3eQzlMN+/r6WPu2LhjArL67SVPeeB77coUyJ5hXTKAvvKWYr108RpEfOGATpqqEuxo8A==","mode":420,"size":1955},"README.md":{"checkedAt":1794532099326,"integrity":"sha512-URikp+c12S76r+gDDCQCFypAvj7FyrLxFs+G5WrhdqUfN9ju/qqVi8WlA7728fTPjvXWXW1SjeDH7vwQhLidTQ==","mode":420,"size":4389},"lib/GzipHandler.d.ts":{"checkedAt":1794532099326,"integrity":"sha512-2nzk8h9m02pP1Dkylujk7k6lLSUKpKaxrUMakb22tTgRl6jy2RkOwULqg1Ur0M1qUkATspD+K+SnWiWb+PWB9Q==","mode":420,"size":206},"lib/index.d.ts":{"checkedAt":1794532099327,"integrity":"sha512-TWQ6dby0Qt9VRUBlVpvJ85K6hbEMKZW9zUfMWwhf5n8vlruWkbCv41P3idZO5Tfc1k2F3xjEMFQhHYWIQI5D3g==","mode":420,"size":117},"lib/ZipHandler.d.ts":{"checkedAt":1794532099327,"integrity":"sha512-xK3dxp4yY1jvkvSOQuRLhkebUVWYzknr/d8bWe/zEUxaD/EyqrG05UfD3nenVYX1hWCv3TJrifG5xJR6aWqhpg==","mode":420,"size":989},"lib/ZipToken.d.ts":{"checkedAt":1794532099327,"integrity":"sha512-nf6KvYF35dVuLkimbb3BGahSEpoLpBqrJPNPfnwHXfdcfmi9T/WP9fEx5hpsi9wpZ43Qf6TO5JKJoWMhR7Yx8g==","mode":420,"size":3812}}}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,CAAA;AAuBlB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,KAC1B,IAAI,GAAG,IAAI,CAAA;AA8QhB,eAAO;AACL;;;;;;;;GAQG;AACH,MAAM,OAzMO,OAAO;;wBAPiD,IAAI;AAkNzE;;;;;;GAMG;AACH,IAAI;AAEJ;;;;;;GAMG;AACH,MAAM,YAGP,CAAA"}
@@ -0,0 +1,25 @@
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
export default isIndex;
@@ -0,0 +1,11 @@
import type { ClientRect } from '../../types/rect';
export declare class Rect {
constructor(rect: ClientRect, element: Element);
private rect;
width: number;
height: number;
top: number;
bottom: number;
right: number;
left: number;
}
@@ -0,0 +1,43 @@
var $0294ea432cd92340$exports = require("./usePress.main.js");
var $ev4bP$reactariautils = require("@react-aria/utils");
var $ev4bP$react = require("react");
function $parcel$interopDefault(a) {
return a && a.__esModule ? a.default : a;
}
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "Pressable", () => $e1dbec26039c051d$export$27c701ed9e449e99);
/*
* 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 $e1dbec26039c051d$export$27c701ed9e449e99 = /*#__PURE__*/ (0, ($parcel$interopDefault($ev4bP$react))).forwardRef(({ children: children, ...props }, ref)=>{
ref = (0, $ev4bP$reactariautils.useObjectRef)(ref);
let { pressProps: pressProps } = (0, $0294ea432cd92340$exports.usePress)({
...props,
ref: ref
});
let child = (0, ($parcel$interopDefault($ev4bP$react))).Children.only(children);
return /*#__PURE__*/ (0, ($parcel$interopDefault($ev4bP$react))).cloneElement(child, // @ts-ignore
{
ref: ref,
...(0, $ev4bP$reactariautils.mergeProps)(child.props, pressProps)
});
});
//# sourceMappingURL=Pressable.main.js.map
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const esnext_intl: LibDefinition;
@@ -0,0 +1,38 @@
var $cagC1$react = require("react");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useUpdateEffect", () => $29293a6f5c75b37e$export$496315a1608d9602);
/*
* 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 $29293a6f5c75b37e$export$496315a1608d9602(effect, dependencies) {
const isInitialMount = (0, $cagC1$react.useRef)(true);
const lastDeps = (0, $cagC1$react.useRef)(null);
(0, $cagC1$react.useEffect)(()=>{
isInitialMount.current = true;
return ()=>{
isInitialMount.current = false;
};
}, []);
(0, $cagC1$react.useEffect)(()=>{
if (isInitialMount.current) isInitialMount.current = false;
else if (!lastDeps.current || dependencies.some((dep, i)=>!Object.is(dep, lastDeps[i]))) effect();
lastDeps.current = dependencies;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, dependencies);
}
//# sourceMappingURL=useUpdateEffect.main.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"K D E F wC"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 1C","2":"xC TC 0C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"J ZB K D"},E:{"1":"K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J 2C ZC","132":"ZB"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C FD GD HD ID NC uC JD OC"},G:{"1":"E LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"ZC KD vC"},H:{"2":"hD"},I:{"1":"TC J I lD vC mD nD","2":"iD jD kD"},J:{"1":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"1":"1D 2D"}},B:1,C:"async attribute for external scripts",D:true};
@@ -0,0 +1,121 @@
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
import {
AnchorHTMLAttributes,
ButtonHTMLAttributes,
ElementType,
HTMLAttributes,
InputHTMLAttributes,
RefObject
} from 'react';
import {AriaButtonProps} from '@react-types/button';
import {DOMAttributes} from '@react-types/shared';
import {filterDOMProps, mergeProps} from '@react-aria/utils';
import {useFocusable, usePress} from '@react-aria/interactions';
export interface AriaButtonOptions<E extends ElementType> extends Omit<AriaButtonProps<E>, 'children'> {}
export interface ButtonAria<T> {
/** Props for the button element. */
buttonProps: T,
/** Whether the button is currently pressed. */
isPressed: boolean
}
// Order with overrides is important: 'button' should be default
export function useButton(props: AriaButtonOptions<'button'>, ref: RefObject<HTMLButtonElement | null>): ButtonAria<ButtonHTMLAttributes<HTMLButtonElement>>;
export function useButton(props: AriaButtonOptions<'a'>, ref: RefObject<HTMLAnchorElement | null>): ButtonAria<AnchorHTMLAttributes<HTMLAnchorElement>>;
export function useButton(props: AriaButtonOptions<'div'>, ref: RefObject<HTMLDivElement | null>): ButtonAria<HTMLAttributes<HTMLDivElement>>;
export function useButton(props: AriaButtonOptions<'input'>, ref: RefObject<HTMLInputElement | null>): ButtonAria<InputHTMLAttributes<HTMLInputElement>>;
export function useButton(props: AriaButtonOptions<'span'>, ref: RefObject<HTMLSpanElement | null>): ButtonAria<HTMLAttributes<HTMLSpanElement>>;
export function useButton(props: AriaButtonOptions<ElementType>, ref: RefObject<Element | null>): ButtonAria<DOMAttributes>;
/**
* Provides the behavior and accessibility implementation for a button component. Handles mouse, keyboard, and touch interactions,
* focus behavior, and ARIA props for both native button elements and custom element types.
* @param props - Props to be applied to the button.
* @param ref - A ref to a DOM element for the button.
*/
export function useButton(props: AriaButtonOptions<ElementType>, ref: RefObject<any>): ButtonAria<HTMLAttributes<any>> {
let {
elementType = 'button',
isDisabled,
onPress,
onPressStart,
onPressEnd,
onPressUp,
onPressChange,
preventFocusOnPress,
// @ts-ignore - undocumented
allowFocusWhenDisabled,
onClick,
href,
target,
rel,
type = 'button'
} = props;
let additionalProps;
if (elementType === 'button') {
additionalProps = {
type,
disabled: isDisabled,
form: props.form,
formAction: props.formAction,
formEncType: props.formEncType,
formMethod: props.formMethod,
formNoValidate: props.formNoValidate,
formTarget: props.formTarget,
name: props.name,
value: props.value
};
} else {
additionalProps = {
role: 'button',
href: elementType === 'a' && !isDisabled ? href : undefined,
target: elementType === 'a' ? target : undefined,
type: elementType === 'input' ? type : undefined,
disabled: elementType === 'input' ? isDisabled : undefined,
'aria-disabled': !isDisabled || elementType === 'input' ? undefined : isDisabled,
rel: elementType === 'a' ? rel : undefined
};
}
let {pressProps, isPressed} = usePress({
onPressStart,
onPressEnd,
onPressChange,
onPress,
onPressUp,
onClick,
isDisabled,
preventFocusOnPress,
ref
});
let {focusableProps} = useFocusable(props, ref);
if (allowFocusWhenDisabled) {
focusableProps.tabIndex = isDisabled ? -1 : focusableProps.tabIndex;
}
let buttonProps = mergeProps(focusableProps, pressProps, filterDOMProps(props, {labelable: true}));
return {
isPressed, // Used to indicate press state for visual
buttonProps: mergeProps(additionalProps, buttonProps, {
'aria-haspopup': props['aria-haspopup'],
'aria-expanded': props['aria-expanded'],
'aria-controls': props['aria-controls'],
'aria-pressed': props['aria-pressed'],
'aria-current': props['aria-current'],
'aria-disabled': props['aria-disabled']
})
};
}
@@ -0,0 +1,23 @@
/**
* @fileoverview Types for this package.
*/
import type { ConfigObject } from "@eslint/core";
/**
* Infinite array type.
*/
export type InfiniteArray<T> = T | InfiniteArray<T>[];
/**
* The type of array element in the `extends` property after flattening.
*/
export type SimpleExtendsElement = string | ConfigObject;
/**
* The type of array element in the `extends` property before flattening.
*/
export type ExtendsElement = SimpleExtendsElement | InfiniteArray<ConfigObject>;
/**
* Config with extends. Valid only inside of `defineConfig()`.
*/
export interface ConfigWithExtends extends ConfigObject {
extends?: ExtendsElement[];
}
export type ConfigWithExtendsArray = InfiniteArray<ConfigWithExtends>[];
@@ -0,0 +1,45 @@
function _asyncIterator(r) {
var n,
t,
o,
e = 2;
for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
if (t && null != (n = r[t])) return n.call(r);
if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
t = "@@asyncIterator", o = "@@iterator";
}
throw new TypeError("Object is not async iterable");
}
function AsyncFromSyncIterator(r) {
function AsyncFromSyncIteratorContinuation(r) {
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
var n = r.done;
return Promise.resolve(r.value).then(function (r) {
return {
value: r,
done: n
};
});
}
return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) {
this.s = r, this.n = r.next;
}, AsyncFromSyncIterator.prototype = {
s: null,
n: null,
next: function next() {
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
},
"return": function _return(r) {
var n = this.s["return"];
return void 0 === n ? Promise.resolve({
value: r,
done: !0
}) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
},
"throw": function _throw(r) {
var n = this.s["return"];
return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
}
}, new AsyncFromSyncIterator(r);
}
export { _asyncIterator as default };
@@ -0,0 +1,686 @@
var url = require("url");
var URL = url.URL;
var http = require("http");
var https = require("https");
var Writable = require("stream").Writable;
var assert = require("assert");
var debug = require("./debug");
// Preventive platform detection
// istanbul ignore next
(function detectUnsupportedEnvironment() {
var looksLikeNode = typeof process !== "undefined";
var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
var looksLikeV8 = isFunction(Error.captureStackTrace);
if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
console.warn("The follow-redirects package should be excluded from browser builds.");
}
}());
// Whether to use the native URL object or the legacy url module
var useNativeURL = false;
try {
assert(new URL(""));
}
catch (error) {
useNativeURL = error.code === "ERR_INVALID_URL";
}
// URL fields to preserve in copy operations
var preservedUrlFields = [
"auth",
"host",
"hostname",
"href",
"path",
"pathname",
"port",
"protocol",
"query",
"search",
"hash",
];
// Create handlers that pass events from native requests
var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
var eventHandlers = Object.create(null);
events.forEach(function (event) {
eventHandlers[event] = function (arg1, arg2, arg3) {
this._redirectable.emit(event, arg1, arg2, arg3);
};
});
// Error types with codes
var InvalidUrlError = createErrorType(
"ERR_INVALID_URL",
"Invalid URL",
TypeError
);
var RedirectionError = createErrorType(
"ERR_FR_REDIRECTION_FAILURE",
"Redirected request failed"
);
var TooManyRedirectsError = createErrorType(
"ERR_FR_TOO_MANY_REDIRECTS",
"Maximum number of redirects exceeded",
RedirectionError
);
var MaxBodyLengthExceededError = createErrorType(
"ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
"Request body larger than maxBodyLength limit"
);
var WriteAfterEndError = createErrorType(
"ERR_STREAM_WRITE_AFTER_END",
"write after end"
);
// istanbul ignore next
var destroy = Writable.prototype.destroy || noop;
// An HTTP(S) request that can be redirected
function RedirectableRequest(options, responseCallback) {
// Initialize the request
Writable.call(this);
this._sanitizeOptions(options);
this._options = options;
this._ended = false;
this._ending = false;
this._redirectCount = 0;
this._redirects = [];
this._requestBodyLength = 0;
this._requestBodyBuffers = [];
// Attach a callback if passed
if (responseCallback) {
this.on("response", responseCallback);
}
// React to responses of native requests
var self = this;
this._onNativeResponse = function (response) {
try {
self._processResponse(response);
}
catch (cause) {
self.emit("error", cause instanceof RedirectionError ?
cause : new RedirectionError({ cause: cause }));
}
};
// Perform the first request
this._performRequest();
}
RedirectableRequest.prototype = Object.create(Writable.prototype);
RedirectableRequest.prototype.abort = function () {
destroyRequest(this._currentRequest);
this._currentRequest.abort();
this.emit("abort");
};
RedirectableRequest.prototype.destroy = function (error) {
destroyRequest(this._currentRequest, error);
destroy.call(this, error);
return this;
};
// Writes buffered data to the current native request
RedirectableRequest.prototype.write = function (data, encoding, callback) {
// Writing is not allowed if end has been called
if (this._ending) {
throw new WriteAfterEndError();
}
// Validate input and shift parameters if necessary
if (!isString(data) && !isBuffer(data)) {
throw new TypeError("data should be a string, Buffer or Uint8Array");
}
if (isFunction(encoding)) {
callback = encoding;
encoding = null;
}
// Ignore empty buffers, since writing them doesn't invoke the callback
// https://github.com/nodejs/node/issues/22066
if (data.length === 0) {
if (callback) {
callback();
}
return;
}
// Only write when we don't exceed the maximum body length
if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
this._requestBodyLength += data.length;
this._requestBodyBuffers.push({ data: data, encoding: encoding });
this._currentRequest.write(data, encoding, callback);
}
// Error when we exceed the maximum body length
else {
this.emit("error", new MaxBodyLengthExceededError());
this.abort();
}
};
// Ends the current native request
RedirectableRequest.prototype.end = function (data, encoding, callback) {
// Shift parameters if necessary
if (isFunction(data)) {
callback = data;
data = encoding = null;
}
else if (isFunction(encoding)) {
callback = encoding;
encoding = null;
}
// Write data if needed and end
if (!data) {
this._ended = this._ending = true;
this._currentRequest.end(null, null, callback);
}
else {
var self = this;
var currentRequest = this._currentRequest;
this.write(data, encoding, function () {
self._ended = true;
currentRequest.end(null, null, callback);
});
this._ending = true;
}
};
// Sets a header value on the current native request
RedirectableRequest.prototype.setHeader = function (name, value) {
this._options.headers[name] = value;
this._currentRequest.setHeader(name, value);
};
// Clears a header value on the current native request
RedirectableRequest.prototype.removeHeader = function (name) {
delete this._options.headers[name];
this._currentRequest.removeHeader(name);
};
// Global timeout for all underlying requests
RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
var self = this;
// Destroys the socket on timeout
function destroyOnTimeout(socket) {
socket.setTimeout(msecs);
socket.removeListener("timeout", socket.destroy);
socket.addListener("timeout", socket.destroy);
}
// Sets up a timer to trigger a timeout event
function startTimer(socket) {
if (self._timeout) {
clearTimeout(self._timeout);
}
self._timeout = setTimeout(function () {
self.emit("timeout");
clearTimer();
}, msecs);
destroyOnTimeout(socket);
}
// Stops a timeout from triggering
function clearTimer() {
// Clear the timeout
if (self._timeout) {
clearTimeout(self._timeout);
self._timeout = null;
}
// Clean up all attached listeners
self.removeListener("abort", clearTimer);
self.removeListener("error", clearTimer);
self.removeListener("response", clearTimer);
self.removeListener("close", clearTimer);
if (callback) {
self.removeListener("timeout", callback);
}
if (!self.socket) {
self._currentRequest.removeListener("socket", startTimer);
}
}
// Attach callback if passed
if (callback) {
this.on("timeout", callback);
}
// Start the timer if or when the socket is opened
if (this.socket) {
startTimer(this.socket);
}
else {
this._currentRequest.once("socket", startTimer);
}
// Clean up on events
this.on("socket", destroyOnTimeout);
this.on("abort", clearTimer);
this.on("error", clearTimer);
this.on("response", clearTimer);
this.on("close", clearTimer);
return this;
};
// Proxy all other public ClientRequest methods
[
"flushHeaders", "getHeader",
"setNoDelay", "setSocketKeepAlive",
].forEach(function (method) {
RedirectableRequest.prototype[method] = function (a, b) {
return this._currentRequest[method](a, b);
};
});
// Proxy all public ClientRequest properties
["aborted", "connection", "socket"].forEach(function (property) {
Object.defineProperty(RedirectableRequest.prototype, property, {
get: function () { return this._currentRequest[property]; },
});
});
RedirectableRequest.prototype._sanitizeOptions = function (options) {
// Ensure headers are always present
if (!options.headers) {
options.headers = {};
}
// Since http.request treats host as an alias of hostname,
// but the url module interprets host as hostname plus port,
// eliminate the host property to avoid confusion.
if (options.host) {
// Use hostname if set, because it has precedence
if (!options.hostname) {
options.hostname = options.host;
}
delete options.host;
}
// Complete the URL object when necessary
if (!options.pathname && options.path) {
var searchPos = options.path.indexOf("?");
if (searchPos < 0) {
options.pathname = options.path;
}
else {
options.pathname = options.path.substring(0, searchPos);
options.search = options.path.substring(searchPos);
}
}
};
// Executes the next native request (initial or redirect)
RedirectableRequest.prototype._performRequest = function () {
// Load the native protocol
var protocol = this._options.protocol;
var nativeProtocol = this._options.nativeProtocols[protocol];
if (!nativeProtocol) {
throw new TypeError("Unsupported protocol " + protocol);
}
// If specified, use the agent corresponding to the protocol
// (HTTP and HTTPS use different types of agents)
if (this._options.agents) {
var scheme = protocol.slice(0, -1);
this._options.agent = this._options.agents[scheme];
}
// Create the native request and set up its event handlers
var request = this._currentRequest =
nativeProtocol.request(this._options, this._onNativeResponse);
request._redirectable = this;
for (var event of events) {
request.on(event, eventHandlers[event]);
}
// RFC7230§5.3.1: When making a request directly to an origin server, […]
// a client MUST send only the absolute path […] as the request-target.
this._currentUrl = /^\//.test(this._options.path) ?
url.format(this._options) :
// When making a request to a proxy, […]
// a client MUST send the target URI in absolute-form […].
this._options.path;
// End a redirected request
// (The first request must be ended explicitly with RedirectableRequest#end)
if (this._isRedirect) {
// Write the request entity and end
var i = 0;
var self = this;
var buffers = this._requestBodyBuffers;
(function writeNext(error) {
// Only write if this request has not been redirected yet
// istanbul ignore else
if (request === self._currentRequest) {
// Report any write errors
// istanbul ignore if
if (error) {
self.emit("error", error);
}
// Write the next buffer if there are still left
else if (i < buffers.length) {
var buffer = buffers[i++];
// istanbul ignore else
if (!request.finished) {
request.write(buffer.data, buffer.encoding, writeNext);
}
}
// End the request if `end` has been called on us
else if (self._ended) {
request.end();
}
}
}());
}
};
// Processes a response from the current native request
RedirectableRequest.prototype._processResponse = function (response) {
// Store the redirected response
var statusCode = response.statusCode;
if (this._options.trackRedirects) {
this._redirects.push({
url: this._currentUrl,
headers: response.headers,
statusCode: statusCode,
});
}
// RFC7231§6.4: The 3xx (Redirection) class of status code indicates
// that further action needs to be taken by the user agent in order to
// fulfill the request. If a Location header field is provided,
// the user agent MAY automatically redirect its request to the URI
// referenced by the Location field value,
// even if the specific status code is not understood.
// If the response is not a redirect; return it as-is
var location = response.headers.location;
if (!location || this._options.followRedirects === false ||
statusCode < 300 || statusCode >= 400) {
response.responseUrl = this._currentUrl;
response.redirects = this._redirects;
this.emit("response", response);
// Clean up
this._requestBodyBuffers = [];
return;
}
// The response is a redirect, so abort the current request
destroyRequest(this._currentRequest);
// Discard the remainder of the response to avoid waiting for data
response.destroy();
// RFC7231§6.4: A client SHOULD detect and intervene
// in cyclical redirections (i.e., "infinite" redirection loops).
if (++this._redirectCount > this._options.maxRedirects) {
throw new TooManyRedirectsError();
}
// Store the request headers if applicable
var requestHeaders;
var beforeRedirect = this._options.beforeRedirect;
if (beforeRedirect) {
requestHeaders = Object.assign({
// The Host header was set by nativeProtocol.request
Host: response.req.getHeader("host"),
}, this._options.headers);
}
// RFC7231§6.4: Automatic redirection needs to done with
// care for methods not known to be safe, […]
// RFC7231§6.4.2–3: For historical reasons, a user agent MAY change
// the request method from POST to GET for the subsequent request.
var method = this._options.method;
if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" ||
// RFC7231§6.4.4: The 303 (See Other) status code indicates that
// the server is redirecting the user agent to a different resource […]
// A user agent can perform a retrieval request targeting that URI
// (a GET or HEAD request if using HTTP) […]
(statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {
this._options.method = "GET";
// Drop a possible entity and headers related to it
this._requestBodyBuffers = [];
removeMatchingHeaders(/^content-/i, this._options.headers);
}
// Drop the Host header, as the redirect might lead to a different host
var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
// If the redirect is relative, carry over the host of the last request
var currentUrlParts = parseUrl(this._currentUrl);
var currentHost = currentHostHeader || currentUrlParts.host;
var currentUrl = /^\w+:/.test(location) ? this._currentUrl :
url.format(Object.assign(currentUrlParts, { host: currentHost }));
// Create the redirected request
var redirectUrl = resolveUrl(location, currentUrl);
debug("redirecting to", redirectUrl.href);
this._isRedirect = true;
spreadUrlObject(redirectUrl, this._options);
// Drop confidential headers when redirecting to a less secure protocol
// or to a different domain that is not a superdomain
if (redirectUrl.protocol !== currentUrlParts.protocol &&
redirectUrl.protocol !== "https:" ||
redirectUrl.host !== currentHost &&
!isSubdomain(redirectUrl.host, currentHost)) {
removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
}
// Evaluate the beforeRedirect callback
if (isFunction(beforeRedirect)) {
var responseDetails = {
headers: response.headers,
statusCode: statusCode,
};
var requestDetails = {
url: currentUrl,
method: method,
headers: requestHeaders,
};
beforeRedirect(this._options, responseDetails, requestDetails);
this._sanitizeOptions(this._options);
}
// Perform the redirected request
this._performRequest();
};
// Wraps the key/value object of protocols with redirect functionality
function wrap(protocols) {
// Default settings
var exports = {
maxRedirects: 21,
maxBodyLength: 10 * 1024 * 1024,
};
// Wrap each protocol
var nativeProtocols = {};
Object.keys(protocols).forEach(function (scheme) {
var protocol = scheme + ":";
var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
// Executes a request, following redirects
function request(input, options, callback) {
// Parse parameters, ensuring that input is an object
if (isURL(input)) {
input = spreadUrlObject(input);
}
else if (isString(input)) {
input = spreadUrlObject(parseUrl(input));
}
else {
callback = options;
options = validateUrl(input);
input = { protocol: protocol };
}
if (isFunction(options)) {
callback = options;
options = null;
}
// Set defaults
options = Object.assign({
maxRedirects: exports.maxRedirects,
maxBodyLength: exports.maxBodyLength,
}, input, options);
options.nativeProtocols = nativeProtocols;
if (!isString(options.host) && !isString(options.hostname)) {
options.hostname = "::1";
}
assert.equal(options.protocol, protocol, "protocol mismatch");
debug("options", options);
return new RedirectableRequest(options, callback);
}
// Executes a GET request, following redirects
function get(input, options, callback) {
var wrappedRequest = wrappedProtocol.request(input, options, callback);
wrappedRequest.end();
return wrappedRequest;
}
// Expose the properties on the wrapped protocol
Object.defineProperties(wrappedProtocol, {
request: { value: request, configurable: true, enumerable: true, writable: true },
get: { value: get, configurable: true, enumerable: true, writable: true },
});
});
return exports;
}
function noop() { /* empty */ }
function parseUrl(input) {
var parsed;
// istanbul ignore else
if (useNativeURL) {
parsed = new URL(input);
}
else {
// Ensure the URL is valid and absolute
parsed = validateUrl(url.parse(input));
if (!isString(parsed.protocol)) {
throw new InvalidUrlError({ input });
}
}
return parsed;
}
function resolveUrl(relative, base) {
// istanbul ignore next
return useNativeURL ? new URL(relative, base) : parseUrl(url.resolve(base, relative));
}
function validateUrl(input) {
if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
throw new InvalidUrlError({ input: input.href || input });
}
if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
throw new InvalidUrlError({ input: input.href || input });
}
return input;
}
function spreadUrlObject(urlObject, target) {
var spread = target || {};
for (var key of preservedUrlFields) {
spread[key] = urlObject[key];
}
// Fix IPv6 hostname
if (spread.hostname.startsWith("[")) {
spread.hostname = spread.hostname.slice(1, -1);
}
// Ensure port is a number
if (spread.port !== "") {
spread.port = Number(spread.port);
}
// Concatenate path
spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
return spread;
}
function removeMatchingHeaders(regex, headers) {
var lastValue;
for (var header in headers) {
if (regex.test(header)) {
lastValue = headers[header];
delete headers[header];
}
}
return (lastValue === null || typeof lastValue === "undefined") ?
undefined : String(lastValue).trim();
}
function createErrorType(code, message, baseClass) {
// Create constructor
function CustomError(properties) {
// istanbul ignore else
if (isFunction(Error.captureStackTrace)) {
Error.captureStackTrace(this, this.constructor);
}
Object.assign(this, properties || {});
this.code = code;
this.message = this.cause ? message + ": " + this.cause.message : message;
}
// Attach constructor and set default properties
CustomError.prototype = new (baseClass || Error)();
Object.defineProperties(CustomError.prototype, {
constructor: {
value: CustomError,
enumerable: false,
},
name: {
value: "Error [" + code + "]",
enumerable: false,
},
});
return CustomError;
}
function destroyRequest(request, error) {
for (var event of events) {
request.removeListener(event, eventHandlers[event]);
}
request.on("error", noop);
request.destroy(error);
}
function isSubdomain(subdomain, domain) {
assert(isString(subdomain) && isString(domain));
var dot = subdomain.length - domain.length - 1;
return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
}
function isString(value) {
return typeof value === "string" || value instanceof String;
}
function isFunction(value) {
return typeof value === "function";
}
function isBuffer(value) {
return typeof value === "object" && ("length" in value);
}
function isURL(value) {
return URL && value instanceof URL;
}
// Exports
module.exports = wrap({ http: http, https: https });
module.exports.wrap = wrap;
@@ -0,0 +1,41 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Proxy` class.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-proxy.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' class is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
Proxy: { [READ]: true },
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAA;AAExC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EACL,SAAS,EACT,OAAO,IAAI,SAAS,EACpB,WAAW,EACX,YAAY,EACZ,YAAY,IAAI,GAAG,GACpB,MAAM,IAAI,CAAA;AACX,OAAO,KAAK,QAAQ,MAAM,SAAS,CAAA;AAEnC,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,CAAA;AAC/B,yDAAyD;AACzD,8CAA8C;AAE9C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAErE,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAqEnC,MAAM,SAAS,GAAY;IACzB,SAAS;IACT,OAAO,EAAE,SAAS;IAClB,WAAW;IACX,YAAY;IACZ,YAAY;IACZ,QAAQ,EAAE;QACR,KAAK;QACL,OAAO;QACP,QAAQ;QACR,QAAQ;KACT;CACF,CAAA;AAED,0DAA0D;AAC1D,MAAM,YAAY,GAAG,CAAC,QAAmB,EAAW,EAAE,CACpD,CAAC,QAAQ,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,QAAQ,CAAC,CAAC;IAC5D,SAAS;IACX,CAAC,CAAC;QACE,GAAG,SAAS;QACZ,GAAG,QAAQ;QACX,QAAQ,EAAE;YACR,GAAG,SAAS,CAAC,QAAQ;YACrB,GAAG,CAAC,QAAQ,CAAC,QAAQ,IAAI,EAAE,CAAC;SAC7B;KACF,CAAA;AAEL,uCAAuC;AACvC,MAAM,cAAc,GAAG,wBAAwB,CAAA;AAC/C,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAU,EAAE,CAC9C,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;AAE/D,+CAA+C;AAC/C,MAAM,SAAS,GAAG,QAAQ,CAAA;AAE1B,MAAM,OAAO,GAAG,CAAC,CAAA,CAAC,sCAAsC;AACxD,MAAM,KAAK,GAAG,MAAM,CAAA;AACpB,MAAM,KAAK,GAAG,MAAM,CAAA;AACpB,MAAM,KAAK,GAAG,MAAM,CAAA;AACpB,MAAM,KAAK,GAAG,MAAM,CAAA;AACpB,MAAM,KAAK,GAAG,MAAM,CAAA;AACpB,MAAM,KAAK,GAAG,MAAM,CAAA;AACpB,MAAM,MAAM,GAAG,MAAM,CAAA;AACrB,MAAM,IAAI,GAAG,MAAM,CAAA;AAYnB,2BAA2B;AAC3B,MAAM,YAAY,GAAG,CAAC,IAAI,CAAA;AAE1B,gEAAgE;AAChE,MAAM,cAAc,GAAG,gBAAgB,CAAA;AACvC,iCAAiC;AACjC,MAAM,YAAY,GAAG,gBAAgB,CAAA;AACrC,kEAAkE;AAClE,MAAM,OAAO,GAAG,gBAAgB,CAAA;AAChC,yDAAyD;AACzD,gEAAgE;AAChE,MAAM,MAAM,GAAG,gBAAgB,CAAA;AAC/B,0EAA0E;AAC1E,6BAA6B;AAC7B,MAAM,WAAW,GAAG,gBAAgB,CAAA;AACpC,sCAAsC;AACtC,MAAM,WAAW,GAAG,gBAAgB,CAAA;AAEpC,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAAA;AAC/C,MAAM,QAAQ,GAAG,gBAAgB,CAAA;AAEjC,MAAM,SAAS,GAAG,CAAC,CAAiB,EAAE,EAAE,CACtC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK;IAClB,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK;QACzB,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,KAAK;YAC5B,CAAC,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,KAAK;gBAC/B,CAAC,CAAC,CAAC,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC,KAAK;oBAC3B,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM;wBACvB,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,KAAK;4BACpB,CAAC,CAAC,OAAO,CAAA;AAEX,+BAA+B;AAC/B,MAAM,cAAc,GAAG,IAAI,GAAG,EAAkB,CAAA;AAChD,MAAM,SAAS,GAAG,CAAC,CAAS,EAAE,EAAE;IAC9B,MAAM,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAC/B,IAAI,CAAC;QAAE,OAAO,CAAC,CAAA;IACf,MAAM,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IAC7B,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACxB,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAED,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAkB,CAAA;AACtD,MAAM,eAAe,GAAG,CAAC,CAAS,EAAE,EAAE;IACpC,MAAM,CAAC,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IACrC,IAAI,CAAC;QAAE,OAAO,CAAC,CAAA;IACf,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAA;IACpC,oBAAoB,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IAC9B,OAAO,CAAC,CAAA;AACV,CAAC,CAAA;AAgBD;;;GAGG;AACH,MAAM,OAAO,YAAa,SAAQ,QAAwB;IACxD;QACE,KAAK,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;IACrB,CAAC;CACF;AAED,wEAAwE;AACxE,+EAA+E;AAC/E,yEAAyE;AACzE,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,EAAE;AACF,8EAA8E;AAC9E,sEAAsE;AAEtE;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,QAA4B;IAC7D,YAAY,UAAkB,EAAE,GAAG,IAAI;QACrC,KAAK,CAAC;YACJ,OAAO;YACP,oBAAoB;YACpB,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC;SACnC,CAAC,CAAA;IACJ,CAAC;CACF;AASD,MAAM,QAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAA;AAE9C;;;;;;;;;;;;GAYG;AACH,MAAM,OAAgB,QAAQ;IAC5B;;;;;;;;OAQG;IACH,IAAI,CAAQ;IACZ;;;;OAIG;IACH,IAAI,CAAU;IACd;;;;OAIG;IACH,KAAK,CAA2B;IAChC;;;;OAIG;IACH,MAAM,CAAW;IACjB;;;OAGG;IACH,MAAM,CAAS;IAEf;;;OAGG;IACH,KAAK,GAAY,KAAK,CAAA;IAYtB,gCAAgC;IAChC,GAAG,CAAS;IAEZ,eAAe;IACf,IAAI,CAAS;IACb,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IACD,KAAK,CAAS;IACd,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IACD,MAAM,CAAS;IACf,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IACD,IAAI,CAAS;IACb,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IACD,IAAI,CAAS;IACb,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IACD,KAAK,CAAS;IACd,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IACD,QAAQ,CAAS;IACjB,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IACD,IAAI,CAAS;IACb,IAAI,GAAG;QACL,OAAO,IAAI,CAAC,IAAI,CAAA;IAClB,CAAC;IACD,KAAK,CAAS;IACd,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IACD,OAAO,CAAS;IAChB,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IACD,QAAQ,CAAS;IACjB,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IACD,QAAQ,CAAS;IACjB,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IACD,QAAQ,CAAS;IACjB,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IACD,YAAY,CAAS;IACrB,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IACD,MAAM,CAAO;IACb,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IACD,MAAM,CAAO;IACb,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IACD,MAAM,CAAO;IACb,IAAI,KAAK;QACP,OAAO,IALine truncated
@@ -0,0 +1,86 @@
'use strict';
module.exports = function generate_uniqueItems(it, $keyword, $ruleType) {
var out = ' ';
var $lvl = it.level;
var $dataLvl = it.dataLevel;
var $schema = it.schema[$keyword];
var $schemaPath = it.schemaPath + it.util.getProperty($keyword);
var $errSchemaPath = it.errSchemaPath + '/' + $keyword;
var $breakOnError = !it.opts.allErrors;
var $data = 'data' + ($dataLvl || '');
var $valid = 'valid' + $lvl;
var $isData = it.opts.$data && $schema && $schema.$data,
$schemaValue;
if ($isData) {
out += ' var schema' + ($lvl) + ' = ' + (it.util.getData($schema.$data, $dataLvl, it.dataPathArr)) + '; ';
$schemaValue = 'schema' + $lvl;
} else {
$schemaValue = $schema;
}
if (($schema || $isData) && it.opts.uniqueItems !== false) {
if ($isData) {
out += ' var ' + ($valid) + '; if (' + ($schemaValue) + ' === false || ' + ($schemaValue) + ' === undefined) ' + ($valid) + ' = true; else if (typeof ' + ($schemaValue) + ' != \'boolean\') ' + ($valid) + ' = false; else { ';
}
out += ' var i = ' + ($data) + '.length , ' + ($valid) + ' = true , j; if (i > 1) { ';
var $itemType = it.schema.items && it.schema.items.type,
$typeIsArray = Array.isArray($itemType);
if (!$itemType || $itemType == 'object' || $itemType == 'array' || ($typeIsArray && ($itemType.indexOf('object') >= 0 || $itemType.indexOf('array') >= 0))) {
out += ' outer: for (;i--;) { for (j = i; j--;) { if (equal(' + ($data) + '[i], ' + ($data) + '[j])) { ' + ($valid) + ' = false; break outer; } } } ';
} else {
out += ' var itemIndices = {}, item; for (;i--;) { var item = ' + ($data) + '[i]; ';
var $method = 'checkDataType' + ($typeIsArray ? 's' : '');
out += ' if (' + (it.util[$method]($itemType, 'item', it.opts.strictNumbers, true)) + ') continue; ';
if ($typeIsArray) {
out += ' if (typeof item == \'string\') item = \'"\' + item; ';
}
out += ' if (typeof itemIndices[item] == \'number\') { ' + ($valid) + ' = false; j = itemIndices[item]; break; } itemIndices[item] = i; } ';
}
out += ' } ';
if ($isData) {
out += ' } ';
}
out += ' if (!' + ($valid) + ') { ';
var $$outStack = $$outStack || [];
$$outStack.push(out);
out = ''; /* istanbul ignore else */
if (it.createErrors !== false) {
out += ' { keyword: \'' + ('uniqueItems') + '\' , dataPath: (dataPath || \'\') + ' + (it.errorPath) + ' , schemaPath: ' + (it.util.toQuotedString($errSchemaPath)) + ' , params: { i: i, j: j } ';
if (it.opts.messages !== false) {
out += ' , message: \'should NOT have duplicate items (items ## \' + j + \' and \' + i + \' are identical)\' ';
}
if (it.opts.verbose) {
out += ' , schema: ';
if ($isData) {
out += 'validate.schema' + ($schemaPath);
} else {
out += '' + ($schema);
}
out += ' , parentSchema: validate.schema' + (it.schemaPath) + ' , data: ' + ($data) + ' ';
}
out += ' } ';
} else {
out += ' {} ';
}
var __err = out;
out = $$outStack.pop();
if (!it.compositeRule && $breakOnError) {
/* istanbul ignore if */
if (it.async) {
out += ' throw new ValidationError([' + (__err) + ']); ';
} else {
out += ' validate.errors = [' + (__err) + ']; return false; ';
}
} else {
out += ' var err = ' + (__err) + '; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ';
}
out += ' } ';
if ($breakOnError) {
out += ' else { ';
}
} else {
if ($breakOnError) {
out += ' if (true) { ';
}
}
return out;
}
@@ -0,0 +1,924 @@
flf2a$ 9 6 30 1 5
larry3d.flf by Larry Gelberg (larryg@avs.com)
(stolen liberally from Juan Car's puffy.flf)
tweaked by Glenn Chappell <ggc@uiuc.edu>
Version 1.2 2/24/94
$$$ @
$$$ @
$$$ @
$$$ @
$$$ @
$$$ @
$$$ @
$$$ @
$$$@@
__ @
/\ \ @
\ \ \ @
\ \ \ @
\ \_\ @
\/\_\@
\/_/@
@
@@
__ __ @
/\ \\ \ @
\ \_\\_\ @
\/_//_/$ @
$ $ @
$ $@
@
@
@@
__ __ @
_\ \\ \__ @
/\__ _ _\ @
\/_L\ \\ \L_ @
/\_ _ _\@
\/_/\_\\_\/@
\/_//_/ @
@
@@
__ @
/\ \_ @
\/'__`\ @
/\ \_\_\ @
\ \____ \ @
\/\ \_\ \@
\ `\_ _/@
`\_/\_\@
\/_/@@
__ __ @
/\_\ / / @
\/_/ / / @
/ / @
/ / __ @
/_/ /\_\@
/_/ \/_/@
@
@@
____ @
/| _ \ @
|/\ | @
\// __`\/\ @
/| \L> <_@
| \_____/\/@
\/____/\/ @
@
@@
__ @
/\ \ @
\ \/$ @
\/ $ @
$ $ @
$ $@
@
@
@@
_ @
/' \ @
/\ ,/' @
\ \ \ @
\ \ `\ @
\ `\__\@
`\/_/ @
@
@@
__ @
/\ `\ @
\`\ \ @
`\`\ \ @
`\/' \@
/\__/@
\/_/ @
@
@@
__ @
_\ \ _ @
/\_` ' \ @
\/_> <_ @
/\_, ,_\@
\/_/\_\/@
\/_/ @
@
@@
__ @
/\ \ @
\_\ \___ @
/\___ __\@
\/__/\ \_/@
\ \_\ @
\/_/ @
@
@@
@
@
@
@
__ @
/\ \@
\ \/@
\/ @
@@
@
@
@
_______ @
/\______\@
\/______/@
@
@
@@
@
@
@
@
__ @
/\_\@
\/_/@
@
@@
__@
/ /@
/ / @
/ / @
/ / @
/_/ @
/_/ @
@
@@
__ @
/'__`\ @
/\ \/\ \ @
\ \ \ \ \ @
\ \ \_\ \@
\ \____/@
\/___/ @
@
@@
_ @
/' \ @
/\_, \ @
\/_/\ \ @
\ \ \ @
\ \_\@
\/_/@
@
@@
___ @
/'___`\ @
/\_\ /\ \ @
\/_/// /__ @
// /_\ \@
/\______/@
\/_____/ @
@
@@
__ @
/'__`\ @
/\_\L\ \ @
\/_/_\_<_ @
/\ \L\ \@
\ \____/@
\/___/ @
@
@@
__ __ @
/\ \\ \ @
\ \ \\ \ @
\ \ \\ \_ @
\ \__ ,__\@
\/_/\_\_/@
\/_/ @
@
@@
______ @
/\ ___\ @
\ \ \__/ @
\ \___``\ @
\/\ \L\ \@
\ \____/@
\/___/ @
@
@@
____ @
/'___\ @
/\ \__/ @
\ \ _``\ @
\ \ \L\ \@
\ \____/@
\/___/ @
@
@@
________ @
/\_____ \@
\/___//'/'@
/' /' @
/' /' @
/\_/ @
\// @
@
@@
__ @
/'_ `\ @
/\ \L\ \ @
\/_> _ <_ @
/\ \L\ \@
\ \____/@
\/___/ @
@
@@
__ @
/'_ `\ @
/\ \L\ \ @
\ \___, \ @
\/__,/\ \ @
\ \_\@
\/_/@
@
@@
@
@
__ @
/\_\ @
\/_/_ @
/\_\@
\/_/@
@
@@
@
@
__ @
/\_\ @
\/_/_ @
/\ \@
\ \/@
\/ @
@@
___ @
/ / @
/ / @
/< < @
\ `\ `\ @
`\ `\_|@
`\// @
@
@@
@
_______ @
/\______\ @
\/______/_ @
/\______\@
\/______/@
@
@
@@
__ @
/\ `\ @
\ `\ `\ @
`\ > >@
/ / @
/\_/ @
\// @
@
@@
_ @
/'_`\ @
/\_\/\`\@
\/_//'/'@
/\_\ @
\/\_\@
\/_/@
@
@@
@
__ @
/'_`\_ @
/'/'_` \ @
/\ \ \L\ \ @
\ \ `\__,_\@
\ `\_____\@
`\/_____/@
@@
______ @
/\ _ \ @
\ \ \L\ \ @
\ \ __ \ @
\ \ \/\ \ @
\ \_\ \_\@
\/_/\/_/@
@
@@
____ @
/\ _`\ @
\ \ \L\ \ @
\ \ _ <' @
\ \ \L\ \@
\ \____/@
\/___/ @
@
@@
____ @
/\ _`\ @
\ \ \/\_\ @
\ \ \/_/_ @
\ \ \L\ \@
\ \____/@
\/___/ @
@
@@
____ @
/\ _`\ @
\ \ \/\ \ @
\ \ \ \ \ @
\ \ \_\ \@
\ \____/@
\/___/ @
@
@@
____ @
/\ _`\ @
\ \ \L\_\ @
\ \ _\L @
\ \ \L\ \@
\ \____/@
\/___/ @
@
@@
____ @
/\ _`\ @
\ \ \L\_\@
\ \ _\/@
\ \ \/ @
\ \_\ @
\/_/ @
@
@@
____ @
/\ _`\ @
\ \ \L\_\ @
\ \ \L_L @
\ \ \/, \@
\ \____/@
\/___/ @
@
@@
__ __ @
/\ \/\ \ @
\ \ \_\ \ @
\ \ _ \ @
\ \ \ \ \ @
\ \_\ \_\@
\/_/\/_/@
@
@@
______ @
/\__ _\ @
\/_/\ \/ @
\ \ \ @
\_\ \__ @
/\_____\@
\/_____/@
@
@@
_____ @
/\___ \ @
\/__/\ \ @
_\ \ \ @
/\ \_\ \@
\ \____/@
\/___/ @
@
@@
__ __ @
/\ \/\ \ @
\ \ \/'/' @
\ \ , < @
\ \ \\`\ @
\ \_\ \_\@
\/_/\/_/@
@
@@
__ @
/\ \ @
\ \ \ @
\ \ \ __ @
\ \ \L\ \@
\ \____/@
\/___/ @
@
@@
@
/'\_/`\ @
/\ \ @
\ \ \__\ \ @
\ \ \_/\ \ @
\ \_\\ \_\@
\/_/ \/_/@
@
@@
__ __ @
/\ \/\ \ @
\ \ `\\ \ @
\ \ , ` \ @
\ \ \`\ \ @
\ \_\ \_\@
\/_/\/_/@
@
@@
_____ @
/\ __`\ @
\ \ \/\ \ @
\ \ \ \ \ @
\ \ \_\ \ @
\ \_____\@
\/_____/@
@
@@
____ @
/\ _`\ @
\ \ \L\ \@
\ \ ,__/@
\ \ \/ @
\ \_\ @
\/_/ @
@
@@
_____ @
/\ __`\ @
\ \ \/\ \ @
\ \ \ \ \ @
\ \ \\'\\ @
\ \___\_\@
\/__//_/@
@
@@
____ @
/\ _`\ @
\ \ \L\ \ @
\ \ , / @
\ \ \\ \ @
\ \_\ \_\@
\/_/\/ /@
@
@@
____ @
/\ _`\ @
\ \,\L\_\ @
\/_\__ \ @
/\ \L\ \ @
\ `\____\@
\/_____/@
@
@@
______ @
/\__ _\ @
\/_/\ \/ @
\ \ \ @
\ \ \ @
\ \_\@
\/_/@
@
@@
__ __ @
/\ \/\ \ @
\ \ \ \ \ @
\ \ \ \ \ @
\ \ \_\ \ @
\ \_____\@
\/_____/@
@
@@
__ __ @
/\ \/\ \ @
\ \ \ \ \ @
\ \ \ \ \ @
\ \ \_/ \@
\ `\___/@
`\/__/ @
@
@@
__ __ @
/\ \ __/\ \ @
\ \ \/\ \ \ \ @
\ \ \ \ \ \ \ @
\ \ \_/ \_\ \@
\ `\___x___/@
'\/__//__/ @
@
@@
__ __ @
/\ \ /\ \ @
\ `\`\/'/' @
`\/ > < @
\/'/\`\ @
/\_\\ \_\@
\/_/ \/_/@
@
@@
__ __ @
/\ \ /\ \@
\ `\`\\/'/@
`\ `\ /' @
`\ \ \ @
\ \_\@
\/_/@
@
@@
________ @
/\_____ \ @
\/____//'/' @
//'/' @
//'/'___ @
/\_______\@
\/_______/@
@
@@
____ @
/\ _\ @
\ \ \/ @
\ \ \ @
\ \ \_ @
\ \___\@
\/___/@
@
@@
__ @
/\ `\ @
\`\ `\ @
`\`\ `\ @
`\`\ `\ @
`\`\__\@
`\/__/@
@
@@
____ @
/\__ \ @
\/_/\ \ @
\ \ \ @
\_\ \ @
/\___\@
\/___/@
@
@@
__ @
/ `\ @
/\_/\_\ @
\//\// $ @
$ $ @
$ $@
@
@
@@
@
@
@
@
@
$ $ @
$_______ @
/\______\@
\/______/@@
__ @
/\ \ @
\ \\$ @
\// $ @
$ $ @
$ $@
@
@
@@
@
@
__ @
/'__`\ @
/\ \L\.\_ @
\ \__/.\_\@
\/__/\/_/@
@
@@
__ @
/\ \ @
\ \ \____ @
\ \ '__`\ @
\ \ \L\ \@
\ \_,__/@
\/___/ @
@
@@
@
@
___ @
/'___\ @
/\ \__/ @
\ \____\@
\/____/@
@
@@
__ @
/\ \ @
\_\ \ @
/'_` \ @
/\ \L\ \ @
\ \___,_\@
\/__,_ /@
@
@@
@
@
__ @
/'__`\ @
/\ __/ @
\ \____\@
\/____/@
@
@@
___ @
/'___\ @
/\ \__/ @
\ \ ,__\@
\ \ \_/@
\ \_\ @
\/_/ @
@
@@
@
@
__ @
/'_ `\ @
/\ \L\ \ @
\ \____ \ @
\/___L\ \@
/\____/@
\_/__/ @@
__ @
/\ \ @
\ \ \___ @
\ \ _ `\ @
\ \ \ \ \ @
\ \_\ \_\@
\/_/\/_/@
@
@@
@
__ @
/\_\ @
\/\ \ @
\ \ \ @
\ \_\@
\/_/@
@
@@
@
__ @
/\_\ @
\/\ \ @
\ \ \ @
_\ \ \ @
/\ \_\ \@
\ \____/@
\/___/ @@
__ @
/\ \ @
\ \ \/'\ @
\ \ , < @
\ \ \\`\ @
\ \_\ \_\@
\/_/\/_/@
@
@@
___ @
/\_ \ @
\//\ \ @
\ \ \ @
\_\ \_ @
/\____\@
\/____/@
@
@@
@
@
___ ___ @
/' __` __`\ @
/\ \/\ \/\ \ @
\ \_\ \_\ \_\@
\/_/\/_/\/_/@
@
@@
@
@
___ @
/' _ `\ @
/\ \/\ \ @
\ \_\ \_\@
\/_/\/_/@
@
@@
@
@
___ @
/ __`\ @
/\ \L\ \@
\ \____/@
\/___/ @
@
@@
@
@
_____ @
/\ '__`\ @
\ \ \L\ \@
\ \ ,__/@
\ \ \/ @
\ \_\ @
\/_/ @@
@
@
__ @
/'__`\ @
/\ \L\ \ @
\ \___, \ @
\/___/\ \ @
\ \_\@
\/_/@@
@
@
_ __ @
/\`'__\@
\ \ \/ @
\ \_\ @
\/_/ @
@
@@
@
@
____ @
/',__\ @
/\__, `\@
\/\____/@
\/___/ @
@
@@
__ @
/\ \__ @
\ \ ,_\ @
\ \ \/ @
\ \ \_ @
\ \__\@
\/__/@
@
@@
@
@
__ __ @
/\ \/\ \ @
\ \ \_\ \@
\ \____/@
\/___/ @
@
@@
@
@
__ __ @
/\ \/\ \ @
\ \ \_/ |@
\ \___/ @
\/__/ @
@
@@
@
@
__ __ __ @
/\ \/\ \/\ \ @
\ \ \_/ \_/ \@
\ \___x___/'@
\/__//__/ @
@
@@
@
@
__ _ @
/\ \/'\ @
\/> </ @
/\_/\_\@
\//\/_/@
@
@@
@
@
__ __ @
/\ \/\ \ @
\ \ \_\ \ @
\/`____ \ @
`/___/> \@
/\___/@
\/__/ @@
@
@
____ @
/\_ ,`\ @
\/_/ /_ @
/\____\@
\/____/@
@
@@
_ @
/' \@
\ ,/'@
<' \ @
< \ `\ @
\`\__\@
\/__/@
@
@@
__ @
/\ \ @
\ \ \ @
\ \ \ @
\ \ \ @
\ \ \ @
\ \ \ @
\ \_\@
\/_/@@
__ @
/\ `\ @
\`\ \ @
\ \ `>@
//' \ @
/\__/' @
\/_/ @
@
@@
_ _ @
/' \/' \ @
/\_/\__//$ @
\//\/__/ $ @
$ $@
@
@
@
@@
__ __ @
/\_\/\_\ @
\/\ _ \ @
\ \ \L\ \ @
\ \ __ \ @
\ \_\/\_\@
\/_/\/_/@
@
@@
__ __ @
/\_\/\_\ @
\/\ __ \ @
\ \ \/\ \ @
\ \ \_\ \ @
\ \_____\@
\/_____/@
@
@@
__ __ @
/\_\/\_\ @
\/\ \/\ \ @
\ \ \ \ \ @
\ \ \_\ \ @
\ \_____\@
\/_____/@
@
@@
__ __ @
/\_\/\_\ @
\/_/\/_/_ @
/'_` \ @
/\ \L\ \ @
\ `\__,_\@
`\/_,__/@
@
@@
__ __ @
/\_\/\_\ @
\/_/\/_/ @
/'_`\ @
/\ \L\ \@
\ `\___/@
`\/__/ @
@
@@
__ __ @
/\_\ \_\ @
\/_/\/_/_ @
/\ \/\ \ @
\ \ \_\ \@
\ `\___/@
`\/__/ @
@
@@
______ @
/\ __ \ @
\ \ \/\ \ @
\ \ \<_<_ @
\ \ \ \ \@
\ \ \\_/@
\ \_\/ @
\/_/ @
@@
@@ -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":"module.js.map"}
@@ -0,0 +1,83 @@
{
"name": "picomatch",
"description": "Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.",
"version": "4.0.3",
"homepage": "https://github.com/micromatch/picomatch",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"funding": "https://github.com/sponsors/jonschlinkert",
"repository": "micromatch/picomatch",
"bugs": {
"url": "https://github.com/micromatch/picomatch/issues"
},
"license": "MIT",
"files": [
"index.js",
"posix.js",
"lib"
],
"sideEffects": false,
"main": "index.js",
"engines": {
"node": ">=12"
},
"scripts": {
"lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --report-unused-disable-directives --ignore-path .gitignore .",
"mocha": "mocha --reporter dot",
"test": "npm run lint && npm run mocha",
"test:ci": "npm run test:cover",
"test:cover": "nyc npm run mocha"
},
"devDependencies": {
"eslint": "^8.57.0",
"fill-range": "^7.0.1",
"gulp-format-md": "^2.0.0",
"mocha": "^10.4.0",
"nyc": "^15.1.0",
"time-require": "github:jonschlinkert/time-require"
},
"keywords": [
"glob",
"match",
"picomatch"
],
"nyc": {
"reporter": [
"html",
"lcov",
"text-summary"
]
},
"verb": {
"toc": {
"render": true,
"method": "preWrite",
"maxdepth": 3
},
"layout": "empty",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"lint": {
"reflinks": true
},
"related": {
"list": [
"braces",
"micromatch"
]
},
"reflinks": [
"braces",
"expand-brackets",
"extglob",
"fill-range",
"micromatch",
"minimatch",
"nanomatch",
"picomatch"
]
}
}
@@ -0,0 +1,8 @@
var $8193cf0e649c7928$exports = {};
$8193cf0e649c7928$exports = {
"longPressMessage": `Za odprtje menija pritisnite in dr\u{17E}ite gumb ali pritisnite Alt+pu\u{161}\u{10D}ica navzdol`
};
export {$8193cf0e649c7928$exports as default};
//# sourceMappingURL=sl-SI.module.js.map
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,oBAAoB,CAAC,uHAAqB,CAAC;AAC/D","sources":["packages/@react-aria/menu/intl/zh-CN.json"],"sourcesContent":["{\n \"longPressMessage\": \"长按或按 Alt + 向下方向键以打开菜单\"\n}\n"],"names":[],"version":3,"file":"zh-CN.main.js.map"}
@@ -0,0 +1,10 @@
"use client";
import {
Form,
FormContext
} from "./chunk-ICU6NNET.mjs";
import "./chunk-YMDFNRVV.mjs";
export {
Form,
FormContext
};
@@ -0,0 +1,20 @@
Copyright JS Foundation and other contributors
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,43 @@
/**
* @author Toru Nagashima <https://github.com/mysticatea>
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ, ReferenceTracker } = require("eslint-utils")
module.exports = {
meta: {
docs: {
description: "disallow the `Math.imul` method.",
category: "ES2015",
recommended: false,
url:
"http://mysticatea.github.io/eslint-plugin-es/rules/no-math-imul.html",
},
fixable: null,
messages: {
forbidden: "ES2015 '{{name}}' method is forbidden.",
},
schema: [],
type: "problem",
},
create(context) {
return {
"Program:exit"() {
const tracker = new ReferenceTracker(context.getScope())
for (const { node, path } of tracker.iterateGlobalReferences({
Math: {
imul: { [READ]: true },
},
})) {
context.report({
node,
messageId: "forbidden",
data: { name: path.join(".") },
})
}
},
}
},
}
@@ -0,0 +1,31 @@
var dns = require('dns');
var retry = require('../lib/retry');
function faultTolerantResolve(address, cb) {
var opts = {
retries: 2,
factor: 2,
minTimeout: 1 * 1000,
maxTimeout: 2 * 1000,
randomize: true
};
var operation = retry.operation(opts);
operation.attempt(function(currentAttempt) {
dns.resolve(address, function(err, addresses) {
if (operation.retry(err)) {
return;
}
cb(operation.mainError(), operation.errors(), addresses);
});
});
}
faultTolerantResolve('nodejs.org', function(err, errors, addresses) {
console.warn('err:');
console.log(err);
console.warn('addresses:');
console.log(addresses);
});
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L","322":"M","8196":"G N O P"},C:{"2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0C 1C","4162":"0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B","16452":"0 1 2 3 4 5 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC"},D:{"1":"0 1 2 3 4 5 LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB","194":"yB zB 0B 1B 2B 3B","1090":"UC 4B","8196":"VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC"},E:{"1":"L M G OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F 2C ZC 3C 4C 5C 6C","514":"A B aC","8196":"C NC"},F:{"1":"0 1 2 3 4 5 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB FD GD HD ID NC uC JD OC","194":"lB mB nB oB pB qB rB sB","8196":"tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B"},G:{"1":"WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD","514":"RD SD TD","8196":"UD VD"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"2049":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB uD vD wD xD QC RC SC yD","2":"J","8196":"oD pD qD rD sD aC tD"},Q:{"8196":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:2,C:"Payment Request API",D:true};
@@ -0,0 +1,34 @@
/**
* @license React
* react-jsx-runtime.profiling.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config.key && (key = "" + config.key);
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
config = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
ref: void 0 !== config ? config : null,
props: maybeKey
};
}
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsxProd;
exports.jsxs = jsxProd;
@@ -0,0 +1,43 @@
/*
* 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.
*/
// https://en.wikipedia.org/wiki/Right-to-left
const RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);
const RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);
/**
* Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.
*/
export function isRTL(localeString: string) {
// If the Intl.Locale API is available, use it to get the locale's text direction.
if (Intl.Locale) {
let locale = new Intl.Locale(localeString).maximize();
// Use the text info object to get the direction if possible.
// @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo
let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;
if (textInfo) {
return textInfo.direction === 'rtl';
}
// Fallback: guess using the script.
// This is more accurate than guessing by language, since languages can be written in multiple scripts.
if (locale.script) {
return RTL_SCRIPTS.has(locale.script);
}
}
// If not, just guess by the language (first part of the locale)
let lang = localeString.split('-')[0];
return RTL_LANGS.has(lang);
}
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more