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,23 @@
/**
* @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 LibraryBig = createLucideIcon("LibraryBig", [
["rect", { width: "8", height: "18", x: "3", y: "3", rx: "1", key: "oynpb5" }],
["path", { d: "M7 3v18", key: "bbkbws" }],
[
"path",
{
d: "M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",
key: "1qboyk"
}
]
]);
export { LibraryBig as default };
//# sourceMappingURL=library-big.js.map
@@ -0,0 +1 @@
{"version":3,"file":"errorCapture.js","sources":["../../../../src/integrations/mcp-server/errorCapture.ts"],"sourcesContent":["/**\n * Safe error capture utilities for MCP server instrumentation\n *\n * Ensures error reporting never interferes with MCP server operation.\n * All capture operations are wrapped in try-catch to prevent side effects.\n */\n\nimport { getClient } from '../../currentScopes';\nimport { captureException } from '../../exports';\nimport { SPAN_STATUS_ERROR } from '../../tracing';\nimport { getActiveSpan } from '../../utils/spanUtils';\nimport type { McpErrorType } from './types';\n\n/**\n * Captures an error without affecting MCP server operation.\n *\n * The active span already contains all MCP context (method, tool, arguments, etc.)\n * @param error - Error to capture\n * @param errorType - Classification of error type for filtering\n * @param extraData - Additional context data to include\n */\nexport function captureError(error: Error, errorType?: McpErrorType, extraData?: Record<string, unknown>): void {\n try {\n const client = getClient();\n if (!client) {\n return;\n }\n\n const activeSpan = getActiveSpan();\n if (activeSpan?.isRecording()) {\n activeSpan.setStatus({\n code: SPAN_STATUS_ERROR,\n message: 'internal_error',\n });\n }\n\n captureException(error, {\n mechanism: {\n type: 'auto.ai.mcp_server',\n handled: false,\n data: {\n error_type: errorType || 'handler_execution',\n ...extraData,\n },\n },\n });\n } catch {\n // noop\n }\n}\n"],"names":["getClient","getActiveSpan","SPAN_STATUS_ERROR","captureException"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,YAAY,CAAC,KAAK,EAAS,SAAS,EAAiB,SAAS,EAAkC;AAChH,EAAE,IAAI;AACN,IAAI,MAAM,MAAA,GAASA,uBAAS,EAAE;AAC9B,IAAI,IAAI,CAAC,MAAM,EAAE;AACjB,MAAM;AACN,IAAI;;AAEJ,IAAI,MAAM,UAAA,GAAaC,uBAAa,EAAE;AACtC,IAAI,IAAI,UAAU,EAAE,WAAW,EAAE,EAAE;AACnC,MAAM,UAAU,CAAC,SAAS,CAAC;AAC3B,QAAQ,IAAI,EAAEC,4BAAiB;AAC/B,QAAQ,OAAO,EAAE,gBAAgB;AACjC,OAAO,CAAC;AACR,IAAI;;AAEJ,IAAIC,yBAAgB,CAAC,KAAK,EAAE;AAC5B,MAAM,SAAS,EAAE;AACjB,QAAQ,IAAI,EAAE,oBAAoB;AAClC,QAAQ,OAAO,EAAE,KAAK;AACtB,QAAQ,IAAI,EAAE;AACd,UAAU,UAAU,EAAE,SAAA,IAAa,mBAAmB;AACtD,UAAU,GAAG,SAAS;AACtB,SAAS;AACT,OAAO;AACP,KAAK,CAAC;AACN,EAAE,EAAE,MAAM;AACV;AACA,EAAE;AACF;;;;"}
@@ -0,0 +1,36 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var query_builder_exports = {};
__export(query_builder_exports, {
TypedQueryBuilder: () => TypedQueryBuilder
});
module.exports = __toCommonJS(query_builder_exports);
var import_entity = require("../entity.cjs");
class TypedQueryBuilder {
static [import_entity.entityKind] = "TypedQueryBuilder";
/** @internal */
getSelectedFields() {
return this._.selectedFields;
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
TypedQueryBuilder
});
//# sourceMappingURL=query-builder.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"image-play.js","sources":["../../../src/icons/image-play.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ImagePlay\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTEgMTYtNSA1IiAvPgogIDxwYXRoIGQ9Ik0xMSAyMUg1YTIgMiAwIDAgMS0yLTJWNWEyIDIgMCAwIDEgMi0yaDE0YTIgMiAwIDAgMSAyIDJ2Ni41IiAvPgogIDxwYXRoIGQ9Ik0xNS43NjUgMjJhLjUuNSAwIDAgMS0uNzY1LS40MjRWMTMuMzhhLjUuNSAwIDAgMSAuNzY1LS40MjRsNS44NzggMy42NzRhMSAxIDAgMCAxIDAgMS42OTZ6IiAvPgogIDxjaXJjbGUgY3g9IjkiIGN5PSI5IiByPSIyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/image-play\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 ImagePlay = createLucideIcon('ImagePlay', [\n ['path', { d: 'm11 16-5 5', key: 'j5f7ct' }],\n ['path', { d: 'M11 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6.5', key: '7s81lt' }],\n [\n 'path',\n {\n d: 'M15.765 22a.5.5 0 0 1-.765-.424V13.38a.5.5 0 0 1 .765-.424l5.878 3.674a1 1 0 0 1 0 1.696z',\n key: '1omb6s',\n },\n ],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n]);\n\nexport default ImagePlay;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5F,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;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,CACA,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACxD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,54 @@
import { DirectusPermission } from "../../../schema/permission.cjs";
import { AllCollections } from "../../../types/schema.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/read/permissions.d.ts
type ReadPermissionOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusPermission<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
type ReadItemPermissionsOutput = {
update: {
access: boolean;
presets?: Record<string, any> | null;
fields?: string[] | null;
};
delete: {
access: boolean;
};
share: {
access: boolean;
};
};
type ReadUserPermissionsOutput = Record<string, Record<'create' | 'update' | 'delete' | 'read' | 'share', {
access: 'none' | 'partial' | 'full';
fields?: string[];
presets?: Record<string, any>;
}>>;
/**
* List all Permissions that exist in Directus.
* @param query The query parameters
* @returns An array of up to limit Permission objects. If no items are available, data will be an empty array.
*/
declare const readPermissions: <Schema, const TQuery extends Query<Schema, DirectusPermission<Schema>>>(query?: TQuery) => RestCommand<ReadPermissionOutput<Schema, TQuery>[], Schema>;
/**
* List all Permissions that exist in Directus.
* @param key The primary key of the permission
* @param query The query parameters
* @returns Returns a Permission object if a valid primary key was provided.
* @throws Will throw if key is empty
*/
declare const readPermission: <Schema, const TQuery extends Query<Schema, DirectusPermission<Schema>>>(key: DirectusPermission<Schema>["id"], query?: TQuery) => RestCommand<ReadPermissionOutput<Schema, TQuery>, Schema>;
/**
* Check the current user's permissions on a specific item.
* @param collection The collection of the item
* @param key The primary key of the item
* @returns Returns a ItemPermissions object if a valid collection / primary key was provided.
*/
declare const readItemPermissions: <Schema, Collection extends AllCollections<Schema>>(collection: Collection, key?: string | number) => RestCommand<ReadItemPermissionsOutput, Schema>;
/**
* Check the current user's permissions.
*/
declare const readUserPermissions: <Schema>() => RestCommand<ReadUserPermissionsOutput, Schema>;
//#endregion
export { ReadItemPermissionsOutput, ReadPermissionOutput, ReadUserPermissionsOutput, readItemPermissions, readPermission, readPermissions, readUserPermissions };
//# sourceMappingURL=permissions.d.cts.map
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { transpose as fn } from "../transpose.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const transpose = convertToFP(fn, 2);
// Fallback for modularized imports:
export default transpose;
@@ -0,0 +1,100 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var driver_exports = {};
__export(driver_exports, {
VercelPgDatabase: () => VercelPgDatabase,
VercelPgDriver: () => VercelPgDriver,
drizzle: () => drizzle
});
module.exports = __toCommonJS(driver_exports);
var import_postgres = require("@vercel/postgres");
var import_entity = require("../entity.cjs");
var import_logger = require("../logger.cjs");
var import_db = require("../pg-core/db.cjs");
var import_pg_core = require("../pg-core/index.cjs");
var import_relations = require("../relations.cjs");
var import_utils = require("../utils.cjs");
var import_session = require("./session.cjs");
class VercelPgDriver {
constructor(client, dialect, options = {}) {
this.client = client;
this.dialect = dialect;
this.options = options;
}
static [import_entity.entityKind] = "VercelPgDriver";
createSession(schema) {
return new import_session.VercelPgSession(this.client, this.dialect, schema, {
logger: this.options.logger,
cache: this.options.cache
});
}
}
class VercelPgDatabase extends import_db.PgDatabase {
static [import_entity.entityKind] = "VercelPgDatabase";
}
function construct(client, config = {}) {
const dialect = new import_pg_core.PgDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new import_logger.DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = (0, import_relations.extractTablesRelationalConfig)(
config.schema,
import_relations.createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const driver = new VercelPgDriver(client, dialect, { logger, cache: config.cache });
const session = driver.createSession(schema);
const db = new VercelPgDatabase(dialect, session, schema);
db.$client = client;
db.$cache = config.cache;
if (db.$cache) {
db.$cache["invalidate"] = config.cache?.onMutate;
}
return db;
}
function drizzle(...params) {
if ((0, import_utils.isConfig)(params[0])) {
const { client, ...drizzleConfig } = params[0];
return construct(client ?? import_postgres.sql, drizzleConfig);
}
return construct(params[0] ?? import_postgres.sql, params[1]);
}
((drizzle2) => {
function mock(config) {
return construct({}, config);
}
drizzle2.mock = mock;
})(drizzle || (drizzle = {}));
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
VercelPgDatabase,
VercelPgDriver,
drizzle
});
//# sourceMappingURL=driver.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"resetPassword.d.ts","sourceRoot":"","sources":["../../../../src/auth/operations/local/resetPassword.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAMjD,MAAM,MAAM,OAAO,CAAC,KAAK,SAAS,kBAAkB,IAAI;IACtD,UAAU,EAAE,KAAK,CAAA;IACjB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,IAAI,EAAE;QACJ,QAAQ,EAAE,MAAM,CAAA;QAChB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,cAAc,EAAE,OAAO,CAAA;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAA;CAC9B,CAAA;AAED,wBAAsB,kBAAkB,CAAC,KAAK,SAAS,kBAAkB,EACvE,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GACtB,OAAO,CAAC,MAAM,CAAC,CAyBjB"}
@@ -0,0 +1,72 @@
BSON ObjectID &nbsp;[![Build Status](https://travis-ci.org/williamkapke/bson-objectid.svg?branch=master)](https://travis-ci.org/williamkapke/bson-objectid)
=============
This module allows you to create and parse `ObjectID`s without a reference to the
[mongodb](https://github.com/mongodb/node-mongodb-native) or [bson](https://github.com/mongodb/js-bson)
modules.
The goal is to be 100% compatable with all [bson](https://github.com/mongodb/js-bson)'s
public API implementation (found here: https://github.com/mongodb/js-bson/blob/main/src/objectid.ts).
## Install
$ npm install bson-objectid
## Usage
```javascript
var ObjectID = require("bson-objectid");
console.log(ObjectID());
console.log(ObjectID("54495ad94c934721ede76d90"));
console.log(ObjectID(1414093117));//time
console.log(ObjectID([ 84, 73, 90, 217, 76, 147, 71, 33, 237, 231, 109, 144 ]));
console.log(ObjectID(new Buffer([ 84, 73, 90, 217, 76, 147, 71, 33, 237, 231, 109, 144 ])));
```
### ObjectID()<br>ObjectID(time)<br>ObjectID(hexString)<br>ObjectID(idString)<br>ObjectID(array)<br>ObjectID(buffer)
Creates a new immutable `ObjectID` instance based on the current system time.
Possible arguments:<br>
**time** Constructs the instance based on the specified time (in seconds).<br>
**hexString** Constructs the instance from a 24 character hex string.<br>
**idString** Constructs the instance from a 12 byte string.<br>
**array** Constructs the instance from an `Array` of 24 bytes.<br>
**buffer** Constructs the instance from a 24 byte `Buffer` instance.<br>
#### id
**returns** the 12 byte id string.
#### str
#### toHexString()
**returns** the `ObjectID` represented as a 24 character hex string.
#### equals(other)
**returns** true if the `ObjectID`s represent the same underlying value. Otherwise false.
#### getTimestamp()
**returns** the generation `Date` (accurate up to the second) that this `ObjectID` was generated.
### ObjectID.createFromTime(time)
Creates an ObjectID from a time (in seconds) `Number`, with the rest of the `ObjectID` zeroed out. Used for comparisons or sorting the ObjectID.
### ObjectID.createFromHexString(hexString)
Creates an ObjectID from a 24 character hex string.
### ObjectID.isValid(hexString)<br>ObjectID.isValid(ObjectID)
Checks if a value is a valid `ObjectID` or 24 character hex string.
> THE NATIVE DOCUMENTATION ISN'T CLEAR ON THIS GUY!<br>
> See: http://mongodb.github.io/node-mongodb-native/api-bson-generated/objectid.html#objectid-isvalid
## Test
mocha
or
npm test
License
=======
Apache v2.0
See LICENSE file.
Special callout to [@feross](https://github.com/feross) for the [is-buffer](https://github.com/feross/is-buffer) code
used internally to avoid Buffer from being loaded in browserify environments.
@@ -0,0 +1,178 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const capture = require('./capture.js');
const core = require('@sentry/core');
/**
* @summary Capture a log with the `trace` level. Requires the `enableLogs` option to be enabled.
*
* You can either pass a message and attributes or a message template, params and attributes.
*
* @example
*
* ```
* Sentry.logger.trace('Starting database connection', {
* database: 'users',
* connectionId: 'conn_123'
* });
* ```
*
* @example With template strings
*
* ```
* Sentry.logger.trace('Database connection %s established for %s',
* ['successful', 'users'],
* { connectionId: 'conn_123' }
* );
* ```
*/
function trace(...args) {
capture.captureLog('trace', ...args);
}
/**
* @summary Capture a log with the `debug` level. Requires the `enableLogs` option to be enabled.
*
* You can either pass a message and attributes or a message template, params and attributes.
*
* @example
*
* ```
* Sentry.logger.debug('Cache miss for user profile', {
* userId: 'user_123',
* cacheKey: 'profile:user_123'
* });
* ```
*
* @example With template strings
*
* ```
* Sentry.logger.debug('Cache %s for %s: %s',
* ['miss', 'user profile', 'key not found'],
* { userId: 'user_123' }
* );
* ```
*/
function debug(...args) {
capture.captureLog('debug', ...args);
}
/**
* @summary Capture a log with the `info` level. Requires the `enableLogs` option to be enabled.
*
* You can either pass a message and attributes or a message template, params and attributes.
*
* @example
*
* ```
* Sentry.logger.info('User profile updated', {
* userId: 'user_123',
* updatedFields: ['email', 'preferences']
* });
* ```
*
* @example With template strings
*
* ```
* Sentry.logger.info('User %s updated their %s',
* ['John Doe', 'profile settings'],
* { userId: 'user_123' }
* );
* ```
*/
function info(...args) {
capture.captureLog('info', ...args);
}
/**
* @summary Capture a log with the `warn` level. Requires the `enableLogs` option to be enabled.
*
* You can either pass a message and attributes or a message template, params and attributes.
*
* @example
*
* ```
* Sentry.logger.warn('Rate limit approaching', {
* endpoint: '/api/users',
* currentRate: '95/100',
* resetTime: '2024-03-20T10:00:00Z'
* });
* ```
*
* @example With template strings
*
* ```
* Sentry.logger.warn('Rate limit %s for %s: %s',
* ['approaching', '/api/users', '95/100 requests'],
* { resetTime: '2024-03-20T10:00:00Z' }
* );
* ```
*/
function warn(...args) {
capture.captureLog('warn', ...args);
}
/**
* @summary Capture a log with the `error` level. Requires the `enableLogs` option to be enabled.
*
* You can either pass a message and attributes or a message template, params and attributes.
*
* @example
*
* ```
* Sentry.logger.error('Failed to process payment', {
* orderId: 'order_123',
* errorCode: 'PAYMENT_FAILED',
* amount: 99.99
* });
* ```
*
* @example With template strings
*
* ```
* Sentry.logger.error('Payment processing failed for order %s: %s',
* ['order_123', 'insufficient funds'],
* { amount: 99.99 }
* );
* ```
*/
function error(...args) {
capture.captureLog('error', ...args);
}
/**
* @summary Capture a log with the `fatal` level. Requires the `enableLogs` option to be enabled.
*
* You can either pass a message and attributes or a message template, params and attributes.
*
* @example
*
* ```
* Sentry.logger.fatal('Database connection pool exhausted', {
* database: 'users',
* activeConnections: 100,
* maxConnections: 100
* });
* ```
*
* @example With template strings
*
* ```
* Sentry.logger.fatal('Database %s: %s connections active',
* ['connection pool exhausted', '100/100'],
* { database: 'users' }
* );
* ```
*/
function fatal(...args) {
capture.captureLog('fatal', ...args);
}
exports.fmt = core.fmt;
exports.debug = debug;
exports.error = error;
exports.fatal = fatal;
exports.info = info;
exports.trace = trace;
exports.warn = warn;
//# sourceMappingURL=exports.js.map
@@ -0,0 +1,4 @@
export { Accessibility } from './Accessibility';
export { RestoreFocus } from './components';
export { defaultAnnouncements, defaultScreenReaderInstructions, } from './defaults';
export type { Announcements, ScreenReaderInstructions } from './types';
@@ -0,0 +1 @@
{"version":3,"file":"wrapErrorGetInitialPropsWithSentry.d.ts","sourceRoot":"","sources":["../../../../src/common/pages-router-instrumentation/wrapErrorGetInitialPropsWithSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAI7C,KAAK,oBAAoB,GAAG,CAAC,OAAO,EAAE,eAAe,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;AAE9E;;;;;;;GAOG;AACH,wBAAgB,kCAAkC,CAChD,wBAAwB,EAAE,oBAAoB,GAC7C,oBAAoB,CAkDtB"}
@@ -0,0 +1 @@
{"version":3,"names":["_toBlock","require","ensureBlock","node","key","result","toBlock"],"sources":["../../src/converters/ensureBlock.ts"],"sourcesContent":["import toBlock from \"./toBlock.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Ensure the `key` (defaults to \"body\") of a `node` is a block.\n * Casting it to a block if it is not.\n *\n * Returns the BlockStatement\n */\nexport default function ensureBlock(\n node: t.Node,\n key: string = \"body\",\n): t.BlockStatement {\n // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n const result = toBlock(node[key], node);\n // @ts-expect-error Fixme: key may not exist in node, consider remove key = \"body\"\n node[key] = result;\n return result;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AASe,SAASC,WAAWA,CACjCC,IAAY,EACZC,GAAW,GAAG,MAAM,EACF;EAElB,MAAMC,MAAM,GAAG,IAAAC,gBAAO,EAACH,IAAI,CAACC,GAAG,CAAC,EAAED,IAAI,CAAC;EAEvCA,IAAI,CAACC,GAAG,CAAC,GAAGC,MAAM;EAClB,OAAOA,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,8 @@
"use strict";
exports.isWednesdayWithOptions = void 0;
var _index = require("../isWednesday.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const isWednesdayWithOptions = (exports.isWednesdayWithOptions = (0,
_index2.convertToFP)(_index.isWednesday, 2));
@@ -0,0 +1,215 @@
/*
* Browser-compatible JavaScript MD5
*
* Modification of JavaScript MD5
* https://github.com/blueimp/JavaScript-MD5
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
*
* Based on
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
* Digest Algorithm, as defined in RFC 1321.
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
* Distributed under the BSD License
* See http://pajhome.org.uk/crypt/md5 for more info.
*/
function md5(bytes) {
if (typeof bytes === 'string') {
const msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
bytes = new Uint8Array(msg.length);
for (let i = 0; i < msg.length; ++i) {
bytes[i] = msg.charCodeAt(i);
}
}
return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
}
/*
* Convert an array of little-endian words to an array of bytes
*/
function md5ToHexEncodedArray(input) {
const output = [];
const length32 = input.length * 32;
const hexTab = '0123456789abcdef';
for (let i = 0; i < length32; i += 8) {
const x = input[i >> 5] >>> i % 32 & 0xff;
const hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
output.push(hex);
}
return output;
}
/**
* Calculate output length with padding and bit length
*/
function getOutputLength(inputLength8) {
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
}
/*
* Calculate the MD5 of an array of little-endian words, and a bit length.
*/
function wordsToMd5(x, len) {
/* append padding */
x[len >> 5] |= 0x80 << len % 32;
x[getOutputLength(len) - 1] = len;
let a = 1732584193;
let b = -271733879;
let c = -1732584194;
let d = 271733878;
for (let i = 0; i < x.length; i += 16) {
const olda = a;
const oldb = b;
const oldc = c;
const oldd = d;
a = md5ff(a, b, c, d, x[i], 7, -680876936);
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
b = md5gg(b, c, d, a, x[i], 20, -373897302);
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
d = md5hh(d, a, b, c, x[i], 11, -358537222);
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
a = md5ii(a, b, c, d, x[i], 6, -198630844);
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
a = safeAdd(a, olda);
b = safeAdd(b, oldb);
c = safeAdd(c, oldc);
d = safeAdd(d, oldd);
}
return [a, b, c, d];
}
/*
* Convert an array bytes to an array of little-endian words
* Characters >255 have their high-byte silently ignored.
*/
function bytesToWords(input) {
if (input.length === 0) {
return [];
}
const length8 = input.length * 8;
const output = new Uint32Array(getOutputLength(length8));
for (let i = 0; i < length8; i += 8) {
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
}
return output;
}
/*
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
* to work around bugs in some JS interpreters.
*/
function safeAdd(x, y) {
const lsw = (x & 0xffff) + (y & 0xffff);
const msw = (x >> 16) + (y >> 16) + (lsw >> 16);
return msw << 16 | lsw & 0xffff;
}
/*
* Bitwise rotate a 32-bit number to the left.
*/
function bitRotateLeft(num, cnt) {
return num << cnt | num >>> 32 - cnt;
}
/*
* These functions implement the four basic operations the algorithm uses.
*/
function md5cmn(q, a, b, x, s, t) {
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
}
function md5ff(a, b, c, d, x, s, t) {
return md5cmn(b & c | ~b & d, a, b, x, s, t);
}
function md5gg(a, b, c, d, x, s, t) {
return md5cmn(b & d | c & ~d, a, b, x, s, t);
}
function md5hh(a, b, c, d, x, s, t) {
return md5cmn(b ^ c ^ d, a, b, x, s, t);
}
function md5ii(a, b, c, d, x, s, t) {
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
}
export default md5;
@@ -0,0 +1 @@
{"version":3,"file":"tracingUtils.d.ts","sourceRoot":"","sources":["../../../../src/common/utils/tracingUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,EAKL,KAAK,EAIN,MAAM,cAAc,CAAC;AAStB;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,OAAO,EACrB,kBAAkB,EAAE,kBAAkB,GACrC,kBAAkB,CAYpB;AAID;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAAC,YAAY,EAAE,OAAO,GAAG,KAAK,CAazE;AAUD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAyBrD;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAS5C;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,cAAc,EAAE,cAAc,GAAG,OAAO,CAM5E;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAUhH;AAED;;;;;;GAMG;AACH,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,IAAI,EAChB,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,cAAc,GACjC,IAAI,CAcN"}
@@ -0,0 +1,122 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCompatible = exports._makeCompatibilityCheck = void 0;
const version_1 = require("../version");
const re = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
/**
* Create a function to test an API version to see if it is compatible with the provided ownVersion.
*
* The returned function has the following semantics:
* - Exact match is always compatible
* - Major versions must match exactly
* - 1.x package cannot use global 2.x package
* - 2.x package cannot use global 1.x package
* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
* - Patch and build tag differences are not considered at this time
*
* @param ownVersion version which should be checked against
*/
function _makeCompatibilityCheck(ownVersion) {
const acceptedVersions = new Set([ownVersion]);
const rejectedVersions = new Set();
const myVersionMatch = ownVersion.match(re);
if (!myVersionMatch) {
// we cannot guarantee compatibility so we always return noop
return () => false;
}
const ownVersionParsed = {
major: +myVersionMatch[1],
minor: +myVersionMatch[2],
patch: +myVersionMatch[3],
prerelease: myVersionMatch[4],
};
// if ownVersion has a prerelease tag, versions must match exactly
if (ownVersionParsed.prerelease != null) {
return function isExactmatch(globalVersion) {
return globalVersion === ownVersion;
};
}
function _reject(v) {
rejectedVersions.add(v);
return false;
}
function _accept(v) {
acceptedVersions.add(v);
return true;
}
return function isCompatible(globalVersion) {
if (acceptedVersions.has(globalVersion)) {
return true;
}
if (rejectedVersions.has(globalVersion)) {
return false;
}
const globalVersionMatch = globalVersion.match(re);
if (!globalVersionMatch) {
// cannot parse other version
// we cannot guarantee compatibility so we always noop
return _reject(globalVersion);
}
const globalVersionParsed = {
major: +globalVersionMatch[1],
minor: +globalVersionMatch[2],
patch: +globalVersionMatch[3],
prerelease: globalVersionMatch[4],
};
// if globalVersion has a prerelease tag, versions must match exactly
if (globalVersionParsed.prerelease != null) {
return _reject(globalVersion);
}
// major versions must match
if (ownVersionParsed.major !== globalVersionParsed.major) {
return _reject(globalVersion);
}
if (ownVersionParsed.major === 0) {
if (ownVersionParsed.minor === globalVersionParsed.minor &&
ownVersionParsed.patch <= globalVersionParsed.patch) {
return _accept(globalVersion);
}
return _reject(globalVersion);
}
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
return _accept(globalVersion);
}
return _reject(globalVersion);
};
}
exports._makeCompatibilityCheck = _makeCompatibilityCheck;
/**
* Test an API version to see if it is compatible with this API.
*
* - Exact match is always compatible
* - Major versions must match exactly
* - 1.x package cannot use global 2.x package
* - 2.x package cannot use global 1.x package
* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API
* - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects
* - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3
* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor
* - Patch and build tag differences are not considered at this time
*
* @param version version of the API requesting an instance of the global API
*/
exports.isCompatible = _makeCompatibilityCheck(version_1.VERSION);
//# sourceMappingURL=semver.js.map
@@ -0,0 +1,100 @@
{
"name": "@emotion/cache",
"version": "11.14.0",
"description": "emotion's cache",
"main": "dist/emotion-cache.cjs.js",
"module": "dist/emotion-cache.esm.js",
"types": "dist/emotion-cache.cjs.d.ts",
"exports": {
".": {
"types": {
"import": "./dist/emotion-cache.cjs.mjs",
"default": "./dist/emotion-cache.cjs.js"
},
"development": {
"edge-light": {
"module": "./dist/emotion-cache.development.edge-light.esm.js",
"import": "./dist/emotion-cache.development.edge-light.cjs.mjs",
"default": "./dist/emotion-cache.development.edge-light.cjs.js"
},
"worker": {
"module": "./dist/emotion-cache.development.edge-light.esm.js",
"import": "./dist/emotion-cache.development.edge-light.cjs.mjs",
"default": "./dist/emotion-cache.development.edge-light.cjs.js"
},
"workerd": {
"module": "./dist/emotion-cache.development.edge-light.esm.js",
"import": "./dist/emotion-cache.development.edge-light.cjs.mjs",
"default": "./dist/emotion-cache.development.edge-light.cjs.js"
},
"browser": {
"module": "./dist/emotion-cache.browser.development.esm.js",
"import": "./dist/emotion-cache.browser.development.cjs.mjs",
"default": "./dist/emotion-cache.browser.development.cjs.js"
},
"module": "./dist/emotion-cache.development.esm.js",
"import": "./dist/emotion-cache.development.cjs.mjs",
"default": "./dist/emotion-cache.development.cjs.js"
},
"edge-light": {
"module": "./dist/emotion-cache.edge-light.esm.js",
"import": "./dist/emotion-cache.edge-light.cjs.mjs",
"default": "./dist/emotion-cache.edge-light.cjs.js"
},
"worker": {
"module": "./dist/emotion-cache.edge-light.esm.js",
"import": "./dist/emotion-cache.edge-light.cjs.mjs",
"default": "./dist/emotion-cache.edge-light.cjs.js"
},
"workerd": {
"module": "./dist/emotion-cache.edge-light.esm.js",
"import": "./dist/emotion-cache.edge-light.cjs.mjs",
"default": "./dist/emotion-cache.edge-light.cjs.js"
},
"browser": {
"module": "./dist/emotion-cache.browser.esm.js",
"import": "./dist/emotion-cache.browser.cjs.mjs",
"default": "./dist/emotion-cache.browser.cjs.js"
},
"module": "./dist/emotion-cache.esm.js",
"import": "./dist/emotion-cache.cjs.mjs",
"default": "./dist/emotion-cache.cjs.js"
},
"./package.json": "./package.json"
},
"imports": {
"#is-development": {
"development": "./src/conditions/true.ts",
"default": "./src/conditions/false.ts"
},
"#is-browser": {
"edge-light": "./src/conditions/false.ts",
"workerd": "./src/conditions/false.ts",
"worker": "./src/conditions/false.ts",
"browser": "./src/conditions/true.ts",
"default": "./src/conditions/is-browser.ts"
}
},
"license": "MIT",
"repository": "https://github.com/emotion-js/emotion/tree/main/packages/cache",
"scripts": {
"test:typescript": "dtslint types"
},
"dependencies": {
"@emotion/memoize": "^0.9.0",
"@emotion/sheet": "^1.4.0",
"@emotion/utils": "^1.4.2",
"@emotion/weak-memoize": "^0.4.0",
"stylis": "4.2.0"
},
"devDependencies": {
"@definitelytyped/dtslint": "0.0.112",
"@emotion/hash": "*",
"@types/stylis": "^4.2.7",
"typescript": "^5.4.5"
},
"files": [
"src",
"dist"
]
}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Music4 = createLucideIcon("Music4", [
["path", { d: "M9 18V5l12-2v13", key: "1jmyc2" }],
["path", { d: "m9 9 12-2", key: "1e64n2" }],
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
["circle", { cx: "18", cy: "16", r: "3", key: "1hluhg" }]
]);
export { Music4 as default };
//# sourceMappingURL=music-4.js.map
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _v = _interopRequireDefault(require("./v35.js"));
var _md = _interopRequireDefault(require("./md5.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
var v3 = (0, _v.default)('v3', 0x30, _md.default);
var _default = exports.default = v3;
@@ -0,0 +1,21 @@
import SourceMap from './source-map.cts';
import type { SourceMapInput, SourceMapLoader, Options } from './types.cts';
export type { SourceMapSegment, EncodedSourceMap, EncodedSourceMap as RawSourceMap, DecodedSourceMap, SourceMapInput, SourceMapLoader, LoaderContext, Options, } from './types.cts';
export type { SourceMap };
/**
* Traces through all the mappings in the root sourcemap, through the sources
* (and their sourcemaps), all the way back to the original source location.
*
* `loader` will be called every time we encounter a source file. If it returns
* a sourcemap, we will recurse into that sourcemap to continue the trace. If
* it returns a falsey value, that source file is treated as an original,
* unmodified source file.
*
* Pass `excludeContent` to exclude any self-containing source file content
* from the output sourcemap.
*
* Pass `decodedMappings` to receive a SourceMap with decoded (instead of
* VLQ encoded) mappings.
*/
export = function remapping(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader, options?: boolean | Options): SourceMap;
//# sourceMappingURL=remapping.d.ts.map
@@ -0,0 +1,170 @@
import type { Client } from '../client';
import type { LogSeverityLevel } from '../types-hoist/log';
/**
* Options for the Sentry Consola reporter.
*/
interface ConsolaReporterOptions {
/**
* Use this option to filter which levels should be captured. By default, all levels are captured.
*
* @example
* ```ts
* const sentryReporter = Sentry.createConsolaReporter({
* // Only capture error and warn logs
* levels: ['error', 'warn'],
* });
* consola.addReporter(sentryReporter);
* ```
*/
levels?: Array<LogSeverityLevel>;
/**
* Optionally provide a specific Sentry client instance to use for capturing logs.
* If not provided, the current client will be retrieved using `getClient()`.
*
* This is useful when you want to use specific client options for log normalization
* or when working with multiple client instances.
*
* @example
* ```ts
* const sentryReporter = Sentry.createConsolaReporter({
* client: myCustomClient,
* });
* ```
*/
client?: Client;
}
export interface ConsolaReporter {
log: (logObj: ConsolaLogObject) => void;
}
/**
* Represents a log object that Consola reporters receive.
*
* This interface matches the structure of log objects passed to Consola reporters.
* See: https://github.com/unjs/consola#custom-reporters
*
* @example
* ```ts
* const reporter = {
* log(logObj: ConsolaLogObject) {
* console.log(`[${logObj.type}] ${logObj.message || logObj.args?.join(' ')}`);
* }
* };
* consola.addReporter(reporter);
* ```
*/
export interface ConsolaLogObject {
/**
* Allows additional custom properties to be set on the log object.
* These properties will be captured as log attributes with a 'consola.' prefix.
*
* @example
* ```ts
* const reporter = Sentry.createConsolaReporter();
* reporter.log({
* type: 'info',
* message: 'User action',
* userId: 123,
* sessionId: 'abc-123'
* });
* // Will create attributes: consola.userId and consola.sessionId
* ```
*/
[key: string]: unknown;
/**
* The numeric log level (0-5) or null.
*
* Consola log levels:
* - 0: Fatal and Error
* - 1: Warnings
* - 2: Normal logs
* - 3: Informational logs, success, fail, ready, start, box, ...
* - 4: Debug logs
* - 5: Trace logs
* - null: Some special types like 'verbose'
*
* See: https://github.com/unjs/consola/blob/main/README.md#log-level
*/
level?: number | null;
/**
* The log type/method name (e.g., 'error', 'warn', 'info', 'debug', 'trace', 'success', 'fail', etc.).
*
* Consola built-in types include:
* - Standard: silent, fatal, error, warn, log, info, success, fail, ready, start, box, debug, trace, verbose
* - Custom types can also be defined
*
* See: https://github.com/unjs/consola/blob/main/README.md#log-types
*/
type?: string;
/**
* An optional tag/scope for the log entry.
*
* Tags are created using `consola.withTag('scope')` and help categorize logs.
*
* @example
* ```ts
* const scopedLogger = consola.withTag('auth');
* scopedLogger.info('User logged in'); // tag will be 'auth'
* ```
*
* See: https://github.com/unjs/consola/blob/main/README.md#withtagtag
*/
tag?: string;
/**
* The raw arguments passed to the log method.
*
* When `message` is not provided, these args are typically formatted into the final message.
*
* @example
* ```ts
* consola.info('Hello', 'world', { user: 'john' });
* // args = ['Hello', 'world', { user: 'john' }]
* ```
*/
args?: unknown[];
/**
* The timestamp when the log was created.
*
* This is automatically set by Consola when the log is created.
*/
date?: Date;
/**
* The formatted log message.
*
* When provided, this is the final formatted message. When not provided,
* the message should be constructed from the `args` array.
*/
message?: string;
}
/**
* Creates a new Sentry reporter for Consola that forwards logs to Sentry. Requires the `enableLogs` option to be enabled.
*
* **Note: This integration supports Consola v3.x only.** The reporter interface and log object structure
* may differ in other versions of Consola.
*
* @param options - Configuration options for the reporter.
* @returns A Consola reporter that can be added to consola instances.
*
* @example
* ```ts
* import * as Sentry from '@sentry/node';
* import { consola } from 'consola';
*
* Sentry.init({
* enableLogs: true,
* });
*
* const sentryReporter = Sentry.createConsolaReporter({
* // Optional: filter levels to capture
* levels: ['error', 'warn', 'info'],
* });
*
* consola.addReporter(sentryReporter);
*
* // Now consola logs will be captured by Sentry
* consola.info('This will be sent to Sentry');
* consola.error('This error will also be sent to Sentry');
* ```
*/
export declare function createConsolaReporter(options?: ConsolaReporterOptions): ConsolaReporter;
export {};
//# sourceMappingURL=consola.d.ts.map
@@ -0,0 +1,267 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.GraphQLError = void 0;
exports.formatError = formatError;
exports.printError = printError;
var _isObjectLike = require('../jsutils/isObjectLike.js');
var _location = require('../language/location.js');
var _printLocation = require('../language/printLocation.js');
function toNormalizedOptions(args) {
const firstArg = args[0];
if (firstArg == null || 'kind' in firstArg || 'length' in firstArg) {
return {
nodes: firstArg,
source: args[1],
positions: args[2],
path: args[3],
originalError: args[4],
extensions: args[5],
};
}
return firstArg;
}
/**
* A GraphQLError describes an Error found during the parse, validate, or
* execute phases of performing a GraphQL operation. In addition to a message
* and stack trace, it also includes information about the locations in a
* GraphQL document and/or execution result that correspond to the Error.
*/
class GraphQLError extends Error {
/**
* An array of `{ line, column }` locations within the source GraphQL document
* which correspond to this error.
*
* Errors during validation often contain multiple locations, for example to
* point out two things with the same name. Errors during execution include a
* single location, the field which produced the error.
*
* Enumerable, and appears in the result of JSON.stringify().
*/
/**
* An array describing the JSON-path into the execution response which
* corresponds to this error. Only included for errors during execution.
*
* Enumerable, and appears in the result of JSON.stringify().
*/
/**
* An array of GraphQL AST Nodes corresponding to this error.
*/
/**
* The source GraphQL document for the first location of this error.
*
* Note that if this Error represents more than one node, the source may not
* represent nodes after the first node.
*/
/**
* An array of character offsets within the source GraphQL document
* which correspond to this error.
*/
/**
* The original error thrown from a field resolver during execution.
*/
/**
* Extension fields to add to the formatted error.
*/
/**
* @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
*/
constructor(message, ...rawArgs) {
var _this$nodes, _nodeLocations$, _ref;
const { nodes, source, positions, path, originalError, extensions } =
toNormalizedOptions(rawArgs);
super(message);
this.name = 'GraphQLError';
this.path = path !== null && path !== void 0 ? path : undefined;
this.originalError =
originalError !== null && originalError !== void 0
? originalError
: undefined; // Compute list of blame nodes.
this.nodes = undefinedIfEmpty(
Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined,
);
const nodeLocations = undefinedIfEmpty(
(_this$nodes = this.nodes) === null || _this$nodes === void 0
? void 0
: _this$nodes.map((node) => node.loc).filter((loc) => loc != null),
); // Compute locations in the source for the given nodes/positions.
this.source =
source !== null && source !== void 0
? source
: nodeLocations === null || nodeLocations === void 0
? void 0
: (_nodeLocations$ = nodeLocations[0]) === null ||
_nodeLocations$ === void 0
? void 0
: _nodeLocations$.source;
this.positions =
positions !== null && positions !== void 0
? positions
: nodeLocations === null || nodeLocations === void 0
? void 0
: nodeLocations.map((loc) => loc.start);
this.locations =
positions && source
? positions.map((pos) => (0, _location.getLocation)(source, pos))
: nodeLocations === null || nodeLocations === void 0
? void 0
: nodeLocations.map((loc) =>
(0, _location.getLocation)(loc.source, loc.start),
);
const originalExtensions = (0, _isObjectLike.isObjectLike)(
originalError === null || originalError === void 0
? void 0
: originalError.extensions,
)
? originalError === null || originalError === void 0
? void 0
: originalError.extensions
: undefined;
this.extensions =
(_ref =
extensions !== null && extensions !== void 0
? extensions
: originalExtensions) !== null && _ref !== void 0
? _ref
: Object.create(null); // Only properties prescribed by the spec should be enumerable.
// Keep the rest as non-enumerable.
Object.defineProperties(this, {
message: {
writable: true,
enumerable: true,
},
name: {
enumerable: false,
},
nodes: {
enumerable: false,
},
source: {
enumerable: false,
},
positions: {
enumerable: false,
},
originalError: {
enumerable: false,
},
}); // Include (non-enumerable) stack trace.
/* c8 ignore start */
// FIXME: https://github.com/graphql/graphql-js/issues/2317
if (
originalError !== null &&
originalError !== void 0 &&
originalError.stack
) {
Object.defineProperty(this, 'stack', {
value: originalError.stack,
writable: true,
configurable: true,
});
} else if (Error.captureStackTrace) {
Error.captureStackTrace(this, GraphQLError);
} else {
Object.defineProperty(this, 'stack', {
value: Error().stack,
writable: true,
configurable: true,
});
}
/* c8 ignore stop */
}
get [Symbol.toStringTag]() {
return 'GraphQLError';
}
toString() {
let output = this.message;
if (this.nodes) {
for (const node of this.nodes) {
if (node.loc) {
output += '\n\n' + (0, _printLocation.printLocation)(node.loc);
}
}
} else if (this.source && this.locations) {
for (const location of this.locations) {
output +=
'\n\n' +
(0, _printLocation.printSourceLocation)(this.source, location);
}
}
return output;
}
toJSON() {
const formattedError = {
message: this.message,
};
if (this.locations != null) {
formattedError.locations = this.locations;
}
if (this.path != null) {
formattedError.path = this.path;
}
if (this.extensions != null && Object.keys(this.extensions).length > 0) {
formattedError.extensions = this.extensions;
}
return formattedError;
}
}
exports.GraphQLError = GraphQLError;
function undefinedIfEmpty(array) {
return array === undefined || array.length === 0 ? undefined : array;
}
/**
* See: https://spec.graphql.org/draft/#sec-Errors
*/
/**
* Prints a GraphQLError to a string, representing useful location information
* about the error's position in the source.
*
* @deprecated Please use `error.toString` instead. Will be removed in v17
*/
function printError(error) {
return error.toString();
}
/**
* Given a GraphQLError, format it according to the rules described by the
* Response Format, Errors section of the GraphQL Specification.
*
* @deprecated Please use `error.toJSON` instead. Will be removed in v17
*/
function formatError(error) {
return error.toJSON();
}
@@ -0,0 +1,416 @@
'use strict';
var PlainValue = require('./PlainValue-ec8e588e.js');
var resolveSeq = require('./resolveSeq-d03cb037.js');
/* global atob, btoa, Buffer */
const binary = {
identify: value => value instanceof Uint8Array,
// Buffer inherits from Uint8Array
default: false,
tag: 'tag:yaml.org,2002:binary',
/**
* Returns a Buffer in node and an Uint8Array in browsers
*
* To use the resulting buffer as an image, you'll want to do something like:
*
* const blob = new Blob([buffer], { type: 'image/jpeg' })
* document.querySelector('#photo').src = URL.createObjectURL(blob)
*/
resolve: (doc, node) => {
const src = resolveSeq.resolveString(doc, node);
if (typeof Buffer === 'function') {
return Buffer.from(src, 'base64');
} else if (typeof atob === 'function') {
// On IE 11, atob() can't handle newlines
const str = atob(src.replace(/[\n\r]/g, ''));
const buffer = new Uint8Array(str.length);
for (let i = 0; i < str.length; ++i) buffer[i] = str.charCodeAt(i);
return buffer;
} else {
const msg = 'This environment does not support reading binary tags; either Buffer or atob is required';
doc.errors.push(new PlainValue.YAMLReferenceError(node, msg));
return null;
}
},
options: resolveSeq.binaryOptions,
stringify: ({
comment,
type,
value
}, ctx, onComment, onChompKeep) => {
let src;
if (typeof Buffer === 'function') {
src = value instanceof Buffer ? value.toString('base64') : Buffer.from(value.buffer).toString('base64');
} else if (typeof btoa === 'function') {
let s = '';
for (let i = 0; i < value.length; ++i) s += String.fromCharCode(value[i]);
src = btoa(s);
} else {
throw new Error('This environment does not support writing binary tags; either Buffer or btoa is required');
}
if (!type) type = resolveSeq.binaryOptions.defaultType;
if (type === PlainValue.Type.QUOTE_DOUBLE) {
value = src;
} else {
const {
lineWidth
} = resolveSeq.binaryOptions;
const n = Math.ceil(src.length / lineWidth);
const lines = new Array(n);
for (let i = 0, o = 0; i < n; ++i, o += lineWidth) {
lines[i] = src.substr(o, lineWidth);
}
value = lines.join(type === PlainValue.Type.BLOCK_LITERAL ? '\n' : ' ');
}
return resolveSeq.stringifyString({
comment,
type,
value
}, ctx, onComment, onChompKeep);
}
};
function parsePairs(doc, cst) {
const seq = resolveSeq.resolveSeq(doc, cst);
for (let i = 0; i < seq.items.length; ++i) {
let item = seq.items[i];
if (item instanceof resolveSeq.Pair) continue;else if (item instanceof resolveSeq.YAMLMap) {
if (item.items.length > 1) {
const msg = 'Each pair must have its own sequence indicator';
throw new PlainValue.YAMLSemanticError(cst, msg);
}
const pair = item.items[0] || new resolveSeq.Pair();
if (item.commentBefore) pair.commentBefore = pair.commentBefore ? `${item.commentBefore}\n${pair.commentBefore}` : item.commentBefore;
if (item.comment) pair.comment = pair.comment ? `${item.comment}\n${pair.comment}` : item.comment;
item = pair;
}
seq.items[i] = item instanceof resolveSeq.Pair ? item : new resolveSeq.Pair(item);
}
return seq;
}
function createPairs(schema, iterable, ctx) {
const pairs = new resolveSeq.YAMLSeq(schema);
pairs.tag = 'tag:yaml.org,2002:pairs';
for (const it of iterable) {
let key, value;
if (Array.isArray(it)) {
if (it.length === 2) {
key = it[0];
value = it[1];
} else throw new TypeError(`Expected [key, value] tuple: ${it}`);
} else if (it && it instanceof Object) {
const keys = Object.keys(it);
if (keys.length === 1) {
key = keys[0];
value = it[key];
} else throw new TypeError(`Expected { key: value } tuple: ${it}`);
} else {
key = it;
}
const pair = schema.createPair(key, value, ctx);
pairs.items.push(pair);
}
return pairs;
}
const pairs = {
default: false,
tag: 'tag:yaml.org,2002:pairs',
resolve: parsePairs,
createNode: createPairs
};
class YAMLOMap extends resolveSeq.YAMLSeq {
constructor() {
super();
PlainValue._defineProperty(this, "add", resolveSeq.YAMLMap.prototype.add.bind(this));
PlainValue._defineProperty(this, "delete", resolveSeq.YAMLMap.prototype.delete.bind(this));
PlainValue._defineProperty(this, "get", resolveSeq.YAMLMap.prototype.get.bind(this));
PlainValue._defineProperty(this, "has", resolveSeq.YAMLMap.prototype.has.bind(this));
PlainValue._defineProperty(this, "set", resolveSeq.YAMLMap.prototype.set.bind(this));
this.tag = YAMLOMap.tag;
}
toJSON(_, ctx) {
const map = new Map();
if (ctx && ctx.onCreate) ctx.onCreate(map);
for (const pair of this.items) {
let key, value;
if (pair instanceof resolveSeq.Pair) {
key = resolveSeq.toJSON(pair.key, '', ctx);
value = resolveSeq.toJSON(pair.value, key, ctx);
} else {
key = resolveSeq.toJSON(pair, '', ctx);
}
if (map.has(key)) throw new Error('Ordered maps must not include duplicate keys');
map.set(key, value);
}
return map;
}
}
PlainValue._defineProperty(YAMLOMap, "tag", 'tag:yaml.org,2002:omap');
function parseOMap(doc, cst) {
const pairs = parsePairs(doc, cst);
const seenKeys = [];
for (const {
key
} of pairs.items) {
if (key instanceof resolveSeq.Scalar) {
if (seenKeys.includes(key.value)) {
const msg = 'Ordered maps must not include duplicate keys';
throw new PlainValue.YAMLSemanticError(cst, msg);
} else {
seenKeys.push(key.value);
}
}
}
return Object.assign(new YAMLOMap(), pairs);
}
function createOMap(schema, iterable, ctx) {
const pairs = createPairs(schema, iterable, ctx);
const omap = new YAMLOMap();
omap.items = pairs.items;
return omap;
}
const omap = {
identify: value => value instanceof Map,
nodeClass: YAMLOMap,
default: false,
tag: 'tag:yaml.org,2002:omap',
resolve: parseOMap,
createNode: createOMap
};
class YAMLSet extends resolveSeq.YAMLMap {
constructor() {
super();
this.tag = YAMLSet.tag;
}
add(key) {
const pair = key instanceof resolveSeq.Pair ? key : new resolveSeq.Pair(key);
const prev = resolveSeq.findPair(this.items, pair.key);
if (!prev) this.items.push(pair);
}
get(key, keepPair) {
const pair = resolveSeq.findPair(this.items, key);
return !keepPair && pair instanceof resolveSeq.Pair ? pair.key instanceof resolveSeq.Scalar ? pair.key.value : pair.key : pair;
}
set(key, value) {
if (typeof value !== 'boolean') throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof value}`);
const prev = resolveSeq.findPair(this.items, key);
if (prev && !value) {
this.items.splice(this.items.indexOf(prev), 1);
} else if (!prev && value) {
this.items.push(new resolveSeq.Pair(key));
}
}
toJSON(_, ctx) {
return super.toJSON(_, ctx, Set);
}
toString(ctx, onComment, onChompKeep) {
if (!ctx) return JSON.stringify(this);
if (this.hasAllNullValues()) return super.toString(ctx, onComment, onChompKeep);else throw new Error('Set items must all have null values');
}
}
PlainValue._defineProperty(YAMLSet, "tag", 'tag:yaml.org,2002:set');
function parseSet(doc, cst) {
const map = resolveSeq.resolveMap(doc, cst);
if (!map.hasAllNullValues()) throw new PlainValue.YAMLSemanticError(cst, 'Set items must all have null values');
return Object.assign(new YAMLSet(), map);
}
function createSet(schema, iterable, ctx) {
const set = new YAMLSet();
for (const value of iterable) set.items.push(schema.createPair(value, null, ctx));
return set;
}
const set = {
identify: value => value instanceof Set,
nodeClass: YAMLSet,
default: false,
tag: 'tag:yaml.org,2002:set',
resolve: parseSet,
createNode: createSet
};
const parseSexagesimal = (sign, parts) => {
const n = parts.split(':').reduce((n, p) => n * 60 + Number(p), 0);
return sign === '-' ? -n : n;
}; // hhhh:mm:ss.sss
const stringifySexagesimal = ({
value
}) => {
if (isNaN(value) || !isFinite(value)) return resolveSeq.stringifyNumber(value);
let sign = '';
if (value < 0) {
sign = '-';
value = Math.abs(value);
}
const parts = [value % 60]; // seconds, including ms
if (value < 60) {
parts.unshift(0); // at least one : is required
} else {
value = Math.round((value - parts[0]) / 60);
parts.unshift(value % 60); // minutes
if (value >= 60) {
value = Math.round((value - parts[0]) / 60);
parts.unshift(value); // hours
}
}
return sign + parts.map(n => n < 10 ? '0' + String(n) : String(n)).join(':').replace(/000000\d*$/, '') // % 60 may introduce error
;
};
const intTime = {
identify: value => typeof value === 'number',
default: true,
tag: 'tag:yaml.org,2002:int',
format: 'TIME',
test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+)$/,
resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),
stringify: stringifySexagesimal
};
const floatTime = {
identify: value => typeof value === 'number',
default: true,
tag: 'tag:yaml.org,2002:float',
format: 'TIME',
test: /^([-+]?)([0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*)$/,
resolve: (str, sign, parts) => parseSexagesimal(sign, parts.replace(/_/g, '')),
stringify: stringifySexagesimal
};
const timestamp = {
identify: value => value instanceof Date,
default: true,
tag: 'tag:yaml.org,2002:timestamp',
// If the time zone is omitted, the timestamp is assumed to be specified in UTC. The time part
// may be omitted altogether, resulting in a date format. In such a case, the time part is
// assumed to be 00:00:00Z (start of day, UTC).
test: RegExp('^(?:' + '([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})' + // YYYY-Mm-Dd
'(?:(?:t|T|[ \\t]+)' + // t | T | whitespace
'([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)' + // Hh:Mm:Ss(.ss)?
'(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?' + // Z | +5 | -03:30
')?' + ')$'),
resolve: (str, year, month, day, hour, minute, second, millisec, tz) => {
if (millisec) millisec = (millisec + '00').substr(1, 3);
let date = Date.UTC(year, month - 1, day, hour || 0, minute || 0, second || 0, millisec || 0);
if (tz && tz !== 'Z') {
let d = parseSexagesimal(tz[0], tz.slice(1));
if (Math.abs(d) < 30) d *= 60;
date -= 60000 * d;
}
return new Date(date);
},
stringify: ({
value
}) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, '')
};
/* global console, process, YAML_SILENCE_DEPRECATION_WARNINGS, YAML_SILENCE_WARNINGS */
function shouldWarn(deprecation) {
const env = typeof process !== 'undefined' && process.env || {};
if (deprecation) {
if (typeof YAML_SILENCE_DEPRECATION_WARNINGS !== 'undefined') return !YAML_SILENCE_DEPRECATION_WARNINGS;
return !env.YAML_SILENCE_DEPRECATION_WARNINGS;
}
if (typeof YAML_SILENCE_WARNINGS !== 'undefined') return !YAML_SILENCE_WARNINGS;
return !env.YAML_SILENCE_WARNINGS;
}
function warn(warning, type) {
if (shouldWarn(false)) {
const emit = typeof process !== 'undefined' && process.emitWarning; // This will throw in Jest if `warning` is an Error instance due to
// https://github.com/facebook/jest/issues/2549
if (emit) emit(warning, type);else {
// eslint-disable-next-line no-console
console.warn(type ? `${type}: ${warning}` : warning);
}
}
}
function warnFileDeprecation(filename) {
if (shouldWarn(true)) {
const path = filename.replace(/.*yaml[/\\]/i, '').replace(/\.js$/, '').replace(/\\/g, '/');
warn(`The endpoint 'yaml/${path}' will be removed in a future release.`, 'DeprecationWarning');
}
}
const warned = {};
function warnOptionDeprecation(name, alternative) {
if (!warned[name] && shouldWarn(true)) {
warned[name] = true;
let msg = `The option '${name}' will be removed in a future release`;
msg += alternative ? `, use '${alternative}' instead.` : '.';
warn(msg, 'DeprecationWarning');
}
}
exports.binary = binary;
exports.floatTime = floatTime;
exports.intTime = intTime;
exports.omap = omap;
exports.pairs = pairs;
exports.set = set;
exports.timestamp = timestamp;
exports.warn = warn;
exports.warnFileDeprecation = warnFileDeprecation;
exports.warnOptionDeprecation = warnOptionDeprecation;
@@ -0,0 +1,5 @@
# @dnd-kit/utilities
[![Stable release](https://img.shields.io/npm/v/@dnd-kit/utilities.svg)](https://npm.im/@dnd-kit/sortable)
Internal utilities to bee shared between `@dnd-kit` packages.
@@ -0,0 +1 @@
{"version":3,"names":["_initializerWarningHelper","descriptor","context","Error"],"sources":["../../src/helpers/initializerWarningHelper.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport default function _initializerWarningHelper(\n descriptor: PropertyDescriptor,\n context: DecoratorContext,\n): never {\n throw new Error(\n \"Decorating class property failed. Please ensure that \" +\n \"transform-class-properties is enabled and runs after the decorators transform.\",\n );\n}\n"],"mappings":";;;;;;AAGe,SAASA,yBAAyBA,CAC/CC,UAA8B,EAC9BC,OAAyB,EAClB;EACP,MAAM,IAAIC,KAAK,CACb,uDAAuD,GACrD,gFACJ,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,88 @@
import Dispatcher from './dispatcher'
import { setGlobalDispatcher, getGlobalDispatcher } from './global-dispatcher'
import { setGlobalOrigin, getGlobalOrigin } from './global-origin'
import Pool from './pool'
import { RedirectHandler, DecoratorHandler } from './handlers'
import BalancedPool from './balanced-pool'
import RoundRobinPool from './round-robin-pool'
import Client from './client'
import H2CClient from './h2c-client'
import buildConnector from './connector'
import errors from './errors'
import Agent from './agent'
import MockClient from './mock-client'
import MockPool from './mock-pool'
import MockAgent from './mock-agent'
import { SnapshotAgent } from './snapshot-agent'
import { MockCallHistory, MockCallHistoryLog } from './mock-call-history'
import mockErrors from './mock-errors'
import ProxyAgent from './proxy-agent'
import EnvHttpProxyAgent from './env-http-proxy-agent'
import RetryHandler from './retry-handler'
import RetryAgent from './retry-agent'
import { request, pipeline, stream, connect, upgrade } from './api'
import interceptors from './interceptors'
import CacheInterceptor from './cache-interceptor'
declare const cacheStores: {
MemoryCacheStore: typeof CacheInterceptor.MemoryCacheStore;
SqliteCacheStore: typeof CacheInterceptor.SqliteCacheStore;
}
export * from './util'
export * from './cookies'
export * from './eventsource'
export * from './fetch'
export * from './formdata'
export * from './diagnostics-channel'
export * from './websocket'
export * from './content-type'
export * from './cache'
export { Interceptable } from './mock-interceptor'
declare function globalThisInstall (): void
export { Dispatcher, BalancedPool, RoundRobinPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, cacheStores, MockClient, MockPool, MockAgent, SnapshotAgent, MockCallHistory, MockCallHistoryLog, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent, H2CClient, globalThisInstall as install }
export default Undici
declare namespace Undici {
const Dispatcher: typeof import('./dispatcher').default
const Pool: typeof import('./pool').default
const RedirectHandler: typeof import ('./handlers').RedirectHandler
const DecoratorHandler: typeof import ('./handlers').DecoratorHandler
const RetryHandler: typeof import ('./retry-handler').default
const BalancedPool: typeof import('./balanced-pool').default
const RoundRobinPool: typeof import('./round-robin-pool').default
const Client: typeof import('./client').default
const H2CClient: typeof import('./h2c-client').default
const buildConnector: typeof import('./connector').default
const errors: typeof import('./errors').default
const Agent: typeof import('./agent').default
const setGlobalDispatcher: typeof import('./global-dispatcher').setGlobalDispatcher
const getGlobalDispatcher: typeof import('./global-dispatcher').getGlobalDispatcher
const request: typeof import('./api').request
const stream: typeof import('./api').stream
const pipeline: typeof import('./api').pipeline
const connect: typeof import('./api').connect
const upgrade: typeof import('./api').upgrade
const MockClient: typeof import('./mock-client').default
const MockPool: typeof import('./mock-pool').default
const MockAgent: typeof import('./mock-agent').default
const SnapshotAgent: typeof import('./snapshot-agent').SnapshotAgent
const MockCallHistory: typeof import('./mock-call-history').MockCallHistory
const MockCallHistoryLog: typeof import('./mock-call-history').MockCallHistoryLog
const mockErrors: typeof import('./mock-errors').default
const fetch: typeof import('./fetch').fetch
const Headers: typeof import('./fetch').Headers
const Response: typeof import('./fetch').Response
const Request: typeof import('./fetch').Request
const FormData: typeof import('./formdata').FormData
const caches: typeof import('./cache').caches
const interceptors: typeof import('./interceptors').default
const cacheStores: {
MemoryCacheStore: typeof import('./cache-interceptor').default.MemoryCacheStore,
SqliteCacheStore: typeof import('./cache-interceptor').default.SqliteCacheStore
}
const install: typeof globalThisInstall
}
@@ -0,0 +1,388 @@
import { Minimatch } from 'minimatch';
import { Minipass } from 'minipass';
import { FSOption, Path, PathScurry } from 'path-scurry';
import { IgnoreLike } from './ignore.js';
import { Pattern } from './pattern.js';
export type MatchSet = Minimatch['set'];
export type GlobParts = Exclude<Minimatch['globParts'], undefined>;
/**
* A `GlobOptions` object may be provided to any of the exported methods, and
* must be provided to the `Glob` constructor.
*
* All options are optional, boolean, and false by default, unless otherwise
* noted.
*
* All resolved options are added to the Glob object as properties.
*
* If you are running many `glob` operations, you can pass a Glob object as the
* `options` argument to a subsequent operation to share the previously loaded
* cache.
*/
export interface GlobOptions {
/**
* Set to `true` to always receive absolute paths for
* matched files. Set to `false` to always return relative paths.
*
* When this option is not set, absolute paths are returned for patterns
* that are absolute, and otherwise paths are returned that are relative
* to the `cwd` setting.
*
* This does _not_ make an extra system call to get
* the realpath, it only does string path resolution.
*
* Conflicts with {@link withFileTypes}
*/
absolute?: boolean;
/**
* Set to false to enable {@link windowsPathsNoEscape}
*
* @deprecated
*/
allowWindowsEscape?: boolean;
/**
* The current working directory in which to search. Defaults to
* `process.cwd()`.
*
* May be eiher a string path or a `file://` URL object or string.
*/
cwd?: string | URL;
/**
* Include `.dot` files in normal matches and `globstar`
* matches. Note that an explicit dot in a portion of the pattern
* will always match dot files.
*/
dot?: boolean;
/**
* Prepend all relative path strings with `./` (or `.\` on Windows).
*
* Without this option, returned relative paths are "bare", so instead of
* returning `'./foo/bar'`, they are returned as `'foo/bar'`.
*
* Relative patterns starting with `'../'` are not prepended with `./`, even
* if this option is set.
*/
dotRelative?: boolean;
/**
* Follow symlinked directories when expanding `**`
* patterns. This can result in a lot of duplicate references in
* the presence of cyclic links, and make performance quite bad.
*
* By default, a `**` in a pattern will follow 1 symbolic link if
* it is not the first item in the pattern, or none if it is the
* first item in the pattern, following the same behavior as Bash.
*/
follow?: boolean;
/**
* string or string[], or an object with `ignore` and `ignoreChildren`
* methods.
*
* If a string or string[] is provided, then this is treated as a glob
* pattern or array of glob patterns to exclude from matches. To ignore all
* children within a directory, as well as the entry itself, append `'/**'`
* to the ignore pattern.
*
* **Note** `ignore` patterns are _always_ in `dot:true` mode, regardless of
* any other settings.
*
* If an object is provided that has `ignored(path)` and/or
* `childrenIgnored(path)` methods, then these methods will be called to
* determine whether any Path is a match or if its children should be
* traversed, respectively.
*/
ignore?: string | string[] | IgnoreLike;
/**
* Treat brace expansion like `{a,b}` as a "magic" pattern. Has no
* effect if {@link nobrace} is set.
*
* Only has effect on the {@link hasMagic} function.
*/
magicalBraces?: boolean;
/**
* Add a `/` character to directory matches. Note that this requires
* additional stat calls in some cases.
*/
mark?: boolean;
/**
* Perform a basename-only match if the pattern does not contain any slash
* characters. That is, `*.js` would be treated as equivalent to
* `**\/*.js`, matching all js files in all directories.
*/
matchBase?: boolean;
/**
* Limit the directory traversal to a given depth below the cwd.
* Note that this does NOT prevent traversal to sibling folders,
* root patterns, and so on. It only limits the maximum folder depth
* that the walk will descend, relative to the cwd.
*/
maxDepth?: number;
/**
* Do not expand `{a,b}` and `{1..3}` brace sets.
*/
nobrace?: boolean;
/**
* Perform a case-insensitive match. This defaults to `true` on macOS and
* Windows systems, and `false` on all others.
*
* **Note** `nocase` should only be explicitly set when it is
* known that the filesystem's case sensitivity differs from the
* platform default. If set `true` on case-sensitive file
* systems, or `false` on case-insensitive file systems, then the
* walk may return more or less results than expected.
*/
nocase?: boolean;
/**
* Do not match directories, only files. (Note: to match
* _only_ directories, put a `/` at the end of the pattern.)
*/
nodir?: boolean;
/**
* Do not match "extglob" patterns such as `+(a|b)`.
*/
noext?: boolean;
/**
* Do not match `**` against multiple filenames. (Ie, treat it as a normal
* `*` instead.)
*
* Conflicts with {@link matchBase}
*/
noglobstar?: boolean;
/**
* Defaults to value of `process.platform` if available, or `'linux'` if
* not. Setting `platform:'win32'` on non-Windows systems may cause strange
* behavior.
*/
platform?: NodeJS.Platform;
/**
* Set to true to call `fs.realpath` on all of the
* results. In the case of an entry that cannot be resolved, the
* entry is omitted. This incurs a slight performance penalty, of
* course, because of the added system calls.
*/
realpath?: boolean;
/**
*
* A string path resolved against the `cwd` option, which
* is used as the starting point for absolute patterns that start
* with `/`, (but not drive letters or UNC paths on Windows).
*
* Note that this _doesn't_ necessarily limit the walk to the
* `root` directory, and doesn't affect the cwd starting point for
* non-absolute patterns. A pattern containing `..` will still be
* able to traverse out of the root directory, if it is not an
* actual root directory on the filesystem, and any non-absolute
* patterns will be matched in the `cwd`. For example, the
* pattern `/../*` with `{root:'/some/path'}` will return all
* files in `/some`, not all files in `/some/path`. The pattern
* `*` with `{root:'/some/path'}` will return all the entries in
* the cwd, not the entries in `/some/path`.
*
* To start absolute and non-absolute patterns in the same
* path, you can use `{root:''}`. However, be aware that on
* Windows systems, a pattern like `x:/*` or `//host/share/*` will
* _always_ start in the `x:/` or `//host/share` directory,
* regardless of the `root` setting.
*/
root?: string;
/**
* A [PathScurry](http://npm.im/path-scurry) object used
* to traverse the file system. If the `nocase` option is set
* explicitly, then any provided `scurry` object must match this
* setting.
*/
scurry?: PathScurry;
/**
* Call `lstat()` on all entries, whether required or not to determine
* if it's a valid match. When used with {@link withFileTypes}, this means
* that matches will include data such as modified time, permissions, and
* so on. Note that this will incur a performance cost due to the added
* system calls.
*/
stat?: boolean;
/**
* An AbortSignal which will cancel the Glob walk when
* triggered.
*/
signal?: AbortSignal;
/**
* Use `\\` as a path separator _only_, and
* _never_ as an escape character. If set, all `\\` characters are
* replaced with `/` in the pattern.
*
* Note that this makes it **impossible** to match against paths
* containing literal glob pattern characters, but allows matching
* with patterns constructed using `path.join()` and
* `path.resolve()` on Windows platforms, mimicking the (buggy!)
* behavior of Glob v7 and before on Windows. Please use with
* caution, and be mindful of [the caveat below about Windows
* paths](#windows). (For legacy reasons, this is also set if
* `allowWindowsEscape` is set to the exact value `false`.)
*/
windowsPathsNoEscape?: boolean;
/**
* Return [PathScurry](http://npm.im/path-scurry)
* `Path` objects instead of strings. These are similar to a
* NodeJS `Dirent` object, but with additional methods and
* properties.
*
* Conflicts with {@link absolute}
*/
withFileTypes?: boolean;
/**
* An fs implementation to override some or all of the defaults. See
* http://npm.im/path-scurry for details about what can be overridden.
*/
fs?: FSOption;
/**
* Just passed along to Minimatch. Note that this makes all pattern
* matching operations slower and *extremely* noisy.
*/
debug?: boolean;
/**
* Return `/` delimited paths, even on Windows.
*
* On posix systems, this has no effect. But, on Windows, it means that
* paths will be `/` delimited, and absolute paths will be their full
* resolved UNC forms, eg instead of `'C:\\foo\\bar'`, it would return
* `'//?/C:/foo/bar'`
*/
posix?: boolean;
/**
* Do not match any children of any matches. For example, the pattern
* `**\/foo` would match `a/foo`, but not `a/foo/b/foo` in this mode.
*
* This is especially useful for cases like "find all `node_modules`
* folders, but not the ones in `node_modules`".
*
* In order to support this, the `Ignore` implementation must support an
* `add(pattern: string)` method. If using the default `Ignore` class, then
* this is fine, but if this is set to `false`, and a custom `Ignore` is
* provided that does not have an `add()` method, then it will throw an
* error.
*
* **Caveat** It *only* ignores matches that would be a descendant of a
* previous match, and only if that descendant is matched *after* the
* ancestor is encountered. Since the file system walk happens in
* indeterminate order, it's possible that a match will already be added
* before its ancestor, if multiple or braced patterns are used.
*
* For example:
*
* ```ts
* const results = await glob([
* // likely to match first, since it's just a stat
* 'a/b/c/d/e/f',
*
* // this pattern is more complicated! It must to various readdir()
* // calls and test the results against a regular expression, and that
* // is certainly going to take a little bit longer.
* //
* // So, later on, it encounters a match at 'a/b/c/d/e', but it's too
* // late to ignore a/b/c/d/e/f, because it's already been emitted.
* 'a/[bdf]/?/[a-z]/*',
* ], { includeChildMatches: false })
* ```
*
* It's best to only set this to `false` if you can be reasonably sure that
* no components of the pattern will potentially match one another's file
* system descendants, or if the occasional included child entry will not
* cause problems.
*
* @default true
*/
includeChildMatches?: boolean;
}
export type GlobOptionsWithFileTypesTrue = GlobOptions & {
withFileTypes: true;
absolute?: undefined;
mark?: undefined;
posix?: undefined;
};
export type GlobOptionsWithFileTypesFalse = GlobOptions & {
withFileTypes?: false;
};
export type GlobOptionsWithFileTypesUnset = GlobOptions & {
withFileTypes?: undefined;
};
export type Result<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? Path : Opts extends GlobOptionsWithFileTypesFalse ? string : Opts extends GlobOptionsWithFileTypesUnset ? string : string | Path;
export type Results<Opts> = Result<Opts>[];
export type FileTypes<Opts> = Opts extends GlobOptionsWithFileTypesTrue ? true : Opts extends GlobOptionsWithFileTypesFalse ? false : Opts extends GlobOptionsWithFileTypesUnset ? false : boolean;
/**
* An object that can perform glob pattern traversals.
*/
export declare class Glob<Opts extends GlobOptions> implements GlobOptions {
absolute?: boolean;
cwd: string;
root?: string;
dot: boolean;
dotRelative: boolean;
follow: boolean;
ignore?: string | string[] | IgnoreLike;
magicalBraces: boolean;
mark?: boolean;
matchBase: boolean;
maxDepth: number;
nobrace: boolean;
nocase: boolean;
nodir: boolean;
noext: boolean;
noglobstar: boolean;
pattern: string[];
platform: NodeJS.Platform;
realpath: boolean;
scurry: PathScurry;
stat: boolean;
signal?: AbortSignal;
windowsPathsNoEscape: boolean;
withFileTypes: FileTypes<Opts>;
includeChildMatches: boolean;
/**
* The options provided to the constructor.
*/
opts: Opts;
/**
* An array of parsed immutable {@link Pattern} objects.
*/
patterns: Pattern[];
/**
* All options are stored as properties on the `Glob` object.
*
* See {@link GlobOptions} for full options descriptions.
*
* Note that a previous `Glob` object can be passed as the
* `GlobOptions` to another `Glob` instantiation to re-use settings
* and caches with a new pattern.
*
* Traversal functions can be called multiple times to run the walk
* again.
*/
constructor(pattern: string | string[], opts: Opts);
/**
* Returns a Promise that resolves to the results array.
*/
walk(): Promise<Results<Opts>>;
/**
* synchronous {@link Glob.walk}
*/
walkSync(): Results<Opts>;
/**
* Stream results asynchronously.
*/
stream(): Minipass<Result<Opts>, Result<Opts>>;
/**
* Stream results synchronously.
*/
streamSync(): Minipass<Result<Opts>, Result<Opts>>;
/**
* Default sync iteration function. Returns a Generator that
* iterates over the results.
*/
iterateSync(): Generator<Result<Opts>, void, void>;
[Symbol.iterator](): Generator<Result<Opts>, void, void>;
/**
* Default async iteration function. Returns an AsyncGenerator that
* iterates over the results.
*/
iterate(): AsyncGenerator<Result<Opts>, void, void>;
[Symbol.asyncIterator](): AsyncGenerator<Result<Opts>, void, void>;
}
//# sourceMappingURL=glob.d.ts.map
@@ -0,0 +1,9 @@
/**
* 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.
*
*/
import{useLexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{useLexicalEditable as e}from"@lexical/react/useLexicalEditable";import{$canShowPlaceholderCurry as r}from"@lexical/text";import{mergeRegister as o}from"@lexical/utils";import{useLayoutEffect as n,useEffect as i,useState as c,useMemo as l,Suspense as a}from"react";import{flushSync as u,createPortal as m}from"react-dom";import{jsx as s,jsxs as d,Fragment as f}from"react/jsx-runtime";import{registerDragonSupport as p}from"@lexical/dragon";import{registerPlainText as x}from"@lexical/plain-text";const g="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?n:i;function E(t){return t.getEditorState().read(r(t.isComposing()))}function h({contentEditable:e,placeholder:r=null,ErrorBoundary:n}){const[E]=t(),h=function(t,e){const[r,o]=c((()=>t.getDecorators()));return g((()=>t.registerDecoratorListener((t=>{u((()=>{o(t)}))}))),[t]),i((()=>{o(t.getDecorators())}),[t]),l((()=>{const o=[],n=Object.keys(r);for(let i=0;i<n.length;i++){const c=n[i],l=s(e,{onError:e=>t._onError(e),children:s(a,{fallback:null,children:r[c]})}),u=t.getElementByKey(c);null!==u&&o.push(m(l,u,c))}return o}),[e,r,t])}(E,n);return function(t){g((()=>o(x(t),p(t))),[t])}(E),d(f,{children:[e,s(w,{content:r}),h]})}function w({content:r}){const[n]=t(),i=function(t){const[e,r]=c((()=>E(t)));return g((()=>{function e(){const e=E(t);r(e)}return e(),o(t.registerUpdateListener((()=>{e()})),t.registerEditableListener((()=>{e()})))}),[t]),e}(n),l=e();return i?"function"==typeof r?r(l):r:null}export{h as PlainTextPlugin};
@@ -0,0 +1 @@
{"version":3,"file":"vercelWaitUntil.d.ts","sourceRoot":"","sources":["../../../src/utils/vercelWaitUntil.ts"],"names":[],"mappings":"AAYA;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,IAAI,CAe5D"}
@@ -0,0 +1,24 @@
/**
* @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 PaintbrushVertical = createLucideIcon("PaintbrushVertical", [
["path", { d: "M10 2v2", key: "7u0qdc" }],
["path", { d: "M14 2v4", key: "qmzblu" }],
["path", { d: "M17 2a1 1 0 0 1 1 1v9H6V3a1 1 0 0 1 1-1z", key: "ycvu00" }],
[
"path",
{
d: "M6 12a1 1 0 0 0-1 1v1a2 2 0 0 0 2 2h2a1 1 0 0 1 1 1v2.9a2 2 0 1 0 4 0V17a1 1 0 0 1 1-1h2a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1",
key: "iw4wnp"
}
]
]);
export { PaintbrushVertical as default };
//# sourceMappingURL=paintbrush-vertical.js.map
@@ -0,0 +1,12 @@
{
"printWidth": 140,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "lf"
}
@@ -0,0 +1,36 @@
import { toDate } from "./toDate.js";
/**
* The {@link startOfSecond} function options.
*/
/**
* @name startOfSecond
* @category Second Helpers
* @summary Return the start of a second for the given date.
*
* @description
* Return the start of a second for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - The options
*
* @returns The start of a second
*
* @example
* // The start of a second for 1 December 2014 22:15:45.400:
* const result = startOfSecond(new Date(2014, 11, 1, 22, 15, 45, 400))
* //=> Mon Dec 01 2014 22:15:45.000
*/
export function startOfSecond(date, options) {
const date_ = toDate(date, options?.in);
date_.setMilliseconds(0);
return date_;
}
// Fallback for modularized imports:
export default startOfSecond;
@@ -0,0 +1,22 @@
import { DirectusPolicy } from "../../../schema/policy.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/delete/policies.d.ts
/**
* Delete multiple existing policies
* @param keys
* @returns
* @throws Will throw if keys is empty
*/
declare const deletePolicies: <Schema>(keys: DirectusPolicy<Schema>["id"][]) => RestCommand<void, Schema>;
/**
* Delete an existing policy
* @param key
* @returns
* @throws Will throw if key is empty
*/
declare const deletePolicy: <Schema>(key: DirectusPolicy<Schema>["id"]) => RestCommand<void, Schema>;
//#endregion
export { deletePolicies, deletePolicy };
//# sourceMappingURL=policies.d.cts.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 N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 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 4C 5C","132":"6B XC 7B","450":"yB zB 0B 1B 2B 3B 4B 5B WC"},D:{"1":"0 1 2 3 4 5 6 7 8 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","706":"1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC"},E:{"1":"M G 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 B C 6C bC 7C 8C 9C AD cC PC","1028":"L QC BD"},F:{"1":"0 1 2 3 4 5 6 7 8 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 rB sB tB uB vB wB xB yB zB 0B JD KD LD MD PC xC ND QC","706":"1B 2B 3B"},G:{"1":"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 WD XD YD ZD"},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 cC yD zD 0D 1D 2D SC TC UC 3D","2":"J tD uD vD wD xD"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"7D","2":"6D"}},B:6,C:"TLS 1.3",D:true};
@@ -0,0 +1,62 @@
export declare const cuid: RegExp;
export declare const cuid2: RegExp;
export declare const ulid: RegExp;
export declare const xid: RegExp;
export declare const ksuid: RegExp;
export declare const nanoid: RegExp;
/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
export declare const duration: RegExp;
/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */
export declare const extendedDuration: RegExp;
/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
export declare const guid: RegExp;
/** Returns a regex for validating an RFC 4122 UUID.
*
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
export declare const uuid: (version?: number | undefined) => RegExp;
export declare const uuid4: RegExp;
export declare const uuid6: RegExp;
export declare const uuid7: RegExp;
/** Practical email validation */
export declare const email: RegExp;
/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */
export declare const html5Email: RegExp;
/** The classic emailregex.com regex for RFC 5322-compliant emails */
export declare const rfc5322Email: RegExp;
/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */
export declare const unicodeEmail: RegExp;
export declare const browserEmail: RegExp;
export declare const _emoji = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
export declare function emoji(): RegExp;
export declare const ipv4: RegExp;
export declare const ipv6: RegExp;
export declare const cidrv4: RegExp;
export declare const cidrv6: RegExp;
export declare const base64: RegExp;
export declare const base64url: RegExp;
export declare const hostname: RegExp;
export declare const domain: RegExp;
export declare const e164: RegExp;
export declare const date: RegExp;
export declare function time(args: {
precision?: number | null;
}): RegExp;
export declare function datetime(args: {
precision?: number | null;
offset?: boolean;
local?: boolean;
}): RegExp;
export declare const string: (params?: {
minimum?: number | undefined;
maximum?: number | undefined;
}) => RegExp;
export declare const bigint: RegExp;
export declare const integer: RegExp;
export declare const number: RegExp;
export declare const boolean: RegExp;
declare const _null: RegExp;
export { _null as null };
declare const _undefined: RegExp;
export { _undefined as undefined };
export declare const lowercase: RegExp;
export declare const uppercase: RegExp;
@@ -0,0 +1,20 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Landmark = createLucideIcon("Landmark", [
["line", { x1: "3", x2: "21", y1: "22", y2: "22", key: "j8o0r" }],
["line", { x1: "6", x2: "6", y1: "18", y2: "11", key: "10tf0k" }],
["line", { x1: "10", x2: "10", y1: "18", y2: "11", key: "54lgf6" }],
["line", { x1: "14", x2: "14", y1: "18", y2: "11", key: "380y" }],
["line", { x1: "18", x2: "18", y1: "18", y2: "11", key: "1kevvc" }],
["polygon", { points: "12 2 20 7 4 7", key: "jkujk7" }]
]);
export { Landmark as default };
//# sourceMappingURL=landmark.js.map
@@ -0,0 +1,33 @@
import type { CollectionSlug } from '../../index.js';
import type { PayloadRequest, Where } from '../../types/index.js';
import type { FolderSortKeys, GetFolderDataResult } from '../types.js';
type Args = {
/**
* Specify to query documents from a specific collection
* @default undefined
* @example 'posts'
*/
collectionSlug?: CollectionSlug;
/**
* Optional where clause to filter documents by
* @default undefined
*/
documentWhere?: Where;
/**
* The ID of the folder to query documents from
* @default undefined
*/
folderID?: number | string;
/** Optional where clause to filter subfolders by
* @default undefined
*/
folderWhere?: Where;
req: PayloadRequest;
sort: FolderSortKeys;
};
/**
* Query for documents, subfolders and breadcrumbs for a given folder
*/
export declare const getFolderData: ({ collectionSlug, documentWhere, folderID: _folderID, folderWhere, req, sort, }: Args) => Promise<GetFolderDataResult>;
export {};
//# sourceMappingURL=getFolderData.d.ts.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E zC","260":"F A B"},B:{"1":"0 1 2 3 4 5 6 7 8 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0C VC J bB K D E F A B C L M 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"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","132":"jB kB lB mB nB oB pB qB rB sB tB uB vB wB"},E:{"1":"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 F A B 6C bC 7C 8C AD cC","132":"E 9C"},F:{"1":"0 1 2 3 4 5 6 7 8 kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z QC","2":"9 G N O P cB AB BB","4":"B C KD LD MD PC xC ND","16":"F JD","132":"CB DB EB FB GB HB IB dB eB fB gB hB iB jB"},G:{"1":"YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"bC OD yC PD QD RD TD UD VD WD XD","132":"E SD"},H:{"1":"mD"},I:{"1":"I","2":"VC J nD oD pD qD yC rD sD"},J:{"2":"D","132":"A"},K:{"1":"H QC","4":"A B C PC xC"},L:{"1":"I"},M:{"1":"OC"},N:{"1":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","132":"J"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:4,C:"SVG fragment identifiers",D:true};
@@ -0,0 +1,21 @@
// Flatten rows to object with path keys
// for easier retrieval
export const createPathMap = (rows)=>{
let rowsByPath = {};
if (Array.isArray(rows)) {
rowsByPath = rows.reduce((res, row)=>{
const formattedRow = {
...row
};
delete formattedRow.path;
if (!res[row.path]) {
res[row.path] = [];
}
res[row.path].push(row);
return res;
}, {});
}
return rowsByPath;
};
//# sourceMappingURL=createRelationshipMap.js.map
@@ -0,0 +1 @@
{"version":3,"file":"diamond-plus.js","sources":["../../../src/icons/diamond-plus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name DiamondPlus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgOHY4IiAvPgogIDxwYXRoIGQ9Ik0yLjcgMTAuM2EyLjQxIDIuNDEgMCAwIDAgMCAzLjQxbDcuNTkgNy41OWEyLjQxIDIuNDEgMCAwIDAgMy40MSAwbDcuNTktNy41OWEyLjQxIDIuNDEgMCAwIDAgMC0zLjQxTDEzLjcgMi43MWEyLjQxIDIuNDEgMCAwIDAtMy40MSAweiIgLz4KICA8cGF0aCBkPSJNOCAxMmg4IiAvPgo8L3N2Zz4=) - https://lucide.dev/icons/diamond-plus\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 DiamondPlus = createLucideIcon('DiamondPlus', [\n ['path', { d: 'M12 8v8', key: 'napkw2' }],\n [\n 'path',\n {\n d: 'M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z',\n key: '1ey20j',\n },\n ],\n ['path', { d: 'M8 12h8', key: '1wcyev' }],\n]);\n\nexport default DiamondPlus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,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,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,4 @@
export declare const getHours: import("./types.js").FPFn1<
number,
string | number | Date
>;
@@ -0,0 +1,3 @@
export { featureFlagsIntegration, FeatureFlagsIntegration } from './featureFlagsIntegration';
export { growthbookIntegration } from './growthbook';
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,84 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
class Binding {
constructor({
identifier,
scope,
path,
kind
}) {
this.identifier = void 0;
this.scope = void 0;
this.path = void 0;
this.kind = void 0;
this.constantViolations = [];
this.constant = true;
this.referencePaths = [];
this.referenced = false;
this.references = 0;
this.identifier = identifier;
this.scope = scope;
this.path = path;
this.kind = kind;
if ((kind === "var" || kind === "hoisted") && isInitInLoop(path)) {
this.reassign(path);
}
this.clearValue();
}
deoptValue() {
this.clearValue();
this.hasDeoptedValue = true;
}
setValue(value) {
if (this.hasDeoptedValue) return;
this.hasValue = true;
this.value = value;
}
clearValue() {
this.hasDeoptedValue = false;
this.hasValue = false;
this.value = null;
}
reassign(path) {
this.constant = false;
if (this.constantViolations.includes(path)) {
return;
}
this.constantViolations.push(path);
}
reference(path) {
if (this.referencePaths.includes(path)) {
return;
}
this.referenced = true;
this.references++;
this.referencePaths.push(path);
}
dereference() {
this.references--;
this.referenced = !!this.references;
}
}
exports.default = Binding;
function isInitInLoop(path) {
const isFunctionDeclarationOrHasInit = !path.isVariableDeclarator() || path.node.init;
for (let {
parentPath,
key
} = path; parentPath; {
parentPath,
key
} = parentPath) {
if (parentPath.isFunctionParent()) return false;
if (key === "left" && parentPath.isForXStatement() || isFunctionDeclarationOrHasInit && key === "body" && parentPath.isLoop()) {
return true;
}
}
return false;
}
//# sourceMappingURL=binding.js.map
@@ -0,0 +1,338 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.printIntrospectionSchema = printIntrospectionSchema;
exports.printSchema = printSchema;
exports.printType = printType;
var _inspect = require('../jsutils/inspect.js');
var _invariant = require('../jsutils/invariant.js');
var _blockString = require('../language/blockString.js');
var _kinds = require('../language/kinds.js');
var _printer = require('../language/printer.js');
var _definition = require('../type/definition.js');
var _directives = require('../type/directives.js');
var _introspection = require('../type/introspection.js');
var _scalars = require('../type/scalars.js');
var _astFromValue = require('./astFromValue.js');
function printSchema(schema) {
return printFilteredSchema(
schema,
(n) => !(0, _directives.isSpecifiedDirective)(n),
isDefinedType,
);
}
function printIntrospectionSchema(schema) {
return printFilteredSchema(
schema,
_directives.isSpecifiedDirective,
_introspection.isIntrospectionType,
);
}
function isDefinedType(type) {
return (
!(0, _scalars.isSpecifiedScalarType)(type) &&
!(0, _introspection.isIntrospectionType)(type)
);
}
function printFilteredSchema(schema, directiveFilter, typeFilter) {
const directives = schema.getDirectives().filter(directiveFilter);
const types = Object.values(schema.getTypeMap()).filter(typeFilter);
return [
printSchemaDefinition(schema),
...directives.map((directive) => printDirective(directive)),
...types.map((type) => printType(type)),
]
.filter(Boolean)
.join('\n\n');
}
function printSchemaDefinition(schema) {
if (schema.description == null && isSchemaOfCommonNames(schema)) {
return;
}
const operationTypes = [];
const queryType = schema.getQueryType();
if (queryType) {
operationTypes.push(` query: ${queryType.name}`);
}
const mutationType = schema.getMutationType();
if (mutationType) {
operationTypes.push(` mutation: ${mutationType.name}`);
}
const subscriptionType = schema.getSubscriptionType();
if (subscriptionType) {
operationTypes.push(` subscription: ${subscriptionType.name}`);
}
return printDescription(schema) + `schema {\n${operationTypes.join('\n')}\n}`;
}
/**
* GraphQL schema define root types for each type of operation. These types are
* the same as any other type and can be named in any manner, however there is
* a common naming convention:
*
* ```graphql
* schema {
* query: Query
* mutation: Mutation
* subscription: Subscription
* }
* ```
*
* When using this naming convention, the schema description can be omitted.
*/
function isSchemaOfCommonNames(schema) {
const queryType = schema.getQueryType();
if (queryType && queryType.name !== 'Query') {
return false;
}
const mutationType = schema.getMutationType();
if (mutationType && mutationType.name !== 'Mutation') {
return false;
}
const subscriptionType = schema.getSubscriptionType();
if (subscriptionType && subscriptionType.name !== 'Subscription') {
return false;
}
return true;
}
function printType(type) {
if ((0, _definition.isScalarType)(type)) {
return printScalar(type);
}
if ((0, _definition.isObjectType)(type)) {
return printObject(type);
}
if ((0, _definition.isInterfaceType)(type)) {
return printInterface(type);
}
if ((0, _definition.isUnionType)(type)) {
return printUnion(type);
}
if ((0, _definition.isEnumType)(type)) {
return printEnum(type);
}
if ((0, _definition.isInputObjectType)(type)) {
return printInputObject(type);
}
/* c8 ignore next 3 */
// Not reachable, all possible types have been considered.
false ||
(0, _invariant.invariant)(
false,
'Unexpected type: ' + (0, _inspect.inspect)(type),
);
}
function printScalar(type) {
return (
printDescription(type) + `scalar ${type.name}` + printSpecifiedByURL(type)
);
}
function printImplementedInterfaces(type) {
const interfaces = type.getInterfaces();
return interfaces.length
? ' implements ' + interfaces.map((i) => i.name).join(' & ')
: '';
}
function printObject(type) {
return (
printDescription(type) +
`type ${type.name}` +
printImplementedInterfaces(type) +
printFields(type)
);
}
function printInterface(type) {
return (
printDescription(type) +
`interface ${type.name}` +
printImplementedInterfaces(type) +
printFields(type)
);
}
function printUnion(type) {
const types = type.getTypes();
const possibleTypes = types.length ? ' = ' + types.join(' | ') : '';
return printDescription(type) + 'union ' + type.name + possibleTypes;
}
function printEnum(type) {
const values = type
.getValues()
.map(
(value, i) =>
printDescription(value, ' ', !i) +
' ' +
value.name +
printDeprecated(value.deprecationReason),
);
return printDescription(type) + `enum ${type.name}` + printBlock(values);
}
function printInputObject(type) {
const fields = Object.values(type.getFields()).map(
(f, i) => printDescription(f, ' ', !i) + ' ' + printInputValue(f),
);
return (
printDescription(type) +
`input ${type.name}` +
(type.isOneOf ? ' @oneOf' : '') +
printBlock(fields)
);
}
function printFields(type) {
const fields = Object.values(type.getFields()).map(
(f, i) =>
printDescription(f, ' ', !i) +
' ' +
f.name +
printArgs(f.args, ' ') +
': ' +
String(f.type) +
printDeprecated(f.deprecationReason),
);
return printBlock(fields);
}
function printBlock(items) {
return items.length !== 0 ? ' {\n' + items.join('\n') + '\n}' : '';
}
function printArgs(args, indentation = '') {
if (args.length === 0) {
return '';
} // If every arg does not have a description, print them on one line.
if (args.every((arg) => !arg.description)) {
return '(' + args.map(printInputValue).join(', ') + ')';
}
return (
'(\n' +
args
.map(
(arg, i) =>
printDescription(arg, ' ' + indentation, !i) +
' ' +
indentation +
printInputValue(arg),
)
.join('\n') +
'\n' +
indentation +
')'
);
}
function printInputValue(arg) {
const defaultAST = (0, _astFromValue.astFromValue)(
arg.defaultValue,
arg.type,
);
let argDecl = arg.name + ': ' + String(arg.type);
if (defaultAST) {
argDecl += ` = ${(0, _printer.print)(defaultAST)}`;
}
return argDecl + printDeprecated(arg.deprecationReason);
}
function printDirective(directive) {
return (
printDescription(directive) +
'directive @' +
directive.name +
printArgs(directive.args) +
(directive.isRepeatable ? ' repeatable' : '') +
' on ' +
directive.locations.join(' | ')
);
}
function printDeprecated(reason) {
if (reason == null) {
return '';
}
if (reason !== _directives.DEFAULT_DEPRECATION_REASON) {
const astValue = (0, _printer.print)({
kind: _kinds.Kind.STRING,
value: reason,
});
return ` @deprecated(reason: ${astValue})`;
}
return ' @deprecated';
}
function printSpecifiedByURL(scalar) {
if (scalar.specifiedByURL == null) {
return '';
}
const astValue = (0, _printer.print)({
kind: _kinds.Kind.STRING,
value: scalar.specifiedByURL,
});
return ` @specifiedBy(url: ${astValue})`;
}
function printDescription(def, indentation = '', firstInBlock = true) {
const { description } = def;
if (description == null) {
return '';
}
const blockString = (0, _printer.print)({
kind: _kinds.Kind.STRING,
value: description,
block: (0, _blockString.isPrintableAsBlockString)(description),
});
const prefix =
indentation && !firstInBlock ? '\n' + indentation : indentation;
return prefix + blockString.replace(/\n/g, '\n' + indentation) + '\n';
}
@@ -0,0 +1,11 @@
export const sanitizeSortParams = (sort)=>{
if (typeof sort === 'string') {
return sort.split(',');
}
if (Array.isArray(sort) && sort.every((value)=>typeof value === 'string')) {
return sort;
}
return undefined;
};
//# sourceMappingURL=sanitizeSortParams.js.map
@@ -0,0 +1,112 @@
import type {
CodeKeywordDefinition,
ErrorObject,
KeywordErrorDefinition,
SchemaMap,
AnySchema,
} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, str} from "../../compile/codegen"
import {alwaysValidSchema} from "../../compile/util"
import {checkReportMissingProp, checkMissingProp, reportMissingProp, propertyInData} from "../code"
export type PropertyDependencies = {[K in string]?: string[]}
export interface DependenciesErrorParams {
property: string
missingProperty: string
depsCount: number
deps: string // TODO change to string[]
}
type SchemaDependencies = SchemaMap
export type DependenciesError = ErrorObject<
"dependencies",
DependenciesErrorParams,
{[K in string]?: string[] | AnySchema}
>
export const error: KeywordErrorDefinition = {
message: ({params: {property, depsCount, deps}}) => {
const property_ies = depsCount === 1 ? "property" : "properties"
return str`must have ${property_ies} ${deps} when property ${property} is present`
},
params: ({params: {property, depsCount, deps, missingProperty}}) =>
_`{property: ${property},
missingProperty: ${missingProperty},
depsCount: ${depsCount},
deps: ${deps}}`, // TODO change to reference
}
const def: CodeKeywordDefinition = {
keyword: "dependencies",
type: "object",
schemaType: "object",
error,
code(cxt: KeywordCxt) {
const [propDeps, schDeps] = splitDependencies(cxt)
validatePropertyDeps(cxt, propDeps)
validateSchemaDeps(cxt, schDeps)
},
}
function splitDependencies({schema}: KeywordCxt): [PropertyDependencies, SchemaDependencies] {
const propertyDeps: PropertyDependencies = {}
const schemaDeps: SchemaDependencies = {}
for (const key in schema) {
if (key === "__proto__") continue
const deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps
deps[key] = schema[key]
}
return [propertyDeps, schemaDeps]
}
export function validatePropertyDeps(
cxt: KeywordCxt,
propertyDeps: {[K in string]?: string[]} = cxt.schema
): void {
const {gen, data, it} = cxt
if (Object.keys(propertyDeps).length === 0) return
const missing = gen.let("missing")
for (const prop in propertyDeps) {
const deps = propertyDeps[prop] as string[]
if (deps.length === 0) continue
const hasProperty = propertyInData(gen, data, prop, it.opts.ownProperties)
cxt.setParams({
property: prop,
depsCount: deps.length,
deps: deps.join(", "),
})
if (it.allErrors) {
gen.if(hasProperty, () => {
for (const depProp of deps) {
checkReportMissingProp(cxt, depProp)
}
})
} else {
gen.if(_`${hasProperty} && (${checkMissingProp(cxt, deps, missing)})`)
reportMissingProp(cxt, missing)
gen.else()
}
}
}
export function validateSchemaDeps(cxt: KeywordCxt, schemaDeps: SchemaMap = cxt.schema): void {
const {gen, data, keyword, it} = cxt
const valid = gen.name("valid")
for (const prop in schemaDeps) {
if (alwaysValidSchema(it, schemaDeps[prop] as AnySchema)) continue
gen.if(
propertyInData(gen, data, prop, it.opts.ownProperties),
() => {
const schCxt = cxt.subschema({keyword, schemaProp: prop}, valid)
cxt.mergeValidEvaluated(schCxt, valid)
},
() => gen.var(valid, true) // TODO var
)
cxt.ok(valid)
}
}
export default def
@@ -0,0 +1,29 @@
import { status as httpStatus } from 'http-status';
import { getRequestCollectionWithID } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { parseParams } from '../../utilities/parseParams/index.js';
import { restoreVersionOperation } from '../operations/restoreVersion.js';
export const restoreVersionHandler = async (req)=>{
const { id, collection } = getRequestCollectionWithID(req);
const { depth, draft, populate } = parseParams(req.query);
const result = await restoreVersionOperation({
id,
collection,
depth,
draft,
populate,
req
});
return Response.json({
...result,
message: req.t('version:restoredSuccessfully')
}, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=restoreVersion.js.map
@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "eeee 'dernier à' p",
yesterday: "'hier à' p",
today: "'aujourd’hui à' p",
tomorrow: "'demain à' p'",
nextWeek: "eeee 'prochain à' p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
@@ -0,0 +1,5 @@
export declare const addQuarters: import("./types.js").FPFn2<
Date,
number,
import("../fp.js").DateArg<Date>
>;
@@ -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 O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N"},C:{"1":"0 1 2 3 4 5 6 7 8 wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"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 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"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","194":"zB 0B"},E:{"1":"A B C L M G cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID","2":"J bB K D E F 6C bC 7C 8C 9C AD"},F:{"1":"0 1 2 3 4 5 6 7 8 oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"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 JD KD LD MD PC xC ND QC","194":"nB"},G:{"1":"VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","2":"E bC OD yC PD QD RD SD TD UD"},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 uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D","2":"J tD"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"7D","2":"6D"}},B:1,C:"DOM manipulation convenience methods",D:true};
@@ -0,0 +1,6 @@
export declare const lastDayOfDecadeWithOptions: import("./types.js").FPFn2<
Date,
| import("../lastDayOfDecade.js").LastDayOfDecadeOptions<Date>
| undefined,
import("../fp.js").DateArg<Date>
>;
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/GridView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,YAAY,yBAoCxB,CAAA"}
@@ -0,0 +1,260 @@
# use-context-selector
[![CI](https://img.shields.io/github/actions/workflow/status/dai-shi/use-context-selector/ci.yml?branch=main)](https://github.com/dai-shi/use-context-selector/actions?query=workflow%3ACI)
[![npm](https://img.shields.io/npm/v/use-context-selector)](https://www.npmjs.com/package/use-context-selector)
[![size](https://img.shields.io/bundlephobia/minzip/use-context-selector)](https://bundlephobia.com/result?p=use-context-selector)
[![discord](https://img.shields.io/discord/627656437971288081)](https://discord.gg/MrQdmzd)
React useContextSelector hook in userland
## Introduction
React Context and useContext is often used to avoid prop drilling,
however it's known that there's a performance issue.
When a context value is changed, all components that useContext
will re-render.
To solve this issue,
[useContextSelector](https://github.com/reactjs/rfcs/pull/119)
is proposed and later proposed
[Speculative Mode](https://github.com/reactjs/rfcs/pull/150)
with context selector support.
This library provides the API in userland.
Prior to v1.3, it uses `changedBits=0` feature to stop propagation,
v1.3 no longer depends on this undocumented feature.
## Install
This package requires some peer dependencies, which you need to install by yourself.
```bash
npm install use-context-selector react scheduler
```
Notes for library authors:
Please do not forget to keep `"peerDependencies"` and
note instructions to let users to install peer dependencies.
## Technical memo
To make it work like original React context, it uses
[useReducer cheat mode](https://overreacted.io/a-complete-guide-to-useeffect/#why-usereducer-is-the-cheat-mode-of-hooks) intentionally.
It also requires `useContextUpdate` to behave better in concurrent rendering.
Its usage is optional and only required if the default behavior is unexpected.
If you need a simpler solution, you can use `useSyncExternalStore` without any libraries. See [an example](https://github.com/dai-shi/use-context-selector/issues/109#issuecomment-1785147682).
## Usage
```javascript
import { useState } from 'react';
import { createRoot } from 'react-dom/client';
import { createContext, useContextSelector } from 'use-context-selector';
const context = createContext(null);
const Counter1 = () => {
const count1 = useContextSelector(context, (v) => v[0].count1);
const setState = useContextSelector(context, (v) => v[1]);
const increment = () =>
setState((s) => ({
...s,
count1: s.count1 + 1,
}));
return (
<div>
<span>Count1: {count1}</span>
<button type="button" onClick={increment}>
+1
</button>
{Math.random()}
</div>
);
};
const Counter2 = () => {
const count2 = useContextSelector(context, (v) => v[0].count2);
const setState = useContextSelector(context, (v) => v[1]);
const increment = () =>
setState((s) => ({
...s,
count2: s.count2 + 1,
}));
return (
<div>
<span>Count2: {count2}</span>
<button type="button" onClick={increment}>
+1
</button>
{Math.random()}
</div>
);
};
const StateProvider = ({ children }) => (
<context.Provider value={useState({ count1: 0, count2: 0 })}>
{children}
</context.Provider>
);
const App = () => (
<StateProvider>
<Counter1 />
<Counter2 />
</StateProvider>
);
createRoot(document.getElementById('app')).render(<App />);
```
## API
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
### createContext
This creates a special context for `useContextSelector`.
#### Parameters
* `defaultValue` **Value**&#x20;
#### Examples
```javascript
import { createContext } from 'use-context-selector';
const PersonContext = createContext({ firstName: '', familyName: '' });
```
### useContextSelector
This hook returns context selected value by selector.
It will only accept context created by `createContext`.
It will trigger re-render if only the selected value is referentially changed.
The selector should return referentially equal result for same input for better performance.
#### Parameters
* `context` **Context\<Value>**&#x20;
* `selector` **function (value: Value): Selected**&#x20;
#### Examples
```javascript
import { useContextSelector } from 'use-context-selector';
const firstName = useContextSelector(PersonContext, (state) => state.firstName);
```
### useContext
This hook returns the entire context value.
Use this instead of React.useContext for consistent behavior.
#### Parameters
* `context` **Context\<Value>**&#x20;
#### Examples
```javascript
import { useContext } from 'use-context-selector';
const person = useContext(PersonContext);
```
### useContextUpdate
This hook returns an update function to wrap an updating function
Use this for a function that will change a value in
concurrent rendering in React 18.
Otherwise, there's no need to use this hook.
#### Parameters
* `context` **Context\<Value>**&#x20;
#### Examples
```javascript
import { useContextUpdate } from 'use-context-selector';
const update = useContextUpdate();
// Wrap set state function
update(() => setState(...));
// Experimental suspense mode
update(() => setState(...), { suspense: true });
```
### BridgeProvider
This is a Provider component for bridging multiple react roots
#### Parameters
* `$0` **{context: Context\<any>, value: any, children: ReactNode}**&#x20;
* `$0.context` &#x20;
* `$0.value` &#x20;
* `$0.children` &#x20;
#### Examples
```javascript
const valueToBridge = useBridgeValue(PersonContext);
return (
<Renderer>
<BridgeProvider context={PersonContext} value={valueToBridge}>
{children}
</BridgeProvider>
</Renderer>
);
```
### useBridgeValue
This hook return a value for BridgeProvider
#### Parameters
* `context` **Context\<any>**&#x20;
## Limitations
* In order to stop propagation, `children` of a context provider has to be either created outside of the provider or memoized with `React.memo`.
* Provider trigger re-renders only if the context value is referentially changed.
* Neither context consumers or class components are supported.
* The [stale props](https://react-redux.js.org/api/hooks#stale-props-and-zombie-children) issue can't be solved in userland.
* Tearing is only avoided if all consumers get data using `useContextSelector`. If you use both props and `use-context-selector` to pass the same data, they may provide inconsistence data for a brief moment. (`02_tearing_spec` fails)
## Examples
The [examples](examples) folder contains working examples.
You can run one of them with
```bash
PORT=8080 yarn run examples:01_counter
```
and open <http://localhost:8080> in your web browser.
You can also try them in codesandbox.io:
[01](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/01_counter)
[02](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/02_person)
[03](https://codesandbox.io/s/github/dai-shi/use-context-selector/tree/main/examples/03_suspense)
## Projects that use use-context-selector
* [react-tracked](https://github.com/dai-shi/react-tracked)
* [use-atom](https://github.com/dai-shi/use-atom)
* [react-hooks-fetch](https://github.com/dai-shi/react-hooks-fetch)
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('shuffle', require('../shuffle'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,11 @@
const imports = `import { migratePostgresV2toV3 } from '@payloadcms/db-postgres/migration-utils'`;
const upSQL = ` await migratePostgresV2toV3({
// enables logging of changes that will be made to the database
debug: false,
payload,
req,
})
`;
export { imports, upSQL };
//# sourceMappingURL=relationships-v2-v3.js.map
@@ -0,0 +1,284 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { getTranslation } from '@payloadcms/translations';
import { extractID } from 'payload/shared';
import React from 'react';
import { DocumentIcon } from '../../../icons/Document/index.js';
import { useConfig } from '../../../providers/Config/index.js';
import { useFolder } from '../../../providers/Folders/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import { formatDate } from '../../../utilities/formatDocTitle/formatDateTitle.js';
import { ColoredFolderIcon } from '../ColoredFolderIcon/index.js';
import { DraggableTableRow } from '../DraggableTableRow/index.js';
import { SimpleTable, TableHeader } from '../SimpleTable/index.js';
import './index.scss';
const baseClass = 'folder-file-table';
export function FolderFileTable(t0) {
const $ = _c(39);
const {
showRelationCell: t1
} = t0;
const showRelationCell = t1 === undefined ? true : t1;
const {
checkIfItemIsDisabled,
documents,
focusedRowIndex,
onItemClick,
onItemKeyPress,
selectedItemKeys,
subfolders
} = useFolder();
const {
config
} = useConfig();
const {
i18n,
t
} = useTranslation();
let t2;
if ($[0] !== config || $[1] !== i18n) {
t2 = () => {
const map = {};
config.collections.forEach(collection => {
map[collection.slug] = {
plural: getTranslation(collection.labels?.plural, i18n),
singular: getTranslation(collection.labels?.singular, i18n)
};
});
return map;
};
$[0] = config;
$[1] = i18n;
$[2] = t2;
} else {
t2 = $[2];
}
const [relationToMap] = React.useState(t2);
let t3;
if ($[3] !== showRelationCell || $[4] !== t) {
t3 = () => {
const columnsToShow = [{
name: "name",
label: t("general:name")
}, {
name: "createdAt",
label: t("general:createdAt")
}, {
name: "updatedAt",
label: t("general:updatedAt")
}];
if (showRelationCell) {
columnsToShow.push({
name: "type",
label: t("version:type")
});
}
return columnsToShow;
};
$[3] = showRelationCell;
$[4] = t;
$[5] = t3;
} else {
t3 = $[5];
}
const [columns] = React.useState(t3);
let t4;
if ($[6] !== checkIfItemIsDisabled || $[7] !== columns || $[8] !== config || $[9] !== documents || $[10] !== focusedRowIndex || $[11] !== i18n || $[12] !== onItemClick || $[13] !== onItemKeyPress || $[14] !== relationToMap || $[15] !== selectedItemKeys || $[16] !== subfolders) {
let t5;
if ($[18] !== checkIfItemIsDisabled || $[19] !== columns || $[20] !== config || $[21] !== focusedRowIndex || $[22] !== i18n || $[23] !== onItemClick || $[24] !== onItemKeyPress || $[25] !== relationToMap || $[26] !== selectedItemKeys) {
t5 = (subfolder, rowIndex) => {
const {
itemKey,
relationTo,
value
} = subfolder;
const subfolderID = extractID(value);
return _jsx(DraggableTableRow, {
columns: columns.map((t6, index) => {
const {
name: name_0
} = t6;
let cellValue = "\u2014";
if (name_0 === "name" && value._folderOrDocumentTitle !== undefined) {
cellValue = value._folderOrDocumentTitle;
}
if ((name_0 === "createdAt" || name_0 === "updatedAt") && value[name_0]) {
cellValue = formatDate({
date: value[name_0],
i18n,
pattern: config.admin.dateFormat
});
}
if (name_0 === "type") {
cellValue = _jsxs(_Fragment, {
children: [relationToMap[relationTo]?.singular || relationTo, Array.isArray(subfolder.value?.folderType) ? subfolder.value?.folderType.reduce((acc, slug, index_0) => {
if (index_0 === 0) {
return ` — ${relationToMap[slug]?.plural || slug}`;
}
if (index_0 > 0) {
return `${acc}, ${relationToMap[slug]?.plural || slug}`;
}
return acc;
}, "") : ""]
});
}
if (index === 0) {
return _jsxs("span", {
className: `${baseClass}__cell-with-icon`,
children: [_jsx(ColoredFolderIcon, {}), cellValue]
}, `${itemKey}-${name_0}`);
} else {
return cellValue;
}
}),
disabled: checkIfItemIsDisabled(subfolder),
dragData: {
id: subfolderID,
type: "folder"
},
id: subfolderID,
isDroppable: true,
isFocused: focusedRowIndex === rowIndex,
isSelected: selectedItemKeys.has(itemKey),
isSelecting: selectedItemKeys.size > 0,
itemKey,
onClick: event => {
onItemClick({
event,
index: rowIndex,
item: subfolder
});
},
onKeyDown: event_0 => {
onItemKeyPress({
event: event_0,
index: rowIndex,
item: subfolder
});
}
}, `${rowIndex}-${itemKey}`);
};
$[18] = checkIfItemIsDisabled;
$[19] = columns;
$[20] = config;
$[21] = focusedRowIndex;
$[22] = i18n;
$[23] = onItemClick;
$[24] = onItemKeyPress;
$[25] = relationToMap;
$[26] = selectedItemKeys;
$[27] = t5;
} else {
t5 = $[27];
}
let t6;
if ($[28] !== checkIfItemIsDisabled || $[29] !== columns || $[30] !== config || $[31] !== focusedRowIndex || $[32] !== i18n || $[33] !== onItemClick || $[34] !== onItemKeyPress || $[35] !== relationToMap || $[36] !== selectedItemKeys || $[37] !== subfolders.length) {
t6 = (document, unadjustedIndex) => {
const {
itemKey: itemKey_0,
relationTo: relationTo_0,
value: value_0
} = document;
const documentID = extractID(value_0);
const rowIndex_0 = unadjustedIndex + subfolders.length;
return _jsx(DraggableTableRow, {
columns: columns.map((t7, index_1) => {
const {
name: name_1
} = t7;
let cellValue_0 = "\u2014";
if (name_1 === "name" && value_0._folderOrDocumentTitle !== undefined) {
cellValue_0 = value_0._folderOrDocumentTitle;
}
if ((name_1 === "createdAt" || name_1 === "updatedAt") && value_0[name_1]) {
cellValue_0 = formatDate({
date: value_0[name_1],
i18n,
pattern: config.admin.dateFormat
});
}
if (name_1 === "type") {
cellValue_0 = relationToMap[relationTo_0]?.singular || relationTo_0;
}
if (index_1 === 0) {
return _jsxs("span", {
className: `${baseClass}__cell-with-icon`,
children: [_jsx(DocumentIcon, {}), cellValue_0]
}, `${itemKey_0}-${name_1}`);
} else {
return cellValue_0;
}
}),
disabled: checkIfItemIsDisabled(document),
dragData: {
id: documentID,
type: "document"
},
id: documentID,
isFocused: focusedRowIndex === rowIndex_0,
isSelected: selectedItemKeys.has(itemKey_0),
isSelecting: selectedItemKeys.size > 0,
itemKey: itemKey_0,
onClick: event_1 => {
onItemClick({
event: event_1,
index: rowIndex_0,
item: document
});
},
onKeyDown: event_2 => {
onItemKeyPress({
event: event_2,
index: rowIndex_0,
item: document
});
}
}, `${rowIndex_0}-${itemKey_0}`);
};
$[28] = checkIfItemIsDisabled;
$[29] = columns;
$[30] = config;
$[31] = focusedRowIndex;
$[32] = i18n;
$[33] = onItemClick;
$[34] = onItemKeyPress;
$[35] = relationToMap;
$[36] = selectedItemKeys;
$[37] = subfolders.length;
$[38] = t6;
} else {
t6 = $[38];
}
t4 = _jsx(SimpleTable, {
headerCells: columns.map(_temp),
tableRows: [...subfolders.map(t5), ...documents.map(t6)]
});
$[6] = checkIfItemIsDisabled;
$[7] = columns;
$[8] = config;
$[9] = documents;
$[10] = focusedRowIndex;
$[11] = i18n;
$[12] = onItemClick;
$[13] = onItemKeyPress;
$[14] = relationToMap;
$[15] = selectedItemKeys;
$[16] = subfolders;
$[17] = t4;
} else {
t4 = $[17];
}
return t4;
}
function _temp(t0) {
const {
name,
label
} = t0;
return _jsx(TableHeader, {
children: label
}, name);
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
import { status as httpStatus } from 'http-status';
import { APIError } from './APIError.js';
export class InvalidSchema extends APIError {
constructor(message, results){
super(message, httpStatus.INTERNAL_SERVER_ERROR, results);
}
}
//# sourceMappingURL=InvalidSchema.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/errors/APIError.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\n// This gets dynamically reassigned during compilation\nexport let APIErrorName = 'APIError'\n\nclass ExtendableError<TData extends object = { [key: string]: unknown }> extends Error {\n data: TData\n\n isOperational: boolean\n\n isPublic: boolean\n\n status: number\n\n constructor(message: string, status: number, data: TData, isPublic: boolean) {\n super(message, {\n // show data in cause\n cause: data,\n })\n APIErrorName = this.constructor.name\n this.name = this.constructor.name\n this.message = message\n this.status = status\n this.data = data\n this.isPublic = isPublic\n this.isOperational = true // This is required since bluebird 4 doesn't append it anymore.\n Error.captureStackTrace(this, this.constructor)\n }\n}\n\n/**\n * Class representing an API error.\n * @extends ExtendableError\n */\nexport class APIError<\n TData extends null | object = { [key: string]: unknown } | null,\n // @ts-expect-error - vestiges of when tsconfig was not strict. Feel free to improve\n> extends ExtendableError<TData> {\n /**\n * Creates an API error.\n * @param {string} message - Error message.\n * @param {number} status - HTTP status code of error.\n * @param {object} data - response data to be returned.\n * @param {boolean} isPublic - Whether the message should be visible to user or not.\n */\n constructor(\n message: string,\n status: number = httpStatus.INTERNAL_SERVER_ERROR,\n data: TData = null!,\n isPublic?: boolean,\n ) {\n super(\n message,\n status,\n data,\n typeof isPublic === 'boolean' ? isPublic : status !== httpStatus.INTERNAL_SERVER_ERROR,\n )\n }\n}\n"],"names":["status","httpStatus","APIErrorName","ExtendableError","Error","data","isOperational","isPublic","message","cause","name","captureStackTrace","APIError","INTERNAL_SERVER_ERROR"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAElD,sDAAsD;AACtD,OAAO,IAAIC,eAAe,WAAU;AAEpC,MAAMC,wBAA2EC;IAC/EC,KAAW;IAEXC,cAAsB;IAEtBC,SAAiB;IAEjBP,OAAc;IAEd,YAAYQ,OAAe,EAAER,MAAc,EAAEK,IAAW,EAAEE,QAAiB,CAAE;QAC3E,KAAK,CAACC,SAAS;YACb,qBAAqB;YACrBC,OAAOJ;QACT;QACAH,eAAe,IAAI,CAAC,WAAW,CAACQ,IAAI;QACpC,IAAI,CAACA,IAAI,GAAG,IAAI,CAAC,WAAW,CAACA,IAAI;QACjC,IAAI,CAACF,OAAO,GAAGA;QACf,IAAI,CAACR,MAAM,GAAGA;QACd,IAAI,CAACK,IAAI,GAAGA;QACZ,IAAI,CAACE,QAAQ,GAAGA;QAChB,IAAI,CAACD,aAAa,GAAG,MAAK,+DAA+D;QACzFF,MAAMO,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW;IAChD;AACF;AAEA;;;CAGC,GACD,OAAO,MAAMC,iBAGHT;IACR;;;;;;GAMC,GACD,YACEK,OAAe,EACfR,SAAiBC,WAAWY,qBAAqB,EACjDR,OAAc,IAAK,EACnBE,QAAkB,CAClB;QACA,KAAK,CACHC,SACAR,QACAK,MACA,OAAOE,aAAa,YAAYA,WAAWP,WAAWC,WAAWY,qBAAqB;IAE1F;AACF"}
@@ -0,0 +1 @@
{"version":3,"file":"logger.js","sources":["../../../src/otel/logger.ts"],"sourcesContent":["import { diag, DiagLogLevel } from '@opentelemetry/api';\nimport { debug } from '@sentry/core';\n\n/**\n * Setup the OTEL logger to use our own debug logger.\n */\nexport function setupOpenTelemetryLogger(): void {\n // Disable diag, to ensure this works even if called multiple times\n diag.disable();\n diag.setLogger(\n {\n error: debug.error,\n warn: debug.warn,\n info: debug.log,\n debug: debug.log,\n verbose: debug.log,\n },\n DiagLogLevel.DEBUG,\n );\n}\n"],"names":["diag","debug","DiagLogLevel"],"mappings":";;;;;AAGA;AACA;AACA;AACO,SAAS,wBAAwB,GAAS;AACjD;AACA,EAAEA,QAAI,CAAC,OAAO,EAAE;AAChB,EAAEA,QAAI,CAAC,SAAS;AAChB,IAAI;AACJ,MAAM,KAAK,EAAEC,UAAK,CAAC,KAAK;AACxB,MAAM,IAAI,EAAEA,UAAK,CAAC,IAAI;AACtB,MAAM,IAAI,EAAEA,UAAK,CAAC,GAAG;AACrB,MAAM,KAAK,EAAEA,UAAK,CAAC,GAAG;AACtB,MAAM,OAAO,EAAEA,UAAK,CAAC,GAAG;AACxB,KAAK;AACL,IAAIC,gBAAY,CAAC,KAAK;AACtB,GAAG;AACH;;;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I","2":"C L M G N O P"},C:{"1":"qB rB sB tB uB vB wB xB yB","2":"0 1 2 3 4 5 6 7 8 0C VC J bB K D E F zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C 4C 5C","132":"9 N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB","164":"A B C L M G"},D:{"1":"0 1 2 3 4 5 6 7 8 lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"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","66":"kB"},E:{"2":"J bB K D E F A B C L M G 6C bC 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED SC fC gC hC iC jC FD TC kC lC mC nC oC GD UC pC qC rC sC HD tC uC vC wC ID"},F:{"1":"0 1 2 3 4 5 6 7 8 EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"9 F B C G N O P cB AB BB CB DB JD KD LD MD PC xC ND QC"},G:{"2":"E bC OD yC PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC"},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:{"2":"OC"},N:{"2":"A B"},O:{"1":"RC"},P:{"1":"9 J AB BB CB DB EB FB GB HB IB tD uD vD wD xD cC yD zD 0D 1D 2D SC TC UC 3D"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D","2":"7D"}},B:4,C:"Battery Status API",D:true};
@@ -0,0 +1,57 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var roles_exports = {};
__export(roles_exports, {
GelRole: () => GelRole,
gelRole: () => gelRole
});
module.exports = __toCommonJS(roles_exports);
var import_entity = require("../entity.cjs");
class GelRole {
constructor(name, config) {
this.name = name;
if (config) {
this.createDb = config.createDb;
this.createRole = config.createRole;
this.inherit = config.inherit;
}
}
static [import_entity.entityKind] = "GelRole";
/** @internal */
_existing;
/** @internal */
createDb;
/** @internal */
createRole;
/** @internal */
inherit;
existing() {
this._existing = true;
return this;
}
}
function gelRole(name, config) {
return new GelRole(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
GelRole,
gelRole
});
//# sourceMappingURL=roles.cjs.map
@@ -0,0 +1 @@
{"version":3,"file":"getCLS.d.ts","sourceRoot":"","sources":["../../../../src/metrics/web-vitals/getCLS.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE7E,oFAAoF;AACpF,eAAO,MAAM,aAAa,EAAE,sBAAoC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,KAAK,GAAI,UAAU,CAAC,MAAM,EAAE,SAAS,KAAK,IAAI,EAAE,OAAM,UAAe,SAyCjF,CAAC"}
@@ -0,0 +1,45 @@
import { constructFrom } from "../../../constructFrom.mjs";
import { getTimezoneOffsetInMilliseconds } from "../../../_lib/getTimezoneOffsetInMilliseconds.mjs";
import { timezonePatterns } from "../constants.mjs";
import { Parser } from "../Parser.mjs";
import { parseTimezonePattern } from "../utils.mjs";
// Timezone (ISO-8601)
export class ISOTimezoneParser extends Parser {
priority = 10;
parse(dateString, token) {
switch (token) {
case "x":
return parseTimezonePattern(
timezonePatterns.basicOptionalMinutes,
dateString,
);
case "xx":
return parseTimezonePattern(timezonePatterns.basic, dateString);
case "xxxx":
return parseTimezonePattern(
timezonePatterns.basicOptionalSeconds,
dateString,
);
case "xxxxx":
return parseTimezonePattern(
timezonePatterns.extendedOptionalSeconds,
dateString,
);
case "xxx":
default:
return parseTimezonePattern(timezonePatterns.extended, dateString);
}
}
set(date, flags, value) {
if (flags.timestampIsSet) return date;
return constructFrom(
date,
date.getTime() - getTimezoneOffsetInMilliseconds(date) - value,
);
}
incompatibleTokens = ["t", "T", "X"];
}
@@ -0,0 +1,94 @@
"use strict";
exports.MonthParser = void 0;
var _constants = require("../constants.js");
var _Parser = require("../Parser.js");
var _utils = require("../utils.js");
class MonthParser extends _Parser.Parser {
incompatibleTokens = [
"Y",
"R",
"q",
"Q",
"L",
"w",
"I",
"D",
"i",
"e",
"c",
"t",
"T",
];
priority = 110;
parse(dateString, token, match) {
const valueCallback = (value) => value - 1;
switch (token) {
// 1, 2, ..., 12
case "M":
return (0, _utils.mapValue)(
(0, _utils.parseNumericPattern)(
_constants.numericPatterns.month,
dateString,
),
valueCallback,
);
// 01, 02, ..., 12
case "MM":
return (0, _utils.mapValue)(
(0, _utils.parseNDigits)(2, dateString),
valueCallback,
);
// 1st, 2nd, ..., 12th
case "Mo":
return (0, _utils.mapValue)(
match.ordinalNumber(dateString, {
unit: "month",
}),
valueCallback,
);
// Jan, Feb, ..., Dec
case "MMM":
return (
match.month(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.month(dateString, { width: "narrow", context: "formatting" })
);
// J, F, ..., D
case "MMMMM":
return match.month(dateString, {
width: "narrow",
context: "formatting",
});
// January, February, ..., December
case "MMMM":
default:
return (
match.month(dateString, { width: "wide", context: "formatting" }) ||
match.month(dateString, {
width: "abbreviated",
context: "formatting",
}) ||
match.month(dateString, { width: "narrow", context: "formatting" })
);
}
}
validate(_date, value) {
return value >= 0 && value <= 11;
}
set(date, _flags, value) {
date.setMonth(value, 1);
date.setHours(0, 0, 0, 0);
return date;
}
}
exports.MonthParser = MonthParser;
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "tekens" },
file: { unit: "bytes" },
array: { unit: "elementen" },
set: { unit: "elementen" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "getal";
}
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: "invoer",
email: "emailadres",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datum en tijd",
date: "ISO datum",
time: "ISO tijd",
duration: "ISO duur",
ipv4: "IPv4-adres",
ipv6: "IPv6-adres",
cidrv4: "IPv4-bereik",
cidrv6: "IPv6-bereik",
base64: "base64-gecodeerde tekst",
base64url: "base64 URL-gecodeerde tekst",
json_string: "JSON string",
e164: "E.164-nummer",
jwt: "JWT",
template_literal: "invoer",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Ongeldige invoer: verwacht ${issue.expected}, ontving ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Ongeldige invoer: verwacht ${util.stringifyPrimitive(issue.values[0])}`;
return `Ongeldige optie: verwacht één van ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Te lang: verwacht dat ${issue.origin ?? "waarde"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementen"} bevat`;
return `Te lang: verwacht dat ${issue.origin ?? "waarde"} ${adj}${issue.maximum.toString()} is`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Te kort: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit} bevat`;
}
return `Te kort: verwacht dat ${issue.origin} ${adj}${issue.minimum.toString()} is`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Ongeldige tekst: moet met "${_issue.prefix}" beginnen`;
}
if (_issue.format === "ends_with")
return `Ongeldige tekst: moet op "${_issue.suffix}" eindigen`;
if (_issue.format === "includes")
return `Ongeldige tekst: moet "${_issue.includes}" bevatten`;
if (_issue.format === "regex")
return `Ongeldige tekst: moet overeenkomen met patroon ${_issue.pattern}`;
return `Ongeldig: ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Ongeldig getal: moet een veelvoud van ${issue.divisor} zijn`;
case "unrecognized_keys":
return `Onbekende key${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Ongeldige key in ${issue.origin}`;
case "invalid_union":
return "Ongeldige invoer";
case "invalid_element":
return `Ongeldige waarde in ${issue.origin}`;
default:
return `Ongeldige invoer`;
}
};
};
export default function () {
return {
localeError: error(),
};
}
@@ -0,0 +1,137 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.js");
var _index2 = require("../../_lib/buildMatchPatternFn.js");
const matchOrdinalNumberPattern = /^(\d+)(వ)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(క్రీ\.పూ\.|క్రీ\.శ\.)/i,
abbreviated:
/^(క్రీ\.?\s?పూ\.?|ప్ర\.?\s?శ\.?\s?పూ\.?|క్రీ\.?\s?శ\.?|సా\.?\s?శ\.?)/i,
wide: /^(క్రీస్తు పూర్వం|ప్రస్తుత శకానికి పూర్వం|క్రీస్తు శకం|ప్రస్తుత శకం)/i,
};
const parseEraPatterns = {
any: [/^(పూ|శ)/i, /^సా/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^త్రై[1234]/i,
wide: /^[1234](వ)? త్రైమాసికం/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(జూ|జు|జ|ఫి|మా|ఏ|మే|ఆ|సె|అ|న|డి)/i,
abbreviated: /^(జన|ఫిబ్ర|మార్చి|ఏప్రి|మే|జూన్|జులై|ఆగ|సెప్|అక్టో|నవ|డిసె)/i,
wide: /^(జనవరి|ఫిబ్రవరి|మార్చి|ఏప్రిల్|మే|జూన్|జులై|ఆగస్టు|సెప్టెంబర్|అక్టోబర్|నవంబర్|డిసెంబర్)/i,
};
const parseMonthPatterns = {
narrow: [
/^జ/i,
/^ఫి/i,
/^మా/i,
/^ఏ/i,
/^మే/i,
/^జూ/i,
/^జు/i,
/^ఆ/i,
/^సె/i,
/^అ/i,
/^న/i,
/^డి/i,
],
any: [
/^జన/i,
/^ఫి/i,
/^మా/i,
/^ఏ/i,
/^మే/i,
/^జూన్/i,
/^జులై/i,
/^ఆగ/i,
/^సె/i,
/^అ/i,
/^న/i,
/^డి/i,
],
};
const matchDayPatterns = {
narrow: /^(ఆ|సో|మ|బు|గు|శు|శ)/i,
short: /^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,
abbreviated: /^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,
wide: /^(ఆదివారం|సోమవారం|మంగళవారం|బుధవారం|గురువారం|శుక్రవారం|శనివారం)/i,
};
const parseDayPatterns = {
narrow: [/^ఆ/i, /^సో/i, /^మ/i, /^బు/i, /^గు/i, /^శు/i, /^శ/i],
any: [/^ఆది/i, /^సోమ/i, /^మం/i, /^బుధ/i, /^గురు/i, /^శుక్ర/i, /^శని/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i,
any: /^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^పూర్వాహ్నం/i,
pm: /^అపరాహ్నం/i,
midnight: /^అర్ధ/i,
noon: /^మిట్ట/i,
morning: /ఉదయం/i,
afternoon: /మధ్యాహ్నం/i,
evening: /సాయంత్రం/i,
night: /రాత్రి/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});
@@ -0,0 +1,22 @@
import { DirectusPanel } from "../../../schema/panel.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/delete/panels.d.ts
/**
* Delete multiple existing panels.
* @param keys
* @returns
* @throws Will throw if keys is empty
*/
declare const deletePanels: <Schema>(keys: DirectusPanel<Schema>["id"][]) => RestCommand<void, Schema>;
/**
* Delete an existing panel.
* @param key
* @returns
* @throws Will throw if key is empty
*/
declare const deletePanel: <Schema>(key: DirectusPanel<Schema>["id"]) => RestCommand<void, Schema>;
//#endregion
export { deletePanel, deletePanels };
//# sourceMappingURL=panels.d.cts.map
@@ -0,0 +1,3 @@
export { en } from '@payloadcms/translations/languages/en';
//# sourceMappingURL=en.js.map
@@ -0,0 +1,53 @@
Prism.languages.pcaxis = {
'string': /"[^"]*"/,
'keyword': {
pattern: /((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,
lookbehind: true,
greedy: true,
inside: {
'keyword': /^[-A-Z\d]+/,
'language': {
pattern: /^(\s*)\[[-\w]+\]/,
lookbehind: true,
inside: {
'punctuation': /^\[|\]$/,
'property': /[-\w]+/
}
},
'sub-key': {
pattern: /^(\s*)\S[\s\S]*/,
lookbehind: true,
inside: {
'parameter': {
pattern: /"[^"]*"/,
alias: 'property'
},
'punctuation': /^\(|\)$|,/
}
}
}
},
'operator': /=/,
'tlist': {
pattern: /TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,
greedy: true,
inside: {
'function': /^TLIST/,
'property': {
pattern: /^(\s*\(\s*)\w+/,
lookbehind: true
},
'string': /"[^"]*"/,
'punctuation': /[(),]/,
'operator': /-/
}
},
'punctuation': /[;,]/,
'number': {
pattern: /(^|\s)\d+(?:\.\d+)?(?!\S)/,
lookbehind: true
},
'boolean': /NO|YES/,
};
Prism.languages.px = Prism.languages.pcaxis;
@@ -0,0 +1,65 @@
/**
* Tells whether current environment supports ErrorEvent objects
* {@link supportsErrorEvent}.
*
* @returns Answer to the given question.
*/
export declare function supportsErrorEvent(): boolean;
/**
* Tells whether current environment supports DOMError objects
* {@link supportsDOMError}.
*
* @returns Answer to the given question.
*/
export declare function supportsDOMError(): boolean;
/**
* Tells whether current environment supports DOMException objects
* {@link supportsDOMException}.
*
* @returns Answer to the given question.
*/
export declare function supportsDOMException(): boolean;
/**
* Tells whether current environment supports History API
* {@link supportsHistory}.
*
* @returns Answer to the given question.
*/
export declare function supportsHistory(): boolean;
/**
* Tells whether current environment supports Fetch API
* {@link supportsFetch}.
*
* @returns Answer to the given question.
* @deprecated This is no longer used and will be removed in a future major version.
*/
export declare const supportsFetch: typeof _isFetchSupported;
declare function _isFetchSupported(): boolean;
/**
* isNative checks if the given function is a native implementation
*/
export declare function isNativeFunction(func: Function): boolean;
/**
* Tells whether current environment supports Fetch API natively
* {@link supportsNativeFetch}.
*
* @returns true if `window.fetch` is natively implemented, false otherwise
*/
export declare function supportsNativeFetch(): boolean;
/**
* Tells whether current environment supports ReportingObserver API
* {@link supportsReportingObserver}.
*
* @returns Answer to the given question.
*/
export declare function supportsReportingObserver(): boolean;
/**
* Tells whether current environment supports Referrer Policy API
* {@link supportsReferrerPolicy}.
*
* @returns Answer to the given question.
* @deprecated This is no longer used and will be removed in a future major version.
*/
export declare function supportsReferrerPolicy(): boolean;
export {};
//# sourceMappingURL=supports.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"getMetaBySegment.d.ts","sourceRoot":"","sources":["../../../src/views/Document/getMetaBySegment.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAA;AACpC,OAAO,KAAK,EAAE,UAAU,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAE3F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAU5D,MAAM,MAAM,wBAAwB,GAAG,CACrC,IAAI,EAAE;IACJ,gBAAgB,CAAC,EAAE,IAAI,GAAG,yBAAyB,CAAA;IACnD,YAAY,CAAC,EAAE,IAAI,GAAG,qBAAqB,CAAA;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,UAAU,CAAA;CACxB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,KACpC,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEtB,eAAO,MAAM,gBAAgB,EAAE,wBAuJ9B,CAAA"}
@@ -0,0 +1,10 @@
"use strict";
var _class_apply_descriptor_destructure = require("./_class_apply_descriptor_destructure.cjs");
var _class_extract_field_descriptor = require("./_class_extract_field_descriptor.cjs");
function _class_private_field_destructure(receiver, privateMap) {
var descriptor = _class_extract_field_descriptor._(receiver, privateMap, "set");
return _class_apply_descriptor_destructure._(receiver, descriptor);
}
exports._ = _class_private_field_destructure;
@@ -0,0 +1 @@
{"version":3,"file":"test-tube.js","sources":["../../../src/icons/test-tube.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TestTube\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTQuNSAydjE3LjVjMCAxLjQtMS4xIDIuNS0yLjUgMi41Yy0xLjQgMC0yLjUtMS4xLTIuNS0yLjVWMiIgLz4KICA8cGF0aCBkPSJNOC41IDJoNyIgLz4KICA8cGF0aCBkPSJNMTQuNSAxNmgtNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/test-tube\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 TestTube = createLucideIcon('TestTube', [\n ['path', { d: 'M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2', key: '125lnx' }],\n ['path', { d: 'M8.5 2h7', key: 'csnxdl' }],\n ['path', { d: 'M14.5 16h-5', key: '1ox875' }],\n]);\n\nexport default TestTube;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA+D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC5F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC9C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isWindows = void 0;
const isWindowsConst = /^win/.test(globalThis.process ? globalThis.process.platform : "");
const isWindows = () => isWindowsConst;
exports.isWindows = isWindows;
@@ -0,0 +1,46 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SpanKind = void 0;
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var SpanKind;
(function (SpanKind) {
/** Default value. Indicates that the span is used internally. */
SpanKind[SpanKind["INTERNAL"] = 0] = "INTERNAL";
/**
* Indicates that the span covers server-side handling of an RPC or other
* remote request.
*/
SpanKind[SpanKind["SERVER"] = 1] = "SERVER";
/**
* Indicates that the span covers the client-side wrapper around an RPC or
* other remote request.
*/
SpanKind[SpanKind["CLIENT"] = 2] = "CLIENT";
/**
* Indicates that the span describes producer sending a message to a
* broker. Unlike client and server, there is no direct critical path latency
* relationship between producer and consumer spans.
*/
SpanKind[SpanKind["PRODUCER"] = 3] = "PRODUCER";
/**
* Indicates that the span describes consumer receiving a message from a
* broker. Unlike client and server, there is no direct critical path latency
* relationship between producer and consumer spans.
*/
SpanKind[SpanKind["CONSUMER"] = 4] = "CONSUMER";
})(SpanKind = exports.SpanKind || (exports.SpanKind = {}));
//# sourceMappingURL=span_kind.js.map
@@ -0,0 +1 @@
{"version":3,"file":"isSentryRequestUrl.js","sources":["../../../src/utils/isSentryRequestUrl.ts"],"sourcesContent":["import type { Client } from '../client';\nimport type { DsnComponents } from '../types-hoist/dsn';\nimport { isURLObjectRelative, parseStringToURLObject } from './url';\n\n/**\n * Checks whether given url points to Sentry server\n *\n * @param url url to verify\n */\nexport function isSentryRequestUrl(url: string, client: Client | undefined): boolean {\n const dsn = client?.getDsn();\n const tunnel = client?.getOptions().tunnel;\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url: string, tunnel: string | undefined): boolean {\n if (!tunnel) {\n return false;\n }\n\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url: string, dsn: DsnComponents | undefined): boolean {\n // Requests to Sentry's ingest endpoint must have a `sentry_key` in the query string\n // This is equivalent to the public_key which is required in the DSN\n // see https://develop.sentry.dev/sdk/overview/#parsing-the-dsn\n // Therefore, a request to the same host and with a `sentry_key` in the query string\n // can be considered a request to the ingest endpoint.\n const urlParts = parseStringToURLObject(url);\n if (!urlParts || isURLObjectRelative(urlParts)) {\n return false;\n }\n\n return dsn ? urlParts.host.includes(dsn.host) && /(^|&|\\?)sentry_key=/.test(urlParts.search) : false;\n}\n\nfunction removeTrailingSlash(str: string): string {\n return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n"],"names":[],"mappings":";;AAIA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAC,GAAG,EAAU,MAAM,EAA+B;AACrF,EAAE,MAAM,GAAA,GAAM,MAAM,EAAE,MAAM,EAAE;AAC9B,EAAE,MAAM,SAAS,MAAM,EAAE,UAAU,EAAE,CAAC,MAAM;AAC5C,EAAE,OAAO,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAA,IAAK,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC;AACvD;;AAEA,SAAS,WAAW,CAAC,GAAG,EAAU,MAAM,EAA+B;AACvE,EAAE,IAAI,CAAC,MAAM,EAAE;AACf,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF,EAAE,OAAO,mBAAmB,CAAC,GAAG,MAAM,mBAAmB,CAAC,MAAM,CAAC;AACjE;;AAEA,SAAS,QAAQ,CAAC,GAAG,EAAU,GAAG,EAAsC;AACxE;AACA;AACA;AACA;AACA;AACA,EAAE,MAAM,QAAA,GAAW,sBAAsB,CAAC,GAAG,CAAC;AAC9C,EAAE,IAAI,CAAC,QAAA,IAAY,mBAAmB,CAAC,QAAQ,CAAC,EAAE;AAClD,IAAI,OAAO,KAAK;AAChB,EAAE;;AAEF,EAAE,OAAO,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAA,IAAK,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAA,GAAI,KAAK;AACtG;;AAEA,SAAS,mBAAmB,CAAC,GAAG,EAAkB;AAClD,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,MAAA,GAAS,CAAC,CAAA,KAAM,GAAA,GAAM,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAA,GAAI,GAAG;AAC7D;;;;"}
@@ -0,0 +1,14 @@
/**
* https://tc39.es/ecma402/#sec-getoptionsobject
* @param options
* @returns
*/
export function GetOptionsObject(options) {
if (typeof options === "undefined") {
return Object.create(null);
}
if (typeof options === "object") {
return options;
}
throw new TypeError("Options must be an object");
}
@@ -0,0 +1,167 @@
declare namespace ESTree {
interface FlowTypeAnnotation extends Node {}
interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
interface FlowDeclaration extends Declaration {}
interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
interface ArrayTypeAnnotation extends FlowTypeAnnotation {
elementType: FlowTypeAnnotation;
}
interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
interface ClassImplements extends Node {
id: Identifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface ClassProperty {
key: Expression;
value?: Expression | null;
typeAnnotation?: TypeAnnotation | null;
computed: boolean;
static: boolean;
}
interface DeclareClass extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
body: ObjectTypeAnnotation;
extends: InterfaceExtends[];
}
interface DeclareFunction extends FlowDeclaration {
id: Identifier;
}
interface DeclareModule extends FlowDeclaration {
id: Literal | Identifier;
body: BlockStatement;
}
interface DeclareVariable extends FlowDeclaration {
id: Identifier;
}
interface FunctionTypeAnnotation extends FlowTypeAnnotation {
params: FunctionTypeParam[];
returnType: FlowTypeAnnotation;
rest?: FunctionTypeParam | null;
typeParameters?: TypeParameterDeclaration | null;
}
interface FunctionTypeParam {
name: Identifier;
typeAnnotation: FlowTypeAnnotation;
optional: boolean;
}
interface GenericTypeAnnotation extends FlowTypeAnnotation {
id: Identifier | QualifiedTypeIdentifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface InterfaceExtends extends Node {
id: Identifier | QualifiedTypeIdentifier;
typeParameters?: TypeParameterInstantiation | null;
}
interface InterfaceDeclaration extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
extends: InterfaceExtends[];
body: ObjectTypeAnnotation;
}
interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
interface NullableTypeAnnotation extends FlowTypeAnnotation {
typeAnnotation: TypeAnnotation;
}
interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
interface TupleTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface TypeofTypeAnnotation extends FlowTypeAnnotation {
argument: FlowTypeAnnotation;
}
interface TypeAlias extends FlowDeclaration {
id: Identifier;
typeParameters?: TypeParameterDeclaration | null;
right: FlowTypeAnnotation;
}
interface TypeAnnotation extends Node {
typeAnnotation: FlowTypeAnnotation;
}
interface TypeCastExpression extends Expression {
expression: Expression;
typeAnnotation: TypeAnnotation;
}
interface TypeParameterDeclaration extends Node {
params: Identifier[];
}
interface TypeParameterInstantiation extends Node {
params: FlowTypeAnnotation[];
}
interface ObjectTypeAnnotation extends FlowTypeAnnotation {
properties: ObjectTypeProperty[];
indexers: ObjectTypeIndexer[];
callProperties: ObjectTypeCallProperty[];
}
interface ObjectTypeCallProperty extends Node {
value: FunctionTypeAnnotation;
static: boolean;
}
interface ObjectTypeIndexer extends Node {
id: Identifier;
key: FlowTypeAnnotation;
value: FlowTypeAnnotation;
static: boolean;
}
interface ObjectTypeProperty extends Node {
key: Expression;
value: FlowTypeAnnotation;
optional: boolean;
static: boolean;
}
interface QualifiedTypeIdentifier extends Node {
qualification: Identifier | QualifiedTypeIdentifier;
id: Identifier;
}
interface UnionTypeAnnotation extends FlowTypeAnnotation {
types: FlowTypeAnnotation[];
}
interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
}
@@ -0,0 +1,26 @@
import type { ClientCollectionConfig, PaginatedDocs } from 'payload';
import React from 'react';
import type { IListQueryContext } from '../../providers/ListQuery/types.js';
import './index.scss';
/**
* @internal
*/
export declare const PageControlsComponent: React.FC<{
AfterPageControls?: React.ReactNode;
collectionConfig: ClientCollectionConfig;
data: PaginatedDocs;
handlePageChange?: IListQueryContext['handlePageChange'];
handlePerPageChange?: IListQueryContext['handlePerPageChange'];
limit?: number;
}>;
/**
* These page controls are controlled by the global ListQuery state.
* To override thi behavior, build your own wrapper around PageControlsComponent.
*
* @internal
*/
export declare const PageControls: React.FC<{
AfterPageControls?: React.ReactNode;
collectionConfig: ClientCollectionConfig;
}>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=e=>()=>({path:`/translations`,params:e??{},method:`GET`}),n=(t,n)=>()=>(e.throwIfEmpty(String(t),`Key cannot be empty`),{path:`/translations/${t}`,params:n??{},method:`GET`});exports.readTranslation=n,exports.readTranslations=t;
//# sourceMappingURL=translations.cjs.map
@@ -0,0 +1,101 @@
'use strict';
var common = require('./common');
// get snippet for a single line, respecting maxLength
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
var head = '';
var tail = '';
var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
if (position - lineStart > maxHalfLength) {
head = ' ... ';
lineStart = position - maxHalfLength + head.length;
}
if (lineEnd - position > maxHalfLength) {
tail = ' ...';
lineEnd = position + maxHalfLength - tail.length;
}
return {
str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, '→') + tail,
pos: position - lineStart + head.length // relative position
};
}
function padStart(string, max) {
return common.repeat(' ', max - string.length) + string;
}
function makeSnippet(mark, options) {
options = Object.create(options || null);
if (!mark.buffer) return null;
if (!options.maxLength) options.maxLength = 79;
if (typeof options.indent !== 'number') options.indent = 1;
if (typeof options.linesBefore !== 'number') options.linesBefore = 3;
if (typeof options.linesAfter !== 'number') options.linesAfter = 2;
var re = /\r?\n|\r|\0/g;
var lineStarts = [ 0 ];
var lineEnds = [];
var match;
var foundLineNo = -1;
while ((match = re.exec(mark.buffer))) {
lineEnds.push(match.index);
lineStarts.push(match.index + match[0].length);
if (mark.position <= match.index && foundLineNo < 0) {
foundLineNo = lineStarts.length - 2;
}
}
if (foundLineNo < 0) foundLineNo = lineStarts.length - 1;
var result = '', i, line;
var lineNoLength = Math.min(mark.line + options.linesAfter, lineEnds.length).toString().length;
var maxLineLength = options.maxLength - (options.indent + lineNoLength + 3);
for (i = 1; i <= options.linesBefore; i++) {
if (foundLineNo - i < 0) break;
line = getLine(
mark.buffer,
lineStarts[foundLineNo - i],
lineEnds[foundLineNo - i],
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
maxLineLength
);
result = common.repeat(' ', options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) +
' | ' + line.str + '\n' + result;
}
line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
result += common.repeat(' ', options.indent) + padStart((mark.line + 1).toString(), lineNoLength) +
' | ' + line.str + '\n';
result += common.repeat('-', options.indent + lineNoLength + 3 + line.pos) + '^' + '\n';
for (i = 1; i <= options.linesAfter; i++) {
if (foundLineNo + i >= lineEnds.length) break;
line = getLine(
mark.buffer,
lineStarts[foundLineNo + i],
lineEnds[foundLineNo + i],
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
maxLineLength
);
result += common.repeat(' ', options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) +
' | ' + line.str + '\n';
}
return result.replace(/\n$/, '');
}
module.exports = makeSnippet;
@@ -0,0 +1,76 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SimpleSpanProcessor = void 0;
const api_1 = require("@opentelemetry/api");
const core_1 = require("@opentelemetry/core");
/**
* An implementation of the {@link SpanProcessor} that converts the {@link Span}
* to {@link ReadableSpan} and passes it to the configured exporter.
*
* Only spans that are sampled are converted.
*
* NOTE: This {@link SpanProcessor} exports every ended span individually instead of batching spans together, which causes significant performance overhead with most exporters. For production use, please consider using the {@link BatchSpanProcessor} instead.
*/
class SimpleSpanProcessor {
_exporter;
_shutdownOnce;
_pendingExports;
constructor(exporter) {
this._exporter = exporter;
this._shutdownOnce = new core_1.BindOnceFuture(this._shutdown, this);
this._pendingExports = new Set();
}
async forceFlush() {
await Promise.all(Array.from(this._pendingExports));
if (this._exporter.forceFlush) {
await this._exporter.forceFlush();
}
}
onStart(_span, _parentContext) { }
onEnd(span) {
if (this._shutdownOnce.isCalled) {
return;
}
if ((span.spanContext().traceFlags & api_1.TraceFlags.SAMPLED) === 0) {
return;
}
const pendingExport = this._doExport(span).catch(err => (0, core_1.globalErrorHandler)(err));
// Enqueue this export to the pending list so it can be flushed by the user.
this._pendingExports.add(pendingExport);
void pendingExport.finally(() => this._pendingExports.delete(pendingExport));
}
async _doExport(span) {
if (span.resource.asyncAttributesPending) {
// Ensure resource is fully resolved before exporting.
await span.resource.waitForAsyncAttributes?.();
}
const result = await core_1.internal._export(this._exporter, [span]);
if (result.code !== core_1.ExportResultCode.SUCCESS) {
throw (result.error ??
new Error(`SimpleSpanProcessor: span export failed (status ${result})`));
}
}
shutdown() {
return this._shutdownOnce.call();
}
_shutdown() {
return this._exporter.shutdown();
}
}
exports.SimpleSpanProcessor = SimpleSpanProcessor;
//# sourceMappingURL=SimpleSpanProcessor.js.map
@@ -0,0 +1 @@
{"version":3,"file":"ReservedFieldName.d.ts","sourceRoot":"","sources":["../../src/errors/ReservedFieldName.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM;CAGzD"}
@@ -0,0 +1,49 @@
/**
* Map an IntersectionHandler callback to an element. We only ever make one handler for one
* element, so even though these handlers might all be triggered by different
* observers, we can keep them in the same map.
*/
const observerCallbacks = new WeakMap();
/**
* Multiple observers can be created for multiple element/document roots. Each with
* different settings. So here we store dictionaries of observers to each root,
* using serialised settings (threshold/margin) as lookup keys.
*/
const observers = new WeakMap();
const fireObserverCallback = (entry) => {
const callback = observerCallbacks.get(entry.target);
callback && callback(entry);
};
const fireAllObserverCallbacks = (entries) => {
entries.forEach(fireObserverCallback);
};
function initIntersectionObserver({ root, ...options }) {
const lookupRoot = root || document;
/**
* If we don't have an observer lookup map for this root, create one.
*/
if (!observers.has(lookupRoot)) {
observers.set(lookupRoot, {});
}
const rootObservers = observers.get(lookupRoot);
const key = JSON.stringify(options);
/**
* If we don't have an observer for this combination of root and settings,
* create one.
*/
if (!rootObservers[key]) {
rootObservers[key] = new IntersectionObserver(fireAllObserverCallbacks, { root, ...options });
}
return rootObservers[key];
}
function observeIntersection(element, options, callback) {
const rootInteresectionObserver = initIntersectionObserver(options);
observerCallbacks.set(element, callback);
rootInteresectionObserver.observe(element);
return () => {
observerCallbacks.delete(element);
rootInteresectionObserver.unobserve(element);
};
}
export { observeIntersection };
@@ -0,0 +1 @@
{"version":3,"names":["_classStaticPrivateMethodSet","TypeError"],"sources":["../../src/helpers/classStaticPrivateMethodSet.js"],"sourcesContent":["/* @minVersion 7.3.2 */\n/* @onlyBabel7 */\n\nexport default function _classStaticPrivateMethodSet() {\n throw new TypeError(\"attempted to set read only static private field\");\n}\n"],"mappings":";;;;;;AAGe,SAASA,4BAA4BA,CAAA,EAAG;EACrD,MAAM,IAAIC,SAAS,CAAC,iDAAiD,CAAC;AACxE","ignoreList":[]}
@@ -0,0 +1,25 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.cjs";
import type { MySqlIntConfig } from "./int.cjs";
export type MySqlMediumIntBuilderInitial<TName extends string> = MySqlMediumIntBuilder<{
name: TName;
dataType: 'number';
columnType: 'MySqlMediumInt';
data: number;
driverParam: number | string;
enumValues: undefined;
}>;
export declare class MySqlMediumIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlMediumInt'>> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlIntConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config?: MySqlIntConfig);
}
export declare class MySqlMediumInt<T extends ColumnBaseConfig<'number', 'MySqlMediumInt'>> extends MySqlColumnWithAutoIncrement<T, MySqlIntConfig> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | string): number;
}
export declare function mediumint(): MySqlMediumIntBuilderInitial<''>;
export declare function mediumint(config?: MySqlIntConfig): MySqlMediumIntBuilderInitial<''>;
export declare function mediumint<TName extends string>(name: TName, config?: MySqlIntConfig): MySqlMediumIntBuilderInitial<TName>;
@@ -0,0 +1,89 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import { getTranslation } from '@payloadcms/translations';
import React, { useEffect } from 'react';
import { Drawer } from '../../../elements/Drawer/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import { BlockSelector } from '../BlockSelector/index.js';
export const BlocksDrawer = props => {
const $ = _c(19);
const {
addRow,
addRowIndex,
blocks,
drawerSlug,
labels
} = props;
const {
closeModal,
isModalOpen
} = useModal();
const {
i18n,
t
} = useTranslation();
const [searchTermOverride, setSearchTermOverride] = React.useState("");
let t0;
let t1;
if ($[0] !== drawerSlug || $[1] !== isModalOpen) {
t0 = () => {
if (!isModalOpen(drawerSlug)) {
setSearchTermOverride("");
}
};
t1 = [isModalOpen, drawerSlug];
$[0] = drawerSlug;
$[1] = isModalOpen;
$[2] = t0;
$[3] = t1;
} else {
t0 = $[2];
t1 = $[3];
}
useEffect(t0, t1);
let t2;
if ($[4] !== addRow || $[5] !== addRowIndex || $[6] !== blocks || $[7] !== closeModal || $[8] !== drawerSlug || $[9] !== i18n || $[10] !== labels.singular || $[11] !== searchTermOverride || $[12] !== t) {
let t3;
if ($[14] !== addRow || $[15] !== addRowIndex || $[16] !== closeModal || $[17] !== drawerSlug) {
t3 = slug => {
addRow(addRowIndex, slug);
closeModal(drawerSlug);
};
$[14] = addRow;
$[15] = addRowIndex;
$[16] = closeModal;
$[17] = drawerSlug;
$[18] = t3;
} else {
t3 = $[18];
}
t2 = _jsx(Drawer, {
slug: drawerSlug,
title: t("fields:addLabel", {
label: getTranslation(labels.singular, i18n)
}),
children: _jsx(BlockSelector, {
blocks,
onSelect: t3,
searchTerm: searchTermOverride
})
});
$[4] = addRow;
$[5] = addRowIndex;
$[6] = blocks;
$[7] = closeModal;
$[8] = drawerSlug;
$[9] = i18n;
$[10] = labels.singular;
$[11] = searchTermOverride;
$[12] = t;
$[13] = t2;
} else {
t2 = $[13];
}
return t2;
};
//# sourceMappingURL=index.js.map

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