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,58 @@
import type {FuncKeywordDefinition, AnySchemaObject} from "ajv"
import equal = require("fast-deep-equal")
const SCALAR_TYPES = ["number", "integer", "string", "boolean", "null"]
export default function getDef(): FuncKeywordDefinition {
return {
keyword: "uniqueItemProperties",
type: "array",
schemaType: "array",
compile(keys: string[], parentSchema: AnySchemaObject) {
const scalar = getScalarKeys(keys, parentSchema)
return (data) => {
if (data.length <= 1) return true
for (let k = 0; k < keys.length; k++) {
const key = keys[k]
if (scalar[k]) {
const hash: Record<string, any> = {}
for (const x of data) {
if (!x || typeof x != "object") continue
let p = x[key]
if (p && typeof p == "object") continue
if (typeof p == "string") p = '"' + p
if (hash[p]) return false
hash[p] = true
}
} else {
for (let i = data.length; i--; ) {
const x = data[i]
if (!x || typeof x != "object") continue
for (let j = i; j--; ) {
const y = data[j]
if (y && typeof y == "object" && equal(x[key], y[key])) return false
}
}
}
}
return true
}
},
metaSchema: {
type: "array",
items: {type: "string"},
},
}
}
function getScalarKeys(keys: string[], schema: AnySchemaObject): boolean[] {
return keys.map((key) => {
const t = schema.items?.properties?.[key]?.type
return Array.isArray(t)
? !t.includes("object") && !t.includes("array")
: SCALAR_TYPES.includes(t)
})
}
module.exports = getDef

View File

@@ -0,0 +1 @@
exports._default = require("./use-isomorphic-layout-effect.browser.cjs.js").default;

View File

@@ -0,0 +1,20 @@
import { MetricRatingThresholds, ReportOpts, TTFBMetric } from './types';
/** Thresholds for TTFB. See https://web.dev/articles/ttfb#what_is_a_good_ttfb_score */
export declare const TTFBThresholds: MetricRatingThresholds;
/**
* Calculates the [TTFB](https://web.dev/articles/ttfb) value for the
* current page and calls the `callback` function once the page has loaded,
* along with the relevant `navigation` performance entry used to determine the
* value. The reported value is a `DOMHighResTimeStamp`.
*
* Note, this function waits until after the page is loaded to call `callback`
* in order to ensure all properties of the `navigation` entry are populated.
* This is useful if you want to report on other metrics exposed by the
* [Navigation Timing API](https://w3c.github.io/navigation-timing/). For
* example, the TTFB metric starts from the page's [time
* origin](https://www.w3.org/TR/hr-time-2/#sec-time-origin), which means it
* includes time spent on DNS lookup, connection negotiation, network latency,
* and server processing time.
*/
export declare const onTTFB: (onReport: (metric: TTFBMetric) => void, opts?: ReportOpts) => void;
//# sourceMappingURL=onTTFB.d.ts.map

View File

@@ -0,0 +1,31 @@
const accusativeWeekdays = [
"neděli",
"pondělí",
"úterý",
"středu",
"čtvrtek",
"pátek",
"sobotu",
];
const formatRelativeLocale = {
lastWeek: "'poslední' eeee 've' p",
yesterday: "'včera v' p",
today: "'dnes v' p",
tomorrow: "'zítra v' p",
nextWeek: (date) => {
const day = date.getDay();
return "'v " + accusativeWeekdays[day] + " o' p";
},
other: "P",
};
export const formatRelative = (token, date) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date);
}
return format;
};

View File

@@ -0,0 +1,67 @@
import { Decimal } from "decimal.js";
import "../types/number.js";
import { invariant } from "../utils.js";
import { getPowerOf10 } from "./decimal-cache.js";
Decimal.set({ toExpPos: 100 });
/**
* The abstract operation ComputeExponentForMagnitude computes an exponent by which to scale a
* number of the given magnitude (power of ten of the most significant digit) according to the
* locale and the desired notation (scientific, engineering, or compact).
*/
export function ComputeExponentForMagnitude(internalSlots, magnitude) {
const { notation, dataLocaleData, numberingSystem } = internalSlots;
switch (notation) {
case "standard": return 0;
case "scientific": return magnitude.toNumber();
case "engineering":
const thousands = magnitude.div(3).floor();
return thousands.times(3).toNumber();
default: {
invariant(notation === "compact", "Invalid notation");
// Let exponent be an implementation- and locale-dependent (ILD) integer by which to scale a
// number of the given magnitude in compact notation for the current locale.
const { compactDisplay, style, currencyDisplay } = internalSlots;
let thresholdMap;
if (style === "currency" && currencyDisplay !== "name") {
const currency = dataLocaleData.numbers.currency[numberingSystem] || dataLocaleData.numbers.currency[dataLocaleData.numbers.nu[0]];
thresholdMap = currency.short;
} else {
const decimal = dataLocaleData.numbers.decimal[numberingSystem] || dataLocaleData.numbers.decimal[dataLocaleData.numbers.nu[0]];
thresholdMap = compactDisplay === "long" ? decimal.long : decimal.short;
}
if (!thresholdMap) {
return 0;
}
const num = getPowerOf10(magnitude).toString();
const thresholds = Object.keys(thresholdMap);
if (num < thresholds[0]) {
return 0;
}
if (num > thresholds[thresholds.length - 1]) {
// GH #4236: When number exceeds max threshold, use the exponent
// corresponding to the largest available threshold in locale data.
// Calculate exponent the same way as for normal thresholds (lines 70-73).
const magnitudeKey = thresholds[thresholds.length - 1];
const compactPattern = thresholdMap[magnitudeKey].other;
if (compactPattern === "0") {
return 0;
}
return magnitudeKey.length - thresholdMap[magnitudeKey].other.match(/0+/)[0].length;
}
const i = thresholds.indexOf(num);
if (i === -1) {
return 0;
}
// See https://unicode.org/reports/tr35/tr35-numbers.html#Compact_Number_Formats
// Special handling if the pattern is precisely `0`.
const magnitudeKey = thresholds[i];
// TODO: do we need to handle plural here?
const compactPattern = thresholdMap[magnitudeKey].other;
if (compactPattern === "0") {
return 0;
}
// Example: in zh-TW, `10000000` maps to `0000萬`. So we need to return 8 - 4 = 4 here.
return magnitudeKey.length - thresholdMap[magnitudeKey].other.match(/0+/)[0].length;
}
}
}

View File

@@ -0,0 +1,14 @@
import type { SanitizedCollectionConfig } from 'payload';
import React from 'react';
import type { DocumentDrawerContextType } from '../DocumentDrawer/Provider.js';
export type Props = {
readonly buttonId?: string;
readonly collectionSlug: SanitizedCollectionConfig['slug'];
readonly id?: string;
readonly onDelete?: DocumentDrawerContextType['onDelete'];
readonly redirectAfterDelete?: boolean;
readonly singularLabel: SanitizedCollectionConfig['labels']['singular'];
readonly title?: string;
};
export declare const PermanentlyDeleteButton: React.FC<Props>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,201 @@
/*
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License.
See the accompanying LICENSE file for terms.
*/
import { memoize, strategies } from "@formatjs/fast-memoize";
import { parse } from "@formatjs/icu-messageformat-parser";
import { formatToParts, PART_TYPE } from "./formatters.js";
// -- MessageFormat --------------------------------------------------------
function mergeConfig(c1, c2) {
if (!c2) {
return c1;
}
return {
...c1,
...c2,
...Object.keys(c1).reduce((all, k) => {
all[k] = {
...c1[k],
...c2[k]
};
return all;
}, {})
};
}
function mergeConfigs(defaultConfig, configs) {
if (!configs) {
return defaultConfig;
}
return Object.keys(defaultConfig).reduce((all, k) => {
all[k] = mergeConfig(defaultConfig[k], configs[k]);
return all;
}, { ...defaultConfig });
}
function createFastMemoizeCache(store) {
return { create() {
return {
get(key) {
return store[key];
},
set(key, value) {
store[key] = value;
}
};
} };
}
function createDefaultFormatters(cache = {
number: {},
dateTime: {},
pluralRules: {}
}) {
return {
getNumberFormat: memoize((...args) => new Intl.NumberFormat(...args), {
cache: createFastMemoizeCache(cache.number),
strategy: strategies.variadic
}),
getDateTimeFormat: memoize((...args) => new Intl.DateTimeFormat(...args), {
cache: createFastMemoizeCache(cache.dateTime),
strategy: strategies.variadic
}),
getPluralRules: memoize((...args) => new Intl.PluralRules(...args), {
cache: createFastMemoizeCache(cache.pluralRules),
strategy: strategies.variadic
})
};
}
export class IntlMessageFormat {
ast;
locales;
resolvedLocale;
formatters;
formats;
message;
formatterCache = {
number: {},
dateTime: {},
pluralRules: {}
};
constructor(message, locales = IntlMessageFormat.defaultLocale, overrideFormats, opts) {
// Defined first because it's used to build the format pattern.
this.locales = locales;
this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);
if (typeof message === "string") {
this.message = message;
if (!IntlMessageFormat.__parse) {
throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
}
const { ...parseOpts } = opts || {};
// Parse string messages into an AST.
this.ast = IntlMessageFormat.__parse(message, {
...parseOpts,
locale: this.resolvedLocale
});
} else {
this.ast = message;
}
if (!Array.isArray(this.ast)) {
throw new TypeError("A message must be provided as a String or AST.");
}
// Creates a new object with the specified `formats` merged with the default
// formats.
this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
this.formatters = opts && opts.formatters || createDefaultFormatters(this.formatterCache);
}
format = (values) => {
const parts = this.formatToParts(values);
// Hot path for straight simple msg translations
if (parts.length === 1) {
return parts[0].value;
}
const result = parts.reduce((all, part) => {
if (!all.length || part.type !== PART_TYPE.literal || typeof all[all.length - 1] !== "string") {
all.push(part.value);
} else {
all[all.length - 1] += part.value;
}
return all;
}, []);
if (result.length <= 1) {
return result[0] || "";
}
return result;
};
formatToParts = (values) => formatToParts(this.ast, this.locales, this.formatters, this.formats, values, undefined, this.message);
resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] });
getAst = () => this.ast;
static memoizedDefaultLocale = null;
static get defaultLocale() {
if (!IntlMessageFormat.memoizedDefaultLocale) {
IntlMessageFormat.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
}
return IntlMessageFormat.memoizedDefaultLocale;
}
static resolveLocale = (locales) => {
if (typeof Intl.Locale === "undefined") {
return;
}
const supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);
if (supportedLocales.length > 0) {
return new Intl.Locale(supportedLocales[0]);
}
return new Intl.Locale(typeof locales === "string" ? locales : locales[0]);
};
static __parse = parse;
// Default format options used as the prototype of the `formats` provided to the
// constructor. These are used when constructing the internal Intl.NumberFormat
// and Intl.DateTimeFormat instances.
static formats = {
number: {
integer: { maximumFractionDigits: 0 },
currency: { style: "currency" },
percent: { style: "percent" }
},
date: {
short: {
month: "numeric",
day: "numeric",
year: "2-digit"
},
medium: {
month: "short",
day: "numeric",
year: "numeric"
},
long: {
month: "long",
day: "numeric",
year: "numeric"
},
full: {
weekday: "long",
month: "long",
day: "numeric",
year: "numeric"
}
},
time: {
short: {
hour: "numeric",
minute: "numeric"
},
medium: {
hour: "numeric",
minute: "numeric",
second: "numeric"
},
long: {
hour: "numeric",
minute: "numeric",
second: "numeric",
timeZoneName: "short"
},
full: {
hour: "numeric",
minute: "numeric",
second: "numeric",
timeZoneName: "short"
}
}
};
}

View File

