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,5 @@
export declare const addWeeks: import("./types.js").FPFn2<
Date,
number,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,17 @@
/**
* @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 ArrowUpToLine = createLucideIcon("ArrowUpToLine", [
["path", { d: "M5 3h14", key: "7usisc" }],
["path", { d: "m18 13-6-6-6 6", key: "1kf1n9" }],
["path", { d: "M12 7v14", key: "1akyts" }]
]);
export { ArrowUpToLine as default };
//# sourceMappingURL=arrow-up-to-line.js.map

View File

@@ -0,0 +1,111 @@
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
import { decode } from "@webassemblyjs/wasm-parser";
import { traverse } from "@webassemblyjs/ast";
import { cloneNode } from "@webassemblyjs/ast/lib/clone";
import { shrinkPaddedLEB128 } from "@webassemblyjs/wasm-opt";
import { getSectionForNode } from "@webassemblyjs/helper-wasm-bytecode";
import constants from "@webassemblyjs/helper-wasm-bytecode";
import { applyOperations } from "./apply";
function hashNode(node) {
return JSON.stringify(node);
}
function preprocess(ab) {
var optBin = shrinkPaddedLEB128(new Uint8Array(ab));
return optBin.buffer;
}
function sortBySectionOrder(nodes) {
var originalOrder = new Map();
var _iterator = _createForOfIteratorHelper(nodes),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var node = _step.value;
originalOrder.set(node, originalOrder.size);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
nodes.sort(function (a, b) {
var sectionA = getSectionForNode(a);
var sectionB = getSectionForNode(b);
var aId = constants.sections[sectionA];
var bId = constants.sections[sectionB];
if (typeof aId !== "number" || typeof bId !== "number") {
throw new Error("Section id not found");
}
if (aId === bId) {
// $FlowIgnore originalOrder is filled for all nodes
return originalOrder.get(a) - originalOrder.get(b);
}
return aId - bId;
});
}
export function edit(ab, visitors) {
ab = preprocess(ab);
var ast = decode(ab);
return editWithAST(ast, ab, visitors);
}
export function editWithAST(ast, ab, visitors) {
var operations = [];
var uint8Buffer = new Uint8Array(ab);
var nodeBefore;
function before(type, path) {
nodeBefore = cloneNode(path.node);
}
function after(type, path) {
if (path.node._deleted === true) {
operations.push({
kind: "delete",
node: path.node
}); // $FlowIgnore
} else if (hashNode(nodeBefore) !== hashNode(path.node)) {
operations.push({
kind: "update",
oldNode: nodeBefore,
node: path.node
});
}
}
traverse(ast, visitors, before, after);
uint8Buffer = applyOperations(ast, uint8Buffer, operations);
return uint8Buffer.buffer;
}
export function add(ab, newNodes) {
ab = preprocess(ab);
var ast = decode(ab);
return addWithAST(ast, ab, newNodes);
}
export function addWithAST(ast, ab, newNodes) {
// Sort nodes by insertion order
sortBySectionOrder(newNodes);
var uint8Buffer = new Uint8Array(ab); // Map node into operations
var operations = newNodes.map(function (n) {
return {
kind: "add",
node: n
};
});
uint8Buffer = applyOperations(ast, uint8Buffer, operations);
return uint8Buffer.buffer;
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const ModuleNameSeparator = '/';
/**
* Node in a `ModuleNameTrie`
*/
class ModuleNameTrieNode {
hooks = [];
children = new Map();
}
/**
* Trie containing nodes that represent a part of a module name (i.e. the parts separated by forward slash)
*/
export class ModuleNameTrie {
_trie = new ModuleNameTrieNode();
_counter = 0;
/**
* Insert a module hook into the trie
*
* @param {Hooked} hook Hook
*/
insert(hook) {
let trieNode = this._trie;
for (const moduleNamePart of hook.moduleName.split(ModuleNameSeparator)) {
let nextNode = trieNode.children.get(moduleNamePart);
if (!nextNode) {
nextNode = new ModuleNameTrieNode();
trieNode.children.set(moduleNamePart, nextNode);
}
trieNode = nextNode;
}
trieNode.hooks.push({ hook, insertedId: this._counter++ });
}
/**
* Search for matching hooks in the trie
*
* @param {string} moduleName Module name
* @param {boolean} maintainInsertionOrder Whether to return the results in insertion order
* @param {boolean} fullOnly Whether to return only full matches
* @returns {Hooked[]} Matching hooks
*/
search(moduleName, { maintainInsertionOrder, fullOnly } = {}) {
let trieNode = this._trie;
const results = [];
let foundFull = true;
for (const moduleNamePart of moduleName.split(ModuleNameSeparator)) {
const nextNode = trieNode.children.get(moduleNamePart);
if (!nextNode) {
foundFull = false;
break;
}
if (!fullOnly) {
results.push(...nextNode.hooks);
}
trieNode = nextNode;
}
if (fullOnly && foundFull) {
results.push(...trieNode.hooks);
}
if (results.length === 0) {
return [];
}
if (results.length === 1) {
return [results[0].hook];
}
if (maintainInsertionOrder) {
results.sort((a, b) => a.insertedId - b.insertedId);
}
return results.map(({ hook }) => hook);
}
}
//# sourceMappingURL=ModuleNameTrie.js.map

View File

@@ -0,0 +1,27 @@
import { Context } from '../context/types';
import { Span } from './span';
import { SpanOptions } from './SpanOptions';
import { Tracer } from './tracer';
import { TracerOptions } from './tracer_options';
/**
* Proxy tracer provided by the proxy tracer provider
*/
export declare class ProxyTracer implements Tracer {
private _provider;
readonly name: string;
readonly version?: string | undefined;
readonly options?: TracerOptions | undefined;
private _delegate?;
constructor(_provider: TracerDelegator, name: string, version?: string | undefined, options?: TracerOptions | undefined);
startSpan(name: string, options?: SpanOptions, context?: Context): Span;
startActiveSpan<F extends (span: Span) => unknown>(_name: string, _options: F | SpanOptions, _context?: F | Context, _fn?: F): ReturnType<F>;
/**
* Try to get a tracer from the proxy tracer provider.
* If the proxy tracer provider has no delegate, return a noop tracer.
*/
private _getTracer;
}
export interface TracerDelegator {
getDelegateTracer(name: string, version?: string, options?: TracerOptions): Tracer | undefined;
}
//# sourceMappingURL=ProxyTracer.d.ts.map

View File

@@ -0,0 +1,3 @@
import { GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
export declare const GraphQLAccountNumberConfig: GraphQLScalarTypeConfig<string, string>;
export declare const GraphQLAccountNumber: GraphQLScalarType<string, string>;

View File

@@ -0,0 +1,28 @@
import { addMonths } from "./addMonths.mjs";
/**
* @name subMonths
* @category Month Helpers
* @summary Subtract the specified number of months from the given date.
*
* @description
* Subtract the specified number of months from the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param amount - The amount of months to be subtracted.
*
* @returns The new date with the months subtracted
*
* @example
* // Subtract 5 months from 1 February 2015:
* const result = subMonths(new Date(2015, 1, 1), 5)
* //=> Mon Sep 01 2014 00:00:00
*/
export function subMonths(date, amount) {
return addMonths(date, -amount);
}
// Fallback for modularized imports:
export default subMonths;

View File

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

View File

@@ -0,0 +1,7 @@
import { Client } from '@sentry/core';
/**
* Setup a DSC handler on the passed client,
* ensuring that the transaction name is inferred from the span correctly.
*/
export declare function enhanceDscWithOpenTelemetryRootSpanName(client: Client): void;
//# sourceMappingURL=enhanceDscWithOpenTelemetryRootSpanName.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"mountain.js","sources":["../../../src/icons/mountain.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Mountain\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtOCAzIDQgOCA1LTUgNSAxNUgyTDggM3oiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/mountain\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 Mountain = createLucideIcon('Mountain', [\n ['path', { d: 'm8 3 4 8 5-5 5 15H2L8 3z', key: 'otkl63' }],\n]);\n\nexport default Mountain;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,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;AAC3D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,12 @@
type CachedValue = object;
/**
* Creates a selective cache function that provides more control over React's request-level caching behavior.
*
* @param namespace - A namespace to group related cached values
* @returns A function that manages cached values within the specified namespace
*/
export declare function selectiveCache<TValue extends object = CachedValue>(namespace: string): {
get: (factory: () => Promise<TValue>, ...cacheArgs: any[]) => Promise<TValue>;
};
export {};
//# sourceMappingURL=selectiveCache.d.ts.map

View File

@@ -0,0 +1,20 @@
/**
* @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 CalendarPlus = createLucideIcon("CalendarPlus", [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path", { d: "M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8", key: "3spt84" }],
["path", { d: "M3 10h18", key: "8toen8" }],
["path", { d: "M16 19h6", key: "xwg31i" }],
["path", { d: "M19 16v6", key: "tddt3s" }]
]);
export { CalendarPlus as default };
//# sourceMappingURL=calendar-plus.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"globalError.d.ts","sourceRoot":"","sources":["../../../src/instrument/globalError.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAMlE;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,GAAG,IAAI,CAIpG"}

View File

@@ -0,0 +1,25 @@
import native from './native.js';
import rng from './rng.js';
import { unsafeStringify } from './stringify.js';
function v4(options, buf, offset) {
if (native.randomUUID && !buf && !options) {
return native.randomUUID();
}
options = options || {};
const rnds = options.random || (options.rng || rng)();
// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
rnds[6] = rnds[6] & 0x0f | 0x40;
rnds[8] = rnds[8] & 0x3f | 0x80;
// Copy bytes to buffer, if provided
if (buf) {
offset = offset || 0;
for (let i = 0; i < 16; ++i) {
buf[offset + i] = rnds[i];
}
return buf;
}
return unsafeStringify(rnds);
}
export default v4;

View File

@@ -0,0 +1,82 @@
import type { TextFieldClientProps } from '../../../admin/types.js';
import type { TypeWithID } from '../../../collections/config/types.js';
import type { FieldAdmin, RowField, TextField } from '../../../fields/config/types.js';
import type { PayloadRequest } from '../../../types/index.js';
export type Slugify<T extends TypeWithID = any> = (args: {
data: T;
req: PayloadRequest;
valueToSlugify?: any;
}) => Promise<string | undefined> | string | undefined;
export type SlugFieldArgs = {
/**
* Override for the `generateSlug` checkbox field name.
* @default 'generateSlug'
*/
checkboxName?: string;
/**
* @deprecated use `useAsSlug` instead.
*/
fieldToUse?: string;
/**
* Enable localization for the slug field.
*/
localized?: TextField['localized'];
/**
* Override for the `slug` field name.
* @default 'slug'
*/
name?: string;
/**
* A function used to override the slug field(s) at a granular level.
* Passes the row field to you to manipulate beyond the exposed options.
* @example
* ```ts
* slugField({
* overrides: (field) => {
* field.fields[1].label = 'Custom Slug Label'
* return field
* }
* })
* ```
*/
overrides?: (field: RowField) => RowField;
position?: FieldAdmin['position'];
/**
* Whether or not the `slug` field is required.
* @default true
*/
required?: TextField['required'];
/**
* Provide your own slugify function to override the default.
*/
slugify?: Slugify;
/**
* The name of the top-level field to generate the slug from, when applicable.
* @default 'title'
*/
useAsSlug?: string;
};
export type SlugField = (args?: SlugFieldArgs) => RowField;
export type SlugFieldClientPropsOnly = Pick<SlugFieldArgs, 'useAsSlug'>;
/**
* These are the props that the `SlugField` client component accepts.
* The `SlugField` server component is responsible for passing down the `slugify` function.
*/
export type SlugFieldClientProps = SlugFieldClientPropsOnly & TextFieldClientProps;
/**
* A slug is a unique, indexed, URL-friendly string that identifies a particular document, often used to construct the URL of a webpage.
* The `slug` field auto-generates its value based on another field, e.g. "My Title" → "my-title".
*
* The slug should continue to be generated through:
* 1. The `create` operation, unless the user has modified the slug manually
* 2. The `update` operation, if:
* a. Autosave is _not_ enabled and there is no slug
* b. Autosave _is_ enabled, the doc is unpublished, and the user has not modified the slug manually
*
* The slug should stabilize after all above criteria have been met, because the URL is typically derived from the slug.
* This is to protect modifying potentially live URLs, breaking links, etc. without explicit intent.
*
* @experimental This field is experimental and may change or be removed in the future. Use at your own risk.
*/
export declare const slugField: SlugField;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../src/session.ts"],"sourcesContent":["import type { Query } from './index.ts';\n\nexport interface PreparedQuery {\n\tgetQuery(): Query;\n\tmapResult(response: unknown, isFromBatch?: boolean): unknown;\n\t/** @internal */\n\tisResponseInArrayMode(): boolean;\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}

View File

@@ -0,0 +1,25 @@
import type { Client } from '../client';
import type { Scope } from '../scope';
import type { Span } from '../types-hoist/span';
import type { SerializedTraceData } from '../types-hoist/tracing';
/**
* Extracts trace propagation data from the current span or from the client's scope (via transaction or propagation
* context) and serializes it to `sentry-trace` and `baggage` values. These values can be used to propagate
* a trace via our tracing Http headers or Html `<meta>` tags.
*
* This function also applies some validation to the generated sentry-trace and baggage values to ensure that
* only valid strings are returned.
*
* If (@param options.propagateTraceparent) is `true`, the function will also generate a `traceparent` value,
* following the W3C traceparent header format.
*
* @returns an object with the tracing data values. The object keys are the name of the tracing key to be used as header
* or meta tag name.
*/
export declare function getTraceData(options?: {
span?: Span;
scope?: Scope;
client?: Client;
propagateTraceparent?: boolean;
}): SerializedTraceData;
//# sourceMappingURL=traceData.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"getFieldsToSign.d.ts","sourceRoot":"","sources":["../../src/auth/getFieldsToSign.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAEtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AA+GvD,eAAO,MAAM,eAAe,SAAU;IACpC,gBAAgB,EAAE,gBAAgB,CAAA;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,CAAA;CAC7B,KAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAoBzB,CAAA"}

View File

@@ -0,0 +1,69 @@
import { IfNever, IsDateTime, IsNumber, IsString, Merge, UnpackList } from "./utils.cjs";
import { RelationalFields } from "./schema.cjs";
import { MappedFieldNames } from "./functions.cjs";
import { FieldOutputMap } from "./output.cjs";
//#region src/types/filters.d.ts
/**
* Filters
*/
type QueryFilter<Schema, Item> = WrapLogicalFilters<NestedQueryFilter<Schema, Item>>;
/**
* Query filters without logical filters
*/
type NestedQueryFilter<Schema, Item> = UnpackList<Item> extends infer FlatItem ? Partial<Merge<{ [Field in keyof FlatItem]?: NestedRelationalFilter<Schema, FlatItem, Field> }, MappedFieldNames<Schema, Item> extends infer Funcs ? { [Func in keyof Funcs]?: Funcs[Func] extends infer Field ? Field extends keyof FlatItem ? NestedRelationalFilter<Schema, FlatItem, Field> : never : never } : never>> : never;
/**
* Allow for relational filters
*/
type NestedRelationalFilter<Schema, Item, Field$1 extends keyof Item> = (Field$1 extends RelationalFields<Schema, Item> ? WrapRelationalFilters<NestedQueryFilter<Schema, Item[Field$1]>> : never) | FilterOperators<Item[Field$1]>;
/**
* All regular filter operators
*
* TODO would love to filter this based on field type but thats not accurate enough in the schema atm
*/
type FilterOperators<FieldType, T = (FieldType extends keyof FieldOutputMap ? FieldOutputMap[FieldType] : FieldType)> = MapFilterOperators<{
_eq: T;
_neq: T;
_gt: IsDateTime<FieldType, string, IsNumber<T, number, never>>;
_gte: IsDateTime<FieldType, string, IsNumber<T, number, never>>;
_lt: IsDateTime<FieldType, string, IsNumber<T, number, never>>;
_lte: IsDateTime<FieldType, string, IsNumber<T, number, never>>;
_in: T[];
_nin: T[];
_between: IsDateTime<FieldType, [T, T], IsNumber<T, [T, T], never>>;
_nbetween: IsDateTime<FieldType, [T, T], IsNumber<T, [T, T], never>>;
_contains: IsDateTime<FieldType, never, IsString<T, string, never>>;
_ncontains: IsDateTime<FieldType, never, IsString<T, string, never>>;
_icontains: IsDateTime<FieldType, never, IsString<T, string, never>>;
_starts_with: IsDateTime<FieldType, never, IsString<T, string, never>>;
_istarts_with: IsDateTime<FieldType, never, IsString<T, string, never>>;
_nstarts_with: IsDateTime<FieldType, never, IsString<T, string, never>>;
_nistarts_with: IsDateTime<FieldType, never, IsString<T, string, never>>;
_ends_with: IsDateTime<FieldType, never, IsString<T, string, never>>;
_iends_with: IsDateTime<FieldType, never, IsString<T, string, never>>;
_nends_with: IsDateTime<FieldType, never, IsString<T, string, never>>;
_niends_with: IsDateTime<FieldType, never, IsString<T, string, never>>;
_empty: boolean;
_nempty: boolean;
_nnull: boolean;
_null: boolean;
_intersects: T;
_nintersects: T;
_intersects_bbox: T;
_nintersects_bbox: T;
}>;
type MapFilterOperators<Filters extends object> = { [Key in keyof Filters as IfNever<Filters[Key], never, Key>]?: Filters[Key] };
/**
* Relational filter operators
*/
type RelationalFilterOperators = '_some' | '_none';
type WrapRelationalFilters<Filters> = { [Operator in RelationalFilterOperators]?: Filters } | Filters;
/**
* Logical filter operations
*/
type LogicalFilterOperators = '_or' | '_and';
type WrapLogicalFilters<Filters extends object> = { [Operator in LogicalFilterOperators]?: WrapLogicalFilters<Filters>[] } | Filters;
//#endregion
export { FilterOperators, LogicalFilterOperators, NestedQueryFilter, NestedRelationalFilter, QueryFilter, RelationalFilterOperators, WrapLogicalFilters, WrapRelationalFilters };
//# sourceMappingURL=filters.d.cts.map

View File

