fix(products): fix breadcrumbs and product filtering (backport from main)
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions

View File

@@ -0,0 +1,2 @@
import { sortedIndexOf } from "./index";
export = sortedIndexOf;

View File

@@ -0,0 +1 @@
{"version":3,"file":"laptop-minimal.js","sources":["../../../src/icons/laptop-minimal.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name LaptopMinimal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTIiIHg9IjMiIHk9IjQiIHJ4PSIyIiByeT0iMiIgLz4KICA8bGluZSB4MT0iMiIgeDI9IjIyIiB5MT0iMjAiIHkyPSIyMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/laptop-minimal\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst LaptopMinimal = createLucideIcon('LaptopMinimal', [\n ['rect', { width: '18', height: '12', x: '3', y: '4', rx: '2', ry: '2', key: '1qhy41' }],\n ['line', { x1: '2', x2: '22', y1: '20', y2: '20', key: 'ni3hll' }],\n]);\n\nexport default LaptopMinimal;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CACvF,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACnE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,9 @@
import { status as httpStatus } from 'http-status';
import { APIError } from './APIError.js';
export class InvalidConfiguration extends APIError {
constructor(message){
super(message, httpStatus.INTERNAL_SERVER_ERROR);
}
}
//# sourceMappingURL=InvalidConfiguration.js.map

View File

@@ -0,0 +1,2 @@
import { IPropertyValueDescriptor } from '../IPropertyDescriptor';
export declare const webkitTextStrokeWidth: IPropertyValueDescriptor<number>;

View File

@@ -0,0 +1,17 @@
import type { AuthCollectionSlug, AuthOperationsFromCollectionSlug, Payload, RequestContext } from '../../../index.js';
import type { PayloadRequest } from '../../../types/index.js';
import type { LoginResult } from '../login.js';
export type Options<TSlug extends AuthCollectionSlug> = {
collection: TSlug;
context?: RequestContext;
data: AuthOperationsFromCollectionSlug<TSlug>['login'];
depth?: number;
fallbackLocale?: string;
locale?: string;
overrideAccess?: boolean;
req?: Partial<PayloadRequest>;
showHiddenFields?: boolean;
trash?: boolean;
};
export declare function loginLocal<TSlug extends AuthCollectionSlug>(payload: Payload, options: Options<TSlug>): Promise<LoginResult<TSlug>>;
//# sourceMappingURL=login.d.ts.map

View File

@@ -0,0 +1,681 @@
import { inspect } from '../jsutils/inspect.mjs';
import { GraphQLError } from '../error/GraphQLError.mjs';
import { OperationTypeNode } from '../language/ast.mjs';
import { isEqualType, isTypeSubTypeOf } from '../utilities/typeComparators.mjs';
import {
isEnumType,
isInputObjectType,
isInputType,
isInterfaceType,
isNamedType,
isNonNullType,
isObjectType,
isOutputType,
isRequiredArgument,
isRequiredInputField,
isUnionType,
} from './definition.mjs';
import { GraphQLDeprecatedDirective, isDirective } from './directives.mjs';
import { isIntrospectionType } from './introspection.mjs';
import { assertSchema } from './schema.mjs';
/**
* Implements the "Type Validation" sub-sections of the specification's
* "Type System" section.
*
* Validation runs synchronously, returning an array of encountered errors, or
* an empty array if no errors were encountered and the Schema is valid.
*/
export function validateSchema(schema) {
// First check to ensure the provided value is in fact a GraphQLSchema.
assertSchema(schema); // If this Schema has already been validated, return the previous results.
if (schema.__validationErrors) {
return schema.__validationErrors;
} // Validate the schema, producing a list of errors.
const context = new SchemaValidationContext(schema);
validateRootTypes(context);
validateDirectives(context);
validateTypes(context); // Persist the results of validation before returning to ensure validation
// does not run multiple times for this schema.
const errors = context.getErrors();
schema.__validationErrors = errors;
return errors;
}
/**
* Utility function which asserts a schema is valid by throwing an error if
* it is invalid.
*/
export function assertValidSchema(schema) {
const errors = validateSchema(schema);
if (errors.length !== 0) {
throw new Error(errors.map((error) => error.message).join('\n\n'));
}
}
class SchemaValidationContext {
constructor(schema) {
this._errors = [];
this.schema = schema;
}
reportError(message, nodes) {
const _nodes = Array.isArray(nodes) ? nodes.filter(Boolean) : nodes;
this._errors.push(
new GraphQLError(message, {
nodes: _nodes,
}),
);
}
getErrors() {
return this._errors;
}
}
function validateRootTypes(context) {
const schema = context.schema;
const queryType = schema.getQueryType();
if (!queryType) {
context.reportError('Query root type must be provided.', schema.astNode);
} else if (!isObjectType(queryType)) {
var _getOperationTypeNode;
context.reportError(
`Query root type must be Object type, it cannot be ${inspect(
queryType,
)}.`,
(_getOperationTypeNode = getOperationTypeNode(
schema,
OperationTypeNode.QUERY,
)) !== null && _getOperationTypeNode !== void 0
? _getOperationTypeNode
: queryType.astNode,
);
}
const mutationType = schema.getMutationType();
if (mutationType && !isObjectType(mutationType)) {
var _getOperationTypeNode2;
context.reportError(
'Mutation root type must be Object type if provided, it cannot be ' +
`${inspect(mutationType)}.`,
(_getOperationTypeNode2 = getOperationTypeNode(
schema,
OperationTypeNode.MUTATION,
)) !== null && _getOperationTypeNode2 !== void 0
? _getOperationTypeNode2
: mutationType.astNode,
);
}
const subscriptionType = schema.getSubscriptionType();
if (subscriptionType && !isObjectType(subscriptionType)) {
var _getOperationTypeNode3;
context.reportError(
'Subscription root type must be Object type if provided, it cannot be ' +
`${inspect(subscriptionType)}.`,
(_getOperationTypeNode3 = getOperationTypeNode(
schema,
OperationTypeNode.SUBSCRIPTION,
)) !== null && _getOperationTypeNode3 !== void 0
? _getOperationTypeNode3
: subscriptionType.astNode,
);
}
}
function getOperationTypeNode(schema, operation) {
var _flatMap$find;
return (_flatMap$find = [schema.astNode, ...schema.extensionASTNodes]
.flatMap(
// FIXME: https://github.com/graphql/graphql-js/issues/2203
(schemaNode) => {
var _schemaNode$operation;
return (
/* c8 ignore next */
(_schemaNode$operation =
schemaNode === null || schemaNode === void 0
? void 0
: schemaNode.operationTypes) !== null &&
_schemaNode$operation !== void 0
? _schemaNode$operation
: []
);
},
)
.find((operationNode) => operationNode.operation === operation)) === null ||
_flatMap$find === void 0
? void 0
: _flatMap$find.type;
}
function validateDirectives(context) {
for (const directive of context.schema.getDirectives()) {
// Ensure all directives are in fact GraphQL directives.
if (!isDirective(directive)) {
context.reportError(
`Expected directive but got: ${inspect(directive)}.`,
directive === null || directive === void 0 ? void 0 : directive.astNode,
);
continue;
} // Ensure they are named correctly.
validateName(context, directive);
if (directive.locations.length === 0) {
context.reportError(
`Directive @${directive.name} must include 1 or more locations.`,
directive.astNode,
);
} // Ensure the arguments are valid.
for (const arg of directive.args) {
// Ensure they are named correctly.
validateName(context, arg); // Ensure the type is an input type.
if (!isInputType(arg.type)) {
context.reportError(
`The type of @${directive.name}(${arg.name}:) must be Input Type ` +
`but got: ${inspect(arg.type)}.`,
arg.astNode,
);
}
if (isRequiredArgument(arg) && arg.deprecationReason != null) {
var _arg$astNode;
context.reportError(
`Required argument @${directive.name}(${arg.name}:) cannot be deprecated.`,
[
getDeprecatedDirectiveNode(arg.astNode),
(_arg$astNode = arg.astNode) === null || _arg$astNode === void 0
? void 0
: _arg$astNode.type,
],
);
}
}
}
}
function validateName(context, node) {
// Ensure names are valid, however introspection types opt out.
if (node.name.startsWith('__')) {
context.reportError(
`Name "${node.name}" must not begin with "__", which is reserved by GraphQL introspection.`,
node.astNode,
);
}
}
function validateTypes(context) {
const validateInputObjectCircularRefs =
createInputObjectCircularRefsValidator(context);
const typeMap = context.schema.getTypeMap();
for (const type of Object.values(typeMap)) {
// Ensure all provided types are in fact GraphQL type.
if (!isNamedType(type)) {
context.reportError(
`Expected GraphQL named type but got: ${inspect(type)}.`,
type.astNode,
);
continue;
} // Ensure it is named correctly (excluding introspection types).
if (!isIntrospectionType(type)) {
validateName(context, type);
}
if (isObjectType(type)) {
// Ensure fields are valid
validateFields(context, type); // Ensure objects implement the interfaces they claim to.
validateInterfaces(context, type);
} else if (isInterfaceType(type)) {
// Ensure fields are valid.
validateFields(context, type); // Ensure interfaces implement the interfaces they claim to.
validateInterfaces(context, type);
} else if (isUnionType(type)) {
// Ensure Unions include valid member types.
validateUnionMembers(context, type);
} else if (isEnumType(type)) {
// Ensure Enums have valid values.
validateEnumValues(context, type);
} else if (isInputObjectType(type)) {
// Ensure Input Object fields are valid.
validateInputFields(context, type); // Ensure Input Objects do not contain non-nullable circular references
validateInputObjectCircularRefs(type);
}
}
}
function validateFields(context, type) {
const fields = Object.values(type.getFields()); // Objects and Interfaces both must define one or more fields.
if (fields.length === 0) {
context.reportError(`Type ${type.name} must define one or more fields.`, [
type.astNode,
...type.extensionASTNodes,
]);
}
for (const field of fields) {
// Ensure they are named correctly.
validateName(context, field); // Ensure the type is an output type
if (!isOutputType(field.type)) {
var _field$astNode;
context.reportError(
`The type of ${type.name}.${field.name} must be Output Type ` +
`but got: ${inspect(field.type)}.`,
(_field$astNode = field.astNode) === null || _field$astNode === void 0
? void 0
: _field$astNode.type,
);
} // Ensure the arguments are valid
for (const arg of field.args) {
const argName = arg.name; // Ensure they are named correctly.
validateName(context, arg); // Ensure the type is an input type
if (!isInputType(arg.type)) {
var _arg$astNode2;
context.reportError(
`The type of ${type.name}.${field.name}(${argName}:) must be Input ` +
`Type but got: ${inspect(arg.type)}.`,
(_arg$astNode2 = arg.astNode) === null || _arg$astNode2 === void 0
? void 0
: _arg$astNode2.type,
);
}
if (isRequiredArgument(arg) && arg.deprecationReason != null) {
var _arg$astNode3;
context.reportError(
`Required argument ${type.name}.${field.name}(${argName}:) cannot be deprecated.`,
[
getDeprecatedDirectiveNode(arg.astNode),
(_arg$astNode3 = arg.astNode) === null || _arg$astNode3 === void 0
? void 0
: _arg$astNode3.type,
],
);
}
}
}
}
function validateInterfaces(context, type) {
const ifaceTypeNames = Object.create(null);
for (const iface of type.getInterfaces()) {
if (!isInterfaceType(iface)) {
context.reportError(
`Type ${inspect(type)} must only implement Interface types, ` +
`it cannot implement ${inspect(iface)}.`,
getAllImplementsInterfaceNodes(type, iface),
);
continue;
}
if (type === iface) {
context.reportError(
`Type ${type.name} cannot implement itself because it would create a circular reference.`,
getAllImplementsInterfaceNodes(type, iface),
);
continue;
}
if (ifaceTypeNames[iface.name]) {
context.reportError(
`Type ${type.name} can only implement ${iface.name} once.`,
getAllImplementsInterfaceNodes(type, iface),
);
continue;
}
ifaceTypeNames[iface.name] = true;
validateTypeImplementsAncestors(context, type, iface);
validateTypeImplementsInterface(context, type, iface);
}
}
function validateTypeImplementsInterface(context, type, iface) {
const typeFieldMap = type.getFields(); // Assert each interface field is implemented.
for (const ifaceField of Object.values(iface.getFields())) {
const fieldName = ifaceField.name;
const typeField = typeFieldMap[fieldName]; // Assert interface field exists on type.
if (!typeField) {
context.reportError(
`Interface field ${iface.name}.${fieldName} expected but ${type.name} does not provide it.`,
[ifaceField.astNode, type.astNode, ...type.extensionASTNodes],
);
continue;
} // Assert interface field type is satisfied by type field type, by being
// a valid subtype. (covariant)
if (!isTypeSubTypeOf(context.schema, typeField.type, ifaceField.type)) {
var _ifaceField$astNode, _typeField$astNode;
context.reportError(
`Interface field ${iface.name}.${fieldName} expects type ` +
`${inspect(ifaceField.type)} but ${type.name}.${fieldName} ` +
`is type ${inspect(typeField.type)}.`,
[
(_ifaceField$astNode = ifaceField.astNode) === null ||
_ifaceField$astNode === void 0
? void 0
: _ifaceField$astNode.type,
(_typeField$astNode = typeField.astNode) === null ||
_typeField$astNode === void 0
? void 0
: _typeField$astNode.type,
],
);
} // Assert each interface field arg is implemented.
for (const ifaceArg of ifaceField.args) {
const argName = ifaceArg.name;
const typeArg = typeField.args.find((arg) => arg.name === argName); // Assert interface field arg exists on object field.
if (!typeArg) {
context.reportError(
`Interface field argument ${iface.name}.${fieldName}(${argName}:) expected but ${type.name}.${fieldName} does not provide it.`,
[ifaceArg.astNode, typeField.astNode],
);
continue;
} // Assert interface field arg type matches object field arg type.
// (invariant)
// TODO: change to contravariant?
if (!isEqualType(ifaceArg.type, typeArg.type)) {
var _ifaceArg$astNode, _typeArg$astNode;
context.reportError(
`Interface field argument ${iface.name}.${fieldName}(${argName}:) ` +
`expects type ${inspect(ifaceArg.type)} but ` +
`${type.name}.${fieldName}(${argName}:) is type ` +
`${inspect(typeArg.type)}.`,
[
(_ifaceArg$astNode = ifaceArg.astNode) === null ||
_ifaceArg$astNode === void 0
? void 0
: _ifaceArg$astNode.type,
(_typeArg$astNode = typeArg.astNode) === null ||
_typeArg$astNode === void 0
? void 0
: _typeArg$astNode.type,
],
);
} // TODO: validate default values?
} // Assert additional arguments must not be required.
for (const typeArg of typeField.args) {
const argName = typeArg.name;
const ifaceArg = ifaceField.args.find((arg) => arg.name === argName);
if (!ifaceArg && isRequiredArgument(typeArg)) {
context.reportError(
`Object field ${type.name}.${fieldName} includes required argument ${argName} that is missing from the Interface field ${iface.name}.${fieldName}.`,
[typeArg.astNode, ifaceField.astNode],
);
}
}
}
}
function validateTypeImplementsAncestors(context, type, iface) {
const ifaceInterfaces = type.getInterfaces();
for (const transitive of iface.getInterfaces()) {
if (!ifaceInterfaces.includes(transitive)) {
context.reportError(
transitive === type
? `Type ${type.name} cannot implement ${iface.name} because it would create a circular reference.`
: `Type ${type.name} must implement ${transitive.name} because it is implemented by ${iface.name}.`,
[
...getAllImplementsInterfaceNodes(iface, transitive),
...getAllImplementsInterfaceNodes(type, iface),
],
);
}
}
}
function validateUnionMembers(context, union) {
const memberTypes = union.getTypes();
if (memberTypes.length === 0) {
context.reportError(
`Union type ${union.name} must define one or more member types.`,
[union.astNode, ...union.extensionASTNodes],
);
}
const includedTypeNames = Object.create(null);
for (const memberType of memberTypes) {
if (includedTypeNames[memberType.name]) {
context.reportError(
`Union type ${union.name} can only include type ${memberType.name} once.`,
getUnionMemberTypeNodes(union, memberType.name),
);
continue;
}
includedTypeNames[memberType.name] = true;
if (!isObjectType(memberType)) {
context.reportError(
`Union type ${union.name} can only include Object types, ` +
`it cannot include ${inspect(memberType)}.`,
getUnionMemberTypeNodes(union, String(memberType)),
);
}
}
}
function validateEnumValues(context, enumType) {
const enumValues = enumType.getValues();
if (enumValues.length === 0) {
context.reportError(
`Enum type ${enumType.name} must define one or more values.`,
[enumType.astNode, ...enumType.extensionASTNodes],
);
}
for (const enumValue of enumValues) {
// Ensure valid name.
validateName(context, enumValue);
}
}
function validateInputFields(context, inputObj) {
const fields = Object.values(inputObj.getFields());
if (fields.length === 0) {
context.reportError(
`Input Object type ${inputObj.name} must define one or more fields.`,
[inputObj.astNode, ...inputObj.extensionASTNodes],
);
} // Ensure the arguments are valid
for (const field of fields) {
// Ensure they are named correctly.
validateName(context, field); // Ensure the type is an input type
if (!isInputType(field.type)) {
var _field$astNode2;
context.reportError(
`The type of ${inputObj.name}.${field.name} must be Input Type ` +
`but got: ${inspect(field.type)}.`,
(_field$astNode2 = field.astNode) === null || _field$astNode2 === void 0
? void 0
: _field$astNode2.type,
);
}
if (isRequiredInputField(field) && field.deprecationReason != null) {
var _field$astNode3;
context.reportError(
`Required input field ${inputObj.name}.${field.name} cannot be deprecated.`,
[
getDeprecatedDirectiveNode(field.astNode),
(_field$astNode3 = field.astNode) === null ||
_field$astNode3 === void 0
? void 0
: _field$astNode3.type,
],
);
}
if (inputObj.isOneOf) {
validateOneOfInputObjectField(inputObj, field, context);
}
}
}
function validateOneOfInputObjectField(type, field, context) {
if (isNonNullType(field.type)) {
var _field$astNode4;
context.reportError(
`OneOf input field ${type.name}.${field.name} must be nullable.`,
(_field$astNode4 = field.astNode) === null || _field$astNode4 === void 0
? void 0
: _field$astNode4.type,
);
}
if (field.defaultValue !== undefined) {
context.reportError(
`OneOf input field ${type.name}.${field.name} cannot have a default value.`,
field.astNode,
);
}
}
function createInputObjectCircularRefsValidator(context) {
// Modified copy of algorithm from 'src/validation/rules/NoFragmentCycles.js'.
// Tracks already visited types to maintain O(N) and to ensure that cycles
// are not redundantly reported.
const visitedTypes = Object.create(null); // Array of types nodes used to produce meaningful errors
const fieldPath = []; // Position in the type path
const fieldPathIndexByTypeName = Object.create(null);
return detectCycleRecursive; // This does a straight-forward DFS to find cycles.
// It does not terminate when a cycle was found but continues to explore
// the graph to find all possible cycles.
function detectCycleRecursive(inputObj) {
if (visitedTypes[inputObj.name]) {
return;
}
visitedTypes[inputObj.name] = true;
fieldPathIndexByTypeName[inputObj.name] = fieldPath.length;
const fields = Object.values(inputObj.getFields());
for (const field of fields) {
if (isNonNullType(field.type) && isInputObjectType(field.type.ofType)) {
const fieldType = field.type.ofType;
const cycleIndex = fieldPathIndexByTypeName[fieldType.name];
fieldPath.push(field);
if (cycleIndex === undefined) {
detectCycleRecursive(fieldType);
} else {
const cyclePath = fieldPath.slice(cycleIndex);
const pathStr = cyclePath.map((fieldObj) => fieldObj.name).join('.');
context.reportError(
`Cannot reference Input Object "${fieldType.name}" within itself through a series of non-null fields: "${pathStr}".`,
cyclePath.map((fieldObj) => fieldObj.astNode),
);
}
fieldPath.pop();
}
}
fieldPathIndexByTypeName[inputObj.name] = undefined;
}
}
function getAllImplementsInterfaceNodes(type, iface) {
const { astNode, extensionASTNodes } = type;
const nodes =
astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203
return nodes
.flatMap((typeNode) => {
var _typeNode$interfaces;
return (
/* c8 ignore next */
(_typeNode$interfaces = typeNode.interfaces) !== null &&
_typeNode$interfaces !== void 0
? _typeNode$interfaces
: []
);
})
.filter((ifaceNode) => ifaceNode.name.value === iface.name);
}
function getUnionMemberTypeNodes(union, typeName) {
const { astNode, extensionASTNodes } = union;
const nodes =
astNode != null ? [astNode, ...extensionASTNodes] : extensionASTNodes; // FIXME: https://github.com/graphql/graphql-js/issues/2203
return nodes
.flatMap((unionNode) => {
var _unionNode$types;
return (
/* c8 ignore next */
(_unionNode$types = unionNode.types) !== null &&
_unionNode$types !== void 0
? _unionNode$types
: []
);
})
.filter((typeNode) => typeNode.name.value === typeName);
}
function getDeprecatedDirectiveNode(definitionNode) {
var _definitionNode$direc;
return definitionNode === null || definitionNode === void 0
? void 0
: (_definitionNode$direc = definitionNode.directives) === null ||
_definitionNode$direc === void 0
? void 0
: _definitionNode$direc.find(
(node) => node.name.value === GraphQLDeprecatedDirective.name,
);
}

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.00473,"78":0.00946,"115":0.04728,"128":0.00946,"132":0.00946,"133":0.01418,"134":0.01418,"135":0.01418,"136":0.07565,"137":0.01418,"138":0.01891,"140":0.09456,"141":0.00473,"142":0.00473,"143":0.00946,"144":0.01418,"145":1.34748,"146":1.90066,"147":0.00473,"148":0.00473,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 129 130 131 139 149 3.5 3.6"},D:{"69":0.00946,"79":0.03782,"97":0.00473,"98":0.00473,"103":0.01418,"109":0.10874,"110":0.00473,"111":0.01418,"113":0.00473,"114":0.00473,"115":0.00473,"116":0.12293,"117":0.00946,"120":0.02364,"122":0.06619,"123":0.00473,"124":0.00473,"125":0.10874,"126":0.00473,"128":0.01418,"129":0.01891,"130":0.00473,"131":0.16548,"132":0.08038,"133":0.06146,"134":0.06619,"135":0.05201,"136":0.05674,"137":0.03782,"138":0.22222,"139":0.10874,"140":0.04255,"141":0.64301,"142":8.63806,"143":8.32601,"144":0.02364,"145":0.00473,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 99 100 101 102 104 105 106 107 108 112 118 119 121 127 146"},F:{"46":0.00473,"93":0.00473,"95":0.00946,"114":0.00473,"115":0.01418,"122":0.00473,"123":0.01418,"124":1.16309,"125":0.4728,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 116 117 118 119 120 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"99":0.01418,"109":0.00473,"119":0.00473,"131":0.01891,"132":0.02364,"133":0.03782,"134":0.00946,"135":0.00946,"136":0.04255,"137":0.01418,"138":0.0331,"139":0.00473,"141":0.00946,"142":0.53899,"143":1.7399,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 120 121 122 123 124 125 126 127 128 129 130 140"},E:{"14":0.05201,_:"0 4 5 6 7 8 9 10 11 12 13 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.4","13.1":0.00946,"14.1":0.00473,"15.1":0.00473,"15.2-15.3":0.01891,"15.5":0.01418,"15.6":0.51062,"16.0":0.00473,"16.1":0.05674,"16.2":0.01891,"16.3":0.09929,"16.4":0.02364,"16.5":0.05674,"16.6":1.03543,"17.0":0.08038,"17.1":0.97397,"17.2":0.10402,"17.3":0.17494,"17.4":0.19385,"17.5":0.42552,"17.6":1.46568,"18.0":0.10402,"18.1":0.15602,"18.2":0.34987,"18.3":0.19858,"18.4":0.1513,"18.5-18.6":0.81794,"26.0":0.4397,"26.1":3.66893,"26.2":1.04962,"26.3":0.02364},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00707,"5.0-5.1":0,"6.0-6.1":0.01415,"7.0-7.1":0.01061,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.02829,"10.0-10.2":0.00354,"10.3":0.04951,"11.0-11.2":0.60827,"11.3-11.4":0.01768,"12.0-12.1":0.01415,"12.2-12.5":0.15914,"13.0-13.1":0.00354,"13.2":0.02476,"13.3":0.00707,"13.4-13.7":0.02476,"14.0-14.4":0.04951,"14.5-14.8":0.05305,"15.0-15.1":0.05658,"15.2-15.3":0.04244,"15.4":0.04597,"15.5":0.04951,"15.6-15.8":0.76741,"16.0":0.08841,"16.1":0.16975,"16.2":0.08841,"16.3":0.15914,"16.4":0.0389,"16.5":0.06719,"16.6-16.7":0.99728,"17.0":0.05658,"17.1":0.09195,"17.2":0.06719,"17.3":0.10256,"17.4":0.17329,"17.5":0.3395,"17.6-17.7":0.78509,"18.0":0.17682,"18.1":0.36779,"18.2":0.19451,"18.3":0.63303,"18.4":0.32535,"18.5-18.7":23.36184,"26.0":0.4562,"26.1":3.79462,"26.2":0.72144,"26.3":0.03183},P:{"4":0.01033,"27":0.02066,"28":0.10331,"29":1.13646,_:"20 21 22 23 24 25 26 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.01033},I:{"0":0.00526,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},A:{"8":0.02206,"9":0.01103,"10":0.00552,"11":0.02758,_:"6 7 5.5"},K:{"0":0.30578,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{_:"0"},H:{"0":0},L:{"0":16.10075},R:{_:"0"},M:{"0":0.46921}};

View File

@@ -0,0 +1,25 @@
import { clamp } from '../../../utils/clamp.mjs';
import { alpha, number } from '../numbers/index.mjs';
import { sanitize } from '../utils/sanitize.mjs';
import { isColorString, splitColor } from './utils.mjs';
const clampRgbUnit = (v) => clamp(0, 255, v);
const rgbUnit = {
...number,
transform: (v) => Math.round(clampRgbUnit(v)),
};
const rgba = {
test: /*@__PURE__*/ isColorString("rgb", "red"),
parse: /*@__PURE__*/ splitColor("red", "green", "blue"),
transform: ({ red, green, blue, alpha: alpha$1 = 1 }) => "rgba(" +
rgbUnit.transform(red) +
", " +
rgbUnit.transform(green) +
", " +
rgbUnit.transform(blue) +
", " +
sanitize(alpha.transform(alpha$1)) +
")",
};
export { rgbUnit, rgba };

View File

@@ -0,0 +1 @@
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/enum.ts"],"names":[],"mappings":";;AAEA,mDAAsD;AACtD,yCAAwC;AACxC,yCAAwC;AAIxC,MAAM,KAAK,GAA2B;IACpC,OAAO,EAAE,4CAA4C;IACrD,MAAM,EAAE,CAAC,EAAC,UAAU,EAAC,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,mBAAmB,UAAU,GAAG;CAC5D,CAAA;AAED,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,OAAO;IACnB,KAAK;IACL,IAAI,CAAC,GAAe;QAClB,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QAC9D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;QAC1E,IAAI,MAAM,CAAC,MAAM,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAA;QACxF,IAAI,KAAW,CAAA;QACf,MAAM,QAAQ,GAAG,IAAA,WAAC,EAAA,UAAU,IAAI,cAAc,CAAA;QAC9C,IAAI,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;YACtC,IAAI,IAAU,CACb;YAAA,CAAC,KAAK,EAAE,IAAI,CAAC,GAAG,IAAA,wBAAa,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAA;YAC7C,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;QACxB,CAAC;aAAM,CAAC;YACN,wBAAwB;YACxB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAA;YACvE,KAAK,GAAG,IAAA,aAAG,EAAC,QAAQ,EAAE,IAAA,YAAE,EAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,KAAa,EAAE,EAAE,CAAC,IAAA,WAAC,EAAA,GAAG,IAAI,QAAQ,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;YACpF,IAAI,YAAY,CAAC,QAAQ;gBAAE,KAAK,GAAG,IAAA,YAAE,EAAC,IAAA,WAAC,EAAA,GAAG,IAAI,WAAW,EAAE,KAAK,CAAC,CAAA;QACnE,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAEf,SAAS,QAAQ;YACf,GAAG,CAAC,KAAK,CAAC,GAAG,EAAE,WAAmB,EAAE,CAAC,CAAC,EAAE,EAAE,CACxC,GAAG,CAAC,EAAE,CAAC,IAAA,WAAC,EAAA,GAAG,KAAK,MAAM,IAAI,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAC1D,CAAA;QACH,CAAC;IACH,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}