@@ -0,0 +1,16 @@
/**
* @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 MessageSquareDot = createLucideIcon("MessageSquareDot", [
["path", { d: "M11.7 3H5a2 2 0 0 0-2 2v16l4-4h12a2 2 0 0 0 2-2v-2.7", key: "uodpkb" }],
["circle", { cx: "18", cy: "6", r: "3", key: "1h7g24" }]
]);
export { MessageSquareDot as default };
//# sourceMappingURL=message-square-dot.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"users.cjs","names":[],"sources":["../../../../src/rest/commands/delete/users.ts"],"sourcesContent":["import type { DirectusUser } from '../../../schema/user.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\n/**\n * Delete multiple existing users.\n *\n * @param keys\n * @returns Nothing\n * @throws Will throw if keys is empty\n */\nexport const deleteUsers =\n\t<Schema>(keys: DirectusUser<Schema>['id'][]): RestCommand<void, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(keys, 'Keys cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/users`,\n\t\t\tbody: JSON.stringify(keys),\n\t\t\tmethod: 'DELETE',\n\t\t};\n\t};\n\n/**\n * Delete an existing user.\n *\n * @param key\n * @returns Nothing\n * @throws Will throw if key is empty\n */\nexport const deleteUser =\n\t<Schema>(key: DirectusUser<Schema>['id']): RestCommand<void, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/users/${key}`,\n\t\t\tmethod: 'DELETE',\n\t\t};\n\t};\n"],"mappings":"kDAWa,EACH,QAER,EAAA,aAAa,EAAM,uBAAuB,CAEnC,CACN,KAAM,SACN,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,SACR,EAUU,EACH,QAER,EAAA,aAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,UAAU,IAChB,OAAQ,SACR"}

View File

@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.counterReset = void 0;
var parser_1 = require("../syntax/parser");
exports.counterReset = {
name: 'counter-reset',
initialValue: 'none',
prefix: true,
type: 1 /* LIST */,
parse: function (_context, tokens) {
if (tokens.length === 0) {
return [];
}
var resets = [];
var filtered = tokens.filter(parser_1.nonWhiteSpace);
for (var i = 0; i < filtered.length; i++) {
var counter = filtered[i];
var next = filtered[i + 1];
if (parser_1.isIdentToken(counter) && counter.value !== 'none') {
var reset = next && parser_1.isNumberToken(next) ? next.number : 0;
resets.push({ counter: counter.value, reset: reset });
}
}
return resets;
}
};
//# sourceMappingURL=counter-reset.js.map

View File

@@ -0,0 +1,395 @@
import { isNode } from '../language/ast.mjs';
import { Kind } from '../language/kinds.mjs';
import { getEnterLeaveForKind } from '../language/visitor.mjs';
import {
getNamedType,
getNullableType,
isCompositeType,
isEnumType,
isInputObjectType,
isInputType,
isInterfaceType,
isListType,
isObjectType,
isOutputType,
} from '../type/definition.mjs';
import {
SchemaMetaFieldDef,
TypeMetaFieldDef,
TypeNameMetaFieldDef,
} from '../type/introspection.mjs';
import { typeFromAST } from './typeFromAST.mjs';
/**
* TypeInfo is a utility class which, given a GraphQL schema, can keep track
* of the current field and type definitions at any point in a GraphQL document
* AST during a recursive descent by calling `enter(node)` and `leave(node)`.
*/
export class TypeInfo {
constructor(
schema,
/**
* Initial type may be provided in rare cases to facilitate traversals
* beginning somewhere other than documents.
*/
initialType,
/** @deprecated will be removed in 17.0.0 */
getFieldDefFn,
) {
this._schema = schema;
this._typeStack = [];
this._parentTypeStack = [];
this._inputTypeStack = [];
this._fieldDefStack = [];
this._defaultValueStack = [];
this._directive = null;
this._argument = null;
this._enumValue = null;
this._getFieldDef =
getFieldDefFn !== null && getFieldDefFn !== void 0
? getFieldDefFn
: getFieldDef;
if (initialType) {
if (isInputType(initialType)) {
this._inputTypeStack.push(initialType);
}
if (isCompositeType(initialType)) {
this._parentTypeStack.push(initialType);
}
if (isOutputType(initialType)) {
this._typeStack.push(initialType);
}
}
}
get [Symbol.toStringTag]() {
return 'TypeInfo';
}
getType() {
if (this._typeStack.length > 0) {
return this._typeStack[this._typeStack.length - 1];
}
}
getParentType() {
if (this._parentTypeStack.length > 0) {
return this._parentTypeStack[this._parentTypeStack.length - 1];
}
}
getInputType() {
if (this._inputTypeStack.length > 0) {
return this._inputTypeStack[this._inputTypeStack.length - 1];
}
}
getParentInputType() {
if (this._inputTypeStack.length > 1) {
return this._inputTypeStack[this._inputTypeStack.length - 2];
}
}
getFieldDef() {
if (this._fieldDefStack.length > 0) {
return this._fieldDefStack[this._fieldDefStack.length - 1];
}
}
getDefaultValue() {
if (this._defaultValueStack.length > 0) {
return this._defaultValueStack[this._defaultValueStack.length - 1];
}
}
getDirective() {
return this._directive;
}
getArgument() {
return this._argument;
}
getEnumValue() {
return this._enumValue;
}
enter(node) {
const schema = this._schema; // Note: many of the types below are explicitly typed as "unknown" to drop
// any assumptions of a valid schema to ensure runtime types are properly
// checked before continuing since TypeInfo is used as part of validation
// which occurs before guarantees of schema and document validity.
switch (node.kind) {
case Kind.SELECTION_SET: {
const namedType = getNamedType(this.getType());
this._parentTypeStack.push(
isCompositeType(namedType) ? namedType : undefined,
);
break;
}
case Kind.FIELD: {
const parentType = this.getParentType();
let fieldDef;
let fieldType;
if (parentType) {
fieldDef = this._getFieldDef(schema, parentType, node);
if (fieldDef) {
fieldType = fieldDef.type;
}
}
this._fieldDefStack.push(fieldDef);
this._typeStack.push(isOutputType(fieldType) ? fieldType : undefined);
break;
}
case Kind.DIRECTIVE:
this._directive = schema.getDirective(node.name.value);
break;
case Kind.OPERATION_DEFINITION: {
const rootType = schema.getRootType(node.operation);
this._typeStack.push(isObjectType(rootType) ? rootType : undefined);
break;
}
case Kind.INLINE_FRAGMENT:
case Kind.FRAGMENT_DEFINITION: {
const typeConditionAST = node.typeCondition;
const outputType = typeConditionAST
? typeFromAST(schema, typeConditionAST)
: getNamedType(this.getType());
this._typeStack.push(isOutputType(outputType) ? outputType : undefined);
break;
}
case Kind.VARIABLE_DEFINITION: {
const inputType = typeFromAST(schema, node.type);
this._inputTypeStack.push(
isInputType(inputType) ? inputType : undefined,
);
break;
}
case Kind.ARGUMENT: {
var _this$getDirective;
let argDef;
let argType;
const fieldOrDirective =
(_this$getDirective = this.getDirective()) !== null &&
_this$getDirective !== void 0
? _this$getDirective
: this.getFieldDef();
if (fieldOrDirective) {
argDef = fieldOrDirective.args.find(
(arg) => arg.name === node.name.value,
);
if (argDef) {
argType = argDef.type;
}
}
this._argument = argDef;
this._defaultValueStack.push(argDef ? argDef.defaultValue : undefined);
this._inputTypeStack.push(isInputType(argType) ? argType : undefined);
break;
}
case Kind.LIST: {
const listType = getNullableType(this.getInputType());
const itemType = isListType(listType) ? listType.ofType : listType; // List positions never have a default value.
this._defaultValueStack.push(undefined);
this._inputTypeStack.push(isInputType(itemType) ? itemType : undefined);
break;
}
case Kind.OBJECT_FIELD: {
const objectType = getNamedType(this.getInputType());
let inputFieldType;
let inputField;
if (isInputObjectType(objectType)) {
inputField = objectType.getFields()[node.name.value];
if (inputField) {
inputFieldType = inputField.type;
}
}
this._defaultValueStack.push(
inputField ? inputField.defaultValue : undefined,
);
this._inputTypeStack.push(
isInputType(inputFieldType) ? inputFieldType : undefined,
);
break;
}
case Kind.ENUM: {
const enumType = getNamedType(this.getInputType());
let enumValue;
if (isEnumType(enumType)) {
enumValue = enumType.getValue(node.value);
}
this._enumValue = enumValue;
break;
}
default: // Ignore other nodes
}
}
leave(node) {
switch (node.kind) {
case Kind.SELECTION_SET:
this._parentTypeStack.pop();
break;
case Kind.FIELD:
this._fieldDefStack.pop();
this._typeStack.pop();
break;
case Kind.DIRECTIVE:
this._directive = null;
break;
case Kind.OPERATION_DEFINITION:
case Kind.INLINE_FRAGMENT:
case Kind.FRAGMENT_DEFINITION:
this._typeStack.pop();
break;
case Kind.VARIABLE_DEFINITION:
this._inputTypeStack.pop();
break;
case Kind.ARGUMENT:
this._argument = null;
this._defaultValueStack.pop();
this._inputTypeStack.pop();
break;
case Kind.LIST:
case Kind.OBJECT_FIELD:
this._defaultValueStack.pop();
this._inputTypeStack.pop();
break;
case Kind.ENUM:
this._enumValue = null;
break;
default: // Ignore other nodes
}
}
}
/**
* Not exactly the same as the executor's definition of getFieldDef, in this
* statically evaluated environment we do not always have an Object type,
* and need to handle Interface and Union types.
*/
function getFieldDef(schema, parentType, fieldNode) {
const name = fieldNode.name.value;
if (
name === SchemaMetaFieldDef.name &&
schema.getQueryType() === parentType
) {
return SchemaMetaFieldDef;
}
if (name === TypeMetaFieldDef.name && schema.getQueryType() === parentType) {
return TypeMetaFieldDef;
}
if (name === TypeNameMetaFieldDef.name && isCompositeType(parentType)) {
return TypeNameMetaFieldDef;
}
if (isObjectType(parentType) || isInterfaceType(parentType)) {
return parentType.getFields()[name];
}
}
/**
* Creates a new visitor instance which maintains a provided TypeInfo instance
* along with visiting visitor.
*/
export function visitWithTypeInfo(typeInfo, visitor) {
return {
enter(...args) {
const node = args[0];
typeInfo.enter(node);
const fn = getEnterLeaveForKind(visitor, node.kind).enter;
if (fn) {
const result = fn.apply(visitor, args);
if (result !== undefined) {
typeInfo.leave(node);
if (isNode(result)) {
typeInfo.enter(result);
}
}
return result;
}
},
leave(...args) {
const node = args[0];
const fn = getEnterLeaveForKind(visitor, node.kind).leave;
let result;
if (fn) {
result = fn.apply(visitor, args);
}
typeInfo.leave(node);
return result;
},
};
}

View File

@@ -0,0 +1,33 @@
/**
* @name constructNow
* @category Generic Helpers
* @summary Constructs a new current date using the passed value constructor.
* @pure false
*
* @description
* The function constructs a new current date using the constructor from
* the reference date. It helps to build generic functions that accept date
* extensions and use the current date.
*
* It defaults to `Date` if the passed reference date is a number or a string.
*
* @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 date - The reference date to take constructor from
*
* @returns Current date initialized using the given date constructor
*
* @example
* import { constructNow, isSameDay } from 'date-fns'
*
* function isToday<DateType extends Date>(
* date: DateType | number | string,
* ): boolean {
* // If we were to use `new Date()` directly, the function would behave
* // differently in different timezones and return false for the same date.
* return isSameDay(date, constructNow(date));
* }
*/
export declare function constructNow<DateType extends Date>(
date: DateType | number | string,
): DateType;

View File

@@ -0,0 +1,103 @@
import { status as httpStatus } from 'http-status';
import { buildAfterOperation } from '../../collections/operations/utilities/buildAfterOperation.js';
import { buildBeforeOperation } from '../../collections/operations/utilities/buildBeforeOperation.js';
import { APIError } from '../../errors/index.js';
import { combineQueries, Forbidden } from '../../index.js';
import { appendNonTrashedFilter } from '../../utilities/appendNonTrashedFilter.js';
import { commitTransaction } from '../../utilities/commitTransaction.js';
import { initTransaction } from '../../utilities/initTransaction.js';
import { killTransaction } from '../../utilities/killTransaction.js';
import { executeAccess } from '../executeAccess.js';
import { getLoginOptions } from '../getLoginOptions.js';
import { resetLoginAttempts } from '../strategies/local/resetLoginAttempts.js';
export const unlockOperation = async (args)=>{
const { collection: { config: collectionConfig }, overrideAccess, req: { locale }, req } = args;
const loginWithUsername = collectionConfig.auth.loginWithUsername;
const { canLoginWithEmail, canLoginWithUsername } = getLoginOptions(loginWithUsername);
const sanitizedEmail = canLoginWithEmail && (args.data?.email || '').toLowerCase().trim();
const sanitizedUsername = canLoginWithUsername && 'username' in args.data && typeof args.data.username === 'string' && args.data.username.toLowerCase().trim() || null;
if (collectionConfig.auth.disableLocalStrategy) {
throw new Forbidden(req.t);
}
if (!sanitizedEmail && !sanitizedUsername) {
throw new APIError(`Missing ${collectionConfig.auth.loginWithUsername ? 'username' : 'email'}.`, httpStatus.BAD_REQUEST);
}
try {
args = await buildBeforeOperation({
args,
collection: args.collection.config,
operation: 'unlock',
overrideAccess
});
const shouldCommit = await initTransaction(req);
let whereConstraint = {};
// /////////////////////////////////////
// Access
// /////////////////////////////////////
if (!overrideAccess) {
const accessResult = await executeAccess({
req
}, collectionConfig.access.unlock);
if (accessResult && typeof accessResult === 'object') {
whereConstraint = accessResult;
}
}
// /////////////////////////////////////
// Unlock
// /////////////////////////////////////
if (canLoginWithEmail && sanitizedEmail) {
whereConstraint = combineQueries(whereConstraint, {
email: {
equals: sanitizedEmail
}
});
} else if (canLoginWithUsername && sanitizedUsername) {
whereConstraint = combineQueries(whereConstraint, {
username: {
equals: sanitizedUsername
}
});
}
// Exclude trashed users unless `trash: true`
whereConstraint = appendNonTrashedFilter({
enableTrash: Boolean(collectionConfig.trash),
trash: false,
where: whereConstraint
});
const user = await req.payload.db.findOne({
collection: collectionConfig.slug,
locale: locale,
req,
where: whereConstraint
});
let result = null;
if (user) {
await resetLoginAttempts({
collection: collectionConfig,
doc: user,
payload: req.payload,
req
});
result = true;
} else {
result = null;
throw new Forbidden(req.t);
}
if (shouldCommit) {
await commitTransaction(req);
}
result = await buildAfterOperation({
args,
collection: args.collection.config,
operation: 'unlock',
overrideAccess,
result
});
return Boolean(result);
} catch (error) {
await killTransaction(req);
throw error;
}
};
//# sourceMappingURL=unlock.js.map

View File

@@ -0,0 +1,49 @@
import type { ChildNode, ParentNode } from "domhandler";
/**
* Remove an element from the dom
*
* @category Manipulation
* @param elem The element to be removed
*/
export declare function removeElement(elem: ChildNode): void;
/**
* Replace an element in the dom
*
* @category Manipulation
* @param elem The element to be replaced
* @param replacement The element to be added
*/
export declare function replaceElement(elem: ChildNode, replacement: ChildNode): void;
/**
* Append a child to an element.
*
* @category Manipulation
* @param parent The element to append to.
* @param child The element to be added as a child.
*/
export declare function appendChild(parent: ParentNode, child: ChildNode): void;
/**
* Append an element after another.
*
* @category Manipulation
* @param elem The element to append after.
* @param next The element be added.
*/
export declare function append(elem: ChildNode, next: ChildNode): void;
/**
* Prepend a child to an element.
*
* @category Manipulation
* @param parent The element to prepend before.
* @param child The element to be added as a child.
*/
export declare function prependChild(parent: ParentNode, child: ChildNode): void;
/**
* Prepend an element before another.
*
* @category Manipulation
* @param elem The element to prepend before.
* @param prev The element be added.
*/
export declare function prepend(elem: ChildNode, prev: ChildNode): void;
//# sourceMappingURL=manipulation.d.ts.map

View File

@@ -0,0 +1 @@
export { NullifiedContextProvider } from './NullifiedContextProvider';

View File

@@ -0,0 +1,27 @@
var baseIsRegExp = require('./_baseIsRegExp'),
baseUnary = require('./_baseUnary'),
nodeUtil = require('./_nodeUtil');
/* Node.js helper references. */
var nodeIsRegExp = nodeUtil && nodeUtil.isRegExp;
/**
* Checks if `value` is classified as a `RegExp` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
* @example
*
* _.isRegExp(/abc/);
* // => true
*
* _.isRegExp('/abc/');
* // => false
*/
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
module.exports = isRegExp;

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./ru/_lib/formatDistance.js";
import { formatLong } from "./ru/_lib/formatLong.js";
import { formatRelative } from "./ru/_lib/formatRelative.js";
import { localize } from "./ru/_lib/localize.js";
import { match } from "./ru/_lib/match.js";
/**
* @category Locales
* @summary Russian locale.
* @language Russian
* @iso-639-2 rus
* @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)
* @author Lesha Koss [@leshakoss](https://github.com/leshakoss)
*/
export const ru = {
code: "ru",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 1,
},
};
// Fallback for modularized imports:
export default ru;