@@ -0,0 +1,6 @@
/*
* This file was automatically generated.
* DO NOT MODIFY BY HAND.
* Run `yarn fix:special` to update
*/
"use strict";function r(e,{instancePath:t="",parentData:n,parentDataProperty:i,rootData:o=e}={}){if(!e||"object"!=typeof e||Array.isArray(e))return r.errors=[{params:{type:"object"}}],!1;{const t=0;for(const t in e)if("chunkOverhead"!==t&&"entryChunkMultiplicator"!==t&&"maxSize"!==t&&"minSize"!==t)return r.errors=[{params:{additionalProperty:t}}],!1;if(0===t){if(void 0!==e.chunkOverhead){const t=0;if("number"!=typeof e.chunkOverhead)return r.errors=[{params:{type:"number"}}],!1;var a=0===t}else a=!0;if(a){if(void 0!==e.entryChunkMultiplicator){const t=0;if("number"!=typeof e.entryChunkMultiplicator)return r.errors=[{params:{type:"number"}}],!1;a=0===t}else a=!0;if(a){if(void 0!==e.maxSize){const t=0;if("number"!=typeof e.maxSize)return r.errors=[{params:{type:"number"}}],!1;a=0===t}else a=!0;if(a)if(void 0!==e.minSize){const t=0;if("number"!=typeof e.minSize)return r.errors=[{params:{type:"number"}}],!1;a=0===t}else a=!0}}}}return r.errors=null,!0}module.exports=r,module.exports.default=r;

View File

@@ -0,0 +1,14 @@
import type { Locale, SanitizedLocalizationConfig } from 'payload';
export declare const fieldBaseClass = "field-type";
/**
* Determines whether a field should be displayed as right-to-left (RTL) based on its configuration, payload's localization configuration and the adming user's currently enabled locale.
* @returns Whether the field should be displayed as RTL.
*/
export declare function isFieldRTL({ fieldLocalized, fieldRTL, locale, localizationConfig, }: {
fieldLocalized: boolean;
fieldRTL: boolean;
locale: Locale;
localizationConfig?: SanitizedLocalizationConfig;
}): boolean;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,8 @@
function _tagged_template_literal_loose(strings, raw) {
if (!raw) raw = strings.slice(0);
strings.raw = raw;
return strings;
}
export { _tagged_template_literal_loose as _ };

View File

@@ -0,0 +1,692 @@
(() => {
var _window$dateFns;function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/sr/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: {
standalone: "\u043C\u0430\u045A\u0435 \u043E\u0434 1 \u0441\u0435\u043A\u0443\u043D\u0434\u0435",
withPrepositionAgo: "\u043C\u0430\u045A\u0435 \u043E\u0434 1 \u0441\u0435\u043A\u0443\u043D\u0434\u0435",
withPrepositionIn: "\u043C\u0430\u045A\u0435 \u043E\u0434 1 \u0441\u0435\u043A\u0443\u043D\u0434\u0443"
},
dual: "\u043C\u0430\u045A\u0435 \u043E\u0434 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0435",
other: "\u043C\u0430\u045A\u0435 \u043E\u0434 {{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0438"
},
xSeconds: {
one: {
standalone: "1 \u0441\u0435\u043A\u0443\u043D\u0434\u0430",
withPrepositionAgo: "1 \u0441\u0435\u043A\u0443\u043D\u0434\u0435",
withPrepositionIn: "1 \u0441\u0435\u043A\u0443\u043D\u0434\u0443"
},
dual: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0435",
other: "{{count}} \u0441\u0435\u043A\u0443\u043D\u0434\u0438"
},
halfAMinute: "\u043F\u043E\u043B\u0430 \u043C\u0438\u043D\u0443\u0442\u0435",
lessThanXMinutes: {
one: {
standalone: "\u043C\u0430\u045A\u0435 \u043E\u0434 1 \u043C\u0438\u043D\u0443\u0442\u0435",
withPrepositionAgo: "\u043C\u0430\u045A\u0435 \u043E\u0434 1 \u043C\u0438\u043D\u0443\u0442\u0435",
withPrepositionIn: "\u043C\u0430\u045A\u0435 \u043E\u0434 1 \u043C\u0438\u043D\u0443\u0442\u0443"
},
dual: "\u043C\u0430\u045A\u0435 \u043E\u0434 {{count}} \u043C\u0438\u043D\u0443\u0442\u0435",
other: "\u043C\u0430\u045A\u0435 \u043E\u0434 {{count}} \u043C\u0438\u043D\u0443\u0442\u0430"
},
xMinutes: {
one: {
standalone: "1 \u043C\u0438\u043D\u0443\u0442\u0430",
withPrepositionAgo: "1 \u043C\u0438\u043D\u0443\u0442\u0435",
withPrepositionIn: "1 \u043C\u0438\u043D\u0443\u0442\u0443"
},
dual: "{{count}} \u043C\u0438\u043D\u0443\u0442\u0435",
other: "{{count}} \u043C\u0438\u043D\u0443\u0442\u0430"
},
aboutXHours: {
one: {
standalone: "\u043E\u043A\u043E 1 \u0441\u0430\u0442",
withPrepositionAgo: "\u043E\u043A\u043E 1 \u0441\u0430\u0442",
withPrepositionIn: "\u043E\u043A\u043E 1 \u0441\u0430\u0442"
},
dual: "\u043E\u043A\u043E {{count}} \u0441\u0430\u0442\u0430",
other: "\u043E\u043A\u043E {{count}} \u0441\u0430\u0442\u0438"
},
xHours: {
one: {
standalone: "1 \u0441\u0430\u0442",
withPrepositionAgo: "1 \u0441\u0430\u0442",
withPrepositionIn: "1 \u0441\u0430\u0442"
},
dual: "{{count}} \u0441\u0430\u0442\u0430",
other: "{{count}} \u0441\u0430\u0442\u0438"
},
xDays: {
one: {
standalone: "1 \u0434\u0430\u043D",
withPrepositionAgo: "1 \u0434\u0430\u043D",
withPrepositionIn: "1 \u0434\u0430\u043D"
},
dual: "{{count}} \u0434\u0430\u043D\u0430",
other: "{{count}} \u0434\u0430\u043D\u0430"
},
aboutXWeeks: {
one: {
standalone: "\u043E\u043A\u043E 1 \u043D\u0435\u0434\u0435\u0459\u0443",
withPrepositionAgo: "\u043E\u043A\u043E 1 \u043D\u0435\u0434\u0435\u0459\u0443",
withPrepositionIn: "\u043E\u043A\u043E 1 \u043D\u0435\u0434\u0435\u0459\u0443"
},
dual: "\u043E\u043A\u043E {{count}} \u043D\u0435\u0434\u0435\u0459\u0435",
other: "\u043E\u043A\u043E {{count}} \u043D\u0435\u0434\u0435\u0459\u0435"
},
xWeeks: {
one: {
standalone: "1 \u043D\u0435\u0434\u0435\u0459\u0443",
withPrepositionAgo: "1 \u043D\u0435\u0434\u0435\u0459\u0443",
withPrepositionIn: "1 \u043D\u0435\u0434\u0435\u0459\u0443"
},
dual: "{{count}} \u043D\u0435\u0434\u0435\u0459\u0435",
other: "{{count}} \u043D\u0435\u0434\u0435\u0459\u0435"
},
aboutXMonths: {
one: {
standalone: "\u043E\u043A\u043E 1 \u043C\u0435\u0441\u0435\u0446",
withPrepositionAgo: "\u043E\u043A\u043E 1 \u043C\u0435\u0441\u0435\u0446",
withPrepositionIn: "\u043E\u043A\u043E 1 \u043C\u0435\u0441\u0435\u0446"
},
dual: "\u043E\u043A\u043E {{count}} \u043C\u0435\u0441\u0435\u0446\u0430",
other: "\u043E\u043A\u043E {{count}} \u043C\u0435\u0441\u0435\u0446\u0438"
},
xMonths: {
one: {
standalone: "1 \u043C\u0435\u0441\u0435\u0446",
withPrepositionAgo: "1 \u043C\u0435\u0441\u0435\u0446",
withPrepositionIn: "1 \u043C\u0435\u0441\u0435\u0446"
},
dual: "{{count}} \u043C\u0435\u0441\u0435\u0446\u0430",
other: "{{count}} \u043C\u0435\u0441\u0435\u0446\u0438"
},
aboutXYears: {
one: {
standalone: "\u043E\u043A\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443",
withPrepositionAgo: "\u043E\u043A\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443",
withPrepositionIn: "\u043E\u043A\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443"
},
dual: "\u043E\u043A\u043E {{count}} \u0433\u043E\u0434\u0438\u043D\u0435",
other: "\u043E\u043A\u043E {{count}} \u0433\u043E\u0434\u0438\u043D\u0430"
},
xYears: {
one: {
standalone: "1 \u0433\u043E\u0434\u0438\u043D\u0430",
withPrepositionAgo: "1 \u0433\u043E\u0434\u0438\u043D\u0435",
withPrepositionIn: "1 \u0433\u043E\u0434\u0438\u043D\u0443"
},
dual: "{{count}} \u0433\u043E\u0434\u0438\u043D\u0435",
other: "{{count}} \u0433\u043E\u0434\u0438\u043D\u0430"
},
overXYears: {
one: {
standalone: "\u043F\u0440\u0435\u043A\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443",
withPrepositionAgo: "\u043F\u0440\u0435\u043A\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443",
withPrepositionIn: "\u043F\u0440\u0435\u043A\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443"
},
dual: "\u043F\u0440\u0435\u043A\u043E {{count}} \u0433\u043E\u0434\u0438\u043D\u0435",
other: "\u043F\u0440\u0435\u043A\u043E {{count}} \u0433\u043E\u0434\u0438\u043D\u0430"
},
almostXYears: {
one: {
standalone: "\u0433\u043E\u0442\u043E\u0432\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443",
withPrepositionAgo: "\u0433\u043E\u0442\u043E\u0432\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443",
withPrepositionIn: "\u0433\u043E\u0442\u043E\u0432\u043E 1 \u0433\u043E\u0434\u0438\u043D\u0443"
},
dual: "\u0433\u043E\u0442\u043E\u0432\u043E {{count}} \u0433\u043E\u0434\u0438\u043D\u0435",
other: "\u0433\u043E\u0442\u043E\u0432\u043E {{count}} \u0433\u043E\u0434\u0438\u043D\u0430"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
result = tokenValue.one.withPrepositionIn;
} else {
result = tokenValue.one.withPrepositionAgo;
}
} else {
result = tokenValue.one.standalone;
}
} else if (count % 10 > 1 && count % 10 < 5 && String(count).substr(-2, 1) !== "1") {
result = tokenValue.dual.replace("{{count}}", String(count));
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\u0437\u0430 " + result;
} else {
return "\u043F\u0440\u0435 " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/sr/_lib/formatLong.js
var dateFormats = {
full: "EEEE, d. MMMM yyyy.",
long: "d. MMMM yyyy.",
medium: "d. MMM yy.",
short: "dd. MM. yy."
};
var timeFormats = {
full: "HH:mm:ss (zzzz)",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} '\u0443' {{time}}",
long: "{{date}} '\u0443' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/sr/_lib/formatRelative.js
var formatRelativeLocale = {
lastWeek: function lastWeek(date) {
var day = date.getDay();
switch (day) {
case 0:
return "'\u043F\u0440\u043E\u0448\u043B\u0435 \u043D\u0435\u0434\u0435\u0459\u0435 \u0443' p";
case 3:
return "'\u043F\u0440\u043E\u0448\u043B\u0435 \u0441\u0440\u0435\u0434\u0435 \u0443' p";
case 6:
return "'\u043F\u0440\u043E\u0448\u043B\u0435 \u0441\u0443\u0431\u043E\u0442\u0435 \u0443' p";
default:
return "'\u043F\u0440\u043E\u0448\u043B\u0438' EEEE '\u0443' p";
}
},
yesterday: "'\u0458\u0443\u0447\u0435 \u0443' p",
today: "'\u0434\u0430\u043D\u0430\u0441 \u0443' p",
tomorrow: "'\u0441\u0443\u0442\u0440\u0430 \u0443' p",
nextWeek: function nextWeek(date) {
var day = date.getDay();
switch (day) {
case 0:
return "'\u0441\u043B\u0435\u0434\u0435\u045B\u0435 \u043D\u0435\u0434\u0435\u0459\u0435 \u0443' p";
case 3:
return "'\u0441\u043B\u0435\u0434\u0435\u045B\u0443 \u0441\u0440\u0435\u0434\u0443 \u0443' p";
case 6:
return "'\u0441\u043B\u0435\u0434\u0435\u045B\u0443 \u0441\u0443\u0431\u043E\u0442\u0443 \u0443' p";
default:
return "'\u0441\u043B\u0435\u0434\u0435\u045B\u0438' EEEE '\u0443' p";
}
},
other: "P"
};
var formatRelative = function formatRelative(token, date, _baseDate, _options) {
var format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date);
}
return format;
};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/sr/_lib/localize.js
var eraValues = {
narrow: ["\u043F\u0440.\u043D.\u0435.", "\u0410\u0414"],
abbreviated: ["\u043F\u0440. \u0425\u0440.", "\u043F\u043E. \u0425\u0440."],
wide: ["\u041F\u0440\u0435 \u0425\u0440\u0438\u0441\u0442\u0430", "\u041F\u043E\u0441\u043B\u0435 \u0425\u0440\u0438\u0441\u0442\u0430"]
};
var quarterValues = {
narrow: ["1.", "2.", "3.", "4."],
abbreviated: ["1. \u043A\u0432.", "2. \u043A\u0432.", "3. \u043A\u0432.", "4. \u043A\u0432."],
wide: ["1. \u043A\u0432\u0430\u0440\u0442\u0430\u043B", "2. \u043A\u0432\u0430\u0440\u0442\u0430\u043B", "3. \u043A\u0432\u0430\u0440\u0442\u0430\u043B", "4. \u043A\u0432\u0430\u0440\u0442\u0430\u043B"]
};
var monthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12."],
abbreviated: [
"\u0458\u0430\u043D",
"\u0444\u0435\u0431",
"\u043C\u0430\u0440",
"\u0430\u043F\u0440",
"\u043C\u0430\u0458",
"\u0458\u0443\u043D",
"\u0458\u0443\u043B",
"\u0430\u0432\u0433",
"\u0441\u0435\u043F",
"\u043E\u043A\u0442",
"\u043D\u043E\u0432",
"\u0434\u0435\u0446"],
wide: [
"\u0458\u0430\u043D\u0443\u0430\u0440",
"\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
"\u043C\u0430\u0440\u0442",
"\u0430\u043F\u0440\u0438\u043B",
"\u043C\u0430\u0458",
"\u0458\u0443\u043D",
"\u0458\u0443\u043B",
"\u0430\u0432\u0433\u0443\u0441\u0442",
"\u0441\u0435\u043F\u0442\u0435\u043C\u0431\u0430\u0440",
"\u043E\u043A\u0442\u043E\u0431\u0430\u0440",
"\u043D\u043E\u0432\u0435\u043C\u0431\u0430\u0440",
"\u0434\u0435\u0446\u0435\u043C\u0431\u0430\u0440"]
};
var formattingMonthValues = {
narrow: [
"1.",
"2.",
"3.",
"4.",
"5.",
"6.",
"7.",
"8.",
"9.",
"10.",
"11.",
"12."],
abbreviated: [
"\u0458\u0430\u043D",
"\u0444\u0435\u0431",
"\u043C\u0430\u0440",
"\u0430\u043F\u0440",
"\u043C\u0430\u0458",
"\u0458\u0443\u043D",
"\u0458\u0443\u043B",
"\u0430\u0432\u0433",
"\u0441\u0435\u043F",
"\u043E\u043A\u0442",
"\u043D\u043E\u0432",
"\u0434\u0435\u0446"],
wide: [
"\u0458\u0430\u043D\u0443\u0430\u0440",
"\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
"\u043C\u0430\u0440\u0442",
"\u0430\u043F\u0440\u0438\u043B",
"\u043C\u0430\u0458",
"\u0458\u0443\u043D",
"\u0458\u0443\u043B",
"\u0430\u0432\u0433\u0443\u0441\u0442",
"\u0441\u0435\u043F\u0442\u0435\u043C\u0431\u0430\u0440",
"\u043E\u043A\u0442\u043E\u0431\u0430\u0440",
"\u043D\u043E\u0432\u0435\u043C\u0431\u0430\u0440",
"\u0434\u0435\u0446\u0435\u043C\u0431\u0430\u0440"]
};
var dayValues = {
narrow: ["\u041D", "\u041F", "\u0423", "\u0421", "\u0427", "\u041F", "\u0421"],
short: ["\u043D\u0435\u0434", "\u043F\u043E\u043D", "\u0443\u0442\u043E", "\u0441\u0440\u0435", "\u0447\u0435\u0442", "\u043F\u0435\u0442", "\u0441\u0443\u0431"],
abbreviated: ["\u043D\u0435\u0434", "\u043F\u043E\u043D", "\u0443\u0442\u043E", "\u0441\u0440\u0435", "\u0447\u0435\u0442", "\u043F\u0435\u0442", "\u0441\u0443\u0431"],
wide: [
"\u043D\u0435\u0434\u0435\u0459\u0430",
"\u043F\u043E\u043D\u0435\u0434\u0435\u0459\u0430\u043A",
"\u0443\u0442\u043E\u0440\u0430\u043A",
"\u0441\u0440\u0435\u0434\u0430",
"\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043A",
"\u043F\u0435\u0442\u0430\u043A",
"\u0441\u0443\u0431\u043E\u0442\u0430"]
};
var formattingDayPeriodValues = {
narrow: {
am: "\u0410\u041C",
pm: "\u041F\u041C",
midnight: "\u043F\u043E\u043D\u043E\u045B",
noon: "\u043F\u043E\u0434\u043D\u0435",
morning: "\u0443\u0458\u0443\u0442\u0440\u0443",
afternoon: "\u043F\u043E\u043F\u043E\u0434\u043D\u0435",
evening: "\u0443\u0432\u0435\u0447\u0435",
night: "\u043D\u043E\u045B\u0443"
},
abbreviated: {
am: "\u0410\u041C",
pm: "\u041F\u041C",
midnight: "\u043F\u043E\u043D\u043E\u045B",
noon: "\u043F\u043E\u0434\u043D\u0435",
morning: "\u0443\u0458\u0443\u0442\u0440\u0443",
afternoon: "\u043F\u043E\u043F\u043E\u0434\u043D\u0435",
evening: "\u0443\u0432\u0435\u0447\u0435",
night: "\u043D\u043E\u045B\u0443"
},
wide: {
am: "AM",
pm: "PM",
midnight: "\u043F\u043E\u043D\u043E\u045B",
noon: "\u043F\u043E\u0434\u043D\u0435",
morning: "\u0443\u0458\u0443\u0442\u0440\u0443",
afternoon: "\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u0434\u043D\u0435",
evening: "\u0443\u0432\u0435\u0447\u0435",
night: "\u043D\u043E\u045B\u0443"
}
};
var dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "\u043F\u043E\u043D\u043E\u045B",
noon: "\u043F\u043E\u0434\u043D\u0435",
morning: "\u0443\u0458\u0443\u0442\u0440\u0443",
afternoon: "\u043F\u043E\u043F\u043E\u0434\u043D\u0435",
evening: "\u0443\u0432\u0435\u0447\u0435",
night: "\u043D\u043E\u045B\u0443"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "\u043F\u043E\u043D\u043E\u045B",
noon: "\u043F\u043E\u0434\u043D\u0435",
morning: "\u0443\u0458\u0443\u0442\u0440\u0443",
afternoon: "\u043F\u043E\u043F\u043E\u0434\u043D\u0435",
evening: "\u0443\u0432\u0435\u0447\u0435",
night: "\u043D\u043E\u045B\u0443"
},
wide: {
am: "AM",
pm: "PM",
midnight: "\u043F\u043E\u043D\u043E\u045B",
noon: "\u043F\u043E\u0434\u043D\u0435",
morning: "\u0443\u0458\u0443\u0442\u0440\u0443",
afternoon: "\u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u0434\u043D\u0435",
evening: "\u0443\u0432\u0435\u0447\u0435",
night: "\u043D\u043E\u045B\u0443"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return number + ".";
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/sr/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)\./i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(пр\.н\.е\.|АД)/i,
abbreviated: /^(пр\.\s?Хр\.|по\.\s?Хр\.)/i,
wide: /^(Пре Христа|пре нове ере|После Христа|нова ера)/i
};
var parseEraPatterns = {
any: [/^пр/i, /^(по|нова)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^[1234]\.\s?кв\.?/i,
wide: /^[1234]\. квартал/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^(10|11|12|[123456789])\./i,
abbreviated: /^(јан|феб|мар|апр|мај|јун|јул|авг|сеп|окт|нов|дец)/i,
wide: /^((јануар|јануара)|(фебруар|фебруара)|(март|марта)|(април|априла)|(мја|маја)|(јун|јуна)|(јул|јула)|(август|августа)|(септембар|септембра)|(октобар|октобра)|(новембар|новембра)|(децембар|децембра))/i
};
var parseMonthPatterns = {
narrow: [
/^1/i,
/^2/i,
/^3/i,
/^4/i,
/^5/i,
/^6/i,
/^7/i,
/^8/i,
/^9/i,
/^10/i,
/^11/i,
/^12/i],
any: [
/^ја/i,
/^ф/i,
/^мар/i,
/^ап/i,
/^мај/i,
/^јун/i,
/^јул/i,
/^авг/i,
/^с/i,
/^о/i,
/^н/i,
/^д/i]
};
var matchDayPatterns = {
narrow: /^[пусчн]/i,
short: /^(нед|пон|уто|сре|чет|пет|суб)/i,
abbreviated: /^(нед|пон|уто|сре|чет|пет|суб)/i,
wide: /^(недеља|понедељак|уторак|среда|четвртак|петак|субота)/i
};
var parseDayPatterns = {
narrow: [/^п/i, /^у/i, /^с/i, /^ч/i, /^п/i, /^с/i, /^н/i],
any: [/^нед/i, /^пон/i, /^уто/i, /^сре/i, /^чет/i, /^пет/i, /^суб/i]
};
var matchDayPeriodPatterns = {
any: /^(ам|пм|поноћ|(по)?подне|увече|ноћу|после подне|ујутру)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^поно/i,
noon: /^под/i,
morning: /ујутру/i,
afternoon: /(после\s|по)+подне/i,
evening: /(увече)/i,
night: /(ноћу)/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/sr.js
var sr = {
code: "sr",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/sr/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
sr: sr }) });
//# debugId=8421216C5E8BBBC864756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1,3 @@
import type { ClientUser } from 'payload';
export declare const isClientUserObject: (user: any) => user is ClientUser;
//# sourceMappingURL=isClientUserObject.d.ts.map

