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,10 @@
/* global module, require -- required for CJS file */
// Jest (and probably some other runtimes with custom implementations of
// `require`) doesn't support `exports` in `package.json`, so this file is here
// to help them load this module. Note that it is also `.js` and not `.cjs` for
// the same reason - `cjs` files requires to be loaded with an extension, but
// since Jest doesn't respect `module` outside of ESM mode it still works in
// this case (and the `require` in _this_ file does specify the extension).
module.exports = require("./dist/eslintrc-universal.cjs");
@@ -0,0 +1,362 @@
/**
* @fileoverview Rule to require or disallow yoda comparisons
* @author Nicholas C. Zakas
*/
"use strict";
//--------------------------------------------------------------------------
// Requirements
//--------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
/**
* Determines whether an operator is a comparison operator.
* @param {string} operator The operator to check.
* @returns {boolean} Whether or not it is a comparison operator.
*/
function isComparisonOperator(operator) {
return /^(?:==|===|!=|!==|<|>|<=|>=)$/u.test(operator);
}
/**
* Determines whether an operator is an equality operator.
* @param {string} operator The operator to check.
* @returns {boolean} Whether or not it is an equality operator.
*/
function isEqualityOperator(operator) {
return /^(?:==|===)$/u.test(operator);
}
/**
* Determines whether an operator is one used in a range test.
* Allowed operators are `<` and `<=`.
* @param {string} operator The operator to check.
* @returns {boolean} Whether the operator is used in range tests.
*/
function isRangeTestOperator(operator) {
return ["<", "<="].includes(operator);
}
/**
* Determines whether a non-Literal node is a negative number that should be
* treated as if it were a single Literal node.
* @param {ASTNode} node Node to test.
* @returns {boolean} True if the node is a negative number that looks like a
* real literal and should be treated as such.
*/
function isNegativeNumericLiteral(node) {
return (
node.type === "UnaryExpression" &&
node.operator === "-" &&
node.prefix &&
astUtils.isNumericLiteral(node.argument)
);
}
/**
* Determines whether a non-Literal node should be treated as a single Literal node.
* @param {ASTNode} node Node to test
* @returns {boolean} True if the node should be treated as a single Literal node.
*/
function looksLikeLiteral(node) {
return (
isNegativeNumericLiteral(node) || astUtils.isStaticTemplateLiteral(node)
);
}
/**
* Attempts to derive a Literal node from nodes that are treated like literals.
* @param {ASTNode} node Node to normalize.
* @returns {ASTNode} One of the following options.
* 1. The original node if the node is already a Literal
* 2. A normalized Literal node with the negative number as the value if the
* node represents a negative number literal.
* 3. A normalized Literal node with the string as the value if the node is
* a Template Literal without expression.
* 4. Otherwise `null`.
*/
function getNormalizedLiteral(node) {
if (node.type === "Literal") {
return node;
}
if (isNegativeNumericLiteral(node)) {
return {
type: "Literal",
value: -node.argument.value,
raw: `-${node.argument.value}`,
};
}
if (astUtils.isStaticTemplateLiteral(node)) {
return {
type: "Literal",
value: node.quasis[0].value.cooked,
raw: node.quasis[0].value.raw,
};
}
return null;
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [
"never",
{
exceptRange: false,
onlyEquality: false,
},
],
docs: {
description: 'Require or disallow "Yoda" conditions',
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/yoda",
},
schema: [
{
enum: ["always", "never"],
},
{
type: "object",
properties: {
exceptRange: {
type: "boolean",
},
onlyEquality: {
type: "boolean",
},
},
additionalProperties: false,
},
],
fixable: "code",
messages: {
expected:
"Expected literal to be on the {{expectedSide}} side of {{operator}}.",
},
},
create(context) {
const [when, { exceptRange, onlyEquality }] = context.options;
const always = when === "always";
const sourceCode = context.sourceCode;
/**
* Determines whether node represents a range test.
* A range test is a "between" test like `(0 <= x && x < 1)` or an "outside"
* test like `(x < 0 || 1 <= x)`. It must be wrapped in parentheses, and
* both operators must be `<` or `<=`. Finally, the literal on the left side
* must be less than or equal to the literal on the right side so that the
* test makes any sense.
* @param {ASTNode} node LogicalExpression node to test.
* @returns {boolean} Whether node is a range test.
*/
function isRangeTest(node) {
const left = node.left,
right = node.right;
/**
* Determines whether node is of the form `0 <= x && x < 1`.
* @returns {boolean} Whether node is a "between" range test.
*/
function isBetweenTest() {
if (
node.operator === "&&" &&
astUtils.isSameReference(left.right, right.left)
) {
const leftLiteral = getNormalizedLiteral(left.left);
const rightLiteral = getNormalizedLiteral(right.right);
if (leftLiteral === null && rightLiteral === null) {
return false;
}
if (rightLiteral === null || leftLiteral === null) {
return true;
}
if (leftLiteral.value <= rightLiteral.value) {
return true;
}
}
return false;
}
/**
* Determines whether node is of the form `x < 0 || 1 <= x`.
* @returns {boolean} Whether node is an "outside" range test.
*/
function isOutsideTest() {
if (
node.operator === "||" &&
astUtils.isSameReference(left.left, right.right)
) {
const leftLiteral = getNormalizedLiteral(left.right);
const rightLiteral = getNormalizedLiteral(right.left);
if (leftLiteral === null && rightLiteral === null) {
return false;
}
if (rightLiteral === null || leftLiteral === null) {
return true;
}
if (leftLiteral.value <= rightLiteral.value) {
return true;
}
}
return false;
}
/**
* Determines whether node is wrapped in parentheses.
* @returns {boolean} Whether node is preceded immediately by an open
* paren token and followed immediately by a close
* paren token.
*/
function isParenWrapped() {
return astUtils.isParenthesised(sourceCode, node);
}
return (
node.type === "LogicalExpression" &&
left.type === "BinaryExpression" &&
right.type === "BinaryExpression" &&
isRangeTestOperator(left.operator) &&
isRangeTestOperator(right.operator) &&
(isBetweenTest() || isOutsideTest()) &&
isParenWrapped()
);
}
const OPERATOR_FLIP_MAP = {
"===": "===",
"!==": "!==",
"==": "==",
"!=": "!=",
"<": ">",
">": "<",
"<=": ">=",
">=": "<=",
};
/**
* Returns a string representation of a BinaryExpression node with its sides/operator flipped around.
* @param {ASTNode} node The BinaryExpression node
* @returns {string} A string representation of the node with the sides and operator flipped
*/
function getFlippedString(node) {
const operatorToken = sourceCode.getFirstTokenBetween(
node.left,
node.right,
token => token.value === node.operator,
);
const lastLeftToken = sourceCode.getTokenBefore(operatorToken);
const firstRightToken = sourceCode.getTokenAfter(operatorToken);
const source = sourceCode.getText();
const leftText = source.slice(
node.range[0],
lastLeftToken.range[1],
);
const textBeforeOperator = source.slice(
lastLeftToken.range[1],
operatorToken.range[0],
);
const textAfterOperator = source.slice(
operatorToken.range[1],
firstRightToken.range[0],
);
const rightText = source.slice(
firstRightToken.range[0],
node.range[1],
);
const tokenBefore = sourceCode.getTokenBefore(node);
const tokenAfter = sourceCode.getTokenAfter(node);
let prefix = "";
let suffix = "";
if (
tokenBefore &&
tokenBefore.range[1] === node.range[0] &&
!astUtils.canTokensBeAdjacent(tokenBefore, firstRightToken)
) {
prefix = " ";
}
if (
tokenAfter &&
node.range[1] === tokenAfter.range[0] &&
!astUtils.canTokensBeAdjacent(lastLeftToken, tokenAfter)
) {
suffix = " ";
}
return (
prefix +
rightText +
textBeforeOperator +
OPERATOR_FLIP_MAP[operatorToken.value] +
textAfterOperator +
leftText +
suffix
);
}
//--------------------------------------------------------------------------
// Public
//--------------------------------------------------------------------------
return {
BinaryExpression(node) {
const expectedLiteral = always ? node.left : node.right;
const expectedNonLiteral = always ? node.right : node.left;
// If `expectedLiteral` is not a literal, and `expectedNonLiteral` is a literal, raise an error.
if (
(expectedNonLiteral.type === "Literal" ||
looksLikeLiteral(expectedNonLiteral)) &&
!(
expectedLiteral.type === "Literal" ||
looksLikeLiteral(expectedLiteral)
) &&
!(!isEqualityOperator(node.operator) && onlyEquality) &&
isComparisonOperator(node.operator) &&
!(exceptRange && isRangeTest(node.parent))
) {
context.report({
node,
messageId: "expected",
data: {
operator: node.operator,
expectedSide: always ? "left" : "right",
},
fix: fixer =>
fixer.replaceText(node, getFlippedString(node)),
});
}
},
};
},
};
@@ -0,0 +1,34 @@
var baseFlatten = require('./_baseFlatten'),
baseRest = require('./_baseRest'),
baseUniq = require('./_baseUniq'),
isArrayLikeObject = require('./isArrayLikeObject'),
last = require('./last');
/**
* This method is like `_.union` except that it accepts `comparator` which
* is invoked to compare elements of `arrays`. Result values are chosen from
* the first array in which the value occurs. The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of combined values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.unionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var unionWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
});
module.exports = unionWith;
@@ -0,0 +1,13 @@
import type { Uint8Array_ } from '../types/index.js';
/**
* Generate a suitably random value to be used as an attestation or assertion challenge
*/
export declare function generateChallenge(): Promise<Uint8Array_>;
/**
* Make it possible to stub the return value during testing
* @ignore Don't include this in docs output
*/
export declare const _generateChallengeInternals: {
stubThis: (value: Uint8Array_) => Uint8Array;
};
//# sourceMappingURL=generateChallenge.d.ts.map
@@ -0,0 +1,37 @@
import {isShadowRoot as $431fbd86ca7dc216$export$af51f0f06c0f328a} from "./domHelpers.mjs";
import {shadowDOM as $lcSu5$shadowDOM} from "@react-stately/flags";
// Source: https://github.com/microsoft/tabster/blob/a89fc5d7e332d48f68d03b1ca6e344489d1c3898/src/Shadowdomize/DOMFunctions.ts#L16
function $d4ee10de306f2510$export$4282f70798064fe0(node, otherNode) {
if (!(0, $lcSu5$shadowDOM)()) return otherNode && node ? node.contains(otherNode) : false;
if (!node || !otherNode) return false;
let currentNode = otherNode;
while(currentNode !== null){
if (currentNode === node) return true;
if (currentNode.tagName === 'SLOT' && currentNode.assignedSlot) // Element is slotted
currentNode = currentNode.assignedSlot.parentNode;
else if ((0, $431fbd86ca7dc216$export$af51f0f06c0f328a)(currentNode)) // Element is in shadow root
currentNode = currentNode.host;
else currentNode = currentNode.parentNode;
}
return false;
}
const $d4ee10de306f2510$export$cd4e5573fbe2b576 = (doc = document)=>{
var _activeElement_shadowRoot;
if (!(0, $lcSu5$shadowDOM)()) return doc.activeElement;
let activeElement = doc.activeElement;
while(activeElement && 'shadowRoot' in activeElement && ((_activeElement_shadowRoot = activeElement.shadowRoot) === null || _activeElement_shadowRoot === void 0 ? void 0 : _activeElement_shadowRoot.activeElement))activeElement = activeElement.shadowRoot.activeElement;
return activeElement;
};
function $d4ee10de306f2510$export$e58f029f0fbfdb29(event) {
if ((0, $lcSu5$shadowDOM)() && event.target.shadowRoot) {
if (event.composedPath) return event.composedPath()[0];
}
return event.target;
}
export {$d4ee10de306f2510$export$4282f70798064fe0 as nodeContains, $d4ee10de306f2510$export$cd4e5573fbe2b576 as getActiveElement, $d4ee10de306f2510$export$e58f029f0fbfdb29 as getEventTarget};
//# sourceMappingURL=DOMFunctions.module.js.map
@@ -0,0 +1,106 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
var _keywords = require('./keywords');
var _types = require('./types');
class Scope {
constructor(startTokenIndex, endTokenIndex, isFunctionScope) {
this.startTokenIndex = startTokenIndex;
this.endTokenIndex = endTokenIndex;
this.isFunctionScope = isFunctionScope;
}
} exports.Scope = Scope;
class StateSnapshot {
constructor(
potentialArrowAt,
noAnonFunctionType,
inDisallowConditionalTypesContext,
tokensLength,
scopesLength,
pos,
type,
contextualKeyword,
start,
end,
isType,
scopeDepth,
error,
) {;this.potentialArrowAt = potentialArrowAt;this.noAnonFunctionType = noAnonFunctionType;this.inDisallowConditionalTypesContext = inDisallowConditionalTypesContext;this.tokensLength = tokensLength;this.scopesLength = scopesLength;this.pos = pos;this.type = type;this.contextualKeyword = contextualKeyword;this.start = start;this.end = end;this.isType = isType;this.scopeDepth = scopeDepth;this.error = error;}
} exports.StateSnapshot = StateSnapshot;
class State {constructor() { State.prototype.__init.call(this);State.prototype.__init2.call(this);State.prototype.__init3.call(this);State.prototype.__init4.call(this);State.prototype.__init5.call(this);State.prototype.__init6.call(this);State.prototype.__init7.call(this);State.prototype.__init8.call(this);State.prototype.__init9.call(this);State.prototype.__init10.call(this);State.prototype.__init11.call(this);State.prototype.__init12.call(this);State.prototype.__init13.call(this); }
// Used to signify the start of a potential arrow function
__init() {this.potentialArrowAt = -1}
// Used by Flow to handle an edge case involving function type parsing.
__init2() {this.noAnonFunctionType = false}
// Used by TypeScript to handle ambiguities when parsing conditional types.
__init3() {this.inDisallowConditionalTypesContext = false}
// Token store.
__init4() {this.tokens = []}
// Array of all observed scopes, ordered by their ending position.
__init5() {this.scopes = []}
// The current position of the tokenizer in the input.
__init6() {this.pos = 0}
// Information about the current token.
__init7() {this.type = _types.TokenType.eof}
__init8() {this.contextualKeyword = _keywords.ContextualKeyword.NONE}
__init9() {this.start = 0}
__init10() {this.end = 0}
__init11() {this.isType = false}
__init12() {this.scopeDepth = 0}
/**
* If the parser is in an error state, then the token is always tt.eof and all functions can
* keep executing but should be written so they don't get into an infinite loop in this situation.
*
* This approach, combined with the ability to snapshot and restore state, allows us to implement
* backtracking without exceptions and without needing to explicitly propagate error states
* everywhere.
*/
__init13() {this.error = null}
snapshot() {
return new StateSnapshot(
this.potentialArrowAt,
this.noAnonFunctionType,
this.inDisallowConditionalTypesContext,
this.tokens.length,
this.scopes.length,
this.pos,
this.type,
this.contextualKeyword,
this.start,
this.end,
this.isType,
this.scopeDepth,
this.error,
);
}
restoreFromSnapshot(snapshot) {
this.potentialArrowAt = snapshot.potentialArrowAt;
this.noAnonFunctionType = snapshot.noAnonFunctionType;
this.inDisallowConditionalTypesContext = snapshot.inDisallowConditionalTypesContext;
this.tokens.length = snapshot.tokensLength;
this.scopes.length = snapshot.scopesLength;
this.pos = snapshot.pos;
this.type = snapshot.type;
this.contextualKeyword = snapshot.contextualKeyword;
this.start = snapshot.start;
this.end = snapshot.end;
this.isType = snapshot.isType;
this.scopeDepth = snapshot.scopeDepth;
this.error = snapshot.error;
}
} exports.default = State;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"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:{"2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C"},D:{"2":"0 1 2 3 4 5 J ZB K D E F A B C L M G N O P aB 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","66":"6 7 8 9 AB BB CB"},E:{"2":"J ZB K E F A B C L M G 2C ZC 3C 4C 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","130":"D 5C"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC"},G:{"2":"E ZC KD vC LD MD 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","130":"ND"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"2":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"2":"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:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:7,C:"seamless attribute for iframes",D:true};
@@ -0,0 +1,26 @@
import {useLocale as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7} from "./context.module.js";
import {useMemo as $l9VVR$useMemo} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $33bf17300c498528$export$a2f47a3d2973640(options = {}) {
let { locale: locale } = (0, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7)();
return (0, $l9VVR$useMemo)(()=>new Intl.ListFormat(locale, options), [
locale,
options
]);
}
export {$33bf17300c498528$export$a2f47a3d2973640 as useListFormatter};
//# sourceMappingURL=useListFormatter.module.js.map
@@ -0,0 +1 @@
{"version":3,"file":"cloneInstanceBinding.js","sourceRoot":"","sources":["../../../../src/binding/calculations/cloneInstanceBinding.ts"],"names":[],"mappings":";;AAMA,oDAeC;AApBD,2DAAwD;AAExD;;GAEG;AACH,SAAgB,oBAAoB,CAClC,OAAoC;IAEpC,OAAO;QACL,KAAK,EAAE,IAAA,qCAAiB,EAAC,OAAO,CAAC,KAAK,CAAC;QACvC,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;QAC9C,aAAa,EAAE,OAAO,CAAC,aAAa;QACpC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,YAAY,EAAE,OAAO,CAAC,YAAY;QAClC,cAAc,EAAE,OAAO,CAAC,cAAc;QACtC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;QAC5C,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,10 @@
export type OptionString = 'array' | 'array-simple' | 'generic';
export type Options = [
{
default: OptionString;
readonly?: OptionString;
}
];
export type MessageIds = 'errorStringArray' | 'errorStringArrayReadonly' | 'errorStringArraySimple' | 'errorStringArraySimpleReadonly' | 'errorStringGeneric' | 'errorStringGenericSimple';
declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
export default _default;
@@ -0,0 +1,43 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OctetString = void 0;
const asn1js = require("asn1js");
const pvtsutils_1 = require("pvtsutils");
class OctetString {
get byteLength() {
return this.buffer.byteLength;
}
get byteOffset() {
return 0;
}
constructor(param) {
if (typeof param === "number") {
this.buffer = new ArrayBuffer(param);
}
else {
if (pvtsutils_1.BufferSourceConverter.isBufferSource(param)) {
this.buffer = pvtsutils_1.BufferSourceConverter.toArrayBuffer(param);
}
else if (Array.isArray(param)) {
this.buffer = new Uint8Array(param);
}
else {
this.buffer = new ArrayBuffer(0);
}
}
}
fromASN(asn) {
if (!(asn instanceof asn1js.OctetString)) {
throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString");
}
this.buffer = asn.valueBlock.valueHex;
return this;
}
toASN() {
return new asn1js.OctetString({ valueHex: this.buffer });
}
toSchema(name) {
return new asn1js.OctetString({ name });
}
}
exports.OctetString = OctetString;
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var docPagelistRole = {
abstract: false,
accessibleNameRequired: false,
baseConcepts: [],
childrenPresentational: false,
nameFrom: ['author'],
prohibitedProps: [],
props: {
'aria-disabled': null,
'aria-errormessage': null,
'aria-expanded': null,
'aria-haspopup': null,
'aria-invalid': null
},
relatedConcepts: [{
concept: {
name: 'page-list [EPUB-SSV]'
},
module: 'EPUB'
}],
requireContextRole: [],
requiredContextRole: [],
requiredOwnedElements: [],
requiredProps: {},
superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]
};
var _default = exports.default = docPagelistRole;
@@ -0,0 +1 @@
{"name":"color-convert","version":"2.0.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532093891,"integrity":"sha512-2i1AqQ64HuL9DyrdQpP0OQKQNxGvCmTBan144gkThCxPsMpiwExNks6ycDqWZCPZYvpg+0GB/CE9mfGgtDOSlw==","mode":420,"size":827},"CHANGELOG.md":{"checkedAt":1794532093891,"integrity":"sha512-kFk6gSlqT4SNzRMC7qUx+Ej7V0Iy3CiSMMQwKuU1VSrmQ3vaBoTKWVhX5I3F/kbsq9grq2OSWgXGOycK9KhCNg==","mode":420,"size":1417},"conversions.js":{"checkedAt":1794532093892,"integrity":"sha512-0duqs0FFFZ9rnN9VLySk6Bfpg2nTMLfK2NKNmnHd4zYB1X824ObLra/uij302sUl96R9Fk8mL+iv3w3R8IR6vA==","mode":420,"size":17040},"index.js":{"checkedAt":1794532093892,"integrity":"sha512-+yvQkWsExkWThWkSsaRQNNV1p2Gd8eL0lXErEd/dmnj32KKQ38h4XdwZeMYjBXaHg2xuRg2+YquMKph0RSraWQ==","mode":420,"size":1708},"LICENSE":{"checkedAt":1794532093892,"integrity":"sha512-RJ+994iKW5CItfhKptGkLPlReCoGIHn2P+Xh55fnCe1HN8PhkwDQqYoBATQx5zZSxbgUOJE7qVL/H7Y7zkYOWw==","mode":420,"size":1087},"README.md":{"checkedAt":1794532093892,"integrity":"sha512-7q6ZuyOSyojh49/C0jlgw8XDs4hwdzxabhv86I3iuJibL6Gw7PaKJuBstMnEbv6EDIa+eLYrv1wqvKICO6f1Ng==","mode":420,"size":2853},"route.js":{"checkedAt":1794532093892,"integrity":"sha512-FB909R7mYvxaJj4MsZPEfI62YgGifdGhRtJT77QTaExxB+ORCgIWfejGSWk5Kf4XgfeaZ4PWEV4soXt63vnFlA==","mode":420,"size":2257}}}
@@ -0,0 +1,7 @@
/**
* @fileoverview This file exports everything for this package.
* @author Nicholas C. Zakas
*/
export * from "./node-hfs.js";
export { Hfs } from "@humanfs/core";
@@ -0,0 +1,18 @@
'use strict';
var $TypeError = require('es-errors/type');
var SameValue = require('./SameValue');
var Type = require('./Type');
// https://262.ecma-international.org/14.0/#sec-samevaluenonnumeric
module.exports = function SameValueNonNumber(x, y) {
if (typeof x === 'number') {
throw new $TypeError('Assertion failed: SameValueNonNumber does not accept Number values');
}
if (Type(x) !== Type(y)) {
throw new $TypeError('SameValueNonNumber requires two non-Number values of the same type.');
}
return SameValue(x, y);
};
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC","sources":["packages/@react-stately/tooltip/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 {useTooltipTriggerState} from './useTooltipTriggerState';\n\nexport type {TooltipTriggerProps} from '@react-types/tooltip';\nexport type {TooltipTriggerState} from './useTooltipTriggerState';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,73 @@
import { Nullable, Arrayable } from './types.js';
declare function nanoid(size?: number): string;
declare function shuffle<T>(array: T[], seed?: number): T[];
interface CloneOptions {
forceWritable?: boolean;
}
interface ErrorOptions {
message?: string;
stackTraceLimit?: number;
}
/**
* Get original stacktrace without source map support the most performant way.
* - Create only 1 stack frame.
* - Rewrite prepareStackTrace to bypass "support-stack-trace" (usually takes ~250ms).
*/
declare function createSimpleStackTrace(options?: ErrorOptions): string;
declare function notNullish<T>(v: T | null | undefined): v is NonNullable<T>;
declare function assertTypes(value: unknown, name: string, types: string[]): void;
declare function isPrimitive(value: unknown): boolean;
declare function slash(path: string): string;
declare function cleanUrl(url: string): string;
declare const isExternalUrl: (url: string) => boolean;
/**
* Prepend `/@id/` and replace null byte so the id is URL-safe.
* This is prepended to resolved ids that are not valid browser
* import specifiers by the importAnalysis plugin.
*/
declare function wrapId(id: string): string;
/**
* Undo {@link wrapId}'s `/@id/` and null byte replacements.
*/
declare function unwrapId(id: string): string;
declare function withTrailingSlash(path: string): string;
declare function isBareImport(id: string): boolean;
declare function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T>;
declare function isObject(item: unknown): boolean;
declare function getType(value: unknown): string;
declare function getOwnProperties(obj: any): (string | symbol)[];
declare function deepClone<T>(val: T, options?: CloneOptions): T;
declare function clone<T>(val: T, seen: WeakMap<any, any>, options?: CloneOptions): T;
declare function noop(): void;
declare function objectAttr(source: any, path: string, defaultValue?: undefined): any;
type DeferPromise<T> = Promise<T> & {
resolve: (value: T | PromiseLike<T>) => void;
reject: (reason?: any) => void;
};
declare function createDefer<T>(): DeferPromise<T>;
/**
* If code starts with a function call, will return its last index, respecting arguments.
* This will return 25 - last ending character of toMatch ")"
* Also works with callbacks
* ```
* toMatch({ test: '123' });
* toBeAliased('123')
* ```
*/
declare function getCallLastIndex(code: string): number | null;
declare function isNegativeNaN(val: number): boolean;
/**
* Deep merge :P
*
* Will merge objects only if they are plain
*
* Do not merge types - it is very expensive and usually it's better to case a type here
*/
declare function deepMerge<T extends object = object>(target: T, ...sources: any[]): T;
export { assertTypes, cleanUrl, clone, createDefer, createSimpleStackTrace, deepClone, deepMerge, getCallLastIndex, getOwnProperties, getType, isBareImport, isExternalUrl, isNegativeNaN, isObject, isPrimitive, nanoid, noop, notNullish, objectAttr, shuffle, slash, toArray, unwrapId, withTrailingSlash, wrapId };
export type { DeferPromise };
@@ -0,0 +1,11 @@
A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors.
[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/)
```js
import colors from 'color-name';
colors.red // [255,0,0]
```
<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a>
@@ -0,0 +1,89 @@
import regeneratorDefine from "./regeneratorDefine.js";
function _regenerator() {
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e,
t,
r = "function" == typeof Symbol ? Symbol : {},
n = r.iterator || "@@iterator",
o = r.toStringTag || "@@toStringTag";
function i(r, n, o, i) {
var c = n && n.prototype instanceof Generator ? n : Generator,
u = Object.create(c.prototype);
return regeneratorDefine(u, "_invoke", function (r, n, o) {
var i,
c,
u,
f = 0,
p = o || [],
y = !1,
G = {
p: 0,
n: 0,
v: e,
a: d,
f: d.bind(e, 4),
d: function d(t, r) {
return i = t, c = 0, u = e, G.n = r, a;
}
};
function d(r, n) {
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
var o,
i = p[t],
d = G.p,
l = i[2];
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
}
if (o || r > 1) return a;
throw y = !0, n;
}
return function (o, p, l) {
if (f > 1) throw TypeError("Generator is already running");
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
try {
if (f = 2, i) {
if (c || (o = "next"), t = i[o]) {
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
if (!t.done) return t;
u = t.value, c < 2 && (c = 0);
} else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
i = e;
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
} catch (t) {
i = e, c = 1, u = t;
} finally {
f = 1;
}
}
return {
value: t,
done: y
};
};
}(r, o, i), !0), u;
}
var a = {};
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
t = Object.getPrototypeOf;
var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function () {
return this;
}), t),
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
function f(e) {
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
}
return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function () {
return this;
}), regeneratorDefine(u, "toString", function () {
return "[object Generator]";
}), (_regenerator = function _regenerator() {
return {
w: i,
m: f
};
})();
}
export { _regenerator as default };
@@ -0,0 +1,11 @@
export { default as FetchAiVoiceList } from './FetchAiVoiceList';
export { default as GetAiVoice } from './GetAiVoice';
export { default as GetMiniAppAdaptShareInfo } from './GetMiniAppAdaptShareInfo';
export { default as GroupSign } from './GroupSign';
export { default as GetStrangerInfo } from './GetStrangerInfo';
export { default as SendPoke } from './SendPoke';
export { default as SetSpecialTitle } from './SetSpecialTitle';
export { default as ImageOCR } from './ImageOCR';
export { default as MoveGroupFile } from './MoveGroupFile';
export { default as RenameGroupFile } from './RenameGroupFile';
export { default as SetGroupTodo } from './SetGroupTodo';
@@ -0,0 +1,36 @@
"use client";
import { frame } from 'motion-dom';
import { useMotionValueEvent } from '../utils/use-motion-value-event.mjs';
import { useMotionValue } from './use-motion-value.mjs';
/**
* Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
*
* ```javascript
* const x = useMotionValue(0)
* const xVelocity = useVelocity(x)
* const xAcceleration = useVelocity(xVelocity)
* ```
*
* @public
*/
function useVelocity(value) {
const velocity = useMotionValue(value.getVelocity());
const updateVelocity = () => {
const latest = value.getVelocity();
velocity.set(latest);
/**
* If we still have velocity, schedule an update for the next frame
* to keep checking until it is zero.
*/
if (latest)
frame.update(updateVelocity);
};
useMotionValueEvent(value, "change", () => {
// Schedule an update to this value at the end of the current frame.
frame.update(updateVelocity, false, true);
});
return velocity;
}
export { useVelocity };
@@ -0,0 +1 @@
export default function accept(file: { name?: string, type?: string }, acceptedFiles: string | string[]): boolean;
@@ -0,0 +1 @@
{"version":3,"file":"decode-data-xml.js","sourceRoot":"https://raw.githubusercontent.com/fb55/entities/61afd4701eaa736978b13c7351cd3de9a96b04bc/src/","sources":["generated/decode-data-xml.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAE9C,eAAe,IAAI,WAAW;AAC1B,kBAAkB;AAClB,uFAAuF;KAClF,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CACnC,CAAC"}
@@ -0,0 +1,34 @@
{
"name": "shebang-command",
"version": "2.0.0",
"description": "Get the command from a shebang",
"license": "MIT",
"repository": "kevva/shebang-command",
"author": {
"name": "Kevin Mårtensson",
"email": "kevinmartensson@gmail.com",
"url": "github.com/kevva"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"cmd",
"command",
"parse",
"shebang"
],
"dependencies": {
"shebang-regex": "^3.0.0"
},
"devDependencies": {
"ava": "^2.3.0",
"xo": "^0.24.0"
}
}
@@ -0,0 +1,198 @@
import Tokenizer, { type Callbacks, QuoteType } from "./Tokenizer.js";
export interface ParserOptions {
/**
* Indicates whether special tags (`<script>`, `<style>`, and `<title>`) should get special treatment
* and if "empty" tags (eg. `<br>`) can have children. If `false`, the content of special tags
* will be text only. For feeds and other XML content (documents that don't consist of HTML),
* set this to `true`.
*
* @default false
*/
xmlMode?: boolean;
/**
* Decode entities within the document.
*
* @default true
*/
decodeEntities?: boolean;
/**
* If set to true, all tags will be lowercased.
*
* @default !xmlMode
*/
lowerCaseTags?: boolean;
/**
* If set to `true`, all attribute names will be lowercased. This has noticeable impact on speed.
*
* @default !xmlMode
*/
lowerCaseAttributeNames?: boolean;
/**
* If set to true, CDATA sections will be recognized as text even if the xmlMode option is not enabled.
* NOTE: If xmlMode is set to `true` then CDATA sections will always be recognized as text.
*
* @default xmlMode
*/
recognizeCDATA?: boolean;
/**
* If set to `true`, self-closing tags will trigger the onclosetag event even if xmlMode is not set to `true`.
* NOTE: If xmlMode is set to `true` then self-closing tags will always be recognized.
*
* @default xmlMode
*/
recognizeSelfClosing?: boolean;
/**
* Allows the default tokenizer to be overwritten.
*/
Tokenizer?: typeof Tokenizer;
}
export interface Handler {
onparserinit(parser: Parser): void;
/**
* Resets the handler back to starting state
*/
onreset(): void;
/**
* Signals the handler that parsing is done
*/
onend(): void;
onerror(error: Error): void;
onclosetag(name: string, isImplied: boolean): void;
onopentagname(name: string): void;
/**
*
* @param name Name of the attribute
* @param value Value of the attribute.
* @param quote Quotes used around the attribute. `null` if the attribute has no quotes around the value, `undefined` if the attribute has no value.
*/
onattribute(name: string, value: string, quote?: string | undefined | null): void;
onopentag(name: string, attribs: {
[s: string]: string;
}, isImplied: boolean): void;
ontext(data: string): void;
oncomment(data: string): void;
oncdatastart(): void;
oncdataend(): void;
oncommentend(): void;
onprocessinginstruction(name: string, data: string): void;
}
export declare class Parser implements Callbacks {
private readonly options;
/** The start index of the last event. */
startIndex: number;
/** The end index of the last event. */
endIndex: number;
/**
* Store the start index of the current open tag,
* so we can update the start index for attributes.
*/
private openTagStart;
private tagname;
private attribname;
private attribvalue;
private attribs;
private readonly stack;
/** Determines whether self-closing tags are recognized. */
private readonly foreignContext;
private readonly cbs;
private readonly lowerCaseTagNames;
private readonly lowerCaseAttributeNames;
private readonly recognizeSelfClosing;
/** We are parsing HTML. Inverse of the `xmlMode` option. */
private readonly htmlMode;
private readonly tokenizer;
private readonly buffers;
private bufferOffset;
/** The index of the last written buffer. Used when resuming after a `pause()`. */
private writeIndex;
/** Indicates whether the parser has finished running / `.end` has been called. */
private ended;
constructor(cbs?: Partial<Handler> | null, options?: ParserOptions);
/** @internal */
ontext(start: number, endIndex: number): void;
/** @internal */
ontextentity(cp: number, endIndex: number): void;
/**
* Checks if the current tag is a void element. Override this if you want
* to specify your own additional void elements.
*/
protected isVoidElement(name: string): boolean;
/** @internal */
onopentagname(start: number, endIndex: number): void;
private emitOpenTag;
private endOpenTag;
/** @internal */
onopentagend(endIndex: number): void;
/** @internal */
onclosetag(start: number, endIndex: number): void;
/** @internal */
onselfclosingtag(endIndex: number): void;
private closeCurrentTag;
/** @internal */
onattribname(start: number, endIndex: number): void;
/** @internal */
onattribdata(start: number, endIndex: number): void;
/** @internal */
onattribentity(cp: number): void;
/** @internal */
onattribend(quote: QuoteType, endIndex: number): void;
private getInstructionName;
/** @internal */
ondeclaration(start: number, endIndex: number): void;
/** @internal */
onprocessinginstruction(start: number, endIndex: number): void;
/** @internal */
oncomment(start: number, endIndex: number, offset: number): void;
/** @internal */
oncdata(start: number, endIndex: number, offset: number): void;
/** @internal */
onend(): void;
/**
* Resets the parser to a blank state, ready to parse a new HTML document
*/
reset(): void;
/**
* Resets the parser, then parses a complete document and
* pushes it to the handler.
*
* @param data Document to parse.
*/
parseComplete(data: string): void;
private getSlice;
private shiftBuffer;
/**
* Parses a chunk of data and calls the corresponding callbacks.
*
* @param chunk Chunk to parse.
*/
write(chunk: string): void;
/**
* Parses the end of the buffer and clears the stack, calls onend.
*
* @param chunk Optional final chunk to parse.
*/
end(chunk?: string): void;
/**
* Pauses parsing. The parser won't emit events until `resume` is called.
*/
pause(): void;
/**
* Resumes parsing after `pause` was called.
*/
resume(): void;
/**
* Alias of `write`, for backwards compatibility.
*
* @param chunk Chunk to parse.
* @deprecated
*/
parseChunk(chunk: string): void;
/**
* Alias of `end`, for backwards compatibility.
*
* @param chunk Optional final chunk to parse.
* @deprecated
*/
done(chunk?: string): void;
}
//# sourceMappingURL=Parser.d.ts.map
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.mode.CTR;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('round', require('../round'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,630 @@
var undefined = (void 0); // Paranoia
// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to
// create, and consume so much memory, that the browser appears frozen.
var MAX_ARRAY_LENGTH = 1e5;
// Approximations of internal ECMAScript conversion functions
var ECMAScript = (function() {
// Stash a copy in case other scripts modify these
var opts = Object.prototype.toString,
ophop = Object.prototype.hasOwnProperty;
return {
// Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues:
Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); },
HasProperty: function(o, p) { return p in o; },
HasOwnProperty: function(o, p) { return ophop.call(o, p); },
IsCallable: function(o) { return typeof o === 'function'; },
ToInt32: function(v) { return v >> 0; },
ToUint32: function(v) { return v >>> 0; }
};
}());
// Snapshot intrinsics
var LN2 = Math.LN2,
abs = Math.abs,
floor = Math.floor,
log = Math.log,
min = Math.min,
pow = Math.pow,
round = Math.round;
// ES5: lock down object properties
function configureProperties(obj) {
if (getOwnPropNames && defineProp) {
var props = getOwnPropNames(obj), i;
for (i = 0; i < props.length; i += 1) {
defineProp(obj, props[i], {
value: obj[props[i]],
writable: false,
enumerable: false,
configurable: false
});
}
}
}
// emulate ES5 getter/setter API using legacy APIs
// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx
// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but
// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless)
var defineProp
if (Object.defineProperty && (function() {
try {
Object.defineProperty({}, 'x', {});
return true;
} catch (e) {
return false;
}
})()) {
defineProp = Object.defineProperty;
} else {
defineProp = function(o, p, desc) {
if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object");
if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); }
if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); }
if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; }
return o;
};
}
var getOwnPropNames = Object.getOwnPropertyNames || function (o) {
if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object");
var props = [], p;
for (p in o) {
if (ECMAScript.HasOwnProperty(o, p)) {
props.push(p);
}
}
return props;
};
// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value)
// for index in 0 ... obj.length
function makeArrayAccessors(obj) {
if (!defineProp) { return; }
if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill");
function makeArrayAccessor(index) {
defineProp(obj, index, {
'get': function() { return obj._getter(index); },
'set': function(v) { obj._setter(index, v); },
enumerable: true,
configurable: false
});
}
var i;
for (i = 0; i < obj.length; i += 1) {
makeArrayAccessor(i);
}
}
// Internal conversion functions:
// pack<Type>() - take a number (interpreted as Type), output a byte array
// unpack<Type>() - take a byte array, output a Type-like number
function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; }
function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; }
function packI8(n) { return [n & 0xff]; }
function unpackI8(bytes) { return as_signed(bytes[0], 8); }
function packU8(n) { return [n & 0xff]; }
function unpackU8(bytes) { return as_unsigned(bytes[0], 8); }
function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; }
function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); }
function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; }
function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); }
function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; }
function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); }
function packIEEE754(v, ebits, fbits) {
var bias = (1 << (ebits - 1)) - 1,
s, e, f, ln,
i, bits, str, bytes;
function roundToEven(n) {
var w = floor(n), f = n - w;
if (f < 0.5)
return w;
if (f > 0.5)
return w + 1;
return w % 2 ? w + 1 : w;
}
// Compute sign, exponent, fraction
if (v !== v) {
// NaN
// http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0;
} else if (v === Infinity || v === -Infinity) {
e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0;
} else if (v === 0) {
e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0;
} else {
s = v < 0;
v = abs(v);
if (v >= pow(2, 1 - bias)) {
e = min(floor(log(v) / LN2), 1023);
f = roundToEven(v / pow(2, e) * pow(2, fbits));
if (f / pow(2, fbits) >= 2) {
e = e + 1;
f = 1;
}
if (e > bias) {
// Overflow
e = (1 << ebits) - 1;
f = 0;
} else {
// Normalized
e = e + bias;
f = f - pow(2, fbits);
}
} else {
// Denormalized
e = 0;
f = roundToEven(v / pow(2, 1 - bias - fbits));
}
}
// Pack sign, exponent, fraction
bits = [];
for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); }
for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); }
bits.push(s ? 1 : 0);
bits.reverse();
str = bits.join('');
// Bits to bytes
bytes = [];
while (str.length) {
bytes.push(parseInt(str.substring(0, 8), 2));
str = str.substring(8);
}
return bytes;
}
function unpackIEEE754(bytes, ebits, fbits) {
// Bytes to bits
var bits = [], i, j, b, str,
bias, s, e, f;
for (i = bytes.length; i; i -= 1) {
b = bytes[i - 1];
for (j = 8; j; j -= 1) {
bits.push(b % 2 ? 1 : 0); b = b >> 1;
}
}
bits.reverse();
str = bits.join('');
// Unpack sign, exponent, fraction
bias = (1 << (ebits - 1)) - 1;
s = parseInt(str.substring(0, 1), 2) ? -1 : 1;
e = parseInt(str.substring(1, 1 + ebits), 2);
f = parseInt(str.substring(1 + ebits), 2);
// Produce number
if (e === (1 << ebits) - 1) {
return f !== 0 ? NaN : s * Infinity;
} else if (e > 0) {
// Normalized
return s * pow(2, e - bias) * (1 + f / pow(2, fbits));
} else if (f !== 0) {
// Denormalized
return s * pow(2, -(bias - 1)) * (f / pow(2, fbits));
} else {
return s < 0 ? -0 : 0;
}
}
function unpackF64(b) { return unpackIEEE754(b, 11, 52); }
function packF64(v) { return packIEEE754(v, 11, 52); }
function unpackF32(b) { return unpackIEEE754(b, 8, 23); }
function packF32(v) { return packIEEE754(v, 8, 23); }
//
// 3 The ArrayBuffer Type
//
(function() {
/** @constructor */
var ArrayBuffer = function ArrayBuffer(length) {
length = ECMAScript.ToInt32(length);
if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer');
this.byteLength = length;
this._bytes = [];
this._bytes.length = length;
var i;
for (i = 0; i < this.byteLength; i += 1) {
this._bytes[i] = 0;
}
configureProperties(this);
};
exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer;
//
// 4 The ArrayBufferView Type
//
// NOTE: this constructor is not exported
/** @constructor */
var ArrayBufferView = function ArrayBufferView() {
//this.buffer = null;
//this.byteOffset = 0;
//this.byteLength = 0;
};
//
// 5 The Typed Array View Types
//
function makeConstructor(bytesPerElement, pack, unpack) {
// Each TypedArray type requires a distinct constructor instance with
// identical logic, which this produces.
var ctor;
ctor = function(buffer, byteOffset, length) {
var array, sequence, i, s;
if (!arguments.length || typeof arguments[0] === 'number') {
// Constructor(unsigned long length)
this.length = ECMAScript.ToInt32(arguments[0]);
if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer');
this.byteLength = this.length * this.BYTES_PER_ELEMENT;
this.buffer = new ArrayBuffer(this.byteLength);
this.byteOffset = 0;
} else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) {
// Constructor(TypedArray array)
array = arguments[0];
this.length = array.length;
this.byteLength = this.length * this.BYTES_PER_ELEMENT;
this.buffer = new ArrayBuffer(this.byteLength);
this.byteOffset = 0;
for (i = 0; i < this.length; i += 1) {
this._setter(i, array._getter(i));
}
} else if (typeof arguments[0] === 'object' &&
!(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
// Constructor(sequence<type> array)
sequence = arguments[0];
this.length = ECMAScript.ToUint32(sequence.length);
this.byteLength = this.length * this.BYTES_PER_ELEMENT;
this.buffer = new ArrayBuffer(this.byteLength);
this.byteOffset = 0;
for (i = 0; i < this.length; i += 1) {
s = sequence[i];
this._setter(i, Number(s));
}
} else if (typeof arguments[0] === 'object' &&
(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) {
// Constructor(ArrayBuffer buffer,
// optional unsigned long byteOffset, optional unsigned long length)
this.buffer = buffer;
this.byteOffset = ECMAScript.ToUint32(byteOffset);
if (this.byteOffset > this.buffer.byteLength) {
throw new RangeError("byteOffset out of range");
}
if (this.byteOffset % this.BYTES_PER_ELEMENT) {
// The given byteOffset must be a multiple of the element
// size of the specific type, otherwise an exception is raised.
throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size.");
}
if (arguments.length < 3) {
this.byteLength = this.buffer.byteLength - this.byteOffset;
if (this.byteLength % this.BYTES_PER_ELEMENT) {
throw new RangeError("length of buffer minus byteOffset not a multiple of the element size");
}
this.length = this.byteLength / this.BYTES_PER_ELEMENT;
} else {
this.length = ECMAScript.ToUint32(length);
this.byteLength = this.length * this.BYTES_PER_ELEMENT;
}
if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
}
} else {
throw new TypeError("Unexpected argument type(s)");
}
this.constructor = ctor;
configureProperties(this);
makeArrayAccessors(this);
};
ctor.prototype = new ArrayBufferView();
ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement;
ctor.prototype._pack = pack;
ctor.prototype._unpack = unpack;
ctor.BYTES_PER_ELEMENT = bytesPerElement;
// getter type (unsigned long index);
ctor.prototype._getter = function(index) {
if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
index = ECMAScript.ToUint32(index);
if (index >= this.length) {
return undefined;
}
var bytes = [], i, o;
for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
i < this.BYTES_PER_ELEMENT;
i += 1, o += 1) {
bytes.push(this.buffer._bytes[o]);
}
return this._unpack(bytes);
};
// NONSTANDARD: convenience alias for getter: type get(unsigned long index);
ctor.prototype.get = ctor.prototype._getter;
// setter void (unsigned long index, type value);
ctor.prototype._setter = function(index, value) {
if (arguments.length < 2) throw new SyntaxError("Not enough arguments");
index = ECMAScript.ToUint32(index);
if (index >= this.length) {
return undefined;
}
var bytes = this._pack(value), i, o;
for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT;
i < this.BYTES_PER_ELEMENT;
i += 1, o += 1) {
this.buffer._bytes[o] = bytes[i];
}
};
// void set(TypedArray array, optional unsigned long offset);
// void set(sequence<type> array, optional unsigned long offset);
ctor.prototype.set = function(index, value) {
if (arguments.length < 1) throw new SyntaxError("Not enough arguments");
var array, sequence, offset, len,
i, s, d,
byteOffset, byteLength, tmp;
if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) {
// void set(TypedArray array, optional unsigned long offset);
array = arguments[0];
offset = ECMAScript.ToUint32(arguments[1]);
if (offset + array.length > this.length) {
throw new RangeError("Offset plus length of array is out of range");
}
byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT;
byteLength = array.length * this.BYTES_PER_ELEMENT;
if (array.buffer === this.buffer) {
tmp = [];
for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) {
tmp[i] = array.buffer._bytes[s];
}
for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) {
this.buffer._bytes[d] = tmp[i];
}
} else {
for (i = 0, s = array.byteOffset, d = byteOffset;
i < byteLength; i += 1, s += 1, d += 1) {
this.buffer._bytes[d] = array.buffer._bytes[s];
}
}
} else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') {
// void set(sequence<type> array, optional unsigned long offset);
sequence = arguments[0];
len = ECMAScript.ToUint32(sequence.length);
offset = ECMAScript.ToUint32(arguments[1]);
if (offset + len > this.length) {
throw new RangeError("Offset plus length of array is out of range");
}
for (i = 0; i < len; i += 1) {
s = sequence[i];
this._setter(offset + i, Number(s));
}
} else {
throw new TypeError("Unexpected argument type(s)");
}
};
// TypedArray subarray(long begin, optional long end);
ctor.prototype.subarray = function(start, end) {
function clamp(v, min, max) { return v < min ? min : v > max ? max : v; }
start = ECMAScript.ToInt32(start);
end = ECMAScript.ToInt32(end);
if (arguments.length < 1) { start = 0; }
if (arguments.length < 2) { end = this.length; }
if (start < 0) { start = this.length + start; }
if (end < 0) { end = this.length + end; }
start = clamp(start, 0, this.length);
end = clamp(end, 0, this.length);
var len = end - start;
if (len < 0) {
len = 0;
}
return new this.constructor(
this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len);
};
return ctor;
}
var Int8Array = makeConstructor(1, packI8, unpackI8);
var Uint8Array = makeConstructor(1, packU8, unpackU8);
var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8);
var Int16Array = makeConstructor(2, packI16, unpackI16);
var Uint16Array = makeConstructor(2, packU16, unpackU16);
var Int32Array = makeConstructor(4, packI32, unpackI32);
var Uint32Array = makeConstructor(4, packU32, unpackU32);
var Float32Array = makeConstructor(4, packF32, unpackF32);
var Float64Array = makeConstructor(8, packF64, unpackF64);
exports.Int8Array = exports.Int8Array || Int8Array;
exports.Uint8Array = exports.Uint8Array || Uint8Array;
exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray;
exports.Int16Array = exports.Int16Array || Int16Array;
exports.Uint16Array = exports.Uint16Array || Uint16Array;
exports.Int32Array = exports.Int32Array || Int32Array;
exports.Uint32Array = exports.Uint32Array || Uint32Array;
exports.Float32Array = exports.Float32Array || Float32Array;
exports.Float64Array = exports.Float64Array || Float64Array;
}());
//
// 6 The DataView View Type
//
(function() {
function r(array, index) {
return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index];
}
var IS_BIG_ENDIAN = (function() {
var u16array = new(exports.Uint16Array)([0x1234]),
u8array = new(exports.Uint8Array)(u16array.buffer);
return r(u8array, 0) === 0x12;
}());
// Constructor(ArrayBuffer buffer,
// optional unsigned long byteOffset,
// optional unsigned long byteLength)
/** @constructor */
var DataView = function DataView(buffer, byteOffset, byteLength) {
if (arguments.length === 0) {
buffer = new exports.ArrayBuffer(0);
} else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) {
throw new TypeError("TypeError");
}
this.buffer = buffer || new exports.ArrayBuffer(0);
this.byteOffset = ECMAScript.ToUint32(byteOffset);
if (this.byteOffset > this.buffer.byteLength) {
throw new RangeError("byteOffset out of range");
}
if (arguments.length < 3) {
this.byteLength = this.buffer.byteLength - this.byteOffset;
} else {
this.byteLength = ECMAScript.ToUint32(byteLength);
}
if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) {
throw new RangeError("byteOffset and length reference an area beyond the end of the buffer");
}
configureProperties(this);
};
function makeGetter(arrayType) {
return function(byteOffset, littleEndian) {
byteOffset = ECMAScript.ToUint32(byteOffset);
if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
throw new RangeError("Array index out of range");
}
byteOffset += this.byteOffset;
var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT),
bytes = [], i;
for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
bytes.push(r(uint8Array, i));
}
if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
bytes.reverse();
}
return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0);
};
}
DataView.prototype.getUint8 = makeGetter(exports.Uint8Array);
DataView.prototype.getInt8 = makeGetter(exports.Int8Array);
DataView.prototype.getUint16 = makeGetter(exports.Uint16Array);
DataView.prototype.getInt16 = makeGetter(exports.Int16Array);
DataView.prototype.getUint32 = makeGetter(exports.Uint32Array);
DataView.prototype.getInt32 = makeGetter(exports.Int32Array);
DataView.prototype.getFloat32 = makeGetter(exports.Float32Array);
DataView.prototype.getFloat64 = makeGetter(exports.Float64Array);
function makeSetter(arrayType) {
return function(byteOffset, value, littleEndian) {
byteOffset = ECMAScript.ToUint32(byteOffset);
if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) {
throw new RangeError("Array index out of range");
}
// Get bytes
var typeArray = new arrayType([value]),
byteArray = new exports.Uint8Array(typeArray.buffer),
bytes = [], i, byteView;
for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) {
bytes.push(r(byteArray, i));
}
// Flip if necessary
if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) {
bytes.reverse();
}
// Write them
byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT);
byteView.set(bytes);
};
}
DataView.prototype.setUint8 = makeSetter(exports.Uint8Array);
DataView.prototype.setInt8 = makeSetter(exports.Int8Array);
DataView.prototype.setUint16 = makeSetter(exports.Uint16Array);
DataView.prototype.setInt16 = makeSetter(exports.Int16Array);
DataView.prototype.setUint32 = makeSetter(exports.Uint32Array);
DataView.prototype.setInt32 = makeSetter(exports.Int32Array);
DataView.prototype.setFloat32 = makeSetter(exports.Float32Array);
DataView.prototype.setFloat64 = makeSetter(exports.Float64Array);
exports.DataView = exports.DataView || DataView;
}());
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;AAgDM,SAAS,0CAAoB,KAAuB;IACzD,IAAI,iBAAC,gBAAgB,kCAAU,sBAAsB,cAAE,aAAa,OAAM,GAAG;IAC7E,IAAI,CAAC,cAAc,gBAAgB,GAAG,CAAA,GAAA,2CAAiB,EACrD,CAAA,GAAA,oBAAM,EAAE,IAAM,MAAM,YAAY,GAAG,IAAI,IAAI,MAAM,YAAY,IAAI,WAAW;QAAC,MAAM,YAAY;KAAC,GAChG,CAAA,GAAA,oBAAM,EAAE,IAAM,MAAM,mBAAmB,GAAG,IAAI,IAAI,MAAM,mBAAmB,IAAI,IAAI,OAAO;QAAC,MAAM,mBAAmB;KAAC,GACrH,MAAM,iBAAiB;IAGzB,OAAO;uBACL;oBACA;sBACA;yBACA;QACA,WAAU,GAAG;YACX,IAAI;YACJ,IAAI,kBAAkB,YAAY;gBAChC,OAAO,IAAI,IAAI;gBACf,IAAI,KAAK,GAAG,CAAC,QAAS,CAAA,CAAC,0BAA0B,KAAK,IAAI,GAAG,CAAA,GAC3D,KAAK,MAAM,CAAC;qBAEZ,KAAK,GAAG,CAAC;YAEb,OACE,OAAO,IAAI,IAAI,aAAa,GAAG,CAAC,QAAQ,CAAC,yBAAyB,EAAE,GAAG;gBAAC;aAAI;YAG9E,gBAAgB;QAClB;QACA,aAAY,GAAG,EAAE,UAAU;YACzB,IAAI,eAAe,aAAa,GAAG,CAAC,MAClC,IAAI,CAAC,SAAS,CAAC;QAEnB;IACF;AACF","sources":["packages/@react-stately/toggle/src/useToggleGroupState.ts"],"sourcesContent":["/*\n * Copyright 2024 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 {Key} from '@react-types/shared';\nimport {useControlledState} from '@react-stately/utils';\nimport {useMemo} from 'react';\n\nexport interface ToggleGroupProps {\n /**\n * Whether single or multiple selection is enabled.\n * @default 'single'\n */\n selectionMode?: 'single' | 'multiple',\n /** Whether the collection allows empty selection. */\n disallowEmptySelection?: boolean,\n /** The currently selected keys in the collection (controlled). */\n selectedKeys?: Iterable<Key>,\n /** The initial selected keys in the collection (uncontrolled). */\n defaultSelectedKeys?: Iterable<Key>,\n /** Handler that is called when the selection changes. */\n onSelectionChange?: (keys: Set<Key>) => void,\n /** Whether all items are disabled. */\n isDisabled?: boolean\n}\n\nexport interface ToggleGroupState {\n /** Whether single or multiple selection is enabled. */\n readonly selectionMode: 'single' | 'multiple',\n\n /** Whether all items are disabled. */\n readonly isDisabled: boolean,\n \n /** A set of keys for items that are selected. */\n readonly selectedKeys: Set<Key>,\n\n /** Toggles the selected state for an item by its key. */\n toggleKey(key: Key): void,\n\n /** Sets whether the given key is selected. */\n setSelected(key: Key, isSelected: boolean): void,\n\n /** Replaces the set of selected keys. */\n setSelectedKeys(keys: Set<Key>): void\n}\n\n/**\n * Manages state for a group of toggles.\n * It supports both single and multiple selected items.\n */\nexport function useToggleGroupState(props: ToggleGroupProps): ToggleGroupState {\n let {selectionMode = 'single', disallowEmptySelection, isDisabled = false} = props;\n let [selectedKeys, setSelectedKeys] = useControlledState(\n useMemo(() => props.selectedKeys ? new Set(props.selectedKeys) : undefined, [props.selectedKeys]),\n useMemo(() => props.defaultSelectedKeys ? new Set(props.defaultSelectedKeys) : new Set(), [props.defaultSelectedKeys]),\n props.onSelectionChange\n );\n\n return {\n selectionMode,\n isDisabled,\n selectedKeys,\n setSelectedKeys,\n toggleKey(key) {\n let keys: Set<Key>;\n if (selectionMode === 'multiple') {\n keys = new Set(selectedKeys);\n if (keys.has(key) && (!disallowEmptySelection || keys.size > 1)) {\n keys.delete(key);\n } else {\n keys.add(key);\n }\n } else {\n keys = new Set(selectedKeys.has(key) && !disallowEmptySelection ? [] : [key]);\n }\n \n setSelectedKeys(keys);\n },\n setSelected(key, isSelected) {\n if (isSelected !== selectedKeys.has(key)) {\n this.toggleKey(key);\n }\n }\n };\n}\n"],"names":[],"version":3,"file":"useToggleGroupState.main.js.map"}
@@ -0,0 +1,50 @@
import {ariaHideOutside as $5e3802645cc19319$export$1c3ebcada18427bf} from "./ariaHideOutside.module.js";
import {useOverlay as $a11501f3d1d39e6c$export$ea8f71083e90600f} from "./useOverlay.module.js";
import {useOverlayFocusContain as $337b884510726a0d$export$14c98a7594375490} from "./Overlay.module.js";
import {usePreventScroll as $49c51c25361d4cd2$export$ee0f7cc6afcd1c18} from "./usePreventScroll.module.js";
import {mergeProps as $7Dhkr$mergeProps} from "@react-aria/utils";
import {useEffect as $7Dhkr$useEffect} from "react";
/*
* Copyright 2022 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 $8ac8429251c45e4b$export$dbc0f175b25fb0fb(props, state, ref) {
let { overlayProps: overlayProps, underlayProps: underlayProps } = (0, $a11501f3d1d39e6c$export$ea8f71083e90600f)({
...props,
isOpen: state.isOpen,
onClose: state.close
}, ref);
(0, $49c51c25361d4cd2$export$ee0f7cc6afcd1c18)({
isDisabled: !state.isOpen
});
(0, $337b884510726a0d$export$14c98a7594375490)();
(0, $7Dhkr$useEffect)(()=>{
if (state.isOpen && ref.current) return (0, $5e3802645cc19319$export$1c3ebcada18427bf)([
ref.current
]);
}, [
state.isOpen,
ref
]);
return {
modalProps: (0, $7Dhkr$mergeProps)(overlayProps),
underlayProps: underlayProps
};
}
export {$8ac8429251c45e4b$export$dbc0f175b25fb0fb as useModalOverlay};
//# sourceMappingURL=useModalOverlay.module.js.map
@@ -0,0 +1 @@
{"name":"object-hash","version":"3.0.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532104706,"integrity":"sha512-e05dknWah8ARXtEDjP3xbCrJDcxG176gwOoeaIdYBYi2rTokpDGwhjkCQlCXx5XlBdVk9yD6e148nIrfAwTQDQ==","mode":420,"size":1092},"index.js":{"checkedAt":1794532104707,"integrity":"sha512-KsvEyLkh4jqQC+uIQNLHx4nc0TUVtdOKzAxhoGD02CpjVW0/4vK8OVgB8AfFPRJ6rWkVCVtwzkJFSGmaoGSNCg==","mode":420,"size":14921},"dist/object_hash.js":{"checkedAt":1794532104707,"integrity":"sha512-tQjNeb2Z2wx0JS163H7iRyOX69aD3gTpkGUdKl9agv/pjyjIS5OU/vvpNmagQdkQJoR5UPm4+ScaKWC9dm188Q==","mode":420,"size":34776},"package.json":{"checkedAt":1794532104707,"integrity":"sha512-AQs07oFuEpx5kz87Oc1hbzPemMIofYcUMqp872+YfPiVUBLWQrWPzAlmOz9PiLgeLlEbpPflIEYACACEWkSgQw==","mode":420,"size":1271},"readme.markdown":{"checkedAt":1794532104707,"integrity":"sha512-a40snTaahbZlHto7q3uKAsx/i6g5wuL9yBRs1Aj+30fA8JG51ZcvONluUbTbHdkrZzwK1CpCX/ItkWk8GPF7Qg==","mode":420,"size":6797}}}
@@ -0,0 +1,22 @@
import {
getValidChildren,
pickChildren
} from "./chunk-FGM523TA.mjs";
import {
filterDOMProps
} from "./chunk-RJKRL3AU.mjs";
import {
DOMEventNames,
DOMPropNames
} from "./chunk-RFWDHYLZ.mjs";
import {
renderFn
} from "./chunk-6HA6QXMR.mjs";
export {
DOMEventNames,
DOMPropNames,
filterDOMProps,
getValidChildren,
pickChildren,
renderFn
};
@@ -0,0 +1,52 @@
import type { Options, SucraseContext, Transform } from "../index";
import { type ClassInfo } from "../util/getClassInfo";
export interface RootTransformerResult {
code: string;
mappings: Array<number | undefined>;
}
export default class RootTransformer {
private transformers;
private nameManager;
private tokens;
private generatedVariables;
private isImportsTransformEnabled;
private isReactHotLoaderTransformEnabled;
private disableESTransforms;
private helperManager;
constructor(sucraseContext: SucraseContext, transforms: Array<Transform>, enableLegacyBabel5ModuleInterop: boolean, options: Options);
transform(): RootTransformerResult;
processBalancedCode(): void;
processToken(): void;
/**
* Skip past a class with a name and return that name.
*/
processNamedClass(): string;
processClass(): void;
/**
* We want to just handle class fields in all contexts, since TypeScript supports them. Later,
* when some JS implementations support class fields, this should be made optional.
*/
processClassBody(classInfo: ClassInfo, className: string | null): void;
makeConstructorInitCode(constructorInitializerStatements: Array<string>, instanceInitializerNames: Array<string>, className: string): string;
/**
* Normally it's ok to simply remove type tokens, but we need to be more careful when dealing with
* arrow function return types since they can confuse the parser. In that case, we want to move
* the close-paren to the same line as the arrow.
*
* See https://github.com/alangpierce/sucrase/issues/391 for more details.
*/
processPossibleArrowParamEnd(): boolean;
/**
* An async arrow function might be of the form:
*
* async <
* T
* >() => {}
*
* in which case, removing the type parameters will cause a syntax error. Detect this case and
* move the open-paren earlier.
*/
processPossibleAsyncArrowWithTypeParams(): boolean;
processPossibleTypeRange(): boolean;
shiftMappings(mappings: Array<number | undefined>, prefixLength: number): Array<number | undefined>;
}
@@ -0,0 +1,5 @@
export interface NodeIKernelDbToolsService {
depositDatabase(...args: unknown[]): unknown;
backupDatabase(...args: unknown[]): unknown;
retrieveDatabase(...args: unknown[]): unknown;
}
@@ -0,0 +1 @@
module.exports={"0":"117","1":"118","2":"119","3":"120","4":"121","5":"122","6":"20","7":"21","8":"22","9":"23",A:"10",B:"11",C:"12",D:"7",E:"8",F:"9",G:"15",H:"80",I:"142",J:"4",K:"6",L:"13",M:"14",N:"16",O:"17",P:"18",Q:"79",R:"81",S:"83",T:"84",U:"85",V:"86",W:"87",X:"88",Y:"89",Z:"90",a:"91",b:"92",c:"93",d:"94",e:"95",f:"96",g:"97",h:"98",i:"99",j:"100",k:"101",l:"102",m:"103",n:"104",o:"105",p:"106",q:"107",r:"108",s:"109",t:"110",u:"111",v:"112",w:"113",x:"114",y:"115",z:"116",AB:"24",BB:"25",CB:"26",DB:"27",EB:"28",FB:"29",GB:"123",HB:"124",IB:"125",JB:"126",KB:"127",LB:"128",MB:"129",NB:"130",OB:"131",PB:"132",QB:"133",RB:"134",SB:"135",TB:"136",UB:"137",VB:"138",WB:"139",XB:"140",YB:"141",ZB:"5",aB:"19",bB:"30",cB:"31",dB:"32",eB:"33",fB:"34",gB:"35",hB:"36",iB:"37",jB:"38",kB:"39",lB:"40",mB:"41",nB:"42",oB:"43",pB:"44",qB:"45",rB:"46",sB:"47",tB:"48",uB:"49",vB:"50",wB:"51",xB:"52",yB:"53",zB:"54","0B":"55","1B":"56","2B":"57","3B":"58","4B":"60","5B":"62","6B":"63","7B":"64","8B":"65","9B":"66",AC:"67",BC:"68",CC:"69",DC:"70",EC:"71",FC:"72",GC:"73",HC:"74",IC:"75",JC:"76",KC:"77",LC:"78",MC:"144",NC:"11.1",OC:"12.1",PC:"15.5",QC:"16.0",RC:"17.0",SC:"18.0",TC:"3",UC:"59",VC:"61",WC:"82",XC:"143",YC:"145",ZC:"3.2",aC:"10.1",bC:"15.2-15.3",cC:"15.4",dC:"16.1",eC:"16.2",fC:"16.3",gC:"16.4",hC:"16.5",iC:"17.1",jC:"17.2",kC:"17.3",lC:"17.4",mC:"17.5",nC:"18.1",oC:"18.2",pC:"18.3",qC:"18.4",rC:"18.5-18.6",sC:"26.0",tC:"26.1",uC:"11.5",vC:"4.2-4.3",wC:"5.5",xC:"2",yC:"146",zC:"147","0C":"3.5","1C":"3.6","2C":"3.1","3C":"5.1","4C":"6.1","5C":"7.1","6C":"9.1","7C":"13.1","8C":"14.1","9C":"15.1",AD:"15.6",BD:"16.6",CD:"17.6",DD:"26.2",ED:"TP",FD:"9.5-9.6",GD:"10.0-10.1",HD:"10.5",ID:"10.6",JD:"11.6",KD:"4.0-4.1",LD:"5.0-5.1",MD:"6.0-6.1",ND:"7.0-7.1",OD:"8.1-8.4",PD:"9.0-9.2",QD:"9.3",RD:"10.0-10.2",SD:"10.3",TD:"11.0-11.2",UD:"11.3-11.4",VD:"12.0-12.1",WD:"12.2-12.5",XD:"13.0-13.1",YD:"13.2",ZD:"13.3",aD:"13.4-13.7",bD:"14.0-14.4",cD:"14.5-14.8",dD:"15.0-15.1",eD:"15.6-15.8",fD:"16.6-16.7",gD:"17.6-17.7",hD:"all",iD:"2.1",jD:"2.2",kD:"2.3",lD:"4.1",mD:"4.4",nD:"4.4.3-4.4.4",oD:"5.0-5.4",pD:"6.2-6.4",qD:"7.2-7.4",rD:"8.2",sD:"9.2",tD:"11.1-11.2",uD:"12.0",vD:"13.0",wD:"14.0",xD:"15.0",yD:"19.0",zD:"14.9","0D":"13.52","1D":"2.5","2D":"3.0-3.1"};
@@ -0,0 +1 @@
!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_uk=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),s="січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),n="січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),o=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function d(_,e,t){var s,n;return"m"===t?e?"хвилина":"хвилину":"h"===t?e?"година":"годину":_+" "+(s=+_,n={ss:e?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:e?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:e?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[t].split("_"),s%10==1&&s%100!=11?n[0]:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?n[1]:n[2])}var i=function(_,e){return o.test(e)?s[_.month()]:n[_.month()]};i.s=n,i.f=s;var r={name:"uk",weekdays:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),weekdaysShort:"ндл_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:i,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekStart:1,relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:d,mm:d,h:d,hh:d,d:"день",dd:d,M:"місяць",MM:d,y:"рік",yy:d},ordinal:function(_){return _},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(r,null,!0),r}));
@@ -0,0 +1,56 @@
import {useListState as $e72dd72e1c76a225$export$2f645645f7bca764} from "./useListState.mjs";
import {useControlledState as $eBozH$useControlledState} from "@react-stately/utils";
import {useMemo as $eBozH$useMemo} from "react";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
function $a0d645289fe9b86b$export$e7f05e985daf4b5f(props) {
var _props_defaultSelectedKey;
let [selectedKey, setSelectedKey] = (0, $eBozH$useControlledState)(props.selectedKey, (_props_defaultSelectedKey = props.defaultSelectedKey) !== null && _props_defaultSelectedKey !== void 0 ? _props_defaultSelectedKey : null, props.onSelectionChange);
let selectedKeys = (0, $eBozH$useMemo)(()=>selectedKey != null ? [
selectedKey
] : [], [
selectedKey
]);
let { collection: collection, disabledKeys: disabledKeys, selectionManager: selectionManager } = (0, $e72dd72e1c76a225$export$2f645645f7bca764)({
...props,
selectionMode: 'single',
disallowEmptySelection: true,
allowDuplicateSelectionEvents: true,
selectedKeys: selectedKeys,
onSelectionChange: (keys)=>{
// impossible, but TS doesn't know that
if (keys === 'all') return;
var _keys_values_next_value;
let key = (_keys_values_next_value = keys.values().next().value) !== null && _keys_values_next_value !== void 0 ? _keys_values_next_value : null;
// Always fire onSelectionChange, even if the key is the same
// as the current key (useControlledState does not).
if (key === selectedKey && props.onSelectionChange) props.onSelectionChange(key);
setSelectedKey(key);
}
});
let selectedItem = selectedKey != null ? collection.getItem(selectedKey) : null;
return {
collection: collection,
disabledKeys: disabledKeys,
selectionManager: selectionManager,
selectedKey: selectedKey,
setSelectedKey: setSelectedKey,
selectedItem: selectedItem
};
}
export {$a0d645289fe9b86b$export$e7f05e985daf4b5f as useSingleSelectListState};
//# sourceMappingURL=useSingleSelectListState.module.js.map
@@ -0,0 +1,11 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"id-length": 0,
"new-cap": [2, { "capIsNewExceptions": ["RequireObjectCoercible"] }],
"no-restricted-syntax": [2, "BreakStatement", "ContinueStatement", "DebuggerStatement", "LabeledStatement", "WithStatement"]
},
}
@@ -0,0 +1,9 @@
import {
utilities
} from "../chunk-3FZCW6LN.mjs";
import "../chunk-4Z22WXZX.mjs";
import "../chunk-WN6AL2BX.mjs";
import "../chunk-W5UU3F46.mjs";
export {
utilities
};
@@ -0,0 +1,22 @@
// src/use-accordion.ts
import { useSelectableList } from "@react-aria/selection";
function useReactAriaAccordion(props, state, ref) {
let { listProps } = useSelectableList({
...props,
...state,
allowsTabNavigation: true,
disallowSelectAll: true,
ref
});
delete listProps.onKeyDownCapture;
return {
accordionProps: {
...listProps,
tabIndex: void 0
}
};
}
export {
useReactAriaAccordion
};
@@ -0,0 +1,20 @@
"use client";
import { useContext } from 'react';
import { MotionConfigContext } from '../../context/MotionConfigContext.mjs';
import { useReducedMotion } from './use-reduced-motion.mjs';
function useReducedMotionConfig() {
const reducedMotionPreference = useReducedMotion();
const { reducedMotion } = useContext(MotionConfigContext);
if (reducedMotion === "never") {
return false;
}
else if (reducedMotion === "always") {
return true;
}
else {
return reducedMotionPreference;
}
}
export { useReducedMotionConfig };
@@ -0,0 +1,146 @@
## Asynchronous work helpers
`Nan::AsyncWorker`, `Nan::AsyncProgressWorker` and `Nan::AsyncProgressQueueWorker` are helper classes that make working with asynchronous code easier.
- <a href="#api_nan_async_worker"><b><code>Nan::AsyncWorker</code></b></a>
- <a href="#api_nan_async_progress_worker"><b><code>Nan::AsyncProgressWorkerBase &amp; Nan::AsyncProgressWorker</code></b></a>
- <a href="#api_nan_async_progress_queue_worker"><b><code>Nan::AsyncProgressQueueWorker</code></b></a>
- <a href="#api_nan_async_queue_worker"><b><code>Nan::AsyncQueueWorker</code></b></a>
<a name="api_nan_async_worker"></a>
### Nan::AsyncWorker
`Nan::AsyncWorker` is an _abstract_ class that you can subclass to have much of the annoying asynchronous queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the asynchronous work is in progress.
This class internally handles the details of creating an [`AsyncResource`][AsyncResource], and running the callback in the
correct async context. To be able to identify the async resources created by this class in async-hooks, provide a
`resource_name` to the constructor. It is recommended that the module name be used as a prefix to the `resource_name` to avoid
collisions in the names. For more details see [`AsyncResource`][AsyncResource] documentation. The `resource_name` needs to stay valid for the lifetime of the worker instance.
Definition:
```c++
class AsyncWorker {
public:
explicit AsyncWorker(Callback *callback_, const char* resource_name = "nan:AsyncWorker");
virtual ~AsyncWorker();
virtual void WorkComplete();
void SaveToPersistent(const char *key, const v8::Local<v8::Value> &value);
void SaveToPersistent(const v8::Local<v8::String> &key,
const v8::Local<v8::Value> &value);
void SaveToPersistent(uint32_t index,
const v8::Local<v8::Value> &value);
v8::Local<v8::Value> GetFromPersistent(const char *key) const;
v8::Local<v8::Value> GetFromPersistent(const v8::Local<v8::String> &key) const;
v8::Local<v8::Value> GetFromPersistent(uint32_t index) const;
virtual void Execute() = 0;
uv_work_t request;
virtual void Destroy();
protected:
Persistent<v8::Object> persistentHandle;
Callback *callback;
virtual void HandleOKCallback();
virtual void HandleErrorCallback();
void SetErrorMessage(const char *msg);
const char* ErrorMessage();
};
```
<a name="api_nan_async_progress_worker"></a>
### Nan::AsyncProgressWorkerBase &amp; Nan::AsyncProgressWorker
`Nan::AsyncProgressWorkerBase` is an _abstract_ class template that extends `Nan::AsyncWorker` and adds additional progress reporting callbacks that can be used during the asynchronous work execution to provide progress data back to JavaScript.
Previously the definition of `Nan::AsyncProgressWorker` only allowed sending `const char` data. Now extending `Nan::AsyncProgressWorker` will yield an instance of the implicit `Nan::AsyncProgressWorkerBase` template with type `<char>` for compatibility.
`Nan::AsyncProgressWorkerBase` &amp; `Nan::AsyncProgressWorker` is intended for best-effort delivery of nonessential progress messages, e.g. a progress bar. The last event sent before the main thread is woken will be delivered.
Definition:
```c++
template<class T>
class AsyncProgressWorkerBase<T> : public AsyncWorker {
public:
explicit AsyncProgressWorkerBase(Callback *callback_, const char* resource_name = ...);
virtual ~AsyncProgressWorkerBase();
void WorkProgress();
class ExecutionProgress {
public:
void Signal() const;
void Send(const T* data, size_t count) const;
};
virtual void Execute(const ExecutionProgress& progress) = 0;
virtual void HandleProgressCallback(const T *data, size_t count) = 0;
virtual void Destroy();
};
typedef AsyncProgressWorkerBase<T> AsyncProgressWorker;
```
<a name="api_nan_async_progress_queue_worker"></a>
### Nan::AsyncProgressQueueWorker
`Nan::AsyncProgressQueueWorker` is an _abstract_ class template that extends `Nan::AsyncWorker` and adds additional progress reporting callbacks that can be used during the asynchronous work execution to provide progress data back to JavaScript.
`Nan::AsyncProgressQueueWorker` behaves exactly the same as `Nan::AsyncProgressWorker`, except all events are queued and delivered to the main thread.
Definition:
```c++
template<class T>
class AsyncProgressQueueWorker<T> : public AsyncWorker {
public:
explicit AsyncProgressQueueWorker(Callback *callback_, const char* resource_name = "nan:AsyncProgressQueueWorker");
virtual ~AsyncProgressQueueWorker();
void WorkProgress();
class ExecutionProgress {
public:
void Send(const T* data, size_t count) const;
};
virtual void Execute(const ExecutionProgress& progress) = 0;
virtual void HandleProgressCallback(const T *data, size_t count) = 0;
virtual void Destroy();
};
```
<a name="api_nan_async_queue_worker"></a>
### Nan::AsyncQueueWorker
`Nan::AsyncQueueWorker` will run a `Nan::AsyncWorker` asynchronously via libuv. Both the `execute` and `after_work` steps are taken care of for you. Most of the logic for this is embedded in `Nan::AsyncWorker`.
Definition:
```c++
void AsyncQueueWorker(AsyncWorker *);
```
[AsyncResource]: node_misc.md#api_nan_asyncresource
@@ -0,0 +1 @@
{"version":3,"names":["require","visitors","exports","_t","cache","_traverseNode","_index","_index2","_hub","VISITOR_KEYS","removeProperties","traverseFast","traverse","parent","opts","scope","state","parentPath","visitSelf","noScope","type","Error","explode","traverseNode","undefined","_default","default","verify","cheap","node","enter","path","skipKeys","clearNode","tree","hasType","denylistTypes","includes","skip","stop"],"sources":["../src/index.ts"],"sourcesContent":["import \"./path/context.ts\"; // We have some cycles, this ensures correct order to avoid TDZ\nimport * as visitors from \"./visitors.ts\";\nimport {\n VISITOR_KEYS,\n removeProperties,\n type RemovePropertiesOptions,\n traverseFast,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nimport * as cache from \"./cache.ts\";\nimport type NodePath from \"./path/index.ts\";\nimport type { default as Scope, Binding } from \"./scope/index.ts\";\nimport type { ExplodedVisitor, Visitor, VisitorBase } from \"./types.ts\";\nimport { traverseNode } from \"./traverse-node.ts\";\n\nexport type { ExplodedVisitor, Visitor, VisitorBase, Binding };\nexport { default as NodePath } from \"./path/index.ts\";\nexport { default as Scope } from \"./scope/index.ts\";\nexport { default as Hub } from \"./hub.ts\";\nexport type { HubInterface } from \"./hub.ts\";\nexport type { VisitWrapper } from \"./visitors.ts\";\n\nexport { visitors };\n\nexport type TraverseOptions<S = t.Node> = {\n scope?: Scope;\n noScope?: boolean;\n denylist?: string[];\n shouldSkip?: (node: NodePath) => boolean;\n} & Visitor<S>;\n\nexport type ExplodedTraverseOptions<S = t.Node> = TraverseOptions<S> &\n ExplodedVisitor<S>;\n\nfunction traverse<S>(\n parent: t.Node,\n opts: TraverseOptions<S>,\n scope: Scope | null | undefined,\n state: S,\n parentPath?: NodePath,\n visitSelf?: boolean,\n): void;\n\nfunction traverse(\n parent: t.Node,\n opts: TraverseOptions,\n scope?: Scope | null,\n state?: any,\n parentPath?: NodePath,\n visitSelf?: boolean,\n): void;\n\nfunction traverse<Options extends TraverseOptions>(\n parent: t.Node,\n // @ts-expect-error provide {} as default value for Options\n opts: Options = {},\n scope?: Scope | null,\n state?: any,\n parentPath?: NodePath,\n visitSelf?: boolean,\n) {\n if (!parent) return;\n\n if (!opts.noScope && !scope) {\n if (parent.type !== \"Program\" && parent.type !== \"File\") {\n throw new Error(\n \"You must pass a scope and parentPath unless traversing a Program/File. \" +\n `Instead of that you tried to traverse a ${parent.type} node without ` +\n \"passing scope and parentPath.\",\n );\n }\n }\n\n if (!parentPath && visitSelf) {\n throw new Error(\"visitSelf can only be used when providing a NodePath.\");\n }\n\n if (!VISITOR_KEYS[parent.type]) {\n return;\n }\n\n visitors.explode(opts as Visitor);\n\n traverseNode(\n parent,\n opts as ExplodedVisitor,\n scope,\n state,\n parentPath,\n /* skipKeys */ undefined,\n visitSelf,\n );\n}\n\nexport default traverse;\n\ntraverse.visitors = visitors;\ntraverse.verify = visitors.verify;\ntraverse.explode = visitors.explode;\n\ntraverse.cheap = function (node: t.Node, enter: (node: t.Node) => void) {\n traverseFast(node, enter);\n return;\n};\n\ntraverse.node = function (\n node: t.Node,\n opts: ExplodedTraverseOptions,\n scope?: Scope,\n state?: any,\n path?: NodePath,\n skipKeys?: Record<string, boolean>,\n) {\n traverseNode(node, opts, scope, state, path, skipKeys);\n // traverse.node always returns undefined\n};\n\ntraverse.clearNode = function (node: t.Node, opts?: RemovePropertiesOptions) {\n removeProperties(node, opts);\n};\n\ntraverse.removeProperties = function (\n tree: t.Node,\n opts?: RemovePropertiesOptions,\n) {\n traverseFast(tree, traverse.clearNode, opts);\n return tree;\n};\n\ntraverse.hasType = function (\n tree: t.Node,\n type: t.Node[\"type\"],\n denylistTypes?: Array<string>,\n): boolean {\n // the node we're searching in is denylisted\n if (denylistTypes?.includes(tree.type)) return false;\n\n // the type we're looking for is the same as the passed node\n if (tree.type === type) return true;\n\n return traverseFast(tree, function (node) {\n if (denylistTypes?.includes(node.type)) {\n return traverseFast.skip;\n }\n if (node.type === type) {\n return traverseFast.stop;\n }\n });\n};\n\ntraverse.cache = cache;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAAA,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AAA0CE,OAAA,CAAAD,QAAA,GAAAA,QAAA;AAC1C,IAAAE,EAAA,GAAAH,OAAA;AAOA,IAAAI,KAAA,GAAAJ,OAAA;AAIA,IAAAK,aAAA,GAAAL,OAAA;AAGA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,OAAA,GAAAP,OAAA;AACA,IAAAQ,IAAA,GAAAR,OAAA;AAA0C;EAfxCS,YAAY;EACZC,gBAAgB;EAEhBC;AAAY,IAAAR,EAAA;AA8Cd,SAASS,QAAQA,CACfC,MAAc,EAEdC,IAAa,GAAG,CAAC,CAAC,EAClBC,KAAoB,EACpBC,KAAW,EACXC,UAAqB,EACrBC,SAAmB,EACnB;EACA,IAAI,CAACL,MAAM,EAAE;EAEb,IAAI,CAACC,IAAI,CAACK,OAAO,IAAI,CAACJ,KAAK,Line truncated
@@ -0,0 +1,6 @@
<svg viewbox="0 0 18 18">
<polyline class="ql-stroke" points="3.5 14 7 4 10.5 14"></polyline>
<line class="ql-stroke" x1="9.45" x2="4.55" y1="11" y2="11"></line>
<rect class="ql-fill" height="5" rx="0.5" ry="0.5" width="1" x="13" y="4"></rect>
<rect class="ql-fill" height="5" rx="0.5" ry="0.5" transform="translate(20 -7) rotate(90)" width="1" x="13" y="4"></rect>
</svg>

After

Width:  |  Height:  |  Size: 380 B

@@ -0,0 +1,13 @@
/**
* @fileoverview JSON reporter
* @author Burak Yigit Kaya aka BYK
*/
"use strict";
//------------------------------------------------------------------------------
// Public Interface
//------------------------------------------------------------------------------
module.exports = function (results) {
return JSON.stringify(results);
};
@@ -0,0 +1,20 @@
// Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
interface RelativeIndexable<T> {
at(index: number): T | undefined;
}
interface String extends RelativeIndexable<string> {}
interface Array<T> extends RelativeIndexable<T> {}
interface ReadonlyArray<T> extends RelativeIndexable<T> {}
interface Int8Array extends RelativeIndexable<number> {}
interface Uint8Array extends RelativeIndexable<number> {}
interface Uint8ClampedArray extends RelativeIndexable<number> {}
interface Int16Array extends RelativeIndexable<number> {}
interface Uint16Array extends RelativeIndexable<number> {}
interface Int32Array extends RelativeIndexable<number> {}
interface Uint32Array extends RelativeIndexable<number> {}
interface Float32Array extends RelativeIndexable<number> {}
interface Float64Array extends RelativeIndexable<number> {}
interface BigInt64Array extends RelativeIndexable<bigint> {}
interface BigUint64Array extends RelativeIndexable<bigint> {}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"2":"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 0C 1C","1028":"c d e f g","3076":"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","8193":"0 1 2 3 4 5 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 UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB","132":"vB wB","260":"xB yB","516":"zB 0B 1B 2B 3B"},E:{"1":"RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C","4100":"G 9C bC cC PC AD QC dC eC fC gC hC BD"},F:{"1":"0 1 2 3 4 5 rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB FD GD HD ID NC uC JD OC","132":"iB jB","260":"kB lB","516":"mB nB oB pB qB"},G:{"1":"RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD","4100":"dD bC cC PC eD QC dC eC fC gC hC fD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"8193":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB pD qD rD sD aC tD uD vD wD xD QC RC SC yD","16":"J oD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"3076":"1D 2D"}},B:1,C:"createImageBitmap",D:true};
@@ -0,0 +1,6 @@
import {
ChevronLeftIcon
} from "./chunk-KR2JWD3K.mjs";
export {
ChevronLeftIcon
};
@@ -0,0 +1,7 @@
// Generated using scripts/write-decode-map.ts
export default new Uint16Array(
// prettier-ignore
"\u0200aglq\t\x15\x18\x1b\u026d\x0f\0\0\x12p;\u4026os;\u4027t;\u403et;\u403cuot;\u4022"
.split("")
.map((c) => c.charCodeAt(0)));
//# sourceMappingURL=decode-data-xml.js.map
@@ -0,0 +1,43 @@
{
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)",
"name": "which",
"description": "Like which(1) unix command. Find the first instance of an executable in the PATH.",
"version": "2.0.2",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-which.git"
},
"main": "which.js",
"bin": {
"node-which": "./bin/node-which"
},
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"devDependencies": {
"mkdirp": "^0.5.0",
"rimraf": "^2.6.2",
"tap": "^14.6.9"
},
"scripts": {
"test": "tap",
"preversion": "npm test",
"postversion": "npm publish",
"prepublish": "npm run changelog",
"prechangelog": "bash gen-changelog.sh",
"changelog": "git add CHANGELOG.md",
"postchangelog": "git commit -m 'update changelog - '${npm_package_version}",
"postpublish": "git push origin --follow-tags"
},
"files": [
"which.js",
"bin/node-which"
],
"tap": {
"check-coverage": true
},
"engines": {
"node": ">= 8"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"color.js","names":["ClassAttributor","Scope","StyleAttributor","ColorAttributor","value","domNode","startsWith","replace","hex","split","map","component","parseInt","toString","slice","join","ColorClass","scope","INLINE","ColorStyle"],"sources":["../../src/formats/color.ts"],"sourcesContent":["import { ClassAttributor, Scope, StyleAttributor } from 'parchment';\n\nclass ColorAttributor extends StyleAttributor {\n value(domNode: HTMLElement) {\n let value = super.value(domNode) as string;\n if (!value.startsWith('rgb(')) return value;\n value = value.replace(/^[^\\d]+/, '').replace(/[^\\d]+$/, '');\n const hex = value\n .split(',')\n .map((component) => `00${parseInt(component, 10).toString(16)}`.slice(-2))\n .join('');\n return `#${hex}`;\n }\n}\n\nconst ColorClass = new ClassAttributor('color', 'ql-color', {\n scope: Scope.INLINE,\n});\nconst ColorStyle = new ColorAttributor('color', 'color', {\n scope: Scope.INLINE,\n});\n\nexport { ColorAttributor, ColorClass, ColorStyle };\n"],"mappings":"AAAA,SAASA,eAAe,EAAEC,KAAK,EAAEC,eAAe,QAAQ,WAAW;AAEnE,MAAMC,eAAe,SAASD,eAAe,CAAC;EAC5CE,KAAKA,CAACC,OAAoB,EAAE;IAC1B,IAAID,KAAK,GAAG,KAAK,CAACA,KAAK,CAACC,OAAO,CAAW;IAC1C,IAAI,CAACD,KAAK,CAACE,UAAU,CAAC,MAAM,CAAC,EAAE,OAAOF,KAAK;IAC3CA,KAAK,GAAGA,KAAK,CAACG,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAACA,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;IAC3D,MAAMC,GAAG,GAAGJ,KAAK,CACdK,KAAK,CAAC,GAAG,CAAC,CACVC,GAAG,CAAEC,SAAS,IAAM,KAAIC,QAAQ,CAACD,SAAS,EAAE,EAAE,CAAC,CAACE,QAAQ,CAAC,EAAE,CAAE,EAAC,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CACzEC,IAAI,CAAC,EAAE,CAAC;IACX,OAAQ,IAAGP,GAAI,EAAC;EAClB;AACF;AAEA,MAAMQ,UAAU,GAAG,IAAIhB,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE;EAC1DiB,KAAK,EAAEhB,KAAK,CAACiB;AACf,CAAC,CAAC;AACF,MAAMC,UAAU,GAAG,IAAIhB,eAAe,CAAC,OAAO,EAAE,OAAO,EAAE;EACvDc,KAAK,EAAEhB,KAAK,CAACiB;AACf,CAAC,CAAC;AAEF,SAASf,eAAe,EAAEa,UAAU,EAAEG,UAAU","ignoreList":[]}
@@ -0,0 +1,718 @@
export default `flf2a$ 7 6 20 15 2
Rounded by Nick Miners N.M.Miners@durham.ac.uk
May 1994
$$#
$$#
$$#
$$#
$$#
$$#
$$##
_ #
| |#
| |#
|_|#
_ #
|_|#
##
_ _ #
( )( )#
|/ \\|#
#
#
#
##
_ _ #
_| U |_ #
(_ _)#
_| O |_ #
(_ _)#
|_n_| #
##
_ #
_| |_ #
| ___)#
|___ |#
(_ _|#
|_| #
##
_ _ #
(_) | |#
/ / #
/ / #
/ / _ #
|_| (_)#
##
___ #
/ _ \\ #
( (_) ) #
) _ ( #
( (/ \\ #
\\__/\\_)#
##
_ #
( )#
|/ #
#
#
#
##
_ #
/ )#
| | #
| | #
| | #
\\_)#
##
_ #
( \\ #
| |#
| |#
| |#
(_/ #
##
_ #
_ | | _ #
( \\| |/ )#
) ( #
(_/| |\\_)#
|_| #
##
#
_ #
_| |_ #
(_ _)#
|_| #
#
##
#
#
#
#
_ #
( )#
|/ ##
#
#
_____ #
(_____)#
#
#
##
#
#
#
#
_ #
(_)#
##
_ #
| |#
/ / #
/ / #
/ / #
|_| #
##
_____ #
(_____) #
_ __ _ #
| |/ /| |#
| /_| |#
\\_____/ #
##
___ #
(___) #
_ #
| | #
_| |_ #
(_____)#
##
______ #
(_____ \\ #
____) )#
/ ____/ #
| (_____ #
|_______)#
##
______ #
(_____ \\ #
_____) )#
(_____ ( #
_____) )#
(______/ #
##
_ _ #
| | (_)#
| |_____ #
|_____ |#
| |#
|_|#
##
_______ #
(_______)#
______ #
(_____ \\ #
_____) )#
(______/ #
##
_______ #
(_______)#
______ #
| ___ \\ #
| |___) )#
|______/ #
##
_______ #
(_______)#
_ #
/ ) #
/ / #
(_/ #
##
_____ #
(_____) #
_____ #
/ ___ \\ #
( (___) )#
\\_____/ #
##
_______ #
(_______)#
_______ #
(_____ |#
| |#
|_|#
##
#
#
_ #
(_)#
_ #
(_)#
##
#
#
_ #
(_)#
_ #
( )#
|/ ##
#
_ #
/ )#
( ( #
\\_)#
#
##
#
_____ #
(_____)#
_____ #
(_____)#
#
##
#
_ #
( \\ #
) )#
(_/ #
#
##
___ #
/ _ \\ #
(_( ) )#
(_/ #
_ #
(_) #
##
_____ #
/ __ \\ #
| | / )#
| | \\__/ #
| |____ #
\\_____) #
##
_______ #
(_______)#
_______ #
| ___ |#
| | | |#
|_| |_|#
##
______ #
(____ \\ #
____) )#
| __ ( #
| |__) )#
|______/ #
##
_______ #
(_______)#
_ #
| | #
| |_____ #
\\______)#
##
______ #
(______) #
_ _ #
| | | |#
| |__/ / #
|_____/ #
##
_______ #
(_______)#
_____ #
| ___) #
| |_____ #
|_______)#
##
_______ #
(_______)#
_____ #
| ___) #
| | #
|_| #
##
_______ #
(_______)#
_ ___ #
| | (_ |#
| |___) |#
\\_____/ #
##
_ _ #
(_) (_)#
_______ #
| ___ |#
| | | |#
|_| |_|#
##
_ #
| |#
| |#
| |#
| |#
|_|#
##
_______ #
(_______)#
_ #
_ | | #
| |_| | #
\\___/ #
##
_ _ #
(_) | |#
_____| |#
| _ _)#
| | \\ \\ #
|_| \\_)#
##
_ #
(_) #
_ #
| | #
| |_____ #
|_______)#
##
_______ #
(_______)#
_ _ _ #
| ||_|| |#
| | | |#
|_| |_|#
##
_______ #
(_______)#
_ _ #
| | | |#
| | | |#
|_| |_|#
##
_______ #
(_______)#
_ _ #
| | | |#
| |___| |#
\\_____/ #
##
______ #
(_____ \\ #
_____) )#
| ____/ #
| | #
|_| #
##
_______ #
(_______)#
_ _ #
| | | | #
| |__| | #
\\______)#
##
______ #
(_____ \\ #
_____) )#
| __ / #
| | \\ \\ #
|_| |_|#
##
______ #
/ _____)#
( (____ #
\\____ \\ #
_____) )#
(______/ #
##
_______ #
(_______)#
_ #
| | #
| | #
|_| #
##
_ _ #
(_) (_)#
_ _ #
| | | |#
| |___| |#
\\_____/ #
##
_ _ #
(_) (_)#
_ _ #
| | | |#
\\ \\ / / #
\\___/ #
##
_ _ _ #
(_)(_)(_)#
_ _ _ #
| || || |#
| || || |#
\\_____/ #
##
_ _ #
(_) (_)#
___ #
| | #
/ / \\ \\ #
|_| |_|#
##
_ _ #
| | | |#
| |___| |#
|_____ |#
_____| |#
(_______|#
##
_______ #
(_______)#
__ #
/ / #
/ /____ #
(_______)#
##
___ #
| _)#
| | #
| | #
| |_ #
|___)#
##
_ #
| | #
\\ \\ #
\\ \\ #
\\ \\ #
|_|#
##
___ #
(_ |#
| |#
| |#
_| |#
(___|#
##
__ #
/ \\ #
(_/\\_)#
#
#
#
##
#
#
#
#
_______ #
(_______)#
##
_ #
( )#
\\|#
#
#
#
##
#
#
_____ #
(____ |#
/ ___ |#
\\_____|#
##
_ #
| | #
| |__ #
| _ \\ #
| |_) )#
|____/ #
##
#
#
____ #
/ ___)#
( (___ #
\\____)#
##
_ #
| |#
__| |#
/ _ |#
( (_| |#
\\____|#
##
#
#
_____ #
| ___ |#
| ____|#
|_____)#
##
___ #
/ __)#
_| |__ #
(_ __)#
| | #
|_| #
##
#
#
____ #
/ _ |#
( (_| |#
\\___ |#
(_____|##
_ #
| | #
| |__ #
| _ \\ #
| | | |#
|_| |_|#
##
_ #
(_)#
_ #
| |#
| |#
|_|#
##
_ #
(_)#
_ #
| |#
| |#
_| |#
(__/ ##
_ #
| | #
| | _ #
| |_/ )#
| _ ( #
|_| \\_)#
##
_ #
| | #
| | #
| | #
| | #
\\_)#
##
#
#
____ #
| \\ #
| | | |#
|_|_|_|#
##
#
#
____ #
| _ \\ #
| | | |#
|_| |_|#
##
#
#
___ #
/ _ \\ #
| |_| |#
\\___/ #
##
#
#
____ #
| _ \\ #
| |_| |#
| __/ #
|_| ##
#
#
____ #
/ _ |#
| |_| |#
\\__ |#
|_|##
#
#
____ #
/ ___)#
| | #
|_| #
##
#
#
___ #
/___)#
|___ |#
(___/ #
##
#
_ #
_| |_ #
(_ _)#
| |_ #
\\__)#
##
#
#
_ _ #
| | | |#
| |_| |#
|____/ #
##
#
#
_ _ #
| | | |#
\\ V / #
\\_/ #
##
#
#
_ _ _ #
| | | |#
| | | |#
\\___/ #
##
#
#
_ _ #
( \\ / )#
) X ( #
(_/ \\_)#
##
#
#
_ _ #
| | | |#
| |_| |#
\\__ |#
(____/ ##
#
#
_____ #
(___ )#
/ __/ #
(_____)#
##
__ #
/ _)#
| | #
( ( #
| |_ #
\\__)#
##
_ #
| |#
|_|#
_ #
| |#
|_|#
##
__ #
(_ \\ #
| | #
) )#
_| | #
(__/ #
##
__ _ #
/ \\/ )#
(_/\\__/ #
#
#
#
##
_______ #
(_)___(_)#
_______ #
| ___ |#
| | | |#
|_| |_|#
##
_______ #
(_)___(_)#
_ _ #
| | | |#
| |___| |#
\\_____/ #
##
_ _ #
(_) (_)#
_ _ #
| | | |#
| |___| |#
\\_____/ #
##
_ _ #
(_) (_)#
_____ #
(____ |#
/ ___ |#
\\_____|#
##
_ _ #
(_) (_)#
___ #
/ _ \\ #
| |_| |#
\\___/ #
##
_ _ #
(_) (_)#
_ _ #
| | | |#
| |_| |#
|____/ #
##
___ #
/ _ \\ #
| ( ) )#
| |( ( #
| | ) )#
|_|(_/ #
##
`
@@ -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/hasown
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 a single custom sponsorship URL
@@ -0,0 +1 @@
{"version":3,"file":"metadataService.d.ts","sourceRoot":"","sources":["../../src/services/metadataService.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAKjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAyBrD;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,QAAQ,CAAC;AAIvD,UAAU,eAAe;IACvB;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,IAAI,CAAC,EAAE;QAChB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;QACjC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;KACrC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClB;;;;;OAKG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;CACnF;AAED;;;;;GAKG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,cAAc,CAA6C;IACnE,OAAO,CAAC,KAAK,CAAyC;IACtD,OAAO,CAAC,gBAAgB,CAA8B;IAEhD,UAAU,CACd,IAAI,GAAE;QACJ,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;QACtB,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;QACjC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;KAChC,GACL,OAAO,CAAC,IAAI,CAAC;IA+DV,YAAY,CAChB,MAAM,EAAE,MAAM,GAAG,WAAW,GAC3B,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC;IA6DzC;;OAEG;YACW,YAAY;IAqE1B;;OAEG;IACH,OAAO,CAAC,eAAe;IAgCvB;;OAEG;IACH,OAAO,CAAC,QAAQ;CAWjB;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,eAA2C,CAAC"}
@@ -0,0 +1,42 @@
import * as React from 'react';
import { IconSvgProps } from './types.js';
interface IconProps extends IconSvgProps {
fill?: string;
filled?: boolean;
size?: string | number;
height?: string | number;
width?: string | number;
label?: string;
}
declare const Sun: React.FC<IconProps>;
declare const Mail: React.FC<IconProps>;
declare const Moon: React.FC<IconProps>;
declare const Lock: React.FC<IconProps>;
declare const Unlock: React.FC<IconProps>;
declare const Password: React.FC<IconProps>;
declare const Notification: React.FC<IconProps>;
declare const User: React.FC<IconProps>;
declare const VolumeUp: React.FC<IconProps>;
declare const Camera: React.FC<IconProps>;
declare const Activity: React.FC<IconProps>;
declare const Plus: React.FC<IconProps>;
declare const Minus: React.FC<IconProps>;
declare const Eye: React.FC<IconProps>;
declare const Edit: React.FC<IconProps>;
declare const Delete: React.FC<IconProps>;
declare const ChevronDown: React.FC<IconProps>;
declare const ChevronDownBold: React.FC<IconProps>;
declare const NewFile: React.FC<IconProps>;
declare const AddNoteBulk: React.FC<IconProps>;
declare const CopyDocumentBulk: React.FC<IconProps>;
declare const EditDocumentBulk: React.FC<IconProps>;
declare const DeleteDocumentBulk: React.FC<IconProps>;
declare const CartIcon: React.FC<IconProps>;
declare const Flash: React.FC<IconProps>;
declare const Server: React.FC<IconProps>;
declare const TagUser: React.FC<IconProps>;
declare const Scale: React.FC<IconProps>;
declare const Search: React.FC<IconProps>;
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 };
@@ -0,0 +1,5 @@
import type React from 'react';
/**
* 从 Touch 事件中获取两个触控中心位置
*/
export default function getMultipleTouchPosition(evt: TouchEvent | React.TouchEvent): [clientX: number, clientY: number, touchLength: number];
@@ -0,0 +1,216 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var picocolors = require('picocolors');
var jsTokens = require('js-tokens');
var helperValidatorIdentifier = require('@babel/helper-validator-identifier');
function isColorSupported() {
return (typeof process === "object" && (process.env.FORCE_COLOR === "0" || process.env.FORCE_COLOR === "false") ? false : picocolors.isColorSupported
);
}
const compose = (f, g) => v => f(g(v));
function buildDefs(colors) {
return {
keyword: colors.cyan,
capitalized: colors.yellow,
jsxIdentifier: colors.yellow,
punctuator: colors.yellow,
number: colors.magenta,
string: colors.green,
regex: colors.magenta,
comment: colors.gray,
invalid: compose(compose(colors.white, colors.bgRed), colors.bold),
gutter: colors.gray,
marker: compose(colors.red, colors.bold),
message: compose(colors.red, colors.bold),
reset: colors.reset
};
}
const defsOn = buildDefs(picocolors.createColors(true));
const defsOff = buildDefs(picocolors.createColors(false));
function getDefs(enabled) {
return enabled ? defsOn : defsOff;
}
const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]);
const NEWLINE$1 = /\r\n|[\n\r\u2028\u2029]/;
const BRACKET = /^[()[\]{}]$/;
let tokenize;
{
const JSX_TAG = /^[a-z][\w-]*$/i;
const getTokenType = function (token, offset, text) {
if (token.type === "name") {
if (helperValidatorIdentifier.isKeyword(token.value) || helperValidatorIdentifier.isStrictReservedWord(token.value, true) || sometimesKeywords.has(token.value)) {
return "keyword";
}
if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.slice(offset - 2, offset) === "</")) {
return "jsxIdentifier";
}
if (token.value[0] !== token.value[0].toLowerCase()) {
return "capitalized";
}
}
if (token.type === "punctuator" && BRACKET.test(token.value)) {
return "bracket";
}
if (token.type === "invalid" && (token.value === "@" || token.value === "#")) {
return "punctuator";
}
return token.type;
};
tokenize = function* (text) {
let match;
while (match = jsTokens.default.exec(text)) {
const token = jsTokens.matchToToken(match);
yield {
type: getTokenType(token, match.index, text),
value: token.value
};
}
};
}
function highlight(text) {
if (text === "") return "";
const defs = getDefs(true);
let highlighted = "";
for (const {
type,
value
} of tokenize(text)) {
if (type in defs) {
highlighted += value.split(NEWLINE$1).map(str => defs[type](str)).join("\n");
} else {
highlighted += value;
}
}
return highlighted;
}
let deprecationWarningShown = false;
const NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
function getMarkerLines(loc, source, opts) {
const startLoc = Object.assign({
column: 0,
line: -1
}, loc.start);
const endLoc = Object.assign({}, startLoc, loc.end);
const {
linesAbove = 2,
linesBelow = 3
} = opts || {};
const startLine = startLoc.line;
const startColumn = startLoc.column;
const endLine = endLoc.line;
const endColumn = endLoc.column;
let start = Math.max(startLine - (linesAbove + 1), 0);
let end = Math.min(source.length, endLine + linesBelow);
if (startLine === -1) {
start = 0;
}
if (endLine === -1) {
end = source.length;
}
const lineDiff = endLine - startLine;
const markerLines = {};
if (lineDiff) {
for (let i = 0; i <= lineDiff; i++) {
const lineNumber = i + startLine;
if (!startColumn) {
markerLines[lineNumber] = true;
} else if (i === 0) {
const sourceLength = source[lineNumber - 1].length;
markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];
} else if (i === lineDiff) {
markerLines[lineNumber] = [0, endColumn];
} else {
const sourceLength = source[lineNumber - i].length;
markerLines[lineNumber] = [0, sourceLength];
}
}
} else {
if (startColumn === endColumn) {
if (startColumn) {
markerLines[startLine] = [startColumn, 0];
} else {
markerLines[startLine] = true;
}
} else {
markerLines[startLine] = [startColumn, endColumn - startColumn];
}
}
return {
start,
end,
markerLines
};
}
function codeFrameColumns(rawLines, loc, opts = {}) {
const shouldHighlight = opts.forceColor || isColorSupported() && opts.highlightCode;
const defs = getDefs(shouldHighlight);
const lines = rawLines.split(NEWLINE);
const {
start,
end,
markerLines
} = getMarkerLines(loc, lines, opts);
const hasColumns = loc.start && typeof loc.start.column === "number";
const numberMaxWidth = String(end).length;
const highlightedLines = shouldHighlight ? highlight(rawLines) : rawLines;
let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {
const number = start + 1 + index;
const paddedNumber = ` ${number}`.slice(-numberMaxWidth);
const gutter = ` ${paddedNumber} |`;
const hasMarker = markerLines[number];
const lastMarkerLine = !markerLines[number + 1];
if (hasMarker) {
let markerLine = "";
if (Array.isArray(hasMarker)) {
const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " ");
const numberOfMarkers = hasMarker[1] || 1;
markerLine = ["\n ", defs.gutter(gutter.replace(/\d/g, " ")), " ", markerSpacing, defs.marker("^").repeat(numberOfMarkers)].join("");
if (lastMarkerLine && opts.message) {
markerLine += " " + defs.message(opts.message);
}
}
return [defs.marker(">"), defs.gutter(gutter), line.length > 0 ? ` ${line}` : "", markerLine].join("");
} else {
return ` ${defs.gutter(gutter)}${line.length > 0 ? ` ${line}` : ""}`;
}
}).join("\n");
if (opts.message && !hasColumns) {
frame = `${" ".repeat(numberMaxWidth + 1)}${opts.message}\n${frame}`;
}
if (shouldHighlight) {
return defs.reset(frame);
} else {
return frame;
}
}
function index (rawLines, lineNumber, colNumber, opts = {}) {
if (!deprecationWarningShown) {
deprecationWarningShown = true;
const message = "Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";
if (process.emitWarning) {
process.emitWarning(message, "DeprecationWarning");
} else {
const deprecationError = new Error(message);
deprecationError.name = "DeprecationWarning";
console.warn(new Error(message));
}
}
colNumber = Math.max(colNumber, 0);
const location = {
start: {
column: colNumber,
line: lineNumber
}
};
return codeFrameColumns(rawLines, location, opts);
}
exports.codeFrameColumns = codeFrameColumns;
exports.default = index;
exports.highlight = highlight;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=PluginContext.js.map
@@ -0,0 +1,6 @@
"use strict";
const addObject = require("./addObject-BB40bW2H.js");
function add(date, num, unit) {
return typeof num === "object" && num !== null ? addObject.addObject(date, num, 1) : addObject.addNumber(date, num, unit);
}
module.exports = add;
@@ -0,0 +1,65 @@
# ordered-read-streams [![NPM version](https://img.shields.io/npm/v/ordered-read-streams.svg)](http://badge.fury.io/js/ordered-read-streams) [![Build Status](https://travis-ci.org/armed/ordered-read-streams.svg?branch=master)](https://travis-ci.org/armed/ordered-read-streams)
Combines array of streams into one read stream in strict order.
## Installation
`npm install ordered-read-streams`
## Overview
`ordered-read-streams` handles all data/errors from input streams in parallel, but emits data/errors in strict order in which streams are passed to constructor. This is `objectMode = true` stream.
## Example
```js
var through = require('through2');
var Ordered = require('ordered-read-streams');
var s1 = through.obj(function (data, enc, next) {
var self = this;
setTimeout(function () {
self.push(data);
next();
}, 200)
});
var s2 = through.obj(function (data, enc, next) {
var self = this;
setTimeout(function () {
self.push(data);
next();
}, 30)
});
var s3 = through.obj(function (data, enc, next) {
var self = this;
setTimeout(function () {
self.push(data);
next();
}, 100)
});
var streams = new Ordered([s1, s2, s3]);
streams.on('data', function (data) {
console.log(data);
})
s1.write('stream 1');
s1.end();
s2.write('stream 2');
s2.end();
s3.write('stream 3');
s3.end();
```
Ouput will be:
```
stream 1
stream 2
stream 3
```
## Licence
MIT
@@ -0,0 +1,5 @@
function camelToDash(str) {
return str.replace(/([A-Z])/g, (match) => `-${match.toLowerCase()}`);
}
export { camelToDash };
@@ -0,0 +1 @@
{"name":"thenify","version":"3.3.1","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532105892,"integrity":"sha512-ceaxPOkl6bOUI+MxWXmnltwgGHScVxp8BtBVv3lTI9e0aDkMTyktRMAMUpfJNCRWUXLreypejX2bpEPGXuDxOA==","mode":420,"size":1121},"index.js":{"checkedAt":1794532105892,"integrity":"sha512-rQCQBbzBXGbtNXKgGH7ubxM7I8XbK4b7Uqex9F5e6stPGsIJ4ZNDqY20z6BRQnuR5DXxt6uRjhdw64ppZPNnQA==","mode":420,"size":1946},"package.json":{"checkedAt":1794532105892,"integrity":"sha512-L5yQb2DgQ5gmPYKBEMXsIKFurO+hPpaokj6s2CRasbuTtZw77VWag+SdLtHm2QsDoDq1WKiOgR2owJWwgvk8AA==","mode":420,"size":752},"History.md":{"checkedAt":1794532105892,"integrity":"sha512-qJhVExiwxXKXFcA1cZZDPhgVyn9DWK8uV1FQBAjsTfEDCmXsVZPWHFvXFc6YeU4NcoyjcjRnJDM0248zZYyf2Q==","mode":420,"size":317},"README.md":{"checkedAt":1794532105892,"integrity":"sha512-Ef6TP6rvR3aw/yTBcrSrlujb+ZpZWsTmbr8YJRJ6XhIk7hsHoQEYx8Vff3EZvWo1DE7CiQhtyYfmssazIoVL+w==","mode":420,"size":3784}}}
@@ -0,0 +1,52 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/link-icon.tsx
var link_icon_exports = {};
__export(link_icon_exports, {
LinkIcon: () => LinkIcon
});
module.exports = __toCommonJS(link_icon_exports);
var import_jsx_runtime = require("react/jsx-runtime");
var LinkIcon = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"svg",
{
"aria-hidden": "true",
className: "flex mx-1 text-current self-center",
fill: "none",
height: "1em",
shapeRendering: "geometricPrecision",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: "1.5",
viewBox: "0 0 24 24",
width: "1em",
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M15 3h6v6" }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M10 14L21 3" })
]
}
);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
LinkIcon
});
@@ -0,0 +1,143 @@
"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 (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parsedType = void 0;
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
exports.parsedType = parsedType;
const error = () => {
const Sizable = {
string: { unit: "karakter", verb: "olmalı" },
file: { unit: "bayt", verb: "olmalı" },
array: { unit: "öğe", verb: "olmalı" },
set: { unit: "öğe", verb: "olmalı" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const Nouns = {
regex: "girdi",
email: "e-posta adresi",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO tarih ve saat",
date: "ISO tarih",
time: "ISO saat",
duration: "ISO süre",
ipv4: "IPv4 adresi",
ipv6: "IPv6 adresi",
cidrv4: "IPv4 aralığı",
cidrv6: "IPv6 aralığı",
base64: "base64 ile şifrelenmiş metin",
base64url: "base64url ile şifrelenmiş metin",
json_string: "JSON dizesi",
e164: "E.164 sayısı",
jwt: "JWT",
template_literal: "Şablon dizesi",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Geçersiz değer: beklenen ${issue.expected}, alınan ${(0, exports.parsedType)(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Geçersiz değer: beklenen ${util.stringifyPrimitive(issue.values[0])}`;
return `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çok büyük: beklenen ${issue.origin ?? "değer"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "öğe"}`;
return `Çok büyük: beklenen ${issue.origin ?? "değer"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çok küçük: beklenen ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Çok küçük: beklenen ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Geçersiz metin: "${_issue.prefix}" ile başlamalı`;
if (_issue.format === "ends_with")
return `Geçersiz metin: "${_issue.suffix}" ile bitmeli`;
if (_issue.format === "includes")
return `Geçersiz metin: "${_issue.includes}" içermeli`;
if (_issue.format === "regex")
return `Geçersiz metin: ${_issue.pattern} desenine uymalı`;
return `Geçersiz ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Geçersiz sayı: ${issue.divisor} ile tam bölünebilmeli`;
case "unrecognized_keys":
return `Tanınmayan anahtar${issue.keys.length > 1 ? "lar" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} içinde geçersiz anahtar`;
case "invalid_union":
return "Geçersiz değer";
case "invalid_element":
return `${issue.origin} içinde geçersiz değer`;
default:
return `Geçersiz değer`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
@@ -0,0 +1,6 @@
var temporalUndefined = require("./temporalUndefined.js");
var tdz = require("./tdz.js");
function _temporalRef(r, e) {
return r === temporalUndefined ? tdz(e) : r;
}
module.exports = _temporalRef, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"A B","2":"wC","8":"K D E F"},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 0C 1C","8":"xC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC"},E:{"1":"J ZB K D E F A B C L M G 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","8":"2C ZC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z ID NC uC JD OC","2":"F FD","8":"GD HD"},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":"I iD mD nD","2":"TC J jD kD lD vC"},J:{"1":"D A"},K:{"1":"B C H NC uC OC","8":"A"},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:"Web Workers",D:true};
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com), Dmirty Sobolev <disobolev@icloud.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
@@ -0,0 +1,12 @@
'use strict';
var isCoreModule = require('is-core-module');
var data = require('./core.json');
var core = {};
for (var mod in data) { // eslint-disable-line no-restricted-syntax
if (Object.prototype.hasOwnProperty.call(data, mod)) {
core[mod] = isCoreModule(mod);
}
}
module.exports = core;
@@ -0,0 +1 @@
{"name":"devlop","version":"1.1.0","requiresBuild":false,"files":{"license":{"checkedAt":1794532112573,"integrity":"sha512-DO1V78IzxXXGCOy3e1AHfwpv5w9SIDZ5hX223udAYGhnOymNZxx6uBB0aESIKyiTk0KrGKEqyYPzDbprq9IDoQ==","mode":420,"size":1099},"lib/default.js":{"checkedAt":1794532112573,"integrity":"sha512-HP+bS47xddQI9mqoRM2bdMP9g0hIftpEitdh+VA128r7LpWf5eEUrV88m2/DL9FEn5I3tjc6wnCt2E1XI9fk8w==","mode":420,"size":133},"lib/development.js":{"checkedAt":1794532112574,"integrity":"sha512-wG6PEPR896mqTCkWap5jVrmr3P1uDlTwzmudDWgUPkMEbAgGuqLJ978kaEzPckpzXLwLk0N2CNlTG/U3lgkNCQ==","mode":420,"size":5868},"package.json":{"checkedAt":1794532112574,"integrity":"sha512-4wUfhlUPnJZdamWo+hg7yDPQ8j04Z5M0khs6EXVO7wKvWP/diNwKhlx8S+VyUucAPmmPa7SaPv6l7IcO7kZhhQ==","mode":420,"size":2114},"readme.md":{"checkedAt":1794532112574,"integrity":"sha512-+DZcBiiLIDC+pSdffcD+hNmmtShCRyEUEltSpDVcB2RmVN0g2KBWlizK4PjEUpuTqAJzsAQ540Z0mxIoPOJZgg==","mode":420,"size":10114},"lib/development.d.ts":{"checkedAt":1794532112574,"integrity":"sha512-WMV82BnFEDSsBb8lZ0i+AyfPZ7wHMhupy0Bd55d55oG96wlFIPQM+FaE6IGeatZxl/RJ/vP8dEC5Ni7Q87kxYw==","mode":420,"size":2682}}}
@@ -0,0 +1,16 @@
/**
* @param {Context} context
* @returns {string}
*/
export function getCreateClassFromContext(context: Context): string;
/**
* @param {Context} context
* @returns {string}
*/
export function getFragmentFromContext(context: Context): string;
/**
* @param {Context} context
* @returns {string}
*/
export function getFromContext(context: Context): string;
//# sourceMappingURL=pragma.d.ts.map
@@ -0,0 +1,491 @@
// src/demi/react18/getInertValue.ts
var getInertValue = (v) => {
return v ? "" : void 0;
};
// src/common/assertion.ts
var __DEV__ = process.env.NODE_ENV !== "production";
var __TEST__ = process.env.NODE_ENV === "test";
function isArray(value) {
return Array.isArray(value);
}
function isEmptyArray(value) {
return isArray(value) && value.length === 0;
}
function isObject(value) {
const type = typeof value;
return value != null && (type === "object" || type === "function") && !isArray(value);
}
function isEmptyObject(value) {
return isObject(value) && Object.keys(value).length === 0;
}
function isEmpty(value) {
if (isArray(value)) return isEmptyArray(value);
if (isObject(value)) return isEmptyObject(value);
if (value == null || value === "") return true;
return false;
}
function isFunction(value) {
return typeof value === "function";
}
var dataAttr = (condition) => condition ? "true" : void 0;
var isNumeric = (value) => value != null && parseInt(value.toString(), 10) > 0;
// src/common/clsx.ts
function toVal(mix) {
var k, y, str = "";
if (typeof mix === "string" || typeof mix === "number") {
str += mix;
} else if (typeof mix === "object") {
if (Array.isArray(mix)) {
for (k = 0; k < mix.length; k++) {
if (mix[k]) {
if (y = toVal(mix[k])) {
str && (str += " ");
str += y;
}
}
}
} else {
for (k in mix) {
if (mix[k]) {
str && (str += " ");
str += k;
}
}
}
}
return str;
}
function clsx(...args) {
var i = 0, tmp, x, str = "";
while (i < args.length) {
if (tmp = args[i++]) {
if (x = toVal(tmp)) {
str && (str += " ");
str += x;
}
}
}
return str;
}
// src/common/object.ts
var renameProp = (oldProp, newProp, { [oldProp]: old, ...others }) => ({
[newProp]: old,
...others
});
var copyObject = (obj) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
return { ...obj };
};
var omitObject = (obj, omitKeys) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
const newObj = { ...obj };
omitKeys.forEach((key) => newObj[key] && delete newObj[key]);
return newObj;
};
var cleanObject = (obj) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
const newObj = { ...obj };
Object.keys(newObj).forEach((key) => {
if (newObj[key] === void 0 || newObj[key] === null) {
delete newObj[key];
}
});
return newObj;
};
var cleanObjectKeys = (obj, keys = []) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
const newObj = { ...obj };
keys.forEach((key) => {
if (newObj[key]) {
delete newObj[key];
}
});
return newObj;
};
var getKeyValue = (obj, key) => {
if (!isObject(obj)) return obj;
if (obj instanceof Array) return [...obj];
return obj[key];
};
var getProp = (obj, path, fallback, index) => {
const key = typeof path === "string" ? path.split(".") : [path];
for (index = 0; index < key.length; index += 1) {
if (!obj) break;
obj = obj[key[index]];
}
return obj === void 0 ? fallback : obj;
};
var arrayToObject = (arr) => {
if (!arr.length || !Array.isArray(arr)) return {};
return arr.reduce((acc, item) => {
return { ...acc, ...item };
}, {});
};
function compact(object) {
const clone = Object.assign({}, object);
for (let key in clone) {
if (clone[key] === void 0) delete clone[key];
}
return clone;
}
// src/common/text.ts
var safeText = (text) => {
if ((text == null ? void 0 : text.length) <= 4) return text;
return text == null ? void 0 : text.slice(0, 3);
};
var safeInitials = (text) => {
const initials = (text == null ? void 0 : text.trim().split(/[\s\-_.]+/).filter(Boolean).map((word) => word.charAt(0).toUpperCase()).join("")) || "";
return safeText(initials);
};
var safeAriaLabel = (...texts) => {
let ariaLabel = " ";
for (const text of texts) {
if (typeof text === "string" && text.length > 0) {
ariaLabel = text;
break;
}
}
return ariaLabel;
};
// src/common/dimensions.ts
var getMargin = (num) => {
return `calc(${num * 15.25}pt + 1px * ${num - 1})`;
};
// src/common/functions.ts
var capitalize = (s) => {
return s ? s.charAt(0).toUpperCase() + s.slice(1).toLowerCase() : "";
};
function callAllHandlers(...fns) {
return function func(event) {
fns.some((fn) => {
fn == null ? void 0 : fn(event);
return event == null ? void 0 : event.defaultPrevented;
});
};
}
function callAll(...fns) {
return function mergedFn(arg) {
fns.forEach((fn) => {
fn == null ? void 0 : fn(arg);
});
};
}
function extractProperty(key, defaultValue, ...objs) {
let result = defaultValue;
for (const obj of objs) {
if (obj && key in obj && !!obj[key]) {
result = obj[key];
}
}
return result;
}
function getUniqueID(prefix) {
return `${prefix}-${Math.floor(Math.random() * 1e6)}`;
}
function removeEvents(input) {
for (const key in input) {
if (key.startsWith("on")) {
delete input[key];
}
}
return input;
}
function objectToDeps(obj) {
if (!obj || typeof obj !== "object") {
return "";
}
try {
return JSON.stringify(obj);
} catch {
return "";
}
}
function debounce(func, waitMilliseconds = 0) {
let timeout;
return function(...args) {
const later = () => {
timeout = void 0;
func.apply(this, args);
};
if (timeout !== void 0) {
clearTimeout(timeout);
}
timeout = setTimeout(later, waitMilliseconds);
};
}
function uniqBy(arr, iteratee) {
if (typeof iteratee === "string") {
iteratee = (item) => item[iteratee];
}
return arr.filter((x, i, self) => i === self.findIndex((y) => iteratee(x) === iteratee(y)));
}
var omit = (obj, keys) => {
const res = Object.assign({}, obj);
keys.forEach((key) => {
delete res[key];
});
return res;
};
var kebabCase = (s) => {
return s.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
};
var mapKeys = (obj, iteratee) => {
return Object.fromEntries(
Object.entries(obj).map(([key, value]) => [iteratee(value, key), value])
);
};
var get = (object, path, defaultValue) => {
const keys = Array.isArray(path) ? path : path.replace(/\[(\d+)\]/g, ".$1").split(".");
let res = object;
for (const key of keys) {
res = res == null ? void 0 : res[key];
if (res === void 0) {
return defaultValue;
}
}
return res;
};
var intersectionBy = (...args) => {
if (args.length < 2) {
throw new Error("intersectionBy requires at least two arrays and an iteratee");
}
const iteratee = args[args.length - 1];
const arrays = args.slice(0, -1);
if (arrays.length === 0) {
return [];
}
const getIterateeValue = (item) => {
if (typeof iteratee === "function") {
return iteratee(item);
} else if (typeof iteratee === "string") {
return item[iteratee];
} else {
throw new Error("Iteratee must be a function or a string key of the array elements");
}
};
const [first, ...rest] = arrays;
const transformedFirst = first.map((item) => getIterateeValue(item));
const transformedSets = rest.map(
(array) => new Set(array.map((item) => getIterateeValue(item)))
);
const res = [];
const seen = /* @__PURE__ */ new Set();
for (let i = 0; i < first.length; i++) {
const item = first[i];
const transformed = transformedFirst[i];
if (seen.has(transformed)) {
continue;
}
const existsInAll = transformedSets.every((set) => set.has(transformed));
if (existsInAll) {
res.push(item);
seen.add(transformed);
}
}
return res;
};
// src/common/numbers.ts
function range(start, end) {
const length = end - start + 1;
return Array.from({ length }, (_, index) => index + start);
}
function clamp(value, min, max) {
return Math.min(Math.max(value, min), max);
}
function clampPercentage(value, max = 100) {
return Math.min(Math.max(value, 0), max);
}
// src/common/console.ts
var warningStack = {};
function warn(message, component, ...args) {
const tag = component ? ` [${component}]` : " ";
const log = `[Hero UI]${tag}: ${message}`;
if (typeof console === "undefined") return;
if (warningStack[log]) return;
warningStack[log] = true;
if (process.env.NODE_ENV !== "production") {
return console.warn(log, args);
}
}
// src/common/dates.ts
function getGregorianYearOffset(identifier) {
switch (identifier) {
case "buddhist":
return 543;
case "ethiopic":
case "ethioaa":
return -8;
case "coptic":
return -284;
case "hebrew":
return 3760;
case "indian":
return -78;
case "islamic-civil":
case "islamic-tbla":
case "islamic-umalqura":
return -579;
case "persian":
return -600;
case "roc":
case "japanese":
case "gregory":
default:
return 0;
}
}
// src/common/regex.ts
var isPatternNumeric = (pattern) => {
const numericPattern = /(^|\W)[0-9](\W|$)/;
return numericPattern.test(pattern) && !/[^\d\^$\[\]\(\)\*\+\-\.\|]/.test(pattern);
};
// src/common/ra.ts
function chain(...callbacks) {
return (...args) => {
for (let callback of callbacks) {
if (typeof callback === "function") {
callback(...args);
}
}
};
}
var idsUpdaterMap = /* @__PURE__ */ new Map();
function mergeIds(idA, idB) {
if (idA === idB) {
return idA;
}
let setIdsA = idsUpdaterMap.get(idA);
if (setIdsA) {
setIdsA.forEach((ref) => ref.current = idB);
return idB;
}
let setIdsB = idsUpdaterMap.get(idB);
if (setIdsB) {
setIdsB.forEach((ref) => ref.current = idA);
return idA;
}
return idB;
}
function mergeProps(...args) {
let result = { ...args[0] };
for (let i = 1; i < args.length; i++) {
let props = args[i];
for (let key in props) {
let a = result[key];
let b = props[key];
if (typeof a === "function" && typeof b === "function" && // This is a lot faster than a regex.
key[0] === "o" && key[1] === "n" && key.charCodeAt(2) >= /* 'A' */
65 && key.charCodeAt(2) <= /* 'Z' */
90) {
result[key] = chain(a, b);
} else if ((key === "className" || key === "UNSAFE_className") && typeof a === "string" && typeof b === "string") {
result[key] = clsx(a, b);
} else if (key === "id" && a && b) {
result.id = mergeIds(a, b);
} else {
result[key] = b !== void 0 ? b : a;
}
}
}
return result;
}
function mergeRefs(...refs) {
if (refs.length === 1 && refs[0]) {
return refs[0];
}
return (value) => {
let hasCleanup = false;
const cleanups = refs.map((ref) => {
const cleanup = setRef(ref, value);
hasCleanup || (hasCleanup = typeof cleanup == "function");
return cleanup;
});
if (hasCleanup) {
return () => {
cleanups.forEach((cleanup, i) => {
if (typeof cleanup === "function") {
cleanup == null ? void 0 : cleanup();
} else {
setRef(refs[i], null);
}
});
};
}
};
}
function setRef(ref, value) {
if (typeof ref === "function") {
return () => ref(value);
} else if (ref != null) {
if ("current" in ref) {
ref.current = value;
}
}
}
export {
__DEV__,
__TEST__,
arrayToObject,
callAll,
callAllHandlers,
capitalize,
chain,
clamp,
clampPercentage,
cleanObject,
cleanObjectKeys,
clsx,
compact,
copyObject,
dataAttr,
debounce,
extractProperty,
get,
getGregorianYearOffset,
getInertValue,
getKeyValue,
getMargin,
getProp,
getUniqueID,
idsUpdaterMap,
intersectionBy,
isArray,
isEmpty,
isEmptyArray,
isEmptyObject,
isFunction,
isNumeric,
isObject,
isPatternNumeric,
kebabCase,
mapKeys,
mergeIds,
mergeProps,
mergeRefs,
objectToDeps,
omit,
omitObject,
range,
removeEvents,
renameProp,
safeAriaLabel,
safeInitials,
safeText,
uniqBy,
warn
};
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=jsx-newline.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"quill.core.js","mappings":"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 truncated
@@ -0,0 +1,18 @@
'use strict';
var define = require('define-properties');
var getPolyfill = require('./polyfill');
var $IteratorPrototype = require('../Iterator.prototype/implementation');
module.exports = function shimIteratorPrototypeMap() {
var polyfill = getPolyfill();
define(
$IteratorPrototype,
{ map: polyfill },
{ map: function () { return $IteratorPrototype.map !== polyfill; } }
);
return polyfill;
};
@@ -0,0 +1,8 @@
import {
spacer
} from "../chunk-AKXXHKTO.mjs";
import "../chunk-UWE6H66T.mjs";
import "../chunk-GIXI35A3.mjs";
export {
spacer
};
@@ -0,0 +1,179 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/modal.tsx
var modal_exports = {};
__export(modal_exports, {
default: () => modal_default
});
module.exports = __toCommonJS(modal_exports);
var import_framer_motion = require("framer-motion");
var import_overlays2 = require("@react-aria/overlays");
var import_system2 = require("@heroui/system");
// src/use-modal.ts
var import_use_aria_modal_overlay = require("@heroui/use-aria-modal-overlay");
var import_react = require("react");
var import_theme = require("@heroui/theme");
var import_system = require("@heroui/system");
var import_use_aria_button = require("@heroui/use-aria-button");
var import_focus = require("@react-aria/focus");
var import_shared_utils = require("@heroui/shared-utils");
var import_react_utils = require("@heroui/react-utils");
var import_overlays = require("@react-stately/overlays");
var import_utils = require("@react-aria/utils");
function useModal(originalProps) {
var _a, _b, _c;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.modal.variantKeys);
const {
ref,
as,
className,
classNames,
isOpen,
defaultOpen,
onOpenChange,
motionProps,
closeButton,
isDismissable = true,
hideCloseButton = false,
shouldBlockScroll = true,
portalContainer,
isKeyboardDismissDisabled = false,
onClose,
...otherProps
} = props;
const Component = as || "section";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const closeButtonRef = (0, import_react.useRef)(null);
const [headerMounted, setHeaderMounted] = (0, import_react.useState)(false);
const [bodyMounted, setBodyMounted] = (0, import_react.useState)(false);
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const dialogId = (0, import_react.useId)();
const headerId = (0, import_react.useId)();
const bodyId = (0, import_react.useId)();
const state = (0, import_overlays.useOverlayTriggerState)({
isOpen,
defaultOpen,
onOpenChange: (isOpen2) => {
onOpenChange == null ? void 0 : onOpenChange(isOpen2);
if (!isOpen2) {
onClose == null ? void 0 : onClose();
}
}
});
const { modalProps, underlayProps } = (0, import_use_aria_modal_overlay.useAriaModalOverlay)(
{
isDismissable,
shouldBlockScroll,
isKeyboardDismissDisabled
},
state,
domRef
);
const { buttonProps: closeButtonProps } = (0, import_use_aria_button.useAriaButton)({ onPress: state.close }, closeButtonRef);
const { isFocusVisible: isCloseButtonFocusVisible, focusProps: closeButtonFocusProps } = (0, import_focus.useFocusRing)();
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const slots = (0, import_react.useMemo)(
() => (0, import_theme.modal)({
...variantProps,
disableAnimation
}),
[(0, import_shared_utils.objectToDeps)(variantProps), disableAnimation]
);
const getDialogProps = (props2 = {}, ref2 = null) => {
var _a2;
return {
ref: (0, import_utils.mergeRefs)(ref2, domRef),
...(0, import_utils.mergeProps)(modalProps, otherProps, props2),
className: slots.base({ class: (0, import_shared_utils.clsx)(baseStyles, props2.className) }),
id: dialogId,
"data-open": (0, import_shared_utils.dataAttr)(state.isOpen),
"data-dismissable": (0, import_shared_utils.dataAttr)(isDismissable),
"aria-modal": (0, import_shared_utils.dataAttr)(true),
"data-placement": (_a2 = originalProps == null ? void 0 : originalProps.placement) != null ? _a2 : "right",
"aria-labelledby": headerMounted ? headerId : void 0,
"aria-describedby": bodyMounted ? bodyId : void 0
};
};
const getBackdropProps = (0, import_react.useCallback)(
(props2 = {}) => ({
className: slots.backdrop({ class: classNames == null ? void 0 : classNames.backdrop }),
onClick: () => state.close(),
...underlayProps,
...props2
}),
[slots, classNames, underlayProps]
);
const getCloseButtonProps = () => {
return {
role: "button",
tabIndex: 0,
"aria-label": "Close",
"data-focus-visible": (0, import_shared_utils.dataAttr)(isCloseButtonFocusVisible),
className: slots.closeButton({ class: classNames == null ? void 0 : classNames.closeButton }),
...(0, import_utils.mergeProps)(closeButtonProps, closeButtonFocusProps)
};
};
return {
Component,
slots,
domRef,
headerId,
bodyId,
motionProps,
classNames,
isDismissable,
closeButton,
hideCloseButton,
portalContainer,
shouldBlockScroll,
backdrop: (_c = originalProps.backdrop) != null ? _c : "opaque",
isOpen: state.isOpen,
onClose: state.close,
disableAnimation,
setBodyMounted,
setHeaderMounted,
getDialogProps,
getBackdropProps,
getCloseButtonProps
};
}
// src/modal-context.ts
var import_react_utils2 = require("@heroui/react-utils");
var [ModalProvider, useModalContext] = (0, import_react_utils2.createContext)({
name: "ModalContext",
errorMessage: "useModalContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Modal />`"
});
// src/modal.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Modal = (0, import_system2.forwardRef)((props, ref) => {
const { children, ...otherProps } = props;
const context = useModal({ ...otherProps, ref });
const overlay = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.Overlay, { portalContainer: context.portalContainer, children });
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ModalProvider, { value: context, children: context.disableAnimation && context.isOpen ? overlay : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: context.isOpen ? overlay : null }) });
});
Modal.displayName = "HeroUI.Modal";
var modal_default = Modal;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1,52 @@
// 'mime-score' back-ported to CommonJS
// Score RFC facets (see https://tools.ietf.org/html/rfc6838#section-3)
var FACET_SCORES = {
'prs.': 100,
'x-': 200,
'x.': 300,
'vnd.': 400,
default: 900
}
// Score mime source (Logic originally from `jshttp/mime-types` module)
var SOURCE_SCORES = {
nginx: 10,
apache: 20,
iana: 40,
default: 30 // definitions added by `jshttp/mime-db` project?
}
var TYPE_SCORES = {
// prefer application/xml over text/xml
// prefer application/rtf over text/rtf
application: 1,
// prefer font/woff over application/font-woff
font: 2,
default: 0
}
/**
* Get each component of the score for a mime type. The sum of these is the
* total score. The higher the score, the more "official" the type.
*/
module.exports = function mimeScore (mimeType, source = 'default') {
if (mimeType === 'application/octet-stream') {
return 0
}
const [type, subtype] = mimeType.split('/')
const facet = subtype.replace(/(\.|x-).*/, '$1')
const facetScore = FACET_SCORES[facet] || FACET_SCORES.default
const sourceScore = SOURCE_SCORES[source] || SOURCE_SCORES.default
const typeScore = TYPE_SCORES[type] || TYPE_SCORES.default
// All else being equal prefer shorter types
const lengthScore = 1 - mimeType.length / 100
return facetScore + sourceScore + typeScore + lengthScore
}
@@ -0,0 +1,742 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
HiddenSelect: () => HiddenSelect,
Select: () => select_default,
SelectItem: () => import_listbox2.ListboxItem,
SelectSection: () => import_listbox2.ListboxSection,
useSelect: () => useSelect
});
module.exports = __toCommonJS(src_exports);
var import_listbox2 = require("@heroui/listbox");
// src/select.tsx
var import_listbox = require("@heroui/listbox");
var import_popover = require("@heroui/popover");
var import_shared_icons = require("@heroui/shared-icons");
var import_spinner = require("@heroui/spinner");
var import_react2 = require("react");
var import_system2 = require("@heroui/system");
var import_scroll_shadow = require("@heroui/scroll-shadow");
var import_react3 = require("react");
var import_visually_hidden2 = require("@react-aria/visually-hidden");
var import_framer_motion = require("framer-motion");
// src/hidden-select.tsx
var import_utils2 = require("@react-aria/utils");
var import_visually_hidden = require("@react-aria/visually-hidden");
var import_form2 = require("@react-aria/form");
// src/use-select.ts
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_react_utils = require("@heroui/react-utils");
var import_react = require("react");
var import_use_aria_button = require("@heroui/use-aria-button");
var import_focus = require("@react-aria/focus");
var import_shared_utils = require("@heroui/shared-utils");
var import_utils = require("@react-aria/utils");
var import_interactions = require("@react-aria/interactions");
var import_use_aria_multiselect = require("@heroui/use-aria-multiselect");
var import_use_safe_layout_effect = require("@heroui/use-safe-layout-effect");
var import_aria_utils = require("@heroui/aria-utils");
var import_form = require("@heroui/form");
var selectData = /* @__PURE__ */ new WeakMap();
function useSelect(originalProps) {
var _a, _b, _c, _d, _e, _f;
const globalContext = (0, import_system.useProviderContext)();
const { validationBehavior: formValidationBehavior } = (0, import_form.useSlottedContext)(import_form.FormContext) || {};
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.select.variantKeys);
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const {
ref,
as,
label,
name,
isLoading,
selectorIcon,
isOpen,
defaultOpen,
onOpenChange,
startContent,
endContent,
description,
renderValue,
onSelectionChange,
placeholder,
isVirtualized,
itemHeight = 36,
maxListboxHeight = 256,
children,
disallowEmptySelection = false,
selectionMode = "single",
spinnerRef,
scrollRef: scrollRefProp,
popoverProps = {},
scrollShadowProps = {},
listboxProps = {},
spinnerProps = {},
validationState,
onChange,
onClose,
className,
classNames,
validationBehavior = (_c = formValidationBehavior != null ? formValidationBehavior : globalContext == null ? void 0 : globalContext.validationBehavior) != null ? _c : "native",
hideEmptyContent = false,
...otherProps
} = props;
const scrollShadowRef = (0, import_react_utils.useDOMRef)(scrollRefProp);
const slotsProps = {
popoverProps: (0, import_utils.mergeProps)(
{
placement: "bottom",
triggerScaleOnOpen: false,
offset: 5,
disableAnimation
},
popoverProps
),
scrollShadowProps: (0, import_utils.mergeProps)(
{
ref: scrollShadowRef,
isEnabled: (_d = originalProps.showScrollIndicators) != null ? _d : true,
hideScrollBar: true,
offset: 15
},
scrollShadowProps
),
listboxProps: (0, import_utils.mergeProps)(
{
disableAnimation
},
listboxProps
)
};
const Component = as || "button";
const shouldFilterDOMProps = typeof Component === "string";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const triggerRef = (0, import_react.useRef)(null);
const listBoxRef = (0, import_react.useRef)(null);
const popoverRef = (0, import_react.useRef)(null);
let state = (0, import_use_aria_multiselect.useMultiSelectState)({
...props,
isOpen,
selectionMode,
disallowEmptySelection,
validationBehavior,
children,
isRequired: originalProps.isRequired,
isDisabled: originalProps.isDisabled,
isInvalid: originalProps.isInvalid,
defaultOpen,
hideEmptyContent,
onOpenChange: (open) => {
onOpenChange == null ? void 0 : onOpenChange(open);
if (!open) {
onClose == null ? void 0 : onClose();
}
},
onSelectionChange: (keys) => {
onSelectionChange == null ? void 0 : onSelectionChange(keys);
if (onChange && typeof onChange === "function") {
onChange({
target: {
...domRef.current && {
...domRef.current,
name: domRef.current.name
},
value: Array.from(keys).join(",")
}
});
}
state.commitValidation();
}
});
state = {
...state,
...originalProps.isDisabled && {
disabledKeys: /* @__PURE__ */ new Set([...state.collection.getKeys()])
}
};
(0, import_use_safe_layout_effect.useSafeLayoutEffect)(() => {
var _a2;
if (!((_a2 = domRef.current) == null ? void 0 : _a2.value))
return;
state.setSelectedKeys(/* @__PURE__ */ new Set([...state.selectedKeys, domRef.current.value]));
}, [domRef.current]);
const {
labelProps,
triggerProps,
valueProps,
menuProps,
descriptionProps,
errorMessageProps,
isInvalid: isAriaInvalid,
validationErrors,
validationDetails
} = (0, import_use_aria_multiselect.useMultiSelect)(
{ ...props, disallowEmptySelection, isDisabled: originalProps.isDisabled },
state,
triggerRef
);
const isInvalid = originalProps.isInvalid || validationState === "invalid" || isAriaInvalid;
const { isPressed, buttonProps } = (0, import_use_aria_button.useAriaButton)(triggerProps, triggerRef);
const { focusProps, isFocused, isFocusVisible } = (0, import_focus.useFocusRing)();
const { isHovered, hoverProps } = (0, import_interactions.useHover)({ isDisabled: originalProps.isDisabled });
const labelPlacement = (0, import_react.useMemo)(() => {
var _a2;
if ((!originalProps.labelPlacement || originalProps.labelPlacement === "inside") && !label) {
return "outside";
}
return (_a2 = originalProps.labelPlacement) != null ? _a2 : "inside";
}, [originalProps.labelPlacement, label]);
const hasPlaceholder = !!placeholder;
const shouldLabelBeOutside = labelPlacement === "outside-left" || labelPlacement === "outside" && (!(hasPlaceholder || !!description) || !!originalProps.isMultiline);
const shouldLabelBeInside = labelPlacement === "inside";
const isOutsideLeft = labelPlacement === "outside-left";
const isFilled = state.isOpen || hasPlaceholder || !!((_e = state.selectedItems) == null ? void 0 : _e.length) || !!startContent || !!endContent || !!originalProps.isMultiline;
const hasValue = !!((_f = state.selectedItems) == null ? void 0 : _f.length);
const hasLabel = !!label;
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const slots = (0, import_react.useMemo)(
() => (0, import_theme.select)({
...variantProps,
isInvalid,
labelPlacement,
disableAnimation,
className
}),
[(0, import_shared_utils.objectToDeps)(variantProps), isInvalid, labelPlacement, disableAnimation, className]
);
(0, import_react.useEffect)(() => {
if (state.isOpen && popoverRef.current && listBoxRef.current) {
let selectedItem = listBoxRef.current.querySelector("[aria-selected=true] [data-label=true]");
let scrollShadow = scrollShadowRef.current;
if (selectedItem && scrollShadow && selectedItem.parentElement) {
let scrollShadowRect = scrollShadow == null ? void 0 : scrollShadow.getBoundingClientRect();
let scrollShadowHeight = scrollShadowRect.height;
scrollShadow.scrollTop = selectedItem.parentElement.offsetTop - scrollShadowHeight / 2 + selectedItem.parentElement.clientHeight / 2;
}
}
}, [state.isOpen, disableAnimation]);
const errorMessage = typeof props.errorMessage === "function" ? props.errorMessage({ isInvalid, validationErrors, validationDetails }) : props.errorMessage || (validationErrors == null ? void 0 : validationErrors.join(" "));
const hasHelper = !!description || !!errorMessage;
(0, import_react.useEffect)(() => {
if (state.isOpen && popoverRef.current && triggerRef.current) {
let selectRect = triggerRef.current.getBoundingClientRect();
let popover = popoverRef.current;
popover.style.width = selectRect.width + "px";
}
}, [state.isOpen]);
const getBaseProps = (0, import_react.useCallback)(
(props2 = {}) => ({
"data-slot": "base",
"data-filled": (0, import_shared_utils.dataAttr)(isFilled),
"data-has-value": (0, import_shared_utils.dataAttr)(hasValue),
"data-has-label": (0, import_shared_utils.dataAttr)(hasLabel),
"data-has-helper": (0, import_shared_utils.dataAttr)(hasHelper),
"data-invalid": (0, import_shared_utils.dataAttr)(isInvalid),
className: slots.base({
class: (0, import_shared_utils.clsx)(baseStyles, props2.className)
}),
...props2
}),
[slots, hasHelper, hasValue, hasLabel, isFilled, baseStyles]
);
const getTriggerProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
ref: triggerRef,
"data-slot": "trigger",
"data-open": (0, import_shared_utils.dataAttr)(state.isOpen),
"data-disabled": (0, import_shared_utils.dataAttr)(originalProps == null ? void 0 : originalProps.isDisabled),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-pressed": (0, import_shared_utils.dataAttr)(isPressed),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-hover": (0, import_shared_utils.dataAttr)(isHovered),
className: slots.trigger({ class: classNames == null ? void 0 : classNames.trigger }),
...(0, import_utils.mergeProps)(
buttonProps,
focusProps,
hoverProps,
(0, import_react_utils.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
}),
(0, import_react_utils.filterDOMProps)(props2)
)
};
},
[
slots,
triggerRef,
state.isOpen,
classNames == null ? void 0 : classNames.trigger,
originalProps == null ? void 0 : originalProps.isDisabled,
isFocused,
isPressed,
isFocusVisible,
isHovered,
buttonProps,
focusProps,
hoverProps,
otherProps,
shouldFilterDOMProps
]
);
const getHiddenSelectProps = (0, import_react.useCallback)(
(props2 = {}) => ({
state,
triggerRef,
selectRef: domRef,
selectionMode,
label: originalProps == null ? void 0 : originalProps.label,
name: originalProps == null ? void 0 : originalProps.name,
isRequired: originalProps == null ? void 0 : originalProps.isRequired,
autoComplete: originalProps == null ? void 0 : originalProps.autoComplete,
isDisabled: originalProps == null ? void 0 : originalProps.isDisabled,
onChange,
...props2
}),
[
state,
selectionMode,
originalProps == null ? void 0 : originalProps.label,
originalProps == null ? void 0 : originalProps.autoComplete,
originalProps == null ? void 0 : originalProps.name,
originalProps == null ? void 0 : originalProps.isDisabled,
triggerRef
]
);
const getLabelProps = (0, import_react.useCallback)(
(props2 = {}) => ({
"data-slot": "label",
className: slots.label({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.label, props2.className)
}),
...labelProps,
...props2
}),
[slots, classNames == null ? void 0 : classNames.label, labelProps]
);
const getValueProps = (0, import_react.useCallback)(
(props2 = {}) => ({
"data-slot": "value",
className: slots.value({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.value, props2.className)
}),
...valueProps,
...props2
}),
[slots, classNames == null ? void 0 : classNames.value, valueProps]
);
const getListboxWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => ({
"data-slot": "listboxWrapper",
className: slots.listboxWrapper({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.listboxWrapper, props2 == null ? void 0 : props2.className)
}),
style: {
maxHeight: maxListboxHeight != null ? maxListboxHeight : 256,
...props2.style
},
...(0, import_utils.mergeProps)(slotsProps.scrollShadowProps, props2)
}),
[
slots.listboxWrapper,
classNames == null ? void 0 : classNames.listboxWrapper,
slotsProps.scrollShadowProps,
maxListboxHeight
]
);
const getListboxProps = (props2 = {}) => {
const shouldVirtualize = isVirtualized != null ? isVirtualized : state.collection.size > 50;
return {
state,
ref: listBoxRef,
isVirtualized: shouldVirtualize,
virtualization: shouldVirtualize ? {
maxListboxHeight,
itemHeight
} : void 0,
"data-slot": "listbox",
className: slots.listbox({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.listbox, props2 == null ? void 0 : props2.className)
}),
scrollShadowProps: slotsProps.scrollShadowProps,
...(0, import_utils.mergeProps)(slotsProps.listboxProps, props2, menuProps)
};
};
const getPopoverProps = (0, import_react.useCallback)(
(props2 = {}) => {
var _a2, _b2;
const popoverProps2 = (0, import_utils.mergeProps)(slotsProps.popoverProps, props2);
return {
state,
triggerRef,
ref: popoverRef,
"data-slot": "popover",
scrollRef: listBoxRef,
triggerType: "listbox",
classNames: {
content: slots.popoverContent({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.popoverContent, props2.className)
})
},
...popoverProps2,
offset: state.selectedItems && state.selectedItems.length > 0 ? state.selectedItems.length * 1e-8 + (((_a2 = slotsProps.popoverProps) == null ? void 0 : _a2.offset) || 0) : (_b2 = slotsProps.popoverProps) == null ? void 0 : _b2.offset,
shouldCloseOnInteractOutside: (popoverProps2 == null ? void 0 : popoverProps2.shouldCloseOnInteractOutside) ? popoverProps2.shouldCloseOnInteractOutside : (element) => (0, import_aria_utils.ariaShouldCloseOnInteractOutside)(element, domRef, state)
};
},
[
slots,
classNames == null ? void 0 : classNames.popoverContent,
slotsProps.popoverProps,
triggerRef,
state,
state.selectedItems
]
);
const getSelectorIconProps = (0, import_react.useCallback)(
() => ({
"data-slot": "selectorIcon",
"aria-hidden": (0, import_shared_utils.dataAttr)(true),
"data-open": (0, import_shared_utils.dataAttr)(state.isOpen),
className: slots.selectorIcon({ class: classNames == null ? void 0 : classNames.selectorIcon })
}),
[slots, classNames == null ? void 0 : classNames.selectorIcon, state.isOpen]
);
const getInnerWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
"data-slot": "innerWrapper",
className: slots.innerWrapper({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.innerWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.innerWrapper]
);
const getHelperWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
"data-slot": "helperWrapper",
className: slots.helperWrapper({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.helperWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.helperWrapper]
);
const getDescriptionProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
...descriptionProps,
"data-slot": "description",
className: slots.description({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.description, props2 == null ? void 0 : props2.className) })
};
},
[slots, classNames == null ? void 0 : classNames.description]
);
const getMainWrapperProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
"data-slot": "mainWrapper",
className: slots.mainWrapper({
class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.mainWrapper, props2 == null ? void 0 : props2.className)
})
};
},
[slots, classNames == null ? void 0 : classNames.mainWrapper]
);
const getErrorMessageProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
...props2,
...errorMessageProps,
"data-slot": "error-message",
className: slots.errorMessage({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.errorMessage, props2 == null ? void 0 : props2.className) })
};
},
[slots, errorMessageProps, classNames == null ? void 0 : classNames.errorMessage]
);
const getSpinnerProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
"aria-hidden": (0, import_shared_utils.dataAttr)(true),
"data-slot": "spinner",
color: "current",
size: "sm",
...spinnerProps,
...props2,
ref: spinnerRef,
className: slots.spinner({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.spinner, props2 == null ? void 0 : props2.className) })
};
},
[slots, spinnerRef, spinnerProps, classNames == null ? void 0 : classNames.spinner]
);
selectData.set(state, {
isDisabled: originalProps == null ? void 0 : originalProps.isDisabled,
isRequired: originalProps == null ? void 0 : originalProps.isRequired,
name: originalProps == null ? void 0 : originalProps.name,
isInvalid,
validationBehavior
});
return {
Component,
domRef,
state,
label,
name,
triggerRef,
isLoading,
placeholder,
startContent,
endContent,
description,
selectorIcon,
hasHelper,
labelPlacement,
hasPlaceholder,
renderValue,
selectionMode,
disableAnimation,
isOutsideLeft,
shouldLabelBeOutside,
shouldLabelBeInside,
isInvalid,
errorMessage,
getBaseProps,
getTriggerProps,
getLabelProps,
getValueProps,
getListboxProps,
getPopoverProps,
getSpinnerProps,
getMainWrapperProps,
getListboxWrapperProps,
getHiddenSelectProps,
getInnerWrapperProps,
getHelperWrapperProps,
getDescriptionProps,
getErrorMessageProps,
getSelectorIconProps
};
}
// src/hidden-select.tsx
var import_jsx_runtime = require("react/jsx-runtime");
function useHiddenSelect(props, state, triggerRef) {
var _a;
let data = selectData.get(state) || {};
let {
autoComplete,
name = data.name,
isDisabled = data.isDisabled,
selectionMode,
onChange
} = props;
let { validationBehavior, isRequired, isInvalid } = data;
let { visuallyHiddenProps } = (0, import_visually_hidden.useVisuallyHidden)();
(0, import_utils2.useFormReset)(props.selectRef, state.selectedKeys, state.setSelectedKeys);
(0, import_form2.useFormValidation)(
{
validationBehavior,
focus: () => {
var _a2;
return (_a2 = triggerRef.current) == null ? void 0 : _a2.focus();
}
},
state,
props.selectRef
);
return {
containerProps: {
...visuallyHiddenProps,
"aria-hidden": true,
["data-a11y-ignore"]: "aria-hidden-focus"
},
inputProps: {
style: { display: "none" }
},
selectProps: {
autoComplete,
disabled: isDisabled,
"aria-invalid": isInvalid || void 0,
"aria-required": isRequired && validationBehavior === "aria" || void 0,
required: isRequired && validationBehavior === "native",
name,
tabIndex: -1,
value: selectionMode === "multiple" ? [...state.selectedKeys].map((k) => String(k)) : (_a = [...state.selectedKeys][0]) != null ? _a : "",
multiple: selectionMode === "multiple",
onChange: (e) => {
state.setSelectedKeys(e.target.value);
onChange == null ? void 0 : onChange(e);
}
}
};
}
function HiddenSelect(props) {
var _a;
let { state, triggerRef, selectRef, label, name, isDisabled } = props;
let { containerProps, selectProps } = useHiddenSelect({ ...props, selectRef }, state, triggerRef);
if (state.collection.size <= 300) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...containerProps, "data-testid": "hidden-select-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { children: [
label,
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("select", { ...selectProps, ref: selectRef, children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", {}),
[...state.collection.getKeys()].map((key) => {
let item = state.collection.getItem(key);
if ((item == null ? void 0 : item.type) === "item") {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: item.key, children: item.textValue }, item.key);
}
})
] })
] }) });
} else if (name) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"input",
{
autoComplete: selectProps.autoComplete,
disabled: isDisabled,
name,
type: "hidden",
value: (_a = [...state.selectedKeys].join(",")) != null ? _a : ""
}
);
}
return null;
}
// src/select.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var Select = (0, import_system2.forwardRef)(function Select2(props, ref) {
const {
Component,
state,
label,
hasHelper,
isLoading,
triggerRef,
selectorIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_shared_icons.ChevronDownIcon, {}),
description,
errorMessage,
isInvalid,
startContent,
endContent,
placeholder,
renderValue,
shouldLabelBeOutside,
disableAnimation,
getBaseProps,
getLabelProps,
getTriggerProps,
getValueProps,
getListboxProps,
getPopoverProps,
getSpinnerProps,
getMainWrapperProps,
getInnerWrapperProps,
getHiddenSelectProps,
getHelperWrapperProps,
getListboxWrapperProps,
getDescriptionProps,
getErrorMessageProps,
getSelectorIconProps
} = useSelect({ ...props, ref });
const labelContent = label ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { ...getLabelProps(), children: label }) : null;
const clonedIcon = (0, import_react3.cloneElement)(selectorIcon, getSelectorIconProps());
const helperWrapper = (0, import_react2.useMemo)(() => {
const shouldShowError = isInvalid && errorMessage;
const hasContent = shouldShowError || description;
if (!hasHelper || !hasContent)
return null;
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...getHelperWrapperProps(), children: shouldShowError ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...getErrorMessageProps(), children: errorMessage }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { ...getDescriptionProps(), children: description }) });
}, [
hasHelper,
isInvalid,
errorMessage,
description,
getHelperWrapperProps,
getErrorMessageProps,
getDescriptionProps
]);
const renderSelectedItem = (0, import_react2.useMemo)(() => {
var _a;
if (!((_a = state.selectedItems) == null ? void 0 : _a.length))
return placeholder;
if (renderValue && typeof renderValue === "function") {
const mappedItems = [...state.selectedItems].map((item) => ({
key: item.key,
data: item.value,
type: item.type,
props: item.props,
textValue: item.textValue,
rendered: item.rendered,
"aria-label": item["aria-label"]
}));
return renderValue(mappedItems);
}
return state.selectedItems.map((item) => item.textValue).join(", ");
}, [state.selectedItems, renderValue, placeholder]);
const renderIndicator = (0, import_react2.useMemo)(() => {
if (isLoading) {
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_spinner.Spinner, { ...getSpinnerProps() });
}
return clonedIcon;
}, [isLoading, clonedIcon, getSpinnerProps]);
const popoverContent = (0, import_react2.useMemo)(
() => state.isOpen ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.FreeSoloPopover, { ...getPopoverProps(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_scroll_shadow.ScrollShadow, { ...getListboxWrapperProps(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_listbox.Listbox, { ...getListboxProps() }) }) }) : null,
[state.isOpen, getPopoverProps, state, triggerRef, getListboxWrapperProps, getListboxProps]
);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...getBaseProps(), children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HiddenSelect, { ...getHiddenSelectProps() }),
shouldLabelBeOutside ? labelContent : null,
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...getMainWrapperProps(), children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ...getTriggerProps(), children: [
!shouldLabelBeOutside ? labelContent : null,
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { ...getInnerWrapperProps(), children: [
startContent,
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getValueProps(), children: renderSelectedItem }),
endContent && state.selectedItems && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_visually_hidden2.VisuallyHidden, { elementType: "span", children: "," }),
endContent
] }),
renderIndicator
] }),
helperWrapper
] }),
disableAnimation ? popoverContent : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_framer_motion.AnimatePresence, { children: popoverContent })
] });
});
var select_default = Select;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
HiddenSelect,
Select,
SelectItem,
SelectSection,
useSelect
});
@@ -0,0 +1,67 @@
{
"name": "simple-get",
"description": "Simplest way to make http get requests. Supports HTTPS, redirects, gzip/deflate, streams in < 100 lines.",
"version": "4.0.1",
"author": {
"name": "Feross Aboukhadijeh",
"email": "feross@feross.org",
"url": "https://feross.org"
},
"browser": {
"decompress-response": false
},
"bugs": {
"url": "https://github.com/feross/simple-get/issues"
},
"dependencies": {
"decompress-response": "^6.0.0",
"once": "^1.3.1",
"simple-concat": "^1.0.0"
},
"devDependencies": {
"self-signed-https": "^1.0.5",
"standard": "*",
"string-to-stream": "^3.0.0",
"tape": "^5.0.0"
},
"homepage": "https://github.com/feross/simple-get",
"keywords": [
"request",
"http",
"GET",
"get request",
"http.get",
"redirects",
"follow redirects",
"gzip",
"deflate",
"https",
"http-https",
"stream",
"simple request",
"simple get"
],
"license": "MIT",
"main": "index.js",
"repository": {
"type": "git",
"url": "git://github.com/feross/simple-get.git"
},
"scripts": {
"test": "standard && tape test/*.js"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
}
@@ -0,0 +1,283 @@
"use client";
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
DOMEventNames: () => import_react_rsc_utils.DOMEventNames,
DOMPropNames: () => import_react_rsc_utils.DOMPropNames,
areRectsIntersecting: () => areRectsIntersecting,
assignRef: () => assignRef,
canUseDOM: () => canUseDOM,
createContext: () => createContext2,
createDOMRef: () => createDOMRef,
createFocusableRef: () => createFocusableRef,
detectBrowser: () => detectBrowser,
detectDeviceType: () => detectDeviceType,
detectOS: () => detectOS,
detectTouch: () => detectTouch,
filterDOMProps: () => import_react_rsc_utils.filterDOMProps,
getCSSStyleVal: () => getCSSStyleVal,
getRealShape: () => getRealShape,
getUserAgentBrowser: () => getUserAgentBrowser,
getUserAgentOS: () => getUserAgentOS,
getValidChildren: () => import_react_rsc_utils.getValidChildren,
isBrowser: () => isBrowser,
mergeRefs: () => mergeRefs,
pickChildren: () => import_react_rsc_utils.pickChildren,
renderFn: () => import_react_rsc_utils.renderFn,
useDOMRef: () => useDOMRef,
useFocusableRef: () => useFocusableRef,
useIsHydrated: () => useIsHydrated,
useSyncRef: () => useSyncRef
});
module.exports = __toCommonJS(src_exports);
// src/context.ts
var React = __toESM(require("react"));
function createContext2(options = {}) {
const {
strict = true,
errorMessage = "useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",
name
} = options;
const Context = React.createContext(void 0);
Context.displayName = name;
function useContext2() {
var _a;
const context = React.useContext(Context);
if (!context && strict) {
const error = new Error(errorMessage);
error.name = "ContextError";
(_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext2);
throw error;
}
return context;
}
return [Context.Provider, useContext2, Context];
}
// src/refs.ts
var import_shared_utils = require("@heroui/shared-utils");
function assignRef(ref, value) {
if (ref == null)
return;
if ((0, import_shared_utils.isFunction)(ref)) {
ref(value);
return;
}
try {
ref.current = value;
} catch (error) {
throw new Error(`Cannot assign value '${value}' to ref '${ref}'`);
}
}
function mergeRefs(...refs) {
return (node) => {
refs.forEach((ref) => assignRef(ref, node));
};
}
// src/dom.ts
var import_react = require("react");
function canUseDOM() {
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
}
var isBrowser = canUseDOM();
function getUserAgentBrowser(navigator) {
const { userAgent: ua, vendor } = navigator;
const android = /(android)/i.test(ua);
switch (true) {
case /CriOS/.test(ua):
return "Chrome for iOS";
case /Edg\//.test(ua):
return "Edge";
case (android && /Silk\//.test(ua)):
return "Silk";
case (/Chrome/.test(ua) && /Google Inc/.test(vendor)):
return "Chrome";
case /Firefox\/\d+\.\d+$/.test(ua):
return "Firefox";
case android:
return "AOSP";
case /MSIE|Trident/.test(ua):
return "IE";
case (/Safari/.test(navigator.userAgent) && /Apple Computer/.test(ua)):
return "Safari";
case /AppleWebKit/.test(ua):
return "WebKit";
default:
return null;
}
}
function getUserAgentOS(navigator) {
const { userAgent: ua, platform } = navigator;
switch (true) {
case /Android/.test(ua):
return "Android";
case /iPhone|iPad|iPod/.test(platform):
return "iOS";
case /Win/.test(platform):
return "Windows";
case /Mac/.test(platform):
return "Mac";
case /CrOS/.test(ua):
return "Chrome OS";
case /Firefox/.test(ua):
return "Firefox OS";
default:
return null;
}
}
function detectDeviceType(navigator) {
const { userAgent: ua } = navigator;
if (/(tablet)|(iPad)|(Nexus 9)/i.test(ua))
return "tablet";
if (/(mobi)/i.test(ua))
return "phone";
return "desktop";
}
function detectOS(os) {
if (!isBrowser)
return false;
return getUserAgentOS(window.navigator) === os;
}
function detectBrowser(browser) {
if (!isBrowser)
return false;
return getUserAgentBrowser(window.navigator) === browser;
}
function detectTouch() {
if (!isBrowser)
return false;
return window.ontouchstart === null && window.ontouchmove === null && window.ontouchend === null;
}
function createDOMRef(ref) {
return {
UNSAFE_getDOMNode() {
return ref.current;
}
};
}
function createFocusableRef(domRef, focusableRef = domRef) {
return {
...createDOMRef(domRef),
focus() {
if (focusableRef.current) {
focusableRef.current.focus();
}
}
};
}
function useDOMRef(ref) {
const domRef = (0, import_react.useRef)(null);
(0, import_react.useImperativeHandle)(ref, () => domRef.current);
return domRef;
}
function useFocusableRef(ref, focusableRef) {
const domRef = (0, import_react.useRef)(null);
(0, import_react.useImperativeHandle)(ref, () => createFocusableRef(domRef, focusableRef));
return domRef;
}
function useSyncRef(context, ref) {
(0, import_react.useLayoutEffect)(() => {
if (context && context.ref && ref && ref.current) {
context.ref.current = ref.current;
return () => {
var _a;
if ((_a = context.ref) == null ? void 0 : _a.current) {
context.ref.current = null;
}
};
}
}, [context, ref]);
}
function areRectsIntersecting(rect1, rect2) {
return rect1 && rect2 && rect1.x < rect2.x + rect2.width && rect1.x + rect1.width > rect2.x && rect1.y < rect2.y + rect2.height && rect1.y + rect1.height > rect2.y;
}
// src/dimensions.ts
var getCSSStyleVal = (str, parentNum) => {
if (!str)
return 0;
const strVal = str.includes("px") ? +str.split("px")[0] : str.includes("%") ? +str.split("%")[0] * parentNum * 0.01 : str;
return Number.isNaN(+strVal) ? 0 : +strVal;
};
var getRealShape = (el) => {
const defaultShape = { width: 0, height: 0 };
if (!el || typeof window === "undefined")
return defaultShape;
const rect = el.getBoundingClientRect();
const { width, height } = window.getComputedStyle(el);
return {
width: getCSSStyleVal(`${width}`, rect.width),
height: getCSSStyleVal(`${height}`, rect.height)
};
};
// src/index.ts
var import_react_rsc_utils = require("@heroui/react-rsc-utils");
// src/use-is-hydrated.ts
var React2 = __toESM(require("react"));
function useIsHydrated() {
const subscribe = () => () => {
};
return React2.useSyncExternalStore(
subscribe,
() => true,
() => false
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
DOMEventNames,
DOMPropNames,
areRectsIntersecting,
assignRef,
canUseDOM,
createContext,
createDOMRef,
createFocusableRef,
detectBrowser,
detectDeviceType,
detectOS,
detectTouch,
filterDOMProps,
getCSSStyleVal,
getRealShape,
getUserAgentBrowser,
getUserAgentOS,
getValidChildren,
isBrowser,
mergeRefs,
pickChildren,
renderFn,
useDOMRef,
useFocusableRef,
useIsHydrated,
useSyncRef
});
@@ -0,0 +1,4 @@
/** @type {Construct} */
export const lineEnding: Construct;
import type { Construct } from 'micromark-util-types';
//# sourceMappingURL=line-ending.d.ts.map
@@ -0,0 +1,23 @@
'use strict';
const fs = require('fs');
const shebangCommand = require('shebang-command');
function readShebang(command) {
// Read the first 150 bytes from the file
const size = 150;
const buffer = Buffer.alloc(size);
let fd;
try {
fd = fs.openSync(command, 'r');
fs.readSync(fd, buffer, 0, size, 0);
fs.closeSync(fd);
} catch (e) { /* Empty */ }
// Attempt to extract shebang (null is returned if not a shebang)
return shebangCommand(buffer.toString());
}
module.exports = readShebang;
@@ -0,0 +1 @@
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAoBM,SAAS,0CAAc,KAAyB;IACrD,IAAI,aAAC,SAAS,EAAE,GAAG,YAAW,GAAG;IACjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAEhE,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE,YAAY,gBAAgB,MAAM,CAAC;IAE1D,IAAI,UAAU;QACZ,IAAI,WACF;IAEJ;IAEA,qBACE,gCAAC,CAAA,GAAA,qBAAa,uBACZ,gCAAC;QACE,GAAG,MAAM;QACV,UAAU;QACV,SAAS;QACT,OAAO;YAAC,OAAO;YAAG,QAAQ;QAAC;;AAGnC","sources":["packages/@react-aria/overlays/src/DismissButton.tsx"],"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 {AriaLabelingProps, DOMProps} from '@react-types/shared';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {useLabels} from '@react-aria/utils';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {VisuallyHidden} from '@react-aria/visually-hidden';\n\nexport interface DismissButtonProps extends AriaLabelingProps, DOMProps {\n /** Called when the dismiss button is activated. */\n onDismiss?: () => void\n}\n\n/**\n * A visually hidden button that can be used to allow screen reader\n * users to dismiss a modal or popup when there is no visual\n * affordance to do so.\n */\nexport function DismissButton(props: DismissButtonProps) {\n let {onDismiss, ...otherProps} = props;\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/overlays');\n\n let labels = useLabels(otherProps, stringFormatter.format('dismiss'));\n\n let onClick = () => {\n if (onDismiss) {\n onDismiss();\n }\n };\n\n return (\n <VisuallyHidden>\n <button\n {...labels}\n tabIndex={-1}\n onClick={onClick}\n style={{width: 1, height: 1}} />\n </VisuallyHidden>\n );\n}\n"],"names":[],"version":3,"file":"DismissButton.module.js.map"}
@@ -0,0 +1 @@
{"mappings":"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","sources":["packages/@internationalized/date/src/queries.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This filLine truncated
@@ -0,0 +1,142 @@
/**
* @import {Options} from 'micromark-extension-gfm-strikethrough'
* @import {Event, Extension, Resolver, State, Token, TokenizeContext, Tokenizer} from 'micromark-util-types'
*/
import { splice } from 'micromark-util-chunked';
import { classifyCharacter } from 'micromark-util-classify-character';
import { resolveAll } from 'micromark-util-resolve-all';
/**
* Create an extension for `micromark` to enable GFM strikethrough syntax.
*
* @param {Options | null | undefined} [options={}]
* Configuration.
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions`, to
* enable GFM strikethrough syntax.
*/
export function gfmStrikethrough(options) {
const options_ = options || {};
let single = options_.singleTilde;
const tokenizer = {
name: 'strikethrough',
tokenize: tokenizeStrikethrough,
resolveAll: resolveAllStrikethrough
};
if (single === null || single === undefined) {
single = true;
}
return {
text: {
[126]: tokenizer
},
insideSpan: {
null: [tokenizer]
},
attentionMarkers: {
null: [126]
}
};
/**
* Take events and resolve strikethrough.
*
* @type {Resolver}
*/
function resolveAllStrikethrough(events, context) {
let index = -1;
// Walk through all events.
while (++index < events.length) {
// Find a token that can close.
if (events[index][0] === 'enter' && events[index][1].type === 'strikethroughSequenceTemporary' && events[index][1]._close) {
let open = index;
// Now walk back to find an opener.
while (open--) {
// Find a token that can open the closer.
if (events[open][0] === 'exit' && events[open][1].type === 'strikethroughSequenceTemporary' && events[open][1]._open &&
// If the sizes are the same:
events[index][1].end.offset - events[index][1].start.offset === events[open][1].end.offset - events[open][1].start.offset) {
events[index][1].type = 'strikethroughSequence';
events[open][1].type = 'strikethroughSequence';
/** @type {Token} */
const strikethrough = {
type: 'strikethrough',
start: Object.assign({}, events[open][1].start),
end: Object.assign({}, events[index][1].end)
};
/** @type {Token} */
const text = {
type: 'strikethroughText',
start: Object.assign({}, events[open][1].end),
end: Object.assign({}, events[index][1].start)
};
// Opening.
/** @type {Array<Event>} */
const nextEvents = [['enter', strikethrough, context], ['enter', events[open][1], context], ['exit', events[open][1], context], ['enter', text, context]];
const insideSpan = context.parser.constructs.insideSpan.null;
if (insideSpan) {
// Between.
splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan, events.slice(open + 1, index), context));
}
// Closing.
splice(nextEvents, nextEvents.length, 0, [['exit', text, context], ['enter', events[index][1], context], ['exit', events[index][1], context], ['exit', strikethrough, context]]);
splice(events, open - 1, index - open + 3, nextEvents);
index = open + nextEvents.length - 2;
break;
}
}
}
}
index = -1;
while (++index < events.length) {
if (events[index][1].type === 'strikethroughSequenceTemporary') {
events[index][1].type = "data";
}
}
return events;
}
/**
* @this {TokenizeContext}
* @type {Tokenizer}
*/
function tokenizeStrikethrough(effects, ok, nok) {
const previous = this.previous;
const events = this.events;
let size = 0;
return start;
/** @type {State} */
function start(code) {
if (previous === 126 && events[events.length - 1][1].type !== "characterEscape") {
return nok(code);
}
effects.enter('strikethroughSequenceTemporary');
return more(code);
}
/** @type {State} */
function more(code) {
const before = classifyCharacter(previous);
if (code === 126) {
// If this is the third marker, exit.
if (size > 1) return nok(code);
effects.consume(code);
size++;
return more;
}
if (size < 2 && !single) return nok(code);
const token = effects.exit('strikethroughSequenceTemporary');
const after = classifyCharacter(code);
token._open = !after || after === 2 && Boolean(before);
token._close = !before || before === 2 && Boolean(after);
return ok(code);
}
}
}
@@ -0,0 +1,2 @@
export { G as GlobalConstructors, M as MockObjectOptions, m as mockObject } from './index.d-C-sLYZi-.js';
export { A as AutomockedModule, h as AutomockedModuleSerialized, f as AutospiedModule, i as AutospiedModuleSerialized, g as ManualMockedModule, j as ManualMockedModuleSerialized, a as MockedModule, k as MockedModuleSerialized, d as MockedModuleType, M as MockerRegistry, m as ModuleMockFactory, c as ModuleMockFactoryWithHelper, b as ModuleMockOptions, R as RedirectedModule, l as RedirectedModuleSerialized, e as ServerIdResolution, S as ServerMockResolution } from './types.d-B8CCKmHt.js';
@@ -0,0 +1,29 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnIntegerArrayBufferConverter, OctetString, } from "@peculiar/asn1-schema";
import { GeneralName } from "../general_name";
import { id_ce } from "../object_identifiers";
export const id_ce_authorityKeyIdentifier = `${id_ce}.35`;
export class KeyIdentifier extends OctetString {
}
export class AuthorityKeyIdentifier {
constructor(params = {}) {
if (params) {
Object.assign(this, params);
}
}
}
__decorate([
AsnProp({ type: KeyIdentifier, context: 0, optional: true, implicit: true })
], AuthorityKeyIdentifier.prototype, "keyIdentifier", void 0);
__decorate([
AsnProp({ type: GeneralName, context: 1, optional: true, implicit: true, repeated: "sequence" })
], AuthorityKeyIdentifier.prototype, "authorityCertIssuer", void 0);
__decorate([
AsnProp({
type: AsnPropTypes.Integer,
context: 2,
optional: true,
implicit: true,
converter: AsnIntegerArrayBufferConverter,
})
], AuthorityKeyIdentifier.prototype, "authorityCertSerialNumber", void 0);
@@ -0,0 +1 @@
{"version":3,"file":"jsx-curly-spacing.d.ts","sourceRoot":"","sources":["jsx-curly-spacing.js"],"names":[],"mappings":"wBAqCW,OAAO,QAAQ,EAAE,IAAI,CAAC,UAAU"}
@@ -0,0 +1,139 @@
# statuses
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][ci-image]][ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]
HTTP status utility for node.
This module provides a list of status codes and messages sourced from
a few different projects:
* The [IANA Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml)
* The [Node.js project](https://nodejs.org/)
* The [NGINX project](https://www.nginx.com/)
* The [Apache HTTP Server project](https://httpd.apache.org/)
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install statuses
```
## API
<!-- eslint-disable no-unused-vars -->
```js
var status = require('statuses')
```
### status(code)
Returns the status message string for a known HTTP status code. The code
may be a number or a string. An error is thrown for an unknown status code.
<!-- eslint-disable no-undef -->
```js
status(403) // => 'Forbidden'
status('403') // => 'Forbidden'
status(306) // throws
```
### status(msg)
Returns the numeric status code for a known HTTP status message. The message
is case-insensitive. An error is thrown for an unknown status message.
<!-- eslint-disable no-undef -->
```js
status('forbidden') // => 403
status('Forbidden') // => 403
status('foo') // throws
```
### status.codes
Returns an array of all the status codes as `Integer`s.
### status.code[msg]
Returns the numeric status code for a known status message (in lower-case),
otherwise `undefined`.
<!-- eslint-disable no-undef, no-unused-expressions -->
```js
status['not found'] // => 404
```
### status.empty[code]
Returns `true` if a status code expects an empty body.
<!-- eslint-disable no-undef, no-unused-expressions -->
```js
status.empty[200] // => undefined
status.empty[204] // => true
status.empty[304] // => true
```
### status.message[code]
Returns the string message for a known numeric status code, otherwise
`undefined`. This object is the same format as the
[Node.js http module `http.STATUS_CODES`](https://nodejs.org/dist/latest/docs/api/http.html#http_http_status_codes).
<!-- eslint-disable no-undef, no-unused-expressions -->
```js
status.message[404] // => 'Not Found'
```
### status.redirect[code]
Returns `true` if a status code is a valid redirect status.
<!-- eslint-disable no-undef, no-unused-expressions -->
```js
status.redirect[200] // => undefined
status.redirect[301] // => true
```
### status.retry[code]
Returns `true` if you should retry the rest.
<!-- eslint-disable no-undef, no-unused-expressions -->
```js
status.retry[501] // => undefined
status.retry[503] // => true
```
## License
[MIT](LICENSE)
[ci-image]: https://badgen.net/github/checks/jshttp/statuses/master?label=ci
[ci-url]: https://github.com/jshttp/statuses/actions?query=workflow%3Aci
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/statuses/master
[coveralls-url]: https://coveralls.io/r/jshttp/statuses?branch=master
[node-version-image]: https://badgen.net/npm/node/statuses
[node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/statuses
[npm-url]: https://npmjs.org/package/statuses
[npm-version-image]: https://badgen.net/npm/v/statuses
[ossf-scorecard-badge]: https://api.securityscorecards.dev/projects/github.com/jshttp/statuses/badge
[ossf-scorecard-visualizer]: https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/jshttp/statuses
@@ -0,0 +1,999 @@
import * as tailwind_variants from 'tailwind-variants';
import { VariantProps } from 'tailwind-variants';
import * as tailwind_variants_dist_config from 'tailwind-variants/dist/config';
declare const select: tailwind_variants.TVReturnType<{
variant: {
flat: {
trigger: string[];
};
faded: {
trigger: string[];
value: string;
};
bordered: {
trigger: string[];
value: string;
};
underlined: {
trigger: string[];
value: string;
};
};
color: {
default: {};
primary: {
selectorIcon: string;
};
secondary: {
selectorIcon: string;
};
success: {
selectorIcon: string;
};
warning: {
selectorIcon: string;
};
danger: {
selectorIcon: string;
};
};
size: {
sm: {
label: string;
trigger: string;
value: string;
};
md: {
trigger: string;
value: string;
};
lg: {
trigger: string;
value: string;
};
};
radius: {
none: {
trigger: string;
};
sm: {
trigger: string;
};
md: {
trigger: string;
};
lg: {
trigger: string;
};
full: {
trigger: string;
};
};
labelPlacement: {
outside: {
base: string;
};
"outside-left": {
base: string;
label: string;
};
inside: {
label: string;
trigger: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {
base: string;
};
};
isDisabled: {
true: {
base: string;
trigger: string;
};
};
isInvalid: {
true: {
label: string;
value: string;
selectorIcon: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
trigger: string;
};
false: {
value: string;
};
};
disableAnimation: {
true: {
trigger: string;
base: string;
label: string;
selectorIcon: string;
};
false: {
base: string;
label: string[];
selectorIcon: string;
};
};
disableSelectorIconRotation: {
true: {};
false: {
selectorIcon: string;
};
};
}, {
base: string[];
label: string[];
mainWrapper: string;
trigger: string;
innerWrapper: string;
selectorIcon: string;
spinner: string;
value: string[];
listboxWrapper: string;
listbox: string;
popoverContent: string;
helperWrapper: string;
description: string;
errorMessage: string;
}, undefined, tailwind_variants_dist_config.TVConfig<{
variant: {
flat: {
trigger: string[];
};
faded: {
trigger: string[];
value: string;
};
bordered: {
trigger: string[];
value: string;
};
underlined: {
trigger: string[];
value: string;
};
};
color: {
default: {};
primary: {
selectorIcon: string;
};
secondary: {
selectorIcon: string;
};
success: {
selectorIcon: string;
};
warning: {
selectorIcon: string;
};
danger: {
selectorIcon: string;
};
};
size: {
sm: {
label: string;
trigger: string;
value: string;
};
md: {
trigger: string;
value: string;
};
lg: {
trigger: string;
value: string;
};
};
radius: {
none: {
trigger: string;
};
sm: {
trigger: string;
};
md: {
trigger: string;
};
lg: {
trigger: string;
};
full: {
trigger: string;
};
};
labelPlacement: {
outside: {
base: string;
};
"outside-left": {
base: string;
label: string;
};
inside: {
label: string;
trigger: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {
base: string;
};
};
isDisabled: {
true: {
base: string;
trigger: string;
};
};
isInvalid: {
true: {
label: string;
value: string;
selectorIcon: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
trigger: string;
};
false: {
value: string;
};
};
disableAnimation: {
true: {
trigger: string;
base: string;
label: string;
selectorIcon: string;
};
false: {
base: string;
label: string[];
selectorIcon: string;
};
};
disableSelectorIconRotation: {
true: {};
false: {
selectorIcon: string;
};
};
}, {
variant: {
flat: {
trigger: string[];
};
faded: {
trigger: string[];
value: string;
};
bordered: {
trigger: string[];
value: string;
};
underlined: {
trigger: string[];
value: string;
};
};
color: {
default: {};
primary: {
selectorIcon: string;
};
secondary: {
selectorIcon: string;
};
success: {
selectorIcon: string;
};
warning: {
selectorIcon: string;
};
danger: {
selectorIcon: string;
};
};
size: {
sm: {
label: string;
trigger: string;
value: string;
};
md: {
trigger: string;
value: string;
};
lg: {
trigger: string;
value: string;
};
};
radius: {
none: {
trigger: string;
};
sm: {
trigger: string;
};
md: {
trigger: string;
};
lg: {
trigger: string;
};
full: {
trigger: string;
};
};
labelPlacement: {
outside: {
base: string;
};
"outside-left": {
base: string;
label: string;
};
inside: {
label: string;
trigger: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {
base: string;
};
};
isDisabled: {
true: {
base: string;
trigger: string;
};
};
isInvalid: {
true: {
label: string;
value: string;
selectorIcon: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
trigger: string;
};
false: {
value: string;
};
};
disableAnimation: {
true: {
trigger: string;
base: string;
label: string;
selectorIcon: string;
};
false: {
base: string;
label: string[];
selectorIcon: string;
};
};
disableSelectorIconRotation: {
true: {};
false: {
selectorIcon: string;
};
};
}>, {
variant: {
flat: {
trigger: string[];
};
faded: {
trigger: string[];
value: string;
};
bordered: {
trigger: string[];
value: string;
};
underlined: {
trigger: string[];
value: string;
};
};
color: {
default: {};
primary: {
selectorIcon: string;
};
secondary: {
selectorIcon: string;
};
success: {
selectorIcon: string;
};
warning: {
selectorIcon: string;
};
danger: {
selectorIcon: string;
};
};
size: {
sm: {
label: string;
trigger: string;
value: string;
};
md: {
trigger: string;
value: string;
};
lg: {
trigger: string;
value: string;
};
};
radius: {
none: {
trigger: string;
};
sm: {
trigger: string;
};
md: {
trigger: string;
};
lg: {
trigger: string;
};
full: {
trigger: string;
};
};
labelPlacement: {
outside: {
base: string;
};
"outside-left": {
base: string;
label: string;
};
inside: {
label: string;
trigger: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {
base: string;
};
};
isDisabled: {
true: {
base: string;
trigger: string;
};
};
isInvalid: {
true: {
label: string;
value: string;
selectorIcon: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
trigger: string;
};
false: {
value: string;
};
};
disableAnimation: {
true: {
trigger: string;
base: string;
label: string;
selectorIcon: string;
};
false: {
base: string;
label: string[];
selectorIcon: string;
};
};
disableSelectorIconRotation: {
true: {};
false: {
selectorIcon: string;
};
};
}, {
base: string[];
label: string[];
mainWrapper: string;
trigger: string;
innerWrapper: string;
selectorIcon: string;
spinner: string;
value: string[];
listboxWrapper: string;
listbox: string;
popoverContent: string;
helperWrapper: string;
description: string;
errorMessage: string;
}, tailwind_variants.TVReturnType<{
variant: {
flat: {
trigger: string[];
};
faded: {
trigger: string[];
value: string;
};
bordered: {
trigger: string[];
value: string;
};
underlined: {
trigger: string[];
value: string;
};
};
color: {
default: {};
primary: {
selectorIcon: string;
};
secondary: {
selectorIcon: string;
};
success: {
selectorIcon: string;
};
warning: {
selectorIcon: string;
};
danger: {
selectorIcon: string;
};
};
size: {
sm: {
label: string;
trigger: string;
value: string;
};
md: {
trigger: string;
value: string;
};
lg: {
trigger: string;
value: string;
};
};
radius: {
none: {
trigger: string;
};
sm: {
trigger: string;
};
md: {
trigger: string;
};
lg: {
trigger: string;
};
full: {
trigger: string;
};
};
labelPlacement: {
outside: {
base: string;
};
"outside-left": {
base: string;
label: string;
};
inside: {
label: string;
trigger: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {
base: string;
};
};
isDisabled: {
true: {
base: string;
trigger: string;
};
};
isInvalid: {
true: {
label: string;
value: string;
selectorIcon: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
trigger: string;
};
false: {
value: string;
};
};
disableAnimation: {
true: {
trigger: string;
base: string;
label: string;
selectorIcon: string;
};
false: {
base: string;
label: string[];
selectorIcon: string;
};
};
disableSelectorIconRotation: {
true: {};
false: {
selectorIcon: string;
};
};
}, {
base: string[];
label: string[];
mainWrapper: string;
trigger: string;
innerWrapper: string;
selectorIcon: string;
spinner: string;
value: string[];
listboxWrapper: string;
listbox: string;
popoverContent: string;
helperWrapper: string;
description: string;
errorMessage: string;
}, undefined, tailwind_variants_dist_config.TVConfig<{
variant: {
flat: {
trigger: string[];
};
faded: {
trigger: string[];
value: string;
};
bordered: {
trigger: string[];
value: string;
};
underlined: {
trigger: string[];
value: string;
};
};
color: {
default: {};
primary: {
selectorIcon: string;
};
secondary: {
selectorIcon: string;
};
success: {
selectorIcon: string;
};
warning: {
selectorIcon: string;
};
danger: {
selectorIcon: string;
};
};
size: {
sm: {
label: string;
trigger: string;
value: string;
};
md: {
trigger: string;
value: string;
};
lg: {
trigger: string;
value: string;
};
};
radius: {
none: {
trigger: string;
};
sm: {
trigger: string;
};
md: {
trigger: string;
};
lg: {
trigger: string;
};
full: {
trigger: string;
};
};
labelPlacement: {
outside: {
base: string;
};
"outside-left": {
base: string;
label: string;
};
inside: {
label: string;
trigger: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {
base: string;
};
};
isDisabled: {
true: {
base: string;
trigger: string;
};
};
isInvalid: {
true: {
label: string;
value: string;
selectorIcon: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
trigger: string;
};
false: {
value: string;
};
};
disableAnimation: {
true: {
trigger: string;
base: string;
label: string;
selectorIcon: string;
};
false: {
base: string;
label: string[];
selectorIcon: string;
};
};
disableSelectorIconRotation: {
true: {};
false: {
selectorIcon: string;
};
};
}, {
variant: {
flat: {
trigger: string[];
};
faded: {
trigger: string[];
value: string;
};
bordered: {
trigger: string[];
value: string;
};
underlined: {
trigger: string[];
value: string;
};
};
color: {
default: {};
primary: {
selectorIcon: string;
};
secondary: {
selectorIcon: string;
};
success: {
selectorIcon: string;
};
warning: {
selectorIcon: string;
};
danger: {
selectorIcon: string;
};
};
size: {
sm: {
label: string;
trigger: string;
value: string;
};
md: {
trigger: string;
value: string;
};
lg: {
trigger: string;
value: string;
};
};
radius: {
none: {
trigger: string;
};
sm: {
trigger: string;
};
md: {
trigger: string;
};
lg: {
trigger: string;
};
full: {
trigger: string;
};
};
labelPlacement: {
outside: {
base: string;
};
"outside-left": {
base: string;
label: string;
};
inside: {
label: string;
trigger: string;
};
};
fullWidth: {
true: {
base: string;
};
false: {
base: string;
};
};
isDisabled: {
true: {
base: string;
trigger: string;
};
};
isInvalid: {
true: {
label: string;
value: string;
selectorIcon: string;
};
};
isRequired: {
true: {
label: string;
};
};
isMultiline: {
true: {
label: string;
trigger: string;
};
false: {
value: string;
};
};
disableAnimation: {
true: {
trigger: string;
base: string;
label: string;
selectorIcon: string;
};
false: {
base: string;
label: string[];
selectorIcon: string;
};
};
disableSelectorIconRotation: {
true: {};
false: {
selectorIcon: string;
};
};
}>, unknown, unknown, undefined>>;
type SelectVariantProps = VariantProps<typeof select>;
type SelectSlots = keyof ReturnType<typeof select>;
export { SelectSlots, SelectVariantProps, select };
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = woff2tottf;
exports.woff2tottfasync = woff2tottfasync;
var _index = _interopRequireDefault(require("../../woff2/index"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* @file woff2 to ttf
* @author mengke01(kekee000@gmail.com)
*/
/**
* ttf格式转换成woff2字体格式
*
* @param {ArrayBuffer} woff2Buffer ttf缓冲数组
* @param {Object} options 选项
*
* @return {ArrayBuffer} woff格式byte流
*/
// eslint-disable-next-line no-unused-vars
function woff2tottf(woff2Buffer) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!_index.default.isInited()) {
throw new Error('use woff2.init() to init woff2 module!');
}
var result = _index.default.decode(woff2Buffer);
return result.buffer;
}
/**
* ttf格式转换成woff2字体格式
*
* @param {ArrayBuffer} woff2Buffer ttf缓冲数组
* @param {Object} options 选项
*
* @return {Promise.<ArrayBuffer>} woff格式byte流
*/
function woff2tottfasync(woff2Buffer) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return _index.default.init(options.wasmUrl).then(function () {
var result = _index.default.decode(woff2Buffer);
return result.buffer;
});
}
@@ -0,0 +1 @@
{"name":"agent-base","version":"6.0.2","requiresBuild":false,"files":{"dist/src/index.js":{"checkedAt":1794532127583,"integrity":"sha512-COX44qyNXPZhaS9t9kZQkUEZawEYeo+hhHepEwQj2lzc1t+Bxpnkt5LgyRyrb2JRgl3Ju+YxAfYqHKDRxjvy0g==","mode":420,"size":7910},"dist/src/promisify.js":{"checkedAt":1794532127583,"integrity":"sha512-peRQGBRkzhpYX6aV7Sxo5CLu/C9te2Tx+JuZkidF2SpH1s5/46ekysyYoKOJkT77fUoQ0Km1JSmkwuMWFeX9rw==","mode":420,"size":495},"package.json":{"checkedAt":1794532127583,"integrity":"sha512-7UtmmOxTKf/mFt84MerpYkhn2Y24aEISbxzLfiBBBcuJzf1uWEC93Ik5Wm8QbDlYKshLicEYAdWNzz5oXM4SZA==","mode":420,"size":1635},"dist/src/index.js.map":{"checkedAt":1794532127584,"integrity":"sha512-eHg1cMxkMeJw8R62DmQATz+uuLpLWrpU5+zcjg3QyS178pNnL5wa7kWxR4UgSwvlHZtjojgiIjuR/WQETt2xPA==","mode":420,"size":5824},"dist/src/promisify.js.map":{"checkedAt":1794532127584,"integrity":"sha512-nOvitw8m3/DfTXw/HWkyGCvfb3U8meL2ha3fPap8KQWJlXgTmvsTmzPuUxROFdQfTjZmI1kviS/m27lh8KAW0Q==","mode":420,"size":499},"README.md":{"checkedAt":1794532127584,"integrity":"sha512-QsXEmQQHghDk8dJQDbUcJuMudZg+BOqg/67JOaDY1OVKNC1zJ8XqkoCxbY1H3j9NoxTHiYuBMHBXXXIx24cxXQ==","mode":420,"size":5056},"dist/src/index.d.ts":{"checkedAt":1794532127584,"integrity":"sha512-EjmQgAly3hhicxzIaNh9A/MkNRQYqCJPMkAiPG1OeOi3b/bUBj2dAK+tQh3D6ER25mQJ9wLKxQ0gmi5IHx/tJA==","mode":420,"size":3197},"src/index.ts":{"checkedAt":1794532127584,"integrity":"sha512-5qAJahjIEYOUMnymKXc35dLW3ZZ1h/mJntbKd8cGqyruSSb2LAi4J4oKfYYnwSoemZTg8JvFitv7JUPymJmBGg==","mode":420,"size":9018},"dist/src/promisify.d.ts":{"checkedAt":1794532127584,"integrity":"sha512-/e8xhuK6t03Fu70QVEJJIQaAkgXxPcMDYK1OSlYDEq7o2YGcevE4Ajg82C8zHb0ItQHl8SjRo0qnNX+MUG4EGw==","mode":420,"size":299},"src/promisify.ts":{"checkedAt":1794532127585,"integrity":"sha512-+Z8sOUomQtqg/6aynzl5GwfedtlDJBAk6KcNfyL1ZV211fAG1nhDHOBNxmw/ZLdu3PB1VcCEdjtFKjH+gtHiEg==","mode":420,"size":649}}}
@@ -0,0 +1,17 @@
'use strict';
var isObject = require('es-object-atoms/isObject');
var KeyForSymbol = require('./KeyForSymbol');
// https://262.ecma-international.org/14.0/#sec-canbeheldweakly
module.exports = function CanBeHeldWeakly(v) {
if (isObject(v)) {
return true; // step 1
}
if (typeof v === 'symbol' && typeof KeyForSymbol(v) === 'undefined') {
return true; // step 2
}
return false; // step 3
};
@@ -0,0 +1,22 @@
import { TypeBoxError } from '../../type/error/index.mjs';
export declare class ValuePointerRootSetError extends TypeBoxError {
readonly value: unknown;
readonly path: string;
readonly update: unknown;
constructor(value: unknown, path: string, update: unknown);
}
export declare class ValuePointerRootDeleteError extends TypeBoxError {
readonly value: unknown;
readonly path: string;
constructor(value: unknown, path: string);
}
/** Formats the given pointer into navigable key components */
export declare function Format(pointer: string): IterableIterator<string>;
/** Sets the value at the given pointer. If the value at the pointer does not exist it is created */
export declare function Set(value: any, pointer: string, update: unknown): void;
/** Deletes a value at the given pointer */
export declare function Delete(value: any, pointer: string): void;
/** Returns true if a value exists at the given pointer */
export declare function Has(value: any, pointer: string): boolean;
/** Gets the value at the given pointer */
export declare function Get(value: any, pointer: string): any;
@@ -0,0 +1,2 @@
export declare function buildArrayMetadataWithIndex<T>(newMetadata: T, index: number): (arrayMetadata: T[]) => T[];
//# sourceMappingURL=buildArrayMetadataWithIndex.d.ts.map
@@ -0,0 +1,785 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.digitMapping = void 0;
exports.digitMapping = {
"adlm": [
"𞥐",
"𞥑",
"𞥒",
"𞥓",
"𞥔",
"𞥕",
"𞥖",
"𞥗",
"𞥘",
"𞥙"
],
"ahom": [
"𑜰",
"𑜱",
"𑜲",
"𑜳",
"𑜴",
"𑜵",
"𑜶",
"𑜷",
"𑜸",
"𑜹"
],
"arab": [
"٠",
"١",
"٢",
"٣",
"٤",
"٥",
"٦",
"٧",
"٨",
"٩"
],
"arabext": [
"۰",
"۱",
"۲",
"۳",
"۴",
"۵",
"۶",
"۷",
"۸",
"۹"
],
"bali": [
"᭐",
"᭑",
"᭒",
"᭓",
"᭔",
"᭕",
"᭖",
"᭗",
"᭘",
"᭙"
],
"beng": [
"০",
"১",
"২",
"৩",
"৪",
"৫",
"৬",
"৭",
"৮",
"৯"
],
"bhks": [
"𑱐",
"𑱑",
"𑱒",
"𑱓",
"𑱔",
"𑱕",
"𑱖",
"𑱗",
"𑱘",
"𑱙"
],
"brah": [
"𑁦",
"𑁧",
"𑁨",
"𑁩",
"𑁪",
"𑁫",
"𑁬",
"𑁭",
"𑁮",
"𑁯"
],
"cakm": [
"𑄶",
"𑄷",
"𑄸",
"𑄹",
"𑄺",
"𑄻",
"𑄼",
"𑄽",
"𑄾",
"𑄿"
],
"cham": [
"꩐",
"꩑",
"꩒",
"꩓",
"꩔",
"꩕",
"꩖",
"꩗",
"꩘",
"꩙"
],
"deva": [
"०",
"१",
"२",
"३",
"४",
"५",
"६",
"७",
"८",
"९"
],
"diak": [
"𑥐",
"𑥑",
"𑥒",
"𑥓",
"𑥔",
"𑥕",
"𑥖",
"𑥗",
"𑥘",
"𑥙"
],
"fullwide": [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9"
],
"gong": [
"𑶠",
"𑶡",
"𑶢",
"𑶣",
"𑶤",
"𑶥",
"𑶦",
"𑶧",
"𑶨",
"𑶩"
],
"gonm": [
"𑵐",
"𑵑",
"𑵒",
"𑵓",
"𑵔",
"𑵕",
"𑵖",
"𑵗",
"𑵘",
"𑵙"
],
"gujr": [
"૦",
"૧",
"૨",
"૩",
"૪",
"૫",
"૬",
"૭",
"૮",
"૯"
],
"guru": [
"੦",
"੧",
"੨",
"੩",
"੪",
"੫",
"੬",
"੭",
"੮",
"੯"
],
"hanidec": [
"〇",
"一",
"二",
"三",
"四",
"五",
"六",
"七",
"八",
"九"
],
"hmng": [
"𖭐",
"𖭑",
"𖭒",
"𖭓",
"𖭔",
"𖭕",
"𖭖",
"𖭗",
"𖭘",
"𖭙"
],
"hmnp": [
"𞅀",
"𞅁",
"𞅂",
"𞅃",
"𞅄",
"𞅅",
"𞅆",
"𞅇",
"𞅈",
"𞅉"
],
"java": [
"꧐",
"꧑",
"꧒",
"꧓",
"꧔",
"꧕",
"꧖",
"꧗",
"꧘",
"꧙"
],
"kali": [
"꤀",
"꤁",
"꤂",
"꤃",
"꤄",
"꤅",
"꤆",
"꤇",
"꤈",
"꤉"
],
"khmr": [
"០",
"១",
"២",
"៣",
"៤",
"៥",
"៦",
"៧",
"៨",
"៩"
],
"knda": [
"೦",
"೧",
"೨",
"೩",
"೪",
"೫",
"೬",
"೭",
"೮",
"೯"
],
"lana": [
"᪀",
"᪁",
"᪂",
"᪃",
"᪄",
"᪅",
"᪆",
"᪇",
"᪈",
"᪉"
],
"lanatham": [
"᪐",
"᪑",
"᪒",
"᪓",
"᪔",
"᪕",
"᪖",
"᪗",
"᪘",
"᪙"
],
"laoo": [
"໐",
"໑",
"໒",
"໓",
"໔",
"໕",
"໖",
"໗",
"໘",
"໙"
],
"lepc": [
"᪐",
"᪑",
"᪒",
"᪓",
"᪔",
"᪕",
"᪖",
"᪗",
"᪘",
"᪙"
],
"limb": [
"᥆",
"᥇",
"᥈",
"᥉",
"᥊",
"᥋",
"᥌",
"᥍",
"᥎",
"᥏"
],
"mathbold": [
"𝟎",
"𝟏",
"𝟐",
"𝟑",
"𝟒",
"𝟓",
"𝟔",
"𝟕",
"𝟖",
"𝟗"
],
"mathdbl": [
"𝟘",
"𝟙",
"𝟚",
"𝟛",
"𝟜",
"𝟝",
"𝟞",
"𝟟",
"𝟠",
"𝟡"
],
"mathmono": [
"𝟶",
"𝟷",
"𝟸",
"𝟹",
"𝟺",
"𝟻",
"𝟼",
"𝟽",
"𝟾",
"𝟿"
],
"mathsanb": [
"𝟬",
"𝟭",
"𝟮",
"𝟯",
"𝟰",
"𝟱",
"𝟲",
"𝟳",
"𝟴",
"𝟵"
],
"mathsans": [
"𝟢",
"𝟣",
"𝟤",
"𝟥",
"𝟦",
"𝟧",
"𝟨",
"𝟩",
"𝟪",
"𝟫"
],
"mlym": [
"൦",
"൧",
"൨",
"൩",
"൪",
"൫",
"൬",
"൭",
"൮",
"൯"
],
"modi": [
"𑙐",
"𑙑",
"𑙒",
"𑙓",
"𑙔",
"𑙕",
"𑙖",
"𑙗",
"𑙘",
"𑙙"
],
"mong": [
"᠐",
"᠑",
"᠒",
"᠓",
"᠔",
"᠕",
"᠖",
"᠗",
"᠘",
"᠙"
],
"mroo": [
"𖩠",
"𖩡",
"𖩢",
"𖩣",
"𖩤",
"𖩥",
"𖩦",
"𖩧",
"𖩨",
"𖩩"
],
"mtei": [
"꯰",
"꯱",
"꯲",
"꯳",
"꯴",
"꯵",
"꯶",
"꯷",
"꯸",
"꯹"
],
"mymr": [
"၀",
"၁",
"၂",
"၃",
"၄",
"၅",
"၆",
"၇",
"၈",
"၉"
],
"mymrshan": [
"႐",
"႑",
"႒",
"႓",
"႔",
"႕",
"႖",
"႗",
"႘",
"႙"
],
"mymrtlng": [
"꧰",
"꧱",
"꧲",
"꧳",
"꧴",
"꧵",
"꧶",
"꧷",
"꧸",
"꧹"
],
"newa": [
"𑑐",
"𑑑",
"𑑒",
"𑑓",
"𑑔",
"𑑕",
"𑑖",
"𑑗",
"𑑘",
"𑑙"
],
"nkoo": [
"߀",
"߁",
"߂",
"߃",
"߄",
"߅",
"߆",
"߇",
"߈",
"߉"
],
"olck": [
"᱐",
"᱑",
"᱒",
"᱓",
"᱔",
"᱕",
"᱖",
"᱗",
"᱘",
"᱙"
],
"orya": [
"୦",
"୧",
"୨",
"୩",
"୪",
"୫",
"୬",
"୭",
"୮",
"୯"
],
"osma": [
"𐒠",
"𐒡",
"𐒢",
"𐒣",
"𐒤",
"𐒥",
"𐒦",
"𐒧",
"𐒨",
"𐒩"
],
"rohg": [
"𐴰",
"𐴱",
"𐴲",
"𐴳",
"𐴴",
"𐴵",
"𐴶",
"𐴷",
"𐴸",
"𐴹"
],
"saur": [
"꣐",
"꣑",
"꣒",
"꣓",
"꣔",
"꣕",
"꣖",
"꣗",
"꣘",
"꣙"
],
"segment": [
"🯰",
"🯱",
"🯲",
"🯳",
"🯴",
"🯵",
"🯶",
"🯷",
"🯸",
"🯹"
],
"shrd": [
"𑇐",
"𑇑",
"𑇒",
"𑇓",
"𑇔",
"𑇕",
"𑇖",
"𑇗",
"𑇘",
"𑇙"
],
"sind": [
"𑋰",
"𑋱",
"𑋲",
"𑋳",
"𑋴",
"𑋵",
"𑋶",
"𑋷",
"𑋸",
"𑋹"
],
"sinh": [
"෦",
"෧",
"෨",
"෩",
"෪",
"෫",
"෬",
"෭",
"෮",
"෯"
],
"sora": [
"𑃰",
"𑃱",
"𑃲",
"𑃳",
"𑃴",
"𑃵",
"𑃶",
"𑃷",
"𑃸",
"𑃹"
],
"sund": [
"᮰",
"᮱",
"᮲",
"᮳",
"᮴",
"᮵",
"᮶",
"᮷",
"᮸",
"᮹"
],
"takr": [
"𑛀",
"𑛁",
"𑛂",
"𑛃",
"𑛄",
"𑛅",
"𑛆",
"𑛇",
"𑛈",
"𑛉"
],
"talu": [
"᧐",
"᧑",
"᧒",
"᧓",
"᧔",
"᧕",
"᧖",
"᧗",
"᧘",
"᧙"
],
"tamldec": [
"௦",
"௧",
"௨",
"௩",
"௪",
"௫",
"௬",
"௭",
"௮",
"௯"
],
"telu": [
"౦",
"౧",
"౨",
"౩",
"౪",
"౫",
"౬",
"౭",
"౮",
"౯"
],
"thai": [
"๐",
"๑",
"๒",
"๓",
"๔",
"๕",
"๖",
"๗",
"๘",
"๙"
],
"tibt": [
"༠",
"༡",
"༢",
"༣",
"༤",
"༥",
"༦",
"༧",
"༨",
"༩"
],
"tirh": [
"𑓐",
"𑓑",
"𑓒",
"𑓓",
"𑓔",
"𑓕",
"𑓖",
"𑓗",
"𑓘",
"𑓙"
],
"vaii": [
"ᘠ",
"ᘡ",
"ᘢ",
"ᘣ",
"ᘤ",
"ᘥ",
"ᘦ",
"ᘧ",
"ᘨ",
"ᘩ"
],
"wara": [
"𑣠",
"𑣡",
"𑣢",
"𑣣",
"𑣤",
"𑣥",
"𑣦",
"𑣧",
"𑣨",
"𑣩"
],
"wcho": [
"𞋰",
"𞋱",
"𞋲",
"𞋳",
"𞋴",
"𞋵",
"𞋶",
"𞋷",
"𞋸",
"𞋹"
]
};
@@ -0,0 +1,102 @@
"use client";
import {
useBreadcrumbs
} from "./chunk-GM7QV6YH.mjs";
// src/breadcrumbs.tsx
import { cloneElement, useMemo } from "react";
import { forwardRef } from "@heroui/system";
import { ChevronRightIcon, EllipsisIcon } from "@heroui/shared-icons";
import { warn } from "@heroui/shared-utils";
import { chain } from "@react-aria/utils";
import { jsx } from "react/jsx-runtime";
var Breadcrumbs = forwardRef((props, ref) => {
const {
Component,
children,
childCount,
itemProps,
separator = /* @__PURE__ */ jsx(ChevronRightIcon, {}),
maxItems,
itemsBeforeCollapse,
itemsAfterCollapse,
isDisabled,
renderEllipsis,
getBaseProps,
getListProps,
getEllipsisProps,
getSeparatorProps,
onAction
} = useBreadcrumbs({
...props,
ref
});
const content = useMemo(() => {
let items = children == null ? void 0 : children.map((child, i) => {
var _a;
const isLast = i === childCount - 1;
const itemKey = (child == null ? void 0 : child.key) || i;
return cloneElement(child, {
...itemProps,
isLast,
separator,
isDisabled: isDisabled && !isLast,
isCurrent: isLast || child.props.isCurrent,
...child.props,
key: itemKey,
onPress: chain((_a = child.props) == null ? void 0 : _a.onPress, () => onAction == null ? void 0 : onAction(itemKey))
});
});
if (!items)
return null;
if (childCount < maxItems) {
return items;
}
if (itemsBeforeCollapse + itemsAfterCollapse >= childCount) {
warn(
`You have provided an invalid combination of props to the Breadcrumbs. itemsAfterCollapse={${itemsAfterCollapse}} + itemsBeforeCollapse={${itemsBeforeCollapse}} >= itemsCount={${childCount}}`,
"Breadcrumbs"
);
return items;
}
const itemsInEllipsis = items.slice(itemsBeforeCollapse, items.length - itemsAfterCollapse);
if (itemsInEllipsis.length < 1) {
return items;
}
const ellipsisIcon = /* @__PURE__ */ jsx(EllipsisIcon, { ...getEllipsisProps() });
const collapsedItem = cloneElement(itemsInEllipsis[0], {
...itemsInEllipsis[0].props,
key: "ellipsis",
children: ellipsisIcon
});
const ellipsisItem = typeof renderEllipsis === "function" ? renderEllipsis({
collapsedItem,
items: itemsInEllipsis.map((item) => item.props),
maxItems,
ellipsisIcon,
itemsBeforeCollapse,
itemsAfterCollapse,
separator: /* @__PURE__ */ jsx("span", { ...getSeparatorProps(), children: separator })
}) : collapsedItem;
return [
...items.slice(0, itemsBeforeCollapse),
ellipsisItem,
...items.slice(items.length - itemsAfterCollapse, items.length)
];
}, [
children,
childCount,
separator,
itemProps,
itemsBeforeCollapse,
itemsAfterCollapse,
isDisabled
]);
return /* @__PURE__ */ jsx(Component, { ...getBaseProps(), children: /* @__PURE__ */ jsx("ol", { ...getListProps(), children: content }) });
});
Breadcrumbs.displayName = "HeroUI.Breadcrumbs";
var breadcrumbs_default = Breadcrumbs;
export {
breadcrumbs_default
};
@@ -0,0 +1,30 @@
var eq = require('./eq'),
isArrayLike = require('./isArrayLike'),
isIndex = require('./_isIndex'),
isObject = require('./isObject');
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);
}
return false;
}
module.exports = isIterateeCall;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more