View File

@@ -0,0 +1 @@
{"version":3,"file":"square-arrow-down-right.js","sources":["../../../src/icons/square-arrow-down-right.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name SquareArrowDownRight\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Im04IDggOCA4IiAvPgogIDxwYXRoIGQ9Ik0xNiA4djhIOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/square-arrow-down-right\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 SquareArrowDownRight = createLucideIcon('SquareArrowDownRight', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', key: 'afitv7' }],\n ['path', { d: 'm8 8 8 8', key: '1imecy' }],\n ['path', { d: 'M16 8v8H8', key: '1lbpgo' }],\n]);\n\nexport default SquareArrowDownRight;\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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB,iBAAiB,sBAAwB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpE,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,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,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,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,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;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,8 @@
"use strict";
function _class_apply_descriptor_get(receiver, descriptor) {
if (descriptor.get) return descriptor.get.call(receiver);
return descriptor.value;
}
exports._ = _class_apply_descriptor_get;

View File

@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './paintbrush-vertical.js';
//# sourceMappingURL=paintbrush-2.js.map

View File

@@ -0,0 +1 @@
export { default } from './plugin/createNextIntlPlugin.js';

View File

@@ -0,0 +1,140 @@
/* -*- Mode: js; js-indent-level: 2; -*- */
/*
* Copyright 2011 Mozilla Foundation and contributors
* Licensed under the New BSD license. See LICENSE or:
* http://opensource.org/licenses/BSD-3-Clause
*
* Based on the Base 64 VLQ implementation in Closure Compiler:
* https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
*
* Copyright 2011 The Closure Compiler Authors. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
var base64 = require('./base64');
// A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign,
// the next four bits are the actual value, and the 6th bit is the
// continuation bit. The continuation bit tells us whether there are more
// digits in this value following this digit.
//
// Continuation
// | Sign
// | |
// V V
// 101011
var VLQ_BASE_SHIFT = 5;
// binary: 100000
var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
// binary: 011111
var VLQ_BASE_MASK = VLQ_BASE - 1;
// binary: 100000
var VLQ_CONTINUATION_BIT = VLQ_BASE;
/**
* Converts from a two-complement value to a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
* 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
*/
function toVLQSigned(aValue) {
return aValue < 0
? ((-aValue) << 1) + 1
: (aValue << 1) + 0;
}
/**
* Converts to a two-complement value from a value where the sign bit is
* placed in the least significant bit. For example, as decimals:
* 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
* 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
*/
function fromVLQSigned(aValue) {
var isNegative = (aValue & 1) === 1;
var shifted = aValue >> 1;
return isNegative
? -shifted
: shifted;
}
/**
* Returns the base 64 VLQ encoded value.
*/
exports.encode = function base64VLQ_encode(aValue) {
var encoded = "";
var digit;
var vlq = toVLQSigned(aValue);
do {
digit = vlq & VLQ_BASE_MASK;
vlq >>>= VLQ_BASE_SHIFT;
if (vlq > 0) {
// There are still more digits in this value, so we must make sure the
// continuation bit is marked.
digit |= VLQ_CONTINUATION_BIT;
}
encoded += base64.encode(digit);
} while (vlq > 0);
return encoded;
};
/**
* Decodes the next base 64 VLQ value from the given string and returns the
* value and the rest of the string via the out parameter.
*/
exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
var strLen = aStr.length;
var result = 0;
var shift = 0;
var continuation, digit;
do {
if (aIndex >= strLen) {
throw new Error("Expected more digits in base 64 VLQ value.");
}
digit = base64.decode(aStr.charCodeAt(aIndex++));
if (digit === -1) {
throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
}
continuation = !!(digit & VLQ_CONTINUATION_BIT);
digit &= VLQ_BASE_MASK;
result = result + (digit << shift);
shift += VLQ_BASE_SHIFT;
} while (continuation);
aOutParam.value = fromVLQSigned(result);
aOutParam.rest = aIndex;
};

View File

@@ -0,0 +1,42 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import * as z from "zod/v3";
function checkErrors(a: z.ZodTypeAny, bad: any) {
let expected: any;
try {
a.parse(bad);
} catch (error) {
expected = (error as z.ZodError).formErrors;
}
try {
a.nullable().parse(bad);
} catch (error) {
expect((error as z.ZodError).formErrors).toEqual(expected);
}
}
test("Should have error messages appropriate for the underlying type", () => {
checkErrors(z.string().min(2), 1);
z.string().min(2).nullable().parse(null);
checkErrors(z.number().gte(2), 1);
z.number().gte(2).nullable().parse(null);
checkErrors(z.boolean(), "");
z.boolean().nullable().parse(null);
checkErrors(z.null(), null);
z.null().nullable().parse(null);
checkErrors(z.null(), {});
z.null().nullable().parse(null);
checkErrors(z.object({}), 1);
z.object({}).nullable().parse(null);
checkErrors(z.tuple([]), 1);
z.tuple([]).nullable().parse(null);
checkErrors(z.unknown(), 1);
z.unknown().nullable().parse(null);
});
test("unwrap", () => {
const unwrapped = z.string().nullable().unwrap();
expect(unwrapped).toBeInstanceOf(z.ZodString);
});

View File

@@ -0,0 +1,28 @@
import { formatDistance } from "./lv/_lib/formatDistance.js";
import { formatLong } from "./lv/_lib/formatLong.js";
import { formatRelative } from "./lv/_lib/formatRelative.js";
import { localize } from "./lv/_lib/localize.js";
import { match } from "./lv/_lib/match.js";
/**
* @category Locales
* @summary Latvian locale (Latvia).
* @language Latvian
* @iso-639-2 lav
* @author Rūdolfs Puķītis [@prudolfs](https://github.com/prudolfs)
*/
export const lv = {
code: "lv",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default lv;

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E zC","260":"F","516":"A B"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0C VC 4C 5C","33":"J bB K D E F A B C L M G"},D:{"1":"0 1 2 3 4 5 6 7 8 FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"J bB K D E F A B C L M G N O P","33":"9 cB AB BB CB DB EB"},E:{"1":"D E F A B C L M G 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB 6C bC 7C","33":"K"},F:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F B C JD KD LD MD PC xC ND QC"},G:{"1":"E RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"bC OD yC PD","33":"QD"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC","132":"rD sD"},J:{"1":"A","2":"D"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:4,C:"calc() as CSS unit value",D:true};

View File

@@ -0,0 +1,30 @@
import { toDate } from "./toDate.js";
/**
* The {@link isSaturday} function options.
*/
/**
* @name isSaturday
* @category Weekday Helpers
* @summary Is the given date Saturday?
*
* @description
* Is the given date Saturday?
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is Saturday
*
* @example
* // Is 27 September 2014 Saturday?
* const result = isSaturday(new Date(2014, 8, 27))
* //=> true
*/
export function isSaturday(date, options) {
return toDate(date, options?.in).getDay() === 6;
}
// Fallback for modularized imports:
export default isSaturday;

View File

@@ -0,0 +1,12 @@
import { Client, Scope, SerializedTraceData, Span } from '@sentry/core';
/**
* Otel-specific implementation of `getTraceData`.
* @see `@sentry/core` version of `getTraceData` for more information
*/
export declare function getTraceData({ span, scope, client, propagateTraceparent, }?: {
span?: Span;
scope?: Scope;
client?: Client;
propagateTraceparent?: boolean;
}): SerializedTraceData;
//# sourceMappingURL=getTraceData.d.ts.map

View File

@@ -0,0 +1,68 @@
const SPAN_STATUS_UNSET = 0;
const SPAN_STATUS_OK = 1;
const SPAN_STATUS_ERROR = 2;
/**
* Converts a HTTP status code into a sentry status with a message.
*
* @param httpStatus The HTTP response status code.
* @returns The span status or internal_error.
*/
// https://develop.sentry.dev/sdk/event-payloads/span/
function getSpanStatusFromHttpCode(httpStatus) {
if (httpStatus < 400 && httpStatus >= 100) {
return { code: SPAN_STATUS_OK };
}
if (httpStatus >= 400 && httpStatus < 500) {
switch (httpStatus) {
case 401:
return { code: SPAN_STATUS_ERROR, message: 'unauthenticated' };
case 403:
return { code: SPAN_STATUS_ERROR, message: 'permission_denied' };
case 404:
return { code: SPAN_STATUS_ERROR, message: 'not_found' };
case 409:
return { code: SPAN_STATUS_ERROR, message: 'already_exists' };
case 413:
return { code: SPAN_STATUS_ERROR, message: 'failed_precondition' };
case 429:
return { code: SPAN_STATUS_ERROR, message: 'resource_exhausted' };
case 499:
return { code: SPAN_STATUS_ERROR, message: 'cancelled' };
default:
return { code: SPAN_STATUS_ERROR, message: 'invalid_argument' };
}
}
if (httpStatus >= 500 && httpStatus < 600) {
switch (httpStatus) {
case 501:
return { code: SPAN_STATUS_ERROR, message: 'unimplemented' };
case 503:
return { code: SPAN_STATUS_ERROR, message: 'unavailable' };
case 504:
return { code: SPAN_STATUS_ERROR, message: 'deadline_exceeded' };
default:
return { code: SPAN_STATUS_ERROR, message: 'internal_error' };
}
}
return { code: SPAN_STATUS_ERROR, message: 'internal_error' };
}
/**
* Sets the Http status attributes on the current span based on the http code.
* Additionally, the span's status is updated, depending on the http code.
*/
function setHttpStatus(span, httpStatus) {
span.setAttribute('http.response.status_code', httpStatus);
const spanStatus = getSpanStatusFromHttpCode(httpStatus);
if (spanStatus.message !== 'unknown_error') {
span.setStatus(spanStatus);
}
}
export { SPAN_STATUS_ERROR, SPAN_STATUS_OK, SPAN_STATUS_UNSET, getSpanStatusFromHttpCode, setHttpStatus };
//# sourceMappingURL=spanstatus.js.map

View File

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

View File

@@ -0,0 +1,22 @@
import { entityKind } from "../../entity.cjs";
import { QueryPromise } from "../../query-promise.cjs";
import type { RunnableQuery } from "../../runnable-query.cjs";
import type { PreparedQuery } from "../../session.cjs";
import type { Query, SQL, SQLWrapper } from "../../sql/sql.cjs";
export interface GelRaw<TResult> extends QueryPromise<TResult>, RunnableQuery<TResult, 'gel'>, SQLWrapper {
}
export declare class GelRaw<TResult> extends QueryPromise<TResult> implements RunnableQuery<TResult, 'gel'>, SQLWrapper, PreparedQuery {
execute: () => Promise<TResult>;
private sql;
private query;
private mapBatchResult;
static readonly [entityKind]: string;
readonly _: {
readonly dialect: 'gel';
readonly result: TResult;
};
constructor(execute: () => Promise<TResult>, sql: SQL, query: Query, mapBatchResult: (result: unknown) => unknown);
getQuery(): Query;
mapResult(result: unknown, isFromBatch?: boolean): unknown;
_prepare(): PreparedQuery;
}

View File

@@ -0,0 +1,33 @@
'use strict'
const textDecoder = new TextDecoder()
/**
* @see https://encoding.spec.whatwg.org/#utf-8-decode
* @param {Uint8Array} buffer
*/
function utf8DecodeBytes (buffer) {
if (buffer.length === 0) {
return ''
}
// 1. Let buffer be the result of peeking three bytes from
// ioQueue, converted to a byte sequence.
// 2. If buffer is 0xEF 0xBB 0xBF, then read three
// bytes from ioQueue. (Do nothing with those bytes.)
if (buffer[0] === 0xEF && buffer[1] === 0xBB && buffer[2] === 0xBF) {
buffer = buffer.subarray(3)
}
// 3. Process a queue with an instance of UTF-8s
// decoder, ioQueue, output, and "replacement".
const output = textDecoder.decode(buffer)
// 4. Return output.
return output
}
module.exports = {
utf8DecodeBytes
}

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("../core");
const _1 = require(".");
const requireFromString = require("require-from-string");
class AjvPack {
constructor(ajv) {
this.ajv = ajv;
}
validate(schemaKeyRef, data) {
return core_1.default.prototype.validate.call(this, schemaKeyRef, data);
}
compile(schema, meta) {
return this.getStandalone(this.ajv.compile(schema, meta));
}
getSchema(keyRef) {
const v = this.ajv.getSchema(keyRef);
if (!v)
return undefined;
return this.getStandalone(v);
}
getStandalone(v) {
return requireFromString((0, _1.default)(this.ajv, v));
}
addSchema(...args) {
this.ajv.addSchema.call(this.ajv, ...args);
return this;
}
addKeyword(...args) {
this.ajv.addKeyword.call(this.ajv, ...args);
return this;
}
}
exports.default = AjvPack;
//# sourceMappingURL=instance.js.map

View File

@@ -0,0 +1,17 @@
import { cache } from 'react';
import { createFormatter } from 'use-intl/core';
import getDefaultNow from './getDefaultNow.js';
function getFormatterCachedImpl(config) {
return createFormatter({
...config,
// Only init when necessary to avoid triggering a `dynamicIO` error
// unnecessarily (`now` is only needed for `format.relativeTime`)
get now() {
return config.now ?? getDefaultNow();
}
});
}
const getFormatterCached = cache(getFormatterCachedImpl);
export { getFormatterCached as default };

View File

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

View File

@@ -0,0 +1,16 @@
/**
* Sanitizes user data for emails to prevent injection of HTML, executable code, or other malicious content.
* This function ensures the content is safe by:
* - Removing HTML tags
* - Removing control characters
* - Normalizing whitespace
* - Escaping special HTML characters
* - Allowing only letters, numbers, spaces, and basic punctuation
* - Limiting length (default 100 characters)
*
* @param data - data to sanitize
* @param maxLength - maximum allowed length (default is 100)
* @returns a sanitized string safe to include in email content
*/
export declare function sanitizeUserDataForEmail(data: unknown, maxLength?: number): string;
//# sourceMappingURL=sanitizeUserDataForEmail.d.ts.map

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvaXMtdW5rbm93bi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSXNBbnkgfSBmcm9tIFwiLi4vaXMtYW55XCI7XG5cbmV4cG9ydCB0eXBlIElzVW5rbm93bjxUeXBlPiA9IElzQW55PFR5cGU+IGV4dGVuZHMgdHJ1ZSA/IGZhbHNlIDogdW5rbm93biBleHRlbmRzIFR5cGUgPyB0cnVlIDogZmFsc2U7XG4iXX0=

View File

@@ -0,0 +1,32 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const keywords_1 = __importDefault(require("./keywords"));
const ajvKeywords = (ajv, keyword) => {
if (Array.isArray(keyword)) {
for (const k of keyword)
get(k)(ajv);
return ajv;
}
if (keyword) {
get(keyword)(ajv);
return ajv;
}
for (keyword in keywords_1.default)
get(keyword)(ajv);
return ajv;
};
ajvKeywords.get = get;
function get(keyword) {
const defFunc = keywords_1.default[keyword];
if (!defFunc)
throw new Error("Unknown keyword " + keyword);
return defFunc;
}
exports.default = ajvKeywords;
module.exports = ajvKeywords;
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
module.exports.default = ajvKeywords;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,5 @@
const file9 = require("./file9.js")
module.exports = function () {
file9()
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/mysql-core/primary-keys.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\nimport type { AnyMySqlColumn, MySqlColumn } from './columns/index.ts';\nimport { MySqlTable } from './table.ts';\n\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumn extends AnyMySqlColumn<{ tableName: TTableName }>,\n\tTColumns extends AnyMySqlColumn<{ tableName: TTableName }>[],\n>(config: { name?: string; columns: [TColumn, ...TColumns] }): PrimaryKeyBuilder;\n/**\n * @deprecated: Please use primaryKey({ columns: [] }) instead of this function\n * @param columns\n */\nexport function primaryKey<\n\tTTableName extends string,\n\tTColumns extends AnyMySqlColumn<{ tableName: TTableName }>[],\n>(...columns: TColumns): PrimaryKeyBuilder;\nexport function primaryKey(...config: any) {\n\tif (config[0].columns) {\n\t\treturn new PrimaryKeyBuilder(config[0].columns, config[0].name);\n\t}\n\treturn new PrimaryKeyBuilder(config);\n}\n\nexport class PrimaryKeyBuilder {\n\tstatic readonly [entityKind]: string = 'MySqlPrimaryKeyBuilder';\n\n\t/** @internal */\n\tcolumns: MySqlColumn[];\n\n\t/** @internal */\n\tname?: string;\n\n\tconstructor(\n\t\tcolumns: MySqlColumn[],\n\t\tname?: string,\n\t) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\t/** @internal */\n\tbuild(table: MySqlTable): PrimaryKey {\n\t\treturn new PrimaryKey(table, this.columns, this.name);\n\t}\n}\n\nexport class PrimaryKey {\n\tstatic readonly [entityKind]: string = 'MySqlPrimaryKey';\n\n\treadonly columns: MySqlColumn[];\n\treadonly name?: string;\n\n\tconstructor(readonly table: MySqlTable, columns: MySqlColumn[], name?: string) {\n\t\tthis.columns = columns;\n\t\tthis.name = name;\n\t}\n\n\tgetName(): string {\n\t\treturn this.name\n\t\t\t?? `${this.table[MySqlTable.Symbol.Name]}_${this.columns.map((column) => column.name).join('_')}_pk`;\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA2B;AAE3B,mBAA2B;AAepB,SAAS,cAAc,QAAa;AAC1C,MAAI,OAAO,CAAC,EAAE,SAAS;AACtB,WAAO,IAAI,kBAAkB,OAAO,CAAC,EAAE,SAAS,OAAO,CAAC,EAAE,IAAI;AAAA,EAC/D;AACA,SAAO,IAAI,kBAAkB,MAAM;AACpC;AAEO,MAAM,kBAAkB;AAAA,EAC9B,QAAiB,wBAAU,IAAY;AAAA;AAAA,EAGvC;AAAA;AAAA,EAGA;AAAA,EAEA,YACC,SACA,MACC;AACD,SAAK,UAAU;AACf,SAAK,OAAO;AAAA,EACb;AAAA;AAAA,EAGA,MAAM,OAA+B;AACpC,WAAO,IAAI,WAAW,OAAO,KAAK,SAAS,KAAK,IAAI;AAAA,EACrD;AACD;AAEO,MAAM,WAAW;AAAA,EAMvB,YAAqB,OAAmB,SAAwB,MAAe;AAA1D;AACpB,SAAK,UAAU;AACf,SAAK,OAAO;AAAA,EACb;AAAA,EARA,QAAiB,wBAAU,IAAY;AAAA,EAE9B;AAAA,EACA;AAAA,EAOT,UAAkB;AACjB,WAAO,KAAK,QACR,GAAG,KAAK,MAAM,wBAAW,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,WAAW,OAAO,IAAI,EAAE,KAAK,GAAG,CAAC;AAAA,EACjG;AACD;","names":[]}

View File

@@ -0,0 +1,2 @@
declare const _default: import("vite").UserConfig;
export default _default;

View File

@@ -0,0 +1,27 @@
var baseIsDate = require('./_baseIsDate'),
baseUnary = require('./_baseUnary'),
nodeUtil = require('./_nodeUtil');
/* Node.js helper references. */
var nodeIsDate = nodeUtil && nodeUtil.isDate;
/**
* Checks if `value` is classified as a `Date` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
* @example
*
* _.isDate(new Date);
* // => true
*
* _.isDate('Mon April 23 2012');
* // => false
*/
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
module.exports = isDate;

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/exports/i18n/hr.ts"],"sourcesContent":["export { hr } from '@payloadcms/translations/languages/hr'\n"],"names":["hr"],"mappings":"AAAA,SAASA,EAAE,QAAQ,wCAAuC"}

View File

@@ -0,0 +1,38 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, d MMMM y 'г.'",
long: "d MMMM y 'г.'",
medium: "d MMM y 'г.'",
short: "dd.MM.y",
};
const timeFormats = {
full: "H:mm:ss zzzz",
long: "H:mm:ss z",
medium: "H:mm:ss",
short: "H:mm",
};
const dateTimeFormats = {
any: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "any",
}),
});