View File

@@ -0,0 +1,32 @@
Prism.languages.sql = {
'comment': {
pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,
lookbehind: true
},
'variable': [
{
pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,
greedy: true
},
/@[\w.$]+/
],
'string': {
pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,
greedy: true,
lookbehind: true
},
'identifier': {
pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,
greedy: true,
lookbehind: true,
inside: {
'punctuation': /^`|`$/
}
},
'function': /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, // Should we highlight user defined functions too?
'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,
'boolean': /\b(?:FALSE|NULL|TRUE)\b/i,
'number': /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,
'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
'punctuation': /[;[\]()`,.]/
};

View File

@@ -0,0 +1,94 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.semconvStabilityFromStr = exports.SemconvStability = void 0;
var SemconvStability;
(function (SemconvStability) {
/** Emit only stable semantic conventions. */
SemconvStability[SemconvStability["STABLE"] = 1] = "STABLE";
/** Emit only old semantic conventions. */
SemconvStability[SemconvStability["OLD"] = 2] = "OLD";
/** Emit both stable and old semantic conventions. */
SemconvStability[SemconvStability["DUPLICATE"] = 3] = "DUPLICATE";
})(SemconvStability = exports.SemconvStability || (exports.SemconvStability = {}));
/**
* Determine the appropriate semconv stability for the given namespace.
*
* This will parse the given string of comma-separated values (often
* `process.env.OTEL_SEMCONV_STABILITY_OPT_IN`) looking for the `${namespace}`
* or `${namespace}/dup` tokens. This is a pattern defined by a number of
* non-normative semconv documents.
*
* For example:
* - namespace 'http': https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/
* - namespace 'database': https://opentelemetry.io/docs/specs/semconv/non-normative/database-migration/
* - namespace 'k8s': https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-migration/
*
* Usage:
*
* import {SemconvStability, semconvStabilityFromStr} from '@opentelemetry/instrumentation';
*
* export class FooInstrumentation extends InstrumentationBase<FooInstrumentationConfig> {
* private _semconvStability: SemconvStability;
* constructor(config: FooInstrumentationConfig = {}) {
* super('@opentelemetry/instrumentation-foo', VERSION, config);
*
* // When supporting the OTEL_SEMCONV_STABILITY_OPT_IN envvar
* this._semconvStability = semconvStabilityFromStr(
* 'http',
* process.env.OTEL_SEMCONV_STABILITY_OPT_IN
* );
*
* // or when supporting a `semconvStabilityOptIn` config option (e.g. for
* // the web where there are no envvars).
* this._semconvStability = semconvStabilityFromStr(
* 'http',
* config?.semconvStabilityOptIn
* );
* }
* }
*
* // Then, to apply semconv, use the following or similar:
* if (this._semconvStability & SemconvStability.OLD) {
* // ...
* }
* if (this._semconvStability & SemconvStability.STABLE) {
* // ...
* }
*
*/
function semconvStabilityFromStr(namespace, str) {
let semconvStability = SemconvStability.OLD;
// The same parsing of `str` as `getStringListFromEnv` from the core pkg.
const entries = str
?.split(',')
.map(v => v.trim())
.filter(s => s !== '');
for (const entry of entries ?? []) {
if (entry.toLowerCase() === namespace + '/dup') {
// DUPLICATE takes highest precedence.
semconvStability = SemconvStability.DUPLICATE;
break;
}
else if (entry.toLowerCase() === namespace) {
semconvStability = SemconvStability.STABLE;
}
}
return semconvStability;
}
exports.semconvStabilityFromStr = semconvStabilityFromStr;
//# sourceMappingURL=semconvStability.js.map

View File

@@ -0,0 +1,5 @@
export declare const startOfSecondWithOptions: import("./types.js").FPFn2<
Date,
import("../startOfSecond.js").StartOfSecondOptions<Date> | undefined,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,7 @@
/// <reference types="lodash" />
import { Options } from './index';
import { AST } from './types/AST';
export declare function generate(ast: AST, options?: Options): string;
declare function generateTypeUnmemoized(ast: AST, options: Options): string;
export declare const generateType: typeof generateTypeUnmemoized & import("lodash").MemoizedFunction;
export {};

View File

@@ -0,0 +1,15 @@
export * from "./core.js";
export * from "./parse.js";
export * from "./errors.js";
export * from "./schemas.js";
export * from "./checks.js";
export * from "./versions.js";
export * as util from "./util.js";
export * as regexes from "./regexes.js";
export * as locales from "../locales/index.js";
export * from "./registries.js";
export * from "./doc.js";
export * from "./function.js";
export * from "./api.js";
export * from "./to-json-schema.js";
export * as JSONSchema from "./json-schema.js";

View File

@@ -0,0 +1,29 @@
Prism.languages['visual-basic'] = {
'comment': {
pattern: /(?:[']|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,
inside: {
'keyword': /^REM/i
}
},
'directive': {
pattern: /#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,
alias: 'property',
greedy: true
},
'string': {
pattern: /\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,
greedy: true
},
'date': {
pattern: /#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,
alias: 'number'
},
'number': /(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,
'boolean': /\b(?:False|Nothing|True)\b/i,
'keyword': /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,
'operator': /[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,
'punctuation': /[{}().,:?]/
};
Prism.languages.vb = Prism.languages['visual-basic'];
Prism.languages.vba = Prism.languages['visual-basic'];

View File

@@ -0,0 +1,214 @@
import type { Client, ResultSet } from '@libsql/client';
import type { DrizzleConfig, Relation, Relations, SQL } from 'drizzle-orm';
import type { DrizzleD1Database } from 'drizzle-orm/d1';
import type { LibSQLDatabase } from 'drizzle-orm/libsql';
import type { AnySQLiteColumn, SQLiteColumn, SQLiteInsertOnConflictDoUpdateConfig, SQLiteTableWithColumns, SQLiteTransactionConfig } from 'drizzle-orm/sqlite-core';
import type { SQLiteRaw } from 'drizzle-orm/sqlite-core/query-builders/raw';
import type { Payload, PayloadRequest } from 'payload';
import type { Operators } from '../queries/operatorMap.js';
import type { BuildQueryJoinAliases, DrizzleAdapter } from '../types.js';
import type { extendDrizzleTable } from '../utilities/extendDrizzleTable.js';
type SQLiteSchema = {
relations: Record<string, GenericRelation>;
tables: Record<string, SQLiteTableWithColumns<any>>;
};
type SQLiteSchemaHookArgs = {
extendTable: typeof extendDrizzleTable;
schema: SQLiteSchema;
};
export type SQLiteSchemaHook = (args: SQLiteSchemaHookArgs) => Promise<SQLiteSchema> | SQLiteSchema;
export type BaseSQLiteArgs = {
/**
* Transform the schema after it's built.
* You can use it to customize the schema with features that aren't supported by Payload.
* Examples may include: composite indices, generated columns, vectors
*/
afterSchemaInit?: SQLiteSchemaHook[];
/**
* Enable this flag if you want to thread your own ID to create operation data, for example:
* ```ts
* // doc created with id 1
* const doc = await payload.create({ collection: 'posts', data: {id: 1, title: "my title"}})
* ```
*/
allowIDOnCreate?: boolean;
/**
* Enable [AUTOINCREMENT](https://www.sqlite.org/autoinc.html) for Primary Keys.
* This ensures that the same ID cannot be reused from previously deleted rows.
*/
autoIncrement?: boolean;
/**
* Transform the schema before it's built.
* You can use it to preserve an existing database schema and if there are any collissions Payload will override them.
* To generate Drizzle schema from the database, see [Drizzle Kit introspection](https://orm.drizzle.team/kit-docs/commands#introspect--pull)
*/
beforeSchemaInit?: SQLiteSchemaHook[];
/**
* Store blocks as JSON column instead of storing them in a relational structure.
*/
blocksAsJSON?: boolean;
/** Generated schema from payload generate:db-schema file path */
generateSchemaOutputFile?: string;
idType?: 'number' | 'uuid';
localesSuffix?: string;
logger?: DrizzleConfig['logger'];
migrationDir?: string;
prodMigrations?: {
down: (args: MigrateDownArgs) => Promise<void>;
name: string;
up: (args: MigrateUpArgs) => Promise<void>;
}[];
push?: boolean;
relationshipsSuffix?: string;
schemaName?: string;
transactionOptions?: false | SQLiteTransactionConfig;
versionsSuffix?: string;
};
export type GenericColumns = {
[x: string]: AnySQLiteColumn;
};
export type GenericTable = SQLiteTableWithColumns<{
columns: GenericColumns;
dialect: string;
name: string;
schema: string;
}>;
export type GenericRelation = Relations<string, Record<string, Relation<string>>>;
export type CountDistinct = (args: {
column?: SQLiteColumn<any>;
db: LibSQLDatabase;
joins: BuildQueryJoinAliases;
tableName: string;
where: SQL;
}) => Promise<number>;
export type DeleteWhere = (args: {
db: LibSQLDatabase;
tableName: string;
where: SQL;
}) => Promise<void>;
export type DropDatabase = (args: {
adapter: BaseSQLiteAdapter;
}) => Promise<void>;
export type Execute<T> = (args: {
db?: DrizzleD1Database | LibSQLDatabase;
drizzle?: DrizzleD1Database | LibSQLDatabase;
raw?: string;
sql?: SQL<unknown>;
}) => SQLiteRaw<Promise<T>> | SQLiteRaw<ResultSet>;
export type Insert = (args: {
db: LibSQLDatabase;
onConflictDoUpdate?: SQLiteInsertOnConflictDoUpdateConfig<any>;
tableName: string;
values: Record<string, unknown> | Record<string, unknown>[];
}) => Promise<Record<string, unknown>[]>;
type SQLiteDrizzleAdapter = Omit<DrizzleAdapter, 'countDistinct' | 'deleteWhere' | 'drizzle' | 'dropDatabase' | 'execute' | 'idType' | 'insert' | 'operators' | 'relations'>;
export interface GeneratedDatabaseSchema {
schemaUntyped: Record<string, unknown>;
}
type ResolveSchemaType<T> = 'schema' extends keyof T ? T['schema'] : GeneratedDatabaseSchema['schemaUntyped'];
type Drizzle = {
$client: Client;
} & LibSQLDatabase<ResolveSchemaType<GeneratedDatabaseSchema>>;
export type BaseSQLiteAdapter = {
afterSchemaInit: SQLiteSchemaHook[];
autoIncrement: boolean;
beforeSchemaInit: SQLiteSchemaHook[];
client: Client;
countDistinct: CountDistinct;
defaultDrizzleSnapshot: any;
deleteWhere: DeleteWhere;
dropDatabase: DropDatabase;
execute: Execute<unknown>;
/**
* An object keyed on each table, with a key value pair where the constraint name is the key, followed by the dot-notation field name
* Used for returning properly formed errors from unique fields
*/
fieldConstraints: Record<string, Record<string, string>>;
idType: BaseSQLiteArgs['idType'];
initializing: Promise<void>;
insert: Insert;
localesSuffix?: string;
logger: DrizzleConfig['logger'];
operators: Operators;
prodMigrations?: {
down: (args: MigrateDownArgs) => Promise<void>;
name: string;
up: (args: MigrateUpArgs) => Promise<void>;
}[];
push: boolean;
rejectInitializing: () => void;
relations: Record<string, GenericRelation>;
relationshipsSuffix?: string;
resolveInitializing: () => void;
schema: Record<string, GenericRelation | GenericTable>;
schemaName?: BaseSQLiteArgs['schemaName'];
tableNameMap: Map<string, string>;
tables: Record<string, GenericTable>;
transactionOptions: SQLiteTransactionConfig;
versionsSuffix?: string;
} & SQLiteDrizzleAdapter;
export type IDType = 'integer' | 'numeric' | 'text';
export type MigrateUpArgs = {
/**
* The SQLite Drizzle instance that you can use to execute SQL directly within the current transaction.
* @example
* ```ts
* import { type MigrateUpArgs, sql } from '@payloadcms/db-sqlite'
*
* export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
* const { rows: posts } = await db.run(sql`SELECT * FROM posts`)
* }
* ```
*/
db: Drizzle;
/**
* The Payload instance that you can use to execute Local API methods
* To use the current transaction you must pass `req` to arguments
* @example
* ```ts
* import { type MigrateUpArgs } from '@payloadcms/db-sqlite'
*
* export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
* const posts = await payload.find({ collection: 'posts', req })
* }
* ```
*/
payload: Payload;
/**
* The `PayloadRequest` object that contains the current transaction
*/
req: PayloadRequest;
};
export type MigrateDownArgs = {
/**
* The SQLite Drizzle instance that you can use to execute SQL directly within the current transaction.
* @example
* ```ts
* import { type MigrateDownArgs, sql } from '@payloadcms/db-sqlite'
*
* export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
* const { rows: posts } = await db.run(sql`SELECT * FROM posts`)
* }
* ```
*/
db: Drizzle;
/**
* The Payload instance that you can use to execute Local API methods
* To use the current transaction you must pass `req` to arguments
* @example
* ```ts
* import { type MigrateDownArgs } from '@payloadcms/db-sqlite'
*
* export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
* const posts = await payload.find({ collection: 'posts', req })
* }
* ```
*/
payload: Payload;
/**
* The `PayloadRequest` object that contains the current transaction
*/
req: PayloadRequest;
};
export {};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,81 @@
import { Parser } from "../Parser.mjs";
import { parseNDigits } from "../utils.mjs";
export class QuarterParser extends Parser {
priority = 120;
parse(dateString, token, match) {
switch (token) {
// 1, 2, 3, 4
case "Q":
case "QQ": // 01, 02, 03, 04
return parseNDigits(token.length, dateString);
// 1st, 2nd, 3rd, 4th
case "Qo":
return match.ordinalNumber(dateString, { unit: "quarter" });
// Q1, Q2, Q3, Q4
case "QQQ":
return (
match.quarter(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.quarter(dateString, {
width: "narrow",
context: "formatting",
})
);
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
case "QQQQQ":
return match.quarter(dateString, {
width: "narrow",
context: "formatting",
});
// 1st quarter, 2nd quarter, ...
case "QQQQ":
default:
return (
match.quarter(dateString, {
width: "wide",
context: "formatting",
}) ||
match.quarter(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.quarter(dateString, {
width: "narrow",
context: "formatting",
})
);
}
}
validate(_date, value) {
return value >= 1 && value <= 4;
}
set(date, _flags, value) {
date.setMonth((value - 1) * 3, 1);
date.setHours(0, 0, 0, 0);
return date;
}
incompatibleTokens = [
"Y",
"R",
"q",
"M",
"L",
"w",
"I",
"d",
"D",
"i",
"e",
"c",
"t",
"T",
];
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"smile.js","sources":["../../../src/icons/smile.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Smile\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNOCAxNHMxLjUgMiA0IDIgNC0yIDQtMiIgLz4KICA8bGluZSB4MT0iOSIgeDI9IjkuMDEiIHkxPSI5IiB5Mj0iOSIgLz4KICA8bGluZSB4MT0iMTUiIHgyPSIxNS4wMSIgeTE9IjkiIHkyPSI5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/smile\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 Smile = createLucideIcon('Smile', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M8 14s1.5 2 4 2 4-2 4-2', key: '1y1vjs' }],\n ['line', { x1: '9', x2: '9.01', y1: '9', y2: '9', key: 'yxxnd0' }],\n ['line', { x1: '15', x2: '15.01', y1: '9', y2: '9', key: '1p4y9e' }],\n]);\n\nexport default Smile;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,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,CACxD,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACjE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACrE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,133 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)\.?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(o\.? ?Kr\.?|m\.? ?Kr\.?)/i,
abbreviated: /^(o\.? ?Kr\.?|m\.? ?Kr\.?)/i,
wide: /^(ovdal Kristusa|ovdal min áiggi|maŋŋel Kristusa|min áigi)/i,
};
const parseEraPatterns = {
any: [/^o/i, /^m/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234](\.)? kvartála/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[ogncmsbčj]/i,
abbreviated:
/^(ođđa|guov|njuk|cuo|mies|geas|suoi|borg|čakč|golg|skáb|juov)\.?/i,
wide: /^(ođđajagemánnu|guovvamánnu|njukčamánnu|cuoŋománnu|miessemánnu|geassemánnu|suoidnemánnu|borgemánnu|čakčamánnu|golggotmánnu|skábmamánnu|juovlamánnu)/i,
};
const parseMonthPatterns = {
narrow: [
/^o/i,
/^g/i,
/^n/i,
/^c/i,
/^m/i,
/^g/i,
/^s/i,
/^b/i,
/^č/i,
/^g/i,
/^s/i,
/^j/i,
],
any: [
/^o/i,
/^gu/i,
/^n/i,
/^c/i,
/^m/i,
/^ge/i,
/^su/i,
/^b/i,
/^č/i,
/^go/i,
/^sk/i,
/^j/i,
],
};
const matchDayPatterns = {
narrow: /^[svmgdbl]/i,
short: /^(sotn|vuos|maŋ|gask|duor|bear|láv)/i,
abbreviated: /^(sotn|vuos|maŋ|gask|duor|bear|láv)/i,
wide: /^(sotnabeaivi|vuossárga|maŋŋebárga|gaskavahkku|duorastat|bearjadat|lávvardat)/i,
};
const parseDayPatterns = {
any: [/^s/i, /^v/i, /^m/i, /^g/i, /^d/i, /^b/i, /^l/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(gaskaidja|gaskabeaivvi|(på) (iđđes|maŋŋel gaskabeaivvi|eahkes|ihkku)|[ap])/i,
any: /^([ap]\.?\s?m\.?|gaskaidja|gaskabeaivvi|(på) (iđđes|maŋŋel gaskabeaivvi|eahkes|ihkku))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a(\.?\s?m\.?)?$/i,
pm: /^p(\.?\s?m\.?)?$/i,
midnight: /^gaskai/i,
noon: /^gaskab/i,
morning: /iđđes/i,
afternoon: /maŋŋel gaskabeaivvi/i,
evening: /eahkes/i,
night: /ihkku/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1 @@
{"version":3,"names":["unreleasedLabels","exports","safari","browserNameMap","and_chr","and_ff","android","chrome","edge","firefox","ie","ie_mob","ios_saf","node","deno","op_mob","opera","samsung"],"sources":["../src/targets.ts"],"sourcesContent":["export const unreleasedLabels = {\n safari: \"tp\",\n} as const;\n\n// Map from browserslist|@mdn/browser-compat-data browser names to @kangax/compat-table browser names\nexport const browserNameMap = {\n and_chr: \"chrome\",\n and_ff: \"firefox\",\n android: \"android\",\n chrome: \"chrome\",\n edge: \"edge\",\n firefox: \"firefox\",\n ie: \"ie\",\n ie_mob: \"ie\",\n ios_saf: \"ios\",\n node: \"node\",\n deno: \"deno\",\n op_mob: \"opera_mobile\",\n opera: \"opera\",\n safari: \"safari\",\n samsung: \"samsung\",\n} as const;\n\nexport type BrowserslistBrowserName = keyof typeof browserNameMap;\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9BE,MAAM,EAAE;AACV,CAAU;AAGH,MAAMC,cAAc,GAAAF,OAAA,CAAAE,cAAA,GAAG;EAC5BC,OAAO,EAAE,QAAQ;EACjBC,MAAM,EAAE,SAAS;EACjBC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE,KAAK;EACdC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,cAAc;EACtBC,KAAK,EAAE,OAAO;EACdd,MAAM,EAAE,QAAQ;EAChBe,OAAO,EAAE;AACX,CAAU","ignoreList":[]}

View File

@@ -0,0 +1,6 @@
export { default as CSSTransition } from './CSSTransition';
export { default as ReplaceTransition } from './ReplaceTransition';
export { default as SwitchTransition } from './SwitchTransition';
export { default as TransitionGroup } from './TransitionGroup';
export { default as Transition } from './Transition';
export { default as config } from './config';

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/real.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyPgTable } from '~/pg-core/table.ts';\nimport { PgColumn, PgColumnBuilder } from './common.ts';\n\nexport type PgRealBuilderInitial<TName extends string> = PgRealBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'PgReal';\n\tdata: number;\n\tdriverParam: string | number;\n\tenumValues: undefined;\n}>;\n\nexport class PgRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'PgReal'>> extends PgColumnBuilder<\n\tT,\n\t{ length: number | undefined }\n> {\n\tstatic override readonly [entityKind]: string = 'PgRealBuilder';\n\n\tconstructor(name: T['name'], length?: number) {\n\t\tsuper(name, 'number', 'PgReal');\n\t\tthis.config.length = length;\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyPgTable<{ name: TTableName }>,\n\t): PgReal<MakeColumnConfig<T, TTableName>> {\n\t\treturn new PgReal<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class PgReal<T extends ColumnBaseConfig<'number', 'PgReal'>> extends PgColumn<T> {\n\tstatic override readonly [entityKind]: string = 'PgReal';\n\n\tconstructor(table: AnyPgTable<{ name: T['tableName'] }>, config: PgRealBuilder<T>['config']) {\n\t\tsuper(table, config);\n\t}\n\n\tgetSQLType(): string {\n\t\treturn 'real';\n\t}\n\n\toverride mapFromDriverValue = (value: string | number): number => {\n\t\tif (typeof value === 'string') {\n\t\t\treturn Number.parseFloat(value);\n\t\t}\n\t\treturn value;\n\t};\n}\n\nexport function real(): PgRealBuilderInitial<''>;\nexport function real<TName extends string>(name: TName): PgRealBuilderInitial<TName>;\nexport function real(name?: string) {\n\treturn new PgRealBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,UAAU,uBAAuB;AAWnC,MAAM,sBAA6E,gBAGxF;AAAA,EACD,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB,QAAiB;AAC7C,UAAM,MAAM,UAAU,QAAQ;AAC9B,SAAK,OAAO,SAAS;AAAA,EACtB;AAAA;AAAA,EAGS,MACR,OAC0C;AAC1C,WAAO,IAAI,OAAwC,OAAO,KAAK,MAA8C;AAAA,EAC9G;AACD;AAEO,MAAM,eAA+D,SAAY;AAAA,EACvF,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,OAA6C,QAAoC;AAC5F,UAAM,OAAO,MAAM;AAAA,EACpB;AAAA,EAEA,aAAqB;AACpB,WAAO;AAAA,EACR;AAAA,EAES,qBAAqB,CAAC,UAAmC;AACjE,QAAI,OAAO,UAAU,UAAU;AAC9B,aAAO,OAAO,WAAW,KAAK;AAAA,IAC/B;AACA,WAAO;AAAA,EACR;AACD;AAIO,SAAS,KAAK,MAAe;AACnC,SAAO,IAAI,cAAc,QAAQ,EAAE;AACpC;","names":[]}

View File

@@ -0,0 +1,29 @@
import { DirectusUser } from "../../../schema/user.cjs";
import { NestedPartial } from "../../../types/utils.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/create/users.d.ts
type CreateUserOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusUser<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create multiple new users.
*
* @param items The items to create
* @param query Optional return data query
*
* @returns Returns the user objects for the created users.
*/
declare const createUsers: <Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(items: NestedPartial<DirectusUser<Schema>>[], query?: TQuery) => RestCommand<CreateUserOutput<Schema, TQuery>[], Schema>;
/**
* Create a new user.
*
* @param item The user to create
* @param query Optional return data query
*
* @returns Returns the user object for the created user.
*/
declare const createUser: <Schema, const TQuery extends Query<Schema, DirectusUser<Schema>>>(item: NestedPartial<DirectusUser<Schema>>, query?: TQuery) => RestCommand<CreateUserOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateUserOutput, createUser, createUsers };
//# sourceMappingURL=users.d.cts.map

View File

@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_apply_descriptor_destructure.cjs",
"module": "../../esm/_class_apply_descriptor_destructure.js"
}

View File

@@ -0,0 +1,8 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
module.exports = {};

View File

@@ -0,0 +1,8 @@
import type { DrizzleAdapter } from '../types.js';
export declare const buildIndexName: ({ name, adapter, appendSuffix, number, }: {
adapter: DrizzleAdapter;
appendSuffix?: boolean;
name: string;
number?: number;
}) => string;
//# sourceMappingURL=buildIndexName.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_arrayLikeToArray","require","_unsupportedIterableToArray","o","minLen","arrayLikeToArray","name","Object","prototype","toString","call","slice","constructor","Array","from","test"],"sources":["../../src/helpers/unsupportedIterableToArray.ts"],"sourcesContent":["/* @minVersion 7.9.0 */\n\nimport arrayLikeToArray from \"./arrayLikeToArray.ts\";\n\ntype NonArrayIterable<V, T extends Iterable<V> = Iterable<V>> = T extends any[]\n ? never\n : Iterable<V>;\n\nexport default function _unsupportedIterableToArray<T>(\n o: RelativeIndexable<T> /* string | typedarray */ | ArrayLike<T> | Set<T>,\n minLen?: number | null,\n): T[];\nexport default function _unsupportedIterableToArray<T, K>(\n o: Map<K, T>,\n minLen?: number | null,\n): [K, T][];\n// This is a specific overload added specifically for createForOfIteratorHelpers.ts\nexport default function _unsupportedIterableToArray<T>(\n o: NonArrayIterable<T>,\n minLen?: number | null,\n): undefined;\nexport default function _unsupportedIterableToArray(\n o: any,\n minLen?: number | null,\n): any[] | undefined {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray<string>(o, minLen);\n var name = Object.prototype.toString.call(o).slice(8, -1);\n if (name === \"Object\" && o.constructor) name = o.constructor.name;\n if (name === \"Map\" || name === \"Set\") return Array.from(o);\n if (\n name === \"Arguments\" ||\n /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(name)\n ) {\n return arrayLikeToArray(o, minLen);\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAmBe,SAASC,2BAA2BA,CACjDC,CAAM,EACNC,MAAsB,EACH;EACnB,IAAI,CAACD,CAAC,EAAE;EACR,IAAI,OAAOA,CAAC,KAAK,QAAQ,EAAE,OAAO,IAAAE,yBAAgB,EAASF,CAAC,EAAEC,MAAM,CAAC;EACrE,IAAIE,IAAI,GAAGC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACP,CAAC,CAAC,CAACQ,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EACzD,IAAIL,IAAI,KAAK,QAAQ,IAAIH,CAAC,CAACS,WAAW,EAAEN,IAAI,GAAGH,CAAC,CAACS,WAAW,CAACN,IAAI;EACjE,IAAIA,IAAI,KAAK,KAAK,IAAIA,IAAI,KAAK,KAAK,EAAE,OAAOO,KAAK,CAACC,IAAI,CAACX,CAAC,CAAC;EAC1D,IACEG,IAAI,KAAK,WAAW,IACpB,0CAA0C,CAACS,IAAI,CAACT,IAAI,CAAC,EACrD;IACA,OAAO,IAAAD,yBAAgB,EAACF,CAAC,EAAEC,MAAM,CAAC;EACpC;AACF","ignoreList":[]}

View File

@@ -0,0 +1,14 @@
import type { LRUMap } from '@sentry/core';
import type { UndiciRequest, UndiciResponse } from '../integrations/node-fetch/types';
/**
* Add trace propagation headers to an outgoing fetch/undici request.
*
* Checks if the request URL matches trace propagation targets,
* then injects sentry-trace, traceparent, and baggage headers.
*/
export declare function addTracePropagationHeadersToFetchRequest(request: UndiciRequest, propagationDecisionMap: LRUMap<string, boolean>): void;
/** Add a breadcrumb for an outgoing fetch/undici request. */
export declare function addFetchRequestBreadcrumb(request: UndiciRequest, response: UndiciResponse): void;
/** Get the absolute URL from an origin and path. */
export declare function getAbsoluteUrl(origin: string, path?: string): string;
//# sourceMappingURL=outgoingFetchRequest.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 { addHours as fn } from "../addHours.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const addHoursWithOptions = convertToFP(fn, 3);
// Fallback for modularized imports:
export default addHoursWithOptions;

View File

@@ -0,0 +1,149 @@
'use strict';
function createMultipartBuffers(boundary, sizes) {
const bufs = [];
for (let i = 0; i < sizes.length; ++i) {
const mb = sizes[i] * 1024 * 1024;
bufs.push(Buffer.from([
`--${boundary}`,
`content-disposition: form-data; name="field${i + 1}"`,
'',
'0'.repeat(mb),
'',
].join('\r\n')));
}
bufs.push(Buffer.from([
`--${boundary}--`,
'',
].join('\r\n')));
return bufs;
}
const boundary = '-----------------------------168072824752491622650073';
const buffers = createMultipartBuffers(boundary, [
10,
10,
10,
20,
50,
]);
const calls = {
partBegin: 0,
headerField: 0,
headerValue: 0,
headerEnd: 0,
headersEnd: 0,
partData: 0,
partEnd: 0,
end: 0,
};
const moduleName = process.argv[2];
switch (moduleName) {
case 'busboy': {
const busboy = require('busboy');
const parser = busboy({
limits: {
fieldSizeLimit: Infinity,
},
headers: {
'content-type': `multipart/form-data; boundary=${boundary}`,
},
});
parser.on('field', (name, val, info) => {
++calls.partBegin;
++calls.partData;
++calls.partEnd;
}).on('close', () => {
++calls.end;
console.timeEnd(moduleName);
});
console.time(moduleName);
for (const buf of buffers)
parser.write(buf);
break;
}
case 'formidable': {
const { MultipartParser } = require('formidable');
const parser = new MultipartParser();
parser.initWithBoundary(boundary);
parser.on('data', ({ name }) => {
++calls[name];
if (name === 'end')
console.timeEnd(moduleName);
});
console.time(moduleName);
for (const buf of buffers)
parser.write(buf);
break;
}
case 'multiparty': {
const { Readable } = require('stream');
const { Form } = require('multiparty');
const form = new Form({
maxFieldsSize: Infinity,
maxFields: Infinity,
maxFilesSize: Infinity,
autoFields: false,
autoFiles: false,
});
const req = new Readable({ read: () => {} });
req.headers = {
'content-type': `multipart/form-data; boundary=${boundary}`,
};
function hijack(name, fn) {
const oldFn = form[name];
form[name] = function() {
fn();
return oldFn.apply(this, arguments);
};
}
hijack('onParseHeaderField', () => {
++calls.headerField;
});
hijack('onParseHeaderValue', () => {
++calls.headerValue;
});
hijack('onParsePartBegin', () => {
++calls.partBegin;
});
hijack('onParsePartData', () => {
++calls.partData;
});
hijack('onParsePartEnd', () => {
++calls.partEnd;
});
form.on('close', () => {
++calls.end;
console.timeEnd(moduleName);
}).on('part', (p) => p.resume());
console.time(moduleName);
form.parse(req);
for (const buf of buffers)
req.push(buf);
req.push(null);
break;
}
default:
if (moduleName === undefined)
console.error('Missing parser module name');
else
console.error(`Invalid parser module name: ${moduleName}`);
process.exit(1);
}

View File

@@ -0,0 +1,52 @@
{
"name": "ieee754",
"description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object",
"version": "1.2.1",
"author": {
"name": "Feross Aboukhadijeh",
"email": "feross@feross.org",
"url": "https://feross.org"
},
"contributors": [
"Romain Beauxis <toots@rastageeks.org>"
],
"devDependencies": {
"airtap": "^3.0.0",
"standard": "*",
"tape": "^5.0.1"
},
"keywords": [
"IEEE 754",
"buffer",
"convert",
"floating point",
"ieee754"
],
"license": "BSD-3-Clause",
"main": "index.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "git://github.com/feross/ieee754.git"
},
"scripts": {
"test": "standard && npm run test-node && npm run test-browser",
"test-browser": "airtap -- test/*.js",
"test-browser-local": "airtap --local -- test/*.js",
"test-node": "tape test/*.js"
},
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
}

View File

@@ -0,0 +1,11 @@
import type { ClientUser } from 'payload';
import React from 'react';
import './index.scss';
export declare const SelectRow: React.FC<{
rowData: {
_isLocked: boolean;
_userEditing: ClientUser;
id: string;
};
}>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,158 @@
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint-disable @typescript-eslint/no-explicit-any */
import { isPlainObject } from './lodash.merge';
const MAX_LEVEL = 20;
/**
* Merges objects together
* @param args - objects / values to be merged
*/
export function merge(...args) {
let result = args.shift();
const objects = new WeakMap();
while (args.length > 0) {
result = mergeTwoObjects(result, args.shift(), 0, objects);
}
return result;
}
function takeValue(value) {
if (isArray(value)) {
return value.slice();
}
return value;
}
/**
* Merges two objects
* @param one - first object
* @param two - second object
* @param level - current deep level
* @param objects - objects holder that has been already referenced - to prevent
* cyclic dependency
*/
function mergeTwoObjects(one, two, level = 0, objects) {
let result;
if (level > MAX_LEVEL) {
return undefined;
}
level++;
if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {
result = takeValue(two);
}
else if (isArray(one)) {
result = one.slice();
if (isArray(two)) {
for (let i = 0, j = two.length; i < j; i++) {
result.push(takeValue(two[i]));
}
}
else if (isObject(two)) {
const keys = Object.keys(two);
for (let i = 0, j = keys.length; i < j; i++) {
const key = keys[i];
result[key] = takeValue(two[key]);
}
}
}
else if (isObject(one)) {
if (isObject(two)) {
if (!shouldMerge(one, two)) {
return two;
}
result = Object.assign({}, one);
const keys = Object.keys(two);
for (let i = 0, j = keys.length; i < j; i++) {
const key = keys[i];
const twoValue = two[key];
if (isPrimitive(twoValue)) {
if (typeof twoValue === 'undefined') {
delete result[key];
}
else {
// result[key] = takeValue(twoValue);
result[key] = twoValue;
}
}
else {
const obj1 = result[key];
const obj2 = twoValue;
if (wasObjectReferenced(one, key, objects) ||
wasObjectReferenced(two, key, objects)) {
delete result[key];
}
else {
if (isObject(obj1) && isObject(obj2)) {
const arr1 = objects.get(obj1) || [];
const arr2 = objects.get(obj2) || [];
arr1.push({ obj: one, key });
arr2.push({ obj: two, key });
objects.set(obj1, arr1);
objects.set(obj2, arr2);
}
result[key] = mergeTwoObjects(result[key], twoValue, level, objects);
}
}
}
}
else {
result = two;
}
}
return result;
}
/**
* Function to check if object has been already reference
* @param obj
* @param key
* @param objects
*/
function wasObjectReferenced(obj, key, objects) {
const arr = objects.get(obj[key]) || [];
for (let i = 0, j = arr.length; i < j; i++) {
const info = arr[i];
if (info.key === key && info.obj === obj) {
return true;
}
}
return false;
}
function isArray(value) {
return Array.isArray(value);
}
function isFunction(value) {
return typeof value === 'function';
}
function isObject(value) {
return (!isPrimitive(value) &&
!isArray(value) &&
!isFunction(value) &&
typeof value === 'object');
}
function isPrimitive(value) {
return (typeof value === 'string' ||
typeof value === 'number' ||
typeof value === 'boolean' ||
typeof value === 'undefined' ||
value instanceof Date ||
value instanceof RegExp ||
value === null);
}
function shouldMerge(one, two) {
if (!isPlainObject(one) || !isPlainObject(two)) {
return false;
}
return true;
}
//# sourceMappingURL=merge.js.map

View File

@@ -0,0 +1,21 @@
/**
* Gets the number of `placeholder` occurrences in `array`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} placeholder The placeholder to search for.
* @returns {number} Returns the placeholder count.
*/
function countHolders(array, placeholder) {
var length = array.length,
result = 0;
while (length--) {
if (array[length] === placeholder) {
++result;
}
}
return result;
}
module.exports = countHolders;

View File

@@ -0,0 +1,16 @@
/**
* 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.
*
*/
const mod = await (process.env.NODE_ENV !== 'production' ? import('./LexicalTypeaheadMenuPlugin.dev.mjs') : import('./LexicalTypeaheadMenuPlugin.prod.mjs'));
export const LexicalTypeaheadMenuPlugin = mod.LexicalTypeaheadMenuPlugin;
export const MenuOption = mod.MenuOption;
export const PUNCTUATION = mod.PUNCTUATION;
export const SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND = mod.SCROLL_TYPEAHEAD_OPTION_INTO_VIEW_COMMAND;
export const getScrollParent = mod.getScrollParent;
export const useBasicTypeaheadTriggerMatch = mod.useBasicTypeaheadTriggerMatch;
export const useDynamicPositioning = mod.useDynamicPositioning;

View File

@@ -0,0 +1,14 @@
import { UnpackList } from "./utils.cjs";
import { ItemType, RelationalFields } from "./schema.cjs";
import { MergeObjects, Query } from "./query.cjs";
//#region src/types/deep.d.ts
/**
* Deep filter object
*/
type QueryDeep<Schema, Item> = UnpackList<Item> extends infer FlatItem ? RelationalFields<Schema, FlatItem> extends never ? never : { [Field in RelationalFields<Schema, FlatItem> as ExtractCollection<Schema, FlatItem[Field]> extends any[] ? Field : never]?: ExtractCollection<Schema, FlatItem[Field]> extends infer CollectionItem ? Query<Schema, CollectionItem> extends infer TQuery ? MergeObjects<QueryDeep<Schema, CollectionItem>, { [Key in keyof Omit<TQuery, 'deep' | 'alias' | 'fields'> as `_${string & Key}`]: TQuery[Key] }> : never : never } : never;
type ExtractCollection<Schema, Item> = Extract<Item, ItemType<Schema>>;
//#endregion
export { QueryDeep };
//# sourceMappingURL=deep.d.cts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"font-family.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/font-family.ts"],"names":[],"mappings":";;;AASa,QAAA,UAAU,GAAwC;IAC3D,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE,EAAE;IAChB,MAAM,EAAE,KAAK;IACb,IAAI,cAAoC;IACxC,KAAK,EAAE,UAAC,QAAiB,EAAE,MAAkB;QACzC,IAAM,WAAW,GAAa,EAAE,CAAC;QACjC,IAAM,OAAO,GAAa,EAAE,CAAC;QAC7B,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;YACjB,QAAQ,KAAK,CAAC,IAAI,EAAE;gBAChB,0BAA2B;gBAC3B;oBACI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;oBAC9B,MAAM;gBACV;oBACI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;oBAC1C,MAAM;gBACV;oBACI,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;oBACpC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC;oBACvB,MAAM;aACb;QACL,CAAC,CAAC,CAAC;QACH,IAAI,WAAW,CAAC,MAAM,EAAE;YACpB,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SACvC;QACD,OAAO,OAAO,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAI,MAAM,MAAG,CAAC,EAArD,CAAqD,CAAC,CAAC;IAC1F,CAAC;CACJ,CAAC"}

View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2012-2014 Raynos.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

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 CloudLightning = createLucideIcon("CloudLightning", [
["path", { d: "M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973", key: "1cez44" }],
["path", { d: "m13 12-3 5h4l-3 5", key: "1t22er" }]
]);
export { CloudLightning as default };
//# sourceMappingURL=cloud-lightning.js.map

View File

@@ -0,0 +1,243 @@
import * as fs from 'fs';
import * as path from 'path';
let manifestCache = null;
let lastAppDirPath = null;
let lastIncludeRouteGroups = undefined;
function isPageFile(filename) {
return filename === 'page.tsx' || filename === 'page.jsx' || filename === 'page.ts' || filename === 'page.js';
}
function isRouteGroup(name) {
return name.startsWith('(') && name.endsWith(')');
}
function normalizeRouteGroupPath(routePath) {
// Remove route group segments from the path
// Using positive lookahead with (?=[^)\/]*\)) to avoid polynomial matching
return routePath.replace(/\/\((?=[^)/]*\))[^)/]+\)/g, '');
}
function getDynamicRouteSegment(name) {
if (name.startsWith('[[...') && name.endsWith(']]')) {
// Optional catchall: [[...param]]
const paramName = name.slice(5, -2); // Remove [[... and ]]
return `:${paramName}*?`; // Mark with ? as optional
} else if (name.startsWith('[...') && name.endsWith(']')) {
// Required catchall: [...param]
const paramName = name.slice(4, -1); // Remove [... and ]
return `:${paramName}*`;
}
// Regular dynamic: [param]
return `:${name.slice(1, -1)}`;
}
function buildRegexForDynamicRoute(routePath)
{
const segments = routePath.split('/').filter(Boolean);
const regexSegments = [];
const paramNames = [];
let hasOptionalCatchall = false;
for (const segment of segments) {
if (segment.startsWith(':')) {
const paramName = segment.substring(1);
if (paramName.endsWith('*?')) {
// Optional catchall: matches zero or more segments
const cleanParamName = paramName.slice(0, -2);
paramNames.push(cleanParamName);
// Handling this special case in pattern construction below
hasOptionalCatchall = true;
} else if (paramName.endsWith('*')) {
// Required catchall: matches one or more segments
const cleanParamName = paramName.slice(0, -1);
paramNames.push(cleanParamName);
regexSegments.push('(.+)');
} else {
// Regular dynamic segment
paramNames.push(paramName);
regexSegments.push('([^/]+)');
}
} else {
// Static segment - escape regex special characters including route group parentheses
regexSegments.push(segment.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
}
}
let pattern;
if (hasOptionalCatchall) {
if (regexSegments.length === 0) {
// If the optional catchall happens at the root, accept any path starting
// with a slash. Need capturing group for parameter extraction.
pattern = '^/(.*)$';
} else {
// For optional catchall, make the trailing slash and segments optional
// This allows matching both /catchall and /catchall/anything
const staticParts = regexSegments.join('/');
pattern = `^/${staticParts}(?:/(.*))?$`;
}
} else {
pattern = `^/${regexSegments.join('/')}$`;
}
return { regex: pattern, paramNames, hasOptionalPrefix: hasOptionalPrefix(paramNames) };
}
/**
* Detect if the first parameter is a common i18n prefix segment
* Common patterns: locale, lang, language
*/
function hasOptionalPrefix(paramNames) {
const firstParam = paramNames[0];
if (firstParam === undefined) {
return false;
}
return firstParam === 'locale' || firstParam === 'lang' || firstParam === 'language';
}
/**
* Check if a page file exports generateStaticParams (ISR/SSG indicator)
*/
function checkForGenerateStaticParams(pageFilePath) {
try {
const content = fs.readFileSync(pageFilePath, 'utf8');
// check for generateStaticParams export
// the regex covers `export function generateStaticParams`, `export async function generateStaticParams`, `export const generateStaticParams`
return /export\s+(async\s+)?function\s+generateStaticParams|export\s+const\s+generateStaticParams/.test(content);
} catch {
return false;
}
}
function scanAppDirectory(dir, basePath = '', includeRouteGroups = false) {
const dynamicRoutes = [];
const staticRoutes = [];
const isrRoutes = [];
try {
const entries = fs.readdirSync(dir, { withFileTypes: true });
const pageFile = entries.find(entry => isPageFile(entry.name));
if (pageFile) {
// Conditionally normalize the path based on includeRouteGroups option
const routePath = includeRouteGroups ? basePath || '/' : normalizeRouteGroupPath(basePath || '/');
const isDynamic = routePath.includes(':');
// Check if this page has generateStaticParams (ISR/SSG indicator)
const pageFilePath = path.join(dir, pageFile.name);
const hasGenerateStaticParams = checkForGenerateStaticParams(pageFilePath);
if (hasGenerateStaticParams) {
isrRoutes.push(routePath);
}
if (isDynamic) {
const { regex, paramNames, hasOptionalPrefix } = buildRegexForDynamicRoute(routePath);
dynamicRoutes.push({
path: routePath,
regex,
paramNames,
hasOptionalPrefix,
});
} else {
staticRoutes.push({
path: routePath,
});
}
}
for (const entry of entries) {
if (entry.isDirectory()) {
const fullPath = path.join(dir, entry.name);
let routeSegment;
const isDynamic = entry.name.startsWith('[') && entry.name.endsWith(']');
const isRouteGroupDir = isRouteGroup(entry.name);
if (isRouteGroupDir) {
if (includeRouteGroups) {
routeSegment = entry.name;
} else {
routeSegment = '';
}
} else if (isDynamic) {
routeSegment = getDynamicRouteSegment(entry.name);
} else {
routeSegment = entry.name;
}
const newBasePath = routeSegment ? `${basePath}/${routeSegment}` : basePath;
const subRoutes = scanAppDirectory(fullPath, newBasePath, includeRouteGroups);
dynamicRoutes.push(...subRoutes.dynamicRoutes);
staticRoutes.push(...subRoutes.staticRoutes);
isrRoutes.push(...subRoutes.isrRoutes);
}
}
} catch (error) {
// eslint-disable-next-line no-console
console.warn('Error building route manifest:', error);
}
return { dynamicRoutes, staticRoutes, isrRoutes };
}
/**
* Returns a route manifest for the given app directory
*/
function createRouteManifest(options) {
let targetDir;
if (options?.appDirPath) {
targetDir = options.appDirPath;
} else {
const projectDir = process.cwd();
const maybeAppDirPath = path.join(projectDir, 'app');
const maybeSrcAppDirPath = path.join(projectDir, 'src', 'app');
if (fs.existsSync(maybeAppDirPath) && fs.lstatSync(maybeAppDirPath).isDirectory()) {
targetDir = maybeAppDirPath;
} else if (fs.existsSync(maybeSrcAppDirPath) && fs.lstatSync(maybeSrcAppDirPath).isDirectory()) {
targetDir = maybeSrcAppDirPath;
}
}
if (!targetDir) {
return {
isrRoutes: [],
dynamicRoutes: [],
staticRoutes: [],
};
}
// Check if we can use cached version
if (manifestCache && lastAppDirPath === targetDir && lastIncludeRouteGroups === options?.includeRouteGroups) {
return manifestCache;
}
const { dynamicRoutes, staticRoutes, isrRoutes } = scanAppDirectory(
targetDir,
options?.basePath,
options?.includeRouteGroups,
);
const manifest = {
dynamicRoutes,
staticRoutes,
isrRoutes,
};
// set cache
manifestCache = manifest;
lastAppDirPath = targetDir;
lastIncludeRouteGroups = options?.includeRouteGroups;
return manifest;
}
export { createRouteManifest };
//# sourceMappingURL=createRouteManifest.js.map

View File

@@ -0,0 +1,296 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }// src/parser.ts
var _marked = require('marked');
// src/utils.ts
// src/styles.ts
var emptyStyle = {};
var baseHeaderStyles = {
fontWeight: "500",
paddingTop: 20
};
var h1 = {
...baseHeaderStyles,
fontSize: "2.5rem"
};
var h2 = {
...baseHeaderStyles,
fontSize: "2rem"
};
var h3 = {
...baseHeaderStyles,
fontSize: "1.75rem"
};
var h4 = {
...baseHeaderStyles,
fontSize: "1.5rem"
};
var h5 = {
...baseHeaderStyles,
fontSize: "1.25rem"
};
var h6 = {
...baseHeaderStyles,
fontSize: "1rem"
};
var bold = {
fontWeight: "bold"
};
var italic = {
fontStyle: "italic"
};
var blockQuote = {
background: "#f9f9f9",
borderLeft: "10px solid #ccc",
margin: "1.5em 10px",
padding: "1em 10px"
};
var codeInline = {
color: "#212529",
fontSize: "87.5%",
display: "inline",
background: " #f8f8f8",
fontFamily: `SFMono-Regular,Menlo,Monaco,Consolas,monospace`
};
var codeBlock = {
...codeInline,
paddingTop: 10,
paddingRight: 10,
paddingLeft: 10,
paddingBottom: 1,
marginBottom: 20,
background: " #f8f8f8"
};
var link = {
color: "#007bff",
textDecoration: "underline",
backgroundColor: "transparent"
};
var styles = {
h1,
h2,
h3,
h4,
h5,
h6,
blockQuote,
bold,
italic,
link,
codeBlock: { ...codeBlock, wordWrap: "break-word" },
codeInline: { ...codeInline, wordWrap: "break-word" },
p: emptyStyle,
li: emptyStyle,
ul: emptyStyle,
ol: emptyStyle,
image: emptyStyle,
br: emptyStyle,
hr: emptyStyle,
table: emptyStyle,
thead: emptyStyle,
tbody: emptyStyle,
th: emptyStyle,
td: emptyStyle,
tr: emptyStyle,
strikethrough: emptyStyle
};
// src/utils.ts
function escapeQuotes(value) {
if (typeof value === "string" && value.includes('"')) {
return value.replace(/"/g, "&#x27;");
}
return value;
}
function camelToKebabCase(str) {
return str.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
}
function parseCssInJsToInlineCss(cssProperties) {
if (!cssProperties)
return "";
const numericalCssProperties = [
"width",
"height",
"margin",
"marginTop",
"marginRight",
"marginBottom",
"marginLeft",
"padding",
"paddingTop",
"paddingRight",
"paddingBottom",
"paddingLeft",
"borderWidth",
"borderTopWidth",
"borderRightWidth",
"borderBottomWidth",
"borderLeftWidth",
"outlineWidth",
"top",
"right",
"bottom",
"left",
"fontSize",
"lineHeight",
"letterSpacing",
"wordSpacing",
"maxWidth",
"minWidth",
"maxHeight",
"minHeight",
"borderRadius",
"borderTopLeftRadius",
"borderTopRightRadius",
"borderBottomLeftRadius",
"borderBottomRightRadius",
"textIndent",
"gridColumnGap",
"gridRowGap",
"gridGap",
"translateX",
"translateY"
];
return Object.entries(cssProperties).map(([property, value]) => {
if (typeof value === "number" && numericalCssProperties.includes(property)) {
return `${camelToKebabCase(property)}:${value}px`;
} else {
const escapedValue = escapeQuotes(value);
return `${camelToKebabCase(property)}:${escapedValue}`;
}
}).join(";");
}
var initRenderer = ({
customStyles
}) => {
const finalStyles = { ...styles, ...customStyles };
const customRenderer = new (0, _marked.Renderer)();
customRenderer.blockquote = (quote) => {
return `<blockquote${parseCssInJsToInlineCss(finalStyles.blockQuote) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.blockQuote)}"` : ""}>
${quote}</blockquote>
`;
};
customRenderer.br = () => {
return `<br${parseCssInJsToInlineCss(finalStyles.br) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.br)}"` : ""} />`;
};
customRenderer.code = (code) => {
code = code.replace(/\n$/, "") + "\n";
return `<pre${parseCssInJsToInlineCss(finalStyles.codeBlock) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.codeBlock)}"` : ""}><code>${code}</code></pre>
`;
};
customRenderer.codespan = (text) => {
return `<code${parseCssInJsToInlineCss(finalStyles.codeInline) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.codeInline)}"` : ""}>${text}</code>`;
};
customRenderer.del = (text) => {
return `<del${parseCssInJsToInlineCss(finalStyles.strikethrough) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.strikethrough)}"` : ""}>${text}</del>`;
};
customRenderer.em = (text) => {
return `<em${parseCssInJsToInlineCss(finalStyles.italic) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.italic)}"` : ""}>${text}</em>`;
};
customRenderer.heading = (text, level) => {
return `<h${level}${parseCssInJsToInlineCss(
finalStyles[`h${level}`]
) !== "" ? ` style="${parseCssInJsToInlineCss(
finalStyles[`h${level}`]
)}"` : ""}>${text}</h${level}>`;
};
customRenderer.hr = () => {
return `<hr${parseCssInJsToInlineCss(finalStyles.hr) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.hr)}"` : ""} />
`;
};
customRenderer.image = (href, _, text) => {
return `<img src="${href}" alt="${text}"${parseCssInJsToInlineCss(finalStyles.image) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.image)}"` : ""}>`;
};
customRenderer.link = (href, _, text) => {
return `<a href="${href}" target="_blank"${parseCssInJsToInlineCss(finalStyles.link) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.link)}"` : ""}>${text}</a>`;
};
customRenderer.list = (body, ordered, start) => {
const type = ordered ? "ol" : "ul";
const startatt = ordered && start !== 1 ? ' start="' + start + '"' : "";
const styles2 = parseCssInJsToInlineCss(
finalStyles[ordered ? "ol" : "ul"]
);
return "<" + type + startatt + `${styles2 !== "" ? ` style="${styles2}"` : ""}>
` + body + "</" + type + ">\n";
};
customRenderer.listitem = (text) => {
return `<li${parseCssInJsToInlineCss(finalStyles.li) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.li)}"` : ""}>${text}</li>
`;
};
customRenderer.paragraph = (text) => {
return `<p${parseCssInJsToInlineCss(finalStyles.p) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.p)}"` : ""}>${text}</p>
`;
};
customRenderer.strong = (text) => {
return `<strong${parseCssInJsToInlineCss(finalStyles.bold) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.bold)}"` : ""}>${text}</strong>`;
};
customRenderer.table = (header, body) => {
if (body)
body = `<tbody>${body}</tbody>`;
return `<table${parseCssInJsToInlineCss(finalStyles.table) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.table)}"` : ""}>
<thead${parseCssInJsToInlineCss(finalStyles.thead) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.thead)}"` : ""}>
${header}</thead>
${body}</table>
`;
};
customRenderer.tablecell = (content, flags) => {
const type = flags.header ? "th" : "td";
const tag = flags.align ? `<${type} align="${flags.align}"${parseCssInJsToInlineCss(finalStyles.td) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.td)}"` : ""}>` : `<${type}${parseCssInJsToInlineCss(finalStyles.td) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.td)}"` : ""}>`;
return tag + content + `</${type}>
`;
};
customRenderer.tablerow = (content) => {
return `<tr${parseCssInJsToInlineCss(finalStyles.tr) !== "" ? ` style="${parseCssInJsToInlineCss(finalStyles.tr)}"` : ""}>
${content}</tr>
`;
};
return customRenderer;
};
// src/parser.ts
var MarkdownParser = class {
constructor({ customStyles }) {
this.renderer = initRenderer({ customStyles });
}
parse(markdown) {
return _marked.marked.parse(markdown, { renderer: this.renderer });
}
};
// src/parseMarkdownToJSX.ts
var parseMarkdownToJSX = ({
markdown,
customStyles
}) => {
const parser = new MarkdownParser({ customStyles });
return parser.parse(markdown);
};
// src/components/emailMarkdown.tsx
var _react = require('react'); var React = _interopRequireWildcard(_react);
var EmailMarkdown = ({
markdown,
markdownCustomStyles,
markdownContainerStyles
}) => {
const parsedMarkdown = parseMarkdownToJSX({
markdown,
customStyles: markdownCustomStyles
});
return /* @__PURE__ */ React.createElement(
"div",
{
style: markdownContainerStyles,
dangerouslySetInnerHTML: { __html: parsedMarkdown }
}
);
};
exports.EmailMarkdown = EmailMarkdown; exports.camelToKebabCase = camelToKebabCase; exports.parseCssInJsToInlineCss = parseCssInJsToInlineCss; exports.parseMarkdownToJSX = parseMarkdownToJSX;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,57 @@
'use strict';
module.exports = {
MAX_LENGTH: 10000,
// Digits
CHAR_0: '0', /* 0 */
CHAR_9: '9', /* 9 */
// Alphabet chars.
CHAR_UPPERCASE_A: 'A', /* A */
CHAR_LOWERCASE_A: 'a', /* a */
CHAR_UPPERCASE_Z: 'Z', /* Z */
CHAR_LOWERCASE_Z: 'z', /* z */
CHAR_LEFT_PARENTHESES: '(', /* ( */
CHAR_RIGHT_PARENTHESES: ')', /* ) */
CHAR_ASTERISK: '*', /* * */
// Non-alphabetic chars.
CHAR_AMPERSAND: '&', /* & */
CHAR_AT: '@', /* @ */
CHAR_BACKSLASH: '\\', /* \ */
CHAR_BACKTICK: '`', /* ` */
CHAR_CARRIAGE_RETURN: '\r', /* \r */
CHAR_CIRCUMFLEX_ACCENT: '^', /* ^ */
CHAR_COLON: ':', /* : */
CHAR_COMMA: ',', /* , */
CHAR_DOLLAR: '$', /* . */
CHAR_DOT: '.', /* . */
CHAR_DOUBLE_QUOTE: '"', /* " */
CHAR_EQUAL: '=', /* = */
CHAR_EXCLAMATION_MARK: '!', /* ! */
CHAR_FORM_FEED: '\f', /* \f */
CHAR_FORWARD_SLASH: '/', /* / */
CHAR_HASH: '#', /* # */
CHAR_HYPHEN_MINUS: '-', /* - */
CHAR_LEFT_ANGLE_BRACKET: '<', /* < */
CHAR_LEFT_CURLY_BRACE: '{', /* { */
CHAR_LEFT_SQUARE_BRACKET: '[', /* [ */
CHAR_LINE_FEED: '\n', /* \n */
CHAR_NO_BREAK_SPACE: '\u00A0', /* \u00A0 */
CHAR_PERCENT: '%', /* % */
CHAR_PLUS: '+', /* + */
CHAR_QUESTION_MARK: '?', /* ? */
CHAR_RIGHT_ANGLE_BRACKET: '>', /* > */
CHAR_RIGHT_CURLY_BRACE: '}', /* } */
CHAR_RIGHT_SQUARE_BRACKET: ']', /* ] */
CHAR_SEMICOLON: ';', /* ; */
CHAR_SINGLE_QUOTE: '\'', /* ' */
CHAR_SPACE: ' ', /* */
CHAR_TAB: '\t', /* \t */
CHAR_UNDERSCORE: '_', /* _ */
CHAR_VERTICAL_LINE: '|', /* | */
CHAR_ZERO_WIDTH_NOBREAK_SPACE: '\uFEFF' /* \uFEFF */
};

