fix(products): fix breadcrumbs and product filtering (backport from main)
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
@@ -0,0 +1,298 @@
type OptionType = 'string' | 'boolean' | 'number' | 'positional';
type OutputType = string | boolean | number | undefined;
type BuilderConfig<TType extends OptionType = OptionType> = {
name?: string | undefined;
aliases: string[];
type: TType;
description?: string;
default?: OutputType;
isHidden?: boolean;
isRequired?: boolean;
isInt?: boolean;
minVal?: number;
maxVal?: number;
enumVals?: [string, ...string[]];
};
type ProcessedBuilderConfig = {
name: string;
aliases: string[];
type: OptionType;
description?: string;
default?: OutputType;
isHidden?: boolean;
isRequired?: boolean;
isInt?: boolean;
minVal?: number;
maxVal?: number;
enumVals?: [string, ...string[]];
};
type BuilderConfigLimited = BuilderConfig & {
type: Exclude<OptionType, 'positional'>;
};
declare class OptionBuilderBase<TBuilderConfig extends BuilderConfig = BuilderConfig, TOutput extends OutputType = string, TOmit extends string = '', TEnums extends string | undefined = undefined> {
_: {
config: TBuilderConfig;
/**
* Type-level only field
*
* Do not attempt to access at a runtime
*/
$output: TOutput;
};
private config;
constructor(config?: TBuilderConfig);
string<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'int'>;
string(): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'int'>;
number<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, TOmit | OptionType | 'enum'>, TOmit | OptionType | 'enum'>;
number(): Omit<OptionBuilderBase<BuilderConfig<'number'>, string | undefined, TOmit | OptionType | 'enum'>, TOmit | OptionType | 'enum'>;
boolean<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>;
boolean(): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>, TOmit | OptionType | 'min' | 'max' | 'enum' | 'int'>;
positional<TName extends string>(displayName: TName): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>;
positional(): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>, TOmit | OptionType | 'min' | 'max' | 'int' | 'alias'>;
alias(...aliases: string[]): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'alias'>, TOmit | 'alias'>;
desc<TDescription extends string>(description: TDescription): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'desc'>, TOmit | 'desc'>;
hidden(): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'hidden'>, TOmit | 'hidden'>;
required(): Omit<OptionBuilderBase<TBuilderConfig, Exclude<TOutput, undefined>, TOmit | 'required' | 'default'>, TOmit | 'required' | 'default'>;
default<TDefVal extends TEnums extends undefined ? Exclude<TOutput, undefined> : TEnums>(value: TDefVal): Omit<OptionBuilderBase<TBuilderConfig, Exclude<TOutput, undefined>, TOmit | 'enum' | 'required' | 'default', TEnums>, TOmit | 'enum' | 'required' | 'default'>;
enum<TValues extends [string, ...string[]], TUnion extends TValues[number] = TValues[number]>(...values: TValues): Omit<OptionBuilderBase<TBuilderConfig, TUnion | (TOutput extends undefined ? undefined : never), TOmit | 'enum', TUnion>, TOmit | 'enum'>;
min(value: number): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'min'>, TOmit | 'min'>;
max(value: number): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'max'>, TOmit | 'max'>;
int(): Omit<OptionBuilderBase<TBuilderConfig, TOutput, TOmit | 'int'>, TOmit | 'int'>;
}
type GenericBuilderInternalsFields = {
/**
* Type-level only field
*
* Do not attempt to access at a runtime
*/
$output: OutputType;
config: BuilderConfig;
};
type GenericBuilderInternals = {
_: GenericBuilderInternalsFields;
};
type GenericBuilderInternalsFieldsLimited = {
/**
* Type-level only field
*
* Do not attempt to access at a runtime
*/
$output: OutputType;
config: BuilderConfigLimited;
};
type GenericBuilderInternalsLimited = {
_: GenericBuilderInternalsFieldsLimited;
};
type ProcessedOptions<TOptionConfig extends Record<string, GenericBuilderInternals> = Record<string, GenericBuilderInternals>> = {
[K in keyof TOptionConfig]: K extends string ? {
config: ProcessedBuilderConfig;
/**
* Type-level only field
*
* Do not attempt to access at a runtime
*/
$output: TOptionConfig[K]['_']['$output'];
} : never;
};
type Simplify<T> = {
[K in keyof T]: T[K];
} & {};
type TypeOf<TOptions extends Record<string, GenericBuilderInternals>> = Simplify<{
[K in keyof TOptions]: TOptions[K]['_']['$output'];
}>;
declare function string<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, OptionType | 'min' | 'max' | 'int'>, OptionType | 'min' | 'max' | 'int'>;
declare function string(): Omit<OptionBuilderBase<BuilderConfig<'string'>, string | undefined, OptionType | 'min' | 'max' | 'int'>, OptionType | 'min' | 'max' | 'int'>;
declare function number<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, OptionType | 'enum'>, OptionType | 'enum'>;
declare function number(): Omit<OptionBuilderBase<BuilderConfig<'number'>, number | undefined, OptionType | 'enum'>, OptionType | 'enum'>;
declare function boolean<TName extends string>(name: TName): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, OptionType | 'min' | 'max' | 'int' | 'enum'>, OptionType | 'min' | 'max' | 'int' | 'enum'>;
declare function boolean(): Omit<OptionBuilderBase<BuilderConfig<'boolean'>, boolean | undefined, OptionType | 'min' | 'max' | 'int' | 'enum'>, OptionType | 'min' | 'max' | 'int' | 'enum'>;
declare function positional<TName extends string>(displayName: TName): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, OptionType | 'min' | 'max' | 'int' | 'alias'>, OptionType | 'min' | 'max' | 'int' | 'alias'>;
declare function positional(): Omit<OptionBuilderBase<BuilderConfig<'positional'>, string | undefined, OptionType | 'min' | 'max' | 'int' | 'alias'>, OptionType | 'min' | 'max' | 'int' | 'alias'>;
type CommandHandler<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined> = (options: TOpts extends Record<string, GenericBuilderInternals> ? TypeOf<TOpts> : undefined) => any;
type CommandInfo = {
name: string;
aliases?: [string, ...string[]];
desc?: string;
shortDesc?: string;
hidden?: boolean;
options?: Record<string, ProcessedBuilderConfig>;
metadata?: any;
subcommands?: CommandsInfo;
};
type CommandsInfo = Record<string, CommandInfo>;
type EventType = 'before' | 'after';
type BroCliConfig = {
name?: string;
description?: string;
argSource?: string[];
help?: string | Function;
version?: string | Function;
omitKeysOfUndefinedOptions?: boolean;
hook?: (event: EventType, command: Command) => any;
theme?: EventHandler;
};
type GenericCommandHandler = (options?: Record<string, OutputType> | undefined) => any;
type RawCommand<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined, TOptsData = TOpts extends Record<string, GenericBuilderInternals> ? TypeOf<TOpts> : undefined, TTransformed = TOptsData extends undefined ? undefined : TOptsData> = {
name?: string;
aliases?: [string, ...string[]];
desc?: string;
shortDesc?: string;
hidden?: boolean;
options?: TOpts;
help?: string | Function;
transform?: (options: TOptsData) => TTransformed;
handler?: (options: Awaited<TTransformed>) => any;
subcommands?: [Command, ...Command[]];
metadata?: any;
};
type AnyRawCommand<TOpts extends Record<string, GenericBuilderInternals> | undefined = Record<string, GenericBuilderInternals> | undefined> = {
name?: string;
aliases?: [string, ...string[]];
desc?: string;
shortDesc?: string;
hidden?: boolean;
options?: TOpts;
help?: string | Function;
transform?: GenericCommandHandler;
handler?: GenericCommandHandler;
subcommands?: [Command, ...Command[]];
metadata?: any;
};
type Command<TOptsType = any, TTransformedType = any> = {
name: string;
aliases?: [string, ...string[]];
desc?: string;
shortDesc?: string;
hidden?: boolean;
options?: ProcessedOptions;
help?: string | Function;
transform?: GenericCommandHandler;
handler?: GenericCommandHandler;
subcommands?: [Command, ...Command[]];
parent?: Command;
metadata?: any;
};
type CommandCandidate = {
data: string;
originalIndex: number;
};
type InnerCommandParseRes = {
command: Command | undefined;
args: string[];
};
type TestResult<THandlerInput> = {
type: 'handler';
options: THandlerInput;
} | {
type: 'help' | 'version';
} | {
type: 'error';
error: unknown;
};
declare const command: <TOpts extends Record<string, GenericBuilderInternals> | undefined, TOptsData = TOpts extends Record<string, GenericBuilderInternals> ? { [K_1 in keyof { [K in keyof TOpts]: TOpts[K]["_"]["$output"]; }]: { [K in keyof TOpts]: TOpts[K]["_"]["$output"]; }[K_1]; } : undefined, TTransformed = TOptsData>(command: RawCommand<TOpts, TOptsData, TTransformed>) => Command<TOptsData, Awaited<TTransformed>>;
declare const getCommandNameWithParents: (command: Command) => string;
/**
* Runs CLI commands
*
* @param commands - command collection
*
* @param config - additional settings
*/
declare const run: (commands: Command[], config?: BroCliConfig) => Promise<void>;
declare const handler: <TOpts extends Record<string, GenericBuilderInternals>>(options: TOpts, handler: CommandHandler<TOpts>) => CommandHandler<TOpts>;
declare const test: <TOpts, THandlerInput>(command: Command<TOpts, THandlerInput>, args: string) => Promise<TestResult<THandlerInput>>;
declare const commandsInfo: (commands: Command[]) => CommandsInfo;
type CommandHelpEvent = {
type: 'command_help';
name: string | undefined;
description: string | undefined;
command: Command;
};
type GlobalHelpEvent = {
type: 'global_help';
description: string | undefined;
name: string | undefined;
commands: Command[];
};
type MissingArgsEvent = {
type: 'error';
violation: 'missing_args_error';
name: string | undefined;
description: string | undefined;
command: Command;
missing: [string[], ...string[][]];
};
type UnrecognizedArgsEvent = {
type: 'error';
violation: 'unrecognized_args_error';
name: string | undefined;
description: string | undefined;
command: Command;
unrecognized: [string, ...string[]];
};
type UnknownCommandEvent = {
type: 'error';
violation: 'unknown_command_error';
name: string | undefined;
description: string | undefined;
commands: Command[];
offender: string;
};
type UnknownSubcommandEvent = {
type: 'error';
violation: 'unknown_subcommand_error';
name: string | undefined;
description: string | undefined;
command: Command;
offender: string;
};
type UnknownErrorEvent = {
type: 'error';
violation: 'unknown_error';
name: string | undefined;
description: string | undefined;
error: unknown;
};
type VersionEvent = {
type: 'version';
name: string | undefined;
description: string | undefined;
};
type GenericValidationViolation = 'above_max' | 'below_min' | 'expected_int' | 'invalid_boolean_syntax' | 'invalid_string_syntax' | 'invalid_number_syntax' | 'invalid_number_value' | 'enum_violation';
type ValidationViolation = BroCliEvent extends infer Event ? Event extends {
violation: string;
} ? Event['violation'] : never : never;
type ValidationErrorEvent = {
type: 'error';
violation: GenericValidationViolation;
name: string | undefined;
description: string | undefined;
command: Command;
option: ProcessedBuilderConfig;
offender: {
namePart?: string;
dataPart?: string;
};
};
type BroCliEvent = CommandHelpEvent | GlobalHelpEvent | MissingArgsEvent | UnrecognizedArgsEvent | UnknownCommandEvent | UnknownSubcommandEvent | ValidationErrorEvent | VersionEvent | UnknownErrorEvent;
type BroCliEventType = BroCliEvent['type'];
/**
* Return `true` if your handler processes the event
*
* Return `false` to process event with a built-in handler
*/
type EventHandler = (event: BroCliEvent) => boolean | Promise<boolean>;
/**
* Internal error class used to bypass runCli's logging without stack trace
*
* Used only for malformed commands and options
*/
declare class BroCliError extends Error {
event?: BroCliEvent | undefined;
constructor(message: string | undefined, event?: BroCliEvent | undefined);
}
export { type AnyRawCommand, type BroCliConfig, BroCliError, type BroCliEvent, type BroCliEventType, type BuilderConfig, type BuilderConfigLimited, type Command, type CommandCandidate, type CommandHandler, type CommandHelpEvent, type CommandInfo, type CommandsInfo, type EventHandler, type EventType, type GenericBuilderInternals, type GenericBuilderInternalsFields, type GenericBuilderInternalsFieldsLimited, type GenericBuilderInternalsLimited, type GenericCommandHandler, type GenericValidationViolation, type GlobalHelpEvent, type InnerCommandParseRes, type MissingArgsEvent, OptionBuilderBase, type OptionType, type OutputType, type ProcessedBuilderConfig, type ProcessedOptions, type RawCommand, type Simplify, type TestResult, type TypeOf, type UnknownCommandEvent, type UnknownErrorEvent, type UnknownSubcommandEvent, type UnrecognizedArgsEvent, type ValidationErrorEvent, type ValidationViolation, type VersionEvent, boolean, command, commandsInfo, getCommandNameWithParents, handler, number, positional, run, string, test };
@@ -0,0 +1,105 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
one: "dưới 1 giây",
other: "dưới {{count}} giây",
},
xSeconds: {
one: "1 giây",
other: "{{count}} giây",
},
halfAMinute: "nửa phút",
lessThanXMinutes: {
one: "dưới 1 phút",
other: "dưới {{count}} phút",
},
xMinutes: {
one: "1 phút",
other: "{{count}} phút",
},
aboutXHours: {
one: "khoảng 1 giờ",
other: "khoảng {{count}} giờ",
},
xHours: {
one: "1 giờ",
other: "{{count}} giờ",
},
xDays: {
one: "1 ngày",
other: "{{count}} ngày",
},
aboutXWeeks: {
one: "khoảng 1 tuần",
other: "khoảng {{count}} tuần",
},
xWeeks: {
one: "1 tuần",
other: "{{count}} tuần",
},
aboutXMonths: {
one: "khoảng 1 tháng",
other: "khoảng {{count}} tháng",
},
xMonths: {
one: "1 tháng",
other: "{{count}} tháng",
},
aboutXYears: {
one: "khoảng 1 năm",
other: "khoảng {{count}} năm",
},
xYears: {
one: "1 năm",
other: "{{count}} năm",
},
overXYears: {
one: "hơn 1 năm",
other: "hơn {{count}} năm",
},
almostXYears: {
one: "gần 1 năm",
other: "gần {{count}} năm",
},
};
const formatDistance = (token, count, options) => {
let result;
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + " nữa";
} else {
return result + " trước";
}
}
return result;
};
exports.formatDistance = formatDistance;
@@ -0,0 +1,105 @@
# OpenTelemetry MongoDB Instrumentation for Node.js
[![NPM Published Version][npm-img]][npm-url]
[![Apache License][license-image]][license-image]
This module provides automatic instrumentation for the [`mongodb`](https://github.com/mongodb/node-mongodb-native) module, which may be loaded using the [`@opentelemetry/sdk-trace-node`](https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node) package and is included in the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle.
If total installation size is not constrained, it is recommended to use the [`@opentelemetry/auto-instrumentations-node`](https://www.npmjs.com/package/@opentelemetry/auto-instrumentations-node) bundle with [@opentelemetry/sdk-node](`https://www.npmjs.com/package/@opentelemetry/sdk-node`) for the most seamless instrumentation experience.
Compatible with OpenTelemetry JS API and SDK `1.0+`.
## Installation
```bash
npm install --save @opentelemetry/instrumentation-mongodb
```
### Supported Versions
- [`mongodb`](https://www.npmjs.com/package/mongodb) version `>=3.3.0 <8`
## Usage
OpenTelemetry MongoDB Instrumentation allows the user to automatically collect trace data and export them to their backend of choice, to give observability to distributed systems.
To load a specific instrumentation (**mongodb** in this case), specify it in the Node Tracer's configuration.
```javascript
const { MongoDBInstrumentation } = require('@opentelemetry/instrumentation-mongodb');
const { NodeTracerProvider } = require('@opentelemetry/sdk-trace-node');
const { registerInstrumentations } = require('@opentelemetry/instrumentation');
const provider = new NodeTracerProvider();
provider.register();
registerInstrumentations({
instrumentations: [
new MongoDBInstrumentation({
// see under for available configuration
}),
],
});
```
See [`examples/mongodb`](https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/examples/mongodb) for a short example.
### Mongo instrumentation Options
Mongodb instrumentation has few options available to choose from. You can set the following:
| Options | Type | Description |
| --------------------------- | -------- | ----------- |
| `enhancedDatabaseReporting` | boolean | If true, additional information about query parameters and results will be attached (as `attributes`) to spans representing database operations. |
| `responseHook` | function | Function for adding custom attributes from db response. See type `MongoDBInstrumentationExecutionResponseHook`. |
| `dbStatementSerializer` | function | Custom serializer function for the `db.statement` / `db.query.text` span attribute. See type `DbStatementSerializer`. |
| `requireParentSpan` | boolean | Require a parent span in order to create mongodb spans, default when unset is `true`. |
## Semantic Conventions
This instrumentation implements Semantic Conventions (semconv) v1.7.0. Since then, networking (in semconv v1.23.1) and database (in semconv v1.33.0) semantic conventions were stabilized. As of `@opentelemetry/instrumentation-mongodb@0.63.0` support has been added for migrating to the stable semantic conventions using the `OTEL_SEMCONV_STABILITY_OPT_IN` environment variable as follows:
1. Upgrade to the latest version of this instrumentation package.
2. Set `OTEL_SEMCONV_STABILITY_OPT_IN=http/dup,database/dup` to emit both old and stable semantic conventions. (The `http` token is used to control the `net.*` attributes, the `database` token to control to `db.*` attributes.)
3. Modify alerts, dashboards, metrics, and other processes in your Observability system to use the stable semantic conventions.
4. Set `OTEL_SEMCONV_STABILITY_OPT_IN=http,database` to emit only the stable semantic conventions.
By default, if `OTEL_SEMCONV_STABILITY_OPT_IN` includes neither of the above tokens, the old v1.7.0 semconv is used.
The intent is to provide an approximate 6 month time window for users of this instrumentation to migrate to the new database and networking semconv, after which a new minor version will use the new semconv by default and drop support for the old semconv.
See [the HTTP migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/) and the [database migration guide](https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/) for details.
Span attributes:
| Old semconv | Stable semconv | Description |
| ----------------------- | -------------------- | ----------- |
| `db.system` | `db.system.name` | 'mongodb' |
| `db.name` | `db.namespace` | The MongoDB database name. |
| `db.connection_string` | Removed | |
| `db.operation` | `db.operation.name` | The name of the MongoDB command being executed. |
| `db.mongodb.collection` | `db.collection.name` | The MongoDB collection being accessed within the database stated in `db.namespace`. |
| `db.statement` | `db.query.text` | The database query being executed. |
| `net.peer.name` | `server.address` | Remote hostname or similar. |
| `net.peer.port` | `server.port` | Remote port number. |
Metrics collected:
- [`db.client.connections.usage`](https://github.com/open-telemetry/semantic-conventions/blob/v1.24.0/docs/database/database-metrics.md#metric-dbclientconnectionsusage) - The number of connections currently in a given state.
Note: While `db.client.connections.usage` has been deprecated in favor of `db.client.connection.count` in the [semconv database migration](https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/#database-client-connection-count), the new metric is still unstable, so cannot be enabled via `OTEL_SEMCONV_STABILITY_OPT_IN=database`. There is ongoing work to provide an opt-in setting to select the latest experimental semconv.
## Useful links
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more about OpenTelemetry JavaScript: <https://github.com/open-telemetry/opentelemetry-js>
- For help or feedback on this project, join us in [GitHub Discussions][discussions-url]
## License
Apache 2.0 - See [LICENSE][license-url] for more information.
[discussions-url]: https://github.com/open-telemetry/opentelemetry-js/discussions
[license-url]: https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/LICENSE
[license-image]: https://img.shields.io/badge/license-Apache_2.0-green.svg?style=flat
[npm-url]: https://www.npmjs.com/package/@opentelemetry/instrumentation-mongodb
[npm-img]: https://badge.fury.io/js/%40opentelemetry%2Finstrumentation-mongodb.svg
@@ -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 CircleEqual = createLucideIcon("CircleEqual", [
["path", { d: "M7 10h10", key: "1101jm" }],
["path", { d: "M7 14h10", key: "1mhdw3" }],
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
]);
export { CircleEqual as default };
//# sourceMappingURL=circle-equal.js.map
@@ -0,0 +1,36 @@
import { ClientConfig } from 'pg'
export function parse(connectionString: string, options?: Options): ConnectionOptions
export interface Options {
// Use libpq semantics when interpreting the connection string
useLibpqCompat?: boolean
}
interface SSLConfig {
ca?: string
cert?: string | null
key?: string
rejectUnauthorized?: boolean
}
export interface ConnectionOptions {
host: string | null
password?: string
user?: string
port?: string | null
database: string | null | undefined
client_encoding?: string
ssl?: boolean | string | SSLConfig
application_name?: string
fallback_application_name?: string
options?: string
keepalives?: number
// We allow any other options to be passed through
[key: string]: unknown
}
export function toClientConfig(config: ConnectionOptions): ClientConfig
export function parseIntoClientConfig(connectionString: string): ClientConfig
@@ -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 Ungroup = createLucideIcon("Ungroup", [
["rect", { width: "8", height: "6", x: "5", y: "4", rx: "1", key: "nzclkv" }],
["rect", { width: "8", height: "6", x: "11", y: "14", rx: "1", key: "4tytwb" }]
]);
export { Ungroup as default };
//# sourceMappingURL=ungroup.js.map
@@ -0,0 +1,3 @@
import type { CustomComponent } from '../../config/types.js';
export type CustomStatus = CustomComponent;
//# sourceMappingURL=Status.d.ts.map
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.generatorInfosMap = void 0;
var generatorFunctions = require("./generators/index.js");
var deprecatedGeneratorFunctions = require("./generators/deprecated.js");
const generatorInfosMap = exports.generatorInfosMap = new Map();
let index = 0;
for (const key of Object.keys(generatorFunctions).sort()) {
if (key.startsWith("_")) continue;
generatorInfosMap.set(key, [generatorFunctions[key], index++, undefined]);
}
for (const key of Object.keys(deprecatedGeneratorFunctions)) {
generatorInfosMap.set(key, [deprecatedGeneratorFunctions[key], index++, undefined]);
}
//# sourceMappingURL=nodes.js.map
@@ -0,0 +1,36 @@
import { DirectusVersion } from "../../../schema/version.js";
import { NestedPartial } from "../../../types/utils.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/update/versions.d.ts
type UpdateContentVersionOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusVersion<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Update multiple existing Content Versions.
* @param keys
* @param item
* @param query
* @returns Returns the Content Version objects for the updated Content Versions.
* @throws Will throw if keys is empty
*/
declare const updateContentVersions: <Schema, const TQuery extends Query<Schema, DirectusVersion<Schema>>>(keys: DirectusVersion<Schema>["id"][], item: NestedPartial<DirectusVersion<Schema>>, query?: TQuery) => RestCommand<UpdateContentVersionOutput<Schema, TQuery>[], Schema>;
/**
* Update multiple Content Versions as batch.
* @param items
* @param query
* @returns Returns the Content Version objects for the updated Content Versions.
*/
declare const updateContentVersionsBatch: <Schema, const TQuery extends Query<Schema, DirectusVersion<Schema>>>(items: NestedPartial<DirectusVersion<Schema>>[], query?: TQuery) => RestCommand<UpdateContentVersionOutput<Schema, TQuery>[], Schema>;
/**
* Update an existing Content Version.
* @param key
* @param item
* @param query
* @returns Returns the Content Version object for the updated Content Version.
* @throws Will throw if key is empty
*/
declare const updateContentVersion: <Schema, const TQuery extends Query<Schema, DirectusVersion<Schema>>>(key: DirectusVersion<Schema>["id"], item: NestedPartial<DirectusVersion<Schema>>, query?: TQuery) => RestCommand<UpdateContentVersionOutput<Schema, TQuery>, Schema>;
//#endregion
export { UpdateContentVersionOutput, updateContentVersion, updateContentVersions, updateContentVersionsBatch };
//# sourceMappingURL=versions.d.ts.map
@@ -0,0 +1,16 @@
/**
* While the default ID is determined by the db adapter, it can still differ for a collection if they
* define a custom ID field. This builds a map of collection slugs to their ID field type.
* @param defaultIDType as defined by the database adapter
*/ export function getCollectionIDFieldTypes({ config, defaultIDType }) {
return config.collections.reduce((acc, collection)=>{
const customCollectionIdField = collection.fields.find((field)=>'name' in field && field.name === 'id');
acc[collection.slug] = defaultIDType === 'text' ? 'string' : 'number';
if (customCollectionIdField) {
acc[collection.slug] = customCollectionIdField.type === 'number' ? 'number' : 'string';
}
return acc;
}, {});
}
//# sourceMappingURL=getCollectionIDFieldTypes.js.map
@@ -0,0 +1,22 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { GelColumn, GelColumnBuilder } from "./common.js";
export type GelBytesBuilderInitial<TName extends string> = GelBytesBuilder<{
name: TName;
dataType: 'buffer';
columnType: 'GelBytes';
data: Uint8Array;
driverParam: Uint8Array | Buffer;
enumValues: undefined;
}>;
export declare class GelBytesBuilder<T extends ColumnBuilderBaseConfig<'buffer', 'GelBytes'>> extends GelColumnBuilder<T> {
static readonly [entityKind]: string;
constructor(name: T['name']);
}
export declare class GelBytes<T extends ColumnBaseConfig<'buffer', 'GelBytes'>> extends GelColumn<T> {
static readonly [entityKind]: string;
getSQLType(): string;
}
export declare function bytes(): GelBytesBuilderInitial<''>;
export declare function bytes<TName extends string>(name: TName): GelBytesBuilderInitial<TName>;
@@ -0,0 +1,25 @@
import type { Event } from './event';
/**
* NOTE: These types are still considered Beta and subject to change.
* @hidden
*/
export interface ReplayEvent extends Event {
urls: string[];
replay_start_timestamp?: number;
error_ids: string[];
trace_ids: string[];
replay_id: string;
segment_id: number;
replay_type: ReplayRecordingMode;
}
/**
* NOTE: These types are still considered Beta and subject to change.
* @hidden
*/
export type ReplayRecordingData = string | Uint8Array;
/**
* NOTE: These types are still considered Beta and subject to change.
* @hidden
*/
export type ReplayRecordingMode = 'session' | 'buffer';
//# sourceMappingURL=replay.d.ts.map
@@ -0,0 +1 @@
export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
@@ -0,0 +1,29 @@
var baseExtremum = require('./_baseExtremum'),
baseLt = require('./_baseLt'),
identity = require('./identity');
/**
* Computes the minimum value of `array`. If `array` is empty or falsey,
* `undefined` is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Math
* @param {Array} array The array to iterate over.
* @returns {*} Returns the minimum value.
* @example
*
* _.min([4, 2, 8, 6]);
* // => 2
*
* _.min([]);
* // => undefined
*/
function min(array) {
return (array && array.length)
? baseExtremum(array, identity, baseLt)
: undefined;
}
module.exports = min;
@@ -0,0 +1,116 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "caracteres", verb: "ter" },
file: { unit: "bytes", verb: "ter" },
array: { unit: "itens", verb: "ter" },
set: { unit: "itens", verb: "ter" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "número";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "nulo";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "padrão",
email: "endereço de e-mail",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "data e hora ISO",
date: "data ISO",
time: "hora ISO",
duration: "duração ISO",
ipv4: "endereço IPv4",
ipv6: "endereço IPv6",
cidrv4: "faixa de IPv4",
cidrv6: "faixa de IPv6",
base64: "texto codificado em base64",
base64url: "URL codificada em base64",
json_string: "texto JSON",
e164: "número E.164",
jwt: "JWT",
template_literal: "entrada",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Tipo inválido: esperado ${issue.expected}, recebido ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Entrada inválida: esperado ${util.stringifyPrimitive(issue.values[0])}`;
return `Opção inválida: esperada uma das ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Muito grande: esperado que ${issue.origin ?? "valor"} tivesse ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementos"}`;
return `Muito grande: esperado que ${issue.origin ?? "valor"} fosse ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Muito pequeno: esperado que ${issue.origin} tivesse ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Muito pequeno: esperado que ${issue.origin} fosse ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Texto inválido: deve começar com "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Texto inválido: deve terminar com "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Texto inválido: deve incluir "${_issue.includes}"`;
if (_issue.format === "regex")
return `Texto inválido: deve corresponder ao padrão ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} inválido`;
}
case "not_multiple_of":
return `Número inválido: deve ser múltiplo de ${issue.divisor}`;
case "unrecognized_keys":
return `Chave${issue.keys.length > 1 ? "s" : ""} desconhecida${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Chave inválida em ${issue.origin}`;
case "invalid_union":
return "Entrada inválida";
case "invalid_element":
return `Valor inválido em ${issue.origin}`;
default:
return `Campo inválido`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _get;
var _superPropBase = require("./superPropBase.js");
function _get() {
if (typeof Reflect !== "undefined" && Reflect.get) {
exports.default = _get = Reflect.get.bind();
} else {
exports.default = _get = function _get(target, property, receiver) {
var base = (0, _superPropBase.default)(target, property);
if (!base) return;
var desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.get) {
return desc.get.call(arguments.length < 3 ? target : receiver);
}
return desc.value;
};
}
return _get.apply(null, arguments);
}
//# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/providers/TableColumns/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,eAAO,MAAM,kBAAkB,wCAAoD,CAAA;AAEnF,eAAO,MAAM,eAAe,QAAO,aAAwC,CAAA"}
@@ -0,0 +1,33 @@
import type { PrismaClient } from '@prisma/client/extension';
import { entityKind } from "../../entity.cjs";
import { type Logger } from "../../logger.cjs";
import type { PgDialect, PgQueryResultHKT, PgTransaction, PgTransactionConfig, PreparedQueryConfig } from "../../pg-core/index.cjs";
import { PgPreparedQuery, PgSession } from "../../pg-core/index.cjs";
import type { Query, SQL } from "../../sql/sql.cjs";
export declare class PrismaPgPreparedQuery<T> extends PgPreparedQuery<PreparedQueryConfig & {
execute: T;
}> {
private readonly prisma;
private readonly logger;
static readonly [entityKind]: string;
constructor(prisma: PrismaClient, query: Query, logger: Logger);
execute(placeholderValues?: Record<string, unknown>): Promise<T>;
all(): Promise<unknown>;
isResponseInArrayMode(): boolean;
}
export interface PrismaPgSessionOptions {
logger?: Logger;
}
export declare class PrismaPgSession extends PgSession {
private readonly prisma;
private readonly options;
static readonly [entityKind]: string;
private readonly logger;
constructor(dialect: PgDialect, prisma: PrismaClient, options: PrismaPgSessionOptions);
execute<T>(query: SQL): Promise<T>;
prepareQuery<T extends PreparedQueryConfig = PreparedQueryConfig>(query: Query): PgPreparedQuery<T>;
transaction<T>(_transaction: (tx: PgTransaction<PgQueryResultHKT, Record<string, never>, Record<string, never>>) => Promise<T>, _config?: PgTransactionConfig): Promise<T>;
}
export interface PrismaPgQueryResultHKT extends PgQueryResultHKT {
type: [];
}
@@ -0,0 +1 @@
{"version":3,"file":"RenderWidget.d.ts","sourceRoot":"","sources":["../../../../../../src/views/Dashboard/Default/ModularDashboard/renderWidget/RenderWidget.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAyC,MAAM,OAAO,CAAA;AAO7D;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC;IAClC;;OAEG;IAEH;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB,CA2DA,CAAA"}
@@ -0,0 +1,27 @@
function _importDeferProxy(e) {
var t = null,
constValue = function constValue(e) {
return function () {
return e;
};
},
proxy = function proxy(r) {
return function (n, o, f) {
return null === t && (t = e()), r(t, o, f);
};
};
return new Proxy({}, {
defineProperty: constValue(!1),
deleteProperty: constValue(!1),
get: proxy(Reflect.get),
getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor),
getPrototypeOf: constValue(null),
isExtensible: constValue(!1),
has: proxy(Reflect.has),
ownKeys: proxy(Reflect.ownKeys),
preventExtensions: constValue(!0),
set: constValue(!1),
setPrototypeOf: constValue(!1)
});
}
export { _importDeferProxy as default };
@@ -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 Monitor = createLucideIcon("Monitor", [
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
]);
export { Monitor as default };
//# sourceMappingURL=monitor.js.map
@@ -0,0 +1 @@
{"version":3,"file":"radial-gradient.js","sourceRoot":"","sources":["../../../../../src/css/types/functions/radial-gradient.ts"],"names":[],"mappings":";;;AAAA,8CAA8E;AAS9E,uCAA0C;AAC1C,0DAAuH;AACvH,oCAAmC;AAEtB,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,aAAa,GAAG,eAAe,CAAC;AAChC,QAAA,cAAc,GAAG,gBAAgB,CAAC;AAClC,QAAA,eAAe,GAAG,iBAAiB,CAAC;AACpC,QAAA,MAAM,GAAG,QAAQ,CAAC;AAClB,QAAA,OAAO,GAAG,SAAS,CAAC;AACpB,QAAA,KAAK,GAAG,OAAO,CAAC;AAChB,QAAA,OAAO,GAAG,SAAS,CAAC;AAE1B,IAAM,cAAc,GAAG,UAAC,OAAgB,EAAE,MAAkB;IAC/D,IAAI,KAAK,iBAAwC,CAAC;IAClD,IAAI,IAAI,0BAAiD,CAAC;IAC1D,IAAM,KAAK,GAAmC,EAAE,CAAC;IACjD,IAAM,QAAQ,GAAuB,EAAE,CAAC;IACxC,0BAAiB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,UAAC,GAAG,EAAE,CAAC;QACrC,IAAI,WAAW,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,EAAE;YACT,IAAI,cAAY,GAAG,KAAK,CAAC;YACzB,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,UAAC,GAAG,EAAE,KAAK;gBAChC,IAAI,cAAY,EAAE;oBACd,IAAI,qBAAY,CAAC,KAAK,CAAC,EAAE;wBACrB,QAAQ,KAAK,CAAC,KAAK,EAAE;4BACjB,KAAK,QAAQ;gCACT,QAAQ,CAAC,IAAI,CAAC,iCAAa,CAAC,CAAC;gCAC7B,OAAO,GAAG,CAAC;4BACf,KAAK,KAAK,CAAC;4BACX,KAAK,MAAM;gCACP,QAAQ,CAAC,IAAI,CAAC,+BAAW,CAAC,CAAC;gCAC3B,OAAO,GAAG,CAAC;4BACf,KAAK,OAAO,CAAC;4BACb,KAAK,QAAQ;gCACT,QAAQ,CAAC,IAAI,CAAC,mCAAe,CAAC,CAAC;gCAC/B,OAAO,GAAG,CAAC;yBAClB;qBACJ;yBAAM,IAAI,sCAAkB,CAAC,KAAK,CAAC,IAAI,iBAAQ,CAAC,KAAK,CAAC,EAAE;wBACrD,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;qBACxB;iBACJ;qBAAM,IAAI,qBAAY,CAAC,KAAK,CAAC,EAAE;oBAC5B,QAAQ,KAAK,CAAC,KAAK,EAAE;wBACjB,KAAK,cAAM;4BACP,KAAK,iBAAwB,CAAC;4BAC9B,OAAO,KAAK,CAAC;wBACjB,KAAK,eAAO;4BACR,KAAK,kBAAyB,CAAC;4BAC/B,OAAO,KAAK,CAAC;wBACjB,KAAK,IAAI;4BACL,cAAY,GAAG,IAAI,CAAC;4BACpB,OAAO,KAAK,CAAC;wBACjB,KAAK,oBAAY;4BACb,IAAI,uBAA+B,CAAC;4BACpC,OAAO,KAAK,CAAC;wBACjB,KAAK,aAAK,CAAC;wBACX,KAAK,qBAAa;4BACd,IAAI,wBAAgC,CAAC;4BACrC,OAAO,KAAK,CAAC;wBACjB,KAAK,eAAO,CAAC;wBACb,KAAK,sBAAc;4BACf,IAAI,yBAAiC,CAAC;4BACtC,OAAO,KAAK,CAAC;wBACjB,KAAK,uBAAe;4BAChB,IAAI,0BAAkC,CAAC;4BACvC,OAAO,KAAK,CAAC;qBACpB;iBACJ;qBAAM,IAAI,iBAAQ,CAAC,KAAK,CAAC,IAAI,sCAAkB,CAAC,KAAK,CAAC,EAAE;oBACrD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;wBACtB,IAAI,GAAG,EAAE,CAAC;qBACb;oBACD,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;oBACjB,OAAO,KAAK,CAAC;iBAChB;gBACD,OAAO,GAAG,CAAC;YACf,CAAC,EAAE,WAAW,CAAC,CAAC;SACnB;QAED,IAAI,WAAW,EAAE;YACb,IAAM,SAAS,GAAG,yBAAc,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;YAC/C,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACzB;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,EAAC,IAAI,MAAA,EAAE,KAAK,OAAA,EAAE,KAAK,OAAA,EAAE,QAAQ,UAAA,EAAE,IAAI,yBAA8B,EAAC,CAAC;AAC9E,CAAC,CAAC;AAxEW,QAAA,cAAc,kBAwEzB"}
@@ -0,0 +1,91 @@
import type { HttpRequest, HttpResponse } from 'uWebSockets.js';
import { HandlerOptions as RawHandlerOptions, OperationContext } from '../handler';
import { RequestParams } from '../common';
/**
* The context in the request for the handler.
*
* @category Server/uWebSockets
*/
export interface RequestContext {
res: HttpResponse;
}
/**
* The GraphQL over HTTP spec compliant request parser for an incoming GraphQL request.
*
* It is important to pass in the `abortedRef` so that the parser does not perform any
* operations on a disposed request (see example).
*
* If the HTTP request _is not_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), the function will respond
* on the `HttpResponse` argument and return `null`.
*
* If the HTTP request _is_ a [well-formatted GraphQL over HTTP request](https://graphql.github.io/graphql-over-http/draft/#sec-Request), but is invalid or malformed,
* the function will throw an error and it is up to the user to handle and respond as they see fit.
*
* ```js
* import uWS from 'uWebSockets.js'; // yarn add uWebSockets.js@uNetworking/uWebSockets.js#<version>
* import { parseRequestParams } from 'graphql-http/lib/use/uWebSockets';
*
* uWS
* .App()
* .any('/graphql', async (res, req) => {
* const abortedRef = { current: false };
* res.onAborted(() => (abortedRef.current = true));
* try {
* const maybeParams = await parseRequestParams(req, res, abortedRef);
* if (!maybeParams) {
* // not a well-formatted GraphQL over HTTP request,
* // parser responded and there's nothing else to do
* return;
* }
*
* // well-formatted GraphQL over HTTP request,
* // with valid parameters
* if (!abortedRef.current) {
* res.writeStatus('200 OK');
* res.end(JSON.stringify(maybeParams, null, ' '));
* }
* } catch (err) {
* // well-formatted GraphQL over HTTP request,
* // but with invalid parameters
* if (!abortedRef.current) {
* res.writeStatus('400 Bad Request');
* res.end(err.message);
* }
* }
* })
* .listen(4000, () => {
* console.log('Listening to port 4000');
* });
* ```
*
* @category Server/uWebSockets
*/
export declare function parseRequestParams(req: HttpRequest, res: HttpResponse, abortedRef: {
current: boolean;
}): Promise<RequestParams | null>;
/**
* Handler options when using the http adapter.
*
* @category Server/uWebSockets
*/
export type HandlerOptions<Context extends OperationContext = undefined> = RawHandlerOptions<HttpRequest, RequestContext, Context>;
/**
* Create a GraphQL over HTTP spec compliant request handler for
* the Node environment [uWebSockets.js module](https://github.com/uNetworking/uWebSockets.js/).
*
* ```js
* import uWS from 'uWebSockets.js'; // yarn add uWebSockets.js@uNetworking/uWebSockets.js#<version>
* import { createHandler } from 'graphql-http/lib/use/uWebSockets';
* import { schema } from './my-graphql-schema';
*
* uWS
* .App()
* .any('/graphql', createHandler({ schema }))
* .listen(4000, () => {
* console.log('Listening to port 4000');
* });
* ```
*
* @category Server/uWebSockets
*/
export declare function createHandler<Context extends OperationContext = undefined>(options: HandlerOptions<Context>): (res: HttpResponse, req: HttpRequest) => Promise<void>;
@@ -0,0 +1,92 @@
import { initI18n } from '@payloadcms/translations';
import * as qs from 'qs-esm';
import { executeAuthStrategies } from '../auth/executeAuthStrategies.js';
import { getDataLoader } from '../collections/dataloader.js';
import { getPayload } from '../index.js';
import { sanitizeLocales } from './addLocalesToRequest.js';
import { formatAdminURL } from './formatAdminURL.js';
import { getRequestLanguage } from './getRequestLanguage.js';
import { parseCookies } from './parseCookies.js';
export const createPayloadRequest = async ({ canSetHeaders, config: configPromise, params, payloadInstanceCacheKey, request })=>{
const cookies = parseCookies(request.headers);
const payload = await getPayload({
config: configPromise,
cron: true,
key: payloadInstanceCacheKey
});
const { config } = payload;
const localization = config.localization;
const urlProperties = new URL(request.url);
const { pathname, searchParams } = urlProperties;
const isGraphQL = !config.graphQL.disable && pathname === formatAdminURL({
apiRoute: config.routes.api,
path: config.routes.graphQL
});
const language = getRequestLanguage({
config,
cookies,
headers: request.headers
});
const i18n = await initI18n({
config: config.i18n,
context: 'api',
language
});
let locale = searchParams.get('locale');
const { search: queryToParse } = urlProperties;
const query = queryToParse ? qs.parse(queryToParse, {
arrayLimit: 1000,
depth: 10,
ignoreQueryPrefix: true
}) : {};
const fallbackFromRequest = query.fallbackLocale || searchParams.get('fallback-locale') || searchParams.get('fallbackLocale');
let fallbackLocale = fallbackFromRequest;
if (localization) {
const locales = sanitizeLocales({
fallbackLocale: fallbackLocale,
locale: locale,
localization
});
fallbackLocale = locales.fallbackLocale;
locale = locales.locale;
}
const customRequest = {
context: {},
fallbackLocale: fallbackLocale,
hash: urlProperties.hash,
host: urlProperties.host,
href: urlProperties.href,
i18n,
locale,
origin: urlProperties.origin,
pathname: urlProperties.pathname,
payload,
payloadAPI: isGraphQL ? 'GraphQL' : 'REST',
payloadDataLoader: undefined,
payloadUploadSizes: {},
port: urlProperties.port,
protocol: urlProperties.protocol,
query,
routeParams: params || {},
search: urlProperties.search,
searchParams: urlProperties.searchParams,
t: i18n.t,
transactionID: undefined,
user: null
};
const req = Object.assign(request, customRequest);
req.payloadDataLoader = getDataLoader(req);
const { responseHeaders, user } = await executeAuthStrategies({
canSetHeaders,
headers: req.headers,
isGraphQL,
payload
});
req.user = user;
if (responseHeaders) {
req.responseHeaders = responseHeaders;
}
return req;
};
//# sourceMappingURL=createPayloadRequest.js.map
@@ -0,0 +1,370 @@
/**
* @license React
* react-jsx-runtime.react-server.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
"use strict";
"production" !== process.env.NODE_ENV &&
(function () {
function getComponentNameFromType(type) {
if (null == type) return null;
if ("function" === typeof type)
return type.$$typeof === REACT_CLIENT_REFERENCE
? null
: type.displayName || type.name || null;
if ("string" === typeof type) return type;
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
case REACT_ACTIVITY_TYPE:
return "Activity";
}
if ("object" === typeof type)
switch (
("number" === typeof type.tag &&
console.error(
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
),
type.$$typeof)
) {
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_CONTEXT_TYPE:
return type.displayName || "Context";
case REACT_CONSUMER_TYPE:
return (type._context.displayName || "Context") + ".Consumer";
case REACT_FORWARD_REF_TYPE:
var innerType = type.render;
type = type.displayName;
type ||
((type = innerType.displayName || innerType.name || ""),
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
return type;
case REACT_MEMO_TYPE:
return (
(innerType = type.displayName || null),
null !== innerType
? innerType
: getComponentNameFromType(type.type) || "Memo"
);
case REACT_LAZY_TYPE:
innerType = type._payload;
type = type._init;
try {
return getComponentNameFromType(type(innerType));
} catch (x) {}
}
return null;
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
try {
testStringCoercion(value);
var JSCompiler_inline_result = !1;
} catch (e) {
JSCompiler_inline_result = !0;
}
if (JSCompiler_inline_result) {
JSCompiler_inline_result = console;
var JSCompiler_temp_const = JSCompiler_inline_result.error;
var JSCompiler_inline_result$jscomp$0 =
("function" === typeof Symbol &&
Symbol.toStringTag &&
value[Symbol.toStringTag]) ||
value.constructor.name ||
"Object";
JSCompiler_temp_const.call(
JSCompiler_inline_result,
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
JSCompiler_inline_result$jscomp$0
);
return testStringCoercion(value);
}
}
function getTaskName(type) {
if (type === REACT_FRAGMENT_TYPE) return "<>";
if (
"object" === typeof type &&
null !== type &&
type.$$typeof === REACT_LAZY_TYPE
)
return "<...>";
try {
var name = getComponentNameFromType(type);
return name ? "<" + name + ">" : "<...>";
} catch (x) {
return "<...>";
}
}
function getOwner() {
var dispatcher = ReactSharedInternalsServer.A;
return null === dispatcher ? null : dispatcher.getOwner();
}
function UnknownOwner() {
return Error("react-stack-top-frame");
}
function hasValidKey(config) {
if (hasOwnProperty.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) return !1;
}
return void 0 !== config.key;
}
function defineKeyPropWarningGetter(props, displayName) {
function warnAboutAccessingKey() {
specialPropKeyWarningShown ||
((specialPropKeyWarningShown = !0),
console.error(
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
displayName
));
}
warnAboutAccessingKey.isReactWarning = !0;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: !0
});
}
function elementRefGetterWithDeprecationWarning() {
var componentName = getComponentNameFromType(this.type);
didWarnAboutElementRef[componentName] ||
((didWarnAboutElementRef[componentName] = !0),
console.error(
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
));
componentName = this.props.ref;
return void 0 !== componentName ? componentName : null;
}
function ReactElement(type, key, props, owner, debugStack, debugTask) {
var refProp = props.ref;
type = {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key,
props: props,
_owner: owner
};
null !== (void 0 !== refProp ? refProp : null)
? Object.defineProperty(type, "ref", {
enumerable: !1,
get: elementRefGetterWithDeprecationWarning
})
: Object.defineProperty(type, "ref", { enumerable: !1, value: null });
type._store = {};
Object.defineProperty(type._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: 0
});
Object.defineProperty(type, "_debugInfo", {
configurable: !1,
enumerable: !1,
writable: !0,
value: null
});
Object.defineProperty(type, "_debugStack", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugStack
});
Object.defineProperty(type, "_debugTask", {
configurable: !1,
enumerable: !1,
writable: !0,
value: debugTask
});
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
return type;
}
function jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
debugStack,
debugTask
) {
var children = config.children;
if (void 0 !== children)
if (isStaticChildren)
if (isArrayImpl(children)) {
for (
isStaticChildren = 0;
isStaticChildren < children.length;
isStaticChildren++
)
validateChildKeys(children[isStaticChildren]);
Object.freeze && Object.freeze(children);
} else
console.error(
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
);
else validateChildKeys(children);
if (hasOwnProperty.call(config, "key")) {
children = getComponentNameFromType(type);
var keys = Object.keys(config).filter(function (k) {
return "key" !== k;
});
isStaticChildren =
0 < keys.length
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
: "{key: someKey}";
didWarnAboutKeySpread[children + isStaticChildren] ||
((keys =
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
console.error(
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
isStaticChildren,
children,
keys,
children
),
(didWarnAboutKeySpread[children + isStaticChildren] = !0));
}
children = null;
void 0 !== maybeKey &&
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
hasValidKey(config) &&
(checkKeyStringCoercion(config.key), (children = "" + config.key));
if ("key" in config) {
maybeKey = {};
for (var propName in config)
"key" !== propName && (maybeKey[propName] = config[propName]);
} else maybeKey = config;
children &&
defineKeyPropWarningGetter(
maybeKey,
"function" === typeof type
? type.displayName || type.name || "Unknown"
: type
);
return ReactElement(
type,
children,
maybeKey,
getOwner(),
debugStack,
debugTask
);
}
function validateChildKeys(node) {
isValidElement(node)
? node._store && (node._store.validated = 1)
: "object" === typeof node &&
null !== node &&
node.$$typeof === REACT_LAZY_TYPE &&
("fulfilled" === node._payload.status
? isValidElement(node._payload.value) &&
node._payload.value._store &&
(node._payload.value._store.validated = 1)
: node._store && (node._store.validated = 1));
}
function isValidElement(object) {
return (
"object" === typeof object &&
null !== object &&
object.$$typeof === REACT_ELEMENT_TYPE
);
}
var React = require("react"),
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
REACT_MEMO_TYPE = Symbol.for("react.memo"),
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
ReactSharedInternalsServer =
React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
if (!ReactSharedInternalsServer)
throw Error(
'The "react" package in this environment is not configured correctly. The "react-server" condition must be enabled in any environment that runs React Server Components.'
);
var hasOwnProperty = Object.prototype.hasOwnProperty,
isArrayImpl = Array.isArray,
createTask = console.createTask
? console.createTask
: function () {
return null;
};
React = {
react_stack_bottom_frame: function (callStackForError) {
return callStackForError();
}
};
var specialPropKeyWarningShown;
var didWarnAboutElementRef = {};
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
React,
UnknownOwner
)();
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
var didWarnAboutKeySpread = {};
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = function (type, config, maybeKey) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!1,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
isStaticChildren,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
exports.jsxs = function (type, config, maybeKey) {
var trackActualOwner =
1e4 > ReactSharedInternalsServer.recentlyCreatedOwnerStacks++;
return jsxDEVImpl(
type,
config,
maybeKey,
!0,
trackActualOwner
? Error("react-stack-top-frame")
: unknownOwnerDebugStack,
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
);
};
})();
@@ -0,0 +1,116 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "aksara", verb: "mempunyai" },
file: { unit: "bait", verb: "mempunyai" },
array: { unit: "elemen", verb: "mempunyai" },
set: { unit: "elemen", verb: "mempunyai" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "nombor";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "input",
email: "alamat e-mel",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "tarikh masa ISO",
date: "tarikh ISO",
time: "masa ISO",
duration: "tempoh ISO",
ipv4: "alamat IPv4",
ipv6: "alamat IPv6",
cidrv4: "julat IPv4",
cidrv6: "julat IPv6",
base64: "string dikodkan base64",
base64url: "string dikodkan base64url",
json_string: "string JSON",
e164: "nombor E.164",
jwt: "JWT",
template_literal: "input",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Input tidak sah: dijangka ${issue.expected}, diterima ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Input tidak sah: dijangka ${util.stringifyPrimitive(issue.values[0])}`;
return `Pilihan tidak sah: dijangka salah satu daripada ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Terlalu besar: dijangka ${issue.origin ?? "nilai"} ${sizing.verb} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elemen"}`;
return `Terlalu besar: dijangka ${issue.origin ?? "nilai"} adalah ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Terlalu kecil: dijangka ${issue.origin} ${sizing.verb} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Terlalu kecil: dijangka ${issue.origin} adalah ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `String tidak sah: mesti bermula dengan "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `String tidak sah: mesti berakhir dengan "${_issue.suffix}"`;
if (_issue.format === "includes")
return `String tidak sah: mesti mengandungi "${_issue.includes}"`;
if (_issue.format === "regex")
return `String tidak sah: mesti sepadan dengan corak ${_issue.pattern}`;
return `${Nouns[_issue.format] ?? issue.format} tidak sah`;
}
case "not_multiple_of":
return `Nombor tidak sah: perlu gandaan ${issue.divisor}`;
case "unrecognized_keys":
return `Kunci tidak dikenali: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Kunci tidak sah dalam ${issue.origin}`;
case "invalid_union":
return "Input tidak sah";
case "invalid_element":
return `Nilai tidak sah dalam ${issue.origin}`;
default:
return `Input tidak sah`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,59 @@
"use strict";
exports.assertType = assertType;
exports.fakeDate = fakeDate;
exports.generateOffset = generateOffset;
exports.resetDefaultOptions = resetDefaultOptions;
var _vitest = require("./test/vitest");
var _index = require("./addLeadingZeros.cjs");
var _index2 = require("./defaultOptions.cjs");
var _sinon = require("./test/sinon");
function assertType(_value) {}
function resetDefaultOptions() {
(0, _index2.setDefaultOptions)({});
}
// This makes sure we create the consistent offsets across timezones, no matter where these tests are ran.
function generateOffset(originalDate) {
// Add the timezone.
let offset = "";
const tzOffset = originalDate.getTimezoneOffset();
if (tzOffset !== 0) {
const absoluteOffset = Math.abs(tzOffset);
const hourOffset = (0, _index.addLeadingZeros)(
Math.trunc(absoluteOffset / 60),
2,
);
const minuteOffset = (0, _index.addLeadingZeros)(absoluteOffset % 60, 2);
// If less than 0, the sign is +, because it is ahead of time.
const sign = tzOffset < 0 ? "+" : "-";
offset = `${sign}${hourOffset}:${minuteOffset}`;
} else {
offset = "Z";
}
return offset;
}
function fakeDate(date) {
let clock;
function fakeNow(date) {
clock?.restore();
clock = _sinon.default.useFakeTimers(+date);
}
(0, _vitest.beforeEach)(() => {
fakeNow(+date);
});
(0, _vitest.afterEach)(() => {
clock?.restore();
clock = undefined;
});
return { fakeNow };
}
@@ -0,0 +1 @@
{"version":3,"file":"folder-closed.js","sources":["../../../src/icons/folder-closed.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FolderClosed\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjAgMjBhMiAyIDAgMCAwIDItMlY4YTIgMiAwIDAgMC0yLTJoLTcuOWEyIDIgMCAwIDEtMS42OS0uOUw5LjYgMy45QTIgMiAwIDAgMCA3LjkzIDNINGEyIDIgMCAwIDAtMiAydjEzYTIgMiAwIDAgMCAyIDJaIiAvPgogIDxwYXRoIGQ9Ik0yIDEwaDIwIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/folder-closed\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 FolderClosed = createLucideIcon('FolderClosed', [\n [\n 'path',\n {\n d: 'M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z',\n key: '1kt360',\n },\n ],\n ['path', { d: 'M2 10h20', key: '1ir3d8' }],\n]);\n\nexport default FolderClosed;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CACpD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,438 @@
import { StyleSheet } from '@emotion/sheet';
import { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';
import '@emotion/weak-memoize';
import '@emotion/memoize';
var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
var previous = 0;
var character = 0;
while (true) {
previous = character;
character = peek(); // &\f
if (previous === 38 && character === 12) {
points[index] = 1;
}
if (token(character)) {
break;
}
next();
}
return slice(begin, position);
};
var toRules = function toRules(parsed, points) {
// pretend we've started with a comma
var index = -1;
var character = 44;
do {
switch (token(character)) {
case 0:
// &\f
if (character === 38 && peek() === 12) {
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
// and when it should just concatenate the outer and inner selectors
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
points[index] = 1;
}
parsed[index] += identifierWithPointTracking(position - 1, points, index);
break;
case 2:
parsed[index] += delimit(character);
break;
case 4:
// comma
if (character === 44) {
// colon
parsed[++index] = peek() === 58 ? '&\f' : '';
points[index] = parsed[index].length;
break;
}
// fallthrough
default:
parsed[index] += from(character);
}
} while (character = next());
return parsed;
};
var getRules = function getRules(value, points) {
return dealloc(toRules(alloc(value), points));
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
var fixedElements = /* #__PURE__ */new WeakMap();
var compat = function compat(element) {
if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
// negative .length indicates that this rule has been already prefixed
element.length < 1) {
return;
}
var value = element.value;
var parent = element.parent;
var isImplicitRule = element.column === parent.column && element.line === parent.line;
while (parent.type !== 'rule') {
parent = parent.parent;
if (!parent) return;
} // short-circuit for the simplest case
if (element.props.length === 1 && value.charCodeAt(0) !== 58
/* colon */
&& !fixedElements.get(parent)) {
return;
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
if (isImplicitRule) {
return;
}
fixedElements.set(element, true);
var points = [];
var rules = getRules(value, points);
var parentRules = parent.props;
for (var i = 0, k = 0; i < rules.length; i++) {
for (var j = 0; j < parentRules.length; j++, k++) {
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
}
}
};
var removeLabel = function removeLabel(element) {
if (element.type === 'decl') {
var value = element.value;
if ( // charcode for l
value.charCodeAt(0) === 108 && // charcode for b
value.charCodeAt(2) === 98) {
// this ignores label
element["return"] = '';
element.value = '';
}
}
};
/* eslint-disable no-fallthrough */
function prefix(value, length) {
switch (hash(value, length)) {
// color-adjust
case 5103:
return WEBKIT + 'print-' + value + value;
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
case 5737:
case 4201:
case 3177:
case 3433:
case 1641:
case 4457:
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
case 5572:
case 6356:
case 5844:
case 3191:
case 6645:
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
case 6391:
case 5879:
case 5623:
case 6135:
case 4599:
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
case 4215:
case 6389:
case 5109:
case 5365:
case 5621:
case 3829:
return WEBKIT + value + value;
// appearance, user-select, transform, hyphens, text-size-adjust
case 5349:
case 4246:
case 4810:
case 6968:
case 2756:
return WEBKIT + value + MOZ + value + MS + value + value;
// flex, flex-direction
case 6828:
case 4268:
return WEBKIT + value + MS + value + value;
// order
case 6165:
return WEBKIT + value + MS + 'flex-' + value + value;
// align-items
case 5187:
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
// align-self
case 5443:
return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
// align-content
case 4675:
return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
// flex-shrink
case 5548:
return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
// flex-basis
case 5292:
return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
// flex-grow
case 6060:
return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
// transition
case 4554:
return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
// cursor
case 6187:
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
// background, background-image
case 5495:
case 3959:
return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
// justify-content
case 4968:
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
// (margin|padding)-inline-(start|end)
case 4095:
case 3583:
case 4068:
case 2532:
return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
// (min|max)?(width|height|inline-size|block-size)
case 8116:
case 7059:
case 5753:
case 5535:
case 5445:
case 5701:
case 4933:
case 4677:
case 5533:
case 5789:
case 5021:
case 4765:
// stretch, max-content, min-content, fill-available
if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
// (m)ax-content, (m)in-content
case 109:
// -
if (charat(value, length + 4) !== 45) break;
// (f)ill-available, (f)it-content
case 102:
return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
// (s)tretch
case 115:
return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
}
break;
// position: sticky
case 4949:
// (s)ticky?
if (charat(value, length + 1) !== 115) break;
// display: (flex|inline-flex)
case 6444:
switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
// stic(k)y
case 107:
return replace(value, ':', ':' + WEBKIT) + value;
// (inline-)?fl(e)x
case 101:
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
}
break;
// writing-mode
case 5936:
switch (charat(value, length + 11)) {
// vertical-l(r)
case 114:
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
// vertical-r(l)
case 108:
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
// horizontal(-)tb
case 45:
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
}
return WEBKIT + value + MS + value + value;
}
return value;
}
var prefixer = function prefixer(element, index, children, callback) {
if (element.length > -1) if (!element["return"]) switch (element.type) {
case DECLARATION:
element["return"] = prefix(element.value, element.length);
break;
case KEYFRAMES:
return serialize([copy(element, {
value: replace(element.value, '@', '@' + WEBKIT)
})], callback);
case RULESET:
if (element.length) return combine(element.props, function (value) {
switch (match(value, /(::plac\w+|:read-\w+)/)) {
// :read-(only|write)
case ':read-only':
case ':read-write':
return serialize([copy(element, {
props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
})], callback);
// :placeholder
case '::placeholder':
return serialize([copy(element, {
props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
}), copy(element, {
props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
}), copy(element, {
props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
})], callback);
}
return '';
});
}
};
var defaultStylisPlugins = [prefixer];
var createCache = function createCache(options) {
var key = options.key;
if (key === 'css') {
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
// note this very very intentionally targets all style elements regardless of the key to ensure
// that creating a cache works inside of render of a React component
Array.prototype.forEach.call(ssrStyles, function (node) {
// we want to only move elements which have a space in the data-emotion attribute value
// because that indicates that it is an Emotion 11 server-side rendered style elements
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
// will not result in the Emotion 10 styles being destroyed
var dataEmotionAttribute = node.getAttribute('data-emotion');
if (dataEmotionAttribute.indexOf(' ') === -1) {
return;
}
document.head.appendChild(node);
node.setAttribute('data-s', '');
});
}
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
var inserted = {};
var container;
var nodesToHydrate = [];
{
container = options.container || document.head;
Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
var attrib = node.getAttribute("data-emotion").split(' ');
for (var i = 1; i < attrib.length; i++) {
inserted[attrib[i]] = true;
}
nodesToHydrate.push(node);
});
}
var _insert;
var omnipresentPlugins = [compat, removeLabel];
{
var currentSheet;
var finalizingPlugins = [stringify, rulesheet(function (rule) {
currentSheet.insert(rule);
})];
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
var stylis = function stylis(styles) {
return serialize(compile(styles), serializer);
};
_insert = function insert(selector, serialized, sheet, shouldCache) {
currentSheet = sheet;
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
if (shouldCache) {
cache.inserted[serialized.name] = true;
}
};
}
var cache = {
key: key,
sheet: new StyleSheet({
key: key,
container: container,
nonce: options.nonce,
speedy: options.speedy,
prepend: options.prepend,
insertionPoint: options.insertionPoint
}),
nonce: options.nonce,
inserted: inserted,
registered: {},
insert: _insert
};
cache.sheet.hydrate(nodesToHydrate);
return cache;
};
export { createCache as default };
@@ -0,0 +1,13 @@
const {resolve} = require('path');
module.exports = {
entry: [
'./md5.js'
],
output: {
path: resolve('./dist'),
filename: 'md5.min.js',
libraryTarget: "var",
library: "MD5"
}
};
@@ -0,0 +1 @@
{"version":3,"file":"context-utils.js","sourceRoot":"","sources":["../../../src/trace/context-utils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,gDAAsD;AAItD,yDAAsD;AACtD,4CAA4C;AAE5C;;GAEG;AACH,MAAM,QAAQ,GAAG,IAAA,0BAAgB,EAAC,gCAAgC,CAAC,CAAC;AAEpE;;;;GAIG;AACH,SAAgB,OAAO,CAAC,OAAgB;IACtC,OAAQ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU,IAAI,SAAS,CAAC;AAC3D,CAAC;AAFD,0BAEC;AAED;;GAEG;AACH,SAAgB,aAAa;IAC3B,OAAO,OAAO,CAAC,oBAAU,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;AACpD,CAAC;AAFD,sCAEC;AAED;;;;;GAKG;AACH,SAAgB,OAAO,CAAC,OAAgB,EAAE,IAAU;IAClD,OAAO,OAAO,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;AAC1C,CAAC;AAFD,0BAEC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,OAAgB;IACzC,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACvC,CAAC;AAFD,gCAEC;AAED;;;;;;GAMG;AACH,SAAgB,cAAc,CAC5B,OAAgB,EAChB,WAAwB;IAExB,OAAO,OAAO,CAAC,OAAO,EAAE,IAAI,mCAAgB,CAAC,WAAW,CAAC,CAAC,CAAC;AAC7D,CAAC;AALD,wCAKC;AAED;;;;GAIG;AACH,SAAgB,cAAc,CAAC,OAAgB;;IAC7C,OAAO,MAAA,OAAO,CAAC,OAAO,CAAC,0CAAE,WAAW,EAAE,CAAC;AACzC,CAAC;AAFD,wCAEC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createContextKey } from '../context/context';\nimport { Context } from '../context/types';\nimport { Span } from './span';\nimport { SpanContext } from './span_context';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { ContextAPI } from '../api/context';\n\n/**\n * span key\n */\nconst SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');\n\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nexport function getSpan(context: Context): Span | undefined {\n return (context.getValue(SPAN_KEY) as Span) || undefined;\n}\n\n/**\n * Gets the span from the current context, if one exists.\n */\nexport function getActiveSpan(): Span | undefined {\n return getSpan(ContextAPI.getInstance().active());\n}\n\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nexport function setSpan(context: Context, span: Span): Context {\n return context.setValue(SPAN_KEY, span);\n}\n\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nexport function deleteSpan(context: Context): Context {\n return context.deleteValue(SPAN_KEY);\n}\n\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nexport function setSpanContext(\n context: Context,\n spanContext: SpanContext\n): Context {\n return setSpan(context, new NonRecordingSpan(spanContext));\n}\n\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nexport function getSpanContext(context: Context): SpanContext | undefined {\n return getSpan(context)?.spanContext();\n}\n"]}
@@ -0,0 +1,57 @@
"use strict";
exports.ISOTimezoneWithZParser = void 0;
var _index = require("../../../constructFrom.js");
var _index2 = require("../../../_lib/getTimezoneOffsetInMilliseconds.js");
var _constants = require("../constants.js");
var _Parser = require("../Parser.js");
var _utils = require("../utils.js");
// Timezone (ISO-8601. +00:00 is `'Z'`)
class ISOTimezoneWithZParser extends _Parser.Parser {
priority = 10;
parse(dateString, token) {
switch (token) {
case "X":
return (0, _utils.parseTimezonePattern)(
_constants.timezonePatterns.basicOptionalMinutes,
dateString,
);
case "XX":
return (0, _utils.parseTimezonePattern)(
_constants.timezonePatterns.basic,
dateString,
);
case "XXXX":
return (0, _utils.parseTimezonePattern)(
_constants.timezonePatterns.basicOptionalSeconds,
dateString,
);
case "XXXXX":
return (0, _utils.parseTimezonePattern)(
_constants.timezonePatterns.extendedOptionalSeconds,
dateString,
);
case "XXX":
default:
return (0, _utils.parseTimezonePattern)(
_constants.timezonePatterns.extended,
dateString,
);
}
}
set(date, flags, value) {
if (flags.timestampIsSet) return date;
return (0, _index.constructFrom)(
date,
date.getTime() -
(0, _index2.getTimezoneOffsetInMilliseconds)(date) -
value,
);
}
incompatibleTokens = ["t", "T", "x"];
}
exports.ISOTimezoneWithZParser = ISOTimezoneWithZParser;
@@ -0,0 +1,32 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const FALSY_ENV_VALUES = new Set(['false', 'f', 'n', 'no', 'off', '0']);
const TRUTHY_ENV_VALUES = new Set(['true', 't', 'y', 'yes', 'on', '1']);
/**
* A helper function which casts an ENV variable value to `true` or `false` using the constants defined above.
* In strict mode, it may return `null` if the value doesn't match any of the predefined values.
*
* @param value The value of the env variable
* @param options -- Only has `strict` key for now, which requires a strict match for `true` in TRUTHY_ENV_VALUES
* @returns true/false if the lowercase value matches the predefined values above. If not, null in strict mode,
* and Boolean(value) in loose mode.
*/
function envToBool(value, options) {
const normalized = String(value).toLowerCase();
if (FALSY_ENV_VALUES.has(normalized)) {
return false;
}
if (TRUTHY_ENV_VALUES.has(normalized)) {
return true;
}
return options?.strict ? null : Boolean(value);
}
exports.FALSY_ENV_VALUES = FALSY_ENV_VALUES;
exports.TRUTHY_ENV_VALUES = TRUTHY_ENV_VALUES;
exports.envToBool = envToBool;
//# sourceMappingURL=envToBool.js.map
@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=e=>()=>({path:`/revisions`,params:e??{},method:`GET`}),n=(t,n)=>()=>(e.throwIfEmpty(String(t),`Key cannot be empty`),{path:`/revisions/${t}`,params:n??{},method:`GET`});exports.readRevision=n,exports.readRevisions=t;
//# sourceMappingURL=revisions.cjs.map
@@ -0,0 +1,24 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BestAvailableLocale = BestAvailableLocale;
/**
* https://tc39.es/ecma402/#sec-bestavailablelocale
* @param availableLocales
* @param locale
*/
function BestAvailableLocale(availableLocales, locale) {
var candidate = locale;
while (true) {
if (availableLocales.indexOf(candidate) > -1) {
return candidate;
}
var pos = candidate.lastIndexOf('-');
if (!~pos) {
return undefined;
}
if (pos >= 2 && candidate[pos - 2] === '-') {
pos -= 2;
}
candidate = candidate.slice(0, pos);
}
}
@@ -0,0 +1,64 @@
"use strict";
exports.startOfWeekYear = startOfWeekYear;
var _index = require("./_lib/defaultOptions.cjs");
var _index2 = require("./constructFrom.cjs");
var _index3 = require("./getWeekYear.cjs");
var _index4 = require("./startOfWeek.cjs");
/**
* The {@link startOfWeekYear} function options.
*/
/**
* @name startOfWeekYear
* @category Week-Numbering Year Helpers
* @summary Return the start of a local week-numbering year for the given date.
*
* @description
* Return the start of a local week-numbering year.
* The exact calculation depends on the values of
* `options.weekStartsOn` (which is the index of the first day of the week)
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
* the first week of the week-numbering year)
*
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The start of a week-numbering year
*
* @example
* // The start of an a week-numbering year for 2 July 2005 with default settings:
* const result = startOfWeekYear(new Date(2005, 6, 2))
* //=> Sun Dec 26 2004 00:00:00
*
* @example
* // The start of a week-numbering year for 2 July 2005
* // if Monday is the first day of week
* // and 4 January is always in the first week of the year:
* const result = startOfWeekYear(new Date(2005, 6, 2), {
* weekStartsOn: 1,
* firstWeekContainsDate: 4
* })
* //=> Mon Jan 03 2005 00:00:00
*/
function startOfWeekYear(date, options) {
const defaultOptions = (0, _index.getDefaultOptions)();
const firstWeekContainsDate =
options?.firstWeekContainsDate ??
options?.locale?.options?.firstWeekContainsDate ??
defaultOptions.firstWeekContainsDate ??
defaultOptions.locale?.options?.firstWeekContainsDate ??
1;
const year = (0, _index3.getWeekYear)(date, options);
const firstWeek = (0, _index2.constructFrom)(options?.in || date, 0);
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
firstWeek.setHours(0, 0, 0, 0);
const _date = (0, _index4.startOfWeek)(firstWeek, options);
return _date;
}
@@ -0,0 +1,49 @@
@import '../../scss/styles.scss';
@layer payload-default {
.field-type.textarea {
position: relative;
display: flex;
flex-direction: column;
textarea {
@include formInput();
overflow-y: auto;
resize: vertical;
min-height: base(3);
height: auto;
display: flex;
}
textarea:not(:empty) {
field-sizing: content;
min-height: calc(var(--rows) * var(--base) + var(--base) * 0.8 + 2px);
}
&.read-only {
.textarea-outer {
@include readOnly;
}
}
}
html[data-theme='light'] {
.field-type.textarea {
&.error {
textarea {
@include lightInputError;
}
}
}
}
html[data-theme='dark'] {
.field-type.textarea {
&.error {
textarea {
@include darkInputError;
}
}
}
}
}
@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["../../../src/config/files/types.ts"],"sourcesContent":["import type { InputOptions } from \"../index.ts\";\n\nexport type ConfigFile = {\n filepath: string;\n dirname: string;\n options: InputOptions & { babel?: unknown };\n};\n\nexport type IgnoreFile = {\n filepath: string;\n dirname: string;\n ignore: RegExp[];\n};\n\nexport type RelativeConfig = {\n // The actual config, either from package.json#babel, .babelrc, or\n // .babelrc.js, if there was one.\n config: ConfigFile | null;\n // The .babelignore, if there was one.\n ignore: IgnoreFile | null;\n};\n\nexport type FilePackageData = {\n // The file in the package.\n filepath: string;\n // Any ancestor directories of the file that are within the package.\n directories: string[];\n // The contents of the package.json. May not be found if the package just\n // terminated at a node_modules folder without finding one.\n pkg: ConfigFile | null;\n // True if a package.json or node_modules folder was found while traversing\n // the directory structure.\n isPackage: boolean;\n};\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,8 @@
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./core.cjs.production.min.js')
} else {
module.exports = require('./core.cjs.development.js')
}
@@ -0,0 +1,4 @@
export declare const endOfDay: import("./types.js").FPFn1<
Date,
string | number | Date
>;
@@ -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 MoveUpLeft = createLucideIcon("MoveUpLeft", [
["path", { d: "M5 11V5H11", key: "3q78g9" }],
["path", { d: "M5 5L19 19", key: "5zm2fv" }]
]);
export { MoveUpLeft as default };
//# sourceMappingURL=move-up-left.js.map
@@ -0,0 +1,78 @@
import { RenderServerComponent } from '@payloadcms/ui/elements/RenderServerComponent';
import React from 'react';
/**
* Server function to render a widget on-demand.
* Similar to render-field but specifically for dashboard widgets.
*/
export const renderWidgetHandler = ({
cookies,
locale,
permissions,
req,
widgetSlug
}) => {
if (!req.user) {
throw new Error('Unauthorized');
}
const {
widgets
} = req.payload.config.admin.dashboard;
const {
importMap
} = req.payload;
// Find the widget configuration
const widgetConfig = widgets.find(widget => widget.slug === widgetSlug);
if (!widgetConfig) {
return {
component: React.createElement('div', {
style: {
background: 'var(--theme-elevation-50)',
border: '1px solid var(--theme-elevation-200)',
borderRadius: '4px',
color: 'var(--theme-text)',
padding: '20px',
textAlign: 'center'
}
}, `Widget "${widgetSlug}" not found`)
};
}
try {
// Create server props for the widget
const serverProps = {
req,
// TODO: widgetData: widgetData || {},
cookies,
locale,
permissions,
widgetSlug
};
// Render the widget server component
const component = RenderServerComponent({
Component: widgetConfig.ComponentPath,
importMap,
serverProps
});
return {
component
};
} catch (error) {
const errorMessage = error instanceof Error ? error.message : String(error);
req.payload.logger.error({
err: error,
msg: `Error rendering widget "${widgetSlug}": ${errorMessage}`
});
return {
component: React.createElement('div', {
style: {
background: 'var(--theme-error-50)',
border: '1px solid var(--theme-error-200)',
borderRadius: '4px',
color: 'var(--theme-error-text)',
padding: '20px',
textAlign: 'center'
}
}, 'Error loading widget')
};
}
};
//# sourceMappingURL=renderWidgetServerFn.js.map
@@ -0,0 +1,411 @@
import { defineIntegration, LRUMap, getClient, debug } from '@sentry/core';
import { NODE_MAJOR } from '../../nodeVersion.js';
import { isDebuggerEnabled } from '../../utils/debug.js';
import { createRateLimiter, functionNamesMatch } from './common.js';
/** Creates a unique hash from stack frames */
function hashFrames(frames) {
if (frames === undefined) {
return;
}
// Only hash the 10 most recent frames (ie. the last 10)
return frames.slice(-10).reduce((acc, frame) => `${acc},${frame.function},${frame.lineno},${frame.colno}`, '');
}
/**
* We use the stack parser to create a unique hash from the exception stack trace
* This is used to lookup vars when the exception passes through the event processor
*/
function hashFromStack(stackParser, stack) {
if (stack === undefined) {
return undefined;
}
return hashFrames(stackParser(stack, 1));
}
/** Creates a container for callbacks to be called sequentially */
function createCallbackList(complete) {
// A collection of callbacks to be executed last to first
let callbacks = [];
let completedCalled = false;
function checkedComplete(result) {
callbacks = [];
if (completedCalled) {
return;
}
completedCalled = true;
complete(result);
}
// complete should be called last
callbacks.push(checkedComplete);
function add(fn) {
callbacks.push(fn);
}
function next(result) {
const popped = callbacks.pop() || checkedComplete;
try {
popped(result);
} catch {
// If there is an error, we still want to call the complete callback
checkedComplete(result);
}
}
return { add, next };
}
/**
* Promise API is available as `Experimental` and in Node 19 only.
*
* Callback-based API is `Stable` since v14 and `Experimental` since v8.
* Because of that, we are creating our own `AsyncSession` class.
*
* https://nodejs.org/docs/latest-v19.x/api/inspector.html#promises-api
* https://nodejs.org/docs/latest-v14.x/api/inspector.html
*/
class AsyncSession {
/** Throws if inspector API is not available */
constructor( _session) {this._session = _session;
//
}
static async create(orDefault) {
if (orDefault) {
return orDefault;
}
const inspector = await import('node:inspector');
return new AsyncSession(new inspector.Session());
}
/** @inheritdoc */
configureAndConnect(onPause, captureAll) {
this._session.connect();
this._session.on('Debugger.paused', event => {
onPause(event, () => {
// After the pause work is complete, resume execution or the exception context memory is leaked
this._session.post('Debugger.resume');
});
});
this._session.post('Debugger.enable');
this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });
}
setPauseOnExceptions(captureAll) {
this._session.post('Debugger.setPauseOnExceptions', { state: captureAll ? 'all' : 'uncaught' });
}
/** @inheritdoc */
getLocalVariables(objectId, complete) {
this._getProperties(objectId, props => {
const { add, next } = createCallbackList(complete);
for (const prop of props) {
if (prop.value?.objectId && prop.value.className === 'Array') {
const id = prop.value.objectId;
add(vars => this._unrollArray(id, prop.name, vars, next));
} else if (prop.value?.objectId && prop.value.className === 'Object') {
const id = prop.value.objectId;
add(vars => this._unrollObject(id, prop.name, vars, next));
} else if (prop.value) {
add(vars => this._unrollOther(prop, vars, next));
}
}
next({});
});
}
/**
* Gets all the PropertyDescriptors of an object
*/
_getProperties(objectId, next) {
this._session.post(
'Runtime.getProperties',
{
objectId,
ownProperties: true,
},
(err, params) => {
if (err) {
next([]);
} else {
next(params.result);
}
},
);
}
/**
* Unrolls an array property
*/
_unrollArray(objectId, name, vars, next) {
this._getProperties(objectId, props => {
vars[name] = props
.filter(v => v.name !== 'length' && !isNaN(parseInt(v.name, 10)))
.sort((a, b) => parseInt(a.name, 10) - parseInt(b.name, 10))
.map(v => v.value?.value);
next(vars);
});
}
/**
* Unrolls an object property
*/
_unrollObject(objectId, name, vars, next) {
this._getProperties(objectId, props => {
vars[name] = props
.map(v => [v.name, v.value?.value])
.reduce((obj, [key, val]) => {
obj[key] = val;
return obj;
}, {} );
next(vars);
});
}
/**
* Unrolls other properties
*/
_unrollOther(prop, vars, next) {
if (prop.value) {
if ('value' in prop.value) {
if (prop.value.value === undefined || prop.value.value === null) {
vars[prop.name] = `<${prop.value.value}>`;
} else {
vars[prop.name] = prop.value.value;
}
} else if ('description' in prop.value && prop.value.type !== 'function') {
vars[prop.name] = `<${prop.value.description}>`;
} else if (prop.value.type === 'undefined') {
vars[prop.name] = '<undefined>';
}
}
next(vars);
}
}
const INTEGRATION_NAME = 'LocalVariables';
/**
* Adds local variables to exception frames
*/
const _localVariablesSyncIntegration = ((
options = {},
sessionOverride,
) => {
const cachedFrames = new LRUMap(20);
let rateLimiter;
let shouldProcessEvent = false;
function addLocalVariablesToException(exception) {
const hash = hashFrames(exception.stacktrace?.frames);
if (hash === undefined) {
return;
}
// Check if we have local variables for an exception that matches the hash
// remove is identical to get but also removes the entry from the cache
const cachedFrame = cachedFrames.remove(hash);
if (cachedFrame === undefined) {
return;
}
// Filter out frames where the function name is `new Promise` since these are in the error.stack frames
// but do not appear in the debugger call frames
const frames = (exception.stacktrace?.frames || []).filter(frame => frame.function !== 'new Promise');
for (let i = 0; i < frames.length; i++) {
// Sentry frames are in reverse order
const frameIndex = frames.length - i - 1;
const cachedFrameVariable = cachedFrame[i];
const frameVariable = frames[frameIndex];
// Drop out if we run out of frames to match up
if (!frameVariable || !cachedFrameVariable) {
break;
}
if (
// We need to have vars to add
cachedFrameVariable.vars === undefined ||
// Only skip out-of-app frames if includeOutOfAppFrames is not true
(frameVariable.in_app === false && options.includeOutOfAppFrames !== true) ||
// The function names need to match
!functionNamesMatch(frameVariable.function, cachedFrameVariable.function)
) {
continue;
}
frameVariable.vars = cachedFrameVariable.vars;
}
}
function addLocalVariablesToEvent(event) {
for (const exception of event.exception?.values || []) {
addLocalVariablesToException(exception);
}
return event;
}
let setupPromise;
async function setup() {
const client = getClient();
const clientOptions = client?.getOptions();
if (!clientOptions?.includeLocalVariables) {
return;
}
// Only setup this integration if the Node version is >= v18
// https://github.com/getsentry/sentry-javascript/issues/7697
const unsupportedNodeVersion = NODE_MAJOR < 18;
if (unsupportedNodeVersion) {
debug.log('The `LocalVariables` integration is only supported on Node >= v18.');
return;
}
if (await isDebuggerEnabled()) {
debug.warn('Local variables capture has been disabled because the debugger was already enabled');
return;
}
try {
const session = await AsyncSession.create(sessionOverride);
const handlePaused = (
stackParser,
{ params: { reason, data, callFrames } },
complete,
) => {
if (reason !== 'exception' && reason !== 'promiseRejection') {
complete();
return;
}
rateLimiter?.();
// data.description contains the original error.stack
const exceptionHash = hashFromStack(stackParser, data.description);
if (exceptionHash == undefined) {
complete();
return;
}
const { add, next } = createCallbackList(frames => {
cachedFrames.set(exceptionHash, frames);
complete();
});
// Because we're queuing up and making all these calls synchronously, we can potentially overflow the stack
// For this reason we only attempt to get local variables for the first 5 frames
for (let i = 0; i < Math.min(callFrames.length, 5); i++) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const { scopeChain, functionName, this: obj } = callFrames[i];
const localScope = scopeChain.find(scope => scope.type === 'local');
// obj.className is undefined in ESM modules
const fn = obj.className === 'global' || !obj.className ? functionName : `${obj.className}.${functionName}`;
if (localScope?.object.objectId === undefined) {
add(frames => {
frames[i] = { function: fn };
next(frames);
});
} else {
const id = localScope.object.objectId;
add(frames =>
session.getLocalVariables(id, vars => {
frames[i] = { function: fn, vars };
next(frames);
}),
);
}
}
next([]);
};
const captureAll = options.captureAllExceptions !== false;
session.configureAndConnect(
(ev, complete) =>
handlePaused(clientOptions.stackParser, ev , complete),
captureAll,
);
if (captureAll) {
const max = options.maxExceptionsPerSecond || 50;
rateLimiter = createRateLimiter(
max,
() => {
debug.log('Local variables rate-limit lifted.');
session.setPauseOnExceptions(true);
},
seconds => {
debug.log(
`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${seconds} seconds.`,
);
session.setPauseOnExceptions(false);
},
);
}
shouldProcessEvent = true;
} catch (error) {
debug.log('The `LocalVariables` integration failed to start.', error);
}
}
return {
name: INTEGRATION_NAME,
setupOnce() {
setupPromise = setup();
},
async processEvent(event) {
await setupPromise;
if (shouldProcessEvent) {
return addLocalVariablesToEvent(event);
}
return event;
},
// These are entirely for testing
_getCachedFramesCount() {
return cachedFrames.size;
},
_getFirstCachedFrame() {
return cachedFrames.values()[0];
},
};
}) ;
/**
* Adds local variables to exception frames.
*/
const localVariablesSyncIntegration = defineIntegration(_localVariablesSyncIntegration);
export { createCallbackList, hashFrames, hashFromStack, localVariablesSyncIntegration };
//# sourceMappingURL=local-variables-sync.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/singlestore/migrator.ts"],"sourcesContent":["import type { MigrationConfig } from '~/migrator.ts';\nimport { readMigrationFiles } from '~/migrator.ts';\nimport type { SingleStoreDriverDatabase } from './driver.ts';\n\nexport async function migrate<TSchema extends Record<string, unknown>>(\n\tdb: SingleStoreDriverDatabase<TSchema>,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\tawait db.dialect.migrate(migrations, db.session, config);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAmC;AAGnC,eAAsB,QACrB,IACA,QACC;AACD,QAAM,iBAAa,oCAAmB,MAAM;AAC5C,QAAM,GAAG,QAAQ,QAAQ,YAAY,GAAG,SAAS,MAAM;AACxD;","names":[]}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_extends.cjs",
"module": "../../esm/_extends.js"
}
@@ -0,0 +1 @@
{"version":3,"file":"consoleEmailAdapter.d.ts","sourceRoot":"","sources":["../../src/email/consoleEmailAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAK9C,eAAO,MAAM,mBAAmB,EAAE,YAAY,CAAC,IAAI,CAUjD,CAAA"}
@@ -0,0 +1,131 @@
import { spanToJSON, _INTERNAL_safeDateNow, captureCheckIn, debug, getIsolationScope } from '@sentry/core';
import { DEBUG_BUILD } from '../common/debug-build.js';
// Attribute keys for storing cron check-in data on spans
const ATTR_SENTRY_CRON_CHECK_IN_ID = 'sentry.cron.checkInId';
const ATTR_SENTRY_CRON_MONITOR_SLUG = 'sentry.cron.monitorSlug';
const ATTR_SENTRY_CRON_START_TIME = 'sentry.cron.startTime';
const ATTR_SENTRY_CRON_SCHEDULE = 'sentry.cron.schedule';
/**
* Gets the Vercel crons configuration that was injected at build time.
*/
function getVercelCronsConfig() {
const globalWithCronsConfig = globalThis
;
if (!globalWithCronsConfig._sentryVercelCronsConfig) {
return undefined;
}
try {
return JSON.parse(globalWithCronsConfig._sentryVercelCronsConfig) ;
} catch {
DEBUG_BUILD && debug.log('[@sentry/nextjs] Failed to parse Vercel crons config');
return undefined;
}
}
/**
* Checks if the request is a Vercel cron request and starts a check-in if it matches a configured cron.
*/
function maybeStartCronCheckIn(span, route) {
const vercelCronsConfig = getVercelCronsConfig();
if (!vercelCronsConfig || !route) {
return;
}
// The strategy here is to check if the request is a Vercel cron
// request by checking the user agent, vercel always sets the user agent to 'vercel-cron/1.0'
const headers = getIsolationScope().getScopeData().sdkProcessingMetadata?.normalizedRequest?.headers
;
if (!headers) {
return;
}
const userAgent = Array.isArray(headers['user-agent']) ? headers['user-agent'][0] : headers['user-agent'];
if (!userAgent?.includes('vercel-cron')) {
return;
}
const matchedCron = vercelCronsConfig.find(cron => cron.path === route);
if (!matchedCron?.path || !matchedCron.schedule) {
return;
}
// Use raw path as monitor slug to match legacy wrapApiHandlerWithSentryVercelCrons behavior,
// so migration from automaticVercelMonitors to vercelCronsMonitoring keeps the same monitors.
const monitorSlug = matchedCron.path;
const startTime = _INTERNAL_safeDateNow() / 1000;
const checkInId = captureCheckIn(
{ monitorSlug, status: 'in_progress' },
{
maxRuntime: 60 * 12,
schedule: { type: 'crontab', value: matchedCron.schedule },
},
);
DEBUG_BUILD && debug.log(`[Cron] Started check-in for "${monitorSlug}" with ID "${checkInId}"`);
// Store marking attributes on the span so we can complete the check-in later
span.setAttribute(ATTR_SENTRY_CRON_CHECK_IN_ID, checkInId);
span.setAttribute(ATTR_SENTRY_CRON_MONITOR_SLUG, monitorSlug);
span.setAttribute(ATTR_SENTRY_CRON_START_TIME, startTime);
span.setAttribute(ATTR_SENTRY_CRON_SCHEDULE, matchedCron.schedule);
}
/**
* Completes a Vercel cron check-in when a span ends.
* Should be called from the spanEnd event handler.
*/
function maybeCompleteCronCheckIn(span) {
const spanData = spanToJSON(span).data;
const checkInId = spanData?.[ATTR_SENTRY_CRON_CHECK_IN_ID];
const monitorSlug = spanData?.[ATTR_SENTRY_CRON_MONITOR_SLUG];
const startTime = spanData?.[ATTR_SENTRY_CRON_START_TIME];
const schedule = spanData?.[ATTR_SENTRY_CRON_SCHEDULE];
if (!checkInId || !monitorSlug || typeof startTime !== 'number') {
return;
}
const duration = _INTERNAL_safeDateNow() / 1000 - startTime;
const spanStatus = spanToJSON(span).status;
// Span status is 'ok' for success, undefined for unset, or an error message like 'internal_error'
const checkInStatus = spanStatus && spanStatus !== 'ok' ? 'error' : 'ok';
// Include monitor_config for upsert in case the in_progress check-in was lost
const monitorConfig =
typeof schedule === 'string'
? {
maxRuntime: 60 * 12,
schedule: { type: 'crontab' , value: schedule },
}
: undefined;
captureCheckIn(
{
checkInId: checkInId ,
monitorSlug: monitorSlug ,
status: checkInStatus,
duration,
},
monitorConfig,
);
// Cleanup marking attributes so they don't pollute user span data
span.setAttribute(ATTR_SENTRY_CRON_CHECK_IN_ID, undefined);
span.setAttribute(ATTR_SENTRY_CRON_MONITOR_SLUG, undefined);
span.setAttribute(ATTR_SENTRY_CRON_START_TIME, undefined);
span.setAttribute(ATTR_SENTRY_CRON_SCHEDULE, undefined);
DEBUG_BUILD && debug.log(`[Cron] Completed check-in for "${monitorSlug}" with status "${checkInStatus}"`);
}
export { maybeCompleteCronCheckIn, maybeStartCronCheckIn };
//# sourceMappingURL=vercelCronsMonitoring.js.map
@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "'verlede' eeee 'om' p",
yesterday: "'gister om' p",
today: "'vandag om' p",
tomorrow: "'môre om' p",
nextWeek: "eeee 'om' p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
@@ -0,0 +1,10 @@
"use strict";
exports.addBusinessDays = void 0;
var _index = require("../addBusinessDays.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const addBusinessDays = (exports.addBusinessDays = (0, _index2.convertToFP)(
_index.addBusinessDays,
2,
));
@@ -0,0 +1,275 @@
import { expect, expectTypeOf, test } from "vitest";
import { z } from "zod/v4-mini";
test("recursion with z.lazy", () => {
const data = {
name: "I",
subcategories: [
{
name: "A",
subcategories: [
{
name: "1",
subcategories: [
{
name: "a",
subcategories: [],
},
],
},
],
},
],
};
const Category = z.object({
name: z.string(),
get subcategories(): z.ZodMiniOptional<z.ZodMiniArray<typeof Category>> {
return z.optional(z.array(Category));
},
});
Category.parse(data);
type Category = z.infer<typeof Category>;
interface _Category {
name: string;
subcategories?: _Category[];
}
expectTypeOf<Category>().toEqualTypeOf<_Category>();
});
test("recursion involving union type", () => {
const data = {
value: 1,
next: {
value: 2,
next: {
value: 3,
next: {
value: 4,
next: null,
},
},
},
};
const LL = z.object({
value: z.number(),
get next(): z.ZodMiniNullable<typeof LL> {
return z.nullable(LL);
},
});
LL.parse(data);
type LL = z.infer<typeof LL>;
type _LL = {
value: number;
next: _LL | null;
};
expectTypeOf<LL>().toEqualTypeOf<_LL>();
});
test("mutual recursion - native", () => {
const Alazy = z.object({
val: z.number(),
get b() {
return z.optional(Blazy);
},
});
const Blazy = z.object({
val: z.number(),
get a() {
return z.optional(Alazy);
},
});
const testData = {
val: 1,
b: {
val: 5,
a: {
val: 3,
b: {
val: 4,
a: {
val: 2,
b: {
val: 1,
},
},
},
},
},
};
Alazy.parse(testData);
Blazy.parse(testData.b);
type Alazy = z.infer<typeof Alazy>;
type Blazy = z.infer<typeof Blazy>;
interface _Alazy {
val: number;
b?: _Blazy | undefined;
}
interface _Blazy {
val: number;
a?: _Alazy | undefined;
}
expectTypeOf<Alazy>().toEqualTypeOf<_Alazy>();
expectTypeOf<Blazy>().toEqualTypeOf<_Blazy>();
expect(() => Alazy.parse({ val: "asdf" })).toThrow();
});
test("pick and omit with getter", () => {
const Category = z.strictObject({
name: z.string(),
get subcategories() {
return z.array(Category);
},
});
type Category = z.infer<typeof Category>;
interface _Category {
name: string;
subcategories: _Category[];
}
expectTypeOf<Category>().toEqualTypeOf<_Category>();
const PickedCategory = z.pick(Category, { name: true });
const OmittedCategory = z.omit(Category, { subcategories: true });
type PickedCategory = z.infer<typeof PickedCategory>;
type OmittedCategory = z.infer<typeof OmittedCategory>;
interface _PickedCategory {
name: string;
}
interface _OmittedCategory {
name: string;
}
expectTypeOf<PickedCategory>().toEqualTypeOf<_PickedCategory>();
expectTypeOf<OmittedCategory>().toEqualTypeOf<_OmittedCategory>();
const picked = { name: "test" };
const omitted = { name: "test" };
PickedCategory.parse(picked);
OmittedCategory.parse(omitted);
expect(() => PickedCategory.parse({ name: "test", subcategories: [] })).toThrow();
expect(() => OmittedCategory.parse({ name: "test", subcategories: [] })).toThrow();
});
test("deferred self-recursion", () => {
const Feature = z.object({
title: z.string(),
get features(): z.ZodMiniOptional<z.ZodMiniArray<typeof Feature>> {
return z.optional(z.array(Feature)); //.optional();
},
});
type Feature = z.infer<typeof Feature>;
const Output = z.object({
id: z.int(), //.nonnegative(),
name: z.string(),
features: z.array(Feature), //.array(), // <—
});
type Output = z.output<typeof Output>;
type _Feature = {
title: string;
features?: _Feature[] | undefined;
};
type _Output = {
id: number;
name: string;
features: _Feature[];
};
expectTypeOf<Feature>().toEqualTypeOf<_Feature>();
expectTypeOf<Output>().toEqualTypeOf<_Output>();
});
test("recursion compatibility", () => {
// array
const A = z.object({
get subcategories() {
return z.array(A);
},
});
// tuple
const B = z.object({
get subcategories() {
return z.tuple([B, B]);
},
});
// object
const C = z.object({
get subcategories() {
return z.object({
subcategories: C,
});
},
});
// union
const D = z.object({
get subcategories() {
return z.union([D, z.string()]);
},
});
// intersection
const E = z.object({
get subcategories() {
return z.intersection(E, E);
},
});
// record
const F = z.object({
get subcategories() {
return z.record(z.string(), F);
},
});
// map
const G = z.object({
get subcategories() {
return z.map(z.string(), G);
},
});
// set
const H = z.object({
get subcategories() {
return z.set(H);
},
});
// optional
const I = z.object({
get subcategories() {
return z.optional(I);
},
});
// nullable
const J = z.object({
get subcategories() {
return z.nullable(J);
},
});
// optional
const L = z.object({
get subcategories() {
return z.optional(L);
},
});
// nullable
const M = z.object({
get subcategories() {
return z.nullable(M);
},
});
// nonoptional
const N = z.object({
get subcategories() {
return z.nonoptional(N);
},
});
});
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { startOfWeekYear as fn } from "../startOfWeekYear.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const startOfWeekYearWithOptions = convertToFP(fn, 2);
// Fallback for modularized imports:
export default startOfWeekYearWithOptions;
@@ -0,0 +1,40 @@
import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../error.js';
const MONGODB_OBJECTID_REGEX = /*#__PURE__*/ /^[A-Fa-f0-9]{24}$/;
export const GraphQLObjectID = /*#__PURE__*/ new GraphQLScalarType({
name: 'ObjectID',
description: 'A field whose value conforms with the standard mongodb object ID as described here: https://docs.mongodb.com/manual/reference/method/ObjectId/#ObjectId. Example: 5e5677d71bdc2ae76344968c',
serialize(value) {
if (!MONGODB_OBJECTID_REGEX.test(value)) {
throw createGraphQLError(`Value is not a valid mongodb object id of form: ${value}`);
}
return value;
},
parseValue(value) {
if (!MONGODB_OBJECTID_REGEX.test(value)) {
throw createGraphQLError(`Value is not a valid mongodb object id of form: ${value}`);
}
return value;
},
parseLiteral(ast) {
if (ast.kind !== Kind.STRING) {
throw createGraphQLError(`Can only validate strings as mongodb object id but got a: ${ast.kind}`, {
nodes: [ast],
});
}
if (!MONGODB_OBJECTID_REGEX.test(ast.value)) {
throw createGraphQLError(`Value is not a valid mongodb object id of form: ${ast.value}`, {
nodes: ast,
});
}
return ast.value;
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'ObjectID',
type: 'string',
pattern: MONGODB_OBJECTID_REGEX.source,
},
},
});
@@ -0,0 +1,57 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Cache = require("../Cache");
/** @typedef {import("../Cache").Data} Data */
/** @typedef {import("../Cache").Etag} Etag */
/** @typedef {import("../Compiler")} Compiler */
class MemoryCachePlugin {
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
/** @type {Map<string, { etag: Etag | null, data: Data } | null>} */
const cache = new Map();
compiler.cache.hooks.store.tap(
{ name: "MemoryCachePlugin", stage: Cache.STAGE_MEMORY },
(identifier, etag, data) => {
cache.set(identifier, { etag, data });
}
);
compiler.cache.hooks.get.tap(
{ name: "MemoryCachePlugin", stage: Cache.STAGE_MEMORY },
(identifier, etag, gotHandlers) => {
const cacheEntry = cache.get(identifier);
if (cacheEntry === null) {
return null;
} else if (cacheEntry !== undefined) {
return cacheEntry.etag === etag ? cacheEntry.data : null;
}
gotHandlers.push((result, callback) => {
if (result === undefined) {
cache.set(identifier, null);
} else {
cache.set(identifier, { etag, data: result });
}
return callback();
});
}
);
compiler.cache.hooks.shutdown.tap(
{ name: "MemoryCachePlugin", stage: Cache.STAGE_MEMORY },
() => {
cache.clear();
}
);
}
}
module.exports = MemoryCachePlugin;
@@ -0,0 +1 @@
Prism.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.mathematica=Prism.languages.wolfram,Prism.languages.wl=Prism.languages.wolfram,Prism.languages.nb=Prism.languages.wolfram;
@@ -0,0 +1 @@
{"version":3,"file":"handleServerFunction.d.ts","sourceRoot":"","sources":["../../../src/views/List/handleServerFunction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAA;AAC1F,OAAO,KAAK,EAAyB,cAAc,EAAmB,MAAM,SAAS,CAAA;AAQrF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAC5C,sBAAsB,EACtB,OAAO,CAAC,4BAA4B,CAAC,CAqHtC,CAAA"}
@@ -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 AtSign = createLucideIcon("AtSign", [
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
["path", { d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8", key: "7n84p3" }]
]);
export { AtSign as default };
//# sourceMappingURL=at-sign.js.map
@@ -0,0 +1 @@
{"version":3,"file":"wait.d.ts","sourceRoot":"","sources":["../../src/utilities/wait.ts"],"names":[],"mappings":"AAAA,wBAAsB,IAAI,CAAC,EAAE,EAAE,MAAM,oBAIpC"}
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { nextWednesday as fn } from "../nextWednesday.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const nextWednesday = convertToFP(fn, 1);
// Fallback for modularized imports:
export default nextWednesday;
@@ -0,0 +1,49 @@
{
"name": "lines-and-columns",
"version": "1.2.4",
"description": "Maps lines and columns to character offsets and back.",
"keywords": [
"lines",
"columns",
"parser"
],
"homepage": "https://github.com/eventualbuddha/lines-and-columns#readme",
"bugs": {
"url": "https://github.com/eventualbuddha/lines-and-columns/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/eventualbuddha/lines-and-columns.git"
},
"license": "MIT",
"author": "Brian Donovan <brian@donovans.cc>",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"files": [
"build"
],
"scripts": {
"build:watch": "tsc --build tsconfig.build.json --watch",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "is-ci test:coverage test:watch",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch"
},
"devDependencies": {
"@types/jest": "^27.0.3",
"@types/node": "^16.11.9",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"esbuild": "^0.13.15",
"esbuild-runner": "^2.2.1",
"eslint": "^8.2.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"is-ci-cli": "^2.2.0",
"jest": "^27.3.1",
"prettier": "^2.4.1",
"semantic-release": "^18.0.0",
"typescript": "^4.5.2"
}
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/errors/Forbidden.ts"],"sourcesContent":["import type { TFunction } from '@payloadcms/translations'\n\nimport { en } from '@payloadcms/translations/languages/en'\nimport { status as httpStatus } from 'http-status'\n\nimport { APIError } from './APIError.js'\n\nexport class Forbidden extends APIError {\n constructor(t?: TFunction) {\n super(\n t ? t('error:notAllowedToPerformAction') : en.translations.error.notAllowedToPerformAction,\n httpStatus.FORBIDDEN,\n )\n }\n}\n"],"names":["en","status","httpStatus","APIError","Forbidden","t","translations","error","notAllowedToPerformAction","FORBIDDEN"],"mappings":"AAEA,SAASA,EAAE,QAAQ,wCAAuC;AAC1D,SAASC,UAAUC,UAAU,QAAQ,cAAa;AAElD,SAASC,QAAQ,QAAQ,gBAAe;AAExC,OAAO,MAAMC,kBAAkBD;IAC7B,YAAYE,CAAa,CAAE;QACzB,KAAK,CACHA,IAAIA,EAAE,qCAAqCL,GAAGM,YAAY,CAACC,KAAK,CAACC,yBAAyB,EAC1FN,WAAWO,SAAS;IAExB;AACF"}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/browser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { InstrumentationBase } from './instrumentation';\nexport { normalize } from './noop-normalize';\n"]}
@@ -0,0 +1,11 @@
import type { I18nClient } from '@payloadcms/translations';
import type { ClientConfig, ClientFieldSchemaMap, FieldSchemaMap, Payload } from 'payload';
export declare const getClientSchemaMap: (args: {
collectionSlug?: string;
config: ClientConfig;
globalSlug?: string;
i18n: I18nClient;
payload: Payload;
schemaMap: FieldSchemaMap;
}) => ClientFieldSchemaMap;
//# sourceMappingURL=getClientSchemaMap.d.ts.map
@@ -0,0 +1,250 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const path = require("path");
const CHAR_HASH = "#".charCodeAt(0);
const CHAR_SLASH = "/".charCodeAt(0);
const CHAR_BACKSLASH = "\\".charCodeAt(0);
const CHAR_A = "A".charCodeAt(0);
const CHAR_Z = "Z".charCodeAt(0);
const CHAR_LOWER_A = "a".charCodeAt(0);
const CHAR_LOWER_Z = "z".charCodeAt(0);
const CHAR_DOT = ".".charCodeAt(0);
const CHAR_COLON = ":".charCodeAt(0);
const posixNormalize = path.posix.normalize;
const winNormalize = path.win32.normalize;
/**
* @enum {number}
*/
const PathType = Object.freeze({
Empty: 0,
Normal: 1,
Relative: 2,
AbsoluteWin: 3,
AbsolutePosix: 4,
Internal: 5,
});
const deprecatedInvalidSegmentRegEx =
/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i;
const invalidSegmentRegEx =
/(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i;
/**
* @param {string} maybePath a path
* @returns {PathType} type of path
*/
const getType = (maybePath) => {
switch (maybePath.length) {
case 0:
return PathType.Empty;
case 1: {
const c0 = maybePath.charCodeAt(0);
switch (c0) {
case CHAR_DOT:
return PathType.Relative;
case CHAR_SLASH:
return PathType.AbsolutePosix;
case CHAR_HASH:
return PathType.Internal;
}
return PathType.Normal;
}
case 2: {
const c0 = maybePath.charCodeAt(0);
switch (c0) {
case CHAR_DOT: {
const c1 = maybePath.charCodeAt(1);
switch (c1) {
case CHAR_DOT:
case CHAR_SLASH:
return PathType.Relative;
}
return PathType.Normal;
}
case CHAR_SLASH:
return PathType.AbsolutePosix;
case CHAR_HASH:
return PathType.Internal;
}
const c1 = maybePath.charCodeAt(1);
if (
c1 === CHAR_COLON &&
((c0 >= CHAR_A && c0 <= CHAR_Z) ||
(c0 >= CHAR_LOWER_A && c0 <= CHAR_LOWER_Z))
) {
return PathType.AbsoluteWin;
}
return PathType.Normal;
}
}
const c0 = maybePath.charCodeAt(0);
switch (c0) {
case CHAR_DOT: {
const c1 = maybePath.charCodeAt(1);
switch (c1) {
case CHAR_SLASH:
return PathType.Relative;
case CHAR_DOT: {
const c2 = maybePath.charCodeAt(2);
if (c2 === CHAR_SLASH) return PathType.Relative;
return PathType.Normal;
}
}
return PathType.Normal;
}
case CHAR_SLASH:
return PathType.AbsolutePosix;
case CHAR_HASH:
return PathType.Internal;
}
const c1 = maybePath.charCodeAt(1);
if (c1 === CHAR_COLON) {
const c2 = maybePath.charCodeAt(2);
if (
(c2 === CHAR_BACKSLASH || c2 === CHAR_SLASH) &&
((c0 >= CHAR_A && c0 <= CHAR_Z) ||
(c0 >= CHAR_LOWER_A && c0 <= CHAR_LOWER_Z))
) {
return PathType.AbsoluteWin;
}
}
return PathType.Normal;
};
/**
* @param {string} maybePath a path
* @returns {string} the normalized path
*/
const normalize = (maybePath) => {
switch (getType(maybePath)) {
case PathType.Empty:
return maybePath;
case PathType.AbsoluteWin:
return winNormalize(maybePath);
case PathType.Relative: {
const r = posixNormalize(maybePath);
return getType(r) === PathType.Relative ? r : `./${r}`;
}
}
return posixNormalize(maybePath);
};
/**
* @param {string} rootPath the root path
* @param {string | undefined} request the request path
* @returns {string} the joined path
*/
const join = (rootPath, request) => {
if (!request) return normalize(rootPath);
const requestType = getType(request);
switch (requestType) {
case PathType.AbsolutePosix:
return posixNormalize(request);
case PathType.AbsoluteWin:
return winNormalize(request);
}
switch (getType(rootPath)) {
case PathType.Normal:
case PathType.Relative:
case PathType.AbsolutePosix:
return posixNormalize(`${rootPath}/${request}`);
case PathType.AbsoluteWin:
return winNormalize(`${rootPath}\\${request}`);
}
switch (requestType) {
case PathType.Empty:
return rootPath;
case PathType.Relative: {
const r = posixNormalize(rootPath);
return getType(r) === PathType.Relative ? r : `./${r}`;
}
}
return posixNormalize(rootPath);
};
/**
* @param {string} maybePath a path
* @returns {string} the directory name
*/
const dirname = (maybePath) => {
switch (getType(maybePath)) {
case PathType.AbsoluteWin:
return path.win32.dirname(maybePath);
}
return path.posix.dirname(maybePath);
};
/** @type {Map<string, Map<string, string | undefined>>} */
const joinCache = new Map();
/**
* @param {string} rootPath the root path
* @param {string} request the request path
* @returns {string} the joined path
*/
const cachedJoin = (rootPath, request) => {
/** @type {string | undefined} */
let cacheEntry;
let cache = joinCache.get(rootPath);
if (cache === undefined) {
joinCache.set(rootPath, (cache = new Map()));
} else {
cacheEntry = cache.get(request);
if (cacheEntry !== undefined) return cacheEntry;
}
cacheEntry = join(rootPath, request);
cache.set(request, cacheEntry);
return cacheEntry;
};
/** @type {Map<string, string>} */
const dirnameCache = new Map();
/**
* @param {string} maybePath a path
* @returns {string} the directory name
*/
const cachedDirname = (maybePath) => {
const cacheEntry = dirnameCache.get(maybePath);
if (cacheEntry !== undefined) return cacheEntry;
const result = dirname(maybePath);
dirnameCache.set(maybePath, result);
return result;
};
/**
* Check if childPath is a subdirectory of parentPath
* @param {string} parentPath parent directory path
* @param {string} childPath child path to check
* @returns {boolean} true if childPath is under parentPath
*/
const isSubPath = (parentPath, childPath) => {
// Ensure parentPath ends with a separator to avoid false matches
// e.g., "/app" shouldn't match "/app-other"
const parentWithSlash =
parentPath.endsWith("/") || parentPath.endsWith("\\")
? parentPath
: normalize(`${parentPath}/`);
return childPath.startsWith(parentWithSlash);
};
module.exports.PathType = PathType;
module.exports.cachedDirname = cachedDirname;
module.exports.cachedJoin = cachedJoin;
module.exports.deprecatedInvalidSegmentRegEx = deprecatedInvalidSegmentRegEx;
module.exports.dirname = dirname;
module.exports.getType = getType;
module.exports.invalidSegmentRegEx = invalidSegmentRegEx;
module.exports.isSubPath = isSubPath;
module.exports.join = join;
module.exports.normalize = normalize;
@@ -0,0 +1 @@
{"version":3,"file":"useResize.js","names":["c","_c","useEffect","useState","useResize","element","$","size","setSize","t0","t1","observer","entries","forEach","entry","contentBoxSize","contentRect","newWidth","newHeight","newSize","Array","isArray","blockSize","inlineSize","height","width","observe","unobserve","t2"],"sources":["../../src/hooks/useResize.ts"],"sourcesContent":["'use client'\n\nimport { useEffect, useState } from 'react'\n\ninterface Size {\n height: number\n width: number\n}\n\ninterface Resize {\n size?: Size\n}\n\nexport const useResize = (element: HTMLElement): Resize => {\n const [size, setSize] = useState<Size>()\n\n useEffect(() => {\n let observer: any // eslint-disable-line\n\n if (element) {\n observer = new ResizeObserver((entries) => {\n entries.forEach((entry) => {\n const {\n contentBoxSize,\n contentRect, // for Safari iOS compatibility, will be deprecated eventually (see https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserverEntry/contentRect)\n } = entry\n\n let newWidth = 0\n let newHeight = 0\n\n if (contentBoxSize) {\n const newSize = Array.isArray(contentBoxSize) ? contentBoxSize[0] : contentBoxSize\n\n if (newSize) {\n const { blockSize, inlineSize } = newSize\n newWidth = inlineSize\n newHeight = blockSize\n }\n } else if (contentRect) {\n // see note above for why this block is needed\n const { height, width } = contentRect\n newWidth = width\n newHeight = height\n }\n\n setSize({\n height: newHeight,\n width: newWidth,\n })\n })\n })\n\n observer.observe(element)\n }\n\n return () => {\n if (observer) {\n observer.unobserve(element)\n }\n }\n }, [element])\n\n return {\n size,\n }\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;AAEA,SAASC,SAAS,EAAEC,QAAQ,QAAQ;AAWpC,OAAO,MAAMC,SAAA,GAAYC,OAAA;EAAA,MAAAC,CAAA,GAAAL,EAAA;EACvB,OAAAM,IAAA,EAAAC,OAAA,IAAwBL,QAAA;EAAA,IAAAM,EAAA;EAAA,IAAAC,EAAA;EAAA,IAAAJ,CAAA,QAAAD,OAAA;IAEdI,EAAA,GAAAA,CAAA;MACJE,GAAA,CAAAA,QAAA;MAAc,IAEdN,OAAA;QACFM,QAAA,CAAAA,CAAA,CAAAA,GAAA,CAAAA,sBAAA,CAAAA,EAAA,CAAAA;UACEC,OAAA,CAAAC,OAAA,CAAAC,KAAA;YACE;cAAAC,cAAA;cAAAC;YAAA,IAGIF,KAAA;YAEJ,IAAAG,QAAA;YACA,IAAAC,SAAA;YAAgB,IAEZH,cAAA;cACF,MAAAI,OAAA,GAAgBC,KAAA,CAAAC,OAAA,CAAcN,cAAA,IAAkBA,cAAc,MAAMA,cAAA;cAAA,IAEhEI,OAAA;gBACF;kBAAAG,SAAA;kBAAAC;gBAAA,IAAkCJ,OAAA;gBAClCF,QAAA,CAAAA,CAAA,CAAWM,UAAA;gBACXL,SAAA,CAAAA,CAAA,CAAYI,SAAA;cAAZ;YAAA;cAAA,IAEON,WAAA;gBAET;kBAAAQ,MAAA;kBAAAC;gBAAA,IAA0BT,WAAA;gBAC1BC,QAAA,CAAAA,CAAA,CAAWQ,KAAA;gBACXP,SAAA,CAAAA,CAAA,CAAYM,MAAA;cAAZ;YAAA;YAGFhB,OAAA;cAAAgB,MAAA,EACUN,SAAA;cAAAO,KAAA,EACDR;YAAA,CACT;UAAA,CACF;QAAA;QAGFN,QAAA,CAAAe,OAAA,CAAiBrB,OAAA;MAAA;MAAA;QAAA,IAIbM,QAAA;UACFA,QAAA,CAAAgB,SAAA,CAAmBtB,OAAA;QAAA;MAAA;IAAA;IAGtBK,EAAA,IAACL,OAAA;IAAQC,CAAA,MAAAD,OAAA;IAAAC,CAAA,MAAAG,EAAA;IAAAH,CAAA,MAAAI,EAAA;EAAA;IAAAD,EAAA,GAAAH,CAAA;IAAAI,EAAA,GAAAJ,CAAA;EAAA;EA5CZJ,SAAA,CAAUO,EA4CV,EAAGC,EAAS;EAAA,IAAAkB,EAAA;EAAA,IAAAtB,CAAA,QAAAC,IAAA;IAELqB,EAAA;MAAArB;IAAA;IAEPD,CAAA,MAAAC,IAAA;IAAAD,CAAA,MAAAsB,EAAA;EAAA;IAAAA,EAAA,GAAAtB,CAAA;EAAA;EAAA,OAFOsB,EAEP;AAAA,CACF","ignoreList":[]}
@@ -0,0 +1,2 @@
const e=(e,t)=>()=>({path:`/panels`,params:t??{},body:JSON.stringify(e),method:`POST`}),t=(e,t)=>()=>({path:`/panels`,params:t??{},body:JSON.stringify(e),method:`POST`});export{t as createPanel,e as createPanels};
//# sourceMappingURL=panels.js.map
@@ -0,0 +1,5 @@
export declare const previousDay: import("./types.js").FPFn2<
Date,
import("../fp.js").Day,
import("../fp.js").DateArg<Date>
>;
@@ -0,0 +1,157 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { ChevronIcon } from '../../../../icons/Chevron/index.js';
import { ExternalLinkIcon } from '../../../../icons/ExternalLink/index.js';
import { XIcon } from '../../../../icons/X/index.js';
import { useLivePreviewContext } from '../../../../providers/LivePreview/context.js';
import { useTranslation } from '../../../../providers/Translation/index.js';
import { Popup, PopupList } from '../../../Popup/index.js';
import { PreviewFrameSizeInput } from '../SizeInput/index.js';
import './index.scss';
const baseClass = 'live-preview-toolbar-controls';
const zoomOptions = [50, 75, 100, 125, 150, 200];
export const ToolbarControls = () => {
const $ = _c(14);
const {
breakpoint,
breakpoints,
setBreakpoint,
setPreviewWindowType,
setZoom,
url,
zoom
} = useLivePreviewContext();
const {
t
} = useTranslation();
let t0;
if ($[0] !== breakpoint || $[1] !== breakpoints || $[2] !== setBreakpoint || $[3] !== setPreviewWindowType || $[4] !== setZoom || $[5] !== t || $[6] !== url || $[7] !== zoom) {
const customOption = {
label: t("general:custom"),
value: "custom"
};
let t2;
if ($[9] !== setZoom || $[10] !== zoom) {
t2 = t3 => {
const {
close: close_0
} = t3;
return _jsx(PopupList.ButtonGroup, {
children: _jsx(React.Fragment, {
children: zoomOptions.map(zoomValue => _jsxs(PopupList.Button, {
active: zoom * 100 == zoomValue,
onClick: () => {
setZoom(zoomValue / 100);
close_0();
},
children: [zoomValue, "%"]
}, zoomValue))
})
});
};
$[9] = setZoom;
$[10] = zoom;
$[11] = t2;
} else {
t2 = $[11];
}
let t3;
if ($[12] !== setPreviewWindowType) {
t3 = e => {
e.preventDefault();
setPreviewWindowType("popup");
};
$[12] = setPreviewWindowType;
$[13] = t3;
} else {
t3 = $[13];
}
t0 = _jsxs("div", {
className: baseClass,
children: [breakpoints?.length > 0 && _jsx(Popup, {
button: _jsxs(React.Fragment, {
children: [_jsx("span", {
children: breakpoints.find(bp => bp.name == breakpoint)?.label ?? customOption.label
}), _jsx(ChevronIcon, {
className: `${baseClass}__chevron`
})]
}),
className: `${baseClass}__breakpoint`,
horizontalAlign: "right",
render: t1 => {
const {
close
} = t1;
return _jsx(PopupList.ButtonGroup, {
children: _jsxs(React.Fragment, {
children: [breakpoints.map(bp_0 => _jsx(PopupList.Button, {
active: bp_0.name == breakpoint,
onClick: () => {
setBreakpoint(bp_0.name);
close();
},
children: bp_0.label
}, bp_0.name)), breakpoint === "custom" && _jsx(PopupList.Button, {
active: breakpoint == customOption.value,
onClick: () => {
setBreakpoint(customOption.value);
close();
},
children: customOption.label
})]
})
});
},
showScrollbar: true,
verticalAlign: "bottom"
}), _jsxs("div", {
className: `${baseClass}__device-size`,
children: [_jsx(PreviewFrameSizeInput, {
axis: "x"
}), _jsx("span", {
className: `${baseClass}__size-divider`,
children: _jsx(XIcon, {})
}), _jsx(PreviewFrameSizeInput, {
axis: "y"
})]
}), _jsx(Popup, {
button: _jsxs(React.Fragment, {
children: [_jsxs("span", {
children: [zoom * 100, "%"]
}), _jsx(ChevronIcon, {
className: `${baseClass}__chevron`
})]
}),
className: `${baseClass}__zoom`,
horizontalAlign: "right",
render: t2,
showScrollbar: true,
verticalAlign: "bottom"
}), _jsx("a", {
className: `${baseClass}__external`,
href: url,
onClick: t3,
target: "_blank",
title: "Open in new window",
type: "button",
children: _jsx(ExternalLinkIcon, {})
})]
});
$[0] = breakpoint;
$[1] = breakpoints;
$[2] = setBreakpoint;
$[3] = setPreviewWindowType;
$[4] = setZoom;
$[5] = t;
$[6] = url;
$[7] = zoom;
$[8] = t0;
} else {
t0 = $[8];
}
return t0;
};
//# sourceMappingURL=index.js.map
@@ -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","132":"N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"9 0C VC J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"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","132":"4B 5B WC"},E:{"1":"B C L M G PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D E F A 6C bC 7C 8C 9C AD","132":"cC"},F:{"1":"0 1 2 3 4 5 6 7 8 uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB JD KD LD MD PC xC ND QC","132":"rB sB tB"},G:{"1":"XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD TD UD VD","132":"WD"},H:{"2":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D A"},K:{"1":"H","2":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB wD xD cC yD zD 0D 1D 2D SC TC UC 3D","2":"J tD uD","132":"vD"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"7D","132":"6D"}},B:5,C:"CSS justify-content: space-evenly",D:true};
@@ -0,0 +1,11 @@
/**
* List of all filenames to detect as a Payload configuration file.
*/
export declare const payloadConfigFileNames: string[];
/**
* Searches for a Payload configuration file.
* @returns The absolute path to the Payload configuration file.
* @throws An error if no configuration file is found.
*/
export declare const findConfig: () => string;
//# sourceMappingURL=find.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/sql/expressions/select.ts"],"sourcesContent":["import type { AnyColumn } from '../../column.ts';\nimport type { SQL, SQLWrapper } from '../sql.ts';\nimport { sql } from '../sql.ts';\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in ascending\n * order. By the SQL standard, ascending order is the\n * default, so it is not usually necessary to specify\n * ascending sort order.\n *\n * ## Examples\n *\n * ```ts\n * // Return cars, starting with the oldest models\n * // and going in ascending order to the newest.\n * db.select().from(cars)\n * .orderBy(asc(cars.year));\n * ```\n *\n * @see desc to sort in descending order\n */\nexport function asc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} asc`;\n}\n\n/**\n * Used in sorting, this specifies that the given\n * column or expression should be sorted in descending\n * order.\n *\n * ## Examples\n *\n * ```ts\n * // Select users, with the most recently created\n * // records coming first.\n * db.select().from(users)\n * .orderBy(desc(users.createdAt));\n * ```\n *\n * @see asc to sort in ascending order\n */\nexport function desc(column: AnyColumn | SQLWrapper): SQL {\n\treturn sql`${column} desc`;\n}\n"],"mappings":"AAEA,SAAS,WAAW;AAoBb,SAAS,IAAI,QAAqC;AACxD,SAAO,MAAM,MAAM;AACpB;AAkBO,SAAS,KAAK,QAAqC;AACzD,SAAO,MAAM,MAAM;AACpB;","names":[]}
@@ -0,0 +1,5 @@
export { default as payloadFavicon } from './payload-favicon.svg';
export { default as payloadFaviconDark } from './payload-favicon-dark.png';
export { default as payloadFaviconLight } from './payload-favicon-light.png';
export { default as staticOGImage } from './static-og-image.png';
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"layers.js","sources":["../../../src/icons/layers.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Layers\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTIuODMgMi4xOGEyIDIgMCAwIDAtMS42NiAwTDIuNiA2LjA4YTEgMSAwIDAgMCAwIDEuODNsOC41OCAzLjkxYTIgMiAwIDAgMCAxLjY2IDBsOC41OC0zLjlhMSAxIDAgMCAwIDAtMS44M1oiIC8+CiAgPHBhdGggZD0ibTIyIDE3LjY1LTkuMTcgNC4xNmEyIDIgMCAwIDEtMS42NiAwTDIgMTcuNjUiIC8+CiAgPHBhdGggZD0ibTIyIDEyLjY1LTkuMTcgNC4xNmEyIDIgMCAwIDEtMS42NiAwTDIgMTIuNjUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/layers\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 Layers = createLucideIcon('Layers', [\n [\n 'path',\n {\n d: 'm12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z',\n key: '8b97xw',\n },\n ],\n ['path', { d: 'm22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65', key: 'dd6zsq' }],\n ['path', { d: 'm22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65', key: 'ep9fru' }],\n]);\n\nexport default Layers;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,28 @@
/**
* @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 Ribbon = createLucideIcon("Ribbon", [
[
"path",
{ d: "M12 11.22C11 9.997 10 9 10 8a2 2 0 0 1 4 0c0 1-.998 2.002-2.01 3.22", key: "1rnhq3" }
],
["path", { d: "m12 18 2.57-3.5", key: "116vt7" }],
["path", { d: "M6.243 9.016a7 7 0 0 1 11.507-.009", key: "10dq0b" }],
["path", { d: "M9.35 14.53 12 11.22", key: "tdsyp2" }],
[
"path",
{
d: "M9.35 14.53C7.728 12.246 6 10.221 6 7a6 5 0 0 1 12 0c-.005 3.22-1.778 5.235-3.43 7.5l3.557 4.527a1 1 0 0 1-.203 1.43l-1.894 1.36a1 1 0 0 1-1.384-.215L12 18l-2.679 3.593a1 1 0 0 1-1.39.213l-1.865-1.353a1 1 0 0 1-.203-1.422z",
key: "nmifey"
}
]
]);
export { Ribbon as default };
//# sourceMappingURL=ribbon.js.map
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Spade = createLucideIcon("Spade", [
[
"path",
{
d: "M5 9c-1.5 1.5-3 3.2-3 5.5A5.5 5.5 0 0 0 7.5 20c1.8 0 3-.5 4.5-2 1.5 1.5 2.7 2 4.5 2a5.5 5.5 0 0 0 5.5-5.5c0-2.3-1.5-4-3-5.5l-7-7-7 7Z",
key: "40bo9n"
}
],
["path", { d: "M12 18v4", key: "jadmvz" }]
]);
export { Spade as default };
//# sourceMappingURL=spade.js.map
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1,8 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { areIntervalsOverlapping as fn } from "../areIntervalsOverlapping.mjs";
import { convertToFP } from "./_lib/convertToFP.mjs";
export const areIntervalsOverlappingWithOptions = convertToFP(fn, 3);
// Fallback for modularized imports:
export default areIntervalsOverlappingWithOptions;
@@ -0,0 +1 @@
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../src/fields/Group/provider.tsx"],"names":[],"mappings":"AACA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAEjD,eAAO,MAAM,YAAY,wBAAuB,CAAA;AAEhD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAA;CAAE,CAKzF,CAAA;AAED,eAAO,MAAM,QAAQ,QAAO,OAA4B,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"timer.js","sources":["../../../src/utils/timer.ts"],"sourcesContent":["/**\n * Calls `unref` on a timer, if the method is available on @param timer.\n *\n * `unref()` is used to allow processes to exit immediately, even if the timer\n * is still running and hasn't resolved yet.\n *\n * Use this in places where code can run on browser or server, since browsers\n * do not support `unref`.\n */\nexport function safeUnref(timer: ReturnType<typeof setTimeout>): ReturnType<typeof setTimeout> {\n if (typeof timer === 'object' && typeof timer.unref === 'function') {\n timer.unref();\n }\n return timer;\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,CAAC,KAAK,EAAgE;AAC/F,EAAE,IAAI,OAAO,KAAA,KAAU,QAAA,IAAY,OAAO,KAAK,CAAC,KAAA,KAAU,UAAU,EAAE;AACtE,IAAI,KAAK,CAAC,KAAK,EAAE;AACjB,EAAE;AACF,EAAE,OAAO,KAAK;AACd;;;;"}
@@ -0,0 +1,11 @@
export * as core from "../core/index.cjs";
export * from "./parse.cjs";
export * from "./schemas.cjs";
export * from "./checks.cjs";
export type { infer, output, input } from "../core/index.cjs";
export { globalRegistry, registry, config, $output, $input, $brand, function, clone, regexes, treeifyError, prettifyError, formatError, flattenError, toJSONSchema, TimePrecision, NEVER, } from "../core/index.cjs";
export * as locales from "../locales/index.cjs";
/** A special constant with type `never` */
export * as iso from "./iso.cjs";
export { ZodMiniISODateTime, ZodMiniISODate, ZodMiniISOTime, ZodMiniISODuration, } from "./iso.cjs";
export * as coerce from "./coerce.cjs";
@@ -0,0 +1,134 @@
@import '../../../scss/styles.scss';
@layer payload-default {
.file-details {
background: var(--theme-elevation-50);
border: 1px solid var(--theme-border-color);
border-radius: var(--style-radius-m);
@include inputShadow;
header {
display: flex;
flex-direction: row;
flex-wrap: wrap;
position: relative;
}
&__remove {
position: absolute;
margin: 0;
top: $baseline;
right: $baseline;
& .btn__icon {
border: 1px solid var(--theme-border-color);
background: var(--theme-input-bg);
@include inputShadow;
transition: border 100ms cubic-bezier(0, 0.2, 0.2, 1);
&:hover {
border: 1px solid var(--theme-elevation-400);
}
}
}
&__main-detail {
padding: var(--base) calc(var(--base) * 1.2);
width: auto;
flex-grow: 1;
min-width: 280px;
max-width: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
align-self: stretch;
gap: calc(var(--base) * 0.2);
}
&__toggle-more-info {
font-weight: 600;
text-decoration: none;
&:hover,
&:focus-visible {
text-decoration: underline;
}
}
&__toggle-icon {
padding: calc(var(--base) / 4);
}
&__sizes {
margin: 0;
padding: calc(var(--base) * 1.5) $baseline 0;
list-style: none;
display: flex;
flex-wrap: wrap;
li {
width: 50%;
padding: 0 calc(var(--base) * 0.5);
margin-bottom: $baseline;
}
}
&__size-label {
color: var(--theme-elevation-400);
}
&__file-mutation {
display: flex;
margin-top: calc(var(--base) * 0.25);
gap: calc(var(--base) / 2);
}
&__edit {
cursor: pointer;
background-color: var(--theme-elevation-150);
border: none;
border-radius: $style-radius-m;
padding: calc(var(--base) * 0.25) calc(var(--base) * 0.5);
&:hover {
background-color: var(--theme-elevation-100);
}
}
@include large-break {
&__main-detail {
padding: $baseline;
}
&__sizes {
display: block;
padding: $baseline $baseline calc(var(--base) * 0.5);
li {
padding: 0;
width: 100%;
}
}
}
@include mid-break {
header {
flex-wrap: wrap;
}
.thumbnail {
width: 50%;
order: 1;
}
&__remove {
order: 2;
}
&__main-detail {
order: 3;
width: 100%;
}
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"detect-resources.js","sourceRoot":"","sources":["../../src/detect-resources.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4CAA0C;AAE1C,iDAA6E;AAG7E;;;;GAIG;AACI,MAAM,eAAe,GAAG,CAC7B,SAAkC,EAAE,EAC1B,EAAE;IACZ,MAAM,SAAS,GAAe,CAAC,MAAM,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QAC7D,IAAI;YACF,MAAM,QAAQ,GAAG,IAAA,2CAA4B,EAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YAChE,UAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,IAAI,kBAAkB,EAAE,QAAQ,CAAC,CAAC;YAC9D,OAAO,QAAQ,CAAC;SACjB;QAAC,OAAO,CAAC,EAAE;YACV,UAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,WAAW,CAAC,IAAI,YAAY,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;YACzD,OAAO,IAAA,4BAAa,GAAE,CAAC;SACxB;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,SAAS,CAAC,MAAM,CACrB,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAC,EACtC,IAAA,4BAAa,GAAE,CAChB,CAAC;AACJ,CAAC,CAAC;AAlBW,QAAA,eAAe,mBAkB1B","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { diag } from '@opentelemetry/api';\nimport { Resource } from './Resource';\nimport { emptyResource, resourceFromDetectedResource } from './ResourceImpl';\nimport { ResourceDetectionConfig } from './config';\n\n/**\n * Runs all resource detectors and returns the results merged into a single Resource.\n *\n * @param config Configuration for resource detection\n */\nexport const detectResources = (\n config: ResourceDetectionConfig = {}\n): Resource => {\n const resources: Resource[] = (config.detectors || []).map(d => {\n try {\n const resource = resourceFromDetectedResource(d.detect(config));\n diag.debug(`${d.constructor.name} found resource.`, resource);\n return resource;\n } catch (e) {\n diag.debug(`${d.constructor.name} failed: ${e.message}`);\n return emptyResource();\n }\n });\n\n return resources.reduce(\n (acc, resource) => acc.merge(resource),\n emptyResource()\n );\n};\n"]}
@@ -0,0 +1 @@
{"version":3,"file":"az.d.ts","sourceRoot":"","sources":["../../../src/exports/i18n/az.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,uCAAuC,CAAA"}
@@ -0,0 +1,10 @@
var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice);
/**
* Collects all child nodes of an element.
*
* @param node the node
*/
export default function childNodes(node) {
return node ? toArray(node.childNodes) : [];
}

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