View File

@@ -0,0 +1,24 @@
import { DirectusFile } from "../../../schema/file.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/read/files.d.ts
type ReadFileOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusFile<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* List all files that exist in Directus.
* @param query The query parameters
* @returns An array of up to limit file objects. If no items are available, data will be an empty array.
*/
declare const readFiles: <Schema, const TQuery extends Query<Schema, DirectusFile<Schema>>>(query?: TQuery) => RestCommand<ReadFileOutput<Schema, TQuery>[], Schema>;
/**
* Retrieve a single file by primary key.
* @param key The primary key of the dashboard
* @param query The query parameters
* @returns Returns a file object if a valid primary key was provided.
* @throws Will throw if key is empty
*/
declare const readFile: <Schema, const TQuery extends Query<Schema, DirectusFile<Schema>>>(key: DirectusFile<Schema>["id"], query?: TQuery) => RestCommand<ReadFileOutput<Schema, TQuery>, Schema>;
//#endregion
export { ReadFileOutput, readFile, readFiles };
//# sourceMappingURL=files.d.cts.map

View File

@@ -0,0 +1,22 @@
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import './index.scss';
export function TrashIcon({
className
}) {
return /*#__PURE__*/_jsx("svg", {
className: [className, 'icon icon--trash'].filter(Boolean).join(' '),
fill: "none",
height: "20",
viewBox: "0 0 20 20",
width: "20",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/_jsx("path", {
d: "M4.1499 6.1H15.8499M14.5499 6.1V15.2C14.5499 15.85 13.8999 16.5 13.2499 16.5H6.7499C6.0999 16.5 5.4499 15.85 5.4499 15.2V6.1M7.3999 6.1V4.8C7.3999 4.15 8.0499 3.5 8.6999 3.5H11.2999C11.9499 3.5 12.5999 4.15 12.5999 4.8V6.1M8.6999 9.35V13.25M11.2999 9.35V13.25",
stroke: "currentColor",
strokeLinecap: "round",
strokeLinejoin: "round"
})
});
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,5 @@
# `@lexical/devtools-core`
[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_devtools_core)
This package contains tools necessary to debug and develop Lexical.

View File

@@ -0,0 +1,8 @@
# graphql-playground-html
> **SECURITY WARNING:** This package and all of it's dependendents had a severe XSS Reflection attack vulnerability until version `1.6.22` of this package. You must sanitize any and all user input values to `renderPlaygroundPage()` values. If you used static values in your middlewares, including ours, you were not vulnerable to the attack.
This package is being used by the GraphQL Playground middlewares.
For local development, you can `yarn link` this package, then use `yarn link graphql-playground-html` in the
middleware you want to develop.

View File

@@ -0,0 +1,203 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra and Zackary Jackson @ScriptedAlchemy
*/
"use strict";
const { RawSource } = require("webpack-sources");
const Module = require("../Module");
const { REMOTE_AND_SHARE_INIT_TYPES } = require("../ModuleSourceTypeConstants");
const { WEBPACK_MODULE_TYPE_REMOTE } = require("../ModuleTypeConstants");
const RuntimeGlobals = require("../RuntimeGlobals");
const makeSerializable = require("../util/makeSerializable");
const FallbackDependency = require("./FallbackDependency");
const RemoteToExternalDependency = require("./RemoteToExternalDependency");
/** @typedef {import("../config/defaults").WebpackOptionsNormalizedWithDefaults} WebpackOptions */
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../Module").BuildCallback} BuildCallback */
/** @typedef {import("../Module").CodeGenerationContext} CodeGenerationContext */
/** @typedef {import("../Module").CodeGenerationResultData} CodeGenerationResultData */
/** @typedef {import("../Module").CodeGenerationResult} CodeGenerationResult */
/** @typedef {import("../Module").LibIdentOptions} LibIdentOptions */
/** @typedef {import("../Module").LibIdent} LibIdent */
/** @typedef {import("../Module").NameForCondition} NameForCondition */
/** @typedef {import("../Module").NeedBuildCallback} NeedBuildCallback */
/** @typedef {import("../Module").NeedBuildContext} NeedBuildContext */
/** @typedef {import("../Module").Sources} Sources */
/** @typedef {import("../Module").SourceTypes} SourceTypes */
/** @typedef {import("../ModuleGraph")} ModuleGraph */
/** @typedef {import("../Module").ExportsType} ExportsType */
/** @typedef {import("../RequestShortener")} RequestShortener */
/** @typedef {import("../ResolverFactory").ResolverWithOptions} ResolverWithOptions */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
/** @typedef {import("../util/fs").InputFileSystem} InputFileSystem */
const RUNTIME_REQUIREMENTS = new Set([RuntimeGlobals.module]);
/** @typedef {string[]} ExternalRequests */
class RemoteModule extends Module {
/**
* @param {string} request request string
* @param {ExternalRequests} externalRequests list of external requests to containers
* @param {string} internalRequest name of exposed module in container
* @param {string} shareScope the used share scope name
*/
constructor(request, externalRequests, internalRequest, shareScope) {
super(WEBPACK_MODULE_TYPE_REMOTE);
this.request = request;
this.externalRequests = externalRequests;
this.internalRequest = internalRequest;
this.shareScope = shareScope;
this._identifier = `remote (${shareScope}) ${this.externalRequests.join(
" "
)} ${this.internalRequest}`;
}
/**
* @returns {string} a unique identifier of the module
*/
identifier() {
return this._identifier;
}
/**
* @param {RequestShortener} requestShortener the request shortener
* @returns {string} a user readable identifier of the module
*/
readableIdentifier(requestShortener) {
return `remote ${this.request}`;
}
/**
* @param {LibIdentOptions} options options
* @returns {LibIdent | null} an identifier for library inclusion
*/
libIdent(options) {
return `${this.layer ? `(${this.layer})/` : ""}webpack/container/remote/${
this.request
}`;
}
/**
* @param {NeedBuildContext} context context info
* @param {NeedBuildCallback} callback callback function, returns true, if the module needs a rebuild
* @returns {void}
*/
needBuild(context, callback) {
callback(null, !this.buildInfo);
}
/**
* @param {WebpackOptions} options webpack options
* @param {Compilation} compilation the compilation
* @param {ResolverWithOptions} resolver the resolver
* @param {InputFileSystem} fs the file system
* @param {BuildCallback} callback callback function
* @returns {void}
*/
build(options, compilation, resolver, fs, callback) {
this.buildMeta = {};
this.buildInfo = {
strict: true
};
this.clearDependenciesAndBlocks();
if (this.externalRequests.length === 1) {
this.addDependency(
new RemoteToExternalDependency(this.externalRequests[0])
);
} else {
this.addDependency(new FallbackDependency(this.externalRequests));
}
callback();
}
/**
* @param {string=} type the source type for which the size should be estimated
* @returns {number} the estimated size of the module (must be non-zero)
*/
size(type) {
return 6;
}
/**
* @returns {SourceTypes} types available (do not mutate)
*/
getSourceTypes() {
return REMOTE_AND_SHARE_INIT_TYPES;
}
/**
* @param {ModuleGraph} moduleGraph the module graph
* @param {boolean | undefined} strict the importing module is strict
* @returns {ExportsType} export type
* "namespace": Exports is already a namespace object. namespace = exports.
* "dynamic": Check at runtime if __esModule is set. When set: namespace = { ...exports, default: exports }. When not set: namespace = { default: exports }.
* "default-only": Provide a namespace object with only default export. namespace = { default: exports }
* "default-with-named": Provide a namespace object with named and default export. namespace = { ...exports, default: exports }
*/
getExportsType(moduleGraph, strict) {
return "dynamic";
}
/**
* @returns {NameForCondition | null} absolute path which should be used for condition matching (usually the resource path)
*/
nameForCondition() {
return this.request;
}
/**
* @param {CodeGenerationContext} context context for code generation
* @returns {CodeGenerationResult} result
*/
codeGeneration({ moduleGraph, chunkGraph }) {
const module = moduleGraph.getModule(this.dependencies[0]);
const id = module && chunkGraph.getModuleId(module);
/** @type {Sources} */
const sources = new Map();
sources.set("remote", new RawSource(""));
/** @type {CodeGenerationResultData} */
const data = new Map();
data.set("share-init", [
{
shareScope: this.shareScope,
initStage: 20,
init: id === undefined ? "" : `initExternal(${JSON.stringify(id)});`
}
]);
return { sources, data, runtimeRequirements: RUNTIME_REQUIREMENTS };
}
/**
* @param {ObjectSerializerContext} context context
*/
serialize(context) {
const { write } = context;
write(this.request);
write(this.externalRequests);
write(this.internalRequest);
write(this.shareScope);
super.serialize(context);
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {RemoteModule} deserialized module
*/
static deserialize(context) {
const { read } = context;
const obj = new RemoteModule(read(), read(), read(), read());
obj.deserialize(context);
return obj;
}
}
makeSerializable(RemoteModule, "webpack/lib/container/RemoteModule");
module.exports = RemoteModule;

View File

@@ -0,0 +1,9 @@
import type { FieldWithSubFields, TabsField } from 'payload';
type Args = {
field: FieldWithSubFields | TabsField;
nestedFieldName2: string;
parentName: string;
};
export declare const recursivelyBuildNestedPaths: ({ field, nestedFieldName2, parentName }: Args) => any;
export {};
//# sourceMappingURL=recursivelyBuildNestedPaths.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 { isSameSecond as fn } from "../isSameSecond.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const isSameSecond = convertToFP(fn, 2);
// Fallback for modularized imports:
export default isSameSecond;

View File

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

View File

@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";const t=()=>()=>({path:`/relations`,method:`GET`}),n=e=>()=>({path:`/relations/${e}`,method:`GET`}),r=(t,n)=>()=>(e(t,`Collection cannot be empty`),e(n,`Field cannot be empty`),{path:`/relations/${t}/${n}`,method:`GET`});export{r as readRelation,n as readRelationByCollection,t as readRelations};
//# sourceMappingURL=relations.js.map

View File

@@ -0,0 +1,3 @@
Orchestrion-JS
Copyright 2025-Present Datadog, Inc.
This product includes software developed at Datadog (<https://www.datadoghq.com/>).

View File

@@ -0,0 +1,25 @@
/**
* @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 HandCoins = createLucideIcon("HandCoins", [
["path", { d: "M11 15h2a2 2 0 1 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 17", key: "geh8rc" }],
[
"path",
{
d: "m7 21 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a2 2 0 0 0-2.75-2.91l-4.2 3.9",
key: "1fto5m"
}
],
["path", { d: "m2 16 6 6", key: "1pfhp9" }],
["circle", { cx: "16", cy: "9", r: "2.9", key: "1n0dlu" }],
["circle", { cx: "6", cy: "5", r: "3", key: "151irh" }]
]);
export { HandCoins as default };
//# sourceMappingURL=hand-coins.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"clipboardUtilities.js","names":["isClipboardDataValid","localStorageClipboardKey","clipboardCopy","args","getDataToCopy","t","rest","dataToWrite","data","localStorage","setItem","JSON","stringify","_err","clipboardPaste","onPaste","path","fieldPath","dataToPaste","jsonFromClipboard","getItem","parse","dataToValidate"],"sources":["../../../src/elements/ClipboardAction/clipboardUtilities.ts"],"sourcesContent":["import type {\n ClipboardCopyActionArgs,\n ClipboardPasteActionArgs,\n ClipboardPasteActionValidateArgs,\n ClipboardPasteData,\n} from './types.js'\n\nimport { isClipboardDataValid } from './isClipboardDataValid.js'\n\nconst localStorageClipboardKey = '_payloadClipboard'\n\n/**\n * @note This function doesn't use the Clipboard API, but localStorage. See rationale in #11513\n */\nexport function clipboardCopy(args: ClipboardCopyActionArgs): string | true {\n const { getDataToCopy, t, ...rest } = args\n\n const dataToWrite = {\n data: getDataToCopy(),\n ...rest,\n }\n\n try {\n localStorage.setItem(localStorageClipboardKey, JSON.stringify(dataToWrite))\n return true\n } catch (_err) {\n return t('error:unableToCopy')\n }\n}\n\n/**\n * @note This function doesn't use the Clipboard API, but localStorage. See rationale in #11513\n */\nexport function clipboardPaste({\n onPaste,\n path: fieldPath,\n t,\n ...args\n}: ClipboardPasteActionArgs): string | true {\n let dataToPaste: ClipboardPasteData\n\n try {\n const jsonFromClipboard = localStorage.getItem(localStorageClipboardKey)\n\n if (!jsonFromClipboard) {\n return t('error:invalidClipboardData')\n }\n\n dataToPaste = JSON.parse(jsonFromClipboard)\n } catch (_err) {\n return t('error:invalidClipboardData')\n }\n\n const dataToValidate = {\n ...dataToPaste,\n ...args,\n fieldPath,\n } as ClipboardPasteActionValidateArgs\n\n if (!isClipboardDataValid(dataToValidate)) {\n return t('error:invalidClipboardData')\n }\n\n onPaste(dataToPaste)\n\n return true\n}\n"],"mappings":"AAOA,SAASA,oBAAoB,QAAQ;AAErC,MAAMC,wBAAA,GAA2B;AAEjC;;;AAGA,OAAO,SAASC,cAAcC,IAA6B;EACzD,MAAM;IAAEC,aAAa;IAAEC,CAAC;IAAE,GAAGC;EAAA,CAAM,GAAGH,IAAA;EAEtC,MAAMI,WAAA,GAAc;IAClBC,IAAA,EAAMJ,aAAA;IACN,GAAGE;EACL;EAEA,IAAI;IACFG,YAAA,CAAaC,OAAO,CAACT,wBAAA,EAA0BU,IAAA,CAAKC,SAAS,CAACL,WAAA;IAC9D,OAAO;EACT,EAAE,OAAOM,IAAA,EAAM;IACb,OAAOR,CAAA,CAAE;EACX;AACF;AAEA;;;AAGA,OAAO,SAASS,eAAe;EAC7BC,OAAO;EACPC,IAAA,EAAMC,SAAS;EACfZ,CAAC;EACD,GAAGF;AAAA,CACsB;EACzB,IAAIe,WAAA;EAEJ,IAAI;IACF,MAAMC,iBAAA,GAAoBV,YAAA,CAAaW,OAAO,CAACnB,wBAAA;IAE/C,IAAI,CAACkB,iBAAA,EAAmB;MACtB,OAAOd,CAAA,CAAE;IACX;IAEAa,WAAA,GAAcP,IAAA,CAAKU,KAAK,CAACF,iBAAA;EAC3B,EAAE,OAAON,IAAA,EAAM;IACb,OAAOR,CAAA,CAAE;EACX;EAEA,MAAMiB,cAAA,GAAiB;IACrB,GAAGJ,WAAW;IACd,GAAGf,IAAI;IACPc;EACF;EAEA,IAAI,CAACjB,oBAAA,CAAqBsB,cAAA,GAAiB;IACzC,OAAOjB,CAAA,CAAE;EACX;EAEAU,OAAA,CAAQG,WAAA;EAER,OAAO;AACT","ignoreList":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"clock-arrow-up.js","sources":["../../../src/icons/clock-arrow-up.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ClockArrowUp\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMuMjI4IDIxLjkyNUExMCAxMCAwIDEgMSAyMS45OTQgMTIuMzM4IiAvPgogIDxwYXRoIGQ9Ik0xMiA2djZsMS41NjIuNzgxIiAvPgogIDxwYXRoIGQ9Im0xNCAxOCA0LTQgNCA0IiAvPgogIDxwYXRoIGQ9Ik0xOCAyMnYtOCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/clock-arrow-up\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 ClockArrowUp = createLucideIcon('ClockArrowUp', [\n ['path', { d: 'M13.228 21.925A10 10 0 1 1 21.994 12.338', key: '1fzlyi' }],\n ['path', { d: 'M12 6v6l1.562.781', key: '1ujuk9' }],\n ['path', { d: 'm14 18 4-4 4 4', key: 'ftkppy' }],\n ['path', { d: 'M18 22v-8', key: 'su0gjh' }],\n]);\n\nexport default ClockArrowUp;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,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,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAqB,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,CAClD,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"6 7 8 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"0 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","194":"1 2 3 4 5"},C:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0 1 2 3 4 5 6 7 8 9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 4C 5C"},D:{"1":"6 7 8 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"0 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","194":"1 2 3 4 5"},E:{"2":"J bB K D E F A B C L M G 6C bC 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD","260":"tC uC vC","516":"wC ID"},F:{"1":"0 1 2 3 4 5 6 7 8 s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r JD KD LD MD PC xC ND QC"},G:{"1":"wC","2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD","260":"tC uC vC"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"2":"A B C H PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"2":"RC"},P:{"2":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"2":"4D"},R:{"2":"5D"},S:{"2":"6D 7D"}},B:6,C:"zstd (Zstandard) content-encoding",D:true};