View File

@@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { MySqlColumn, MySqlColumnBuilder } from "./common.cjs";
export type MySqlYearBuilderInitial<TName extends string> = MySqlYearBuilder<{
name: TName;
dataType: 'number';
columnType: 'MySqlYear';
data: number;
driverParam: number;
enumValues: undefined;
}>;
export declare class MySqlYearBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlYear'>> extends MySqlColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class MySqlYear<T extends ColumnBaseConfig<'number', 'MySqlYear'>> extends MySqlColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function year(): MySqlYearBuilderInitial<''>;
export declare function year<TName extends string>(name: TName): MySqlYearBuilderInitial<TName>;

View File

@@ -0,0 +1,443 @@
"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;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_EXTENSIONS = exports.getBinaryMetadata = exports.__experimental_registerGlobalTraceConfig = exports.minifySync = exports.minify = exports.bundle = exports.transformFileSync = exports.transformFile = exports.transformSync = exports.transform = exports.printSync = exports.print = exports.parseFileSync = exports.parseFile = exports.parseSync = exports.parse = exports.experimental_analyze = exports.Compiler = exports.plugins = exports.version = exports.experimental_newMangleNameCache = void 0;
const path_1 = require("path");
// @ts-ignore
var binding_1 = require("./binding");
Object.defineProperty(exports, "experimental_newMangleNameCache", { enumerable: true, get: function () { return binding_1.newMangleNameCache; } });
const spack_1 = require("./spack");
const assert = __importStar(require("assert"));
// Allow overrides to the location of the .node binding file
const bindingsOverride = process.env["SWC_BINARY_PATH"];
// `@swc/core` includes d.ts for the `@swc/wasm` to provide typed fallback bindings
// todo: fix package.json scripts
let fallbackBindings;
const bindings = (() => {
let binding;
try {
binding = !!bindingsOverride
? require((0, path_1.resolve)(bindingsOverride))
: require("./binding.js");
// If native binding loaded successfully, it should return proper target triple constant.
const triple = binding.getTargetTriple();
assert.ok(triple, "Failed to read target triple from native binary.");
return binding;
}
catch (_) {
// postinstall supposed to install `@swc/wasm` already
fallbackBindings = require("@swc/wasm");
}
finally {
return binding;
}
})();
/**
* Version of the swc binding.
*/
exports.version = require("./package.json").version;
/**
* @deprecated JavaScript API is deprecated. Please use Wasm plugin instead.
*/
function plugins(ps) {
return (mod) => {
let m = mod;
for (const p of ps) {
m = p(m);
}
return m;
};
}
exports.plugins = plugins;
class Compiler {
constructor() {
this.fallbackBindingsPluginWarningDisplayed = false;
}
minify(src, opts, extras) {
return __awaiter(this, void 0, void 0, function* () {
if (bindings) {
return bindings.minify(Buffer.from(!Buffer.isBuffer(src) && typeof src === 'object' ? JSON.stringify(src) : src), toBuffer(opts !== null && opts !== void 0 ? opts : {}), !Buffer.isBuffer(src) && typeof src === 'object', extras !== null && extras !== void 0 ? extras : {});
}
else if (fallbackBindings) {
return fallbackBindings.minify(src, opts);
}
throw new Error("Bindings not found.");
});
}
minifySync(src, opts, extras) {
if (bindings) {
return bindings.minifySync(Buffer.from(!Buffer.isBuffer(src) && typeof src === 'object' ? JSON.stringify(src) : src), toBuffer(opts !== null && opts !== void 0 ? opts : {}), !Buffer.isBuffer(src) && typeof src === 'object', extras !== null && extras !== void 0 ? extras : {});
}
else if (fallbackBindings) {
return fallbackBindings.minifySync(src, opts);
}
throw new Error("Bindings not found.");
}
parse(src, options, filename) {
return __awaiter(this, void 0, void 0, function* () {
options = options || { syntax: "ecmascript" };
options.syntax = options.syntax || "ecmascript";
if (!bindings && !!fallbackBindings) {
throw new Error("Fallback bindings does not support this interface yet.");
}
else if (!bindings) {
throw new Error("Bindings not found.");
}
if (bindings) {
const res = yield bindings.parse(src, toBuffer(options), filename);
return JSON.parse(res);
}
else if (fallbackBindings) {
return fallbackBindings.parse(src, options);
}
throw new Error("Bindings not found.");
});
}
parseSync(src, options, filename) {
options = options || { syntax: "ecmascript" };
options.syntax = options.syntax || "ecmascript";
if (bindings) {
return JSON.parse(bindings.parseSync(src, toBuffer(options), filename));
}
else if (fallbackBindings) {
return fallbackBindings.parseSync(src, options);
}
throw new Error("Bindings not found.");
}
parseFile(path, options) {
return __awaiter(this, void 0, void 0, function* () {
options = options || { syntax: "ecmascript" };
options.syntax = options.syntax || "ecmascript";
if (!bindings && !!fallbackBindings) {
throw new Error("Fallback bindings does not support filesystem access.");
}
else if (!bindings) {
throw new Error("Bindings not found.");
}
const res = yield bindings.parseFile(path, toBuffer(options));
return JSON.parse(res);
});
}
parseFileSync(path, options) {
options = options || { syntax: "ecmascript" };
options.syntax = options.syntax || "ecmascript";
if (!bindings && !!fallbackBindings) {
throw new Error("Fallback bindings does not support filesystem access");
}
else if (!bindings) {
throw new Error("Bindings not found.");
}
return JSON.parse(bindings.parseFileSync(path, toBuffer(options)));
}
/**
* Note: this method should be invoked on the compiler instance used
* for `parse()` / `parseSync()`.
*/
print(m, options) {
return __awaiter(this, void 0, void 0, function* () {
options = options || {};
if (bindings) {
return bindings.print(JSON.stringify(m), toBuffer(options));
}
else if (fallbackBindings) {
return fallbackBindings.print(m, options);
}
throw new Error("Bindings not found.");
});
}
/**
* Note: this method should be invoked on the compiler instance used
* for `parse()` / `parseSync()`.
*/
printSync(m, options) {
options = options || {};
if (bindings) {
return bindings.printSync(JSON.stringify(m), toBuffer(options));
}
else if (fallbackBindings) {
return fallbackBindings.printSync(m, options);
}
throw new Error("Bindings not found.");
}
transform(src, options) {
var _a, _b, _c;
return __awaiter(this, void 0, void 0, function* () {
const isModule = typeof src !== "string";
options = options || {};
if ((_a = options === null || options === void 0 ? void 0 : options.jsc) === null || _a === void 0 ? void 0 : _a.parser) {
options.jsc.parser.syntax =
(_b = options.jsc.parser.syntax) !== null && _b !== void 0 ? _b : "ecmascript";
}
const { plugin } = options, newOptions = __rest(options, ["plugin"]);
if (bindings) {
if (plugin) {
const m = typeof src === "string"
? yield this.parse(src, (_c = options === null || options === void 0 ? void 0 : options.jsc) === null || _c === void 0 ? void 0 : _c.parser, options.filename)
: src;
return this.transform(plugin(m), newOptions);
}
return bindings.transform(isModule ? JSON.stringify(src) : src, isModule, toBuffer(newOptions));
}
else if (fallbackBindings) {
if (plugin && !this.fallbackBindingsPluginWarningDisplayed) {
console.warn(`Fallback bindings does not support legacy plugins, it'll be ignored.`);
this.fallbackBindingsPluginWarningDisplayed = true;
}
return fallbackBindings.transform(src, options);
}
throw new Error("Bindings not found.");
});
}
transformSync(src, options) {
var _a, _b, _c;
const isModule = typeof src !== "string";
options = options || {};
if ((_a = options === null || options === void 0 ? void 0 : options.jsc) === null || _a === void 0 ? void 0 : _a.parser) {
options.jsc.parser.syntax =
(_b = options.jsc.parser.syntax) !== null && _b !== void 0 ? _b : "ecmascript";
}
const { plugin } = options, newOptions = __rest(options, ["plugin"]);
if (bindings) {
if (plugin) {
const m = typeof src === "string"
? this.parseSync(src, (_c = options === null || options === void 0 ? void 0 : options.jsc) === null || _c === void 0 ? void 0 : _c.parser, options.filename)
: src;
return this.transformSync(plugin(m), newOptions);
}
return bindings.transformSync(isModule ? JSON.stringify(src) : src, isModule, toBuffer(newOptions));
}
else if (fallbackBindings) {
if (plugin && !this.fallbackBindingsPluginWarningDisplayed) {
console.warn(`Fallback bindings does not support legacy plugins, it'll be ignored.`);
this.fallbackBindingsPluginWarningDisplayed = true;
}
return fallbackBindings.transformSync(isModule ? JSON.stringify(src) : src, options);
}
throw new Error("Bindings not found");
}
transformFile(path, options) {
var _a, _b, _c;
return __awaiter(this, void 0, void 0, function* () {
if (!bindings && !!fallbackBindings) {
throw new Error("Fallback bindings does not support filesystem access.");
}
else if (!bindings) {
throw new Error("Bindings not found.");
}
options = options || {};
if ((_a = options === null || options === void 0 ? void 0 : options.jsc) === null || _a === void 0 ? void 0 : _a.parser) {
options.jsc.parser.syntax =
(_b = options.jsc.parser.syntax) !== null && _b !== void 0 ? _b : "ecmascript";
}
const { plugin } = options, newOptions = __rest(options, ["plugin"]);
newOptions.filename = path;
if (plugin) {
const m = yield this.parseFile(path, (_c = options === null || options === void 0 ? void 0 : options.jsc) === null || _c === void 0 ? void 0 : _c.parser);
return this.transform(plugin(m), newOptions);
}
return bindings.transformFile(path, false, toBuffer(newOptions));
});
}
transformFileSync(path, options) {
var _a, _b, _c;
if (!bindings && !!fallbackBindings) {
throw new Error("Fallback bindings does not support filesystem access.");
}
else if (!bindings) {
throw new Error("Bindings not found.");
}
options = options || {};
if ((_a = options === null || options === void 0 ? void 0 : options.jsc) === null || _a === void 0 ? void 0 : _a.parser) {
options.jsc.parser.syntax =
(_b = options.jsc.parser.syntax) !== null && _b !== void 0 ? _b : "ecmascript";
}
const { plugin } = options, newOptions = __rest(options, ["plugin"]);
newOptions.filename = path;
if (plugin) {
const m = this.parseFileSync(path, (_c = options === null || options === void 0 ? void 0 : options.jsc) === null || _c === void 0 ? void 0 : _c.parser);
return this.transformSync(plugin(m), newOptions);
}
return bindings.transformFileSync(path,
/* isModule */ false, toBuffer(newOptions));
}
bundle(options) {
return __awaiter(this, void 0, void 0, function* () {
if (!bindings && !!fallbackBindings) {
throw new Error("Fallback bindings does not support this interface yet.");
}
else if (!bindings) {
throw new Error("Bindings not found.");
}
const opts = yield (0, spack_1.compileBundleOptions)(options);
if (Array.isArray(opts)) {
const all = yield Promise.all(opts.map((opt) => __awaiter(this, void 0, void 0, function* () {
return this.bundle(opt);
})));
let obj = {};
for (const o of all) {
obj = Object.assign(Object.assign({}, obj), o);
}
return obj;
}
return bindings.bundle(toBuffer(Object.assign({}, opts)));
});
}
}
exports.Compiler = Compiler;
const compiler = new Compiler();
function experimental_analyze(src, options) {
return bindings.analyze(src, toBuffer(options));
}
exports.experimental_analyze = experimental_analyze;
function parse(src, options) {
return compiler.parse(src, options);
}
exports.parse = parse;
function parseSync(src, options) {
return compiler.parseSync(src, options);
}
exports.parseSync = parseSync;
function parseFile(path, options) {
return compiler.parseFile(path, options);
}
exports.parseFile = parseFile;
function parseFileSync(path, options) {
return compiler.parseFileSync(path, options);
}
exports.parseFileSync = parseFileSync;
function print(m, options) {
return compiler.print(m, options);
}
exports.print = print;
function printSync(m, options) {
return compiler.printSync(m, options);
}
exports.printSync = printSync;
function transform(src, options) {
return compiler.transform(src, options);
}
exports.transform = transform;
function transformSync(src, options) {
return compiler.transformSync(src, options);
}
exports.transformSync = transformSync;
function transformFile(path, options) {
return compiler.transformFile(path, options);
}
exports.transformFile = transformFile;
function transformFileSync(path, options) {
return compiler.transformFileSync(path, options);
}
exports.transformFileSync = transformFileSync;
function bundle(options) {
return compiler.bundle(options);
}
exports.bundle = bundle;
function minify(src, opts, extras) {
return __awaiter(this, void 0, void 0, function* () {
return compiler.minify(src, opts, extras);
});
}
exports.minify = minify;
function minifySync(src, opts, extras) {
return compiler.minifySync(src, opts, extras);
}
exports.minifySync = minifySync;
/**
* Configure custom trace configuration runs for a process lifecycle.
* Currently only chromium's trace event format is supported.
* (https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview)
*
* This should be called before calling any binding interfaces exported in `@swc/core`, such as
* `transform*`, or `parse*` or anything. To avoid breaking changes, each binding fn internally
* sets default trace subscriber if not set.
*
* Unlike other configuration, this does not belong to individual api surface using swcrc
* or api's parameters (`transform(..., {trace})`). This is due to current tracing subscriber
* can be configured only once for the global scope. Calling `registerGlobalTraceConfig` multiple
* time won't cause error, subsequent calls will be ignored.
*
* As name implies currently this is experimental interface may change over time without semver
* major breaking changes. Please provide feedbacks,
* or bug report at https://github.com/swc-project/swc/discussions.
*/
function __experimental_registerGlobalTraceConfig(traceConfig) {
// Do not raise error if binding doesn't exists - fallback binding will not support
// this ever.
if (bindings) {
if (traceConfig.type === "traceEvent") {
bindings.initCustomTraceSubscriber(traceConfig.fileName);
}
}
}
exports.__experimental_registerGlobalTraceConfig = __experimental_registerGlobalTraceConfig;
/**
* @ignore
*
* Returns current binary's metadata to determine which binary is actually loaded.
*
* This is undocumented interface, does not guarantee stability across `@swc/core`'s semver
* as internal representation may change anytime. Use it with caution.
*/
function getBinaryMetadata() {
return {
target: bindings ? bindings === null || bindings === void 0 ? void 0 : bindings.getTargetTriple() : undefined,
};
}
exports.getBinaryMetadata = getBinaryMetadata;
exports.DEFAULT_EXTENSIONS = Object.freeze([
".js",
".jsx",
".es6",
".es",
".mjs",
".ts",
".tsx",
".cts",
".mts",
]);
function toBuffer(t) {
return Buffer.from(JSON.stringify(t));
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"fork-knife.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,538 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/el/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u03BB\u03B9\u03B3\u03CC\u03C4\u03B5\u03C1\u03BF \u03B1\u03C0\u03CC \u03AD\u03BD\u03B1 \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03BF",
other: "\u03BB\u03B9\u03B3\u03CC\u03C4\u03B5\u03C1\u03BF \u03B1\u03C0\u03CC {{count}} \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03B1"
},
xSeconds: {
one: "1 \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03BF",
other: "{{count}} \u03B4\u03B5\u03C5\u03C4\u03B5\u03C1\u03CC\u03BB\u03B5\u03C0\u03C4\u03B1"
},
halfAMinute: "\u03BC\u03B9\u03C3\u03CC \u03BB\u03B5\u03C0\u03C4\u03CC",
lessThanXMinutes: {
one: "\u03BB\u03B9\u03B3\u03CC\u03C4\u03B5\u03C1\u03BF \u03B1\u03C0\u03CC \u03AD\u03BD\u03B1 \u03BB\u03B5\u03C0\u03C4\u03CC",
other: "\u03BB\u03B9\u03B3\u03CC\u03C4\u03B5\u03C1\u03BF \u03B1\u03C0\u03CC {{count}} \u03BB\u03B5\u03C0\u03C4\u03AC"
},
xMinutes: {
one: "1 \u03BB\u03B5\u03C0\u03C4\u03CC",
other: "{{count}} \u03BB\u03B5\u03C0\u03C4\u03AC"
},
aboutXHours: {
one: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 1 \u03CE\u03C1\u03B1",
other: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 {{count}} \u03CE\u03C1\u03B5\u03C2"
},
xHours: {
one: "1 \u03CE\u03C1\u03B1",
other: "{{count}} \u03CE\u03C1\u03B5\u03C2"
},
xDays: {
one: "1 \u03B7\u03BC\u03AD\u03C1\u03B1",
other: "{{count}} \u03B7\u03BC\u03AD\u03C1\u03B5\u03C2"
},
aboutXWeeks: {
one: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 1 \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1",
other: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 {{count}} \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B5\u03C2"
},
xWeeks: {
one: "1 \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B1",
other: "{{count}} \u03B5\u03B2\u03B4\u03BF\u03BC\u03AC\u03B4\u03B5\u03C2"
},
aboutXMonths: {
one: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 1 \u03BC\u03AE\u03BD\u03B1\u03C2",
other: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 {{count}} \u03BC\u03AE\u03BD\u03B5\u03C2"
},
xMonths: {
one: "1 \u03BC\u03AE\u03BD\u03B1\u03C2",
other: "{{count}} \u03BC\u03AE\u03BD\u03B5\u03C2"
},
aboutXYears: {
one: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 1 \u03C7\u03C1\u03CC\u03BD\u03BF",
other: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 {{count}} \u03C7\u03C1\u03CC\u03BD\u03B9\u03B1"
},
xYears: {
one: "1 \u03C7\u03C1\u03CC\u03BD\u03BF",
other: "{{count}} \u03C7\u03C1\u03CC\u03BD\u03B9\u03B1"
},
overXYears: {
one: "\u03C0\u03AC\u03BD\u03C9 \u03B1\u03C0\u03CC 1 \u03C7\u03C1\u03CC\u03BD\u03BF",
other: "\u03C0\u03AC\u03BD\u03C9 \u03B1\u03C0\u03CC {{count}} \u03C7\u03C1\u03CC\u03BD\u03B9\u03B1"
},
almostXYears: {
one: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 1 \u03C7\u03C1\u03CC\u03BD\u03BF",
other: "\u03C0\u03B5\u03C1\u03AF\u03C0\u03BF\u03C5 {{count}} \u03C7\u03C1\u03CC\u03BD\u03B9\u03B1"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\u03C3\u03B5 " + result;
} else {
return result + " \u03C0\u03C1\u03B9\u03BD";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/el/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE, d MMMM y",
long: "d MMMM y",
medium: "d MMM y",
short: "d/M/yy"
};
var timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a"
};
var dateTimeFormats = {
full: "{{date}} - {{time}}",
long: "{{date}} - {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/el/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: function lastWeek(date) {
switch (date.getDay()) {
case 6:
return "'\u03C4\u03BF \u03C0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03BF' eeee '\u03C3\u03C4\u03B9\u03C2' p";
default:
return "'\u03C4\u03B7\u03BD \u03C0\u03C1\u03BF\u03B7\u03B3\u03BF\u03CD\u03BC\u03B5\u03BD\u03B7' eeee '\u03C3\u03C4\u03B9\u03C2' p";
}
},
yesterday: "'\u03C7\u03B8\u03B5\u03C2 \u03C3\u03C4\u03B9\u03C2' p",
today: "'\u03C3\u03AE\u03BC\u03B5\u03C1\u03B1 \u03C3\u03C4\u03B9\u03C2' p",
tomorrow: "'\u03B1\u03CD\u03C1\u03B9\u03BF \u03C3\u03C4\u03B9\u03C2' p",
nextWeek: "eeee '\u03C3\u03C4\u03B9\u03C2' p",
other: "P"
};
var formatRelative = function formatRelative(token, date) {
var format = formatRelativeLocale[token];
if (typeof format === "function")
return format(date);
return format;
};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/el/_lib/localize.mjs
var eraValues = {
narrow: ["\u03C0\u03A7", "\u03BC\u03A7"],
abbreviated: ["\u03C0.\u03A7.", "\u03BC.\u03A7."],
wide: ["\u03C0\u03C1\u03BF \u03A7\u03C1\u03B9\u03C3\u03C4\u03BF\u03CD", "\u03BC\u03B5\u03C4\u03AC \u03A7\u03C1\u03B9\u03C3\u03C4\u03CC\u03BD"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["\u03A41", "\u03A42", "\u03A43", "\u03A44"],
wide: ["1\u03BF \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF", "2\u03BF \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF", "3\u03BF \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF", "4\u03BF \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF"]
};
var monthValues = {
narrow: ["\u0399", "\u03A6", "\u039C", "\u0391", "\u039C", "\u0399", "\u0399", "\u0391", "\u03A3", "\u039F", "\u039D", "\u0394"],
abbreviated: [
"\u0399\u03B1\u03BD",
"\u03A6\u03B5\u03B2",
"\u039C\u03AC\u03C1",
"\u0391\u03C0\u03C1",
"\u039C\u03AC\u03B9",
"\u0399\u03BF\u03CD\u03BD",
"\u0399\u03BF\u03CD\u03BB",
"\u0391\u03CD\u03B3",
"\u03A3\u03B5\u03C0",
"\u039F\u03BA\u03C4",
"\u039D\u03BF\u03AD",
"\u0394\u03B5\u03BA"],
wide: [
"\u0399\u03B1\u03BD\u03BF\u03C5\u03AC\u03C1\u03B9\u03BF\u03C2",
"\u03A6\u03B5\u03B2\u03C1\u03BF\u03C5\u03AC\u03C1\u03B9\u03BF\u03C2",
"\u039C\u03AC\u03C1\u03C4\u03B9\u03BF\u03C2",
"\u0391\u03C0\u03C1\u03AF\u03BB\u03B9\u03BF\u03C2",
"\u039C\u03AC\u03B9\u03BF\u03C2",
"\u0399\u03BF\u03CD\u03BD\u03B9\u03BF\u03C2",
"\u0399\u03BF\u03CD\u03BB\u03B9\u03BF\u03C2",
"\u0391\u03CD\u03B3\u03BF\u03C5\u03C3\u03C4\u03BF\u03C2",
"\u03A3\u03B5\u03C0\u03C4\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2",
"\u039F\u03BA\u03C4\u03CE\u03B2\u03C1\u03B9\u03BF\u03C2",
"\u039D\u03BF\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2",
"\u0394\u03B5\u03BA\u03AD\u03BC\u03B2\u03C1\u03B9\u03BF\u03C2"]
};
var formattingMonthValues = {
narrow: ["\u0399", "\u03A6", "\u039C", "\u0391", "\u039C", "\u0399", "\u0399", "\u0391", "\u03A3", "\u039F", "\u039D", "\u0394"],
abbreviated: [
"\u0399\u03B1\u03BD",
"\u03A6\u03B5\u03B2",
"\u039C\u03B1\u03C1",
"\u0391\u03C0\u03C1",
"\u039C\u03B1\u0390",
"\u0399\u03BF\u03C5\u03BD",
"\u0399\u03BF\u03C5\u03BB",
"\u0391\u03C5\u03B3",
"\u03A3\u03B5\u03C0",
"\u039F\u03BA\u03C4",
"\u039D\u03BF\u03B5",
"\u0394\u03B5\u03BA"],
wide: [
"\u0399\u03B1\u03BD\u03BF\u03C5\u03B1\u03C1\u03AF\u03BF\u03C5",
"\u03A6\u03B5\u03B2\u03C1\u03BF\u03C5\u03B1\u03C1\u03AF\u03BF\u03C5",
"\u039C\u03B1\u03C1\u03C4\u03AF\u03BF\u03C5",
"\u0391\u03C0\u03C1\u03B9\u03BB\u03AF\u03BF\u03C5",
"\u039C\u03B1\u0390\u03BF\u03C5",
"\u0399\u03BF\u03C5\u03BD\u03AF\u03BF\u03C5",
"\u0399\u03BF\u03C5\u03BB\u03AF\u03BF\u03C5",
"\u0391\u03C5\u03B3\u03BF\u03CD\u03C3\u03C4\u03BF\u03C5",
"\u03A3\u03B5\u03C0\u03C4\u03B5\u03BC\u03B2\u03C1\u03AF\u03BF\u03C5",
"\u039F\u03BA\u03C4\u03C9\u03B2\u03C1\u03AF\u03BF\u03C5",
"\u039D\u03BF\u03B5\u03BC\u03B2\u03C1\u03AF\u03BF\u03C5",
"\u0394\u03B5\u03BA\u03B5\u03BC\u03B2\u03C1\u03AF\u03BF\u03C5"]
};
var dayValues = {
narrow: ["\u039A", "\u0394", "T", "\u03A4", "\u03A0", "\u03A0", "\u03A3"],
short: ["\u039A\u03C5", "\u0394\u03B5", "\u03A4\u03C1", "\u03A4\u03B5", "\u03A0\u03AD", "\u03A0\u03B1", "\u03A3\u03AC"],
abbreviated: ["\u039A\u03C5\u03C1", "\u0394\u03B5\u03C5", "\u03A4\u03C1\u03AF", "\u03A4\u03B5\u03C4", "\u03A0\u03AD\u03BC", "\u03A0\u03B1\u03C1", "\u03A3\u03AC\u03B2"],
wide: [
"\u039A\u03C5\u03C1\u03B9\u03B1\u03BA\u03AE",
"\u0394\u03B5\u03C5\u03C4\u03AD\u03C1\u03B1",
"\u03A4\u03C1\u03AF\u03C4\u03B7",
"\u03A4\u03B5\u03C4\u03AC\u03C1\u03C4\u03B7",
"\u03A0\u03AD\u03BC\u03C0\u03C4\u03B7",
"\u03A0\u03B1\u03C1\u03B1\u03C3\u03BA\u03B5\u03C5\u03AE",
"\u03A3\u03AC\u03B2\u03B2\u03B1\u03C4\u03BF"]
};
var dayPeriodValues = {
narrow: {
am: "\u03C0\u03BC",
pm: "\u03BC\u03BC",
midnight: "\u03BC\u03B5\u03C3\u03AC\u03BD\u03C5\u03C7\u03C4\u03B1",
noon: "\u03BC\u03B5\u03C3\u03B7\u03BC\u03AD\u03C1\u03B9",
morning: "\u03C0\u03C1\u03C9\u03AF",
afternoon: "\u03B1\u03C0\u03CC\u03B3\u03B5\u03C5\u03BC\u03B1",
evening: "\u03B2\u03C1\u03AC\u03B4\u03C5",
night: "\u03BD\u03CD\u03C7\u03C4\u03B1"
},
abbreviated: {
am: "\u03C0.\u03BC.",
pm: "\u03BC.\u03BC.",
midnight: "\u03BC\u03B5\u03C3\u03AC\u03BD\u03C5\u03C7\u03C4\u03B1",
noon: "\u03BC\u03B5\u03C3\u03B7\u03BC\u03AD\u03C1\u03B9",
morning: "\u03C0\u03C1\u03C9\u03AF",
afternoon: "\u03B1\u03C0\u03CC\u03B3\u03B5\u03C5\u03BC\u03B1",
evening: "\u03B2\u03C1\u03AC\u03B4\u03C5",
night: "\u03BD\u03CD\u03C7\u03C4\u03B1"
},
wide: {
am: "\u03C0.\u03BC.",
pm: "\u03BC.\u03BC.",
midnight: "\u03BC\u03B5\u03C3\u03AC\u03BD\u03C5\u03C7\u03C4\u03B1",
noon: "\u03BC\u03B5\u03C3\u03B7\u03BC\u03AD\u03C1\u03B9",
morning: "\u03C0\u03C1\u03C9\u03AF",
afternoon: "\u03B1\u03C0\u03CC\u03B3\u03B5\u03C5\u03BC\u03B1",
evening: "\u03B2\u03C1\u03AC\u03B4\u03C5",
night: "\u03BD\u03CD\u03C7\u03C4\u03B1"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
var unit = options === null || options === void 0 ? void 0 : options.unit;
var suffix;
if (unit === "year" || unit === "month") {
suffix = "\u03BF\u03C2";
} else if (unit === "week" || unit === "dayOfYear" || unit === "day" || unit === "hour" || unit === "date") {
suffix = "\u03B7";
} else {
suffix = "\u03BF";
}
return number + suffix;
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/el/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(ος|η|ο)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(πΧ|μΧ)/i,
abbreviated: /^(π\.?\s?χ\.?|π\.?\s?κ\.?\s?χ\.?|μ\.?\s?χ\.?|κ\.?\s?χ\.?)/i,
wide: /^(προ Χριστο(ύ|υ)|πριν απ(ό|ο) την Κοιν(ή|η) Χρονολογ(ί|ι)α|μετ(ά|α) Χριστ(ό|ο)ν|Κοιν(ή|η) Χρονολογ(ί|ι)α)/i
};
var parseEraPatterns = {
any: [/^π/i, /^(μ|κ)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^τ[1234]/i,
wide: /^[1234]ο? τρ(ί|ι)μηνο/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[ιφμαμιιασονδ]/i,
abbreviated: /^(ιαν|φεβ|μ[άα]ρ|απρ|μ[άα][ιΐ]|ιο[ύυ]ν|ιο[ύυ]λ|α[ύυ]γ|σεπ|οκτ|νο[έε]|δεκ)/i,
wide: /^(μ[άα][ιΐ]|α[ύυ]γο[υύ]στ)(ος|ου)|(ιανου[άα]ρ|φεβρου[άα]ρ|μ[άα]ρτ|απρ[ίι]λ|ιο[ύυ]ν|ιο[ύυ]λ|σεπτ[έε]μβρ|οκτ[ώω]βρ|νο[έε]μβρ|δεκ[έε]μβρ)(ιος|ίου)/i
};
var parseMonthPatterns = {
narrow: [
/^ι/i,
/^φ/i,
/^μ/i,
/^α/i,
/^μ/i,
/^ι/i,
/^ι/i,
/^α/i,
/^σ/i,
/^ο/i,
/^ν/i,
/^δ/i],
any: [
/^ια/i,
/^φ/i,
/^μ[άα]ρ/i,
/^απ/i,
/^μ[άα][ιΐ]/i,
/^ιο[ύυ]ν/i,
/^ιο[ύυ]λ/i,
/^α[ύυ]/i,
/^σ/i,
/^ο/i,
/^ν/i,
/^δ/i]
};
var matchDayPatterns = {
narrow: /^[κδτπσ]/i,
short: /^(κυ|δε|τρ|τε|π[εέ]|π[αά]|σ[αά])/i,
abbreviated: /^(κυρ|δευ|τρι|τετ|πεμ|παρ|σαβ)/i,
wide: /^(κυριακ(ή|η)|δευτ(έ|ε)ρα|τρ(ί|ι)τη|τετ(ά|α)ρτη|π(έ|ε)μπτη|παρασκευ(ή|η)|σ(ά|α)ββατο)/i
};
var parseDayPatterns = {
narrow: [/^κ/i, /^δ/i, /^τ/i, /^τ/i, /^π/i, /^π/i, /^σ/i],
any: [/^κ/i, /^δ/i, /^τρ/i, /^τε/i, /^π[εέ]/i, /^π[αά]/i, /^σ/i]
};
var matchDayPeriodPatterns = {
narrow: /^(πμ|μμ|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i,
any: /^([πμ]\.?\s?μ\.?|μεσ(ά|α)νυχτα|μεσημ(έ|ε)ρι|πρω(ί|ι)|απ(ό|ο)γευμα|βρ(ά|α)δυ|ν(ύ|υ)χτα)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^πμ|π\.\s?μ\./i,
pm: /^μμ|μ\.\s?μ\./i,
midnight: /^μεσάν/i,
noon: /^μεσημ(έ|ε)/i,
morning: /πρω(ί|ι)/i,
afternoon: /απ(ό|ο)γευμα/i,
evening: /βρ(ά|α)δυ/i,
night: /ν(ύ|υ)χτα/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/el.mjs
var el = {
code: "el",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/el/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
el: el }) });
//# debugId=A81C4CF2E3C8AFC564756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1,25 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var pg_proxy_exports = {};
module.exports = __toCommonJS(pg_proxy_exports);
__reExport(pg_proxy_exports, require("./driver.cjs"), module.exports);
__reExport(pg_proxy_exports, require("./session.cjs"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./driver.cjs"),
...require("./session.cjs")
});
//# sourceMappingURL=index.cjs.map

View File

@@ -0,0 +1,10 @@
import type { Endpoint } from '../../config/types.js';
import type { SanitizedJobsConfig } from '../config/types/index.js';
/**
* /api/payload-jobs/run endpoint
*
* This endpoint is GET instead of POST to allow it to be used in a Vercel Cron.
*/
export declare const runJobsEndpoint: Endpoint;
export declare const configHasJobs: (jobsConfig: SanitizedJobsConfig) => boolean;
//# sourceMappingURL=run.d.ts.map

View File

@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { setDay as fn } from "../setDay.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const setDay = convertToFP(fn, 2);
// Fallback for modularized imports:
export default setDay;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","CalendarIcon","_jsx","className","viewBox","xmlns","d","strokeLinecap"],"sources":["../../../src/icons/Calendar/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const CalendarIcon: React.FC = () => (\n <svg className=\"icon icon--calendar\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n className=\"stroke\"\n d=\"M7.33333 3.33334V6M12.6667 3.33334V6M4 8.66667H16M5.33333 4.66667H14.6667C15.403 4.66667 16 5.26362 16 6V15.3333C16 16.0697 15.403 16.6667 14.6667 16.6667H5.33333C4.59695 16.6667 4 16.0697 4 15.3333V6C4 5.26362 4.59695 4.66667 5.33333 4.66667Z\"\n strokeLinecap=\"square\"\n />\n </svg>\n)\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAElB,OAAO;AAEP,OAAO,MAAMC,YAAA,GAAyBA,CAAA,kBACpCC,IAAA,CAAC;EAAIC,SAAA,EAAU;EAAsBC,OAAA,EAAQ;EAAYC,KAAA,EAAM;YAC7D,aAAAH,IAAA,CAAC;IACCC,SAAA,EAAU;IACVG,CAAA,EAAE;IACFC,aAAA,EAAc","ignoreList":[]}

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleParkingOff = createLucideIcon("CircleParkingOff", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "m5 5 14 14", key: "11anup" }],
["path", { d: "M13 13a3 3 0 1 0 0-6H9v2", key: "uoagbd" }],
["path", { d: "M9 17v-2.34", key: "a9qo08" }]
]);
export { CircleParkingOff as default };
//# sourceMappingURL=circle-parking-off.js.map