View File

@@ -0,0 +1,184 @@
# `@apm-js-collab/code-transformer`
This is a fork of
[`DataDog/orchestrion-js`](https://github.com/DataDog/orchestrion-js/).
This is a library to aid in instrumenting Node.js libraries at build or load
time.
It uses SWC's Rust AST walker to inject code that calls Node.js
[`TracingChannel`](https://nodejs.org/api/diagnostics_channel.html#class-tracingchannel).
You likely don't want to use this library directly; instead, consider using:
- [`@apm-js-collab/tracing-hooks/`](https://github.com/apm-js-collab/tracing-hooks/)
- ESM and `require` hooks to instrument modules as they are loaded.
- [`apm-js-collab/code-transformer-bundler-plugins`](https://github.com/apm-js-collab/code-transformer-bundler-plugins)
- Bundler plugins for webpack, Vite, Rollup and esbuild to instrument modules
at build time.
## JavaScript
`@apm-js-collab/code-transformer` exposes the Rust library as a WebAssembly
module.
### Building
To build the JavaScript module:
- Ensure you have [Rust installed](https://www.rust-lang.org/tools/install)
- Install the wasm toolchain\
`rustup target add wasm32-unknown-unknown --toolchain stable`
- Install dependencies and build the module\
`npm install && npm run build`
### Usage
```javascript
import * as codeTransformer from "@apm-js-collab/code-transformer";
// The full instrumentation config
const instrumentation = {
// The name of the diagnostics channel
channelName: "my-channel",
// Define the module you'd like to inject tracing channels into
module: {
name: "my-module",
versionRange: ">=1.0.0",
filePath: "./dist/index.js",
},
// Define the function you'd like to instrument
// (e.g., match a method named 'foo' that returns a Promise)
functionQuery: {
methodName: "fetch",
kind: "Async",
},
};
// Create an InstrumentationMatcher with an array of instrumentation configs
const matcher = codeTransformer.create([instrumentation]);
// Get a transformer for a specific module
const transformer = matcher.getTransformer(
"my-module",
"1.2.3",
"./dist/index.js",
);
if (transformer === undefined) {
throw new Error("No transformer found for module");
}
// Transform code
const inputCode = "async function fetch() { return 42; }";
const result = transformer.transform(inputCode, "unknown");
console.log(result.code);
// Both the matcher and transformer should be freed after use!
matcher.free();
transformer.free();
```
### API Reference
```ts
type ModuleType = "esm" | "cjs" | "unknown";
type FunctionKind = "Sync" | "Async";
```
#### **`FunctionQuery` Variants**
```ts
type FunctionQuery =
| // Match class constructor
{ className: string; index?: number }
| // Match class method
{
className: string;
methodName: string;
kind: FunctionKind;
index?: number;
}
| // Match method on objects
{ methodName: string; kind: FunctionKind; index?: number }
| // Match standalone function
{ functionName: string; kind: FunctionKind; index?: number }
| // Match arrow function or function expression
{ expressionName: string; kind: FunctionKind; index?: number };
```
#### **`ModuleMatcher`**
```ts
type ModuleMatcher = {
name: string; // Module name
versionRange: string; // Matching semver range
filePath: string; // Path to the file from the module root
};
```
#### **`InstrumentationConfig`**
```ts
type InstrumentationConfig = {
channelName: string; // Name of the diagnostics channel
module: ModuleMatcher;
functionQuery: FunctionQuery;
};
```
### Functions
```ts
create(configs: InstrumentationConfig[], dc_module?: string | null): InstrumentationMatcher;
```
Create a matcher for one or more instrumentation configurations.
- `configs` - Array of instrumentation configurations.
- `dc_module` - Optional module to import `diagnostics_channel` API from.
#### **`InstrumentationMatcher`**
```ts
getTransformer(module_name: string, version: string, file_path: string): Transformer | undefined;
```
Gets a transformer for a specific module and file.
Returns a `Transformer` for the given module, or `undefined` if there were no
matching instrumentation configurations.
- `module_name` - Name of the module.
- `version` - Version of the module.
- `file_path` - Path to the file from the module root.
```ts
free(): void;
```
Free the matcher memory when it's no longer needed.
#### **`Transformer`**
```ts
transform(code: string, module_type: ModuleType, sourcemap?: string | undefined): TransformOutput;
```
Transforms the code, injecting tracing as configured.
Returns `{ code, map }`. `map` will be undefined if no sourcemap was supplied.
- `code` - The JavaScript/TypeScript code to transform.
- `module_type` - The type of module being transformed.
- `sourcemap` - Optional existing source map for the code.
```ts
free(): void;
```
Free the transformer memory when it's no longer needed.
## License
See LICENSE

View File

@@ -0,0 +1,20 @@
var baseAssignValue = require('./_baseAssignValue'),
eq = require('./eq');
/**
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq(object[key], value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
module.exports = assignMergeValue;

View File

@@ -0,0 +1 @@
{"version":3,"names":["_classCheckPrivateStaticFieldDescriptor","descriptor","action","undefined","TypeError"],"sources":["../../src/helpers/classCheckPrivateStaticFieldDescriptor.js"],"sourcesContent":["/* @minVersion 7.13.10 */\n/* @onlyBabel7 */\n\nexport default function _classCheckPrivateStaticFieldDescriptor(\n descriptor,\n action,\n) {\n if (descriptor === undefined) {\n throw new TypeError(\n \"attempted to \" + action + \" private static field before its declaration\",\n );\n }\n}\n"],"mappings":";;;;;;AAGe,SAASA,uCAAuCA,CAC7DC,UAAU,EACVC,MAAM,EACN;EACA,IAAID,UAAU,KAAKE,SAAS,EAAE;IAC5B,MAAM,IAAIC,SAAS,CACjB,eAAe,GAAGF,MAAM,GAAG,8CAC7B,CAAC;EACH;AACF","ignoreList":[]}

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 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","2":"C L M G N O P"},C:{"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 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","16":"0C VC 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 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","16":"J bB K D E F A B C L M","132":"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"},E:{"1":"B C L M G 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","16":"J bB 6C bC","132":"K D E F A 7C 8C 9C AD"},F:{"1":"0 1 2 3 4 5 6 7 8 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","16":"F B JD KD LD MD PC xC","132":"9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB","260":"C ND QC"},G:{"1":"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","16":"bC OD yC PD QD","132":"E RD SD TD UD VD"},H:{"260":"mD"},I:{"1":"I","16":"VC nD oD pD","132":"J qD yC rD sD"},J:{"16":"D","132":"A"},K:{"1":"H","16":"A B C PC xC","260":"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 tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","132":"J"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:5,C:":default CSS pseudo-class",D:true};

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.00891,"56":0.00891,"72":0.00891,"105":0.00891,"115":0.12771,"139":0.00891,"140":0.0594,"142":0.02079,"143":0.19899,"144":0.0594,"145":0.40392,"146":0.89991,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 141 147 148 149 3.5 3.6"},D:{"44":0.00891,"56":0.00297,"63":0.02079,"64":0.02079,"66":0.02079,"70":0.01188,"71":0.0297,"75":0.01782,"76":0.00297,"79":0.00891,"83":0.04158,"84":0.00297,"88":0.00297,"93":0.02079,"95":0.00891,"96":0.02079,"98":0.02079,"101":0.02079,"103":0.00297,"104":0.00297,"106":0.03267,"108":0.00297,"109":1.13157,"110":0.01188,"111":0.01782,"112":0.02079,"115":0.03861,"116":0.02673,"117":0.02673,"119":0.00297,"120":0.00297,"121":0.00891,"122":0.00891,"124":0.00297,"125":0.00297,"126":0.06831,"127":0.06831,"128":0.10692,"129":0.01188,"130":0.18414,"131":0.07128,"132":0.00891,"133":0.0297,"135":0.0594,"137":0.06534,"138":0.1782,"139":0.02079,"140":0.16038,"141":0.85239,"142":3.4452,"143":5.42619,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 65 67 68 69 72 73 74 77 78 80 81 85 86 87 89 90 91 92 94 97 99 100 102 105 107 113 114 118 123 134 136 144 145 146"},F:{"46":0.00891,"64":0.00297,"93":0.0297,"95":0.03267,"101":0.0297,"105":0.00297,"114":0.00297,"120":0.00297,"122":0.00297,"123":0.0297,"124":0.42471,"125":0.93258,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 96 97 98 99 100 102 103 104 106 107 108 109 110 111 112 113 115 116 117 118 119 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.02673,"16":0.06534,"17":0.00891,"18":0.0594,"90":0.01782,"92":0.05049,"109":0.0297,"115":0.00297,"122":0.00297,"128":0.00297,"133":0.00891,"134":0.03861,"136":0.00891,"137":0.01188,"139":0.01188,"140":0.0297,"141":0.03267,"142":0.9801,"143":1.40481,_:"12 13 15 79 80 81 83 84 85 86 87 88 89 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 116 117 118 119 120 121 123 124 125 126 127 129 130 131 132 135 138"},E:{"12":0.00297,"15":0.00297,_:"0 4 5 6 7 8 9 10 11 13 14 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.1 17.2 17.3 17.4 17.5 18.0 18.1 18.2 18.3 18.4 26.3","11.1":0.01782,"13.1":0.02079,"15.6":0.20493,"16.6":0.0891,"17.6":0.13662,"18.5-18.6":0.32373,"26.0":0.07722,"26.1":0.47817,"26.2":0.1188},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00067,"5.0-5.1":0,"6.0-6.1":0.00134,"7.0-7.1":0.00101,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00268,"10.0-10.2":0.00034,"10.3":0.0047,"11.0-11.2":0.05769,"11.3-11.4":0.00168,"12.0-12.1":0.00134,"12.2-12.5":0.01509,"13.0-13.1":0.00034,"13.2":0.00235,"13.3":0.00067,"13.4-13.7":0.00235,"14.0-14.4":0.0047,"14.5-14.8":0.00503,"15.0-15.1":0.00537,"15.2-15.3":0.00402,"15.4":0.00436,"15.5":0.0047,"15.6-15.8":0.07278,"16.0":0.00838,"16.1":0.0161,"16.2":0.00838,"16.3":0.01509,"16.4":0.00369,"16.5":0.00637,"16.6-16.7":0.09458,"17.0":0.00537,"17.1":0.00872,"17.2":0.00637,"17.3":0.00973,"17.4":0.01643,"17.5":0.0322,"17.6-17.7":0.07445,"18.0":0.01677,"18.1":0.03488,"18.2":0.01845,"18.3":0.06003,"18.4":0.03085,"18.5-18.7":2.21551,"26.0":0.04326,"26.1":0.35986,"26.2":0.06842,"26.3":0.00302},P:{"4":0.08274,"22":0.01034,"23":0.05171,"24":0.03103,"25":0.0724,"26":0.13446,"27":0.20685,"28":0.20685,"29":0.53782,_:"20 21 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 14.0 15.0 16.0 17.0 19.0","7.2-7.4":0.05171,"13.0":0.03103,"18.0":0.01034},I:{"0":0.01404,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},A:{"11":0.02079,_:"6 7 8 9 10 5.5"},K:{"0":0.43592,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.01406},H:{"0":0},L:{"0":72.556},R:{_:"0"},M:{"0":0.07031}};

View File

@@ -0,0 +1,16 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { Fragment } from 'react';
import { asModal } from '../asModal/index.js';
const _Modal = (props) => {
const { children } = props;
if (children) {
if (typeof children === 'function') {
return (_jsx(Fragment, { children: children(props) }));
}
return (_jsx(Fragment, { children: children }));
}
return null;
};
export const Modal = asModal(_Modal);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_cloneNode","require","clone","node","cloneNode"],"sources":["../../src/clone/clone.ts"],"sourcesContent":["import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a shallow clone of a `node`, including only\n * properties belonging to the node.\n * @deprecated Use t.cloneNode instead.\n */\nexport default function clone<T extends t.Node>(node: T): T {\n return cloneNode(node, /* deep */ false);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAQe,SAASC,KAAKA,CAAmBC,IAAO,EAAK;EAC1D,OAAO,IAAAC,kBAAS,EAACD,IAAI,EAAa,KAAK,CAAC;AAC1C","ignoreList":[]}

View File

@@ -0,0 +1,4 @@
import type { Client } from '@sentry/core';
/** Ensure the `trace` context is set on all events. */
export declare function setupEventContextTrace(client: Client): void;
//# sourceMappingURL=setupEventContextTrace.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"hasManyNumber.d.ts","sourceRoot":"","sources":["../../../src/transform/read/hasManyNumber.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAE1C,KAAK,IAAI,GAAG;IACV,KAAK,EAAE,WAAW,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAA;IACrC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC5B,wBAAwB,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,sBAAsB,kEAMhC,IAAI,SA4BN,CAAA"}

View File

@@ -0,0 +1,27 @@
import type { BrowserClientReplayOptions, ClientOptions, Event, SeverityLevel } from '@sentry/core';
import { Client } from '@sentry/core';
export interface TestClientOptions extends ClientOptions, BrowserClientReplayOptions {
}
/**
*
*/
export declare class TestClient extends Client<TestClientOptions> {
constructor(options: TestClientOptions);
/**
*
*/
eventFromException(exception: any): PromiseLike<Event>;
/**
*
*/
eventFromMessage(message: string, level?: SeverityLevel): PromiseLike<Event>;
}
/**
*
*/
export declare function init(options: TestClientOptions): void;
/**
*
*/
export declare function getDefaultClientOptions(options?: Partial<ClientOptions>): ClientOptions;
//# sourceMappingURL=TestClient.d.ts.map

View File

@@ -0,0 +1,29 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { FarmOptions, PromiseWithCustomMessage, TaskQueue } from './types';
export default class Farm {
private _numOfWorkers;
private _callback;
private readonly _computeWorkerKey;
private readonly _workerSchedulingPolicy;
private readonly _cacheKeys;
private readonly _locks;
private _offset;
private readonly _taskQueue;
constructor(_numOfWorkers: number, _callback: Function, options?: {
computeWorkerKey?: FarmOptions['computeWorkerKey'];
workerSchedulingPolicy?: FarmOptions['workerSchedulingPolicy'];
taskQueue?: TaskQueue;
});
doWork(method: string, ...args: Array<unknown>): PromiseWithCustomMessage<unknown>;
private _process;
private _push;
private _getNextWorkerOffset;
private _lock;
private _unlock;
private _isLocked;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/Translation/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,UAAU,EACV,WAAW,EACX,QAAQ,EACR,SAAS,EACV,MAAM,0BAA0B,CAAA;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAK9C,OAAO,KAAkD,MAAM,OAAO,CAAA;AAEtE,KAAK,WAAW,CACd,uBAAuB,GAAG,EAAE,EAC5B,gCAAgC,SAAS,MAAM,GAAG,KAAK,IACrD;IACF,IAAI,EAAE,CAAC,gCAAgC,CAAC,SAAS,CAAC,KAAK,CAAC,GACpD,UAAU,GACV,uBAAuB,SAAS,MAAM,GACpC,UAAU,CAAC,uBAAuB,EAAE,gCAAgC,CAAC,GACrE,UAAU,CAAC,wBAAwB,EAAE,gCAAgC,CAAC,CAAA;IAC5E,eAAe,EAAE,eAAe,CAAA;IAChC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3D,CAAC,EAAE,SAAS,CAAC,qBAAqB,GAAG,OAAO,CAAC,gCAAgC,EAAE,MAAM,CAAC,CAAC,CAAA;CACxF,CAAA;AAiBD,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,UAAU,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAA;IAClC,YAAY,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAA;IAC7C,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,eAAe,CAAA;IAChC,0BAA0B,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3D,YAAY,EAAE,UAAU,CAAC,cAAc,CAAC,CAAA;CACzC,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAgE/C,CAAA;AAED,eAAO,MAAM,cAAc,GACzB,uBAAuB,OACvB,gCAAgC,SAAS,MAAM,qFAC0C,CAAA"}

View File

@@ -0,0 +1,59 @@
import { getTranslation } from '@payloadcms/translations';
/**
* @deprecated Import from `payload` instead
*/
export var EntityType = /*#__PURE__*/function (EntityType) {
EntityType["collection"] = "collections";
EntityType["global"] = "globals";
return EntityType;
}({});
export function groupNavItems(entities, permissions, i18n) {
const result = entities.reduce((groups, entityToGroup) => {
// Skip entities where admin.group is explicitly false
if (entityToGroup.entity?.admin?.group === false) {
return groups;
}
if (permissions?.[entityToGroup.type.toLowerCase()]?.[entityToGroup.entity.slug]?.read) {
const translatedGroup = getTranslation(entityToGroup.entity.admin.group, i18n);
const labelOrFunction = 'labels' in entityToGroup.entity ? entityToGroup.entity.labels.plural : entityToGroup.entity.label;
const label = typeof labelOrFunction === 'function' ? labelOrFunction({
i18n,
t: i18n.t
}) : labelOrFunction;
if (entityToGroup.entity.admin.group) {
const existingGroup = groups.find(group => getTranslation(group.label, i18n) === translatedGroup);
let matchedGroup = existingGroup;
if (!existingGroup) {
matchedGroup = {
entities: [],
label: translatedGroup
};
groups.push(matchedGroup);
}
matchedGroup.entities.push({
slug: entityToGroup.entity.slug,
type: entityToGroup.type,
label
});
} else {
const defaultGroup = groups.find(group => {
return getTranslation(group.label, i18n) === i18n.t(`general:${entityToGroup.type}`);
});
defaultGroup.entities.push({
slug: entityToGroup.entity.slug,
type: entityToGroup.type,
label
});
}
}
return groups;
}, [{
entities: [],
label: i18n.t('general:collections')
}, {
entities: [],
label: i18n.t('general:globals')
}]);
return result.filter(group => group.entities.length > 0);
}
//# sourceMappingURL=groupNavItems.js.map

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileVideo2 = createLucideIcon("FileVideo2", [
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["rect", { width: "8", height: "6", x: "2", y: "12", rx: "1", key: "1a6c1e" }],
["path", { d: "m10 15.5 4 2.5v-6l-4 2.5", key: "t7cp39" }]
]);
export { FileVideo2 as default };
//# sourceMappingURL=file-video-2.js.map

View File

@@ -0,0 +1,21 @@
/**
* @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 Diamond = createLucideIcon("Diamond", [
[
"path",
{
d: "M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",
key: "1f1r0c"
}
]
]);
export { Diamond as default };
//# sourceMappingURL=diamond.js.map

View File

@@ -0,0 +1,34 @@
"use strict";
exports.formatRelative = void 0;
var _index = require("../../../isSameWeek.js");
function checkWeek(date, baseDate, options) {
const baseFormat = "eeee p";
if ((0, _index.isSameWeek)(date, baseDate, options)) {
return baseFormat; // in same week
} else if (date.getTime() > baseDate.getTime()) {
return "'下个'" + baseFormat; // in next week
}
return "'上个'" + baseFormat; // in last week
}
const formatRelativeLocale = {
lastWeek: checkWeek, // days before yesterday, maybe in this week or last week
yesterday: "'昨天' p",
today: "'今天' p",
tomorrow: "'明天' p",
nextWeek: checkWeek, // days after tomorrow, maybe in this week or next week
other: "PP p",
};
const formatRelative = (token, date, baseDate, options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,14 @@
import { and, eq } from 'drizzle-orm';
export const deleteExistingArrayRows = async ({ adapter, db, parentID, tableName })=>{
const table = adapter.tables[tableName];
const whereConstraints = [
eq(table._parentID, parentID)
];
await adapter.deleteWhere({
db,
tableName,
where: and(...whereConstraints)
});
};
//# sourceMappingURL=deleteExistingArrayRows.js.map

View File

@@ -0,0 +1,146 @@
(function (Prism) {
// see https://github.com/cooklang/spec/blob/main/EBNF.md
var single_token_suffix = /(?:(?!\s)[\d$+<=a-zA-Z\x80-\uFFFF])+/.source;
var multi_token_infix = /[^{}@#]+/.source;
var multi_token_suffix = /\{[^}#@]*\}/.source;
var multi_token = multi_token_infix + multi_token_suffix;
var timer_units = /(?:h|hours|hrs|m|min|minutes)/.source;
var amount_group_impl = {
pattern: /\{[^{}]*\}/,
inside: {
'amount': {
pattern: /([\{|])[^{}|*%]+/,
lookbehind: true,
alias: 'number',
},
'unit': {
pattern: /(%)[^}]+/,
lookbehind: true,
alias: 'symbol',
},
'servings-scaler': {
pattern: /\*/,
alias: 'operator',
},
'servings-alternative-separator': {
pattern: /\|/,
alias: 'operator',
},
'unit-separator': {
pattern: /(?:%|(\*)%)/,
lookbehind: true,
alias: 'operator',
},
'punctuation': /[{}]/,
}
};
Prism.languages.cooklang = {
'comment': {
// [- comment -]
// -- comment
pattern: /\[-[\s\S]*?-\]|--.*/,
greedy: true,
},
'meta': { // >> key: value
pattern: />>.*:.*/,
inside: {
'property': { // key:
pattern: /(>>\s*)[^\s:](?:[^:]*[^\s:])?/,
lookbehind: true,
}
}
},
'cookware-group': { // #...{...}, #...
pattern: new RegExp('#(?:'
+ multi_token
+ '|'
+ single_token_suffix
+ ')'
),
inside: {
'cookware': {
pattern: new RegExp('(^#)(?:'
+ multi_token_infix
+ ')'
),
lookbehind: true,
alias: 'variable',
},
'cookware-keyword': {
pattern: /^#/,
alias: 'keyword',
},
'quantity-group': {
pattern: new RegExp(/\{[^{}@#]*\}/),
inside: {
'quantity': {
pattern: new RegExp(/(^\{)/.source + multi_token_infix),
lookbehind: true,
alias: 'number',
},
'punctuation': /[{}]/,
}
}
},
},
'ingredient-group': { // @...{...}, @...
pattern: new RegExp('@(?:'
+ multi_token
+ '|'
+ single_token_suffix
+ ')'),
inside: {
'ingredient': {
pattern: new RegExp('(^@)(?:'
+ multi_token_infix
+ ')'),
lookbehind: true,
alias: 'variable',
},
'ingredient-keyword': {
pattern: /^@/,
alias: 'keyword',
},
'amount-group': amount_group_impl,
}
},
'timer-group': { // ~timer{...}
// eslint-disable-next-line regexp/sort-alternatives
pattern: /~(?!\s)[^@#~{}]*\{[^{}]*\}/,
inside: {
'timer': {
pattern: /(^~)[^{]+/,
lookbehind: true,
alias: 'variable',
},
'duration-group': { // {...}
pattern: /\{[^{}]*\}/,
inside: {
'punctuation': /[{}]/,
'unit': {
pattern: new RegExp(/(%\s*)/.source + timer_units + /\b/.source),
lookbehind: true,
alias: 'symbol',
},
'operator': /%/,
'duration': {
pattern: /\d+/,
alias: 'number',
},
}
},
'timer-keyword': {
pattern: /^~/,
alias: 'keyword',
},
}
}
};
}(Prism));

View File

@@ -0,0 +1,190 @@
import type { Maybe } from '../jsutils/Maybe';
import type { ObjMap } from '../jsutils/ObjMap';
import type { Path } from '../jsutils/Path';
import type { PromiseOrValue } from '../jsutils/PromiseOrValue';
import type { GraphQLFormattedError } from '../error/GraphQLError';
import { GraphQLError } from '../error/GraphQLError';
import type {
DocumentNode,
FieldNode,
FragmentDefinitionNode,
OperationDefinitionNode,
} from '../language/ast';
import type {
GraphQLField,
GraphQLFieldResolver,
GraphQLObjectType,
GraphQLResolveInfo,
GraphQLTypeResolver,
} from '../type/definition';
import type { GraphQLSchema } from '../type/schema';
/**
* Terminology
*
* "Definitions" are the generic name for top-level statements in the document.
* Examples of this include:
* 1) Operations (such as a query)
* 2) Fragments
*
* "Operations" are a generic name for requests in the document.
* Examples of this include:
* 1) query,
* 2) mutation
*
* "Selections" are the definitions that can appear legally and at
* single level of the query. These include:
* 1) field references e.g `a`
* 2) fragment "spreads" e.g. `...c`
* 3) inline fragment "spreads" e.g. `...on Type { a }`
*/
/**
* Data that must be available at all points during query execution.
*
* Namely, schema of the type system that is currently executing,
* and the fragments defined in the query document
*/
export interface ExecutionContext {
schema: GraphQLSchema;
fragments: ObjMap<FragmentDefinitionNode>;
rootValue: unknown;
contextValue: unknown;
operation: OperationDefinitionNode;
variableValues: {
[variable: string]: unknown;
};
fieldResolver: GraphQLFieldResolver<any, any>;
typeResolver: GraphQLTypeResolver<any, any>;
subscribeFieldResolver: GraphQLFieldResolver<any, any>;
errors: Array<GraphQLError>;
}
/**
* The result of GraphQL execution.
*
* - `errors` is included when any errors occurred as a non-empty array.
* - `data` is the result of a successful execution of the query.
* - `extensions` is reserved for adding non-standard properties.
*/
export interface ExecutionResult<
TData = ObjMap<unknown>,
TExtensions = ObjMap<unknown>,
> {
errors?: ReadonlyArray<GraphQLError>;
data?: TData | null;
extensions?: TExtensions;
}
export interface FormattedExecutionResult<
TData = ObjMap<unknown>,
TExtensions = ObjMap<unknown>,
> {
errors?: ReadonlyArray<GraphQLFormattedError>;
data?: TData | null;
extensions?: TExtensions;
}
export interface ExecutionArgs {
schema: GraphQLSchema;
document: DocumentNode;
rootValue?: unknown;
contextValue?: unknown;
variableValues?: Maybe<{
readonly [variable: string]: unknown;
}>;
operationName?: Maybe<string>;
fieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
typeResolver?: Maybe<GraphQLTypeResolver<any, any>>;
subscribeFieldResolver?: Maybe<GraphQLFieldResolver<any, any>>;
/** Additional execution options. */
options?: {
/** Set the maximum number of errors allowed for coercing (defaults to 50). */
maxCoercionErrors?: number;
};
}
/**
* Implements the "Executing requests" section of the GraphQL specification.
*
* Returns either a synchronous ExecutionResult (if all encountered resolvers
* are synchronous), or a Promise of an ExecutionResult that will eventually be
* resolved and never rejected.
*
* If the arguments to this function do not result in a legal execution context,
* a GraphQLError will be thrown immediately explaining the invalid input.
*/
export declare function execute(
args: ExecutionArgs,
): PromiseOrValue<ExecutionResult>;
/**
* Also implements the "Executing requests" section of the GraphQL specification.
* However, it guarantees to complete synchronously (or throw an error) assuming
* that all field resolvers are also synchronous.
*/
export declare function executeSync(args: ExecutionArgs): ExecutionResult;
/**
* Essential assertions before executing to provide developer feedback for
* improper use of the GraphQL library.
*
* @internal
*/
export declare function assertValidExecutionArguments(
schema: GraphQLSchema,
document: DocumentNode,
rawVariableValues: Maybe<{
readonly [variable: string]: unknown;
}>,
): void;
/**
* Constructs a ExecutionContext object from the arguments passed to
* execute, which we will pass throughout the other execution methods.
*
* Throws a GraphQLError if a valid execution context cannot be created.
*
* @internal
*/
export declare function buildExecutionContext(
args: ExecutionArgs,
): ReadonlyArray<GraphQLError> | ExecutionContext;
/**
* @internal
*/
export declare function buildResolveInfo(
exeContext: ExecutionContext,
fieldDef: GraphQLField<unknown, unknown>,
fieldNodes: ReadonlyArray<FieldNode>,
parentType: GraphQLObjectType,
path: Path,
): GraphQLResolveInfo;
/**
* If a resolveType function is not given, then a default resolve behavior is
* used which attempts two strategies:
*
* First, See if the provided value has a `__typename` field defined, if so, use
* that value as name of the resolved type.
*
* Otherwise, test each possible type for the abstract type by calling
* isTypeOf for the object being coerced, returning the first type that matches.
*/
export declare const defaultTypeResolver: GraphQLTypeResolver<unknown, unknown>;
/**
* If a resolve function is not given, then a default resolve behavior is used
* which takes the property of the source object of the same name as the field
* and returns it as the result, or if it's a function, returns the result
* of calling that function while passing along args and context value.
*/
export declare const defaultFieldResolver: GraphQLFieldResolver<
unknown,
unknown
>;
/**
* This method looks up the field on the given type definition.
* It has special casing for the three introspection fields,
* __schema, __type and __typename. __typename is special because
* it can always be queried as a field, even in situations where no
* other fields are allowed, like on a Union. __schema and __type
* could get automatically added to the query type, but that would
* require mutating type definitions, which would cause issues.
*
* @internal
*/
export declare function getFieldDef(
schema: GraphQLSchema,
parentType: GraphQLObjectType,
fieldNode: FieldNode,
): Maybe<GraphQLField<unknown, unknown>>;

View File

@@ -0,0 +1,17 @@
import { LRUMap } from '@sentry/core';
/**
* Cache for ISR/SSG route checks. Exported for testing purposes.
* @internal
*/
export declare const IS_ISR_SSG_ROUTE_CACHE: LRUMap<string, boolean>;
/**
* Check if the current page is an ISR/SSG route by checking the route manifest.
* @internal Exported for testing purposes.
*/
export declare function isIsrSsgRoute(pathname: string): boolean;
/**
* Remove sentry-trace and baggage meta tags from the DOM if this is an ISR/SSG page.
* This prevents the browser tracing integration from using stale/cached trace IDs.
*/
export declare function removeIsrSsgTraceMetaTags(): void;
//# sourceMappingURL=isrRoutingTracing.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ensureIsWrapped.d.ts","sourceRoot":"","sources":["../../../src/utils/ensureIsWrapped.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,wBAAgB,eAAe,CAC7B,oBAAoB,EAAE,OAAO,EAC7B,IAAI,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAChE,IAAI,CAwBN"}

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('flow', require('../flow'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,276 @@
import { URL } from 'node:url'
import { Duplex, Readable, Writable } from 'node:stream'
import { EventEmitter } from 'node:events'
import { Blob } from 'node:buffer'
import { IncomingHttpHeaders } from './header'
import BodyReadable from './readable'
import { FormData } from './formdata'
import Errors from './errors'
import { Autocomplete } from './utility'
type AbortSignal = unknown
export default Dispatcher
export type UndiciHeaders = Record<string, string | string[]> | IncomingHttpHeaders | string[] | Iterable<[string, string | string[] | undefined]> | null
/** Dispatcher is the core API used to dispatch requests. */
declare class Dispatcher extends EventEmitter {
/** Dispatches a request. This API is expected to evolve through semver-major versions and is less stable than the preceding higher level APIs. It is primarily intended for library developers who implement higher level APIs on top of this. */
dispatch (options: Dispatcher.DispatchOptions, handler: Dispatcher.DispatchHandler): boolean
/** Starts two-way communications with the requested resource. */
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void): void
connect<TOpaque = null>(options: Dispatcher.ConnectOptions<TOpaque>): Promise<Dispatcher.ConnectData<TOpaque>>
/** Compose a chain of dispatchers */
compose (dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher
compose (...dispatchers: Dispatcher.DispatcherComposeInterceptor[]): Dispatcher.ComposedDispatcher
/** Performs an HTTP request. */
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, callback: (err: Error | null, data: Dispatcher.ResponseData<TOpaque>) => void): void
request<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>): Promise<Dispatcher.ResponseData<TOpaque>>
/** For easy use with `stream.pipeline`. */
pipeline<TOpaque = null>(options: Dispatcher.PipelineOptions<TOpaque>, handler: Dispatcher.PipelineHandler<TOpaque>): Duplex
/** A faster version of `Dispatcher.request`. */
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>, callback: (err: Error | null, data: Dispatcher.StreamData<TOpaque>) => void): void
stream<TOpaque = null>(options: Dispatcher.RequestOptions<TOpaque>, factory: Dispatcher.StreamFactory<TOpaque>): Promise<Dispatcher.StreamData<TOpaque>>
/** Upgrade to a different protocol. */
upgrade (options: Dispatcher.UpgradeOptions, callback: (err: Error | null, data: Dispatcher.UpgradeData) => void): void
upgrade (options: Dispatcher.UpgradeOptions): Promise<Dispatcher.UpgradeData>
/** Closes the client and gracefully waits for enqueued requests to complete before invoking the callback (or returning a promise if no callback is provided). */
close (callback: () => void): void
close (): Promise<void>
/** Destroy the client abruptly with the given err. All the pending and running requests will be asynchronously aborted and error. Waits until socket is closed before invoking the callback (or returning a promise if no callback is provided). Since this operation is asynchronously dispatched there might still be some progress on dispatched requests. */
destroy (err: Error | null, callback: () => void): void
destroy (callback: () => void): void
destroy (err: Error | null): Promise<void>
destroy (): Promise<void>
on (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
on (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
on (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
on (eventName: 'drain', callback: (origin: URL) => void): this
once (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
once (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
once (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
once (eventName: 'drain', callback: (origin: URL) => void): this
off (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
off (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
off (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
off (eventName: 'drain', callback: (origin: URL) => void): this
addListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
addListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
addListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
addListener (eventName: 'drain', callback: (origin: URL) => void): this
removeListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
removeListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
removeListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
removeListener (eventName: 'drain', callback: (origin: URL) => void): this
prependListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
prependListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
prependListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
prependListener (eventName: 'drain', callback: (origin: URL) => void): this
prependOnceListener (eventName: 'connect', callback: (origin: URL, targets: readonly Dispatcher[]) => void): this
prependOnceListener (eventName: 'disconnect', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
prependOnceListener (eventName: 'connectionError', callback: (origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void): this
prependOnceListener (eventName: 'drain', callback: (origin: URL) => void): this
listeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
listeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
listeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
listeners (eventName: 'drain'): ((origin: URL) => void)[]
rawListeners (eventName: 'connect'): ((origin: URL, targets: readonly Dispatcher[]) => void)[]
rawListeners (eventName: 'disconnect'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
rawListeners (eventName: 'connectionError'): ((origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError) => void)[]
rawListeners (eventName: 'drain'): ((origin: URL) => void)[]
emit (eventName: 'connect', origin: URL, targets: readonly Dispatcher[]): boolean
emit (eventName: 'disconnect', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean
emit (eventName: 'connectionError', origin: URL, targets: readonly Dispatcher[], error: Errors.UndiciError): boolean
emit (eventName: 'drain', origin: URL): boolean
}
declare namespace Dispatcher {
export interface ComposedDispatcher extends Dispatcher {}
export type Dispatch = Dispatcher['dispatch']
export type DispatcherComposeInterceptor = (dispatch: Dispatch) => Dispatch
export interface DispatchOptions {
origin?: string | URL;
path: string;
method: HttpMethod;
/** Default: `null` */
body?: string | Buffer | Uint8Array | Readable | null | FormData;
/** Default: `null` */
headers?: UndiciHeaders;
/** Query string params to be embedded in the request URL. Default: `null` */
query?: Record<string, any>;
/** Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline have completed. Default: `true` if `method` is `HEAD` or `GET`. */
idempotent?: boolean;
/** Whether the response is expected to take a long time and would end up blocking the pipeline. When this is set to `true` further pipelining will be avoided on the same connection until headers have been received. Defaults to `method !== 'HEAD'`. */
blocking?: boolean;
/** Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`. Default: `method === 'CONNECT' || null`. */
upgrade?: boolean | string | null;
/** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers. Defaults to 300 seconds. */
headersTimeout?: number | null;
/** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use 0 to disable it entirely. Defaults to 300 seconds. */
bodyTimeout?: number | null;
/** Whether the request should stablish a keep-alive or not. Default `false` */
reset?: boolean;
/** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
throwOnError?: boolean;
/** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */
expectContinue?: boolean;
}
export interface ConnectOptions<TOpaque = null> {
origin: string | URL;
path: string;
/** Default: `null` */
headers?: UndiciHeaders;
/** Default: `null` */
signal?: AbortSignal | EventEmitter | null;
/** This argument parameter is passed through to `ConnectData` */
opaque?: TOpaque;
/** Default: false */
redirectionLimitReached?: boolean;
/** Default: `null` */
responseHeaders?: 'raw' | null;
}
export interface RequestOptions<TOpaque = null> extends DispatchOptions {
/** Default: `null` */
opaque?: TOpaque;
/** Default: `null` */
signal?: AbortSignal | EventEmitter | null;
/** Default: false */
redirectionLimitReached?: boolean;
/** Default: `null` */
onInfo?: (info: { statusCode: number, headers: Record<string, string | string[]> }) => void;
/** Default: `null` */
responseHeaders?: 'raw' | null;
/** Default: `64 KiB` */
highWaterMark?: number;
}
export interface PipelineOptions<TOpaque = null> extends RequestOptions<TOpaque> {
/** `true` if the `handler` will return an object stream. Default: `false` */
objectMode?: boolean;
}
export interface UpgradeOptions {
path: string;
/** Default: `'GET'` */
method?: string;
/** Default: `null` */
headers?: UndiciHeaders;
/** A string of comma separated protocols, in descending preference order. Default: `'Websocket'` */
protocol?: string;
/** Default: `null` */
signal?: AbortSignal | EventEmitter | null;
/** Default: false */
redirectionLimitReached?: boolean;
/** Default: `null` */
responseHeaders?: 'raw' | null;
}
export interface ConnectData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
socket: Duplex;
opaque: TOpaque;
}
export interface ResponseData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
body: BodyReadable & BodyMixin;
trailers: Record<string, string>;
opaque: TOpaque;
context: object;
}
export interface PipelineHandlerData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
opaque: TOpaque;
body: BodyReadable;
context: object;
}
export interface StreamData<TOpaque = null> {
opaque: TOpaque;
trailers: Record<string, string>;
}
export interface UpgradeData<TOpaque = null> {
headers: IncomingHttpHeaders;
socket: Duplex;
opaque: TOpaque;
}
export interface StreamFactoryData<TOpaque = null> {
statusCode: number;
headers: IncomingHttpHeaders;
opaque: TOpaque;
context: object;
}
export type StreamFactory<TOpaque = null> = (data: StreamFactoryData<TOpaque>) => Writable
export interface DispatchController {
get aborted () : boolean
get paused () : boolean
get reason () : Error | null
abort (reason: Error): void
pause(): void
resume(): void
}
export interface DispatchHandler {
onRequestStart?(controller: DispatchController, context: any): void;
onRequestUpgrade?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, socket: Duplex): void;
onResponseStart?(controller: DispatchController, statusCode: number, headers: IncomingHttpHeaders, statusMessage?: string): void;
onResponseData?(controller: DispatchController, chunk: Buffer): void;
onResponseEnd?(controller: DispatchController, trailers: IncomingHttpHeaders): void;
onResponseError?(controller: DispatchController, error: Error): void;
/** Invoked before request is dispatched on socket. May be invoked multiple times when a request is retried when the request at the head of the pipeline fails. */
/** @deprecated */
onConnect?(abort: (err?: Error) => void): void;
/** Invoked when an error has occurred. */
/** @deprecated */
onError?(err: Error): void;
/** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */
/** @deprecated */
onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void;
/** Invoked when response is received, before headers have been read. **/
/** @deprecated */
onResponseStarted?(): void;
/** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */
/** @deprecated */
onHeaders?(statusCode: number, headers: Buffer[], resume: () => void, statusText: string): boolean;
/** Invoked when response payload data is received. */
/** @deprecated */
onData?(chunk: Buffer): boolean;
/** Invoked when response payload and trailers have been received and the request has completed. */
/** @deprecated */
onComplete?(trailers: string[] | null): void;
/** Invoked when a body chunk is sent to the server. May be invoked multiple times for chunked requests */
/** @deprecated */
onBodySent?(chunkSize: number, totalBytesSent: number): void;
}
export type PipelineHandler<TOpaque = null> = (data: PipelineHandlerData<TOpaque>) => Readable
export type HttpMethod = Autocomplete<'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH'>
/**
* @link https://fetch.spec.whatwg.org/#body-mixin
*/
interface BodyMixin {
readonly body?: never;
readonly bodyUsed: boolean;
arrayBuffer(): Promise<ArrayBuffer>;
blob(): Promise<Blob>;
bytes(): Promise<Uint8Array>;
formData(): Promise<never>;
json(): Promise<unknown>;
text(): Promise<string>;
}
export interface DispatchInterceptor {
(dispatch: Dispatch): Dispatch
}
}

View File

@@ -0,0 +1,20 @@
(The MIT License)
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2018-2021 Josh Junon
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the 'Software'), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial
portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1 @@
{"version":3,"file":"notepad-text.js","sources":["../../../src/icons/notepad-text.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name NotepadText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAydjQiIC8+CiAgPHBhdGggZD0iTTEyIDJ2NCIgLz4KICA8cGF0aCBkPSJNMTYgMnY0IiAvPgogIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxOCIgeD0iNCIgeT0iNCIgcng9IjIiIC8+CiAgPHBhdGggZD0iTTggMTBoNiIgLz4KICA8cGF0aCBkPSJNOCAxNGg4IiAvPgogIDxwYXRoIGQ9Ik04IDE4aDUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/notepad-text\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 NotepadText = createLucideIcon('NotepadText', [\n ['path', { d: 'M8 2v4', key: '1cmpym' }],\n ['path', { d: 'M12 2v4', key: '3427ic' }],\n ['path', { d: 'M16 2v4', key: '4m81vk' }],\n ['rect', { width: '16', height: '18', x: '4', y: '4', rx: '2', key: '1u9h20' }],\n ['path', { d: 'M8 10h6', key: '3oa6kw' }],\n ['path', { d: 'M8 14h8', key: '1fgep2' }],\n ['path', { d: 'M8 18h5', key: '17enja' }],\n]);\n\nexport default NotepadText;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,8 @@
"use strict";
var id = 0;
function _class_private_field_loose_key(name) {
return "__private_" + id++ + "_" + name;
}
exports._ = _class_private_field_loose_key;

View File

@@ -0,0 +1,160 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { useRouter, useSearchParams } from 'next/navigation.js';
import * as qs from 'qs-esm';
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useListDrawerContext } from '../../elements/ListDrawer/Provider.js';
import { useEffectEvent } from '../../hooks/useEffectEvent.js';
import { useRouteTransition } from '../../providers/RouteTransition/index.js';
import { parseSearchParams } from '../../utilities/parseSearchParams.js';
import { useConfig } from '../Config/index.js';
import { ListQueryContext, ListQueryModifiedContext } from './context.js';
import { mergeQuery } from './mergeQuery.js';
import { sanitizeQuery } from './sanitizeQuery.js';
export { useListQuery } from './context.js';
export const ListQueryProvider = ({
children,
collectionSlug,
data,
modifySearchParams,
onQueryChange: onQueryChangeFromProps,
orderableFieldName,
query: queryFromProps
}) => {
// TODO: Investigate if this is still needed
'use no memo';
const router = useRouter();
const rawSearchParams = useSearchParams();
const {
startRouteTransition
} = useRouteTransition();
const [modified, setModified] = useState(false);
const {
getEntityConfig
} = useConfig();
const collectionConfig = getEntityConfig({
collectionSlug
});
const contextRef = useRef({});
contextRef.current.modified = modified;
const {
onQueryChange: onQueryChangeFromContext
} = useListDrawerContext();
const onQueryChange = onQueryChangeFromContext || onQueryChangeFromProps;
const queryFromURL = useMemo(() => sanitizeQuery(parseSearchParams(rawSearchParams)), [rawSearchParams]);
const [query, setQuery] = useState(() => {
if (modifySearchParams) {
return queryFromURL;
} else {
return {
limit: queryFromProps.limit,
sort: queryFromProps.sort
};
}
});
const refineListData = useCallback(
// eslint-disable-next-line @typescript-eslint/require-await
async (incomingQuery, modified_0) => {
setModified(modified_0 ?? true);
const newQuery = mergeQuery(query, incomingQuery, {
defaults: {
limit: queryFromProps.limit,
sort: queryFromProps.sort
}
});
if (modifySearchParams) {
const search = `?${qs.stringify({
...newQuery,
columns: JSON.stringify(newQuery.columns),
queryByGroup: JSON.stringify(newQuery.queryByGroup)
})}`;
if (window.location.search !== search) {
startRouteTransition(() => router.replace(search));
}
} else if (typeof onQueryChange === 'function') {
onQueryChange(newQuery);
}
setQuery(newQuery);
}, [query, queryFromProps.limit, queryFromProps.sort, modifySearchParams, onQueryChange, startRouteTransition, router]);
const handlePageChange = useCallback(async arg => {
await refineListData({
page: arg
});
}, [refineListData]);
const handlePerPageChange = React.useCallback(async arg_0 => {
await refineListData({
limit: arg_0,
page: 1
});
}, [refineListData]);
const handleSearchChange = useCallback(async arg_1 => {
const search_0 = arg_1 === '' ? undefined : arg_1;
await refineListData({
search: search_0
});
}, [refineListData]);
const handleSortChange = useCallback(async sort => {
await refineListData({
sort
});
}, [refineListData]);
const handleWhereChange = useCallback(async where => {
await refineListData({
where
});
}, [refineListData]);
/**
* The server component may pass props to this client component, e.g. from
* fetching the query from preferences.
* This effect is responsible for syncing the props back to the URL, without
* triggering a re-render.
*/
const syncPropsToURL = useEffectEvent(() => {
const newQuery_0 = sanitizeQuery({
...(query || {}),
...(queryFromProps || {})
});
const search_1 = `?${qs.stringify({
...newQuery_0,
columns: JSON.stringify(newQuery_0.columns),
queryByGroup: JSON.stringify(newQuery_0.queryByGroup)
})}`;
if (window.location.search !== search_1) {
setQuery(newQuery_0);
// Important: do not use router.replace here to avoid re-rendering.
window.history.replaceState(null, '', search_1);
}
});
// If `query` is updated externally, update the local state
// E.g. when HMR runs, these properties may be different
useEffect(() => {
if (modifySearchParams && queryFromProps) {
syncPropsToURL();
}
}, [modifySearchParams, queryFromProps]);
return /*#__PURE__*/_jsx(ListQueryContext, {
value: {
collectionSlug,
data,
defaultLimit: data?.limit,
handlePageChange,
handlePerPageChange,
handleSearchChange,
handleSortChange,
handleWhereChange,
isGroupingBy: Boolean(collectionConfig?.admin?.groupBy && query?.groupBy),
orderableFieldName,
query,
refineListData,
setModified,
...contextRef.current
},
children: /*#__PURE__*/_jsx(ListQueryModifiedContext, {
value: modified,
children: children
})
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,96 @@
// This file is generated automatically by `scripts/build/indices.ts`. Please, don't change it.
export * from "./locale/af.mjs";
export * from "./locale/ar.mjs";
export * from "./locale/ar-DZ.mjs";
export * from "./locale/ar-EG.mjs";
export * from "./locale/ar-MA.mjs";
export * from "./locale/ar-SA.mjs";
export * from "./locale/ar-TN.mjs";
export * from "./locale/az.mjs";
export * from "./locale/be.mjs";
export * from "./locale/be-tarask.mjs";
export * from "./locale/bg.mjs";
export * from "./locale/bn.mjs";
export * from "./locale/bs.mjs";
export * from "./locale/ca.mjs";
export * from "./locale/ckb.mjs";
export * from "./locale/cs.mjs";
export * from "./locale/cy.mjs";
export * from "./locale/da.mjs";
export * from "./locale/de.mjs";
export * from "./locale/de-AT.mjs";
export * from "./locale/el.mjs";
export * from "./locale/en-AU.mjs";
export * from "./locale/en-CA.mjs";
export * from "./locale/en-GB.mjs";
export * from "./locale/en-IE.mjs";
export * from "./locale/en-IN.mjs";
export * from "./locale/en-NZ.mjs";
export * from "./locale/en-US.mjs";
export * from "./locale/en-ZA.mjs";
export * from "./locale/eo.mjs";
export * from "./locale/es.mjs";
export * from "./locale/et.mjs";
export * from "./locale/eu.mjs";
export * from "./locale/fa-IR.mjs";
export * from "./locale/fi.mjs";
export * from "./locale/fr.mjs";
export * from "./locale/fr-CA.mjs";
export * from "./locale/fr-CH.mjs";
export * from "./locale/fy.mjs";
export * from "./locale/gd.mjs";
export * from "./locale/gl.mjs";
export * from "./locale/gu.mjs";
export * from "./locale/he.mjs";
export * from "./locale/hi.mjs";
export * from "./locale/hr.mjs";
export * from "./locale/ht.mjs";
export * from "./locale/hu.mjs";
export * from "./locale/hy.mjs";
export * from "./locale/id.mjs";
export * from "./locale/is.mjs";
export * from "./locale/it.mjs";
export * from "./locale/it-CH.mjs";
export * from "./locale/ja.mjs";
export * from "./locale/ja-Hira.mjs";
export * from "./locale/ka.mjs";
export * from "./locale/kk.mjs";
export * from "./locale/km.mjs";
export * from "./locale/kn.mjs";
export * from "./locale/ko.mjs";
export * from "./locale/lb.mjs";
export * from "./locale/lt.mjs";
export * from "./locale/lv.mjs";
export * from "./locale/mk.mjs";
export * from "./locale/mn.mjs";
export * from "./locale/ms.mjs";
export * from "./locale/mt.mjs";
export * from "./locale/nb.mjs";
export * from "./locale/nl.mjs";
export * from "./locale/nl-BE.mjs";
export * from "./locale/nn.mjs";
export * from "./locale/oc.mjs";
export * from "./locale/pl.mjs";
export * from "./locale/pt.mjs";
export * from "./locale/pt-BR.mjs";
export * from "./locale/ro.mjs";
export * from "./locale/ru.mjs";
export * from "./locale/se.mjs";
export * from "./locale/sk.mjs";
export * from "./locale/sl.mjs";
export * from "./locale/sq.mjs";
export * from "./locale/sr.mjs";
export * from "./locale/sr-Latn.mjs";
export * from "./locale/sv.mjs";
export * from "./locale/ta.mjs";
export * from "./locale/te.mjs";
export * from "./locale/th.mjs";
export * from "./locale/tr.mjs";
export * from "./locale/ug.mjs";
export * from "./locale/uk.mjs";
export * from "./locale/uz.mjs";
export * from "./locale/uz-Cyrl.mjs";
export * from "./locale/vi.mjs";
export * from "./locale/zh-CN.mjs";
export * from "./locale/zh-HK.mjs";
export * from "./locale/zh-TW.mjs";

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