View File

@@ -0,0 +1,7 @@
import { RestCommand } from "../types.cjs";
//#region src/rest/helpers/with-token.d.ts
declare function withToken<Schema, Output>(token: string, getOptions: RestCommand<Output, Schema>): RestCommand<Output, Schema>;
//#endregion
export { withToken };
//# sourceMappingURL=with-token.d.cts.map

View File

@@ -0,0 +1,34 @@
/**
* Shallow merge two objects.
* Does not mutate the passed in objects.
* Undefined/empty values in the merge object will overwrite existing values.
*
* By default, this merges 2 levels deep.
*/
function merge(initialObj, mergeObj, levels = 2) {
// If the merge value is not an object, or we have no merge levels left,
// we just set the value to the merge value
if (!mergeObj || typeof mergeObj !== 'object' || levels <= 0) {
return mergeObj;
}
// If the merge object is an empty object, and the initial object is not undefined, we return the initial object
if (initialObj && Object.keys(mergeObj).length === 0) {
return initialObj;
}
// Clone object
const output = { ...initialObj };
// Merge values into output, resursively
for (const key in mergeObj) {
if (Object.prototype.hasOwnProperty.call(mergeObj, key)) {
output[key] = merge(output[key], mergeObj[key], levels - 1);
}
}
return output;
}
export { merge };
//# sourceMappingURL=merge.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"renderFolderViewSlots.d.ts","sourceRoot":"","sources":["../../../src/views/CollectionFolders/renderFolderViewSlots.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAQV,6BAA6B,EAC7B,mBAAmB,EACnB,6BAA6B,EAC7B,OAAO,EACP,yBAAyB,EACzB,iBAAiB,EAGlB,MAAM,SAAS,CAAA;AAIhB,KAAK,IAAI,GAAG;IACV,WAAW,EAAE,6BAA6B,CAAA;IAC1C,gBAAgB,EAAE,yBAAyB,CAAA;IAC3C,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,6BAA6B,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,qBAAqB,0EAM/B,IAAI,KAAG,mBAgET,CAAA"}