View File

@@ -0,0 +1,3 @@
import type { Plugin } from "ajv";
declare const anyRequired: Plugin<undefined>;
export default anyRequired;

View File

@@ -0,0 +1,5 @@
import type { CollectionConfig } from '../collections/config/types.js';
import type { Config } from '../config/types.js';
export declare const queryPresetsCollectionSlug = "payload-query-presets";
export declare const getQueryPresetsConfig: (config: Config) => CollectionConfig;
//# sourceMappingURL=config.d.ts.map

View File

@@ -0,0 +1,3 @@
export { IORedisInstrumentation } from './instrumentation';
export type { CommandArgs, DbStatementSerializer, IORedisInstrumentationConfig, IORedisRequestHookInformation, RedisRequestCustomAttributeFunction, RedisResponseCustomAttributeFunction, } from './types';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,63 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { fieldIsHiddenOrDisabled, fieldIsID } from 'payload/shared';
import React, { useId, useMemo } from 'react';
import { FieldLabel } from '../../fields/FieldLabel/index.js';
import { useEditDepth } from '../../providers/EditDepth/index.js';
import { useTableColumns } from '../../providers/TableColumns/index.js';
import { PillSelector } from '../PillSelector/index.js';
export const ColumnSelector = ({
collectionSlug
}) => {
const {
columns,
moveColumn,
toggleColumn
} = useTableColumns();
const uuid = useId();
const editDepth = useEditDepth();
const filteredColumns = useMemo(() => columns?.filter(col => !(fieldIsHiddenOrDisabled(col.field) && !fieldIsID(col.field)) && !col?.field?.admin?.disableListColumn), [columns]);
const pills = useMemo(() => {
return filteredColumns ? filteredColumns.map((col_0, i) => {
const {
accessor,
active,
field
} = col_0;
const label = 'labelWithPrefix' in field && field.labelWithPrefix !== undefined ? field.labelWithPrefix : 'label' in field && field.label !== undefined ? field.label : 'name' in field && field.name !== undefined ? field.name : undefined;
return {
name: accessor,
key: `${collectionSlug}-${accessor}-${i}${editDepth ? `-${editDepth}-` : ''}${uuid}`,
Label: /*#__PURE__*/_jsx(FieldLabel, {
label: label,
unstyled: true
}),
selected: active
};
}) : null;
}, [collectionSlug, editDepth, filteredColumns, uuid]);
if (!pills) {
return null;
}
return /*#__PURE__*/_jsx(PillSelector, {
draggable: {
onDragEnd: ({
moveFromIndex,
moveToIndex
}) => {
void moveColumn({
fromIndex: moveFromIndex,
toIndex: moveToIndex
});
}
},
onClick: ({
pill
}) => {
void toggleColumn(pill.name);
},
pills: pills
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"usb.js","sources":["../../../src/icons/usb.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Usb\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMCIgY3k9IjciIHI9IjEiIC8+CiAgPGNpcmNsZSBjeD0iNCIgY3k9IjIwIiByPSIxIiAvPgogIDxwYXRoIGQ9Ik00LjcgMTkuMyAxOSA1IiAvPgogIDxwYXRoIGQ9Im0yMSAzLTMgMSAyIDJaIiAvPgogIDxwYXRoIGQ9Ik05LjI2IDcuNjggNSAxMmwyIDUiIC8+CiAgPHBhdGggZD0ibTEwIDE0IDUgMiAzLjUtMy41IiAvPgogIDxwYXRoIGQ9Im0xOCAxMiAxLTEgMSAxLTEgMVoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/usb\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Usb = createLucideIcon('Usb', [\n ['circle', { cx: '10', cy: '7', r: '1', key: 'dypaad' }],\n ['circle', { cx: '4', cy: '20', r: '1', key: '22iqad' }],\n ['path', { d: 'M4.7 19.3 19 5', key: '1enqfc' }],\n ['path', { d: 'm21 3-3 1 2 2Z', key: 'd3ov82' }],\n ['path', { d: 'M9.26 7.68 5 12l2 5', key: '1esawj' }],\n ['path', { d: 'm10 14 5 2 3.5-3.5', key: 'v8oal5' }],\n ['path', { d: 'm18 12 1-1 1 1-1 1Z', key: '1bh22v' }],\n]);\n\nexport default Usb;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAClC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACvD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACnD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAuB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACtD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,411 @@
<div align="center">
🎉 announcing <a href="https://github.com/dotenvx/dotenvx">dotenvx</a>. <em>run anywhere, multi-environment, encrypted envs</em>.
</div>
&nbsp;
<div align="center">
<p>
<sup>
<a href="https://github.com/sponsors/motdotla">Dotenv es apoyado por la comunidad.</a>
</sup>
</p>
<sup>Gracias espaciales a:</sup>
<br>
<br>
<a href="https://graphite.dev/?utm_source=github&utm_medium=repo&utm_campaign=dotenv"><img src="https://res.cloudinary.com/dotenv-org/image/upload/v1744035073/graphite_lgsrl8.gif" width="240" alt="Graphite" /></a>
<a href="https://graphite.dev/?utm_source=github&utm_medium=repo&utm_campaign=dotenv">
<b>Graphite is the AI developer productivity platform helping teams on GitHub ship higher quality software, faster.</b>
</a>
<hr>
</div>
# dotenv [![NPM version](https://img.shields.io/npm/v/dotenv.svg?style=flat-square)](https://www.npmjs.com/package/dotenv)
<img src="https://raw.githubusercontent.com/motdotla/dotenv/master/dotenv.svg" alt="dotenv" align="right" width="200" />
Dotenv es un módulo de dependencia cero que carga las variables de entorno desde un archivo `.env` en [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env). El almacenamiento de la configuración del entorno separado del código está basado en la metodología [The Twelve-Factor App](http://12factor.net/config).
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![LICENSE](https://img.shields.io/github/license/motdotla/dotenv.svg)](LICENSE)
## Instalación
```bash
# instalación local (recomendado)
npm install dotenv --save
```
O installación con yarn? `yarn add dotenv`
## Uso
Cree un archivo `.env` en la raíz de su proyecto:
```dosini
S3_BUCKET="YOURS3BUCKET"
SECRET_KEY="YOURSECRETKEYGOESHERE"
```
Tan prónto como sea posible en su aplicación, importe y configure dotenv:
```javascript
require('dotenv').config()
console.log(process.env) // elimine esto después que haya confirmado que esta funcionando
```
.. o usa ES6?
```javascript
import * as dotenv from 'dotenv' // vea en https://github.com/motdotla/dotenv#como-uso-dotenv-con-import
// REVISAR LINK DE REFERENCIA DE IMPORTACIÓN
dotenv.config()
import express from 'express'
```
Eso es todo. `process.env` ahora tiene las claves y los valores que definiste en tu archivo `.env`:
```javascript
require('dotenv').config()
...
s3.getBucketCors({Bucket: process.env.S3_BUCKET}, function(err, data) {})
```
### Valores multilínea
Si necesita variables de varias líneas, por ejemplo, claves privadas, ahora se admiten en la versión (`>= v15.0.0`) con saltos de línea:
```dosini
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
...
Kh9NV...
...
-----END RSA PRIVATE KEY-----"
```
Alternativamente, puede usar comillas dobles y usar el carácter `\n`:
```dosini
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nKh9NV...\n-----END RSA PRIVATE KEY-----\n"
```
### Comentarios
Los comentarios pueden ser agregados en tu archivo o en la misma línea:
```dosini
# This is a comment
SECRET_KEY=YOURSECRETKEYGOESHERE # comment
SECRET_HASH="something-with-a-#-hash"
```
Los comentarios comienzan donde existe un `#`, entonces, si su valor contiene un `#`, enciérrelo entre comillas. Este es un cambio importante desde la versión `>= v15.0.0` en adelante.
### Análisis
El motor que analiza el contenido de su archivo que contiene variables de entorno está disponible para su uso. Este Acepta una Cadena o un Búfer y devolverá un Objeto con las claves y los valores analizados.
```javascript
const dotenv = require('dotenv')
const buf = Buffer.from('BASICO=basico')
const config = dotenv.parse(buf) // devolverá un objeto
console.log(typeof config, config) // objeto { BASICO : 'basico' }
```
### Precarga
Puede usar el `--require` (`-r`) [opción de línea de comando](https://nodejs.org/api/cli.html#-r---require-module) para precargar dotenv. Al hacer esto, no necesita requerir ni cargar dotnev en el código de su aplicación.
```bash
$ node -r dotenv/config tu_script.js
```
Las opciones de configuración a continuación se admiten como argumentos de línea de comandos en el formato `dotenv_config_<option>=value`
```bash
$ node -r dotenv/config tu_script.js dotenv_config_path=/custom/path/to/.env dotenv_config_debug=true
```
Además, puede usar variables de entorno para establecer opciones de configuración. Los argumentos de línea de comandos precederán a estos.
```bash
$ DOTENV_CONFIG_<OPTION>=value node -r dotenv/config tu_script.js
```
```bash
$ DOTENV_CONFIG_ENCODING=latin1 DOTENV_CONFIG_DEBUG=true node -r dotenv/config tu_script.js dotenv_config_path=/custom/path/to/.env
```
### Expansión Variable
Necesitaras agregar el valor de otro variable en una de sus variables? Usa [dotenv-expand](https://github.com/motdotla/dotenv-expand).
## Ejemplos
Vea [ejemplos](https://github.com/dotenv-org/examples) sobre el uso de dotenv con varios frameworks, lenguajes y configuraciones.
* [nodejs](https://github.com/dotenv-org/examples/tree/master/dotenv-nodejs)
* [nodejs (depurar en)](https://github.com/dotenv-org/examples/tree/master/dotenv-nodejs-debug)
* [nodejs (anular en)](https://github.com/dotenv-org/examples/tree/master/dotenv-nodejs-override)
* [esm](https://github.com/dotenv-org/examples/tree/master/dotenv-esm)
* [esm (precarga)](https://github.com/dotenv-org/examples/tree/master/dotenv-esm-preload)
* [typescript](https://github.com/dotenv-org/examples/tree/master/dotenv-typescript)
* [typescript parse](https://github.com/dotenv-org/examples/tree/master/dotenv-typescript-parse)
* [typescript config](https://github.com/dotenv-org/examples/tree/master/dotenv-typescript-config)
* [webpack](https://github.com/dotenv-org/examples/tree/master/dotenv-webpack)
* [webpack (plugin)](https://github.com/dotenv-org/examples/tree/master/dotenv-webpack2)
* [react](https://github.com/dotenv-org/examples/tree/master/dotenv-react)
* [react (typescript)](https://github.com/dotenv-org/examples/tree/master/dotenv-react-typescript)
* [express](https://github.com/dotenv-org/examples/tree/master/dotenv-express)
* [nestjs](https://github.com/dotenv-org/examples/tree/master/dotenv-nestjs)
## Documentación
Dotenv expone dos funciones:
* `configuración`
* `analizar`
### Configuración
`Configuración` leerá su archivo `.env`, analizará el contenido, lo asignará a [`process.env`](https://nodejs.org/docs/latest/api/process.html#process_process_env),
y devolverá un Objeto con una clave `parsed` que contiene el contenido cargado o una clave `error` si falla.
```js
const result = dotenv.config()
if (result.error) {
throw result.error
}
console.log(result.parsed)
```
Adicionalmente, puede pasar opciones a `configuracion`.
#### Opciones
##### Ruta
Por defecto: `path.resolve(process.cwd(), '.env')`
Especifique una ruta personalizada si el archivo que contiene las variables de entorno se encuentra localizado en otro lugar.
```js
require('dotenv').config({ path: '/personalizado/ruta/a/.env' })
```
##### Codificación
Por defecto: `utf8`
Especifique la codificación del archivo que contiene las variables de entorno.
```js
require('dotenv').config({ encoding: 'latin1' })
```
##### Depurar
Por defecto: `false`
Active el registro de ayuda para depurar por qué ciertas claves o valores no se inician como lo esperabas.
```js
require('dotenv').config({ debug: process.env.DEBUG })
```
##### Anular
Por defecto: `false`
Anule cualquier variable de entorno que ya se haya configurada en su maquina con los valores de su archivo .env.
```js
require('dotenv').config({ override: true })
```
### Analizar
El motor que analiza el contenido del archivo que contiene las variables de entorno está disponible para su uso. Acepta una Cadena o un Búfer y retornará un objecto con los valores analizados.
```js
const dotenv = require('dotenv')
const buf = Buffer.from('BASICO=basico')
const config = dotenv.parse(buf) // devolverá un objeto
console.log(typeof config, config) // objeto { BASICO : 'basico' }
```
#### Opciones
##### Depurar
Por defecto: `false`
Active el registro de ayuda para depurar por qué ciertas claves o valores no se inician como lo esperabas.
```js
const dotenv = require('dotenv')
const buf = Buffer.from('hola mundo')
const opt = { debug: true }
const config = dotenv.parse(buf, opt)
// espere por un mensaje de depuración porque el búfer no esta listo KEY=VAL
```
## FAQ
### ¿Por qué el archivo `.env` no carga mis variables de entorno correctamente?
Lo más probable es que su archivo `.env` no esté en el lugar correcto. [Vea este stack overflow](https://stackoverflow.com/questions/42335016/dotenv-file-is-not-loading-environment-variables).
Active el modo de depuración y vuelva a intentarlo...
```js
require('dotenv').config({ debug: true })
```
Recibirá un error apropiado en su consola.
### ¿Debo confirmar mi archivo `.env`?
No. Recomendamos **enfáticamente** no enviar su archivo `.env` a la versión de control. Solo debe incluir los valores especificos del entorno, como la base de datos, contraseñas o claves API.
### ¿Debería tener multiples archivos `.env`?
No. Recomendamos **enfáticamente** no tener un archivo `.env` "principal" y un archivo `.env` de "entorno" como `.env.test`. Su configuración debe variar entre implementaciones y no debe compartir valores entre entornos.
> En una Aplicación de Doce Factores, las variables de entorno son controles diferenciados, cada uno totalmente independiente a otras variables de entorno. Nunca se agrupan como "entornos", sino que se gestionan de manera independiente para cada despliegue. Este es un modelo que se escala sin problemas a medida que la aplicación se expande de forma natural en más despliegues a lo largo de su vida.
>
> [La Apliación de los Doce Factores](https://12factor.net/es/)
### ¿Qué reglas sigue el motor de análisis?
El motor de análisis actualmente admite las siguientes reglas:
- `BASICO=basico` se convierte en `{BASICO: 'basico'}`
- las líneas vacías se saltan
- las líneas que comienzan con `#` se tratan como comentarios
- `#` marca el comienzo de un comentario (a menos que el valor esté entre comillas)
- valores vacíos se convierten en cadenas vacías (`VACIO=` se convierte en `{VACIO: ''}`)
- las comillas internas se mantienen (piensa en JSON) (`JSON={"foo": "bar"}` se convierte en `{JSON:"{\"foo\": \"bar\"}"`)
- los espacios en blanco se eliminan de ambos extremos de los valores no citanos (aprende más en [`trim`](https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)) (`FOO= algo ` se convierte en `{FOO: 'algo'}`)
- los valores entre comillas simples y dobles se escapan (`CITA_SIMPLE='citado'` se convierte en `{CITA_SIMPLE: "citado"}`)
- los valores entre comillas simples y dobles mantienen los espacios en blanco en ambos extremos (`FOO=" algo "` se convierte en `{FOO: ' algo '}`)
- los valores entre comillas dobles expanden nuevas líneas (`MULTILINEA="nueva\nlínea"` se convierte en
```
{MULTILINEA: 'nueva
línea'}
```
- se admite la comilla simple invertida (`` SIGNO_ACENTO=`Esto tiene comillas 'simples' y "dobles" en su interior.` ``)
### ¿Qué sucede con las variables de entorno que ya estaban configuradas?
Por defecto, nunca modificaremos ninguna variable de entorno que ya haya sido establecida. En particular, si hay una variable en su archivo `.env` que colisiona con una que ya existe en su entorno, entonces esa variable se omitirá.
Si por el contrario, quieres anular `process.env` utiliza la opción `override`.
```javascript
require('dotenv').config({ override: true })
```
### ¿Por qué mis variables de entorno no aparecen para React?
Su código React se ejecuta en Webpack, donde el módulo `fs` o incluso el propio `process` global no son accesibles fuera-de-la-caja. El módulo `process.env` sólo puede ser inyectado a través de la configuración de Webpack.
Si estás usando [`react-scripts`](https://www.npmjs.com/package/react-scripts), el cual se distribuye a través de [`create-react-app`](https://create-react-app.dev/), tiene dotenv incorporado pero con una singularidad. Escriba sus variables de entorno con `REACT_APP_`. Vea [este stack overflow](https://stackoverflow.com/questions/42182577/is-it-possible-to-use-dotenv-in-a-react-project) para más detalles.
Si estás utilizando otros frameworks (por ejemplo, Next.js, Gatsby...), debes consultar su documentación para saber cómo injectar variables de entorno en el cliente.
### ¿Puedo personalizar/escribir plugins para dotenv?
Sí! `dotenv.config()` devuelve un objeto que representa el archivo `.env` analizado. Esto te da todo lo que necesitas para poder establecer valores en `process.env`. Por ejemplo:
```js
const dotenv = require('dotenv')
const variableExpansion = require('dotenv-expand')
const miEnv = dotenv.config()
variableExpansion(miEnv)
```
### Cómo uso dotnev con `import`?
Simplemente..
```javascript
// index.mjs (ESM)
import * as dotenv from 'dotenv' // vea https://github.com/motdotla/dotenv#como-uso-dotenv-con-import
dotenv.config()
import express from 'express'
```
Un poco de historia...
> Cuando se ejecuta un módulo que contiene una sentencia `import`, los módulos que importa serán cargados primero, y luego se ejecuta cada bloque del módulo en un recorrido en profundidad del gráfico de dependencias, evitando los ciclos al saltarse todo lo que ya se ha ejecutado.
>
> [ES6 en Profundidad: Módulos](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/)
¿Qué significa esto en lenguaje sencillo? Significa que se podrías pensar que lo siguiente funcionaría pero no lo hará.
```js
// notificarError.mjs
import { Cliente } from 'mejor-servicio-para-notificar-error'
export default new Client(process.env.CLAVE_API)
// index.mjs
import dotenv from 'dotenv'
dotenv.config()
import notificarError from './notificarError.mjs'
notificarError.report(new Error('ejemplo documentado'))
```
`process.env.CLAVE_API` será vacio.
En su lugar, el código anterior debe ser escrito como...
```js
// notificarError.mjs
import { Cliente } from 'mejor-servicio-para-notificar-errores'
export default new Client(process.env.CLAVE_API)
// index.mjs
import * as dotenv from 'dotenv'
dotenv.config()
import notificarError from './notificarError.mjs'
notificarError.report(new Error('ejemplo documentado'))
```
¿Esto tiene algo de sentido? Esto es poco poco intuitivo, pero es como funciona la importación de módulos en ES6. Aquí hay un ejemplo [ejemplo práctico de esta trampa](https://github.com/dotenv-org/examples/tree/master/dotenv-es6-import-pitfall).
Existen dos arternativas a este planteamiento:
1. Precarga dotenv: `node --require dotenv/config index.js` (_Nota: no es necesario usar `import` dotenv con este método_)
2. Cree un archivo separado que ejecutará `config` primero como se describe en [este comentario #133](https://github.com/motdotla/dotenv/issues/133#issuecomment-255298822)
### ¿Qué pasa con la expansión de variable?
Prueba [dotenv-expand](https://github.com/motdotla/dotenv-expand)
## Guía de contribución
Vea [CONTRIBUTING.md](CONTRIBUTING.md)
## REGISTRO DE CAMBIOS
Vea [CHANGELOG.md](CHANGELOG.md)
## ¿Quiénes utilizan dotenv?
[Estos módulos npm dependen de él.](https://www.npmjs.com/browse/depended/dotenv)
Los proyectos que lo amplían suelen utilizar la [palabra clave "dotenv" en npm](https://www.npmjs.com/search?q=keywords:dotenv).

View File

@@ -0,0 +1,148 @@
import { NoopCache } from "../cache/core/index.js";
import { entityKind } from "../entity.js";
import { NoopLogger } from "../logger.js";
import { PgTransaction } from "../pg-core/index.js";
import { PgPreparedQuery, PgSession } from "../pg-core/session.js";
import { fillPlaceholders } from "../sql/sql.js";
import { tracer } from "../tracing.js";
import { mapResultRow } from "../utils.js";
class PostgresJsPreparedQuery extends PgPreparedQuery {
constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, _isResponseInArrayMode, customResultMapper) {
super({ sql: queryString, params }, cache, queryMetadata, cacheConfig);
this.client = client;
this.queryString = queryString;
this.params = params;
this.logger = logger;
this.fields = fields;
this._isResponseInArrayMode = _isResponseInArrayMode;
this.customResultMapper = customResultMapper;
}
static [entityKind] = "PostgresJsPreparedQuery";
async execute(placeholderValues = {}) {
return tracer.startActiveSpan("drizzle.execute", async (span) => {
const params = fillPlaceholders(this.params, placeholderValues);
span?.setAttributes({
"drizzle.query.text": this.queryString,
"drizzle.query.params": JSON.stringify(params)
});
this.logger.logQuery(this.queryString, params);
const { fields, queryString: query, client, joinsNotNullableMap, customResultMapper } = this;
if (!fields && !customResultMapper) {
return tracer.startActiveSpan("drizzle.driver.execute", () => {
return this.queryWithCache(query, params, async () => {
return await client.unsafe(query, params);
});
});
}
const rows = await tracer.startActiveSpan("drizzle.driver.execute", () => {
span?.setAttributes({
"drizzle.query.text": query,
"drizzle.query.params": JSON.stringify(params)
});
return this.queryWithCache(query, params, async () => {
return await client.unsafe(query, params).values();
});
});
return tracer.startActiveSpan("drizzle.mapResponse", () => {
return customResultMapper ? customResultMapper(rows) : rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
});
});
}
all(placeholderValues = {}) {
return tracer.startActiveSpan("drizzle.execute", async (span) => {
const params = fillPlaceholders(this.params, placeholderValues);
span?.setAttributes({
"drizzle.query.text": this.queryString,
"drizzle.query.params": JSON.stringify(params)
});
this.logger.logQuery(this.queryString, params);
return tracer.startActiveSpan("drizzle.driver.execute", () => {
span?.setAttributes({
"drizzle.query.text": this.queryString,
"drizzle.query.params": JSON.stringify(params)
});
return this.queryWithCache(this.queryString, params, async () => {
return this.client.unsafe(this.queryString, params);
});
});
});
}
/** @internal */
isResponseInArrayMode() {
return this._isResponseInArrayMode;
}
}
class PostgresJsSession extends PgSession {
constructor(client, dialect, schema, options = {}) {
super(dialect);
this.client = client;
this.schema = schema;
this.options = options;
this.logger = options.logger ?? new NoopLogger();
this.cache = options.cache ?? new NoopCache();
}
static [entityKind] = "PostgresJsSession";
logger;
cache;
prepareQuery(query, fields, name, isResponseInArrayMode, customResultMapper, queryMetadata, cacheConfig) {
return new PostgresJsPreparedQuery(
this.client,
query.sql,
query.params,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
isResponseInArrayMode,
customResultMapper
);
}
query(query, params) {
this.logger.logQuery(query, params);
return this.client.unsafe(query, params).values();
}
queryObjects(query, params) {
return this.client.unsafe(query, params);
}
transaction(transaction, config) {
return this.client.begin(async (client) => {
const session = new PostgresJsSession(
client,
this.dialect,
this.schema,
this.options
);
const tx = new PostgresJsTransaction(this.dialect, session, this.schema);
if (config) {
await tx.setTransaction(config);
}
return transaction(tx);
});
}
}
class PostgresJsTransaction extends PgTransaction {
constructor(dialect, session, schema, nestedIndex = 0) {
super(dialect, session, schema, nestedIndex);
this.session = session;
}
static [entityKind] = "PostgresJsTransaction";
transaction(transaction) {
return this.session.client.savepoint((client) => {
const session = new PostgresJsSession(
client,
this.dialect,
this.schema,
this.session.options
);
const tx = new PostgresJsTransaction(this.dialect, session, this.schema);
return transaction(tx);
});
}
}
export {
PostgresJsPreparedQuery,
PostgresJsSession,
PostgresJsTransaction
};
//# sourceMappingURL=session.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sanitizeSelectParam.d.ts","sourceRoot":"","sources":["../../src/utilities/sanitizeSelectParam.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAEnD;;GAEG;AACH,eAAO,MAAM,mBAAmB,sBAAuB,OAAO,KAAG,UAAU,GAAG,SAe7E,CAAA"}

View File

@@ -0,0 +1,100 @@
"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);
var selection_proxy_exports = {};
__export(selection_proxy_exports, {
SelectionProxyHandler: () => SelectionProxyHandler
});
module.exports = __toCommonJS(selection_proxy_exports);
var import_alias = require("./alias.cjs");
var import_column = require("./column.cjs");
var import_entity = require("./entity.cjs");
var import_sql = require("./sql/sql.cjs");
var import_subquery = require("./subquery.cjs");
var import_view_common = require("./view-common.cjs");
class SelectionProxyHandler {
static [import_entity.entityKind] = "SelectionProxyHandler";
config;
constructor(config) {
this.config = { ...config };
}
get(subquery, prop) {
if (prop === "_") {
return {
...subquery["_"],
selectedFields: new Proxy(
subquery._.selectedFields,
this
)
};
}
if (prop === import_view_common.ViewBaseConfig) {
return {
...subquery[import_view_common.ViewBaseConfig],
selectedFields: new Proxy(
subquery[import_view_common.ViewBaseConfig].selectedFields,
this
)
};
}
if (typeof prop === "symbol") {
return subquery[prop];
}
const columns = (0, import_entity.is)(subquery, import_subquery.Subquery) ? subquery._.selectedFields : (0, import_entity.is)(subquery, import_sql.View) ? subquery[import_view_common.ViewBaseConfig].selectedFields : subquery;
const value = columns[prop];
if ((0, import_entity.is)(value, import_sql.SQL.Aliased)) {
if (this.config.sqlAliasedBehavior === "sql" && !value.isSelectionField) {
return value.sql;
}
const newValue = value.clone();
newValue.isSelectionField = true;
return newValue;
}
if ((0, import_entity.is)(value, import_sql.SQL)) {
if (this.config.sqlBehavior === "sql") {
return value;
}
throw new Error(
`You tried to reference "${prop}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`
);
}
if ((0, import_entity.is)(value, import_column.Column)) {
if (this.config.alias) {
return new Proxy(
value,
new import_alias.ColumnAliasProxyHandler(
new Proxy(
value.table,
new import_alias.TableAliasProxyHandler(this.config.alias, this.config.replaceOriginalName ?? false)
)
)
);
}
return value;
}
if (typeof value !== "object" || value === null) {
return value;
}
return new Proxy(value, new SelectionProxyHandler(this.config));
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
SelectionProxyHandler
});
//# sourceMappingURL=selection-proxy.cjs.map

View File

@@ -0,0 +1,20 @@
# Writing tests
Undici is tuned for a production use case and its default will keep
a socket open for a few seconds after an HTTP request is completed to
remove the overhead of opening up a new socket. These settings that makes
Undici shine in production are not a good fit for using Undici in automated
tests, as it will result in longer execution times.
The following are good defaults that will keep the socket open for only 10ms:
```js
import { request, setGlobalDispatcher, Agent } from 'undici'
const agent = new Agent({
keepAliveTimeout: 10, // milliseconds
keepAliveMaxTimeout: 10 // milliseconds
})
setGlobalDispatcher(agent)
```

View File

@@ -0,0 +1,27 @@
"use strict";
exports.et = void 0;
var _index = require("./et/_lib/formatDistance.js");
var _index2 = require("./et/_lib/formatLong.js");
var _index3 = require("./et/_lib/formatRelative.js");
var _index4 = require("./et/_lib/localize.js");
var _index5 = require("./et/_lib/match.js");
/**
* @category Locales
* @summary Estonian locale.
* @language Estonian
* @iso-639-2 est
* @author Priit Hansen [@HansenPriit](https://github.com/priithansen)
*/
const et = (exports.et = {
code: "et",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
});

View File

@@ -0,0 +1,12 @@
/**
* The base implementation of `_.isNaN` without support for number objects.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
function baseIsNaN(value) {
return value !== value;
}
module.exports = baseIsNaN;

View File

@@ -0,0 +1 @@
{"version":3,"file":"permissions.js","names":[],"sources":["../../../../src/rest/commands/read/permissions.ts"],"sourcesContent":["import type { DirectusPermission } from '../../../schema/permission.js';\nimport type { AllCollections, ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadPermissionOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusPermission<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\nexport type ReadItemPermissionsOutput = {\n\tupdate: { access: boolean; presets?: Record<string, any> | null; fields?: string[] | null };\n\tdelete: { access: boolean };\n\tshare: { access: boolean };\n};\n\nexport type ReadUserPermissionsOutput = Record<\n\tstring,\n\tRecord<\n\t\t'create' | 'update' | 'delete' | 'read' | 'share',\n\t\t{\n\t\t\taccess: 'none' | 'partial' | 'full';\n\t\t\tfields?: string[];\n\t\t\tpresets?: Record<string, any>;\n\t\t}\n\t>\n>;\n\n/**\n * List all Permissions that exist in Directus.\n * @param query The query parameters\n * @returns An array of up to limit Permission objects. If no items are available, data will be an empty array.\n */\nexport const readPermissions =\n\t<Schema, const TQuery extends Query<Schema, DirectusPermission<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadPermissionOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/permissions`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List all Permissions that exist in Directus.\n * @param key The primary key of the permission\n * @param query The query parameters\n * @returns Returns a Permission object if a valid primary key was provided.\n * @throws Will throw if key is empty\n */\nexport const readPermission =\n\t<Schema, const TQuery extends Query<Schema, DirectusPermission<Schema>>>(\n\t\tkey: DirectusPermission<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadPermissionOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/permissions/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n\n/**\n * Check the current user's permissions on a specific item.\n * @param collection The collection of the item\n * @param key The primary key of the item\n * @returns Returns a ItemPermissions object if a valid collection / primary key was provided.\n */\nexport const readItemPermissions =\n\t<Schema, Collection extends AllCollections<Schema>>(\n\t\tcollection: Collection,\n\t\tkey?: string | number,\n\t): RestCommand<ReadItemPermissionsOutput, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(collection), 'Collection cannot be empty');\n\n\t\tconst item = key ? `${collection as string}/${key}` : `${collection as string}`;\n\n\t\treturn {\n\t\t\tpath: `/permissions/me/${item}`,\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n\n/**\n * Check the current user's permissions.\n */\nexport const readUserPermissions =\n\t<Schema>(): RestCommand<ReadUserPermissionsOutput, Schema> =>\n\t() => ({\n\t\tpath: `/permissions/me`,\n\t\tmethod: 'GET',\n\t});\n"],"mappings":"6DAkCA,MAAa,EAEX,QAEM,CACN,KAAM,eACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASW,GAEX,EACA,SAGA,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,gBAAgB,IACtB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASU,GAEX,EACA,SAGA,EAAa,OAAO,EAAW,CAAE,6BAA6B,CAIvD,CACN,KAAM,mBAHM,EAAM,GAAG,EAAqB,GAAG,IAAQ,GAAG,MAIxD,OAAQ,MACR,EAMU,WAEL,CACN,KAAM,kBACN,OAAQ,MACR"}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_gatherSequenceExpressions","require","toSequenceExpression","nodes","scope","length","declars","result","gatherSequenceExpressions","declar","push"],"sources":["../../src/converters/toSequenceExpression.ts"],"sourcesContent":["// TODO(Babel 8) Remove this file\nif (process.env.BABEL_8_BREAKING && process.env.IS_PUBLISH) {\n throw new Error(\n \"Internal Babel error: This file should only be loaded in Babel 7\",\n );\n}\n\nimport gatherSequenceExpressions from \"./gatherSequenceExpressions.ts\";\nimport type * as t from \"../index.ts\";\nimport type { DeclarationInfo } from \"./gatherSequenceExpressions.ts\";\n\n/**\n * Turn an array of statement `nodes` into a `SequenceExpression`.\n *\n * Variable declarations are turned into simple assignments and their\n * declarations hoisted to the top of the current scope.\n *\n * Expression statements are just resolved to their expression.\n */\nexport default function toSequenceExpression(\n nodes: readonly t.Node[],\n scope: any,\n): t.SequenceExpression | undefined {\n if (!nodes?.length) return;\n\n const declars: DeclarationInfo[] = [];\n const result = gatherSequenceExpressions(nodes, declars);\n if (!result) return;\n\n for (const declar of declars) {\n scope.push(declar);\n }\n\n // @ts-expect-error fixme: gatherSequenceExpressions will return an Expression when there are only one element\n return result;\n}\n"],"mappings":";;;;;;AAOA,IAAAA,0BAAA,GAAAC,OAAA;AAYe,SAASC,oBAAoBA,CAC1CC,KAAwB,EACxBC,KAAU,EACwB;EAClC,IAAI,EAACD,KAAK,YAALA,KAAK,CAAEE,MAAM,GAAE;EAEpB,MAAMC,OAA0B,GAAG,EAAE;EACrC,MAAMC,MAAM,GAAG,IAAAC,kCAAyB,EAACL,KAAK,EAAEG,OAAO,CAAC;EACxD,IAAI,CAACC,MAAM,EAAE;EAEb,KAAK,MAAME,MAAM,IAAIH,OAAO,EAAE;IAC5BF,KAAK,CAACM,IAAI,CAACD,MAAM,CAAC;EACpB;EAGA,OAAOF,MAAM;AACf","ignoreList":[]}

View File

@@ -0,0 +1,137 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.segmentGraphemes = exports.parseTextBounds = exports.TextBounds = void 0;
var css_line_break_1 = require("css-line-break");
var text_segmentation_1 = require("text-segmentation");
var bounds_1 = require("./bounds");
var features_1 = require("../../core/features");
var TextBounds = /** @class */ (function () {
function TextBounds(text, bounds) {
this.text = text;
this.bounds = bounds;
}
return TextBounds;
}());
exports.TextBounds = TextBounds;
var parseTextBounds = function (context, value, styles, node) {
var textList = breakText(value, styles);
var textBounds = [];
var offset = 0;
textList.forEach(function (text) {
if (styles.textDecorationLine.length || text.trim().length > 0) {
if (features_1.FEATURES.SUPPORT_RANGE_BOUNDS) {
var clientRects = createRange(node, offset, text.length).getClientRects();
if (clientRects.length > 1) {
var subSegments = exports.segmentGraphemes(text);
var subOffset_1 = 0;
subSegments.forEach(function (subSegment) {
textBounds.push(new TextBounds(subSegment, bounds_1.Bounds.fromDOMRectList(context, createRange(node, subOffset_1 + offset, subSegment.length).getClientRects())));
subOffset_1 += subSegment.length;
});
}
else {
textBounds.push(new TextBounds(text, bounds_1.Bounds.fromDOMRectList(context, clientRects)));
}
}
else {
var replacementNode = node.splitText(text.length);
textBounds.push(new TextBounds(text, getWrapperBounds(context, node)));
node = replacementNode;
}
}
else if (!features_1.FEATURES.SUPPORT_RANGE_BOUNDS) {
node = node.splitText(text.length);
}
offset += text.length;
});
return textBounds;
};
exports.parseTextBounds = parseTextBounds;
var getWrapperBounds = function (context, node) {
var ownerDocument = node.ownerDocument;
if (ownerDocument) {
var wrapper = ownerDocument.createElement('html2canvaswrapper');
wrapper.appendChild(node.cloneNode(true));
var parentNode = node.parentNode;
if (parentNode) {
parentNode.replaceChild(wrapper, node);
var bounds = bounds_1.parseBounds(context, wrapper);
if (wrapper.firstChild) {
parentNode.replaceChild(wrapper.firstChild, wrapper);
}
return bounds;
}
}
return bounds_1.Bounds.EMPTY;
};
var createRange = function (node, offset, length) {
var ownerDocument = node.ownerDocument;
if (!ownerDocument) {
throw new Error('Node has no owner document');
}
var range = ownerDocument.createRange();
range.setStart(node, offset);
range.setEnd(node, offset + length);
return range;
};
var segmentGraphemes = function (value) {
if (features_1.FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var segmenter = new Intl.Segmenter(void 0, { granularity: 'grapheme' });
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; });
}
return text_segmentation_1.splitGraphemes(value);
};
exports.segmentGraphemes = segmentGraphemes;
var segmentWords = function (value, styles) {
if (features_1.FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
var segmenter = new Intl.Segmenter(void 0, {
granularity: 'word'
});
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return Array.from(segmenter.segment(value)).map(function (segment) { return segment.segment; });
}
return breakWords(value, styles);
};
var breakText = function (value, styles) {
return styles.letterSpacing !== 0 ? exports.segmentGraphemes(value) : segmentWords(value, styles);
};
// https://drafts.csswg.org/css-text/#word-separator
var wordSeparators = [0x0020, 0x00a0, 0x1361, 0x10100, 0x10101, 0x1039, 0x1091];
var breakWords = function (str, styles) {
var breaker = css_line_break_1.LineBreaker(str, {
lineBreak: styles.lineBreak,
wordBreak: styles.overflowWrap === "break-word" /* BREAK_WORD */ ? 'break-word' : styles.wordBreak
});
var words = [];
var bk;
var _loop_1 = function () {
if (bk.value) {
var value = bk.value.slice();
var codePoints = css_line_break_1.toCodePoints(value);
var word_1 = '';
codePoints.forEach(function (codePoint) {
if (wordSeparators.indexOf(codePoint) === -1) {
word_1 += css_line_break_1.fromCodePoint(codePoint);
}
else {
if (word_1.length) {
words.push(word_1);
}
words.push(css_line_break_1.fromCodePoint(codePoint));
word_1 = '';
}
});
if (word_1.length) {
words.push(word_1);
}
}
};
while (!(bk = breaker.next()).done) {
_loop_1();
}
return words;
};
//# sourceMappingURL=text.js.map

View File

@@ -0,0 +1,45 @@
var arrayFilter = require('./_arrayFilter'),
arrayMap = require('./_arrayMap'),
baseProperty = require('./_baseProperty'),
baseTimes = require('./_baseTimes'),
isArrayLikeObject = require('./isArrayLikeObject');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* This method is like `_.zip` except that it accepts an array of grouped
* elements and creates an array regrouping the elements to their pre-zip
* configuration.
*
* @static
* @memberOf _
* @since 1.2.0
* @category Array
* @param {Array} array The array of grouped elements to process.
* @returns {Array} Returns the new array of regrouped elements.
* @example
*
* var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
* // => [['a', 1, true], ['b', 2, false]]
*
* _.unzip(zipped);
* // => [['a', 'b'], [1, 2], [true, false]]
*/
function unzip(array) {
if (!(array && array.length)) {
return [];
}
var length = 0;
array = arrayFilter(array, function(group) {
if (isArrayLikeObject(group)) {
length = nativeMax(group.length, length);
return true;
}
});
return baseTimes(length, function(index) {
return arrayMap(array, baseProperty(index));
});
}
module.exports = unzip;

View File

@@ -0,0 +1,37 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Haijie Xie @hai-x
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const Template = require("../Template");
/**
* @param {string} type unique identifier used for HMR runtime properties
* @returns {string} HMR runtime code
*/
const generateJavascriptHMR = (type) =>
Template.getFunctionContent(
require("../hmr/JavascriptHotModuleReplacement.runtime")
)
.replace(/\$key\$/g, type)
.replace(/\$installedChunks\$/g, "installedChunks")
.replace(/\$loadUpdateChunk\$/g, "loadUpdateChunk")
.replace(/\$moduleCache\$/g, RuntimeGlobals.moduleCache)
.replace(/\$moduleFactories\$/g, RuntimeGlobals.moduleFactories)
.replace(/\$ensureChunkHandlers\$/g, RuntimeGlobals.ensureChunkHandlers)
.replace(/\$hasOwnProperty\$/g, RuntimeGlobals.hasOwnProperty)
.replace(/\$hmrModuleData\$/g, RuntimeGlobals.hmrModuleData)
.replace(
/\$hmrDownloadUpdateHandlers\$/g,
RuntimeGlobals.hmrDownloadUpdateHandlers
)
.replace(
/\$hmrInvalidateModuleHandlers\$/g,
RuntimeGlobals.hmrInvalidateModuleHandlers
);
module.exports.generateJavascriptHMR = generateJavascriptHMR;

View File

@@ -0,0 +1,180 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["Ք", "Մ"],
abbreviated: ["ՔԱ", "ՄԹ"],
wide: ["Քրիստոսից առաջ", "Մեր թվարկության"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Ք1", "Ք2", "Ք3", "Ք4"],
wide: ["1֊ին քառորդ", "2֊րդ քառորդ", "3֊րդ քառորդ", "4֊րդ քառորդ"],
};
const monthValues = {
narrow: ["Հ", "Փ", "Մ", "Ա", "Մ", "Հ", "Հ", "Օ", "Ս", "Հ", "Ն", "Դ"],
abbreviated: [
"հուն",
"փետ",
"մար",
"ապր",
"մայ",
"հուն",
"հուլ",
"օգս",
"սեպ",
"հոկ",
"նոյ",
"դեկ",
],
wide: [
"հունվար",
"փետրվար",
"մարտ",
"ապրիլ",
"մայիս",
"հունիս",
"հուլիս",
"օգոստոս",
"սեպտեմբեր",
"հոկտեմբեր",
"նոյեմբեր",
"դեկտեմբեր",
],
};
const dayValues = {
narrow: ["Կ", "Ե", "Ե", "Չ", "Հ", "Ո", "Շ"],
short: ["կր", "եր", "եք", "չք", "հգ", "ուր", "շբ"],
abbreviated: ["կիր", "երկ", "երք", "չոր", "հնգ", "ուրբ", "շաբ"],
wide: [
"կիրակի",
"երկուշաբթի",
"երեքշաբթի",
"չորեքշաբթի",
"հինգշաբթի",
"ուրբաթ",
"շաբաթ",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "կեսգշ",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "կեսգիշեր",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "կեսգիշեր",
noon: "կեսօր",
morning: "առավոտ",
afternoon: "ցերեկ",
evening: "երեկո",
night: "գիշեր",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "կեսգշ",
noon: "կեսօր",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "կեսգիշերին",
noon: "կեսօրին",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "կեսգիշերին",
noon: "կեսօրին",
morning: "առավոտը",
afternoon: "ցերեկը",
evening: "երեկոյան",
night: "գիշերը",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
// If ordinal numbers depend on context, for example,
// if they are different for different grammatical genders,
// use `options.unit`.
//
// `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
// 'day', 'hour', 'minute', 'second'.
const rem100 = number % 100;
if (rem100 < 10) {
if (rem100 % 10 === 1) {
return number + "֊ին";
}
}
return number + "֊րդ";
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/singlestore-core/columns/all.ts"],"sourcesContent":["import { bigint } from './bigint.ts';\nimport { binary } from './binary.ts';\nimport { boolean } from './boolean.ts';\nimport { char } from './char.ts';\nimport { customType } from './custom.ts';\nimport { date } from './date.ts';\nimport { datetime } from './datetime.ts';\nimport { decimal } from './decimal.ts';\nimport { double } from './double.ts';\nimport { singlestoreEnum } from './enum.ts';\nimport { float } from './float.ts';\nimport { int } from './int.ts';\nimport { json } from './json.ts';\nimport { mediumint } from './mediumint.ts';\nimport { real } from './real.ts';\nimport { serial } from './serial.ts';\nimport { smallint } from './smallint.ts';\nimport { longtext, mediumtext, text, tinytext } from './text.ts';\nimport { time } from './time.ts';\nimport { timestamp } from './timestamp.ts';\nimport { tinyint } from './tinyint.ts';\nimport { varbinary } from './varbinary.ts';\nimport { varchar } from './varchar.ts';\nimport { vector } from './vector.ts';\nimport { year } from './year.ts';\n\nexport function getSingleStoreColumnBuilders() {\n\treturn {\n\t\tbigint,\n\t\tbinary,\n\t\tboolean,\n\t\tchar,\n\t\tcustomType,\n\t\tdate,\n\t\tdatetime,\n\t\tdecimal,\n\t\tdouble,\n\t\tsinglestoreEnum,\n\t\tfloat,\n\t\tint,\n\t\tjson,\n\t\tmediumint,\n\t\treal,\n\t\tserial,\n\t\tsmallint,\n\t\tlongtext,\n\t\tmediumtext,\n\t\ttext,\n\t\ttinytext,\n\t\ttime,\n\t\ttimestamp,\n\t\ttinyint,\n\t\tvarbinary,\n\t\tvarchar,\n\t\tvector,\n\t\tyear,\n\t};\n}\n\nexport type SingleStoreColumnBuilders = ReturnType<typeof getSingleStoreColumnBuilders>;\n"],"mappings":"AAAA,SAAS,cAAc;AACvB,SAAS,cAAc;AACvB,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,gBAAgB;AACzB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,uBAAuB;AAChC,SAAS,aAAa;AACtB,SAAS,WAAW;AACpB,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,gBAAgB;AACzB,SAAS,UAAU,YAAY,MAAM,gBAAgB;AACrD,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,YAAY;AAEd,SAAS,+BAA+B;AAC9C,SAAO;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":[]}

View File

@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Popsicle = createLucideIcon("Popsicle", [
[
"path",
{
d: "M18.6 14.4c.8-.8.8-2 0-2.8l-8.1-8.1a4.95 4.95 0 1 0-7.1 7.1l8.1 8.1c.9.7 2.1.7 2.9-.1Z",
key: "1o68ps"
}
],
["path", { d: "m22 22-5.5-5.5", key: "17o70y" }]
]);
export { Popsicle as default };
//# sourceMappingURL=popsicle.js.map

View File

@@ -0,0 +1,52 @@
import { defineIntegration, _INTERNAL_copyFlagsFromScopeToEvent, _INTERNAL_insertFlagToScope, _INTERNAL_addFeatureFlagToActiveSpan } from '@sentry/core';
/**
* Sentry integration for capturing feature flag evaluations from LaunchDarkly.
*
* See the [feature flag documentation](https://develop.sentry.dev/sdk/expected-features/#feature-flags) for more information.
*
* @example
* ```
* import * as Sentry from '@sentry/browser';
* import {launchDarklyIntegration, buildLaunchDarklyFlagUsedInspector} from '@sentry/browser';
* import * as LaunchDarkly from 'launchdarkly-js-client-sdk';
*
* Sentry.init(..., integrations: [launchDarklyIntegration()])
* const ldClient = LaunchDarkly.initialize(..., {inspectors: [buildLaunchDarklyFlagUsedHandler()]});
* ```
*/
const launchDarklyIntegration = defineIntegration(() => {
return {
name: 'LaunchDarkly',
processEvent(event, _hint, _client) {
return _INTERNAL_copyFlagsFromScopeToEvent(event);
},
};
}) ;
/**
* LaunchDarkly hook to listen for and buffer flag evaluations. This needs to
* be registered as an 'inspector' in LaunchDarkly initialize() options,
* separately from `launchDarklyIntegration`. Both the hook and the integration
* are needed to capture LaunchDarkly flags.
*/
function buildLaunchDarklyFlagUsedHandler() {
return {
name: 'sentry-flag-auditor',
type: 'flag-used',
synchronous: true,
/**
* Handle a flag evaluation by storing its name and value on the current scope.
*/
method: (flagKey, flagDetail, _context) => {
_INTERNAL_insertFlagToScope(flagKey, flagDetail.value);
_INTERNAL_addFeatureFlagToActiveSpan(flagKey, flagDetail.value);
},
};
}
export { buildLaunchDarklyFlagUsedHandler, launchDarklyIntegration };
//# sourceMappingURL=integration.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../../src/integrations/mcp-server/attributes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,qDAAqD;AACrD,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAE3D,kFAAkF;AAClF,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAEzD,iCAAiC;AACjC,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAEzD,kDAAkD;AAClD,eAAO,MAAM,uBAAuB,kBAAkB,CAAC;AAMvD,yCAAyC;AACzC,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAE3D,kDAAkD;AAClD,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAE7D,4CAA4C;AAC5C,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AAMjE,yCAAyC;AACzC,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAE3D,kDAAkD;AAClD,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAE7D,4CAA4C;AAC5C,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AAEjE,+CAA+C;AAC/C,eAAO,MAAM,8BAA8B,yBAAyB,CAAC;AAMrE,oCAAoC;AACpC,eAAO,MAAM,uBAAuB,kBAAkB,CAAC;AAEvD,sCAAsC;AACtC,eAAO,MAAM,0BAA0B,qBAAqB,CAAC;AAE7D,kCAAkC;AAClC,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAM3D,oDAAoD;AACpD,eAAO,MAAM,kCAAkC,6BAA6B,CAAC;AAE7E,iDAAiD;AACjD,eAAO,MAAM,uCAAuC,kCAAkC,CAAC;AAEvF,4CAA4C;AAC5C,eAAO,MAAM,iCAAiC,4BAA4B,CAAC;AAE3E,uEAAuE;AACvE,eAAO,MAAM,sBAAsB,oBAAoB,CAAC;AAMxD,uCAAuC;AACvC,eAAO,MAAM,uCAAuC,kCAAkC,CAAC;AAEvF,8CAA8C;AAC9C,eAAO,MAAM,yCAAyC,oCAAoC,CAAC;AAE3F,4EAA4E;AAC5E,eAAO,MAAM,wCAAwC,mCAAmC,CAAC;AAEzF,+EAA+E;AAC/E,eAAO,MAAM,2CAA2C,sCAAsC,CAAC;AAE/F,yEAAyE;AACzE,eAAO,MAAM,wBAAwB,sBAAsB,CAAC;AAM5D,+DAA+D;AAC/D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAM3D,2CAA2C;AAC3C,eAAO,MAAM,2BAA2B,sBAAsB,CAAC;AAE/D,6CAA6C;AAC7C,eAAO,MAAM,4BAA4B,uBAAuB,CAAC;AAEjE,sCAAsC;AACtC,eAAO,MAAM,+BAA+B,0BAA0B,CAAC;AAEvE,0BAA0B;AAC1B,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AAMnE,mCAAmC;AACnC,eAAO,MAAM,2BAA2B,sBAAsB,CAAC;AAE/D,4CAA4C;AAC5C,eAAO,MAAM,kCAAkC,6BAA6B,CAAC;AAE7E,6HAA6H;AAC7H,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AAEzD,yBAAyB;AACzB,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AAMnD,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,0CAA0C,sCAAsC,CAAC;AAE9F;;;GAGG;AACH,eAAO,MAAM,0CAA0C,sCAAsC,CAAC;AAE9F,iDAAiD;AACjD,eAAO,MAAM,yBAAyB,6BAA6B,CAAC;AAEpE,qDAAqD;AACrD,eAAO,MAAM,6BAA6B,0BAA0B,CAAC;AAErE,8CAA8C;AAC9C,eAAO,MAAM,sBAAsB,UAAU,CAAC"}

View File

@@ -0,0 +1,27 @@
import { entityKind } from "../../entity.js";
import { GelColumn, GelColumnBuilder } from "./common.js";
class GelBooleanBuilder extends GelColumnBuilder {
static [entityKind] = "GelBooleanBuilder";
constructor(name) {
super(name, "boolean", "GelBoolean");
}
/** @internal */
build(table) {
return new GelBoolean(table, this.config);
}
}
class GelBoolean extends GelColumn {
static [entityKind] = "GelBoolean";
getSQLType() {
return "boolean";
}
}
function boolean(name) {
return new GelBooleanBuilder(name ?? "");
}
export {
GelBoolean,
GelBooleanBuilder,
boolean
};
//# sourceMappingURL=boolean.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"alarm-plus.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,33 @@
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.ImageElementContainer = void 0;
var element_container_1 = require("../element-container");
var ImageElementContainer = /** @class */ (function (_super) {
__extends(ImageElementContainer, _super);
function ImageElementContainer(context, img) {
var _this = _super.call(this, context, img) || this;
_this.src = img.currentSrc || img.src;
_this.intrinsicWidth = img.naturalWidth;
_this.intrinsicHeight = img.naturalHeight;
_this.context.cache.addImage(_this.src);
return _this;
}
return ImageElementContainer;
}(element_container_1.ElementContainer));
exports.ImageElementContainer = ImageElementContainer;
//# sourceMappingURL=image-element-container.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"attributes.js","sourceRoot":"","sources":["../../../src/common/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAA8B,MAAM,oBAAoB,CAAC;AAEtE,MAAM,UAAU,kBAAkB,CAAC,UAAmB;IACpD,MAAM,GAAG,GAAe,EAAE,CAAC;IAE3B,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,IAAI,IAAI,EAAE;QACxD,OAAO,GAAG,CAAC;KACZ;IAED,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE;QAC5B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE;YAC1D,SAAS;SACV;QACD,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE;YACxB,IAAI,CAAC,IAAI,CAAC,0BAA0B,GAAG,EAAE,CAAC,CAAC;YAC3C,SAAS;SACV;QACD,MAAM,GAAG,GAAI,UAAsC,CAAC,GAAG,CAAC,CAAC;QACzD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE;YAC1B,IAAI,CAAC,IAAI,CAAC,wCAAwC,GAAG,EAAE,CAAC,CAAC;YACzD,SAAS;SACV;QACD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACtB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,KAAK,EAAE,CAAC;SACxB;aAAM;YACL,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;SAChB;KACF;IAED,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,EAAE,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,IAAI,GAAG,IAAI,IAAI,EAAE;QACf,OAAO,IAAI,CAAC;KACb;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;QACtB,OAAO,gCAAgC,CAAC,GAAG,CAAC,CAAC;KAC9C;IAED,OAAO,kCAAkC,CAAC,OAAO,GAAG,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,gCAAgC,CAAC,GAAc;IACtD,IAAI,IAAwB,CAAC;IAE7B,KAAK,MAAM,OAAO,IAAI,GAAG,EAAE;QACzB,sCAAsC;QACtC,IAAI,OAAO,IAAI,IAAI;YAAE,SAAS;QAC9B,MAAM,WAAW,GAAG,OAAO,OAAO,CAAC;QAEnC,IAAI,WAAW,KAAK,IAAI,EAAE;YACxB,SAAS;SACV;QAED,IAAI,CAAC,IAAI,EAAE;YACT,IAAI,kCAAkC,CAAC,WAAW,CAAC,EAAE;gBACnD,IAAI,GAAG,WAAW,CAAC;gBACnB,SAAS;aACV;YACD,mCAAmC;YACnC,OAAO,KAAK,CAAC;SACd;QAED,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,kCAAkC,CAAC,OAAe;IACzD,QAAQ,OAAO,EAAE;QACf,KAAK,QAAQ,CAAC;QACd,KAAK,SAAS,CAAC;QACf,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC;KACf;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag, AttributeValue, Attributes } from '@opentelemetry/api';\n\nexport function sanitizeAttributes(attributes: unknown): Attributes {\n const out: Attributes = {};\n\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n\n for (const key in attributes) {\n if (!Object.prototype.hasOwnProperty.call(attributes, key)) {\n continue;\n }\n if (!isAttributeKey(key)) {\n diag.warn(`Invalid attribute key: ${key}`);\n continue;\n }\n const val = (attributes as Record<string, unknown>)[key];\n if (!isAttributeValue(val)) {\n diag.warn(`Invalid attribute value set for key: ${key}`);\n continue;\n }\n if (Array.isArray(val)) {\n out[key] = val.slice();\n } else {\n out[key] = val;\n }\n }\n\n return out;\n}\n\nexport function isAttributeKey(key: unknown): key is string {\n return typeof key === 'string' && key !== '';\n}\n\nexport function isAttributeValue(val: unknown): val is AttributeValue {\n if (val == null) {\n return true;\n }\n\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n\n return isValidPrimitiveAttributeValueType(typeof val);\n}\n\nfunction isHomogeneousAttributeValueArray(arr: unknown[]): boolean {\n let type: string | undefined;\n\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null) continue;\n const elementType = typeof element;\n\n if (elementType === type) {\n continue;\n }\n\n if (!type) {\n if (isValidPrimitiveAttributeValueType(elementType)) {\n type = elementType;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n\n return false;\n }\n\n return true;\n}\n\nfunction isValidPrimitiveAttributeValueType(valType: string): boolean {\n switch (valType) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n\n return false;\n}\n"]}

View File

@@ -0,0 +1,59 @@
import { bigint } from "./bigint.js";
import { binary } from "./binary.js";
import { boolean } from "./boolean.js";
import { char } from "./char.js";
import { customType } from "./custom.js";
import { date } from "./date.js";
import { datetime } from "./datetime.js";
import { decimal } from "./decimal.js";
import { double } from "./double.js";
import { mysqlEnum } from "./enum.js";
import { float } from "./float.js";
import { int } from "./int.js";
import { json } from "./json.js";
import { mediumint } from "./mediumint.js";
import { real } from "./real.js";
import { serial } from "./serial.js";
import { smallint } from "./smallint.js";
import { longtext, mediumtext, text, tinytext } from "./text.js";
import { time } from "./time.js";
import { timestamp } from "./timestamp.js";
import { tinyint } from "./tinyint.js";
import { varbinary } from "./varbinary.js";
import { varchar } from "./varchar.js";
import { year } from "./year.js";
function getMySqlColumnBuilders() {
return {
bigint,
binary,
boolean,
char,
customType,
date,
datetime,
decimal,
double,
mysqlEnum,
float,
int,
json,
mediumint,
real,
serial,
smallint,
text,
time,
timestamp,
tinyint,
varbinary,
varchar,
year,
longtext,
mediumtext,
tinytext
};
}
export {
getMySqlColumnBuilders
};
//# sourceMappingURL=all.js.map

View File

@@ -0,0 +1,56 @@
import { ColumnBuilder } from "../../column-builder.js";
import type { ColumnBuilderBase, ColumnBuilderBaseConfig, ColumnBuilderExtraConfig, ColumnBuilderRuntimeConfig, ColumnDataType, HasDefault, HasGenerated, IsAutoincrement } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { Column } from "../../column.js";
import { entityKind } from "../../entity.js";
import type { UpdateDeleteAction } from "../foreign-keys.js";
import type { MySqlTable } from "../table.js";
import type { SQL } from "../../sql/sql.js";
import type { Update } from "../../utils.js";
export interface ReferenceConfig {
ref: () => MySqlColumn;
actions: {
onUpdate?: UpdateDeleteAction;
onDelete?: UpdateDeleteAction;
};
}
export interface MySqlColumnBuilderBase<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TTypeConfig extends object = object> extends ColumnBuilderBase<T, TTypeConfig & {
dialect: 'mysql';
}> {
}
export interface MySqlGeneratedColumnConfig {
mode?: 'virtual' | 'stored';
}
export declare abstract class MySqlColumnBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string> & {
data: any;
}, TRuntimeConfig extends object = object, TTypeConfig extends object = object, TExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig> extends ColumnBuilder<T, TRuntimeConfig, TTypeConfig & {
dialect: 'mysql';
}, TExtraConfig> implements MySqlColumnBuilderBase<T, TTypeConfig> {
static readonly [entityKind]: string;
private foreignKeyConfigs;
references(ref: ReferenceConfig['ref'], actions?: ReferenceConfig['actions']): this;
unique(name?: string): this;
generatedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: MySqlGeneratedColumnConfig): HasGenerated<this, {
type: 'always';
}>;
}
export declare abstract class MySqlColumn<T extends ColumnBaseConfig<ColumnDataType, string> = ColumnBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = {}, TTypeConfig extends object = {}> extends Column<T, TRuntimeConfig, TTypeConfig & {
dialect: 'mysql';
}> {
readonly table: MySqlTable;
static readonly [entityKind]: string;
constructor(table: MySqlTable, config: ColumnBuilderRuntimeConfig<T['data'], TRuntimeConfig>);
}
export type AnyMySqlColumn<TPartial extends Partial<ColumnBaseConfig<ColumnDataType, string>> = {}> = MySqlColumn<Required<Update<ColumnBaseConfig<ColumnDataType, string>, TPartial>>>;
export interface MySqlColumnWithAutoIncrementConfig {
autoIncrement: boolean;
}
export declare abstract class MySqlColumnBuilderWithAutoIncrement<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object, TExtraConfig extends ColumnBuilderExtraConfig = ColumnBuilderExtraConfig> extends MySqlColumnBuilder<T, TRuntimeConfig & MySqlColumnWithAutoIncrementConfig, TExtraConfig> {
static readonly [entityKind]: string;
constructor(name: NonNullable<T['name']>, dataType: T['dataType'], columnType: T['columnType']);
autoincrement(): IsAutoincrement<HasDefault<this>>;
}
export declare abstract class MySqlColumnWithAutoIncrement<T extends ColumnBaseConfig<ColumnDataType, string> = ColumnBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object> extends MySqlColumn<T, MySqlColumnWithAutoIncrementConfig & TRuntimeConfig> {
static readonly [entityKind]: string;
readonly autoIncrement: boolean;
}

View File

@@ -0,0 +1,16 @@
@layer payload-default {
.sort-by-pill {
&__order-option {
display: flex;
gap: calc(var(--base) * 0.25);
}
&__trigger {
.pill__label {
display: flex;
align-items: center;
gap: 4px;
}
}
}
}

View File

@@ -0,0 +1,4 @@
import type { DefaultTranslationsObject, Language } from '../types.js';
export declare const ruTranslations: DefaultTranslationsObject;
export declare const ru: Language;
//# sourceMappingURL=ru.d.ts.map

View File

@@ -0,0 +1,33 @@
import type { FileData, PayloadRequest, TypeWithID, UploadField, UploadFieldDiffServerComponent } from 'payload';
import { type I18nClient } from '@payloadcms/translations';
import './index.scss';
import React from 'react';
type NonPolyUploadDoc = (FileData & TypeWithID) | number | string;
type PolyUploadDoc = {
relationTo: string;
value: (FileData & TypeWithID) | number | string;
};
type UploadDoc = NonPolyUploadDoc | PolyUploadDoc;
export declare const Upload: UploadFieldDiffServerComponent;
export declare const HasManyUploadDiff: React.FC<{
field: UploadField;
i18n: I18nClient;
locale: string;
nestingLevel?: number;
polymorphic: boolean;
req: PayloadRequest;
valueFrom: Array<UploadDoc>;
valueTo: Array<UploadDoc>;
}>;
export declare const SingleUploadDiff: React.FC<{
field: UploadField;
i18n: I18nClient;
locale: string;
nestingLevel?: number;
polymorphic: boolean;
req: PayloadRequest;
valueFrom: UploadDoc;
valueTo: UploadDoc;
}>;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,89 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _isValidIdentifier = require("../validators/isValidIdentifier.js");
var _index = require("../builders/generated/index.js");
var _default = exports.default = valueToNode;
const objectToString = Function.call.bind(Object.prototype.toString);
function isRegExp(value) {
return objectToString(value) === "[object RegExp]";
}
function isPlainObject(value) {
if (typeof value !== "object" || value === null || Object.prototype.toString.call(value) !== "[object Object]") {
return false;
}
const proto = Object.getPrototypeOf(value);
return proto === null || Object.getPrototypeOf(proto) === null;
}
function valueToNode(value) {
if (value === undefined) {
return (0, _index.identifier)("undefined");
}
if (value === true || value === false) {
return (0, _index.booleanLiteral)(value);
}
if (value === null) {
return (0, _index.nullLiteral)();
}
if (typeof value === "string") {
return (0, _index.stringLiteral)(value);
}
if (typeof value === "number") {
let result;
if (Number.isFinite(value)) {
result = (0, _index.numericLiteral)(Math.abs(value));
} else {
let numerator;
if (Number.isNaN(value)) {
numerator = (0, _index.numericLiteral)(0);
} else {
numerator = (0, _index.numericLiteral)(1);
}
result = (0, _index.binaryExpression)("/", numerator, (0, _index.numericLiteral)(0));
}
if (value < 0 || Object.is(value, -0)) {
result = (0, _index.unaryExpression)("-", result);
}
return result;
}
if (typeof value === "bigint") {
if (value < 0) {
return (0, _index.unaryExpression)("-", (0, _index.bigIntLiteral)(-value));
} else {
return (0, _index.bigIntLiteral)(value);
}
}
if (isRegExp(value)) {
const pattern = value.source;
const flags = /\/([a-z]*)$/.exec(value.toString())[1];
return (0, _index.regExpLiteral)(pattern, flags);
}
if (Array.isArray(value)) {
return (0, _index.arrayExpression)(value.map(valueToNode));
}
if (isPlainObject(value)) {
const props = [];
for (const key of Object.keys(value)) {
let nodeKey,
computed = false;
if ((0, _isValidIdentifier.default)(key)) {
if (key === "__proto__") {
computed = true;
nodeKey = (0, _index.stringLiteral)(key);
} else {
nodeKey = (0, _index.identifier)(key);
}
} else {
nodeKey = (0, _index.stringLiteral)(key);
}
props.push((0, _index.objectProperty)(nodeKey, valueToNode(value[key]), computed));
}
return (0, _index.objectExpression)(props);
}
throw new Error("don't know how to turn this value into a node");
}
//# sourceMappingURL=valueToNode.js.map

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Microwave = createLucideIcon("Microwave", [
["rect", { width: "20", height: "15", x: "2", y: "4", rx: "2", key: "2no95f" }],
["rect", { width: "8", height: "7", x: "6", y: "8", rx: "1", key: "zh9wx" }],
["path", { d: "M18 8v7", key: "o5zi4n" }],
["path", { d: "M6 19v2", key: "1loha6" }],
["path", { d: "M18 19v2", key: "1dawf0" }]
]);
export { Microwave as default };
//# sourceMappingURL=microwave.js.map

View File

@@ -0,0 +1,38 @@
import { toDate } from "./toDate.mjs";
/**
* @name isSameMonth
* @category Month Helpers
* @summary Are the given dates in the same month (and year)?
*
* @description
* Are the given dates in the same month (and year)?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param dateLeft - The first date to check
* @param dateRight - The second date to check
*
* @returns The dates are in the same month (and year)
*
* @example
* // Are 2 September 2014 and 25 September 2014 in the same month?
* const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))
* //=> true
*
* @example
* // Are 2 September 2014 and 25 September 2015 in the same month?
* const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))
* //=> false
*/
export function isSameMonth(dateLeft, dateRight) {
const _dateLeft = toDate(dateLeft);
const _dateRight = toDate(dateRight);
return (
_dateLeft.getFullYear() === _dateRight.getFullYear() &&
_dateLeft.getMonth() === _dateRight.getMonth()
);
}
// Fallback for modularized imports:
export default isSameMonth;

View File

@@ -0,0 +1,31 @@
import { type UseFloatingOptions, type Middleware, type Placement, type UseFloatingReturn } from "@floating-ui/react";
import React from "react";
export interface FloatingProps {
hidePopper?: boolean;
popperProps: UseFloatingReturn & {
arrowRef: React.RefObject<SVGSVGElement>;
};
}
export interface WithFloatingProps {
popperModifiers?: Middleware[];
popperProps?: Omit<UseFloatingOptions, "middleware">;
hidePopper?: boolean;
popperPlacement?: Placement;
}
/**
* `withFloating` is a higher-order component that adds floating behavior to a component.
*
* @param Component - The component to enhance.
*
* @example
* const FloatingComponent = withFloating(MyComponent);
* <FloatingComponent popperModifiers={[]} popperProps={{}} hidePopper={true} />
*
* @param popperModifiers - The modifiers to use for the popper.
* @param popperProps - The props to pass to the popper.
* @param hidePopper - Whether to hide the popper.
* @param popperPlacement - The placement of the popper.
*
* @returns A new component with floating behavior.
*/
export default function withFloating<T extends FloatingProps>(Component: React.ComponentType<T>): React.FC<Omit<T, "popperProps"> & WithFloatingProps>;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/findOne.ts"],"sourcesContent":["import type { FindOneArgs, SanitizedCollectionConfig, TypeWithID } from 'payload'\n\nimport toSnakeCase from 'to-snake-case'\n\nimport type { DrizzleAdapter } from './types.js'\n\nimport { findMany } from './find/findMany.js'\n\nexport async function findOne<T extends TypeWithID>(\n this: DrizzleAdapter,\n { collection, draftsEnabled, joins, locale, req, select, where }: FindOneArgs,\n): Promise<null | T> {\n const collectionConfig: SanitizedCollectionConfig = this.payload.collections[collection].config\n\n const tableName = this.tableNameMap.get(toSnakeCase(collectionConfig.slug))\n\n const { docs } = await findMany({\n adapter: this,\n collectionSlug: collection,\n draftsEnabled,\n fields: collectionConfig.flattenedFields,\n joins,\n limit: 1,\n locale,\n page: 1,\n pagination: false,\n req,\n select,\n sort: undefined,\n tableName,\n where,\n })\n\n return docs?.[0] || null\n}\n"],"names":["toSnakeCase","findMany","findOne","collection","draftsEnabled","joins","locale","req","select","where","collectionConfig","payload","collections","config","tableName","tableNameMap","get","slug","docs","adapter","collectionSlug","fields","flattenedFields","limit","page","pagination","sort","undefined"],"mappings":"AAEA,OAAOA,iBAAiB,gBAAe;AAIvC,SAASC,QAAQ,QAAQ,qBAAoB;AAE7C,OAAO,eAAeC,QAEpB,EAAEC,UAAU,EAAEC,aAAa,EAAEC,KAAK,EAAEC,MAAM,EAAEC,GAAG,EAAEC,MAAM,EAAEC,KAAK,EAAe;IAE7E,MAAMC,mBAA8C,IAAI,CAACC,OAAO,CAACC,WAAW,CAACT,WAAW,CAACU,MAAM;IAE/F,MAAMC,YAAY,IAAI,CAACC,YAAY,CAACC,GAAG,CAAChB,YAAYU,iBAAiBO,IAAI;IAEzE,MAAM,EAAEC,IAAI,EAAE,GAAG,MAAMjB,SAAS;QAC9BkB,SAAS,IAAI;QACbC,gBAAgBjB;QAChBC;QACAiB,QAAQX,iBAAiBY,eAAe;QACxCjB;QACAkB,OAAO;QACPjB;QACAkB,MAAM;QACNC,YAAY;QACZlB;QACAC;QACAkB,MAAMC;QACNb;QACAL;IACF;IAEA,OAAOS,MAAM,CAAC,EAAE,IAAI;AACtB"}

View File

@@ -0,0 +1,8 @@
"use strict";
exports.getWeekWithOptions = void 0;
var _index = require("../getWeek.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const getWeekWithOptions = (exports.getWeekWithOptions = (0,
_index2.convertToFP)(_index.getWeek, 2));

View File

@@ -0,0 +1,7 @@
import { Event, EventHint } from './types-hoist/event';
import { EventProcessor } from './types-hoist/eventprocessor';
/**
* Process an array of event processors, returning the processed event (or `null` if the event was dropped).
*/
export declare function notifyEventProcessors(processors: EventProcessor[], event: Event | null, hint: EventHint, index?: number): PromiseLike<Event | null>;
//# sourceMappingURL=eventProcessors.d.ts.map

View File

@@ -0,0 +1,40 @@
"use strict";
exports.setYear = setYear;
var _index = require("./constructFrom.cjs");
var _index2 = require("./toDate.cjs");
/**
* The {@link setYear} function options.
*/
/**
* @name setYear
* @category Year Helpers
* @summary Set the year to the given date.
*
* @description
* Set the year to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param year - The year of the new date
* @param options - An object with options.
*
* @returns The new date with the year set
*
* @example
* // Set year 2013 to 1 September 2014:
* const result = setYear(new Date(2014, 8, 1), 2013)
* //=> Sun Sep 01 2013 00:00:00
*/
function setYear(date, year, options) {
const date_ = (0, _index2.toDate)(date, options?.in);
// Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date
if (isNaN(+date_)) return (0, _index.constructFrom)(options?.in || date, NaN);
date_.setFullYear(year);
return date_;
}

View File

@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.backgroundRepeat = void 0;
var parser_1 = require("../syntax/parser");
exports.backgroundRepeat = {
name: 'background-repeat',
initialValue: 'repeat',
prefix: false,
type: 1 /* LIST */,
parse: function (_context, tokens) {
return parser_1.parseFunctionArgs(tokens)
.map(function (values) {
return values
.filter(parser_1.isIdentToken)
.map(function (token) { return token.value; })
.join(' ');
})
.map(parseBackgroundRepeat);
}
};
var parseBackgroundRepeat = function (value) {
switch (value) {
case 'no-repeat':
return 1 /* NO_REPEAT */;
case 'repeat-x':
case 'repeat no-repeat':
return 2 /* REPEAT_X */;
case 'repeat-y':
case 'no-repeat repeat':
return 3 /* REPEAT_Y */;
case 'repeat':
default:
return 0 /* REPEAT */;
}
};
//# sourceMappingURL=background-repeat.js.map

View File

@@ -0,0 +1,26 @@
import type { MarkOptional } from 'ts-essentials';
import type { EmailField, EmailFieldClient } from '../../fields/config/types.js';
import type { EmailFieldValidation } from '../../fields/validations.js';
import type { FieldErrorClientComponent, FieldErrorServerComponent } from '../forms/Error.js';
import type { ClientFieldBase, FieldClientComponent, FieldPaths, FieldServerComponent, ServerFieldBase } from '../forms/Field.js';
import type { FieldDescriptionClientComponent, FieldDescriptionServerComponent, FieldDiffClientComponent, FieldDiffServerComponent, FieldLabelClientComponent, FieldLabelServerComponent } from '../types.js';
type EmailFieldClientWithoutType = MarkOptional<EmailFieldClient, 'type'>;
type EmailFieldBaseClientProps = {
readonly path: string;
readonly validate?: EmailFieldValidation;
};
type EmailFieldBaseServerProps = Pick<FieldPaths, 'path'>;
export type EmailFieldClientProps = ClientFieldBase<EmailFieldClientWithoutType> & EmailFieldBaseClientProps;
export type EmailFieldServerProps = EmailFieldBaseServerProps & ServerFieldBase<EmailField, EmailFieldClientWithoutType>;
export type EmailFieldServerComponent = FieldServerComponent<EmailField, EmailFieldClientWithoutType, EmailFieldBaseServerProps>;
export type EmailFieldClientComponent = FieldClientComponent<EmailFieldClientWithoutType, EmailFieldBaseClientProps>;
export type EmailFieldLabelServerComponent = FieldLabelServerComponent<EmailField, EmailFieldClientWithoutType>;
export type EmailFieldLabelClientComponent = FieldLabelClientComponent<EmailFieldClientWithoutType>;
export type EmailFieldDescriptionServerComponent = FieldDescriptionServerComponent<EmailField, EmailFieldClientWithoutType>;
export type EmailFieldDescriptionClientComponent = FieldDescriptionClientComponent<EmailFieldClientWithoutType>;
export type EmailFieldErrorServerComponent = FieldErrorServerComponent<EmailField, EmailFieldClientWithoutType>;
export type EmailFieldErrorClientComponent = FieldErrorClientComponent<EmailFieldClientWithoutType>;
export type EmailFieldDiffServerComponent = FieldDiffServerComponent<EmailField, EmailFieldClient>;
export type EmailFieldDiffClientComponent = FieldDiffClientComponent<EmailFieldClient>;
export {};
//# sourceMappingURL=Email.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sortFieldMap.js","names":["getAccessor","field","accessor","name","undefined","sortFieldMap","fieldMap","sortTo","sort","a","b","aIndex","findIndex","column","bIndex"],"sources":["../../../../src/providers/TableColumns/buildColumnState/sortFieldMap.ts"],"sourcesContent":["import type { ClientField, ColumnPreference, Field } from 'payload'\n\nfunction getAccessor(field) {\n return field.accessor ?? ('name' in field ? field.name : undefined)\n}\n\nexport function sortFieldMap<T extends ClientField | Field>(\n fieldMap: T[],\n sortTo: ColumnPreference[],\n): T[] {\n return fieldMap?.sort((a, b) => {\n const aIndex = sortTo.findIndex((column) => 'name' in a && column.accessor === getAccessor(a))\n const bIndex = sortTo.findIndex((column) => 'name' in b && column.accessor === getAccessor(b))\n\n if (aIndex === -1 && bIndex === -1) {\n return 0\n }\n\n if (aIndex === -1) {\n return 1\n }\n\n if (bIndex === -1) {\n return -1\n }\n\n return aIndex - bIndex\n })\n}\n"],"mappings":"AAEA,SAASA,YAAYC,KAAK;EACxB,OAAOA,KAAA,CAAMC,QAAQ,KAAK,UAAUD,KAAA,GAAQA,KAAA,CAAME,IAAI,GAAGC,SAAQ;AACnE;AAEA,OAAO,SAASC,aACdC,QAAa,EACbC,MAA0B;EAE1B,OAAOD,QAAA,EAAUE,IAAA,CAAK,CAACC,CAAA,EAAGC,CAAA;IACxB,MAAMC,MAAA,GAASJ,MAAA,CAAOK,SAAS,CAAEC,MAAA,IAAW,UAAUJ,CAAA,IAAKI,MAAA,CAAOX,QAAQ,KAAKF,WAAA,CAAYS,CAAA;IAC3F,MAAMK,MAAA,GAASP,MAAA,CAAOK,SAAS,CAAEC,MAAA,IAAW,UAAUH,CAAA,IAAKG,MAAA,CAAOX,QAAQ,KAAKF,WAAA,CAAYU,CAAA;IAE3F,IAAIC,MAAA,KAAW,CAAC,KAAKG,MAAA,KAAW,CAAC,GAAG;MAClC,OAAO;IACT;IAEA,IAAIH,MAAA,KAAW,CAAC,GAAG;MACjB,OAAO;IACT;IAEA,IAAIG,MAAA,KAAW,CAAC,GAAG;MACjB,OAAO,CAAC;IACV;IAEA,OAAOH,MAAA,GAASG,MAAA;EAClB;AACF","ignoreList":[]}

View File

@@ -0,0 +1,5 @@
import type * as errors from "../core/errors.cjs";
export declare const parsedType: (data: any) => string;
export default function (): {
localeError: errors.$ZodErrorMap;
};

View File

@@ -0,0 +1,9 @@
import { HandlerDataConsole } from '../types-hoist/instrument';
/**
* Add an instrumentation handler for when a console.xxx method is called.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
export declare function addConsoleInstrumentationHandler(handler: (data: HandlerDataConsole) => void): void;
//# sourceMappingURL=console.d.ts.map

View File

@@ -0,0 +1 @@
exports._default = require("./emotion-hash.cjs.js").default;

View File

@@ -0,0 +1,25 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var mysql_proxy_exports = {};
module.exports = __toCommonJS(mysql_proxy_exports);
__reExport(mysql_proxy_exports, require("./driver.cjs"), module.exports);
__reExport(mysql_proxy_exports, require("./session.cjs"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./driver.cjs"),
...require("./session.cjs")
});
//# sourceMappingURL=index.cjs.map

View File

@@ -0,0 +1,2 @@
import { flatMapDeep } from "./index";
export = flatMapDeep;

View File

@@ -0,0 +1,190 @@
'use strict';
const color = require('kleur');
const Prompt = require('./prompt');
const _require = require('../util'),
style = _require.style,
clear = _require.clear,
figures = _require.figures,
wrap = _require.wrap,
entriesToDisplay = _require.entriesToDisplay;
const _require2 = require('sisteransi'),
cursor = _require2.cursor;
/**
* SelectPrompt Base Element
* @param {Object} opts Options
* @param {String} opts.message Message
* @param {Array} opts.choices Array of choice objects
* @param {String} [opts.hint] Hint to display
* @param {Number} [opts.initial] Index of default value
* @param {Stream} [opts.stdin] The Readable stream to listen to
* @param {Stream} [opts.stdout] The Writable stream to write readline data to
* @param {Number} [opts.optionsPerPage=10] Max options to display at once
*/
class SelectPrompt extends Prompt {
constructor(opts = {}) {
super(opts);
this.msg = opts.message;
this.hint = opts.hint || '- Use arrow-keys. Return to submit.';
this.warn = opts.warn || '- This option is disabled';
this.cursor = opts.initial || 0;
this.choices = opts.choices.map((ch, idx) => {
if (typeof ch === 'string') ch = {
title: ch,
value: idx
};
return {
title: ch && (ch.title || ch.value || ch),
value: ch && (ch.value === undefined ? idx : ch.value),
description: ch && ch.description,
selected: ch && ch.selected,
disabled: ch && ch.disabled
};
});
this.optionsPerPage = opts.optionsPerPage || 10;
this.value = (this.choices[this.cursor] || {}).value;
this.clear = clear('', this.out.columns);
this.render();
}
moveCursor(n) {
this.cursor = n;
this.value = this.choices[n].value;
this.fire();
}
reset() {
this.moveCursor(0);
this.fire();
this.render();
}
exit() {
this.abort();
}
abort() {
this.done = this.aborted = true;
this.fire();
this.render();
this.out.write('\n');
this.close();
}
submit() {
if (!this.selection.disabled) {
this.done = true;
this.aborted = false;
this.fire();
this.render();
this.out.write('\n');
this.close();
} else this.bell();
}
first() {
this.moveCursor(0);
this.render();
}
last() {
this.moveCursor(this.choices.length - 1);
this.render();
}
up() {
if (this.cursor === 0) {
this.moveCursor(this.choices.length - 1);
} else {
this.moveCursor(this.cursor - 1);
}
this.render();
}
down() {
if (this.cursor === this.choices.length - 1) {
this.moveCursor(0);
} else {
this.moveCursor(this.cursor + 1);
}
this.render();
}
next() {
this.moveCursor((this.cursor + 1) % this.choices.length);
this.render();
}
_(c, key) {
if (c === ' ') return this.submit();
}
get selection() {
return this.choices[this.cursor];
}
render() {
if (this.closed) return;
if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));
super.render();
let _entriesToDisplay = entriesToDisplay(this.cursor, this.choices.length, this.optionsPerPage),
startIndex = _entriesToDisplay.startIndex,
endIndex = _entriesToDisplay.endIndex; // Print prompt
this.outputText = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.done ? this.selection.title : this.selection.disabled ? color.yellow(this.warn) : color.gray(this.hint)].join(' '); // Print choices
if (!this.done) {
this.outputText += '\n';
for (let i = startIndex; i < endIndex; i++) {
let title,
prefix,
desc = '',
v = this.choices[i]; // Determine whether to display "more choices" indicators
if (i === startIndex && startIndex > 0) {
prefix = figures.arrowUp;
} else if (i === endIndex - 1 && endIndex < this.choices.length) {
prefix = figures.arrowDown;
} else {
prefix = ' ';
}
if (v.disabled) {
title = this.cursor === i ? color.gray().underline(v.title) : color.strikethrough().gray(v.title);
prefix = (this.cursor === i ? color.bold().gray(figures.pointer) + ' ' : ' ') + prefix;
} else {
title = this.cursor === i ? color.cyan().underline(v.title) : v.title;
prefix = (this.cursor === i ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;
if (v.description && this.cursor === i) {
desc = ` - ${v.description}`;
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
desc = '\n' + wrap(v.description, {
margin: 3,
width: this.out.columns
});
}
}
}
this.outputText += `${prefix} ${title}${color.gray(desc)}\n`;
}
}
this.out.write(this.outputText);
}
}
module.exports = SelectPrompt;

View File

@@ -0,0 +1,43 @@
"use strict";
/* @minVersion 7.22.0 */
function dispose_SuppressedError(error, suppressed) {
if (typeof SuppressedError !== "undefined") {
// eslint-disable-next-line no-undef
dispose_SuppressedError = SuppressedError;
} else {
dispose_SuppressedError = function SuppressedError(error, suppressed) {
this.suppressed = suppressed;
this.error = error;
this.stack = new Error().stack;
};
dispose_SuppressedError.prototype = Object.create(Error.prototype, { constructor: { value: dispose_SuppressedError, writable: true, configurable: true } });
}
return new dispose_SuppressedError(error, suppressed);
}
function _dispose(stack, error, hasError) {
function next() {
while (stack.length > 0) {
try {
var r = stack.pop();
var p = r.d.call(r.v);
if (r.a) return Promise.resolve(p).then(next, err);
} catch (e) {
return err(e);
}
}
if (hasError) throw error;
}
function err(e) {
error = hasError ? new dispose_SuppressedError(e, error) : e;
hasError = true;
return next();
}
return next();
}
exports._ = _dispose;

View File

@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { subMonths as fn } from "../subMonths.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const subMonthsWithOptions = convertToFP(fn, 3);
// Fallback for modularized imports:
export default subMonthsWithOptions;

View File

@@ -0,0 +1 @@
{"version":3,"file":"deleteWhere.d.ts","sourceRoot":"","sources":["../../src/sqlite/deleteWhere.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAqB,WAAW,EAAE,MAAM,YAAY,CAAA;AAEhE,eAAO,MAAM,WAAW,EAAE,WAQzB,CAAA"}

View File

@@ -0,0 +1,89 @@
import type { ParserOptions } from "./options.js";
import $Ref from "./ref.js";
import type { JSONSchema } from "./types";
export declare const nullSymbol: unique symbol;
/**
* This class represents a single JSON pointer and its resolved value.
*
* @param $ref
* @param path
* @param [friendlyPath] - The original user-specified path (used for error messages)
* @class
*/
declare class Pointer<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>> {
/**
* The {@link $Ref} object that contains this {@link Pointer} object.
*/
$ref: $Ref<S, O>;
/**
* The file path or URL, containing the JSON pointer in the hash.
* This path is relative to the path of the main JSON schema file.
*/
path: string;
/**
* The original path or URL, used for error messages.
*/
originalPath: string;
/**
* The value of the JSON pointer.
* Can be any JSON type, not just objects. Unknown file types are represented as Buffers (byte arrays).
*/
value: any;
/**
* Indicates whether the pointer references itself.
*/
circular: boolean;
/**
* The number of indirect references that were traversed to resolve the value.
* Resolving a single pointer may require resolving multiple $Refs.
*/
indirections: number;
constructor($ref: $Ref<S, O>, path: string, friendlyPath?: string);
/**
* Resolves the value of a nested property within the given object.
*
* @param obj - The object that will be crawled
* @param options
* @param pathFromRoot - the path of place that initiated resolving
*
* @returns
* Returns a JSON pointer whose {@link Pointer#value} is the resolved value.
* If resolving this value required resolving other JSON references, then
* the {@link Pointer#$ref} and {@link Pointer#path} will reflect the resolution path
* of the resolved value.
*/
resolve(obj: S, options?: O, pathFromRoot?: string): this;
/**
* Sets the value of a nested property within the given object.
*
* @param obj - The object that will be crawled
* @param value - the value to assign
* @param options
*
* @returns
* Returns the modified object, or an entirely new object if the entire object is overwritten.
*/
set(obj: S, value: any, options?: O): any;
/**
* Parses a JSON pointer (or a path containing a JSON pointer in the hash)
* and returns an array of the pointer's tokens.
* (e.g. "schema.json#/definitions/person/name" => ["definitions", "person", "name"])
*
* The pointer is parsed according to RFC 6901
* {@link https://tools.ietf.org/html/rfc6901#section-3}
*
* @param path
* @param [originalPath]
* @returns
*/
static parse(path: string, originalPath?: string): string[];
/**
* Creates a JSON pointer path, by joining one or more tokens to a base path.
*
* @param base - The base path (e.g. "schema.json#/definitions/person")
* @param tokens - The token(s) to append (e.g. ["name", "first"])
* @returns
*/
static join(base: string, tokens: string | string[]): string;
}
export default Pointer;

View File

@@ -0,0 +1,9 @@
import type { FlattenedField } from '../fields/config/types.js';
import type { SelectType } from '../types/index.js';
export declare const sanitizeSelect: ({ fields, forceSelect, select, versions, }: {
fields: FlattenedField[];
forceSelect?: SelectType;
select?: SelectType;
versions?: boolean;
}) => SelectType | undefined;
//# sourceMappingURL=sanitizeSelect.d.ts.map

View File

@@ -0,0 +1,2 @@
import type Ajv from "../../core";
export default function addMetaSchema2020(this: Ajv, $data?: boolean): Ajv;

View File

@@ -0,0 +1,8 @@
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./sortable.cjs.production.min.js')
} else {
module.exports = require('./sortable.cjs.development.js')
}

View File

@@ -0,0 +1 @@
{"version":3,"names":["_assertClassBrand","require","_classPrivateFieldGet2","privateMap","receiver","get","assertClassBrand"],"sources":["../../src/helpers/classPrivateFieldGet2.ts"],"sourcesContent":["/* @minVersion 7.24.0 */\n\nimport assertClassBrand from \"./assertClassBrand.ts\";\n\nexport default function _classPrivateFieldGet2(\n privateMap: WeakMap<any, any>,\n receiver: any,\n) {\n return privateMap.get(assertClassBrand(privateMap, receiver));\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAEe,SAASC,sBAAsBA,CAC5CC,UAA6B,EAC7BC,QAAa,EACb;EACA,OAAOD,UAAU,CAACE,GAAG,CAAC,IAAAC,yBAAgB,EAACH,UAAU,EAAEC,QAAQ,CAAC,CAAC;AAC/D","ignoreList":[]}

View File

@@ -0,0 +1,784 @@
/**
* The `node:worker_threads` module enables the use of threads that execute
* JavaScript in parallel. To access it:
*
* ```js
* import worker from 'node:worker_threads';
* ```
*
* Workers (threads) are useful for performing CPU-intensive JavaScript operations.
* They do not help much with I/O-intensive work. The Node.js built-in
* asynchronous I/O operations are more efficient than Workers can be.
*
* Unlike `child_process` or `cluster`, `worker_threads` can share memory. They do
* so by transferring `ArrayBuffer` instances or sharing `SharedArrayBuffer` instances.
*
* ```js
* import {
* Worker,
* isMainThread,
* parentPort,
* workerData,
* } from 'node:worker_threads';
*
* if (!isMainThread) {
* const { parse } = await import('some-js-parsing-library');
* const script = workerData;
* parentPort.postMessage(parse(script));
* }
*
* export default function parseJSAsync(script) {
* return new Promise((resolve, reject) => {
* const worker = new Worker(new URL(import.meta.url), {
* workerData: script,
* });
* worker.on('message', resolve);
* worker.on('error', reject);
* worker.on('exit', (code) => {
* if (code !== 0)
* reject(new Error(`Worker stopped with exit code ${code}`));
* });
* });
* };
* ```
*
* The above example spawns a Worker thread for each `parseJSAsync()` call. In
* practice, use a pool of Workers for these kinds of tasks. Otherwise, the
* overhead of creating Workers would likely exceed their benefit.
*
* When implementing a worker pool, use the `AsyncResource` API to inform
* diagnostic tools (e.g. to provide asynchronous stack traces) about the
* correlation between tasks and their outcomes. See `"Using AsyncResource for a Worker thread pool"` in the `async_hooks` documentation for an example implementation.
*
* Worker threads inherit non-process-specific options by default. Refer to `Worker constructor options` to know how to customize worker thread options,
* specifically `argv` and `execArgv` options.
* @see [source](https://github.com/nodejs/node/blob/v22.x/lib/worker_threads.js)
*/
declare module "worker_threads" {
import { Context } from "node:vm";
import { EventEmitter, NodeEventTarget } from "node:events";
import { EventLoopUtilityFunction } from "node:perf_hooks";
import { FileHandle } from "node:fs/promises";
import { Readable, Writable } from "node:stream";
import { ReadableStream, TransformStream, WritableStream } from "node:stream/web";
import { URL } from "node:url";
import { HeapInfo } from "node:v8";
import { MessageEvent } from "undici-types";
const isInternalThread: boolean;
const isMainThread: boolean;
const parentPort: null | MessagePort;
const resourceLimits: ResourceLimits;
const SHARE_ENV: unique symbol;
const threadId: number;
const workerData: any;
/**
* Instances of the `worker.MessageChannel` class represent an asynchronous,
* two-way communications channel.
* The `MessageChannel` has no methods of its own. `new MessageChannel()` yields an object with `port1` and `port2` properties, which refer to linked `MessagePort` instances.
*
* ```js
* import { MessageChannel } from 'node:worker_threads';
*
* const { port1, port2 } = new MessageChannel();
* port1.on('message', (message) => console.log('received', message));
* port2.postMessage({ foo: 'bar' });
* // Prints: received { foo: 'bar' } from the `port1.on('message')` listener
* ```
* @since v10.5.0
*/
class MessageChannel {
readonly port1: MessagePort;
readonly port2: MessagePort;
}
interface WorkerPerformance {
eventLoopUtilization: EventLoopUtilityFunction;
}
type Transferable =
| ArrayBuffer
| MessagePort
| AbortSignal
| FileHandle
| ReadableStream
| WritableStream
| TransformStream;
/** @deprecated Use `import { Transferable } from "node:worker_threads"` instead. */
type TransferListItem = Transferable;
/**
* Instances of the `worker.MessagePort` class represent one end of an
* asynchronous, two-way communications channel. It can be used to transfer
* structured data, memory regions and other `MessagePort`s between different `Worker`s.
*
* This implementation matches [browser `MessagePort`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort) s.
* @since v10.5.0
*/
class MessagePort implements EventTarget {
/**
* Disables further sending of messages on either side of the connection.
* This method can be called when no further communication will happen over this `MessagePort`.
*
* The `'close' event` is emitted on both `MessagePort` instances that
* are part of the channel.
* @since v10.5.0
*/
close(): void;
/**
* Sends a JavaScript value to the receiving side of this channel. `value` is transferred in a way which is compatible with
* the [HTML structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm).
*
* In particular, the significant differences to `JSON` are:
*
* * `value` may contain circular references.
* * `value` may contain instances of builtin JS types such as `RegExp`s, `BigInt`s, `Map`s, `Set`s, etc.
* * `value` may contain typed arrays, both using `ArrayBuffer`s
* and `SharedArrayBuffer`s.
* * `value` may contain [`WebAssembly.Module`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Module) instances.
* * `value` may not contain native (C++-backed) objects other than:
*
* ```js
* import { MessageChannel } from 'node:worker_threads';
* const { port1, port2 } = new MessageChannel();
*
* port1.on('message', (message) => console.log(message));
*
* const circularData = {};
* circularData.foo = circularData;
* // Prints: { foo: [Circular] }
* port2.postMessage(circularData);
* ```
*
* `transferList` may be a list of [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer), `MessagePort`, and `FileHandle` objects.
* After transferring, they are not usable on the sending side of the channel
* anymore (even if they are not contained in `value`). Unlike with `child processes`, transferring handles such as network sockets is currently
* not supported.
*
* If `value` contains [`SharedArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) instances, those are accessible
* from either thread. They cannot be listed in `transferList`.
*
* `value` may still contain `ArrayBuffer` instances that are not in `transferList`; in that case, the underlying memory is copied rather than moved.
*
* ```js
* import { MessageChannel } from 'node:worker_threads';
* const { port1, port2 } = new MessageChannel();
*
* port1.on('message', (message) => console.log(message));
*
* const uint8Array = new Uint8Array([ 1, 2, 3, 4 ]);
* // This posts a copy of `uint8Array`:
* port2.postMessage(uint8Array);
* // This does not copy data, but renders `uint8Array` unusable:
* port2.postMessage(uint8Array, [ uint8Array.buffer ]);
*
* // The memory for the `sharedUint8Array` is accessible from both the
* // original and the copy received by `.on('message')`:
* const sharedUint8Array = new Uint8Array(new SharedArrayBuffer(4));
* port2.postMessage(sharedUint8Array);
*
* // This transfers a freshly created message port to the receiver.
* // This can be used, for example, to create communication channels between
* // multiple `Worker` threads that are children of the same parent thread.
* const otherChannel = new MessageChannel();
* port2.postMessage({ port: otherChannel.port1 }, [ otherChannel.port1 ]);
* ```
*
* The message object is cloned immediately, and can be modified after
* posting without having side effects.
*
* For more information on the serialization and deserialization mechanisms
* behind this API, see the `serialization API of the node:v8 module`.
* @since v10.5.0
*/
postMessage(value: any, transferList?: readonly Transferable[]): void;
/**
* If true, the `MessagePort` object will keep the Node.js event loop active.
* @since v18.1.0, v16.17.0
*/
hasRef(): boolean;
/**
* Opposite of `unref()`. Calling `ref()` on a previously `unref()`ed port does _not_ let the program exit if it's the only active handle left (the default
* behavior). If the port is `ref()`ed, calling `ref()` again has no effect.
*
* If listeners are attached or removed using `.on('message')`, the port
* is `ref()`ed and `unref()`ed automatically depending on whether
* listeners for the event exist.
* @since v10.5.0
*/
ref(): void;
/**
* Calling `unref()` on a port allows the thread to exit if this is the only
* active handle in the event system. If the port is already `unref()`ed calling `unref()` again has no effect.
*
* If listeners are attached or removed using `.on('message')`, the port is `ref()`ed and `unref()`ed automatically depending on whether
* listeners for the event exist.
* @since v10.5.0
*/
unref(): void;
/**
* Starts receiving messages on this `MessagePort`. When using this port
* as an event emitter, this is called automatically once `'message'` listeners are attached.
*
* This method exists for parity with the Web `MessagePort` API. In Node.js,
* it is only useful for ignoring messages when no event listener is present.
* Node.js also diverges in its handling of `.onmessage`. Setting it
* automatically calls `.start()`, but unsetting it lets messages queue up
* until a new handler is set or the port is discarded.
* @since v10.5.0
*/
start(): void;
addListener(event: "close", listener: (ev: Event) => void): this;
addListener(event: "message", listener: (value: any) => void): this;
addListener(event: "messageerror", listener: (error: Error) => void): this;
addListener(event: string, listener: (arg: any) => void): this;
emit(event: "close", ev: Event): boolean;
emit(event: "message", value: any): boolean;
emit(event: "messageerror", error: Error): boolean;
emit(event: string, arg: any): boolean;
off(event: "close", listener: (ev: Event) => void, options?: EventListenerOptions): this;
off(event: "message", listener: (value: any) => void, options?: EventListenerOptions): this;
off(event: "messageerror", listener: (error: Error) => void, options?: EventListenerOptions): this;
off(event: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
on(event: "close", listener: (ev: Event) => void): this;
on(event: "message", listener: (value: any) => void): this;
on(event: "messageerror", listener: (error: Error) => void): this;
on(event: string, listener: (arg: any) => void): this;
once(event: "close", listener: (ev: Event) => void): this;
once(event: "message", listener: (value: any) => void): this;
once(event: "messageerror", listener: (error: Error) => void): this;
once(event: string, listener: (arg: any) => void): this;
removeListener(event: "close", listener: (ev: Event) => void, options?: EventListenerOptions): this;
removeListener(event: "message", listener: (value: any) => void, options?: EventListenerOptions): this;
removeListener(event: "messageerror", listener: (error: Error) => void, options?: EventListenerOptions): this;
removeListener(event: string, listener: (arg: any) => void, options?: EventListenerOptions): this;
}
interface MessagePort extends NodeEventTarget {}
interface WorkerOptions {
/**
* List of arguments which would be stringified and appended to
* `process.argv` in the worker. This is mostly similar to the `workerData`
* but the values will be available on the global `process.argv` as if they
* were passed as CLI options to the script.
*/
argv?: any[] | undefined;
env?: NodeJS.Dict<string> | typeof SHARE_ENV | undefined;
eval?: boolean | undefined;
workerData?: any;
stdin?: boolean | undefined;
stdout?: boolean | undefined;
stderr?: boolean | undefined;
execArgv?: string[] | undefined;
resourceLimits?: ResourceLimits | undefined;
/**
* Additional data to send in the first worker message.
*/
transferList?: Transferable[] | undefined;
/**
* @default true
*/
trackUnmanagedFds?: boolean | undefined;
/**
* An optional `name` to be appended to the worker title
* for debugging/identification purposes, making the final title as
* `[worker ${id}] ${name}`.
*/
name?: string | undefined;
}
interface ResourceLimits {
/**
* The maximum size of a heap space for recently created objects.
*/
maxYoungGenerationSizeMb?: number | undefined;
/**
* The maximum size of the main heap in MB.
*/
maxOldGenerationSizeMb?: number | undefined;
/**
* The size of a pre-allocated memory range used for generated code.
*/
codeRangeSizeMb?: number | undefined;
/**
* The default maximum stack size for the thread. Small values may lead to unusable Worker instances.
* @default 4
*/
stackSizeMb?: number | undefined;
}
/**
* The `Worker` class represents an independent JavaScript execution thread.
* Most Node.js APIs are available inside of it.
*
* Notable differences inside a Worker environment are:
*
* * The `process.stdin`, `process.stdout`, and `process.stderr` streams may be redirected by the parent thread.
* * The `import { isMainThread } from 'node:worker_threads'` variable is set to `false`.
* * The `import { parentPort } from 'node:worker_threads'` message port is available.
* * `process.exit()` does not stop the whole program, just the single thread,
* and `process.abort()` is not available.
* * `process.chdir()` and `process` methods that set group or user ids
* are not available.
* * `process.env` is a copy of the parent thread's environment variables,
* unless otherwise specified. Changes to one copy are not visible in other
* threads, and are not visible to native add-ons (unless `worker.SHARE_ENV` is passed as the `env` option to the `Worker` constructor). On Windows, unlike the main thread, a copy of the
* environment variables operates in a case-sensitive manner.
* * `process.title` cannot be modified.
* * Signals are not delivered through `process.on('...')`.
* * Execution may stop at any point as a result of `worker.terminate()` being invoked.
* * IPC channels from parent processes are not accessible.
* * The `trace_events` module is not supported.
* * Native add-ons can only be loaded from multiple threads if they fulfill `certain conditions`.
*
* Creating `Worker` instances inside of other `Worker`s is possible.
*
* Like [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) and the `node:cluster module`, two-way communication
* can be achieved through inter-thread message passing. Internally, a `Worker` has
* a built-in pair of `MessagePort` s that are already associated with each
* other when the `Worker` is created. While the `MessagePort` object on the parent
* side is not directly exposed, its functionalities are exposed through `worker.postMessage()` and the `worker.on('message')` event
* on the `Worker` object for the parent thread.
*
* To create custom messaging channels (which is encouraged over using the default
* global channel because it facilitates separation of concerns), users can create
* a `MessageChannel` object on either thread and pass one of the`MessagePort`s on that `MessageChannel` to the other thread through a
* pre-existing channel, such as the global one.
*
* See `port.postMessage()` for more information on how messages are passed,
* and what kind of JavaScript values can be successfully transported through
* the thread barrier.
*
* ```js
* import assert from 'node:assert';
* import {
* Worker, MessageChannel, MessagePort, isMainThread, parentPort,
* } from 'node:worker_threads';
* if (isMainThread) {
* const worker = new Worker(__filename);
* const subChannel = new MessageChannel();
* worker.postMessage({ hereIsYourPort: subChannel.port1 }, [subChannel.port1]);
* subChannel.port2.on('message', (value) => {
* console.log('received:', value);
* });
* } else {
* parentPort.once('message', (value) => {
* assert(value.hereIsYourPort instanceof MessagePort);
* value.hereIsYourPort.postMessage('the worker is sending this');
* value.hereIsYourPort.close();
* });
* }
* ```
* @since v10.5.0
*/
class Worker extends EventEmitter {
/**
* If `stdin: true` was passed to the `Worker` constructor, this is a
* writable stream. The data written to this stream will be made available in
* the worker thread as `process.stdin`.
* @since v10.5.0
*/
readonly stdin: Writable | null;
/**
* This is a readable stream which contains data written to `process.stdout` inside the worker thread. If `stdout: true` was not passed to the `Worker` constructor, then data is piped to the
* parent thread's `process.stdout` stream.
* @since v10.5.0
*/
readonly stdout: Readable;
/**
* This is a readable stream which contains data written to `process.stderr` inside the worker thread. If `stderr: true` was not passed to the `Worker` constructor, then data is piped to the
* parent thread's `process.stderr` stream.
* @since v10.5.0
*/
readonly stderr: Readable;
/**
* An integer identifier for the referenced thread. Inside the worker thread,
* it is available as `import { threadId } from 'node:worker_threads'`.
* This value is unique for each `Worker` instance inside a single process.
* @since v10.5.0
*/
readonly threadId: number;
/**
* Provides the set of JS engine resource constraints for this Worker thread.
* If the `resourceLimits` option was passed to the `Worker` constructor,
* this matches its values.
*
* If the worker has stopped, the return value is an empty object.
* @since v13.2.0, v12.16.0
*/
readonly resourceLimits?: ResourceLimits | undefined;
/**
* An object that can be used to query performance information from a worker
* instance. Similar to `perf_hooks.performance`.
* @since v15.1.0, v14.17.0, v12.22.0
*/
readonly performance: WorkerPerformance;
/**
* @param filename The path to the Workers main script or module.
* Must be either an absolute path or a relative path (i.e. relative to the current working directory) starting with ./ or ../,
* or a WHATWG URL object using file: protocol. If options.eval is true, this is a string containing JavaScript code rather than a path.
*/
constructor(filename: string | URL, options?: WorkerOptions);
/**
* Send a message to the worker that is received via `require('node:worker_threads').parentPort.on('message')`.
* See `port.postMessage()` for more details.
* @since v10.5.0
*/
postMessage(value: any, transferList?: readonly Transferable[]): void;
/**
* Opposite of `unref()`, calling `ref()` on a previously `unref()`ed worker does _not_ let the program exit if it's the only active handle left (the default
* behavior). If the worker is `ref()`ed, calling `ref()` again has
* no effect.
* @since v10.5.0
*/
ref(): void;
/**
* Calling `unref()` on a worker allows the thread to exit if this is the only
* active handle in the event system. If the worker is already `unref()`ed calling `unref()` again has no effect.
* @since v10.5.0
*/
unref(): void;
/**
* Stop all JavaScript execution in the worker thread as soon as possible.
* Returns a Promise for the exit code that is fulfilled when the `'exit' event` is emitted.
* @since v10.5.0
*/
terminate(): Promise<number>;
/**
* This method returns a `Promise` that will resolve to an object identical to `process.threadCpuUsage()`,
* or reject with an `ERR_WORKER_NOT_RUNNING` error if the worker is no longer running.
* This methods allows the statistics to be observed from outside the actual thread.
* @since v22.19.0
*/
cpuUsage(prev?: NodeJS.CpuUsage): Promise<NodeJS.CpuUsage>;
/**
* Returns a readable stream for a V8 snapshot of the current state of the Worker.
* See `v8.getHeapSnapshot()` for more details.
*
* If the Worker thread is no longer running, which may occur before the `'exit' event` is emitted, the returned `Promise` is rejected
* immediately with an `ERR_WORKER_NOT_RUNNING` error.
* @since v13.9.0, v12.17.0
* @return A promise for a Readable Stream containing a V8 heap snapshot
*/
getHeapSnapshot(): Promise<Readable>;
/**
* This method returns a `Promise` that will resolve to an object identical to `v8.getHeapStatistics()`,
* or reject with an `ERR_WORKER_NOT_RUNNING` error if the worker is no longer running.
* This methods allows the statistics to be observed from outside the actual thread.
* @since v22.16.0
*/
getHeapStatistics(): Promise<HeapInfo>;
/**
* Calls `worker.terminate()` when the dispose scope is exited.
*
* ```js
* async function example() {
* await using worker = new Worker('for (;;) {}', { eval: true });
* // Worker is automatically terminate when the scope is exited.
* }
* ```
* @since v22.18.0
*/
[Symbol.asyncDispose](): Promise<void>;
addListener(event: "error", listener: (err: Error) => void): this;
addListener(event: "exit", listener: (exitCode: number) => void): this;
addListener(event: "message", listener: (value: any) => void): this;
addListener(event: "messageerror", listener: (error: Error) => void): this;
addListener(event: "online", listener: () => void): this;
addListener(event: string | symbol, listener: (...args: any[]) => void): this;
emit(event: "error", err: Error): boolean;
emit(event: "exit", exitCode: number): boolean;
emit(event: "message", value: any): boolean;
emit(event: "messageerror", error: Error): boolean;
emit(event: "online"): boolean;
emit(event: string | symbol, ...args: any[]): boolean;
on(event: "error", listener: (err: Error) => void): this;
on(event: "exit", listener: (exitCode: number) => void): this;
on(event: "message", listener: (value: any) => void): this;
on(event: "messageerror", listener: (error: Error) => void): this;
on(event: "online", listener: () => void): this;
on(event: string | symbol, listener: (...args: any[]) => void): this;
once(event: "error", listener: (err: Error) => void): this;
once(event: "exit", listener: (exitCode: number) => void): this;
once(event: "message", listener: (value: any) => void): this;
once(event: "messageerror", listener: (error: Error) => void): this;
once(event: "online", listener: () => void): this;
once(event: string | symbol, listener: (...args: any[]) => void): this;
prependListener(event: "error", listener: (err: Error) => void): this;
prependListener(event: "exit", listener: (exitCode: number) => void): this;
prependListener(event: "message", listener: (value: any) => void): this;
prependListener(event: "messageerror", listener: (error: Error) => void): this;
prependListener(event: "online", listener: () => void): this;
prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
prependOnceListener(event: "error", listener: (err: Error) => void): this;
prependOnceListener(event: "exit", listener: (exitCode: number) => void): this;
prependOnceListener(event: "message", listener: (value: any) => void): this;
prependOnceListener(event: "messageerror", listener: (error: Error) => void): this;
prependOnceListener(event: "online", listener: () => void): this;
prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
removeListener(event: "error", listener: (err: Error) => void): this;
removeListener(event: "exit", listener: (exitCode: number) => void): this;
removeListener(event: "message", listener: (value: any) => void): this;
removeListener(event: "messageerror", listener: (error: Error) => void): this;
removeListener(event: "online", listener: () => void): this;
removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
off(event: "error", listener: (err: Error) => void): this;
off(event: "exit", listener: (exitCode: number) => void): this;
off(event: "message", listener: (value: any) => void): this;
off(event: "messageerror", listener: (error: Error) => void): this;
off(event: "online", listener: () => void): this;
off(event: string | symbol, listener: (...args: any[]) => void): this;
}
interface BroadcastChannel extends NodeJS.RefCounted {}
/**
* Instances of `BroadcastChannel` allow asynchronous one-to-many communication
* with all other `BroadcastChannel` instances bound to the same channel name.
*
* ```js
* 'use strict';
*
* import {
* isMainThread,
* BroadcastChannel,
* Worker,
* } from 'node:worker_threads';
*
* const bc = new BroadcastChannel('hello');
*
* if (isMainThread) {
* let c = 0;
* bc.onmessage = (event) => {
* console.log(event.data);
* if (++c === 10) bc.close();
* };
* for (let n = 0; n < 10; n++)
* new Worker(__filename);
* } else {
* bc.postMessage('hello from every worker');
* bc.close();
* }
* ```
* @since v15.4.0
*/
class BroadcastChannel extends EventTarget {
readonly name: string;
/**
* Invoked with a single \`MessageEvent\` argument when a message is received.
* @since v15.4.0
*/
onmessage: (message: MessageEvent) => void;
/**
* Invoked with a received message cannot be deserialized.
* @since v15.4.0
*/
onmessageerror: (message: MessageEvent) => void;
constructor(name: string);
/**
* Closes the `BroadcastChannel` connection.
* @since v15.4.0
*/
close(): void;
/**
* @since v15.4.0
* @param message Any cloneable JavaScript value.
*/
postMessage(message: unknown): void;
}
/**
* Mark an object as not transferable. If `object` occurs in the transfer list of
* a `port.postMessage()` call, it is ignored.
*
* In particular, this makes sense for objects that can be cloned, rather than
* transferred, and which are used by other objects on the sending side.
* For example, Node.js marks the `ArrayBuffer`s it uses for its `Buffer pool` with this.
*
* This operation cannot be undone.
*
* ```js
* import { MessageChannel, markAsUntransferable } from 'node:worker_threads';
*
* const pooledBuffer = new ArrayBuffer(8);
* const typedArray1 = new Uint8Array(pooledBuffer);
* const typedArray2 = new Float64Array(pooledBuffer);
*
* markAsUntransferable(pooledBuffer);
*
* const { port1 } = new MessageChannel();
* port1.postMessage(typedArray1, [ typedArray1.buffer ]);
*
* // The following line prints the contents of typedArray1 -- it still owns
* // its memory and has been cloned, not transferred. Without
* // `markAsUntransferable()`, this would print an empty Uint8Array.
* // typedArray2 is intact as well.
* console.log(typedArray1);
* console.log(typedArray2);
* ```
*
* There is no equivalent to this API in browsers.
* @since v14.5.0, v12.19.0
*/
function markAsUntransferable(object: object): void;
/**
* Check if an object is marked as not transferable with
* {@link markAsUntransferable}.
* @since v21.0.0
*/
function isMarkedAsUntransferable(object: object): boolean;
/**
* Mark an object as not cloneable. If `object` is used as `message` in
* a `port.postMessage()` call, an error is thrown. This is a no-op if `object` is a
* primitive value.
*
* This has no effect on `ArrayBuffer`, or any `Buffer` like objects.
*
* This operation cannot be undone.
*
* ```js
* const { markAsUncloneable } = require('node:worker_threads');
*
* const anyObject = { foo: 'bar' };
* markAsUncloneable(anyObject);
* const { port1 } = new MessageChannel();
* try {
* // This will throw an error, because anyObject is not cloneable.
* port1.postMessage(anyObject)
* } catch (error) {
* // error.name === 'DataCloneError'
* }
* ```
*
* There is no equivalent to this API in browsers.
* @since v22.10.0
*/
function markAsUncloneable(object: object): void;
/**
* Transfer a `MessagePort` to a different `vm` Context. The original `port` object is rendered unusable, and the returned `MessagePort` instance
* takes its place.
*
* The returned `MessagePort` is an object in the target context and
* inherits from its global `Object` class. Objects passed to the [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) listener are also created in the
* target context
* and inherit from its global `Object` class.
*
* However, the created `MessagePort` no longer inherits from [`EventTarget`](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget), and only
* [`port.onmessage()`](https://developer.mozilla.org/en-US/docs/Web/API/MessagePort/onmessage) can be used to receive
* events using it.
* @since v11.13.0
* @param port The message port to transfer.
* @param contextifiedSandbox A `contextified` object as returned by the `vm.createContext()` method.
*/
function moveMessagePortToContext(port: MessagePort, contextifiedSandbox: Context): MessagePort;
/**
* Receive a single message from a given `MessagePort`. If no message is available,`undefined` is returned, otherwise an object with a single `message` property
* that contains the message payload, corresponding to the oldest message in the `MessagePort`'s queue.
*
* ```js
* import { MessageChannel, receiveMessageOnPort } from 'node:worker_threads';
* const { port1, port2 } = new MessageChannel();
* port1.postMessage({ hello: 'world' });
*
* console.log(receiveMessageOnPort(port2));
* // Prints: { message: { hello: 'world' } }
* console.log(receiveMessageOnPort(port2));
* // Prints: undefined
* ```
*
* When this function is used, no `'message'` event is emitted and the `onmessage` listener is not invoked.
* @since v12.3.0
*/
function receiveMessageOnPort(port: MessagePort):
| {
message: any;
}
| undefined;
type Serializable = string | object | number | boolean | bigint;
/**
* Within a worker thread, `worker.getEnvironmentData()` returns a clone
* of data passed to the spawning thread's `worker.setEnvironmentData()`.
* Every new `Worker` receives its own copy of the environment data
* automatically.
*
* ```js
* import {
* Worker,
* isMainThread,
* setEnvironmentData,
* getEnvironmentData,
* } from 'node:worker_threads';
*
* if (isMainThread) {
* setEnvironmentData('Hello', 'World!');
* const worker = new Worker(__filename);
* } else {
* console.log(getEnvironmentData('Hello')); // Prints 'World!'.
* }
* ```
* @since v15.12.0, v14.18.0
* @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
*/
function getEnvironmentData(key: Serializable): Serializable;
/**
* The `worker.setEnvironmentData()` API sets the content of `worker.getEnvironmentData()` in the current thread and all new `Worker` instances spawned from the current context.
* @since v15.12.0, v14.18.0
* @param key Any arbitrary, cloneable JavaScript value that can be used as a {Map} key.
* @param value Any arbitrary, cloneable JavaScript value that will be cloned and passed automatically to all new `Worker` instances. If `value` is passed as `undefined`, any previously set value
* for the `key` will be deleted.
*/
function setEnvironmentData(key: Serializable, value?: Serializable): void;
/**
* Sends a value to another worker, identified by its thread ID.
* @param threadId The target thread ID. If the thread ID is invalid, a `ERR_WORKER_MESSAGING_FAILED` error will be thrown.
* If the target thread ID is the current thread ID, a `ERR_WORKER_MESSAGING_SAME_THREAD` error will be thrown.
* @param value The value to send.
* @param transferList If one or more `MessagePort`-like objects are passed in value, a `transferList` is required for those items
* or `ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST` is thrown. See `port.postMessage()` for more information.
* @param timeout Time to wait for the message to be delivered in milliseconds. By default it's `undefined`, which means wait forever.
* If the operation times out, a `ERR_WORKER_MESSAGING_TIMEOUT` error is thrown.
* @since v22.5.0
*/
function postMessageToThread(threadId: number, value: any, timeout?: number): Promise<void>;
function postMessageToThread(
threadId: number,
value: any,
transferList: readonly Transferable[],
timeout?: number,
): Promise<void>;
import {
BroadcastChannel as _BroadcastChannel,
MessageChannel as _MessageChannel,
MessagePort as _MessagePort,
} from "worker_threads";
global {
function structuredClone<T>(
value: T,
options?: { transfer?: Transferable[] },
): T;
/**
* `BroadcastChannel` class is a global reference for `import { BroadcastChannel } from 'worker_threads'`
* https://nodejs.org/api/globals.html#broadcastchannel
* @since v18.0.0
*/
var BroadcastChannel: typeof globalThis extends {
onmessage: any;
BroadcastChannel: infer T;
} ? T
: typeof _BroadcastChannel;
/**
* `MessageChannel` class is a global reference for `import { MessageChannel } from 'worker_threads'`
* https://nodejs.org/api/globals.html#messagechannel
* @since v15.0.0
*/
var MessageChannel: typeof globalThis extends {
onmessage: any;
MessageChannel: infer T;
} ? T
: typeof _MessageChannel;
/**
* `MessagePort` class is a global reference for `import { MessagePort } from 'worker_threads'`
* https://nodejs.org/api/globals.html#messageport
* @since v15.0.0
*/
var MessagePort: typeof globalThis extends {
onmessage: any;
MessagePort: infer T;
} ? T
: typeof _MessagePort;
}
}
declare module "node:worker_threads" {
export * from "worker_threads";
}

View File

@@ -0,0 +1,3 @@
'use strict';
module.exports = require('./async').timesSeries;

View File

@@ -0,0 +1,3 @@
const legacy = require('../dist/legacy-exports')
module.exports = legacy.omap
legacy.warnFileDeprecation(__filename)

View File

@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@reactdatepicker.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [https://contributor-covenant.org/version/1/4][version]
[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/

View File

@@ -0,0 +1 @@
{"version":3,"file":"renderListViewSlots.d.ts","sourceRoot":"","sources":["../../../src/views/List/renderListViewSlots.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAQV,uBAAuB,EACvB,aAAa,EACb,6BAA6B,EAC7B,OAAO,EACP,yBAAyB,EACzB,iBAAiB,EAGlB,MAAM,SAAS,CAAA;AAMhB,KAAK,IAAI,GAAG;IACV,WAAW,EAAE,6BAA6B,CAAA;IAC1C,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,aAAa,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IAC7B,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,uBAAuB,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,mBAAmB,yFAO7B,IAAI,KAAG,aAmFT,CAAA"}

View File

@@ -0,0 +1,20 @@
import type { Timezone } from '../config/types.js';
type ValidateTimezonesArgs = {
/**
* The source of the timezones for error messaging
*/
source?: string;
/**
* Array of timezones to validate
*/
timezones: Timezone[] | undefined;
};
/**
* Validates that all provided timezones are supported by the current runtime's Intl API.
* Uses both Intl.DateTimeFormat and Intl.supportedValuesOf for comprehensive validation.
*
* @throws InvalidConfiguration if an unsupported timezone is found
*/
export declare const validateTimezones: ({ source, timezones }: ValidateTimezonesArgs) => void;
export {};
//# sourceMappingURL=validateTimezones.d.ts.map

View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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 CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@@ -0,0 +1,64 @@
import { TediousInstrumentation } from '@opentelemetry/instrumentation-tedious';
import { defineIntegration, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
import { generateInstrumentOnce, instrumentWhenWrapped } from '@sentry/node-core';
const TEDIUS_INSTRUMENTED_METHODS = new Set([
'callProcedure',
'execSql',
'execSqlBatch',
'execBulkLoad',
'prepare',
'execute',
]);
const INTEGRATION_NAME = 'Tedious';
const instrumentTedious = generateInstrumentOnce(INTEGRATION_NAME, () => new TediousInstrumentation({}));
const _tediousIntegration = (() => {
let instrumentationWrappedCallback;
return {
name: INTEGRATION_NAME,
setupOnce() {
const instrumentation = instrumentTedious();
instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);
},
setup(client) {
instrumentationWrappedCallback?.(() =>
client.on('spanStart', span => {
const { description, data } = spanToJSON(span);
// Tedius integration always set a span name and `db.system` attribute to `mssql`.
if (!description || data['db.system'] !== 'mssql') {
return;
}
const operation = description.split(' ')[0] || '';
if (TEDIUS_INSTRUMENTED_METHODS.has(operation)) {
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.tedious');
}
}),
);
},
};
}) ;
/**
* Adds Sentry tracing instrumentation for the [tedious](https://www.npmjs.com/package/tedious) library.
*
* For more information, see the [`tediousIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/tedious/).
*
* @example
* ```javascript
* const Sentry = require('@sentry/node');
*
* Sentry.init({
* integrations: [Sentry.tediousIntegration()],
* });
* ```
*/
const tediousIntegration = defineIntegration(_tediousIntegration);
export { instrumentTedious, tediousIntegration };
//# sourceMappingURL=tedious.js.map

View File

@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "less than a second",
other: "less than {{count}} seconds",
},
xSeconds: {
one: "1 second",
other: "{{count}} seconds",
},
halfAMinute: "half a minute",
lessThanXMinutes: {
one: "less than a minute",
other: "less than {{count}} minutes",
},
xMinutes: {
one: "1 minute",
other: "{{count}} minutes",
},
aboutXHours: {
one: "about 1 hour",
other: "about {{count}} hours",
},
xHours: {
one: "1 hour",
other: "{{count}} hours",
},
xDays: {
one: "1 day",
other: "{{count}} days",
},
aboutXWeeks: {
one: "about 1 week",
other: "about {{count}} weeks",
},
xWeeks: {
one: "1 week",
other: "{{count}} weeks",
},
aboutXMonths: {
one: "about 1 month",
other: "about {{count}} months",
},
xMonths: {
one: "1 month",
other: "{{count}} months",
},
aboutXYears: {
one: "about 1 year",
other: "about {{count}} years",
},
xYears: {
one: "1 year",
other: "{{count}} years",
},
overXYears: {
one: "over 1 year",
other: "over {{count}} years",
},
almostXYears: {
one: "almost 1 year",
other: "almost {{count}} years",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", count.toString());
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "in " + result;
} else {
return result + " ago";
}
}
return result;
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, MMMM do, y",
long: "MMMM do, y",
medium: "MMM d, y",
short: "MM/dd/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} 'në' {{time}}",
long: "{{date}} 'në' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

View File

@@ -0,0 +1,267 @@
'use strict';
/*
Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation
by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool
*/
function memcmp(buf1, pos1, buf2, pos2, num) {
for (let i = 0; i < num; ++i) {
if (buf1[pos1 + i] !== buf2[pos2 + i])
return false;
}
return true;
}
class SBMH {
constructor(needle, cb) {
if (typeof cb !== 'function')
throw new Error('Missing match callback');
if (typeof needle === 'string')
needle = Buffer.from(needle);
else if (!Buffer.isBuffer(needle))
throw new Error(`Expected Buffer for needle, got ${typeof needle}`);
const needleLen = needle.length;
this.maxMatches = Infinity;
this.matches = 0;
this._cb = cb;
this._lookbehindSize = 0;
this._needle = needle;
this._bufPos = 0;
this._lookbehind = Buffer.allocUnsafe(needleLen);
// Initialize occurrence table.
this._occ = [
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen, needleLen, needleLen,
needleLen, needleLen, needleLen, needleLen
];
// Populate occurrence table with analysis of the needle, ignoring the last
// letter.
if (needleLen > 1) {
for (let i = 0; i < needleLen - 1; ++i)
this._occ[needle[i]] = needleLen - 1 - i;
}
}
reset() {
this.matches = 0;
this._lookbehindSize = 0;
this._bufPos = 0;
}
push(chunk, pos) {
let result;
if (!Buffer.isBuffer(chunk))
chunk = Buffer.from(chunk, 'latin1');
const chunkLen = chunk.length;
this._bufPos = pos || 0;
while (result !== chunkLen && this.matches < this.maxMatches)
result = feed(this, chunk);
return result;
}
destroy() {
const lbSize = this._lookbehindSize;
if (lbSize)
this._cb(false, this._lookbehind, 0, lbSize, false);
this.reset();
}
}
function feed(self, data) {
const len = data.length;
const needle = self._needle;
const needleLen = needle.length;
// Positive: points to a position in `data`
// pos == 3 points to data[3]
// Negative: points to a position in the lookbehind buffer
// pos == -2 points to lookbehind[lookbehindSize - 2]
let pos = -self._lookbehindSize;
const lastNeedleCharPos = needleLen - 1;
const lastNeedleChar = needle[lastNeedleCharPos];
const end = len - needleLen;
const occ = self._occ;
const lookbehind = self._lookbehind;
if (pos < 0) {
// Lookbehind buffer is not empty. Perform Boyer-Moore-Horspool
// search with character lookup code that considers both the
// lookbehind buffer and the current round's haystack data.
//
// Loop until
// there is a match.
// or until
// we've moved past the position that requires the
// lookbehind buffer. In this case we switch to the
// optimized loop.
// or until
// the character to look at lies outside the haystack.
while (pos < 0 && pos <= end) {
const nextPos = pos + lastNeedleCharPos;
const ch = (nextPos < 0
? lookbehind[self._lookbehindSize + nextPos]
: data[nextPos]);
if (ch === lastNeedleChar
&& matchNeedle(self, data, pos, lastNeedleCharPos)) {
self._lookbehindSize = 0;
++self.matches;
if (pos > -self._lookbehindSize)
self._cb(true, lookbehind, 0, self._lookbehindSize + pos, false);
else
self._cb(true, undefined, 0, 0, true);
return (self._bufPos = pos + needleLen);
}
pos += occ[ch];
}
// No match.
// There's too few data for Boyer-Moore-Horspool to run,
// so let's use a different algorithm to skip as much as
// we can.
// Forward pos until
// the trailing part of lookbehind + data
// looks like the beginning of the needle
// or until
// pos == 0
while (pos < 0 && !matchNeedle(self, data, pos, len - pos))
++pos;
if (pos < 0) {
// Cut off part of the lookbehind buffer that has
// been processed and append the entire haystack
// into it.
const bytesToCutOff = self._lookbehindSize + pos;
if (bytesToCutOff > 0) {
// The cut off data is guaranteed not to contain the needle.
self._cb(false, lookbehind, 0, bytesToCutOff, false);
}
self._lookbehindSize -= bytesToCutOff;
lookbehind.copy(lookbehind, 0, bytesToCutOff, self._lookbehindSize);
lookbehind.set(data, self._lookbehindSize);
self._lookbehindSize += len;
self._bufPos = len;
return len;
}
// Discard lookbehind buffer.
self._cb(false, lookbehind, 0, self._lookbehindSize, false);
self._lookbehindSize = 0;
}
pos += self._bufPos;
const firstNeedleChar = needle[0];
// Lookbehind buffer is now empty. Perform Boyer-Moore-Horspool
// search with optimized character lookup code that only considers
// the current round's haystack data.
while (pos <= end) {
const ch = data[pos + lastNeedleCharPos];
if (ch === lastNeedleChar
&& data[pos] === firstNeedleChar
&& memcmp(needle, 0, data, pos, lastNeedleCharPos)) {
++self.matches;
if (pos > 0)
self._cb(true, data, self._bufPos, pos, true);
else
self._cb(true, undefined, 0, 0, true);
return (self._bufPos = pos + needleLen);
}
pos += occ[ch];
}
// There was no match. If there's trailing haystack data that we cannot
// match yet using the Boyer-Moore-Horspool algorithm (because the trailing
// data is less than the needle size) then match using a modified
// algorithm that starts matching from the beginning instead of the end.
// Whatever trailing data is left after running this algorithm is added to
// the lookbehind buffer.
while (pos < len) {
if (data[pos] !== firstNeedleChar
|| !memcmp(data, pos, needle, 0, len - pos)) {
++pos;
continue;
}
data.copy(lookbehind, 0, pos, len);
self._lookbehindSize = len - pos;
break;
}
// Everything until `pos` is guaranteed not to contain needle data.
if (pos > 0)
self._cb(false, data, self._bufPos, pos < len ? pos : len, true);
self._bufPos = len;
return len;
}
function matchNeedle(self, data, pos, len) {
const lb = self._lookbehind;
const lbSize = self._lookbehindSize;
const needle = self._needle;
for (let i = 0; i < len; ++i, ++pos) {
const ch = (pos < 0 ? lb[lbSize + pos] : data[pos]);
if (ch !== needle[i])
return false;
}
return true;
}
module.exports = SBMH;

View File

@@ -0,0 +1,104 @@
// This is a mirror of the JS API definitions in `spec/js-api`, but with comments
// written to provide user-facing documentation rather than to specify behavior for
// implementations.
export {
AsyncCompiler,
CompileResult,
Compiler,
compile,
compileAsync,
compileString,
compileStringAsync,
initCompiler,
initAsyncCompiler,
} from './compile';
export {
deprecations,
Deprecation,
Deprecations,
DeprecationOrId,
DeprecationStatus,
Version,
} from './deprecations';
export {Exception} from './exception';
export {
CanonicalizeContext,
FileImporter,
Importer,
ImporterResult,
NodePackageImporter,
} from './importer';
export {Logger, SourceSpan, SourceLocation} from './logger';
export {
CustomFunction,
Options,
OutputStyle,
StringOptions,
StringOptionsWithImporter,
StringOptionsWithoutImporter,
Syntax,
} from './options';
export {PromiseOr} from './util/promise_or';
export {
CalculationInterpolation,
CalculationOperation,
CalculationOperator,
CalculationValue,
ListSeparator,
SassArgumentList,
SassBoolean,
SassCalculation,
SassColor,
SassFunction,
SassList,
SassMap,
SassMixin,
SassNumber,
SassString,
Value,
sassFalse,
sassNull,
sassTrue,
} from './value';
// Legacy APIs
export {LegacyException} from './legacy/exception';
export {
FALSE,
LegacyAsyncFunction,
LegacyAsyncFunctionDone,
LegacyFunction,
LegacySyncFunction,
LegacyValue,
NULL,
TRUE,
types,
} from './legacy/function';
export {
LegacyAsyncImporter,
LegacyImporter,
LegacyImporterResult,
LegacyImporterThis,
LegacySyncImporter,
} from './legacy/importer';
export {
LegacySharedOptions,
LegacyFileOptions,
LegacyStringOptions,
LegacyOptions,
} from './legacy/options';
export {LegacyPluginThis} from './legacy/plugin_this';
export {LegacyResult, render, renderSync} from './legacy/render';
/**
* Information about the Sass implementation. This always begins with a unique
* identifier for the Sass implementation, followed by U+0009 TAB, followed by
* its npm package version. Some implementations include additional information
* as well, but not in any standardized format.
*
* * For Dart Sass, the implementation name is `dart-sass`.
* * For Node Sass, the implementation name is `node-sass`.
* * For the embedded host, the implementation name is `sass-embedded`.
*/
export const info: string;

View File

@@ -0,0 +1,3 @@
export { defaultCoordinates } from './constants';
export { distanceBetween } from './distanceBetweenPoints';
export { getRelativeTransformOrigin } from './getRelativeTransformOrigin';

View File

@@ -0,0 +1 @@
{"version":3,"file":"arrow-up-left-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,51 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.importSPKI = importSPKI;
exports.importX509 = importX509;
exports.importPKCS8 = importPKCS8;
exports.importJWK = importJWK;
const base64url_js_1 = require("../runtime/base64url.js");
const asn1_js_1 = require("../runtime/asn1.js");
const jwk_to_key_js_1 = require("../runtime/jwk_to_key.js");
const errors_js_1 = require("../util/errors.js");
const is_object_js_1 = require("../lib/is_object.js");
async function importSPKI(spki, alg, options) {
if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) {
throw new TypeError('"spki" must be SPKI formatted string');
}
return (0, asn1_js_1.fromSPKI)(spki, alg, options);
}
async function importX509(x509, alg, options) {
if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) {
throw new TypeError('"x509" must be X.509 formatted string');
}
return (0, asn1_js_1.fromX509)(x509, alg, options);
}
async function importPKCS8(pkcs8, alg, options) {
if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) {
throw new TypeError('"pkcs8" must be PKCS#8 formatted string');
}
return (0, asn1_js_1.fromPKCS8)(pkcs8, alg, options);
}
async function importJWK(jwk, alg) {
if (!(0, is_object_js_1.default)(jwk)) {
throw new TypeError('JWK must be an object');
}
alg ||= jwk.alg;
switch (jwk.kty) {
case 'oct':
if (typeof jwk.k !== 'string' || !jwk.k) {
throw new TypeError('missing "k" (Key Value) Parameter value');
}
return (0, base64url_js_1.decode)(jwk.k);
case 'RSA':
if (jwk.oth !== undefined) {
throw new errors_js_1.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
}
case 'EC':
case 'OKP':
return (0, jwk_to_key_js_1.default)({ ...jwk, alg });
default:
throw new errors_js_1.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value');
}
}

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const AppWindowMac = createLucideIcon("AppWindowMac", [
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
["path", { d: "M6 8h.01", key: "x9i8wu" }],
["path", { d: "M10 8h.01", key: "1r9ogq" }],
["path", { d: "M14 8h.01", key: "1primd" }]
]);
export { AppWindowMac as default };
//# sourceMappingURL=app-window-mac.js.map

View File

@@ -0,0 +1,13 @@
export declare const areIntervalsOverlappingWithOptions: import("./types.js").FPFn3<
boolean,
| import("../areIntervalsOverlapping.js").AreIntervalsOverlappingOptions
| undefined,
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>,
import("../fp.js").Interval<
import("../fp.js").DateArg<Date>,
import("../fp.js").DateArg<Date>
>
>;

View File

@@ -0,0 +1,28 @@
"use strict";
exports.enUS = void 0;
var _index = require("./en-US/_lib/formatDistance.cjs");
var _index2 = require("./en-US/_lib/formatLong.cjs");
var _index3 = require("./en-US/_lib/formatRelative.cjs");
var _index4 = require("./en-US/_lib/localize.cjs");
var _index5 = require("./en-US/_lib/match.cjs");
/**
* @category Locales
* @summary English locale (United States).
* @language English
* @iso-639-2 eng
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
*/
const enUS = (exports.enUS = {
code: "en-US",
formatDistance: _index.formatDistance,
formatLong: _index2.formatLong,
formatRelative: _index3.formatRelative,
localize: _index4.localize,
match: _index5.match,
options: {
weekStartsOn: 0 /* Sunday */,
firstWeekContainsDate: 1,
},
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"piggy-bank.js","sources":["../../../src/icons/piggy-bank.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PiggyBank\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTkgNWMtMS41IDAtMi44IDEuNC0zIDItMy41LTEuNS0xMS0uMy0xMSA1IDAgMS44IDAgMyAyIDQuNVYyMGg0di0yaDN2Mmg0di00YzEtLjUgMS43LTEgMi0yaDJ2LTRoLTJjMC0xLS41LTEuNS0xLTJWNXoiIC8+CiAgPHBhdGggZD0iTTIgOXYxYzAgMS4xLjkgMiAyIDJoMSIgLz4KICA8cGF0aCBkPSJNMTYgMTFoLjAxIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/piggy-bank\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PiggyBank = createLucideIcon('PiggyBank', [\n [\n 'path',\n {\n d: 'M19 5c-1.5 0-2.8 1.4-3 2-3.5-1.5-11-.3-11 5 0 1.8 0 3 2 4.5V20h4v-2h3v2h4v-4c1-.5 1.7-1 2-2h2v-4h-2c0-1-.5-1.5-1-2V5z',\n key: '1ivx2i',\n },\n ],\n ['path', { d: 'M2 9v1c0 1.1.9 2 2 2h1', key: 'nm575m' }],\n ['path', { d: 'M16 11h.01', key: 'xkw8gn' }],\n]);\n\nexport default PiggyBank;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,536 @@
"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;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.decodeXML = exports.decodeHTMLStrict = exports.decodeHTMLAttribute = exports.decodeHTML = exports.determineBranch = exports.EntityDecoder = exports.DecodingMode = exports.BinTrieFlags = exports.fromCodePoint = exports.replaceCodePoint = exports.decodeCodePoint = exports.xmlDecodeTree = exports.htmlDecodeTree = void 0;
var decode_data_html_js_1 = __importDefault(require("./generated/decode-data-html.js"));
exports.htmlDecodeTree = decode_data_html_js_1.default;
var decode_data_xml_js_1 = __importDefault(require("./generated/decode-data-xml.js"));
exports.xmlDecodeTree = decode_data_xml_js_1.default;
var decode_codepoint_js_1 = __importStar(require("./decode_codepoint.js"));
exports.decodeCodePoint = decode_codepoint_js_1.default;
var decode_codepoint_js_2 = require("./decode_codepoint.js");
Object.defineProperty(exports, "replaceCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.replaceCodePoint; } });
Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return decode_codepoint_js_2.fromCodePoint; } });
var CharCodes;
(function (CharCodes) {
CharCodes[CharCodes["NUM"] = 35] = "NUM";
CharCodes[CharCodes["SEMI"] = 59] = "SEMI";
CharCodes[CharCodes["EQUALS"] = 61] = "EQUALS";
CharCodes[CharCodes["ZERO"] = 48] = "ZERO";
CharCodes[CharCodes["NINE"] = 57] = "NINE";
CharCodes[CharCodes["LOWER_A"] = 97] = "LOWER_A";
CharCodes[CharCodes["LOWER_F"] = 102] = "LOWER_F";
CharCodes[CharCodes["LOWER_X"] = 120] = "LOWER_X";
CharCodes[CharCodes["LOWER_Z"] = 122] = "LOWER_Z";
CharCodes[CharCodes["UPPER_A"] = 65] = "UPPER_A";
CharCodes[CharCodes["UPPER_F"] = 70] = "UPPER_F";
CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
})(CharCodes || (CharCodes = {}));
/** Bit that needs to be set to convert an upper case ASCII character to lower case */
var TO_LOWER_BIT = 32;
var BinTrieFlags;
(function (BinTrieFlags) {
BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 16256] = "BRANCH_LENGTH";
BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
})(BinTrieFlags = exports.BinTrieFlags || (exports.BinTrieFlags = {}));
function isNumber(code) {
return code >= CharCodes.ZERO && code <= CharCodes.NINE;
}
function isHexadecimalCharacter(code) {
return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_F) ||
(code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F));
}
function isAsciiAlphaNumeric(code) {
return ((code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z) ||
(code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z) ||
isNumber(code));
}
/**
* Checks if the given character is a valid end character for an entity in an attribute.
*
* Attribute values that aren't terminated properly aren't parsed, and shouldn't lead to a parser error.
* See the example in https://html.spec.whatwg.org/multipage/parsing.html#named-character-reference-state
*/
function isEntityInAttributeInvalidEnd(code) {
return code === CharCodes.EQUALS || isAsciiAlphaNumeric(code);
}
var EntityDecoderState;
(function (EntityDecoderState) {
EntityDecoderState[EntityDecoderState["EntityStart"] = 0] = "EntityStart";
EntityDecoderState[EntityDecoderState["NumericStart"] = 1] = "NumericStart";
EntityDecoderState[EntityDecoderState["NumericDecimal"] = 2] = "NumericDecimal";
EntityDecoderState[EntityDecoderState["NumericHex"] = 3] = "NumericHex";
EntityDecoderState[EntityDecoderState["NamedEntity"] = 4] = "NamedEntity";
})(EntityDecoderState || (EntityDecoderState = {}));
var DecodingMode;
(function (DecodingMode) {
/** Entities in text nodes that can end with any character. */
DecodingMode[DecodingMode["Legacy"] = 0] = "Legacy";
/** Only allow entities terminated with a semicolon. */
DecodingMode[DecodingMode["Strict"] = 1] = "Strict";
/** Entities in attributes have limitations on ending characters. */
DecodingMode[DecodingMode["Attribute"] = 2] = "Attribute";
})(DecodingMode = exports.DecodingMode || (exports.DecodingMode = {}));
/**
* Token decoder with support of writing partial entities.
*/
var EntityDecoder = /** @class */ (function () {
function EntityDecoder(
/** The tree used to decode entities. */
decodeTree,
/**
* The function that is called when a codepoint is decoded.
*
* For multi-byte named entities, this will be called multiple times,
* with the second codepoint, and the same `consumed` value.
*
* @param codepoint The decoded codepoint.
* @param consumed The number of bytes consumed by the decoder.
*/
emitCodePoint,
/** An object that is used to produce errors. */
errors) {
this.decodeTree = decodeTree;
this.emitCodePoint = emitCodePoint;
this.errors = errors;
/** The current state of the decoder. */
this.state = EntityDecoderState.EntityStart;
/** Characters that were consumed while parsing an entity. */
this.consumed = 1;
/**
* The result of the entity.
*
* Either the result index of a numeric entity, or the codepoint of a
* numeric entity.
*/
this.result = 0;
/** The current index in the decode tree. */
this.treeIndex = 0;
/** The number of characters that were consumed in excess. */
this.excess = 1;
/** The mode in which the decoder is operating. */
this.decodeMode = DecodingMode.Strict;
}
/** Resets the instance to make it reusable. */
EntityDecoder.prototype.startEntity = function (decodeMode) {
this.decodeMode = decodeMode;
this.state = EntityDecoderState.EntityStart;
this.result = 0;
this.treeIndex = 0;
this.excess = 1;
this.consumed = 1;
};
/**
* Write an entity to the decoder. This can be called multiple times with partial entities.
* If the entity is incomplete, the decoder will return -1.
*
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
* entity is incomplete, and resume when the next string is written.
*
* @param string The string containing the entity (or a continuation of the entity).
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.write = function (str, offset) {
switch (this.state) {
case EntityDecoderState.EntityStart: {
if (str.charCodeAt(offset) === CharCodes.NUM) {
this.state = EntityDecoderState.NumericStart;
this.consumed += 1;
return this.stateNumericStart(str, offset + 1);
}
this.state = EntityDecoderState.NamedEntity;
return this.stateNamedEntity(str, offset);
}
case EntityDecoderState.NumericStart: {
return this.stateNumericStart(str, offset);
}
case EntityDecoderState.NumericDecimal: {
return this.stateNumericDecimal(str, offset);
}
case EntityDecoderState.NumericHex: {
return this.stateNumericHex(str, offset);
}
case EntityDecoderState.NamedEntity: {
return this.stateNamedEntity(str, offset);
}
}
};
/**
* Switches between the numeric decimal and hexadecimal states.
*
* Equivalent to the `Numeric character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.stateNumericStart = function (str, offset) {
if (offset >= str.length) {
return -1;
}
if ((str.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
this.state = EntityDecoderState.NumericHex;
this.consumed += 1;
return this.stateNumericHex(str, offset + 1);
}
this.state = EntityDecoderState.NumericDecimal;
return this.stateNumericDecimal(str, offset);
};
EntityDecoder.prototype.addToNumericResult = function (str, start, end, base) {
if (start !== end) {
var digitCount = end - start;
this.result =
this.result * Math.pow(base, digitCount) +
parseInt(str.substr(start, digitCount), base);
this.consumed += digitCount;
}
};
/**
* Parses a hexadecimal numeric entity.
*
* Equivalent to the `Hexademical character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.stateNumericHex = function (str, offset) {
var startIdx = offset;
while (offset < str.length) {
var char = str.charCodeAt(offset);
if (isNumber(char) || isHexadecimalCharacter(char)) {
offset += 1;
}
else {
this.addToNumericResult(str, startIdx, offset, 16);
return this.emitNumericEntity(char, 3);
}
}
this.addToNumericResult(str, startIdx, offset, 16);
return -1;
};
/**
* Parses a decimal numeric entity.
*
* Equivalent to the `Decimal character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.stateNumericDecimal = function (str, offset) {
var startIdx = offset;
while (offset < str.length) {
var char = str.charCodeAt(offset);
if (isNumber(char)) {
offset += 1;
}
else {
this.addToNumericResult(str, startIdx, offset, 10);
return this.emitNumericEntity(char, 2);
}
}
this.addToNumericResult(str, startIdx, offset, 10);
return -1;
};
/**
* Validate and emit a numeric entity.
*
* Implements the logic from the `Hexademical character reference start
* state` and `Numeric character reference end state` in the HTML spec.
*
* @param lastCp The last code point of the entity. Used to see if the
* entity was terminated with a semicolon.
* @param expectedLength The minimum number of characters that should be
* consumed. Used to validate that at least one digit
* was consumed.
* @returns The number of characters that were consumed.
*/
EntityDecoder.prototype.emitNumericEntity = function (lastCp, expectedLength) {
var _a;
// Ensure we consumed at least one digit.
if (this.consumed <= expectedLength) {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
// Figure out if this is a legit end of the entity
if (lastCp === CharCodes.SEMI) {
this.consumed += 1;
}
else if (this.decodeMode === DecodingMode.Strict) {
return 0;
}
this.emitCodePoint((0, decode_codepoint_js_1.replaceCodePoint)(this.result), this.consumed);
if (this.errors) {
if (lastCp !== CharCodes.SEMI) {
this.errors.missingSemicolonAfterCharacterReference();
}
this.errors.validateNumericCharacterReference(this.result);
}
return this.consumed;
};
/**
* Parses a named entity.
*
* Equivalent to the `Named character reference state` in the HTML spec.
*
* @param str The string containing the entity (or a continuation of the entity).
* @param offset The current offset.
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
*/
EntityDecoder.prototype.stateNamedEntity = function (str, offset) {
var decodeTree = this.decodeTree;
var current = decodeTree[this.treeIndex];
// The mask is the number of bytes of the value, including the current byte.
var valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
for (; offset < str.length; offset++, this.excess++) {
var char = str.charCodeAt(offset);
this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
if (this.treeIndex < 0) {
return this.result === 0 ||
// If we are parsing an attribute
(this.decodeMode === DecodingMode.Attribute &&
// We shouldn't have consumed any characters after the entity,
(valueLength === 0 ||
// And there should be no invalid characters.
isEntityInAttributeInvalidEnd(char)))
? 0
: this.emitNotTerminatedNamedEntity();
}
current = decodeTree[this.treeIndex];
valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
// If the branch is a value, store it and continue
if (valueLength !== 0) {
// If the entity is terminated by a semicolon, we are done.
if (char === CharCodes.SEMI) {
return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);
}
// If we encounter a non-terminated (legacy) entity while parsing strictly, then ignore it.
if (this.decodeMode !== DecodingMode.Strict) {
this.result = this.treeIndex;
this.consumed += this.excess;
this.excess = 0;
}
}
}
return -1;
};
/**
* Emit a named entity that was not terminated with a semicolon.
*
* @returns The number of characters consumed.
*/
EntityDecoder.prototype.emitNotTerminatedNamedEntity = function () {
var _a;
var _b = this, result = _b.result, decodeTree = _b.decodeTree;
var valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;
this.emitNamedEntityData(result, valueLength, this.consumed);
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference();
return this.consumed;
};
/**
* Emit a named entity.
*
* @param result The index of the entity in the decode tree.
* @param valueLength The number of bytes in the entity.
* @param consumed The number of characters consumed.
*
* @returns The number of characters consumed.
*/
EntityDecoder.prototype.emitNamedEntityData = function (result, valueLength, consumed) {
var decodeTree = this.decodeTree;
this.emitCodePoint(valueLength === 1
? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH
: decodeTree[result + 1], consumed);
if (valueLength === 3) {
// For multi-byte values, we need to emit the second byte.
this.emitCodePoint(decodeTree[result + 2], consumed);
}
return consumed;
};
/**
* Signal to the parser that the end of the input was reached.
*
* Remaining data will be emitted and relevant errors will be produced.
*
* @returns The number of characters consumed.
*/
EntityDecoder.prototype.end = function () {
var _a;
switch (this.state) {
case EntityDecoderState.NamedEntity: {
// Emit a named entity if we have one.
return this.result !== 0 &&
(this.decodeMode !== DecodingMode.Attribute ||
this.result === this.treeIndex)
? this.emitNotTerminatedNamedEntity()
: 0;
}
// Otherwise, emit a numeric entity if we have one.
case EntityDecoderState.NumericDecimal: {
return this.emitNumericEntity(0, 2);
}
case EntityDecoderState.NumericHex: {
return this.emitNumericEntity(0, 3);
}
case EntityDecoderState.NumericStart: {
(_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed);
return 0;
}
case EntityDecoderState.EntityStart: {
// Return 0 if we have no entity.
return 0;
}
}
};
return EntityDecoder;
}());
exports.EntityDecoder = EntityDecoder;
/**
* Creates a function that decodes entities in a string.
*
* @param decodeTree The decode tree.
* @returns A function that decodes entities in a string.
*/
function getDecoder(decodeTree) {
var ret = "";
var decoder = new EntityDecoder(decodeTree, function (str) { return (ret += (0, decode_codepoint_js_1.fromCodePoint)(str)); });
return function decodeWithTrie(str, decodeMode) {
var lastIndex = 0;
var offset = 0;
while ((offset = str.indexOf("&", offset)) >= 0) {
ret += str.slice(lastIndex, offset);
decoder.startEntity(decodeMode);
var len = decoder.write(str,
// Skip the "&"
offset + 1);
if (len < 0) {
lastIndex = offset + decoder.end();
break;
}
lastIndex = offset + len;
// If `len` is 0, skip the current `&` and continue.
offset = len === 0 ? lastIndex + 1 : lastIndex;
}
var result = ret + str.slice(lastIndex);
// Make sure we don't keep a reference to the final string.
ret = "";
return result;
};
}
/**
* Determines the branch of the current node that is taken given the current
* character. This function is used to traverse the trie.
*
* @param decodeTree The trie.
* @param current The current node.
* @param nodeIdx The index right after the current node and its value.
* @param char The current character.
* @returns The index of the next node, or -1 if no branch is taken.
*/
function determineBranch(decodeTree, current, nodeIdx, char) {
var branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
var jumpOffset = current & BinTrieFlags.JUMP_TABLE;
// Case 1: Single branch encoded in jump offset
if (branchCount === 0) {
return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1;
}
// Case 2: Multiple branches encoded in jump table
if (jumpOffset) {
var value = char - jumpOffset;
return value < 0 || value >= branchCount
? -1
: decodeTree[nodeIdx + value] - 1;
}
// Case 3: Multiple branches encoded in dictionary
// Binary search for the character.
var lo = nodeIdx;
var hi = lo + branchCount - 1;
while (lo <= hi) {
var mid = (lo + hi) >>> 1;
var midVal = decodeTree[mid];
if (midVal < char) {
lo = mid + 1;
}
else if (midVal > char) {
hi = mid - 1;
}
else {
return decodeTree[mid + branchCount];
}
}
return -1;
}
exports.determineBranch = determineBranch;
var htmlDecoder = getDecoder(decode_data_html_js_1.default);
var xmlDecoder = getDecoder(decode_data_xml_js_1.default);
/**
* Decodes an HTML string.
*
* @param str The string to decode.
* @param mode The decoding mode.
* @returns The decoded string.
*/
function decodeHTML(str, mode) {
if (mode === void 0) { mode = DecodingMode.Legacy; }
return htmlDecoder(str, mode);
}
exports.decodeHTML = decodeHTML;
/**
* Decodes an HTML string in an attribute.
*
* @param str The string to decode.
* @returns The decoded string.
*/
function decodeHTMLAttribute(str) {
return htmlDecoder(str, DecodingMode.Attribute);
}
exports.decodeHTMLAttribute = decodeHTMLAttribute;
/**
* Decodes an HTML string, requiring all entities to be terminated by a semicolon.
*
* @param str The string to decode.
* @returns The decoded string.
*/
function decodeHTMLStrict(str) {
return htmlDecoder(str, DecodingMode.Strict);
}
exports.decodeHTMLStrict = decodeHTMLStrict;
/**
* Decodes an XML string, requiring all entities to be terminated by a semicolon.
*
* @param str The string to decode.
* @returns The decoded string.
*/
function decodeXML(str) {
return xmlDecoder(str, DecodingMode.Strict);
}
exports.decodeXML = decodeXML;
//# sourceMappingURL=decode.js.map

View File

@@ -0,0 +1,2 @@
type ICUTags<MessageString extends string, TagsFn> = MessageString extends `${infer Prefix}<${infer TagName}>${infer Content}</${string}>${infer Tail}` ? Record<TagName, TagsFn> & ICUTags<`${Prefix}${Content}${Tail}`, TagsFn> : {};
export default ICUTags;

View File

@@ -0,0 +1,31 @@
function isReference(node, parent) {
if (node.type === 'MemberExpression') {
return !node.computed && isReference(node.object, node);
}
if (node.type === 'Identifier') {
if (!parent)
return true;
switch (parent.type) {
// disregard `bar` in `foo.bar`
case 'MemberExpression': return parent.computed || node === parent.object;
// disregard the `foo` in `class {foo(){}}` but keep it in `class {[foo](){}}`
case 'MethodDefinition': return parent.computed;
// disregard the `foo` in `class {foo=bar}` but keep it in `class {[foo]=bar}` and `class {bar=foo}`
case 'FieldDefinition': return parent.computed || node === parent.value;
// disregard the `bar` in `{ bar: foo }`, but keep it in `{ [bar]: foo }`
case 'Property': return parent.computed || node === parent.value;
// disregard the `bar` in `export { foo as bar }` or
// the foo in `import { foo as bar }`
case 'ExportSpecifier':
case 'ImportSpecifier': return node === parent.local;
// disregard the `foo` in `foo: while (...) { ... break foo; ... continue foo;}`
case 'LabeledStatement':
case 'BreakStatement':
case 'ContinueStatement': return false;
default: return true;
}
}
return false;
}
export default isReference;

View File

@@ -0,0 +1 @@
{"version":3,"file":"hard-drive-upload.js","sources":["../../../src/icons/hard-drive-upload.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name HardDriveUpload\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTYgNi00LTQtNCA0IiAvPgogIDxwYXRoIGQ9Ik0xMiAydjgiIC8+CiAgPHJlY3Qgd2lkdGg9IjIwIiBoZWlnaHQ9IjgiIHg9IjIiIHk9IjE0IiByeD0iMiIgLz4KICA8cGF0aCBkPSJNNiAxOGguMDEiIC8+CiAgPHBhdGggZD0iTTEwIDE4aC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/hard-drive-upload\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst HardDriveUpload = createLucideIcon('HardDriveUpload', [\n ['path', { d: 'm16 6-4-4-4 4', key: '13yo43' }],\n ['path', { d: 'M12 2v8', key: '1q4o3n' }],\n ['rect', { width: '20', height: '8', x: '2', y: '14', rx: '2', key: 'w68u3i' }],\n ['path', { d: 'M6 18h.01', key: 'uhywen' }],\n ['path', { d: 'M10 18h.01', key: 'h775k' }],\n]);\n\nexport default HardDriveUpload;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,SAAS,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,136 @@
# Release history
**All notable changes to this project will be documented in this file.**
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
<details>
<summary><strong>Guiding Principles</strong></summary>
- Changelogs are for humans, not machines.
- There should be an entry for every single version.
- The same types of changes should be grouped.
- Versions and sections should be linkable.
- The latest version comes first.
- The release date of each versions is displayed.
- Mention whether you follow Semantic Versioning.
</details>
<details>
<summary><strong>Types of changes</strong></summary>
Changelog entries are classified using the following labels _(from [keep-a-changelog](http://keepachangelog.com/)_):
- `Added` for new features.
- `Changed` for changes in existing functionality.
- `Deprecated` for soon-to-be removed features.
- `Removed` for now removed features.
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.
</details>
## 2.3.1 (2022-01-02)
### Fixed
* Fixes bug when a pattern containing an expression after the closing parenthesis (`/!(*.d).{ts,tsx}`) was incorrectly converted to regexp ([9f241ef](https://github.com/micromatch/picomatch/commit/9f241ef)).
### Changed
* Some documentation improvements ([f81d236](https://github.com/micromatch/picomatch/commit/f81d236), [421e0e7](https://github.com/micromatch/picomatch/commit/421e0e7)).
## 2.3.0 (2021-05-21)
### Fixed
* Fixes bug where file names with two dots were not being matched consistently with negation extglobs containing a star ([56083ef](https://github.com/micromatch/picomatch/commit/56083ef))
## 2.2.3 (2021-04-10)
### Fixed
* Do not skip pattern seperator for square brackets ([fb08a30](https://github.com/micromatch/picomatch/commit/fb08a30)).
* Set negatedExtGlob also if it does not span the whole pattern ([032e3f5](https://github.com/micromatch/picomatch/commit/032e3f5)).
## 2.2.2 (2020-03-21)
### Fixed
* Correctly handle parts of the pattern after parentheses in the `scan` method ([e15b920](https://github.com/micromatch/picomatch/commit/e15b920)).
## 2.2.1 (2020-01-04)
* Fixes [#49](https://github.com/micromatch/picomatch/issues/49), so that braces with no sets or ranges are now propertly treated as literals.
## 2.2.0 (2020-01-04)
* Disable fastpaths mode for the parse method ([5b8d33f](https://github.com/micromatch/picomatch/commit/5b8d33f))
* Add `tokens`, `slashes`, and `parts` to the object returned by `picomatch.scan()`.
## 2.1.0 (2019-10-31)
* add benchmarks for scan ([4793b92](https://github.com/micromatch/picomatch/commit/4793b92))
* Add eslint object-curly-spacing rule ([707c650](https://github.com/micromatch/picomatch/commit/707c650))
* Add prefer-const eslint rule ([5c7501c](https://github.com/micromatch/picomatch/commit/5c7501c))
* Add support for nonegate in scan API ([275c9b9](https://github.com/micromatch/picomatch/commit/275c9b9))
* Change lets to consts. Move root import up. ([4840625](https://github.com/micromatch/picomatch/commit/4840625))
* closes https://github.com/micromatch/picomatch/issues/21 ([766bcb0](https://github.com/micromatch/picomatch/commit/766bcb0))
* Fix "Extglobs" table in readme ([eb19da8](https://github.com/micromatch/picomatch/commit/eb19da8))
* fixes https://github.com/micromatch/picomatch/issues/20 ([9caca07](https://github.com/micromatch/picomatch/commit/9caca07))
* fixes https://github.com/micromatch/picomatch/issues/26 ([fa58f45](https://github.com/micromatch/picomatch/commit/fa58f45))
* Lint test ([d433a34](https://github.com/micromatch/picomatch/commit/d433a34))
* lint unit tests ([0159b55](https://github.com/micromatch/picomatch/commit/0159b55))
* Make scan work with noext ([6c02e03](https://github.com/micromatch/picomatch/commit/6c02e03))
* minor linting ([c2a2b87](https://github.com/micromatch/picomatch/commit/c2a2b87))
* minor parser improvements ([197671d](https://github.com/micromatch/picomatch/commit/197671d))
* remove eslint since it... ([07876fa](https://github.com/micromatch/picomatch/commit/07876fa))
* remove funding file ([8ebe96d](https://github.com/micromatch/picomatch/commit/8ebe96d))
* Remove unused funks ([cbc6d54](https://github.com/micromatch/picomatch/commit/cbc6d54))
* Run eslint during pretest, fix existing eslint findings ([0682367](https://github.com/micromatch/picomatch/commit/0682367))
* support `noparen` in scan ([3d37569](https://github.com/micromatch/picomatch/commit/3d37569))
* update changelog ([7b34e77](https://github.com/micromatch/picomatch/commit/7b34e77))
* update travis ([777f038](https://github.com/micromatch/picomatch/commit/777f038))
* Use eslint-disable-next-line instead of eslint-disable ([4e7c1fd](https://github.com/micromatch/picomatch/commit/4e7c1fd))
## 2.0.7 (2019-05-14)
* 2.0.7 ([9eb9a71](https://github.com/micromatch/picomatch/commit/9eb9a71))
* supports lookbehinds ([1f63f7e](https://github.com/micromatch/picomatch/commit/1f63f7e))
* update .verb.md file with typo change ([2741279](https://github.com/micromatch/picomatch/commit/2741279))
* fix: typo in README ([0753e44](https://github.com/micromatch/picomatch/commit/0753e44))
## 2.0.4 (2019-04-10)
### Fixed
- Readme link [fixed](https://github.com/micromatch/picomatch/pull/13/commits/a96ab3aa2b11b6861c23289964613d85563b05df) by @danez.
- `options.capture` now works as expected when fastpaths are enabled. See https://github.com/micromatch/picomatch/pull/12/commits/26aefd71f1cfaf95c37f1c1fcab68a693b037304. Thanks to @DrPizza.
## 2.0.0 (2019-04-10)
### Added
- Adds support for `options.onIgnore`. See the readme for details
- Adds support for `options.onResult`. See the readme for details
### Breaking changes
- The unixify option was renamed to `windows`
- caching and all related options and methods have been removed
## 1.0.0 (2018-11-05)
- adds `.onMatch` option
- improvements to `.scan` method
- numerous improvements and optimizations for matching and parsing
- better windows path handling
## 0.1.0 - 2017-04-13
First release.
[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog

Some files were not shown because too many files have changed in this diff Show More