View File

@@ -0,0 +1,15 @@
import Dispatcher from "./dispatcher";
export declare class RedirectHandler implements Dispatcher.DispatchHandlers {
constructor(
dispatch: Dispatcher,
maxRedirections: number,
opts: Dispatcher.DispatchOptions,
handler: Dispatcher.DispatchHandlers,
redirectionLimitReached: boolean
);
}
export declare class DecoratorHandler implements Dispatcher.DispatchHandlers {
constructor(handler: Dispatcher.DispatchHandlers);
}

View File

@@ -0,0 +1,10 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const INSTRUMENTATION_NAME = '@sentry/instrumentation-http';
/** We only want to capture request bodies up to 1mb. */
const MAX_BODY_BYTE_LENGTH = 1024 * 1024;
exports.INSTRUMENTATION_NAME = INSTRUMENTATION_NAME;
exports.MAX_BODY_BYTE_LENGTH = MAX_BODY_BYTE_LENGTH;
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1,11 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
'use strict'
const LexicalOffset = process.env.NODE_ENV !== 'production' ? require('./LexicalOffset.dev.js') : require('./LexicalOffset.prod.js');
module.exports = LexicalOffset;

View File

@@ -0,0 +1,47 @@
'use strict'
const { test } = require('node:test')
const handleCustomLevelsOpts = require('./handle-custom-levels-opts')
test('returns a empty object `{}` for undefined parameter', t => {
const handledCustomLevel = handleCustomLevelsOpts()
t.assert.deepStrictEqual(handledCustomLevel, {})
})
test('returns a empty object `{}` for unknown parameter', t => {
const handledCustomLevel = handleCustomLevelsOpts(123)
t.assert.deepStrictEqual(handledCustomLevel, {})
})
test('returns a filled object for string parameter', t => {
const handledCustomLevel = handleCustomLevelsOpts('ok:10,warn:20,error:35')
t.assert.deepStrictEqual(handledCustomLevel, {
10: 'OK',
20: 'WARN',
35: 'ERROR',
default: 'USERLVL'
})
})
test('returns a filled object for object parameter', t => {
const handledCustomLevel = handleCustomLevelsOpts({
ok: 10,
warn: 20,
error: 35
})
t.assert.deepStrictEqual(handledCustomLevel, {
10: 'OK',
20: 'WARN',
35: 'ERROR',
default: 'USERLVL'
})
})
test('defaults missing level num to first index', t => {
const result = handleCustomLevelsOpts('ok:10,info')
t.assert.deepStrictEqual(result, {
10: 'OK',
1: 'INFO',
default: 'USERLVL'
})
})

View File

@@ -0,0 +1 @@
{"version":3,"file":"mergeFieldStyles.js","names":["mergeFieldStyles","field","admin","style","width","flex"],"sources":["../../src/fields/mergeFieldStyles.ts"],"sourcesContent":["import type { ClientField } from 'payload'\n\nexport const mergeFieldStyles = (\n field: ClientField | Omit<ClientField, 'type'>,\n): React.CSSProperties => ({\n ...(field?.admin?.style || {}),\n ...(field?.admin?.width\n ? {\n '--field-width': field.admin.width,\n }\n : {\n flex: '1 1 auto',\n }),\n // allow flex overrides to still take precedence over the fallback\n ...(field?.admin?.style?.flex\n ? {\n flex: field.admin.style.flex,\n }\n : {}),\n})\n"],"mappings":"AAEA,OAAO,MAAMA,gBAAA,GACXC,KAAA,KACyB;EACzB,IAAIA,KAAA,EAAOC,KAAA,EAAOC,KAAA,IAAS,CAAC,CAAC;EAC7B,IAAIF,KAAA,EAAOC,KAAA,EAAOE,KAAA,GACd;IACE,iBAAiBH,KAAA,CAAMC,KAAK,CAACE;EAC/B,IACA;IACEC,IAAA,EAAM;EACR,CAAC;EACL;EACA,IAAIJ,KAAA,EAAOC,KAAA,EAAOC,KAAA,EAAOE,IAAA,GACrB;IACEA,IAAA,EAAMJ,KAAA,CAAMC,KAAK,CAACC,KAAK,CAACE;EAC1B,IACA,CAAC,CAAC;AACR","ignoreList":[]}

View File

@@ -0,0 +1,39 @@
var createPadding = require('./_createPadding'),
stringSize = require('./_stringSize'),
toInteger = require('./toInteger'),
toString = require('./toString');
/**
* Pads `string` on the left side if it's shorter than `length`. Padding
* characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.padStart('abc', 6);
* // => ' abc'
*
* _.padStart('abc', 6, '_-');
* // => '_-_abc'
*
* _.padStart('abc', 3);
* // => 'abc'
*/
function padStart(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return (length && strLength < length)
? (createPadding(length - strLength, chars) + string)
: string;
}
module.exports = padStart;

View File

@@ -0,0 +1,22 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _typeof;
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
exports.default = _typeof = function (obj) {
return typeof obj;
};
} else {
exports.default = _typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
//# sourceMappingURL=typeof.js.map

View File

@@ -0,0 +1,5 @@
import { IImage } from './interface.mjs';
declare const JPG: IImage;
export { JPG };

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/uploads/optionallyAppendMetadata.ts"],"sourcesContent":["import type { Sharp, Metadata as SharpMetadata } from 'sharp'\n\nimport type { PayloadRequest } from '../types/index.js'\n\nexport type WithMetadata =\n | ((options: { metadata: SharpMetadata; req: PayloadRequest }) => Promise<boolean>)\n | boolean\n\nexport async function optionallyAppendMetadata({\n req,\n sharpFile,\n withMetadata,\n}: {\n req: PayloadRequest\n sharpFile: Sharp\n withMetadata: WithMetadata\n}): Promise<Sharp> {\n const metadata = await sharpFile.metadata()\n\n if (withMetadata === true) {\n return sharpFile.withMetadata()\n } else if (typeof withMetadata === 'function') {\n const useMetadata = await withMetadata({ metadata, req })\n\n if (useMetadata) {\n return sharpFile.withMetadata()\n }\n }\n\n return sharpFile\n}\n"],"names":["optionallyAppendMetadata","req","sharpFile","withMetadata","metadata","useMetadata"],"mappings":"AAQA,OAAO,eAAeA,yBAAyB,EAC7CC,GAAG,EACHC,SAAS,EACTC,YAAY,EAKb;IACC,MAAMC,WAAW,MAAMF,UAAUE,QAAQ;IAEzC,IAAID,iBAAiB,MAAM;QACzB,OAAOD,UAAUC,YAAY;IAC/B,OAAO,IAAI,OAAOA,iBAAiB,YAAY;QAC7C,MAAME,cAAc,MAAMF,aAAa;YAAEC;YAAUH;QAAI;QAEvD,IAAII,aAAa;YACf,OAAOH,UAAUC,YAAY;QAC/B;IACF;IAEA,OAAOD;AACT"}

View File

@@ -0,0 +1,47 @@
import { afterEach, beforeEach, describe, expect, it, vitest } from 'vitest';
import { findMigrationDir } from './findMigrationDir';
import fs from 'fs';
import path from 'path';
const workDir = path.resolve(import.meta.dirname, '_tmp');
describe('findMigrationDir', ()=>{
beforeEach(()=>{
const cwdSpy = vitest.spyOn(process, 'cwd');
cwdSpy.mockReturnValue(workDir);
fs.mkdirSync(workDir, {
recursive: true
});
});
afterEach(()=>{
fs.rmSync(workDir, {
force: true,
recursive: true
});
});
it('should return the passed directory', ()=>{
const dir = path.resolve(workDir, 'custom_migrations');
expect(findMigrationDir(dir)).toBe(dir);
});
it('should return src/migrations because that folder exists', ()=>{
fs.mkdirSync(path.resolve(workDir, 'src/migrations'), {
recursive: true
});
expect(findMigrationDir()).toBe(path.resolve(workDir, 'src/migrations'));
});
it('should return dist/migrations because that folder exists', ()=>{
fs.mkdirSync(path.resolve(workDir, 'dist/migrations'), {
recursive: true
});
expect(findMigrationDir()).toBe(path.resolve(workDir, 'dist/migrations'));
});
it('should return src/migrations because src exists', ()=>{
fs.mkdirSync(path.resolve(workDir, 'src'), {
recursive: true
});
expect(findMigrationDir()).toBe(path.resolve(workDir, 'src/migrations'));
});
it('should return migrations because src does not exist', ()=>{
expect(findMigrationDir()).toBe(path.resolve(workDir, 'migrations'));
});
});
//# sourceMappingURL=findMigrationDir.spec.js.map

View File

@@ -0,0 +1,2 @@
export declare const DrawerRelationshipSelect: () => import("react").JSX.Element;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,12 @@
import type { FieldHook } from '../../config/types.js';
import type { SlugFieldArgs } from './index.js';
type HookArgs = {
slugFieldName: NonNullable<SlugFieldArgs['name']>;
} & Pick<SlugFieldArgs, 'slugify'> & Required<Pick<SlugFieldArgs, 'useAsSlug'>>;
/**
* This is a `BeforeChange` field hook used to auto-generate the `slug` field.
* See `slugField` for more details.
*/
export declare const generateSlug: ({ slugFieldName, slugify: customSlugify, useAsSlug }: HookArgs) => FieldHook;
export {};
//# sourceMappingURL=generateSlug.d.ts.map

View File

@@ -0,0 +1,2 @@
export declare const setsAreEqual: (xs: Set<unknown>, ys: Set<unknown>) => boolean;
//# sourceMappingURL=setsAreEqual.d.ts.map

View File

@@ -0,0 +1,16 @@
/**
* @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 Redo = createLucideIcon("Redo", [
["path", { d: "M21 7v6h-6", key: "3ptur4" }],
["path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7", key: "1kgawr" }]
]);
export { Redo as default };
//# sourceMappingURL=redo.js.map

View File

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

View File

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

View File

@@ -0,0 +1,145 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.getIntrospectionQuery = getIntrospectionQuery;
/**
* Produce the GraphQL query recommended for a full schema introspection.
* Accepts optional IntrospectionOptions.
*/
function getIntrospectionQuery(options) {
const optionsWithDefault = {
descriptions: true,
specifiedByUrl: false,
directiveIsRepeatable: false,
schemaDescription: false,
inputValueDeprecation: false,
oneOf: false,
...options,
};
const descriptions = optionsWithDefault.descriptions ? 'description' : '';
const specifiedByUrl = optionsWithDefault.specifiedByUrl
? 'specifiedByURL'
: '';
const directiveIsRepeatable = optionsWithDefault.directiveIsRepeatable
? 'isRepeatable'
: '';
const schemaDescription = optionsWithDefault.schemaDescription
? descriptions
: '';
function inputDeprecation(str) {
return optionsWithDefault.inputValueDeprecation ? str : '';
}
const oneOf = optionsWithDefault.oneOf ? 'isOneOf' : '';
return `
query IntrospectionQuery {
__schema {
${schemaDescription}
queryType { name kind }
mutationType { name kind }
subscriptionType { name kind }
types {
...FullType
}
directives {
name
${descriptions}
${directiveIsRepeatable}
locations
args${inputDeprecation('(includeDeprecated: true)')} {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
${descriptions}
${specifiedByUrl}
${oneOf}
fields(includeDeprecated: true) {
name
${descriptions}
args${inputDeprecation('(includeDeprecated: true)')} {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields${inputDeprecation('(includeDeprecated: true)')} {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
${descriptions}
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
${descriptions}
type { ...TypeRef }
defaultValue
${inputDeprecation('isDeprecated')}
${inputDeprecation('deprecationReason')}
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
}
}
`;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,mFAAkF;AAAzE,4HAAA,oBAAoB,OAAA;AAC7B,0DAAwD;AAA/C,+GAAA,aAAa,OAAA;AAEtB,kDAA2E;AAAlE,8GAAA,gBAAgB,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAC7C,sEAGuC;AAFrC,0HAAA,kBAAkB,OAAA;AAClB,6HAAA,qBAAqB,OAAA;AAEvB,wEAAqE;AAA5D,4HAAA,mBAAmB,OAAA;AAC5B,sCAauB;AAZrB,kGAAA,UAAU,OAAA;AACV,qGAAA,aAAa,OAAA;AACb,8FAAA,MAAM,OAAA;AACN,sGAAA,cAAc,OAAA;AACd,4GAAA,oBAAoB,OAAA;AACpB,4GAAA,oBAAoB,OAAA;AACpB,2GAAA,mBAAmB,OAAA;AACnB,yGAAA,iBAAiB,OAAA;AACjB,mGAAA,WAAW,OAAA;AACX,yGAAA,iBAAiB,OAAA;AACjB,sGAAA,cAAc,OAAA;AACd,yGAAA,iBAAiB,OAAA;AAEnB,kDAAiD;AAAxC,wGAAA,UAAU,OAAA;AAEnB,+CAAkD;AAAzC,gHAAA,gBAAgB,OAAA;AAEzB,yCAA0D;AAAjD,gHAAA,uBAAuB,OAAA;AAChC,uCAQoB;AAPlB,oGAAA,QAAQ,OAAA;AACR,uGAAA,WAAW,OAAA;AACX,4GAAA,gBAAgB,OAAA;AAChB,6GAAA,iBAAiB,OAAA;AACjB,4GAAA,gBAAgB,OAAA;AAChB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AAEf,qDAA8D;AAArD,gHAAA,mBAAmB,OAAA;AAE5B,+EAK2C;AAJzC,gIAAA,mBAAmB,OAAA;AACnB,+HAAA,kBAAkB,OAAA;AAClB,sIAAA,yBAAyB,OAAA;AACzB,6HAAA,gBAAgB,OAAA;AAElB,qDAK8B;AAJ5B,uGAAA,OAAO,OAAA;AACP,iHAAA,iBAAiB,OAAA;AACjB,8GAAA,cAAc,OAAA;AACd,8GAAA,cAAc,OAAA;AAGhB,6DAIkC;AAHhC,uHAAA,mBAAmB,OAAA;AACnB,mHAAA,eAAe,OAAA;AACf,qHAAA,iBAAiB,OAAA;AAEnB,iDAAgD;AAAvC,wGAAA,UAAU,OAAA;AACnB,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,2CAAgE;AAAvD,uGAAA,YAAY,OAAA;AAAE,0GAAA,eAAe,OAAA;AACtC,mCAAuD;AAA9C,mGAAA,YAAY,OAAA;AAAE,iGAAA,UAAU,OAAA;AACjC,6CAAkD;AAAzC,0GAAA,cAAc,OAAA;AACvB,uDAA+D;AAAtD,uHAAA,sBAAsB,OAAA;AAC/B,kDAA8C;AACjC,QAAA,QAAQ,GAAG;IACtB,OAAO,EAAP,kBAAO;CACR,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\nexport { W3CBaggagePropagator } from './baggage/propagation/W3CBaggagePropagator';\nexport { AnchoredClock } from './common/anchored-clock';\nexport type { Clock } from './common/anchored-clock';\nexport { isAttributeValue, sanitizeAttributes } from './common/attributes';\nexport {\n globalErrorHandler,\n setGlobalErrorHandler,\n} from './common/global-error-handler';\nexport { loggingErrorHandler } from './common/logging-error-handler';\nexport {\n addHrTimes,\n getTimeOrigin,\n hrTime,\n hrTimeDuration,\n hrTimeToMicroseconds,\n hrTimeToMilliseconds,\n hrTimeToNanoseconds,\n hrTimeToTimeStamp,\n isTimeInput,\n isTimeInputHrTime,\n millisToHrTime,\n timeInputToHrTime,\n} from './common/time';\nexport { unrefTimer } from './common/timer-util';\nexport type { ErrorHandler, InstrumentationScope } from './common/types';\nexport { ExportResultCode } from './ExportResult';\nexport type { ExportResult } from './ExportResult';\nexport { parseKeyPairsIntoRecord } from './baggage/utils';\nexport {\n SDK_INFO,\n _globalThis,\n getStringFromEnv,\n getBooleanFromEnv,\n getNumberFromEnv,\n getStringListFromEnv,\n otperformance,\n} from './platform';\nexport { CompositePropagator } from './propagation/composite';\nexport type { CompositePropagatorConfig } from './propagation/composite';\nexport {\n TRACE_PARENT_HEADER,\n TRACE_STATE_HEADER,\n W3CTraceContextPropagator,\n parseTraceParent,\n} from './trace/W3CTraceContextPropagator';\nexport {\n RPCType,\n deleteRPCMetadata,\n getRPCMetadata,\n setRPCMetadata,\n} from './trace/rpc-metadata';\nexport type { RPCMetadata } from './trace/rpc-metadata';\nexport {\n isTracingSuppressed,\n suppressTracing,\n unsuppressTracing,\n} from './trace/suppress-tracing';\nexport { TraceState } from './trace/TraceState';\nexport { merge } from './utils/merge';\nexport { TimeoutError, callWithTimeout } from './utils/timeout';\nexport { isUrlIgnored, urlMatches } from './utils/url';\nexport { BindOnceFuture } from './utils/callback';\nexport { diagLogLevelFromString } from './utils/configuration';\nimport { _export } from './internal/exporter';\nexport const internal = {\n _export,\n};\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,OAAO,EAAE,CAAA;AAuBlB;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,OAAO,GAAG,CACpB,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,KAC1B,IAAI,GAAG,IAAI,CAAA;AA8QhB,eAAO;AACL;;;;;;;;GAQG;AACH,MAAM,OAzMO,OAAO;;wBAPiD,IAAI;AAkNzE;;;;;;GAMG;AACH,IAAI;AAEJ;;;;;;GAMG;AACH,MAAM,YAGP,CAAA"}

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N O P","194":"Q H R S T U V W X Y"},C:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0 1 2 3 4 5 6 9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 4C 5C","322":"7 8"},D:{"1":"0 1 2 3 4 5 6 7 8 U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC","194":"GC HC IC JC KC LC MC NC Q H R S T"},E:{"1":"iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D E F A B C L M G 6C bC 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC"},F:{"1":"0 1 2 3 4 5 6 7 8 IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B JD KD LD MD PC xC ND QC","194":"5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC"},G:{"1":"iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB 1D 2D SC TC UC 3D","2":"J tD uD vD wD xD cC yD zD 0D"},Q:{"2":"4D"},R:{"1":"5D"},S:{"2":"6D 7D"}},B:4,C:"Screen Wake Lock API",D:true};

View File

@@ -0,0 +1,2 @@
export * from "./declarations/src/index";
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1vdGlvbi1yZWFjdC5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"zC","8":"K D E"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C 4C 5C","8":"0C"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC"},E:{"1":"J bB K D E F A B C L M G 6C bC 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID"},F:{"1":"0 1 2 3 4 5 6 7 8 9 B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JD KD LD MD PC xC ND QC","2":"F"},G:{"1":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC"},H:{"1":"mD"},I:{"1":"VC J I nD oD pD qD yC rD sD"},J:{"1":"D A"},K:{"1":"A B C H PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:1,C:"getElementsByClassName",D:true};

View File

@@ -0,0 +1,164 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["AC", "DC"],
abbreviated: ["AC", "DC"],
wide: ["antes de cristo", "después de cristo"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["T1", "T2", "T3", "T4"],
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
};
const monthValues = {
narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
abbreviated: [
"ene",
"feb",
"mar",
"abr",
"may",
"jun",
"jul",
"ago",
"sep",
"oct",
"nov",
"dic",
],
wide: [
"enero",
"febrero",
"marzo",
"abril",
"mayo",
"junio",
"julio",
"agosto",
"septiembre",
"octubre",
"noviembre",
"diciembre",
],
};
const dayValues = {
narrow: ["d", "l", "m", "m", "j", "v", "s"],
short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
wide: [
"domingo",
"lunes",
"martes",
"miércoles",
"jueves",
"viernes",
"sábado",
],
};
const dayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "md",
morning: "mañana",
afternoon: "tarde",
evening: "tarde",
night: "noche",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "medianoche",
noon: "mediodia",
morning: "mañana",
afternoon: "tarde",
evening: "tarde",
night: "noche",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "medianoche",
noon: "mediodia",
morning: "mañana",
afternoon: "tarde",
evening: "tarde",
night: "noche",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "a",
pm: "p",
midnight: "mn",
noon: "md",
morning: "de la mañana",
afternoon: "de la tarde",
evening: "de la tarde",
night: "de la noche",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "medianoche",
noon: "mediodia",
morning: "de la mañana",
afternoon: "de la tarde",
evening: "de la tarde",
night: "de la noche",
},
wide: {
am: "a.m.",
pm: "p.m.",
midnight: "medianoche",
noon: "mediodia",
morning: "de la mañana",
afternoon: "de la tarde",
evening: "de la tarde",
night: "de la noche",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + "º";
};
export const localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => Number(quarter) - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"renderField.d.ts","sourceRoot":"","sources":["../../../src/forms/fieldSchemasToFormState/renderField.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAcnD,eAAO,MAAM,WAAW,EAAE,iBA4XzB,CAAA"}

View File

@@ -0,0 +1,277 @@
import { calculateVersionLocaleStatuses, toSnakeCase } from '../shared.js';
import { migrateMainCollectionStatus } from './migrateMainCollection.js';
import { migrateMainGlobalStatus } from './migrateMainGlobal.js';
export async function up(args) {
const { collectionSlug, db, globalSlug, payload, req, sql } = args;
if (!collectionSlug && !globalSlug) {
throw new Error('Either collectionSlug or globalSlug must be provided');
}
if (collectionSlug && globalSlug) {
throw new Error('Cannot provide both collectionSlug and globalSlug');
}
const entitySlug = collectionSlug || globalSlug;
// Convert camelCase slugs to snake_case and add version prefix/suffix
const versionsTable = collectionSlug ? `_${toSnakeCase(collectionSlug)}_v` : `_${toSnakeCase(globalSlug)}_v`;
const localesTable = `${versionsTable}_locales`;
if (!payload.config.localization) {
throw new Error('Localization is not enabled in payload config');
}
// Check if versions are enabled on this collection/global
let entityConfig;
if (collectionSlug) {
const collection = payload.config.collections.find((c)=>c.slug === collectionSlug);
if (collection) {
entityConfig = collection;
}
} else if (globalSlug) {
const global = payload.config.globals.find((g)=>g.slug === globalSlug);
if (global) {
entityConfig = global;
}
}
if (!entityConfig) {
throw new Error(`${collectionSlug ? 'Collection' : 'Global'} not found: ${collectionSlug || globalSlug}`);
}
payload.logger.info({
msg: `Starting _status localization migration for ${collectionSlug ? 'collection' : 'global'}: ${entitySlug}`
});
// Get filtered locales if filterAvailableLocales is defined
let locales = payload.config.localization.localeCodes;
if (typeof payload.config.localization.filterAvailableLocales === 'function') {
const filteredLocaleObjects = await payload.config.localization.filterAvailableLocales({
locales: payload.config.localization.locales,
req
});
locales = filteredLocaleObjects.map((locale)=>locale.code);
}
payload.logger.info({
msg: `Locales: ${locales.join(', ')}`
});
// Check if versions are enabled in config (skip if not)
if (!entityConfig.versions) {
payload.logger.info({
msg: `Skipping migration for ${collectionSlug ? 'collection' : 'global'}: ${entitySlug} - versions not enabled`
});
return;
}
// Validate that version__status column exists before proceeding
const columnCheckResult = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT EXISTS (
SELECT FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = ${versionsTable}
AND column_name = 'version__status'
) as exists
`
});
if (!columnCheckResult.rows[0]?.exists) {
throw new Error(`Migration aborted: version__status column not found in ${versionsTable} table. ` + `This migration should only run on schemas that have NOT yet been migrated to per-locale status. ` + `If you've already run this migration, no action is needed.`);
}
// 1. Check if the locales table exists
const localesTableCheckResult = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT EXISTS (
SELECT FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name = ${localesTable}
) as exists
`
});
const localesTableExists = localesTableCheckResult.rows[0]?.exists;
if (!localesTableExists) {
// SCENARIO 1: Create the locales table (first localized field in versions)
payload.logger.info({
msg: `Creating new locales table: ${localesTable}`
});
await db.execute({
drizzle: db.drizzle,
sql: sql`
CREATE TABLE ${sql.identifier(localesTable)} (
id SERIAL PRIMARY KEY,
_locale VARCHAR NOT NULL,
_parent_id INTEGER NOT NULL,
version__status VARCHAR,
UNIQUE(_locale, _parent_id),
FOREIGN KEY (_parent_id) REFERENCES ${sql.identifier(versionsTable)}(id) ON DELETE CASCADE
)
`
});
// Create one row per locale per version record
// Simple approach: copy the same status to all locales
for (const locale of locales){
const inserted = await db.execute({
drizzle: db.drizzle,
sql: sql`
INSERT INTO ${sql.identifier(localesTable)} (_locale, _parent_id, version__status)
SELECT ${locale}, id, version__status
FROM ${sql.identifier(versionsTable)}
RETURNING id
`
});
payload.logger.info({
msg: `Inserted ${inserted.length} rows for locale: ${locale}`
});
}
} else {
// SCENARIO 2: Add version__status column to existing locales table
payload.logger.info({
msg: `Adding version__status column to existing table: ${localesTable}`
});
await db.execute({
drizzle: db.drizzle,
sql: sql`
ALTER TABLE ${sql.identifier(localesTable)} ADD COLUMN version__status VARCHAR
`
});
// INTELLIGENT DATA MIGRATION using historical publishedLocale data
payload.logger.info({
msg: 'Processing version history to determine status per locale...'
});
// First, get the list of locales that actually exist in the locales table
// This is important because the config may have more locales defined than what's in the OLD schema
const existingLocalesResult = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT DISTINCT _locale
FROM ${sql.identifier(localesTable)}
ORDER BY _locale
`
});
const existingLocales = existingLocalesResult.rows.map((row)=>row._locale);
payload.logger.info({
msg: `Found existing locales in table: ${existingLocales.join(', ')}`
});
// Get all version records grouped by parent document, ordered chronologically
const versionsResult = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT id, parent_id as parent, version__status as _status, published_locale, snapshot, created_at
FROM ${sql.identifier(versionsTable)}
ORDER BY parent_id, created_at ASC
`
});
// Use shared function to calculate version locale statuses
// Only process locales that actually exist in the locales table
const versionLocaleStatus = calculateVersionLocaleStatuses(versionsResult.rows, existingLocales, payload);
// Now update the locales table with the calculated status for each version
payload.logger.info({
msg: 'Updating locales table with calculated statuses...'
});
let updateCount = 0;
for (const [versionId, localeMap] of versionLocaleStatus.entries()){
for (const [locale, status] of localeMap.entries()){
await db.execute({
drizzle: db.drizzle,
sql: sql`
UPDATE ${sql.identifier(localesTable)}
SET version__status = ${status}
WHERE _parent_id = ${versionId}
AND _locale = ${locale}
`
});
updateCount++;
}
}
payload.logger.info({
msg: `Updated ${updateCount} locale rows with status`
});
}
// 3. Drop the old version__status column from main versions table
await db.execute({
drizzle: db.drizzle,
sql: sql`
ALTER TABLE ${sql.identifier(versionsTable)} DROP COLUMN version__status
`
});
// 4. Create and populate _status column in main collection/global locales table
// With localizeStatus enabled, _status is a localized field stored in the collection's locales table
// We need to create this column and populate it based on the latest version status per locale
const mainTable = collectionSlug ? toSnakeCase(collectionSlug) : toSnakeCase(globalSlug);
const mainLocalesTable = `${mainTable}_locales`;
const localesTableCheck = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT EXISTS (
SELECT FROM information_schema.tables
WHERE table_schema = 'public'
AND table_name = ${mainLocalesTable}
) as exists
`
});
if (localesTableCheck.rows[0]?.exists) {
// Check if _status column already exists in the locales table
const statusColumnCheck = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT EXISTS (
SELECT FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = ${mainLocalesTable}
AND column_name = '_status'
) as exists
`
});
if (!statusColumnCheck.rows[0]?.exists) {
// Add _status column to locales table
await db.execute({
drizzle: db.drizzle,
sql: sql`
ALTER TABLE ${sql.identifier(mainLocalesTable)}
ADD COLUMN _status VARCHAR DEFAULT 'draft'
`
});
}
// Now populate the _status values from the latest version
if (collectionSlug) {
await migrateMainCollectionStatus({
collectionSlug,
db,
locales,
payload,
sql,
versionsTable
});
} else if (globalSlug) {
await migrateMainGlobalStatus({
db,
globalSlug,
locales,
payload,
sql,
versionsTable
});
}
} else {
payload.logger.info({
msg: `No locales table found: ${mainLocalesTable} (collection/global not localized)`
});
}
// 5. Drop _status from main table if it exists (it will be in locales table now)
const mainTableStatusCheck = await db.execute({
drizzle: db.drizzle,
sql: sql`
SELECT EXISTS (
SELECT FROM information_schema.columns
WHERE table_schema = 'public'
AND table_name = ${mainTable}
AND column_name = '_status'
) as exists
`
});
if (mainTableStatusCheck.rows[0]?.exists) {
await db.execute({
drizzle: db.drizzle,
sql: sql`
ALTER TABLE ${sql.identifier(mainTable)} DROP COLUMN _status
`
});
}
payload.logger.info({
msg: 'Migration completed successfully'
});
}
//# sourceMappingURL=up.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"align-center-vertical.js","sources":["../../../src/icons/align-center-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlignCenterVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMnYyMCIgLz4KICA8cGF0aCBkPSJNOCAxMEg0YTIgMiAwIDAgMS0yLTJWNmMwLTEuMS45LTIgMi0yaDQiIC8+CiAgPHBhdGggZD0iTTE2IDEwaDRhMiAyIDAgMCAwIDItMlY2YTIgMiAwIDAgMC0yLTJoLTQiIC8+CiAgPHBhdGggZD0iTTggMjBIN2EyIDIgMCAwIDEtMi0ydi0yYzAtMS4xLjktMiAyLTJoMSIgLz4KICA8cGF0aCBkPSJNMTYgMTRoMWEyIDIgMCAwIDEgMiAydjJhMiAyIDAgMCAxLTIgMmgtMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/align-center-vertical\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 AlignCenterVertical = createLucideIcon('AlignCenterVertical', [\n ['path', { d: 'M12 2v20', key: 't6zp3m' }],\n ['path', { d: 'M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4', key: '14d6g8' }],\n ['path', { d: 'M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4', key: '1e2lrw' }],\n ['path', { d: 'M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1', key: '1fkdwx' }],\n ['path', { d: 'M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1', key: '1euafb' }],\n]);\n\nexport default AlignCenterVertical;\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,CAAA,CAAA,CAAA,CAAA,CAAsB,iBAAiB,qBAAuB,CAAA,CAAA,CAAA;AAAA,CAAA,CAClE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,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,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,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,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,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,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,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,CAAK,UAAU,CAAA;AAC5E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,16 @@
export type Options = {
indices?: boolean;
nullsAsUndefineds?: boolean;
booleansAsIntegers?: boolean;
allowEmptyArrays?: boolean;
noAttributesWithArrayNotation?: boolean;
noFilesWithArrayNotation?: boolean;
dotsForObjectNotation?: boolean;
};
export function serialize<T = {}>(
object: T,
options?: Options,
existingFormData?: FormData,
keyPrefix?: string,
): FormData;

View File

@@ -0,0 +1,106 @@
/* eslint-disable regexp/no-dupe-characters-character-class */
(function (Prism) {
/**
* Regular expression for characters that are not allowed in identifiers.
*
* @type {string}
*/
var nonId = /\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;
/**
* Surround a regular expression for IDs with patterns for non-ID sequences.
*
* @param {string} pattern A regular expression for identifiers.
* @param {string} [flags] The regular expression flags.
* @returns {RegExp} A wrapped regular expression for identifiers.
*/
function wrapId(pattern, flags) {
return RegExp(pattern.replace(/<nonId>/g, nonId), flags);
}
Prism.languages.kumir = {
'comment': {
pattern: /\|.*/
},
'prolog': {
pattern: /#.*/,
greedy: true
},
'string': {
pattern: /"[^\n\r"]*"|'[^\n\r']*'/,
greedy: true
},
'boolean': {
pattern: wrapId(/(^|[<nonId>])(?:да|нет)(?=[<nonId>]|$)/.source),
lookbehind: true
},
'operator-word': {
pattern: wrapId(/(^|[<nonId>])(?:и|или|не)(?=[<nonId>]|$)/.source),
lookbehind: true,
alias: 'keyword'
},
'system-variable': {
pattern: wrapId(/(^|[<nonId>])знач(?=[<nonId>]|$)/.source),
lookbehind: true,
alias: 'keyword'
},
'type': [
{
pattern: wrapId(/(^|[<nonId>])(?:вещ|лит|лог|сим|цел)(?:\x20*таб)?(?=[<nonId>]|$)/.source),
lookbehind: true,
alias: 'builtin'
},
{
pattern: wrapId(/(^|[<nonId>])(?:компл|сканкод|файл|цвет)(?=[<nonId>]|$)/.source),
lookbehind: true,
alias: 'important'
}
],
/**
* Should be performed after searching for type names because of "таб".
* "таб" is a reserved word, but never used without a preceding type name.
* "НАЗНАЧИТЬ", "Фввод", and "Фвывод" are not reserved words.
*/
'keyword': {
pattern: wrapId(/(^|[<nonId>])(?:алг|арг(?:\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\x20+|_)исп)?|кц(?:(?:\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[<nonId>]|$)/.source),
lookbehind: true
},
/** Should be performed after searching for reserved words. */
'name': {
// eslint-disable-next-line regexp/no-super-linear-backtracking
pattern: wrapId(/(^|[<nonId>])[^\d<nonId>][^<nonId>]*(?:\x20+[^<nonId>]+)*(?=[<nonId>]|$)/.source),
lookbehind: true
},
/** Should be performed after searching for names. */
'number': {
pattern: wrapId(/(^|[<nonId>])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[<nonId>]|$)/.source, 'i'),
lookbehind: true
},
/** Should be performed after searching for words. */
'punctuation': /:=|[(),:;\[\]]/,
/**
* Should be performed after searching for
* - numeric constants (because of "+" and "-");
* - punctuation marks (because of ":=" and "=").
*/
'operator-char': {
pattern: /\*\*?|<[=>]?|>=?|[-+/=]/,
alias: 'operator'
}
};
Prism.languages.kum = Prism.languages.kumir;
}(Prism));

View File

@@ -0,0 +1,11 @@
import type { ClientRect } from '../../types/rect';
export declare class Rect {
constructor(rect: ClientRect, element: Element);
private rect;
width: number;
height: number;
top: number;
bottom: number;
right: number;
left: number;
}

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