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

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

View File

@@ -0,0 +1,45 @@
var path = require('path');
var parse = path.parse || require('path-parse'); // eslint-disable-line global-require
var driveLetterRegex = /^([A-Za-z]:)/;
var uncPathRegex = /^\\\\/;
var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
var prefix = '/';
if (driveLetterRegex.test(absoluteStart)) {
prefix = '';
} else if (uncPathRegex.test(absoluteStart)) {
prefix = '\\\\';
}
var paths = [absoluteStart];
var parsed = parse(absoluteStart);
while (parsed.dir !== paths[paths.length - 1]) {
paths.push(parsed.dir);
parsed = parse(parsed.dir);
}
return paths.reduce(function (dirs, aPath) {
return dirs.concat(modules.map(function (moduleDir) {
return path.resolve(prefix, aPath, moduleDir);
}));
}, []);
};
module.exports = function nodeModulesPaths(start, opts, request) {
var modules = opts && opts.moduleDirectory
? [].concat(opts.moduleDirectory)
: ['node_modules'];
if (opts && typeof opts.paths === 'function') {
return opts.paths(
request,
start,
function () { return getNodeModulesDirs(start, modules); },
opts
);
}
var dirs = getNodeModulesDirs(start, modules);
return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
};

View File

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

View File

@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B zC"},B:{"1":"0 1 2 3 4 5 6 7 8 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 O"},C:{"1":"0 1 2 3 4 5 6 7 8 AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC 1C 2C 3C","2":"0C VC 4C 5C","8":"9 J bB K D E F A B C L M G N O P cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B"},D:{"1":"0 1 2 3 4 5 6 7 8 fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B XC 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB I ZC aC OC","2":"J bB","8":"K D E","132":"9 F A B C L M G N O P cB AB BB","260":"CB DB EB FB GB HB IB dB eB"},E:{"1":"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 L 6C bC 7C 8C 9C AD cC PC QC BD","516":"M G CD DD dC eC RC ED"},F:{"1":"0 1 2 3 4 5 6 7 8 9 cB AB BB CB DB EB FB GB HB IB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC MC NC Q H R YC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z","2":"F JD KD LD","8":"B MD","132":"PC xC ND","260":"C G N O P QC"},G:{"1":"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 aD bD cD dD eD"},H:{"1":"mD"},I:{"1":"I yC rD sD","2":"VC nD oD pD","132":"J qD"},J:{"2":"D A"},K:{"1":"C H PC xC QC","2":"A","132":"B"},L:{"1":"I"},M:{"1":"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":"7D","8":"6D"}},B:6,C:"WebP image format",D:true};

View File

@@ -0,0 +1,12 @@
# Node.js releases data
All data is located in `data` directory.
`data/processed` contains `envs.json` with node.js releases data preprocessed to be used by [Browserslist](https://github.com/ai/browserslist) and other projects. Each version in this file contains only necessary info: version, release date, LTS flag/name, and security flag.
`data/release-schedule` contains `release-schedule.json` with node.js releases date and end of life date.
## Installation
```bash
npm install node-releases
```

View File

@@ -0,0 +1,20 @@
import { DirectusCollection } from "../../../schema/collection.cjs";
import { NestedPartial } from "../../../types/utils.cjs";
import { ApplyQueryFields } from "../../../types/output.cjs";
import { FieldQuery, Query } from "../../../types/query.cjs";
import { RestCommand } from "../../types.cjs";
//#region src/rest/commands/create/collections.d.ts
type CreateCollectionOutput<Schema, TQuery extends Query<Schema, Item>, Item extends object = DirectusCollection<Schema>> = ApplyQueryFields<Schema, Item, TQuery['fields']>;
/**
* Create a new Collection. This will create a new table in the database as well.
*
* @param item This endpoint doesn't currently support any query parameters.
* @param query Optional return data query
*
* @returns The collection object for the collection created in this request.
*/
declare const createCollection: <Schema, const TQuery extends FieldQuery<Schema, DirectusCollection<Schema>>>(item: NestedPartial<DirectusCollection<Schema>>, query?: TQuery) => RestCommand<CreateCollectionOutput<Schema, TQuery>, Schema>;
//#endregion
export { CreateCollectionOutput, createCollection };
//# sourceMappingURL=collections.d.cts.map

View File

@@ -0,0 +1,125 @@
"use strict";
exports.localize = void 0;
var _index = require("../../_lib/buildLocalizeFn.cjs");
const eraValues = {
narrow: ["М.А", "М"],
abbreviated: ["М.А", "М"],
wide: ["Милоддан Аввалги", "Милодий"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-чор.", "2-чор.", "3-чор.", "4-чор."],
wide: ["1-чорак", "2-чорак", "3-чорак", "4-чорак"],
};
const monthValues = {
narrow: ["Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"],
abbreviated: [
"янв",
"фев",
"мар",
"апр",
"май",
"июн",
"июл",
"авг",
"сен",
"окт",
"ноя",
"дек",
],
wide: [
"январ",
"феврал",
"март",
"апрел",
"май",
"июн",
"июл",
"август",
"сентабр",
"октабр",
"ноябр",
"декабр",
],
};
const dayValues = {
narrow: ["Я", "Д", "С", "Ч", "П", "Ж", "Ш"],
short: ["як", "ду", "се", "чо", "па", "жу", "ша"],
abbreviated: ["якш", "душ", "сеш", "чор", "пай", "жум", "шан"],
wide: [
"якшанба",
"душанба",
"сешанба",
"чоршанба",
"пайшанба",
"жума",
"шанба",
],
};
const dayPeriodValues = {
any: {
am: "П.О.",
pm: "П.К.",
midnight: "ярим тун",
noon: "пешин",
morning: "эрталаб",
afternoon: "пешиндан кейин",
evening: "кечаси",
night: "тун",
},
};
const formattingDayPeriodValues = {
any: {
am: "П.О.",
pm: "П.К.",
midnight: "ярим тун",
noon: "пешин",
morning: "эрталаб",
afternoon: "пешиндан кейин",
evening: "кечаси",
night: "тун",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
const localize = (exports.localize = {
ordinalNumber,
era: (0, _index.buildLocalizeFn)({
values: eraValues,
defaultWidth: "wide",
}),
quarter: (0, _index.buildLocalizeFn)({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: (0, _index.buildLocalizeFn)({
values: monthValues,
defaultWidth: "wide",
}),
day: (0, _index.buildLocalizeFn)({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: (0, _index.buildLocalizeFn)({
values: dayPeriodValues,
defaultWidth: "any",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "any",
}),
});

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/DocumentDrawer/DrawerHeader/index.tsx"],"names":[],"mappings":"AAeA,OAAO,cAAc,CAAA;AAIrB,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1C,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB,CAuCA,CAAA"}

View File

@@ -0,0 +1,137 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.js";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.js";
const matchOrdinalNumberPattern = /^(\d+)(º|ª)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ac|dc|a|d)/i,
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
wide: /^(antes de cristo|antes da era comum|depois de cristo|era comum)/i,
};
const parseEraPatterns = {
any: [/^ac/i, /^dc/i],
wide: [
/^(antes de cristo|antes da era comum)/i,
/^(depois de cristo|era comum)/i,
],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^T[1234]/i,
wide: /^[1234](º|ª)? trimestre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ab/i,
/^mai/i,
/^jun/i,
/^jul/i,
/^ag/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[dstq]/i,
short: /^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[áa]b)/i,
wide: /^(domingo|segunda-?\s?feira|terça-?\s?feira|quarta-?\s?feira|quinta-?\s?feira|sexta-?\s?feira|s[áa]bado)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^s/i, /^t/i, /^q/i, /^q/i, /^s/i, /^s/i],
any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[áa]/i],
};
const matchDayPeriodPatterns = {
narrow:
/^(a|p|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,
any: /^([ap]\.?\s?m\.?|meia-?\s?noite|meio-?\s?dia|(da) (manh[ãa]|tarde|noite|madrugada))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^meia/i,
noon: /^meio/i,
morning: /manh[ãa]/i,
afternoon: /tarde/i,
evening: /noite/i,
night: /madrugada/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,7 @@
'use strict'
module.exports = {
SemVer: require('./semver.js'),
Range: require('./range.js'),
Comparator: require('./comparator.js'),
}

View File

@@ -0,0 +1 @@
{"version":3,"names":[],"sources":["../src/types.ts"],"sourcesContent":["import type * as t from \"@babel/types\";\nimport type { NodePath } from \"./index.ts\";\nimport type { VirtualTypeAliases } from \"./path/lib/virtual-types.ts\";\nimport type {\n ExplVisitorBase,\n VisitorBaseNodes,\n VisitorBaseAliases,\n} from \"./generated/visitor-types.d.ts\";\n\nexport type VisitPhase = \"enter\" | \"exit\";\n\ninterface VisitNodeObject<S, P extends t.Node> {\n enter?: VisitNodeFunction<S, P>;\n exit?: VisitNodeFunction<S, P>;\n}\n\nexport interface ExplVisitNode<S, P extends t.Node> {\n enter?: VisitNodeFunction<S, P>[];\n exit?: VisitNodeFunction<S, P>[];\n}\n\nexport interface ExplodedVisitor<S = unknown>\n extends ExplVisitorBase<S>,\n ExplVisitNode<S, t.Node> {\n _exploded: true;\n _verified: true;\n}\n\n// TODO: Assert that the keys of this are the keys of VirtualTypeAliases without\n// the keys of VisitorBaseNodes and VisitorBaseAliases\n// prettier-ignore\ninterface VisitorVirtualAliases<S> {\n BindingIdentifier?: VisitNode<S, VirtualTypeAliases[\"BindingIdentifier\"]>;\n BlockScoped?: VisitNode<S, VirtualTypeAliases[\"BlockScoped\"]>;\n ExistentialTypeParam?: VisitNode<S, VirtualTypeAliases[\"ExistentialTypeParam\"]>;\n Expression?: VisitNode<S, VirtualTypeAliases[\"Expression\"]>;\n //Flow?: VisitNode<S, VirtualTypeAliases[\"Flow\"]>;\n ForAwaitStatement?: VisitNode<S, VirtualTypeAliases[\"ForAwaitStatement\"]>;\n Generated?: VisitNode<S, VirtualTypeAliases[\"Generated\"]>;\n NumericLiteralTypeAnnotation?: VisitNode<S, VirtualTypeAliases[\"NumericLiteralTypeAnnotation\"]>;\n Pure?: VisitNode<S, VirtualTypeAliases[\"Pure\"]>;\n Referenced?: VisitNode<S, VirtualTypeAliases[\"Referenced\"]>;\n ReferencedIdentifier?: VisitNode<S, VirtualTypeAliases[\"ReferencedIdentifier\"]>;\n ReferencedMemberExpression?: VisitNode<S, VirtualTypeAliases[\"ReferencedMemberExpression\"]>;\n //RestProperty?: VisitNode<S, VirtualTypeAliases[\"RestProperty\"]>;\n Scope?: VisitNode<S, VirtualTypeAliases[\"Scope\"]>;\n //SpreadProperty?: VisitNode<S, VirtualTypeAliases[\"SpreadProperty\"]>;\n Statement?: VisitNode<S, VirtualTypeAliases[\"Statement\"]>;\n User?: VisitNode<S, VirtualTypeAliases[\"User\"]>;\n Var?: VisitNode<S, VirtualTypeAliases[\"Var\"]>;\n}\n\n// TODO: Do not export this? Or give it a better name?\nexport interface VisitorBase<S>\n extends VisitNodeObject<S, t.Node>,\n VisitorBaseNodes<S>,\n VisitorBaseAliases<S>,\n VisitorVirtualAliases<S>,\n // Babel supports `NodeTypesWithoutComment | NodeTypesWithoutComment | ... ` but it is\n // too complex for TS. So we type it as a general visitor only if the key contains `|`\n // this is good enough for non-visitor traverse options e.g. `noScope`\n Record<`${string}|${string}`, VisitNode<S, t.Node>> {}\n\nexport type Visitor<S = unknown> = VisitorBase<S> | ExplodedVisitor<S>;\n\nexport type VisitNode<S, P extends t.Node> =\n | VisitNodeFunction<S, P>\n | VisitNodeObject<S, P>;\n\nexport type VisitNodeFunction<S, P extends t.Node> = (\n this: S,\n path: NodePath<P>,\n state: S,\n) => void;\n"],"mappings":"","ignoreList":[]}

View File

@@ -0,0 +1,252 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
Button: () => Button
});
module.exports = __toCommonJS(src_exports);
// src/button.tsx
var React = __toESM(require("react"));
// src/utils/parse-padding.ts
function convertToPx(value) {
let px = 0;
if (!value) {
return px;
}
if (typeof value === "number") {
return value;
}
const matches = /^([\d.]+)(px|em|rem|%)$/.exec(value);
if (matches && matches.length === 3) {
const numValue = parseFloat(matches[1]);
const unit = matches[2];
switch (unit) {
case "px":
return numValue;
case "em":
case "rem":
px = numValue * 16;
return px;
case "%":
px = numValue / 100 * 600;
return px;
default:
return numValue;
}
} else {
return 0;
}
}
function parsePadding({
padding = "",
paddingTop,
paddingRight,
paddingBottom,
paddingLeft
}) {
let pt = 0;
let pr = 0;
let pb = 0;
let pl = 0;
if (typeof padding === "number") {
pt = padding;
pr = padding;
pb = padding;
pl = padding;
} else {
const values = padding.split(/\s+/);
switch (values.length) {
case 1:
pt = convertToPx(values[0]);
pr = convertToPx(values[0]);
pb = convertToPx(values[0]);
pl = convertToPx(values[0]);
break;
case 2:
pt = convertToPx(values[0]);
pb = convertToPx(values[0]);
pr = convertToPx(values[1]);
pl = convertToPx(values[1]);
break;
case 3:
pt = convertToPx(values[0]);
pr = convertToPx(values[1]);
pl = convertToPx(values[1]);
pb = convertToPx(values[2]);
break;
case 4:
pt = convertToPx(values[0]);
pr = convertToPx(values[1]);
pb = convertToPx(values[2]);
pl = convertToPx(values[3]);
break;
default:
break;
}
}
return {
pt: paddingTop ? convertToPx(paddingTop) : pt,
pr: paddingRight ? convertToPx(paddingRight) : pr,
pb: paddingBottom ? convertToPx(paddingBottom) : pb,
pl: paddingLeft ? convertToPx(paddingLeft) : pl
};
}
// src/utils/px-to-pt.ts
var pxToPt = (px) => typeof px === "number" && !isNaN(Number(px)) ? px * 3 / 4 : null;
// src/button.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var maxFontWidth = 5;
function computeFontWidthAndSpaceCount(expectedWidth) {
if (expectedWidth === 0) return [0, 0];
let smallestSpaceCount = 0;
const computeRequiredFontWidth = () => {
if (smallestSpaceCount > 0) {
return expectedWidth / smallestSpaceCount / 2;
}
return Infinity;
};
while (computeRequiredFontWidth() > maxFontWidth) {
smallestSpaceCount++;
}
return [computeRequiredFontWidth(), smallestSpaceCount];
}
var Button = React.forwardRef(
(_a, ref) => {
var _b = _a, { children, style, target = "_blank" } = _b, props = __objRest(_b, ["children", "style", "target"]);
var _a2, _b2, _c, _d;
const { pt, pr, pb, pl } = parsePadding({
padding: style == null ? void 0 : style.padding,
paddingLeft: (_a2 = style == null ? void 0 : style.paddingLeft) != null ? _a2 : style == null ? void 0 : style.paddingInline,
paddingRight: (_b2 = style == null ? void 0 : style.paddingRight) != null ? _b2 : style == null ? void 0 : style.paddingInline,
paddingTop: (_c = style == null ? void 0 : style.paddingTop) != null ? _c : style == null ? void 0 : style.paddingBlock,
paddingBottom: (_d = style == null ? void 0 : style.paddingBottom) != null ? _d : style == null ? void 0 : style.paddingBlock
});
const y = pt + pb;
const textRaise = pxToPt(y);
const [plFontWidth, plSpaceCount] = computeFontWidthAndSpaceCount(pl);
const [prFontWidth, prSpaceCount] = computeFontWidthAndSpaceCount(pr);
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
"a",
__spreadProps(__spreadValues({}, props), {
ref,
style: buttonStyle(__spreadProps(__spreadValues({}, style), { pt, pr, pb, pl })),
target,
children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"span",
{
dangerouslySetInnerHTML: {
// The `&#8202;` is as close to `1px` of an empty character as we can get, then, we use the `mso-font-width`
// to scale it according to what padding the developer wants. `mso-font-width` also does not allow for percentages
// >= 500% so we need to add extra spaces accordingly.
//
// See https://github.com/resend/react-email/issues/1512 for why we do not use letter-spacing instead.
__html: `<!--[if mso]><i style="mso-font-width:${plFontWidth * 100}%;mso-text-raise:${textRaise}" hidden>${"&#8202;".repeat(
plSpaceCount
)}</i><![endif]-->`
}
}
),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { style: buttonTextStyle(pb), children }),
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"span",
{
dangerouslySetInnerHTML: {
__html: `<!--[if mso]><i style="mso-font-width:${prFontWidth * 100}%" hidden>${"&#8202;".repeat(
prSpaceCount
)}&#8203;</i><![endif]-->`
}
}
)
]
})
);
}
);
Button.displayName = "Button";
var buttonStyle = (style) => {
const _a = style || {}, { pt, pr, pb, pl } = _a, rest = __objRest(_a, ["pt", "pr", "pb", "pl"]);
return __spreadProps(__spreadValues({
lineHeight: "100%",
textDecoration: "none",
display: "inline-block",
maxWidth: "100%",
msoPaddingAlt: "0px"
}, rest), {
padding: `${pt}px ${pr}px ${pb}px ${pl}px`
});
};
var buttonTextStyle = (pb) => {
return {
maxWidth: "100%",
display: "inline-block",
lineHeight: "120%",
msoPaddingAlt: "0px",
msoTextRaise: pxToPt(pb || 0)
};
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Button
});

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _isNativeReflectConstruct;
function _isNativeReflectConstruct() {
try {
var result = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
} catch (_) {}
return (exports.default = _isNativeReflectConstruct = function () {
return !!result;
})();
}
//# sourceMappingURL=isNativeReflectConstruct.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"volume-off.js","sources":["../../../src/icons/volume-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name VolumeOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgOWE1IDUgMCAwIDEgLjk1IDIuMjkzIiAvPgogIDxwYXRoIGQ9Ik0xOS4zNjQgNS42MzZhOSA5IDAgMCAxIDEuODg5IDkuOTYiIC8+CiAgPHBhdGggZD0ibTIgMiAyMCAyMCIgLz4KICA8cGF0aCBkPSJtNyA3LS41ODcuNTg3QTEuNCAxLjQgMCAwIDEgNS40MTYgOEgzYTEgMSAwIDAgMC0xIDF2NmExIDEgMCAwIDAgMSAxaDIuNDE2YTEuNCAxLjQgMCAwIDEgLjk5Ny40MTNsMy4zODMgMy4zODRBLjcwNS43MDUgMCAwIDAgMTEgMTkuMjk4VjExIiAvPgogIDxwYXRoIGQ9Ik05LjgyOCA0LjE3MkEuNjg2LjY4NiAwIDAgMSAxMSA0LjY1N3YuNjg2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/volume-off\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 VolumeOff = createLucideIcon('VolumeOff', [\n ['path', { d: 'M16 9a5 5 0 0 1 .95 2.293', key: '1fgyg8' }],\n ['path', { d: 'M19.364 5.636a9 9 0 0 1 1.889 9.96', key: 'l3zxae' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n [\n 'path',\n {\n d: 'm7 7-.587.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298V11',\n key: '1gbwow',\n },\n ],\n ['path', { d: 'M9.828 4.172A.686.686 0 0 1 11 4.657v.686', key: 's2je0y' }],\n]);\n\nexport default VolumeOff;\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,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACnE,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,CAC3C,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,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,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5E,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"ServiceInstanceIdDetector.js","sourceRoot":"","sources":["../../../../../src/detectors/platform/node/ServiceInstanceIdDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAIpC;;GAEG;AACH,MAAM,yBAAyB;IAC7B,MAAM,CAAC,OAAiC;QACtC,OAAO;YACL,UAAU,EAAE;gBACV,CAAC,wBAAwB,CAAC,EAAE,UAAU,EAAE;aACzC;SACF,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,yBAAyB,EAAE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { ATTR_SERVICE_INSTANCE_ID } from '../../../semconv';\nimport { randomUUID } from 'crypto';\nimport { ResourceDetectionConfig } from '../../../config';\nimport { DetectedResource, ResourceDetector } from '../../../types';\n\n/**\n * ServiceInstanceIdDetector detects the resources related to the service instance ID.\n */\nclass ServiceInstanceIdDetector implements ResourceDetector {\n detect(_config?: ResourceDetectionConfig): DetectedResource {\n return {\n attributes: {\n [ATTR_SERVICE_INSTANCE_ID]: randomUUID(),\n },\n };\n }\n}\n\n/**\n * @experimental\n */\nexport const serviceInstanceIdDetector = new ServiceInstanceIdDetector();\n"]}

View File

@@ -0,0 +1,30 @@
/*
* 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.
*/
/**
* No-op implementations of {@link TextMapPropagator}.
*/
export class NoopTextMapPropagator {
/** Noop inject function does nothing */
inject(_context, _carrier) { }
/** Noop extract function does nothing and returns the input context */
extract(context, _carrier) {
return context;
}
fields() {
return [];
}
}
//# sourceMappingURL=NoopTextMapPropagator.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"watchdog.js","sourceRoot":"","sources":["../../src/watchdog.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,gEAAgE;AAChE,uCAAuC;;;AAEvC,iDAAmD;AAEnD,MAAM,YAAY,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAA;AAED;;;;;;GAMG;AACI,MAAM,QAAQ,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC9C,IAAI,SAAS,GAAG,KAAK,CAAA;IACrB,MAAM,GAAG,GAAG,IAAA,qBAAK,EACf,OAAO,CAAC,QAAQ,EAChB,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EACvC;QACE,KAAK,EAAE,QAAQ;KAChB,CACF,CAAA;IACD,GAAG,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,IAAI,CAAC,SAAS;YAAE,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IACF,OAAO,GAAG,CAAA;AACZ,CAAC,CAAA;AAdY,QAAA,QAAQ,YAcpB","sourcesContent":["// this spawns a child process that listens for SIGHUP when the\n// parent process exits, and after 200ms, sends a SIGKILL to the\n// child, in case it did not terminate.\n\nimport { ChildProcess, spawn } from 'child_process'\n\nconst watchdogCode = String.raw`\nconst pid = parseInt(process.argv[1], 10)\nprocess.title = 'node (foreground-child watchdog pid=' + pid + ')'\nif (!isNaN(pid)) {\n let barked = false\n // keepalive\n const interval = setInterval(() => {}, 60000)\n const bark = () => {\n clearInterval(interval)\n if (barked) return\n barked = true\n process.removeListener('SIGHUP', bark)\n setTimeout(() => {\n try {\n process.kill(pid, 'SIGKILL')\n setTimeout(() => process.exit(), 200)\n } catch (_) {}\n }, 500)\n })\n process.on('SIGHUP', bark)\n}\n`\n\n/**\n * Pass in a ChildProcess, and this will spawn a watchdog process that\n * will make sure it exits if the parent does, thus preventing any\n * dangling detached zombie processes.\n *\n * If the child ends before the parent, then the watchdog will terminate.\n */\nexport const watchdog = (child: ChildProcess) => {\n let dogExited = false\n const dog = spawn(\n process.execPath,\n ['-e', watchdogCode, String(child.pid)],\n {\n stdio: 'ignore',\n },\n )\n dog.on('exit', () => (dogExited = true))\n child.on('exit', () => {\n if (!dogExited) dog.kill('SIGKILL')\n })\n return dog\n}\n"]}

View File

@@ -0,0 +1,147 @@
import { expect, expectTypeOf, test } from "vitest";
import * as z from "zod/v4";
const nested = z.object({
name: z.string(),
age: z.number(),
outer: z.object({
inner: z.string(),
}),
array: z.array(z.object({ asdf: z.string() })),
});
test("shallow inference", () => {
const shallow = nested.partial();
type shallow = z.infer<typeof shallow>;
expectTypeOf<shallow>().toEqualTypeOf<{
name?: string | undefined;
age?: number | undefined;
outer?: { inner: string } | undefined;
array?: { asdf: string }[] | undefined;
}>();
});
test("shallow partial parse", () => {
const shallow = nested.partial();
shallow.parse({});
shallow.parse({
name: "asdf",
age: 23143,
});
});
test("required", () => {
const object = z.object({
name: z.string(),
age: z.number().optional(),
field: z.string().optional().default("asdf"),
nullableField: z.number().nullable(),
nullishField: z.string().nullish(),
});
const requiredObject = object.required();
expect(requiredObject.shape.name).toBeInstanceOf(z.ZodNonOptional);
expect(requiredObject.shape.name.unwrap()).toBeInstanceOf(z.ZodString);
expect(requiredObject.shape.age).toBeInstanceOf(z.ZodNonOptional);
expect(requiredObject.shape.age.unwrap()).toBeInstanceOf(z.ZodOptional);
expect(requiredObject.shape.field).toBeInstanceOf(z.ZodNonOptional);
expect(requiredObject.shape.field.unwrap()).toBeInstanceOf(z.ZodDefault);
expect(requiredObject.shape.nullableField).toBeInstanceOf(z.ZodNonOptional);
expect(requiredObject.shape.nullableField.unwrap()).toBeInstanceOf(z.ZodNullable);
expect(requiredObject.shape.nullishField).toBeInstanceOf(z.ZodNonOptional);
expect(requiredObject.shape.nullishField.unwrap()).toBeInstanceOf(z.ZodOptional);
expect(requiredObject.shape.nullishField.unwrap().unwrap()).toBeInstanceOf(z.ZodNullable);
});
test("required inference", () => {
const object = z.object({
name: z.string(),
age: z.number().optional(),
field: z.string().optional().default("asdf"),
nullableField: z.number().nullable(),
nullishField: z.string().nullish(),
});
const requiredObject = object.required();
type required = z.infer<typeof requiredObject>;
type expected = {
name: string;
age: number;
field: string;
nullableField: number | null;
nullishField: string | null;
};
expectTypeOf<expected>().toEqualTypeOf<required>();
});
test("required with mask", () => {
const object = z.object({
name: z.string(),
age: z.number().optional(),
field: z.string().optional().default("asdf"),
country: z.string().optional(),
});
const requiredObject = object.required({ age: true });
expect(requiredObject.shape.name).toBeInstanceOf(z.ZodString);
expect(requiredObject.shape.age).toBeInstanceOf(z.ZodNonOptional);
expect(requiredObject.shape.field).toBeInstanceOf(z.ZodDefault);
expect(requiredObject.shape.country).toBeInstanceOf(z.ZodOptional);
});
test("required with mask -- ignore falsy values", () => {
const object = z.object({
name: z.string(),
age: z.number().optional(),
field: z.string().optional().default("asdf"),
country: z.string().optional(),
});
// @ts-expect-error
const requiredObject = object.required({ age: true, country: false });
expect(requiredObject.shape.name).toBeInstanceOf(z.ZodString);
expect(requiredObject.shape.age).toBeInstanceOf(z.ZodNonOptional);
expect(requiredObject.shape.field).toBeInstanceOf(z.ZodDefault);
expect(requiredObject.shape.country).toBeInstanceOf(z.ZodOptional);
});
test("partial with mask", async () => {
const object = z.object({
name: z.string(),
age: z.number().optional(),
field: z.string().optional().default("asdf"),
country: z.string(),
});
const masked = object.partial({ age: true, field: true, name: true }).strict();
expect(masked.shape.name).toBeInstanceOf(z.ZodOptional);
expect(masked.shape.age).toBeInstanceOf(z.ZodOptional);
expect(masked.shape.field).toBeInstanceOf(z.ZodOptional);
expect(masked.shape.country).toBeInstanceOf(z.ZodString);
masked.parse({ country: "US" });
await masked.parseAsync({ country: "US" });
});
test("partial with mask -- ignore falsy values", async () => {
const object = z.object({
name: z.string(),
age: z.number().optional(),
field: z.string().optional().default("asdf"),
country: z.string(),
});
// @ts-expect-error
const masked = object.partial({ name: true, country: false }).strict();
expect(masked.shape.name).toBeInstanceOf(z.ZodOptional);
expect(masked.shape.age).toBeInstanceOf(z.ZodOptional);
expect(masked.shape.field).toBeInstanceOf(z.ZodDefault);
expect(masked.shape.country).toBeInstanceOf(z.ZodString);
masked.parse({ country: "US" });
await masked.parseAsync({ country: "US" });
});

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"transform-tests.js","sourceRoot":"","sources":["../../../../../src/css/property-descriptors/__tests__/transform-tests.ts"],"names":[],"mappings":";;AAAA,0CAAuC;AACvC,8CAA2C;AAC3C,iCAAuC;AAEvC,IAAM,UAAU,GAAG,UAAC,KAAa,IAAK,OAAA,qBAAS,CAAC,KAAK,CAAC,EAAa,EAAE,eAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAxD,CAAwD,CAAC;AAE/F,QAAQ,CAAC,sBAAsB,EAAE;IAC7B,QAAQ,CAAC,WAAW,EAAE;QAClB,EAAE,CAAC,MAAM,EAAE,cAAM,OAAA,wBAAe,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,EAAzC,CAAyC,CAAC,CAAC;QAC5D,EAAE,CAAC,sCAAsC,EAAE;YACvC,OAAA,wBAAe,CAAC,UAAU,CAAC,sCAAsC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAAvF,CAAuF,CAAC,CAAC;QAC7F,EAAE,CAAC,0DAA0D,EAAE;YAC3D,OAAA,wBAAe,CACX,UAAU,CAAC,0DAA0D,CAAC,EACtE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CACrB;QAHD,CAGC,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}

View File

@@ -0,0 +1,250 @@
import { once } from "node:events";
import { NoopCache } from "../cache/core/index.js";
import { Column } from "../column.js";
import { entityKind, is } from "../entity.js";
import { NoopLogger } from "../logger.js";
import {
MySqlPreparedQuery,
MySqlSession,
MySqlTransaction
} from "../mysql-core/session.js";
import { fillPlaceholders, sql } from "../sql/sql.js";
import { mapResultRow } from "../utils.js";
class MySql2PreparedQuery extends MySqlPreparedQuery {
constructor(client, queryString, params, logger, cache, queryMetadata, cacheConfig, fields, customResultMapper, generatedIds, returningIds) {
super(cache, queryMetadata, cacheConfig);
this.client = client;
this.params = params;
this.logger = logger;
this.fields = fields;
this.customResultMapper = customResultMapper;
this.generatedIds = generatedIds;
this.returningIds = returningIds;
this.rawQuery = {
sql: queryString,
// rowsAsArray: true,
typeCast: function(field, next) {
if (field.type === "TIMESTAMP" || field.type === "DATETIME" || field.type === "DATE") {
return field.string();
}
return next();
}
};
this.query = {
sql: queryString,
rowsAsArray: true,
typeCast: function(field, next) {
if (field.type === "TIMESTAMP" || field.type === "DATETIME" || field.type === "DATE") {
return field.string();
}
return next();
}
};
}
static [entityKind] = "MySql2PreparedQuery";
rawQuery;
query;
async execute(placeholderValues = {}) {
const params = fillPlaceholders(this.params, placeholderValues);
this.logger.logQuery(this.rawQuery.sql, params);
const { fields, client, rawQuery, query, joinsNotNullableMap, customResultMapper, returningIds, generatedIds } = this;
if (!fields && !customResultMapper) {
const res = await this.queryWithCache(rawQuery.sql, params, async () => {
return await client.query(rawQuery, params);
});
const insertId = res[0].insertId;
const affectedRows = res[0].affectedRows;
if (returningIds) {
const returningResponse = [];
let j = 0;
for (let i = insertId; i < insertId + affectedRows; i++) {
for (const column of returningIds) {
const key = returningIds[0].path[0];
if (is(column.field, Column)) {
if (column.field.primary && column.field.autoIncrement) {
returningResponse.push({ [key]: i });
}
if (column.field.defaultFn && generatedIds) {
returningResponse.push({ [key]: generatedIds[j][key] });
}
}
}
j++;
}
return returningResponse;
}
return res;
}
const result = await this.queryWithCache(query.sql, params, async () => {
return await client.query(query, params);
});
const rows = result[0];
if (customResultMapper) {
return customResultMapper(rows);
}
return rows.map((row) => mapResultRow(fields, row, joinsNotNullableMap));
}
async *iterator(placeholderValues = {}) {
const params = fillPlaceholders(this.params, placeholderValues);
const conn = (isPool(this.client) ? await this.client.getConnection() : this.client).connection;
const { fields, query, rawQuery, joinsNotNullableMap, client, customResultMapper } = this;
const hasRowsMapper = Boolean(fields || customResultMapper);
const driverQuery = hasRowsMapper ? conn.query(query, params) : conn.query(rawQuery, params);
const stream = driverQuery.stream();
function dataListener() {
stream.pause();
}
stream.on("data", dataListener);
try {
const onEnd = once(stream, "end");
const onError = once(stream, "error");
while (true) {
stream.resume();
const row = await Promise.race([onEnd, onError, new Promise((resolve) => stream.once("data", resolve))]);
if (row === void 0 || Array.isArray(row) && row.length === 0) {
break;
} else if (row instanceof Error) {
throw row;
} else {
if (hasRowsMapper) {
if (customResultMapper) {
const mappedRow = customResultMapper([row]);
yield Array.isArray(mappedRow) ? mappedRow[0] : mappedRow;
} else {
yield mapResultRow(fields, row, joinsNotNullableMap);
}
} else {
yield row;
}
}
}
} finally {
stream.off("data", dataListener);
if (isPool(client)) {
conn.end();
}
}
}
}
class MySql2Session extends MySqlSession {
constructor(client, dialect, schema, options) {
super(dialect);
this.client = client;
this.schema = schema;
this.options = options;
this.logger = options.logger ?? new NoopLogger();
this.cache = options.cache ?? new NoopCache();
this.mode = options.mode;
}
static [entityKind] = "MySql2Session";
logger;
mode;
cache;
prepareQuery(query, fields, customResultMapper, generatedIds, returningIds, queryMetadata, cacheConfig) {
return new MySql2PreparedQuery(
this.client,
query.sql,
query.params,
this.logger,
this.cache,
queryMetadata,
cacheConfig,
fields,
customResultMapper,
generatedIds,
returningIds
);
}
/**
* @internal
* What is its purpose?
*/
async query(query, params) {
this.logger.logQuery(query, params);
const result = await this.client.query({
sql: query,
values: params,
rowsAsArray: true,
typeCast: function(field, next) {
if (field.type === "TIMESTAMP" || field.type === "DATETIME" || field.type === "DATE") {
return field.string();
}
return next();
}
});
return result;
}
all(query) {
const querySql = this.dialect.sqlToQuery(query);
this.logger.logQuery(querySql.sql, querySql.params);
return this.client.execute(querySql.sql, querySql.params).then((result) => result[0]);
}
async transaction(transaction, config) {
const session = isPool(this.client) ? new MySql2Session(
await this.client.getConnection(),
this.dialect,
this.schema,
this.options
) : this;
const tx = new MySql2Transaction(
this.dialect,
session,
this.schema,
0,
this.mode
);
if (config) {
const setTransactionConfigSql = this.getSetTransactionSQL(config);
if (setTransactionConfigSql) {
await tx.execute(setTransactionConfigSql);
}
const startTransactionSql = this.getStartTransactionSQL(config);
await (startTransactionSql ? tx.execute(startTransactionSql) : tx.execute(sql`begin`));
} else {
await tx.execute(sql`begin`);
}
try {
const result = await transaction(tx);
await tx.execute(sql`commit`);
return result;
} catch (err) {
await tx.execute(sql`rollback`);
throw err;
} finally {
if (isPool(this.client)) {
session.client.release();
}
}
}
}
class MySql2Transaction extends MySqlTransaction {
static [entityKind] = "MySql2Transaction";
async transaction(transaction) {
const savepointName = `sp${this.nestedIndex + 1}`;
const tx = new MySql2Transaction(
this.dialect,
this.session,
this.schema,
this.nestedIndex + 1,
this.mode
);
await tx.execute(sql.raw(`savepoint ${savepointName}`));
try {
const result = await transaction(tx);
await tx.execute(sql.raw(`release savepoint ${savepointName}`));
return result;
} catch (err) {
await tx.execute(sql.raw(`rollback to savepoint ${savepointName}`));
throw err;
}
}
}
function isPool(client) {
return "getConnection" in client;
}
export {
MySql2PreparedQuery,
MySql2Session,
MySql2Transaction
};
//# sourceMappingURL=session.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"message-square-more.js","sources":["../../../src/icons/message-square-more.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MessageSquareMore\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEgMTVhMiAyIDAgMCAxLTIgMkg3bC00IDRWNWEyIDIgMCAwIDEgMi0yaDE0YTIgMiAwIDAgMSAyIDJ6IiAvPgogIDxwYXRoIGQ9Ik04IDEwaC4wMSIgLz4KICA8cGF0aCBkPSJNMTIgMTBoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xNiAxMGguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/message-square-more\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 MessageSquareMore = createLucideIcon('MessageSquareMore', [\n ['path', { d: 'M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z', key: '1lielz' }],\n ['path', { d: 'M8 10h.01', key: '19clt8' }],\n ['path', { d: 'M12 10h.01', key: '1nrarc' }],\n ['path', { d: 'M16 10h.01', key: '1m94wz' }],\n]);\n\nexport default MessageSquareMore;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC9F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/validatePDF.ts"],"sourcesContent":["export function validatePDF(buffer: Buffer) {\n // Check for PDF header\n const header = buffer.subarray(0, 8).toString('latin1')\n if (!header.startsWith('%PDF-')) {\n return false\n }\n\n // Check for EOF marker and xref table\n const endSize = Math.min(1024, buffer.length)\n const end = buffer.subarray(buffer.length - endSize).toString('latin1')\n\n if (!end.includes('%%EOF') || !end.includes('xref')) {\n return false\n }\n\n return true\n}\n"],"names":["validatePDF","buffer","header","subarray","toString","startsWith","endSize","Math","min","length","end","includes"],"mappings":"AAAA,OAAO,SAASA,YAAYC,MAAc;IACxC,uBAAuB;IACvB,MAAMC,SAASD,OAAOE,QAAQ,CAAC,GAAG,GAAGC,QAAQ,CAAC;IAC9C,IAAI,CAACF,OAAOG,UAAU,CAAC,UAAU;QAC/B,OAAO;IACT;IAEA,sCAAsC;IACtC,MAAMC,UAAUC,KAAKC,GAAG,CAAC,MAAMP,OAAOQ,MAAM;IAC5C,MAAMC,MAAMT,OAAOE,QAAQ,CAACF,OAAOQ,MAAM,GAAGH,SAASF,QAAQ,CAAC;IAE9D,IAAI,CAACM,IAAIC,QAAQ,CAAC,YAAY,CAACD,IAAIC,QAAQ,CAAC,SAAS;QACnD,OAAO;IACT;IAEA,OAAO;AACT"}

View File

@@ -0,0 +1,52 @@
{
"name": "emoji-regex",
"version": "9.2.2",
"description": "A regular expression to match all Emoji-only symbols as per the Unicode Standard.",
"homepage": "https://mths.be/emoji-regex",
"main": "index.js",
"types": "index.d.ts",
"keywords": [
"unicode",
"regex",
"regexp",
"regular expressions",
"code points",
"symbols",
"characters",
"emoji"
],
"license": "MIT",
"author": {
"name": "Mathias Bynens",
"url": "https://mathiasbynens.be/"
},
"repository": {
"type": "git",
"url": "https://github.com/mathiasbynens/emoji-regex.git"
},
"bugs": "https://github.com/mathiasbynens/emoji-regex/issues",
"files": [
"LICENSE-MIT.txt",
"index.js",
"index.d.ts",
"RGI_Emoji.js",
"RGI_Emoji.d.ts",
"text.js",
"text.d.ts",
"es2015"
],
"scripts": {
"build": "rm -rf -- es2015; babel src -d .; NODE_ENV=es2015 babel src es2015_types -D -d ./es2015; node script/inject-sequences.js",
"test": "mocha",
"test:watch": "npm run test -- --watch"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.4",
"@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
"@babel/preset-env": "^7.4.4",
"@unicode/unicode-13.0.0": "^1.0.3",
"mocha": "^6.1.4",
"regexgen": "^1.3.0"
}
}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/pg-core/columns/int.common.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnDataType, GeneratedIdentityConfig, IsIdentity } from '~/column-builder.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { PgSequenceOptions } from '../sequence.ts';\nimport { PgColumnBuilder } from './common.ts';\n\nexport abstract class PgIntColumnBaseBuilder<\n\tT extends ColumnBuilderBaseConfig<ColumnDataType, string>,\n> extends PgColumnBuilder<\n\tT,\n\t{ generatedIdentity: GeneratedIdentityConfig }\n> {\n\tstatic override readonly [entityKind]: string = 'PgIntColumnBaseBuilder';\n\n\tgeneratedAlwaysAsIdentity(\n\t\tsequence?: PgSequenceOptions & { name?: string },\n\t): IsIdentity<this, 'always'> {\n\t\tif (sequence) {\n\t\t\tconst { name, ...options } = sequence;\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'always',\n\t\t\t\tsequenceName: name,\n\t\t\t\tsequenceOptions: options,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'always',\n\t\t\t};\n\t\t}\n\n\t\tthis.config.hasDefault = true;\n\t\tthis.config.notNull = true;\n\n\t\treturn this as IsIdentity<this, 'always'>;\n\t}\n\n\tgeneratedByDefaultAsIdentity(\n\t\tsequence?: PgSequenceOptions & { name?: string },\n\t): IsIdentity<this, 'byDefault'> {\n\t\tif (sequence) {\n\t\t\tconst { name, ...options } = sequence;\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'byDefault',\n\t\t\t\tsequenceName: name,\n\t\t\t\tsequenceOptions: options,\n\t\t\t};\n\t\t} else {\n\t\t\tthis.config.generatedIdentity = {\n\t\t\t\ttype: 'byDefault',\n\t\t\t};\n\t\t}\n\n\t\tthis.config.hasDefault = true;\n\t\tthis.config.notNull = true;\n\n\t\treturn this as IsIdentity<this, 'byDefault'>;\n\t}\n}\n"],"mappings":"AACA,SAAS,kBAAkB;AAE3B,SAAS,uBAAuB;AAEzB,MAAe,+BAEZ,gBAGR;AAAA,EACD,QAA0B,UAAU,IAAY;AAAA,EAEhD,0BACC,UAC6B;AAC7B,QAAI,UAAU;AACb,YAAM,EAAE,MAAM,GAAG,QAAQ,IAAI;AAC7B,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,QACN,cAAc;AAAA,QACd,iBAAiB;AAAA,MAClB;AAAA,IACD,OAAO;AACN,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,MACP;AAAA,IACD;AAEA,SAAK,OAAO,aAAa;AACzB,SAAK,OAAO,UAAU;AAEtB,WAAO;AAAA,EACR;AAAA,EAEA,6BACC,UACgC;AAChC,QAAI,UAAU;AACb,YAAM,EAAE,MAAM,GAAG,QAAQ,IAAI;AAC7B,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,QACN,cAAc;AAAA,QACd,iBAAiB;AAAA,MAClB;AAAA,IACD,OAAO;AACN,WAAK,OAAO,oBAAoB;AAAA,QAC/B,MAAM;AAAA,MACP;AAAA,IACD;AAEA,SAAK,OAAO,aAAa;AACzB,SAAK,OAAO,UAAU;AAEtB,WAAO;AAAA,EACR;AACD;","names":[]}

View File

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

View File

@@ -0,0 +1,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 e}from"@lexical/react/LexicalComposerContext";import{useLexicalNodeSelection as t}from"@lexical/react/useLexicalNodeSelection";import{addClassNamesToElement as r,mergeRegister as n,removeClassNamesFromElement as o}from"@lexical/utils";import{createCommand as c,DecoratorNode as i,$applyNodeReplacement as u,CLICK_COMMAND as l,COMMAND_PRIORITY_LOW as m}from"lexical";import{useEffect as a}from"react";import{jsx as s}from"react/jsx-runtime";const p=c("INSERT_HORIZONTAL_RULE_COMMAND");function d({nodeKey:c}){const[i]=e(),[u,s,p]=t(c);return a((()=>n(i.registerCommand(l,(e=>{const t=i.getElementByKey(c);return e.target===t&&(e.shiftKey||p(),s(!u),!0)}),m))),[p,i,u,c,s]),a((()=>{const e=i.getElementByKey(c),t=i._config.theme.hrSelected??"selected";null!==e&&(u?r(e,t):o(e,t))}),[i,u,c]),null}class f extends i{static getType(){return"horizontalrule"}static clone(e){return new f(e.__key)}static importJSON(e){return y().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:x,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){const t=document.createElement("hr");return r(t,e.theme.hr),t}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}decorate(){return s(d,{nodeKey:this.__key})}}function x(){return{node:y()}}function y(){return u(new f)}function h(e){return e instanceof f}export{y as $createHorizontalRuleNode,h as $isHorizontalRuleNode,f as HorizontalRuleNode,p as INSERT_HORIZONTAL_RULE_COMMAND};

View File

@@ -0,0 +1,90 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
Link: () => Link
});
module.exports = __toCommonJS(src_exports);
// src/link.tsx
var React = __toESM(require("react"));
var import_jsx_runtime = require("react/jsx-runtime");
var Link = React.forwardRef(
(_a, ref) => {
var _b = _a, { target = "_blank", style } = _b, props = __objRest(_b, ["target", "style"]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"a",
__spreadProps(__spreadValues({}, props), {
ref,
style: __spreadValues({
color: "#067df7",
textDecorationLine: "none"
}, style),
target,
children: props.children
})
);
}
);
Link.displayName = "Link";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Link
});

View File

@@ -0,0 +1,32 @@
import { entityKind } from "../../entity.js";
import { QueryPromise } from "../../query-promise.js";
class SQLiteRaw extends QueryPromise {
constructor(execute, getSQL, action, dialect, mapBatchResult) {
super();
this.execute = execute;
this.getSQL = getSQL;
this.dialect = dialect;
this.mapBatchResult = mapBatchResult;
this.config = { action };
}
static [entityKind] = "SQLiteRaw";
/** @internal */
config;
getQuery() {
return { ...this.dialect.sqlToQuery(this.getSQL()), method: this.config.action };
}
mapResult(result, isFromBatch) {
return isFromBatch ? this.mapBatchResult(result) : result;
}
_prepare() {
return this;
}
/** @internal */
isResponseInArrayMode() {
return false;
}
}
export {
SQLiteRaw
};
//# sourceMappingURL=raw.js.map

View File

@@ -0,0 +1 @@
export declare const yearsToMonths: import("./types.js").FPFn1<number, number>;

View File

@@ -0,0 +1,55 @@
{
"name": "ts-essentials",
"version": "10.0.3",
"description": "All essential TypeScript types in one place",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"repository": "git@github.com:ts-essentials/ts-essentials.git",
"homepage": "https://github.com/ts-essentials/ts-essentials#readme",
"author": "Krzysztof Kaczor <chris@kaczor.io>",
"license": "MIT",
"scripts": {
"build": "rimraf ./dist && tsc -p tsconfig.prod.json --outDir ./dist",
"formatDeclarations": "prettier --ignore-path *.js --write dist/*.d.ts",
"prepublishOnly": "yarn test && yarn build && yarn formatDeclarations",
"test": "node scripts/update-test-tsconfig.js && prettier -c {bench,lib,test}/**/*.ts && tsc --project tsconfig.test.json --outDir ./testDist && rimraf ./testDist",
"test:fix": "prettier --write {bench,lib,test}/**/*.ts && tsc --project tsconfig.test.json --outDir ./testDist && rimraf ./testDist",
"perf": "tsx ./bench/index.ts --benchErrorOnThresholdExceeded --benchPercentThreshold 1",
"prerelease": "yarn test",
"release": "yarn build && yarn formatDeclarations && yarn changeset publish",
"setTsVersion": "node scripts/sync-ts-version.js"
},
"files": [
"dist"
],
"peerDependencies": {
"typescript": ">=4.5.0"
},
"peerDependenciesMeta": {
"typescript": {
"optional": true
}
},
"devDependencies": {
"@arktype/attest": "^0.8.0",
"@changesets/cli": "^2.20.0",
"@codechecks/build-size-watcher": "^0.1.0",
"@codechecks/client": "^0.1.11",
"conditional-type-checks": "^1.0.4",
"prettier": "^2.0.0",
"rimraf": "^3.0.2",
"semver": "^7.6.3",
"tsx": "4.10.5",
"typescript": "^4.5.0"
},
"keywords": [
"typescript",
"types",
"essentials",
"utils",
"toolbox",
"toolbelt",
"lodash",
"underscore"
]
}

View File

@@ -0,0 +1,162 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["ق", "ب"],
abbreviated: ["ق.م.", "ب.م."],
wide: ["قبل الميلاد", "بعد الميلاد"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["ر1", "ر2", "ر3", "ر4"],
wide: ["الربع الأول", "الربع الثاني", "الربع الثالث", "الربع الرابع"],
};
const monthValues = {
narrow: ["ي", "ف", "م", "أ", "م", "ي", "ي", "أ", "س", "أ", "ن", "د"],
abbreviated: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
wide: [
"يناير",
"فبراير",
"مارس",
"أبريل",
"مايو",
"يونيو",
"يوليو",
"أغسطس",
"سبتمبر",
"أكتوبر",
"نوفمبر",
"ديسمبر",
],
};
const dayValues = {
narrow: ["ح", "ن", "ث", "ر", "خ", "ج", "س"],
short: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
abbreviated: ["أحد", "اثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"],
wide: [
"الأحد",
"الاثنين",
"الثلاثاء",
"الأربعاء",
"الخميس",
"الجمعة",
"السبت",
],
};
const dayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
abbreviated: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
wide: {
am: "ص",
pm: "م",
morning: "الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "المساء",
night: "الليل",
midnight: "منتصف الليل",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
abbreviated: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
wide: {
am: "ص",
pm: "م",
morning: "في الصباح",
noon: "الظهر",
afternoon: "بعد الظهر",
evening: "في المساء",
night: "في الليل",
midnight: "منتصف الليل",
},
};
const ordinalNumber = (num) => String(num);
export const localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,4 @@
import { generateSecret as generate } from '../runtime/generate.js';
export async function generateSecret(alg, options) {
return generate(alg, options);
}

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ResolveLocale = exports.LookupSupportedLocales = void 0;
exports.match = match;
var CanonicalizeLocaleList_1 = require("./abstract/CanonicalizeLocaleList");
var ResolveLocale_1 = require("./abstract/ResolveLocale");
function match(requestedLocales, availableLocales, defaultLocale, opts) {
return (0, ResolveLocale_1.ResolveLocale)(availableLocales, (0, CanonicalizeLocaleList_1.CanonicalizeLocaleList)(requestedLocales), {
localeMatcher: (opts === null || opts === void 0 ? void 0 : opts.algorithm) || 'best fit',
}, [], {}, function () { return defaultLocale; }).locale;
}
var LookupSupportedLocales_1 = require("./abstract/LookupSupportedLocales");
Object.defineProperty(exports, "LookupSupportedLocales", { enumerable: true, get: function () { return LookupSupportedLocales_1.LookupSupportedLocales; } });
var ResolveLocale_2 = require("./abstract/ResolveLocale");
Object.defineProperty(exports, "ResolveLocale", { enumerable: true, get: function () { return ResolveLocale_2.ResolveLocale; } });

View File

@@ -0,0 +1 @@
{"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../../src/instrument/handlers.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,KAAK,GACL,OAAO,GACP,qBAAqB,GACrB,SAAS,GACT,KAAK,GACL,OAAO,GACP,oBAAoB,CAAC;AAEzB,MAAM,MAAM,yBAAyB,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;AAM5D,8BAA8B;AAC9B,wBAAgB,UAAU,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,yBAAyB,GAAG,IAAI,CAGhG;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,IAAI,CAInD;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAAC,IAAI,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,IAAI,GAAG,IAAI,CAS3F;AAED,yDAAyD;AACzD,wBAAgB,eAAe,CAAC,IAAI,EAAE,qBAAqB,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAiBhF"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"baggage-impl.js","sourceRoot":"","sources":["../../../../src/baggage/internal/baggage-impl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIH;IAGE,qBAAY,OAAmC;QAC7C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,CAAC;IACzD,CAAC;IAED,8BAAQ,GAAR,UAAS,GAAW;QAClB,IAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,EAAE;YACV,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;IAClC,CAAC;IAED,mCAAa,GAAb;QACE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,UAAC,EAAM;gBAAN,KAAA,aAAM,EAAL,CAAC,QAAA,EAAE,CAAC,QAAA;YAAM,OAAA,CAAC,CAAC,EAAE,CAAC,CAAC;QAAN,CAAM,CAAC,CAAC;IACrE,CAAC;IAED,8BAAQ,GAAR,UAAS,GAAW,EAAE,KAAmB;QACvC,IAAM,UAAU,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClD,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACpC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,iCAAW,GAAX,UAAY,GAAW;QACrB,IAAM,UAAU,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAClD,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChC,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,mCAAa,GAAb;;QAAc,cAAiB;aAAjB,UAAiB,EAAjB,qBAAiB,EAAjB,IAAiB;YAAjB,yBAAiB;;QAC7B,IAAM,UAAU,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;;YAClD,KAAkB,IAAA,SAAA,SAAA,IAAI,CAAA,0BAAA,4CAAE;gBAAnB,IAAM,GAAG,iBAAA;gBACZ,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;aACjC;;;;;;;;;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,2BAAK,GAAL;QACE,OAAO,IAAI,WAAW,EAAE,CAAC;IAC3B,CAAC;IACH,kBAAC;AAAD,CAAC,AA3CD,IA2CC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type { Baggage, BaggageEntry } from '../types';\n\nexport class BaggageImpl implements Baggage {\n private _entries: Map<string, BaggageEntry>;\n\n constructor(entries?: Map<string, BaggageEntry>) {\n this._entries = entries ? new Map(entries) : new Map();\n }\n\n getEntry(key: string): BaggageEntry | undefined {\n const entry = this._entries.get(key);\n if (!entry) {\n return undefined;\n }\n\n return Object.assign({}, entry);\n }\n\n getAllEntries(): [string, BaggageEntry][] {\n return Array.from(this._entries.entries()).map(([k, v]) => [k, v]);\n }\n\n setEntry(key: string, entry: BaggageEntry): BaggageImpl {\n const newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.set(key, entry);\n return newBaggage;\n }\n\n removeEntry(key: string): BaggageImpl {\n const newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.delete(key);\n return newBaggage;\n }\n\n removeEntries(...keys: string[]): BaggageImpl {\n const newBaggage = new BaggageImpl(this._entries);\n for (const key of keys) {\n newBaggage._entries.delete(key);\n }\n return newBaggage;\n }\n\n clear(): BaggageImpl {\n return new BaggageImpl();\n }\n}\n"]}

View File

@@ -0,0 +1,28 @@
"use strict";
exports.getMinutes = getMinutes;
var _index = require("./toDate.js");
/**
* @name getMinutes
* @category Minute Helpers
* @summary Get the minutes of the given date.
*
* @description
* Get the minutes of the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
*
* @returns The minutes
*
* @example
* // Get the minutes of 29 February 2012 11:45:05:
* const result = getMinutes(new Date(2012, 1, 29, 11, 45, 5))
* //=> 45
*/
function getMinutes(date) {
const _date = (0, _index.toDate)(date);
const minutes = _date.getMinutes();
return minutes;
}

View File

@@ -0,0 +1,72 @@
/*
* 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.
*/
import { TraceFlags } from '@opentelemetry/api';
import { internal, ExportResultCode, globalErrorHandler, BindOnceFuture, } from '@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.
*/
export class SimpleSpanProcessor {
_exporter;
_shutdownOnce;
_pendingExports;
constructor(exporter) {
this._exporter = exporter;
this._shutdownOnce = new 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 & TraceFlags.SAMPLED) === 0) {
return;
}
const pendingExport = this._doExport(span).catch(err => 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 internal._export(this._exporter, [span]);
if (result.code !== ExportResultCode.SUCCESS) {
throw (result.error ??
new Error(`SimpleSpanProcessor: span export failed (status ${result})`));
}
}
shutdown() {
return this._shutdownOnce.call();
}
_shutdown() {
return this._exporter.shutdown();
}
}
//# sourceMappingURL=SimpleSpanProcessor.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["RenderCustomComponent","CustomComponent","Fallback","undefined"],"sources":["../../../src/elements/RenderCustomComponent/index.tsx"],"sourcesContent":["type Args = {\n CustomComponent?: React.ReactNode\n Fallback: React.ReactNode\n}\n\n/**\n * Renders a CustomComponent or a Fallback component.\n * Only fallback if the Custom Component is undefined.\n *\n * If the CustomComponent is null, render null.\n *\n * @param {Object} args - Arguments object.\n * @param {React.ReactNode} [args.CustomComponent] - Optional custom component to render.\n * @param {React.ReactNode} args.Fallback - Fallback component to render if CustomComponent is undefined.\n * @returns {React.ReactNode} Rendered component.\n */\nexport function RenderCustomComponent({ CustomComponent, Fallback }: Args): React.ReactNode {\n return CustomComponent !== undefined ? CustomComponent : Fallback\n}\n"],"mappings":"AAKA;;;;;;;;;;GAWA,OAAO,SAASA,sBAAsB;EAAEC,eAAe;EAAEC;AAAQ,CAAQ;EACvE,OAAOD,eAAA,KAAoBE,SAAA,GAAYF,eAAA,GAAkBC,QAAA;AAC3D","ignoreList":[]}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../../src/collections/operations/local/restoreVersion.ts"],"sourcesContent":["import type {\n CollectionSlug,\n FindOptions,\n Payload,\n RequestContext,\n TypedLocale,\n} from '../../../index.js'\nimport type { Document, PayloadRequest, PopulateType, SelectType } from '../../../types/index.js'\nimport type { CreateLocalReqOptions } from '../../../utilities/createLocalReq.js'\nimport type {\n DataFromCollectionSlug,\n DraftFlagFromCollectionSlug,\n} from '../../config/types.js'\n\nimport { APIError } from '../../../errors/index.js'\nimport { createLocalReq } from '../../../utilities/createLocalReq.js'\nimport { restoreVersionOperation } from '../restoreVersion.js'\n\ntype BaseOptions<TSlug extends CollectionSlug> = {\n /**\n * the Collection slug to operate against.\n */\n collection: TSlug\n /**\n * [Context](https://payloadcms.com/docs/hooks/context), which will then be passed to `context` and `req.context`,\n * which can be read by hooks. Useful if you want to pass additional information to the hooks which\n * shouldn't be necessarily part of the document, for example a `triggerBeforeChange` option which can be read by the BeforeChange hook\n * to determine if it should run or not.\n */\n context?: RequestContext\n /**\n * [Control auto-population](https://payloadcms.com/docs/queries/depth) of nested relationship and upload fields.\n */\n depth?: number\n /**\n * Specify a [fallback locale](https://payloadcms.com/docs/configuration/localization) to use for any returned documents.\n */\n fallbackLocale?: false | TypedLocale\n /**\n * The ID of the version to restore.\n */\n id: string\n /**\n * Specify [locale](https://payloadcms.com/docs/configuration/localization) for any returned documents.\n */\n locale?: TypedLocale\n /**\n * Skip access control.\n * Set to `false` if you want to respect Access Control for the operation, for example when fetching data for the front-end.\n * @default true\n */\n overrideAccess?: boolean\n /**\n * Specify [populate](https://payloadcms.com/docs/queries/select#populate) to control which fields to include to the result from populated documents.\n */\n populate?: PopulateType\n /**\n * The `PayloadRequest` object. You can pass it to thread the current [transaction](https://payloadcms.com/docs/database/transactions), user and locale to the operation.\n * Recommended to pass when using the Local API from hooks, as usually you want to execute the operation within the current transaction.\n */\n req?: Partial<PayloadRequest>\n /**\n * Opt-in to receiving hidden fields. By default, they are hidden from returned documents in accordance to your config.\n * @default false\n */\n showHiddenFields?: boolean\n // TODO: Strongly type User as TypedUser (= User in v4.0)\n /**\n * If you set `overrideAccess` to `false`, you can pass a user to use against the access control checks.\n */\n user?: Document\n} & Pick<FindOptions<TSlug, SelectType>, 'select'>\n\nexport type Options<TSlug extends CollectionSlug> =\n BaseOptions<TSlug> & DraftFlagFromCollectionSlug<TSlug>\n\nexport async function restoreVersionLocal<TSlug extends CollectionSlug>(\n payload: Payload,\n options: Options<TSlug>,\n): Promise<DataFromCollectionSlug<TSlug>> {\n const {\n id,\n collection: collectionSlug,\n depth,\n overrideAccess = true,\n populate,\n select,\n showHiddenFields,\n } = options\n\n const collection = payload.collections[collectionSlug]\n\n if (!collection) {\n throw new APIError(\n `The collection with slug ${String(\n collectionSlug,\n )} can't be found. Restore Version Operation.`,\n )\n }\n\n const args = {\n id,\n collection,\n depth,\n overrideAccess,\n payload,\n populate,\n req: await createLocalReq(options as CreateLocalReqOptions, payload),\n select,\n showHiddenFields,\n }\n\n return restoreVersionOperation(args)\n}\n"],"names":["APIError","createLocalReq","restoreVersionOperation","restoreVersionLocal","payload","options","id","collection","collectionSlug","depth","overrideAccess","populate","select","showHiddenFields","collections","String","args","req"],"mappings":"AAcA,SAASA,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,cAAc,QAAQ,uCAAsC;AACrE,SAASC,uBAAuB,QAAQ,uBAAsB;AA4D9D,OAAO,eAAeC,oBACpBC,OAAgB,EAChBC,OAAuB;IAEvB,MAAM,EACJC,EAAE,EACFC,YAAYC,cAAc,EAC1BC,KAAK,EACLC,iBAAiB,IAAI,EACrBC,QAAQ,EACRC,MAAM,EACNC,gBAAgB,EACjB,GAAGR;IAEJ,MAAME,aAAaH,QAAQU,WAAW,CAACN,eAAe;IAEtD,IAAI,CAACD,YAAY;QACf,MAAM,IAAIP,SACR,CAAC,yBAAyB,EAAEe,OAC1BP,gBACA,2CAA2C,CAAC;IAElD;IAEA,MAAMQ,OAAO;QACXV;QACAC;QACAE;QACAC;QACAN;QACAO;QACAM,KAAK,MAAMhB,eAAeI,SAAkCD;QAC5DQ;QACAC;IACF;IAEA,OAAOX,wBAAwBc;AACjC"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"NotFound.d.ts","sourceRoot":"","sources":["../../src/errors/NotFound.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAKzD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,qBAAa,QAAS,SAAQ,QAAQ;gBACxB,CAAC,CAAC,EAAE,SAAS;CAG1B"}

View File

@@ -0,0 +1,8 @@
/**
* Returns a memoized function that will only call the passed function when it hasn't been called for the wait period
* @param func The function to be called
* @param wait Wait period after function hasn't been called for
* @returns A memoized function that is debounced
*/
export declare const useDebouncedCallback: <TFunctionArgs = any>(func: any, wait: any) => (...args: TFunctionArgs[]) => void;
//# sourceMappingURL=useDebouncedCallback.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"clover.js","sources":["../../../src/icons/clover.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Clover\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYuMTcgNy44MyAyIDIyIiAvPgogIDxwYXRoIGQ9Ik00LjAyIDEyYTIuODI3IDIuODI3IDAgMSAxIDMuODEtNC4xN0EyLjgyNyAyLjgyNyAwIDEgMSAxMiA0LjAyYTIuODI3IDIuODI3IDAgMSAxIDQuMTcgMy44MUEyLjgyNyAyLjgyNyAwIDEgMSAxOS45OCAxMmEyLjgyNyAyLjgyNyAwIDEgMS0zLjgxIDQuMTdBMi44MjcgMi44MjcgMCAxIDEgMTIgMTkuOThhMi44MjcgMi44MjcgMCAxIDEtNC4xNy0zLjgxQTEgMSAwIDEgMSA0IDEyIiAvPgogIDxwYXRoIGQ9Im03LjgzIDcuODMgOC4zNCA4LjM0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/clover\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 Clover = createLucideIcon('Clover', [\n ['path', { d: 'M16.17 7.83 2 22', key: 't58vo8' }],\n [\n 'path',\n {\n d: 'M4.02 12a2.827 2.827 0 1 1 3.81-4.17A2.827 2.827 0 1 1 12 4.02a2.827 2.827 0 1 1 4.17 3.81A2.827 2.827 0 1 1 19.98 12a2.827 2.827 0 1 1-3.81 4.17A2.827 2.827 0 1 1 12 19.98a2.827 2.827 0 1 1-4.17-3.81A1 1 0 1 1 4 12',\n key: '17k36q',\n },\n ],\n ['path', { d: 'm7.83 7.83 8.34 8.34', key: '1d7sxk' }],\n]);\n\nexport default Clover;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,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,CACjD,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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAwB,CAAA,CAAA,CAAA,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;AACvD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"door-open.js","sources":["../../../src/icons/door-open.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name DoorOpen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgNGgzYTIgMiAwIDAgMSAyIDJ2MTQiIC8+CiAgPHBhdGggZD0iTTIgMjBoMyIgLz4KICA8cGF0aCBkPSJNMTMgMjBoOSIgLz4KICA8cGF0aCBkPSJNMTAgMTJ2LjAxIiAvPgogIDxwYXRoIGQ9Ik0xMyA0LjU2MnYxNi4xNTdhMSAxIDAgMCAxLTEuMjQyLjk3TDUgMjBWNS41NjJhMiAyIDAgMCAxIDEuNTE1LTEuOTRsNC0xQTIgMiAwIDAgMSAxMyA0LjU2MVoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/door-open\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 DoorOpen = createLucideIcon('DoorOpen', [\n ['path', { d: 'M13 4h3a2 2 0 0 1 2 2v14', key: 'hrm0s9' }],\n ['path', { d: 'M2 20h3', key: '1gaodv' }],\n ['path', { d: 'M13 20h9', key: 's90cdi' }],\n ['path', { d: 'M10 12v.01', key: 'vx6srw' }],\n [\n 'path',\n {\n d: 'M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z',\n key: '199qr4',\n },\n ],\n]);\n\nexport default DoorOpen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC3C,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;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;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"export.cjs","names":[],"sources":["../../../../src/rest/commands/utils/export.ts"],"sourcesContent":["import type { Query } from '../../../index.js';\nimport type { DirectusFile } from '../../../schema/file.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type FileFormat = 'csv' | 'csv_utf8' | 'json' | 'xml' | 'yaml';\n\n/**\n * Export a larger data set to a file in the File Library\n * @returns Nothing\n */\nexport const utilsExport =\n\t<Schema, TQuery extends Query<Schema, Schema[Collection]>, Collection extends keyof Schema>(\n\t\tcollection: Collection,\n\t\tformat: FileFormat,\n\t\tquery: TQuery,\n\t\tfile: Partial<DirectusFile<Schema>>,\n\t): RestCommand<void, Schema> =>\n\t() => ({\n\t\tmethod: 'POST',\n\t\tpath: `/utils/export/${collection as string}`,\n\t\tbody: JSON.stringify({ format, query, file }),\n\t});\n"],"mappings":"AAUA,MAAa,GAEX,EACA,EACA,EACA,SAEM,CACN,OAAQ,OACR,KAAM,iBAAiB,IACvB,KAAM,KAAK,UAAU,CAAE,SAAQ,QAAO,OAAM,CAAC,CAC7C"}

View File

@@ -0,0 +1,137 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
// Vendored / modified from @sergiodxa/remix-utils
// https://github.com/sergiodxa/remix-utils/blob/02af80e12829a53696bfa8f3c2363975cf59f55e/src/server/get-client-ip-address.ts
// MIT License
// Copyright (c) 2021 Sergio Xalambrí
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// The headers to check, in priority order
const ipHeaderNames = [
'X-Client-IP',
'X-Forwarded-For',
'Fly-Client-IP',
'CF-Connecting-IP',
'Fastly-Client-Ip',
'True-Client-Ip',
'X-Real-IP',
'X-Cluster-Client-IP',
'X-Forwarded',
'Forwarded-For',
'Forwarded',
'X-Vercel-Forwarded-For',
];
/**
* Get the IP address of the client sending a request.
*
* It receives a Request headers object and use it to get the
* IP address from one of the following headers in order.
*
* If the IP address is valid, it will be returned. Otherwise, null will be
* returned.
*
* If the header values contains more than one IP address, the first valid one
* will be returned.
*/
function getClientIPAddress(headers) {
// Build a map of lowercase header names to their values for case-insensitive lookup
// This is needed because headers from different sources may have different casings
const lowerCaseHeaders = {};
for (const key of Object.keys(headers)) {
lowerCaseHeaders[key.toLowerCase()] = headers[key];
}
// This will end up being Array<string | string[] | undefined | null> because of the various possible values a header
// can take
const headerValues = ipHeaderNames.map((headerName) => {
const rawValue = lowerCaseHeaders[headerName.toLowerCase()];
const value = Array.isArray(rawValue) ? rawValue.join(';') : rawValue;
if (headerName === 'Forwarded') {
return parseForwardedHeader(value);
}
return value?.split(',').map((v) => v.trim());
});
// Flatten the array and filter out any falsy entries
const flattenedHeaderValues = headerValues.reduce((acc, val) => {
if (!val) {
return acc;
}
return acc.concat(val);
}, []);
// Find the first value which is a valid IP address, if any
const ipAddress = flattenedHeaderValues.find(ip => ip !== null && isIP(ip));
return ipAddress || null;
}
function parseForwardedHeader(value) {
if (!value) {
return null;
}
for (const part of value.split(';')) {
if (part.startsWith('for=')) {
return part.slice(4);
}
}
return null;
}
//
/**
* Custom method instead of importing this from `net` package, as this only exists in node
* Accepts:
* 127.0.0.1
* 192.168.1.1
* 192.168.1.255
* 255.255.255.255
* 10.1.1.1
* 0.0.0.0
* 2b01:cb19:8350:ed00:d0dd:fa5b:de31:8be5
*
* Rejects:
* 1.1.1.01
* 30.168.1.255.1
* 127.1
* 192.168.1.256
* -1.2.3.4
* 1.1.1.1.
* 3...3
* 192.168.1.099
*/
function isIP(str) {
const regex =
/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/;
return regex.test(str);
}
exports.getClientIPAddress = getClientIPAddress;
exports.ipHeaderNames = ipHeaderNames;
//# sourceMappingURL=getIpAddress.js.map

View File

@@ -0,0 +1,17 @@
module.exports = {
'add': require('./add'),
'ceil': require('./ceil'),
'divide': require('./divide'),
'floor': require('./floor'),
'max': require('./max'),
'maxBy': require('./maxBy'),
'mean': require('./mean'),
'meanBy': require('./meanBy'),
'min': require('./min'),
'minBy': require('./minBy'),
'multiply': require('./multiply'),
'round': require('./round'),
'subtract': require('./subtract'),
'sum': require('./sum'),
'sumBy': require('./sumBy')
};

View File

@@ -0,0 +1,29 @@
@layer payload-default {
.drawer-close-button {
--size: calc(var(--base) * 1.2);
border: 0;
background-color: transparent;
padding: 0;
cursor: pointer;
overflow: hidden;
direction: ltr;
display: flex;
align-items: center;
justify-content: center;
width: var(--size);
height: var(--size);
svg {
margin: calc(-1 * var(--size));
width: calc(var(--size) * 2);
height: calc(var(--size) * 2);
position: relative;
.stroke {
stroke-width: 1px;
vector-effect: non-scaling-stroke;
}
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"isPathMatchingRoute.d.ts","sourceRoot":"","sources":["../../../src/views/Root/isPathMatchingRoute.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,gEAM7B;IACD,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,YAyBA,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"shares.cjs","names":[],"sources":["../../../../src/rest/commands/create/shares.ts"],"sourcesContent":["import type { DirectusShare } from '../../../schema/share.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateShareOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusShare<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Create multiple new shares.\n *\n * @param items The shares to create\n * @param query Optional return data query\n *\n * @returns Returns the share objects for the created shares.\n */\nexport const createShares =\n\t<Schema, const TQuery extends Query<Schema, DirectusShare<Schema>>>(\n\t\titems: NestedPartial<DirectusShare<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<CreateShareOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/shares`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'POST',\n\t});\n\n/**\n * Create a new share.\n *\n * @param item The share to create\n * @param query Optional return data query\n *\n * @returns Returns the share object for the created share.\n */\nexport const createShare =\n\t<Schema, const TQuery extends Query<Schema, DirectusShare<Schema>>>(\n\t\titem: NestedPartial<DirectusShare<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateShareOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/shares`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAkBA,MAAa,GAEX,EACA,SAEM,CACN,KAAM,UACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,OACR,EAUW,GAEX,EACA,SAEM,CACN,KAAM,UACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}

View File

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

View File

@@ -0,0 +1,135 @@
"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.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS = exports.METRIC_DB_CLIENT_CONNECTION_COUNT = exports.DB_SYSTEM_VALUE_POSTGRESQL = exports.DB_CLIENT_CONNECTION_STATE_VALUE_USED = exports.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE = exports.ATTR_NET_PEER_PORT = exports.ATTR_NET_PEER_NAME = exports.ATTR_DB_USER = exports.ATTR_DB_SYSTEM = exports.ATTR_DB_STATEMENT = exports.ATTR_DB_NAME = exports.ATTR_DB_CONNECTION_STRING = exports.ATTR_DB_CLIENT_CONNECTION_STATE = exports.ATTR_DB_CLIENT_CONNECTION_POOL_NAME = void 0;
/*
* This file contains a copy of unstable semantic convention definitions
* used by this package.
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
*/
/**
* The name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation **SHOULD** use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns **SHOULD** document it.
*
* @example myDataSource
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_DB_CLIENT_CONNECTION_POOL_NAME = 'db.client.connection.pool.name';
/**
* The state of a connection in the pool
*
* @example idle
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.ATTR_DB_CLIENT_CONNECTION_STATE = 'db.client.connection.state';
/**
* Deprecated, use `server.address`, `server.port` attributes instead.
*
* @example "Server=(localdb)\\v11.0;Integrated Security=true;"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` and `server.port`.
*/
exports.ATTR_DB_CONNECTION_STRING = 'db.connection_string';
/**
* Deprecated, use `db.namespace` instead.
*
* @example customers
* @example main
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.namespace`.
*/
exports.ATTR_DB_NAME = 'db.name';
/**
* The database statement being executed.
*
* @example SELECT * FROM wuser_table
* @example SET mykey "WuValue"
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.query.text`.
*/
exports.ATTR_DB_STATEMENT = 'db.statement';
/**
* Deprecated, use `db.system.name` instead.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `db.system.name`.
*/
exports.ATTR_DB_SYSTEM = 'db.system';
/**
* Deprecated, no replacement at this time.
*
* @example readonly_user
* @example reporting_user
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Removed, no replacement at this time.
*/
exports.ATTR_DB_USER = 'db.user';
/**
* Deprecated, use `server.address` on client spans and `client.address` on server spans.
*
* @example example.com
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.
*/
exports.ATTR_NET_PEER_NAME = 'net.peer.name';
/**
* Deprecated, use `server.port` on client spans and `client.port` on server spans.
*
* @example 8080
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*
* @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.
*/
exports.ATTR_NET_PEER_PORT = 'net.peer.port';
/**
* Enum value "idle" for attribute {@link ATTR_DB_CLIENT_CONNECTION_STATE}.
*/
exports.DB_CLIENT_CONNECTION_STATE_VALUE_IDLE = 'idle';
/**
* Enum value "used" for attribute {@link ATTR_DB_CLIENT_CONNECTION_STATE}.
*/
exports.DB_CLIENT_CONNECTION_STATE_VALUE_USED = 'used';
/**
* Enum value "postgresql" for attribute {@link ATTR_DB_SYSTEM}.
*/
exports.DB_SYSTEM_VALUE_POSTGRESQL = 'postgresql';
/**
* The number of connections that are currently in state described by the `state` attribute
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.METRIC_DB_CLIENT_CONNECTION_COUNT = 'db.client.connection.count';
/**
* The number of current pending requests for an open connection
*
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
exports.METRIC_DB_CLIENT_CONNECTION_PENDING_REQUESTS = 'db.client.connection.pending_requests';
//# sourceMappingURL=semconv.js.map

View File

@@ -0,0 +1,8 @@
export declare function throwError(message: string): never;
export declare function warn(message: string): void;
/**
* Returns a function that runs the provided callback only once per process.
* Next.js can call the config multiple times - this ensures we only run once.
* Uses an environment variable to track execution across config loads.
*/
export declare function once(namespace: string): (fn: () => void) => void;

View File

@@ -0,0 +1,5 @@
export declare const getMinutesWithOptions: import("./types.js").FPFn2<
number,
import("../getMinutes.js").GetMinutesOptions | undefined,
string | number | Date
>;

View File

@@ -0,0 +1,48 @@
import type { Database } from 'sql.js';
import { entityKind } from "../entity.js";
import type { Logger } from "../logger.js";
import type { RelationalSchemaConfig, TablesRelationalConfig } from "../relations.js";
import { type Query } from "../sql/sql.js";
import type { SQLiteSyncDialect } from "../sqlite-core/dialect.js";
import { SQLiteTransaction } from "../sqlite-core/index.js";
import type { SelectedFieldsOrdered } from "../sqlite-core/query-builders/select.types.js";
import type { PreparedQueryConfig as PreparedQueryConfigBase, SQLiteExecuteMethod, SQLiteTransactionConfig } from "../sqlite-core/session.js";
import { SQLitePreparedQuery as PreparedQueryBase, SQLiteSession } from "../sqlite-core/session.js";
export interface SQLJsSessionOptions {
logger?: Logger;
}
type PreparedQueryConfig = Omit<PreparedQueryConfigBase, 'statement' | 'run'>;
export declare class SQLJsSession<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteSession<'sync', void, TFullSchema, TSchema> {
private client;
private schema;
static readonly [entityKind]: string;
private logger;
constructor(client: Database, dialect: SQLiteSyncDialect, schema: RelationalSchemaConfig<TSchema> | undefined, options?: SQLJsSessionOptions);
prepareQuery<T extends Omit<PreparedQueryConfig, 'run'>>(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, isResponseInArrayMode: boolean): PreparedQuery<T>;
transaction<T>(transaction: (tx: SQLJsTransaction<TFullSchema, TSchema>) => T, config?: SQLiteTransactionConfig): T;
}
export declare class SQLJsTransaction<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteTransaction<'sync', void, TFullSchema, TSchema> {
static readonly [entityKind]: string;
transaction<T>(transaction: (tx: SQLJsTransaction<TFullSchema, TSchema>) => T): T;
}
export declare class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends PreparedQueryBase<{
type: 'sync';
run: void;
all: T['all'];
get: T['get'];
values: T['values'];
execute: T['execute'];
}> {
private client;
private logger;
private fields;
private _isResponseInArrayMode;
private customResultMapper?;
static readonly [entityKind]: string;
constructor(client: Database, query: Query, logger: Logger, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][], mapColumnValue?: (value: unknown) => unknown) => unknown) | undefined);
run(placeholderValues?: Record<string, unknown>): void;
all(placeholderValues?: Record<string, unknown>): T['all'];
get(placeholderValues?: Record<string, unknown>): T['get'];
values(placeholderValues?: Record<string, unknown>): T['values'];
}
export {};

View File

@@ -0,0 +1,33 @@
"use strict";
exports.subBusinessDays = subBusinessDays;
var _index = require("./addBusinessDays.cjs");
/**
* The {@link subBusinessDays} function options.
*/
/**
* @name subBusinessDays
* @category Day Helpers
* @summary Subtract the specified number of business days (mon - fri) from the given date.
*
* @description
* Subtract the specified number of business days (mon - fri) from the given date, ignoring weekends.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of business days to be subtracted.
* @param options - An object with options
*
* @returns The new date with the business days subtracted
*
* @example
* // Subtract 10 business days from 1 September 2014:
* const result = subBusinessDays(new Date(2014, 8, 1), 10)
* //=> Mon Aug 18 2014 00:00:00 (skipped weekend days)
*/
function subBusinessDays(date, amount, options) {
return (0, _index.addBusinessDays)(date, -amount, options);
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,124 @@
import _typeof from "./typeof.js";
import checkInRHS from "./checkInRHS.js";
import setFunctionName from "./setFunctionName.js";
import toPropertyKey from "./toPropertyKey.js";
function applyDecs2311(e, t, n, r, o, i) {
var a,
c,
u,
s,
f,
l,
p,
d = Symbol.metadata || Symbol["for"]("Symbol.metadata"),
m = Object.defineProperty,
h = Object.create,
y = [h(null), h(null)],
v = t.length;
function g(t, n, r) {
return function (o, i) {
n && (i = o, o = e);
for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []);
return r ? i : o;
};
}
function b(e, t, n, r) {
if ("function" != typeof e && (r || void 0 !== e)) throw new TypeError(t + " must " + (n || "be") + " a function" + (r ? "" : " or undefined"));
return e;
}
function applyDec(e, t, n, r, o, i, u, s, f, l, p) {
function d(e) {
if (!p(e)) throw new TypeError("Attempted to access private element on non-instance");
}
var h = [].concat(t[0]),
v = t[3],
w = !u,
D = 1 === o,
S = 3 === o,
j = 4 === o,
E = 2 === o;
function I(t, n, r) {
return function (o, i) {
return n && (i = o, o = e), r && r(o), P[t].call(o, i);
};
}
if (!w) {
var P = {},
k = [],
F = S ? "get" : j || D ? "set" : "value";
if (f ? (l || D ? P = {
get: setFunctionName(function () {
return v(this);
}, r, "get"),
set: function set(e) {
t[4](this, e);
}
} : P[F] = v, l || setFunctionName(P[F], r, E ? "" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) {
if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error("Decorating two elements with the same name (" + P[F].name + ") is not supported yet");
y[+s][r] = o < 3 ? 1 : o;
}
}
for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) {
var T = b(h[O], "A decorator", "be", !0),
z = n ? h[O - 1] : void 0,
A = {},
H = {
kind: ["field", "accessor", "method", "getter", "setter", "class"][o],
name: r,
metadata: a,
addInitializer: function (e, t) {
if (e.v) throw new TypeError("attempted to call addInitializer after decoration was finished");
b(t, "An initializer", "be", !0), i.push(t);
}.bind(null, A)
};
if (w) c = T.call(z, N, H), A.v = 1, b(c, "class decorators", "return") && (N = c);else if (H["static"] = s, H["private"] = f, c = H.access = {
has: f ? p.bind() : function (e) {
return r in e;
}
}, j || (c.get = f ? E ? function (e) {
return d(e), P.value;
} : I("get", 0, d) : function (e) {
return e[r];
}), E || S || (c.set = f ? I("set", 0, d) : function (e, t) {
e[r] = t;
}), N = T.call(z, D ? {
get: P.get,
set: P.set
} : P[F], H), A.v = 1, D) {
if ("object" == _typeof(N) && N) (c = b(N.get, "accessor.get")) && (P.get = c), (c = b(N.set, "accessor.set")) && (P.set = c), (c = b(N.init, "accessor.init")) && k.unshift(c);else if (void 0 !== N) throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined");
} else b(N, (l ? "field" : "method") + " decorators", "return") && (l ? k.unshift(N) : P[F] = N);
}
return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I("get", s), I("set", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N;
}
function w(e) {
return m(e, d, {
configurable: !0,
enumerable: !0,
value: a
});
}
return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function l(e) {
e && f.push(g(e));
}, p = function p(t, r) {
for (var i = 0; i < n.length; i++) {
var a = n[i],
c = a[1],
l = 7 & c;
if ((8 & c) == t && !l == r) {
var p = a[2],
d = !!a[3],
m = 16 & c;
applyDec(t ? e : e.prototype, a, m, d ? "#" + p : toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) {
return checkInRHS(t) === e;
} : o);
}
}
}, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), {
e: c,
get c() {
var n = [];
return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)];
}
};
}
export { applyDecs2311 as default };

View File

@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const TreePine = createLucideIcon("TreePine", [
[
"path",
{
d: "m17 14 3 3.3a1 1 0 0 1-.7 1.7H4.7a1 1 0 0 1-.7-1.7L7 14h-.3a1 1 0 0 1-.7-1.7L9 9h-.2A1 1 0 0 1 8 7.3L12 3l4 4.3a1 1 0 0 1-.8 1.7H15l3 3.3a1 1 0 0 1-.7 1.7H17Z",
key: "cpyugq"
}
],
["path", { d: "M12 22v-3", key: "kmzjlo" }]
]);
export { TreePine as default };
//# sourceMappingURL=tree-pine.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"ListCreateNewDocButton.d.ts","sourceRoot":"","sources":["../../../../src/elements/ListHeader/TitleActions/ListCreateNewDocButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAGrD,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,wBAAgB,mBAAmB,CAAC,EAClC,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,GACf,EAAE;IACD,gBAAgB,EAAE,sBAAsB,CAAA;IACxC,mBAAmB,EAAE,OAAO,CAAA;IAC5B,cAAc,EAAE,MAAM,CAAA;CACvB,qBAsBA"}

View File

@@ -0,0 +1,8 @@
function _taggedTemplateLiteral(e, t) {
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, {
raw: {
value: Object.freeze(t)
}
}));
}
module.exports = _taggedTemplateLiteral, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,121 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { rtlLanguages } from '@payloadcms/translations';
import React, { useCallback, useMemo } from 'react';
import { RenderCustomComponent } from '../../elements/RenderCustomComponent/index.js';
import { FieldDescription } from '../../fields/FieldDescription/index.js';
import { FieldError } from '../../fields/FieldError/index.js';
import { useForm } from '../../forms/Form/context.js';
import { useField } from '../../forms/useField/index.js';
import { withCondition } from '../../forms/withCondition/index.js';
import { useEditDepth } from '../../providers/EditDepth/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { generateFieldID } from '../../utilities/generateFieldID.js';
import { mergeFieldStyles } from '../mergeFieldStyles.js';
import { fieldBaseClass } from '../shared/index.js';
import { CheckboxInput } from './Input.js';
import './index.scss';
const baseClass = 'checkbox';
export { CheckboxInput };
const CheckboxFieldComponent = props => {
const {
id,
checked: checkedFromProps,
disableFormData,
field,
field: {
admin: {
className,
description
} = {},
label,
required
} = {},
onChange: onChangeFromProps,
partialChecked,
path: pathFromProps,
readOnly,
validate
} = props;
const {
uuid
} = useForm();
const editDepth = useEditDepth();
const {
i18n: {
language
}
} = useTranslation();
const isRTL = rtlLanguages.includes(language);
const memoizedValidate = useCallback((value, options) => {
if (typeof validate === 'function') {
return validate(value, {
...options,
required
});
}
}, [validate, required]);
const {
customComponents: {
AfterInput,
BeforeInput,
Description,
Error,
Label
} = {},
disabled,
path,
setValue,
showError,
value: value_0
} = useField({
disableFormData,
potentiallyStalePath: pathFromProps,
validate: memoizedValidate
});
const onToggle = useCallback(() => {
if (!readOnly) {
setValue(!value_0);
if (typeof onChangeFromProps === 'function') {
onChangeFromProps(!value_0);
}
}
}, [onChangeFromProps, readOnly, setValue, value_0]);
const checked = checkedFromProps || Boolean(value_0);
const fieldID = id || generateFieldID(path, editDepth, uuid);
const styles = useMemo(() => mergeFieldStyles(field), [field]);
return /*#__PURE__*/_jsxs("div", {
className: [fieldBaseClass, baseClass, showError && 'error', className, value_0 && `${baseClass}--checked`, (readOnly || disabled) && `${baseClass}--read-only`].filter(Boolean).join(' '),
style: styles,
children: [/*#__PURE__*/_jsx(RenderCustomComponent, {
CustomComponent: Error,
Fallback: /*#__PURE__*/_jsx(FieldError, {
alignCaret: isRTL ? 'right' : 'left',
path: path,
showError: showError
})
}), /*#__PURE__*/_jsx(CheckboxInput, {
AfterInput: AfterInput,
BeforeInput: BeforeInput,
checked: checked,
id: fieldID,
inputRef: null,
Label: Label,
label: label,
name: path,
onToggle: onToggle,
partialChecked: partialChecked,
readOnly: readOnly || disabled,
required: required
}), /*#__PURE__*/_jsx(RenderCustomComponent, {
CustomComponent: Description,
Fallback: /*#__PURE__*/_jsx(FieldDescription, {
description: description,
path: path
})
})]
});
};
export const CheckboxField = withCondition(CheckboxFieldComponent);
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,58 @@
import { normalizeDates } from "./_lib/normalizeDates.js";
import { compareAsc } from "./compareAsc.js";
import { differenceInCalendarISOWeekYears } from "./differenceInCalendarISOWeekYears.js";
import { subISOWeekYears } from "./subISOWeekYears.js";
/**
* The {@link differenceInISOWeekYears} function options.
*/
/**
* @name differenceInISOWeekYears
* @category ISO Week-Numbering Year Helpers
* @summary Get the number of full ISO week-numbering years between the given dates.
*
* @description
* Get the number of full ISO week-numbering years between the given dates.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - The options
*
* @returns The number of full ISO week-numbering years
*
* @example
* // How many full ISO week-numbering years are between 1 January 2010 and 1 January 2012?
* const result = differenceInISOWeekYears(
* new Date(2012, 0, 1),
* new Date(2010, 0, 1)
* )
* // => 1
*/
export function differenceInISOWeekYears(laterDate, earlierDate, options) {
const [laterDate_, earlierDate_] = normalizeDates(
options?.in,
laterDate,
earlierDate,
);
const sign = compareAsc(laterDate_, earlierDate_);
const diff = Math.abs(
differenceInCalendarISOWeekYears(laterDate_, earlierDate_, options),
);
const adjustedDate = subISOWeekYears(laterDate_, sign * diff, options);
const isLastISOWeekYearNotFull = Number(
compareAsc(adjustedDate, earlierDate_) === -sign,
);
const result = sign * (diff - isLastISOWeekYearNotFull);
// Prevent negative zero
return result === 0 ? 0 : result;
}
// Fallback for modularized imports:
export default differenceInISOWeekYears;

View File

@@ -0,0 +1 @@
{"version":3,"file":"addFolderCollection.d.ts","sourceRoot":"","sources":["../../src/folders/addFolderCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAKnD,wBAAsB,mBAAmB,CAAC,EACxC,kBAAkB,EAClB,MAAM,EACN,wBAAwB,EACxB,4BAAiC,EACjC,kBAAuB,GACxB,EAAE;IACD,kBAAkB,EAAE,OAAO,CAAA;IAC3B,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC3B,wBAAwB,EAAE,gBAAgB,EAAE,CAAA;IAC5C,4BAA4B,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAA;IAChF,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B,GAAG,OAAO,CAAC,IAAI,CAAC,CAgChB"}

View File

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

View File

@@ -0,0 +1,136 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchFn.cjs");
var _index2 = require("../../_lib/buildMatchPatternFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)(ième|ère|ème|er|e)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
wide: /^(avant Jésus-Christ|après Jésus-Christ)/i,
};
const parseEraPatterns = {
any: [/^av/i, /^ap/i],
};
const matchQuarterPatterns = {
narrow: /^T?[1234]/i,
abbreviated: /^[1234](er|ème|e)? trim\.?/i,
wide: /^[1234](er|ème|e)? trimestre/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated:
/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^av/i,
/^ma/i,
/^juin/i,
/^juil/i,
/^ao/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[lmjvsd]/i,
short: /^(di|lu|ma|me|je|ve|sa)/i,
abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^min/i,
noon: /^mid/i,
morning: /mat/i,
afternoon: /ap/i,
evening: /soir/i,
night: /nuit/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index2.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value),
}),
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",
}),
});

View File

@@ -0,0 +1,13 @@
import type { SanitizedCollectionConfig } from '../../../collections/config/types.js';
import type { JsonObject, Payload } from '../../../index.js';
import type { PayloadRequest } from '../../../types/index.js';
type Args = {
collection: SanitizedCollectionConfig;
doc: JsonObject;
password: string;
payload: Payload;
req: PayloadRequest;
};
export declare const registerLocalStrategy: ({ collection, doc, password, payload, req, }: Args) => Promise<Record<string, unknown>>;
export {};
//# sourceMappingURL=register.d.ts.map

View File

@@ -0,0 +1,34 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link nextWednesday} function options.
*/
export interface NextWednesdayOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name nextWednesday
* @category Weekday Helpers
* @summary When is the next Wednesday?
*
* @description
* When is the next Wednesday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to start counting from
* @param options - An object with options
*
* @returns The next Wednesday
*
* @example
* // When is the next Wednesday after Mar, 22, 2020?
* const result = nextWednesday(new Date(2020, 2, 22))
* //=> Wed Mar 25 2020 00:00:00
*/
export declare function nextWednesday<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
options?: NextWednesdayOptions<ResultDate> | undefined,
): ResultDate;

View File

@@ -0,0 +1,119 @@
import { mixNumber } from '../../utils/mix/number.mjs';
import { hasTransform } from '../utils/has-transform.mjs';
/**
* Scales a point based on a factor and an originPoint
*/
function scalePoint(point, scale, originPoint) {
const distanceFromOrigin = point - originPoint;
const scaled = scale * distanceFromOrigin;
return originPoint + scaled;
}
/**
* Applies a translate/scale delta to a point
*/
function applyPointDelta(point, translate, scale, originPoint, boxScale) {
if (boxScale !== undefined) {
point = scalePoint(point, boxScale, originPoint);
}
return scalePoint(point, scale, originPoint) + translate;
}
/**
* Applies a translate/scale delta to an axis
*/
function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {
axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
}
/**
* Applies a translate/scale delta to a box
*/
function applyBoxDelta(box, { x, y }) {
applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
}
const TREE_SCALE_SNAP_MIN = 0.999999999999;
const TREE_SCALE_SNAP_MAX = 1.0000000000001;
/**
* Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms
* in a tree upon our box before then calculating how to project it into our desired viewport-relative box
*
* This is the final nested loop within updateLayoutDelta for future refactoring
*/
function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
const treeLength = treePath.length;
if (!treeLength)
return;
// Reset the treeScale
treeScale.x = treeScale.y = 1;
let node;
let delta;
for (let i = 0; i < treeLength; i++) {
node = treePath[i];
delta = node.projectionDelta;
/**
* TODO: Prefer to remove this, but currently we have motion components with
* display: contents in Framer.
*/
const { visualElement } = node.options;
if (visualElement &&
visualElement.props.style &&
visualElement.props.style.display === "contents") {
continue;
}
if (isSharedTransition &&
node.options.layoutScroll &&
node.scroll &&
node !== node.root) {
transformBox(box, {
x: -node.scroll.offset.x,
y: -node.scroll.offset.y,
});
}
if (delta) {
// Incoporate each ancestor's scale into a culmulative treeScale for this component
treeScale.x *= delta.x.scale;
treeScale.y *= delta.y.scale;
// Apply each ancestor's calculated delta into this component's recorded layout box
applyBoxDelta(box, delta);
}
if (isSharedTransition && hasTransform(node.latestValues)) {
transformBox(box, node.latestValues);
}
}
/**
* Snap tree scale back to 1 if it's within a non-perceivable threshold.
* This will help reduce useless scales getting rendered.
*/
if (treeScale.x < TREE_SCALE_SNAP_MAX &&
treeScale.x > TREE_SCALE_SNAP_MIN) {
treeScale.x = 1.0;
}
if (treeScale.y < TREE_SCALE_SNAP_MAX &&
treeScale.y > TREE_SCALE_SNAP_MIN) {
treeScale.y = 1.0;
}
}
function translateAxis(axis, distance) {
axis.min = axis.min + distance;
axis.max = axis.max + distance;
}
/**
* Apply a transform to an axis from the latest resolved motion values.
* This function basically acts as a bridge between a flat motion value map
* and applyAxisDelta
*/
function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
const originPoint = mixNumber(axis.min, axis.max, axisOrigin);
// Apply the axis delta to the final axis
applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);
}
/**
* Apply a transform to a box from the latest resolved motion values.
*/
function transformBox(box, transform) {
transformAxis(box.x, transform.x, transform.scaleX, transform.scale, transform.originX);
transformAxis(box.y, transform.y, transform.scaleY, transform.scale, transform.originY);
}
export { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };

View File

@@ -0,0 +1,41 @@
/*
* 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.
*/
/**
* Defines the available internal logging levels for the diagnostic logger, the numeric values
* of the levels are defined to match the original values from the initial LogLevel to avoid
* compatibility/migration issues for any implementation that assume the numeric ordering.
*/
export var DiagLogLevel;
(function (DiagLogLevel) {
/** Diagnostic Logging level setting to disable all logging (except and forced logs) */
DiagLogLevel[DiagLogLevel["NONE"] = 0] = "NONE";
/** Identifies an error scenario */
DiagLogLevel[DiagLogLevel["ERROR"] = 30] = "ERROR";
/** Identifies a warning scenario */
DiagLogLevel[DiagLogLevel["WARN"] = 50] = "WARN";
/** General informational log message */
DiagLogLevel[DiagLogLevel["INFO"] = 60] = "INFO";
/** General debug log message */
DiagLogLevel[DiagLogLevel["DEBUG"] = 70] = "DEBUG";
/**
* Detailed trace level logging should only be used for development, should only be set
* in a development environment.
*/
DiagLogLevel[DiagLogLevel["VERBOSE"] = 80] = "VERBOSE";
/** Used to set the logging level to include all logging */
DiagLogLevel[DiagLogLevel["ALL"] = 9999] = "ALL";
})(DiagLogLevel || (DiagLogLevel = {}));
//# sourceMappingURL=types.js.map

View File

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

View File

@@ -0,0 +1,159 @@
import { Bench } from 'tinybench'
import { fastUri } from '../index.js'
import { parse as uriJsParse, serialize as uriJsSerialize, resolve as uriJsResolve, equal as uriJsEqual } from 'uri-js'
const base = 'uri://a/b/c/d;p?q'
const domain = 'https://example.com/foo#bar$fiz'
const ipv4 = '//10.10.10.10'
const ipv6 = '//[2001:db8::7]'
const urn = 'urn:foo:a123,456'
const urnuuid = 'urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6'
const urnuuidComponent = {
scheme: 'urn',
nid: 'uuid',
uuid: 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6'
}
const {
parse: fastUriParse,
serialize: fastUriSerialize,
resolve: fastUriResolve,
equal: fastUriEqual,
} = fastUri
// Initialization as there is a lot to parse at first
// eg: regexes
fastUriParse(domain)
uriJsParse(domain)
const benchFastUri = new Bench({ name: 'fast-uri benchmark' })
const benchUriJs = new Bench({ name: 'uri-js benchmark' })
const benchWHATWG = new Bench({ name: 'WHATWG URL benchmark' })
benchFastUri.add('fast-uri: parse domain', function () {
fastUriParse(domain)
})
benchUriJs.add('urijs: parse domain', function () {
uriJsParse(domain)
})
benchWHATWG.add('WHATWG URL: parse domain', function () {
// eslint-disable-next-line
new URL(domain)
})
benchFastUri.add('fast-uri: parse IPv4', function () {
fastUriParse(ipv4)
})
benchUriJs.add('urijs: parse IPv4', function () {
uriJsParse(ipv4)
})
benchFastUri.add('fast-uri: parse IPv6', function () {
fastUriParse(ipv6)
})
benchUriJs.add('urijs: parse IPv6', function () {
uriJsParse(ipv6)
})
benchFastUri.add('fast-uri: parse URN', function () {
fastUriParse(urn)
})
benchUriJs.add('urijs: parse URN', function () {
uriJsParse(urn)
})
benchWHATWG.add('WHATWG URL: parse URN', function () {
// eslint-disable-next-line
new URL(urn)
})
benchFastUri.add('fast-uri: parse URN uuid', function () {
fastUriParse(urnuuid)
})
benchUriJs.add('urijs: parse URN uuid', function () {
uriJsParse(urnuuid)
})
benchFastUri.add('fast-uri: serialize URN uuid', function () {
fastUriSerialize(urnuuidComponent)
})
benchUriJs.add('uri-js: serialize URN uuid', function () {
uriJsSerialize(urnuuidComponent)
})
benchFastUri.add('fast-uri: serialize uri', function () {
fastUriSerialize({
scheme: 'uri',
userinfo: 'foo:bar',
host: 'example.com',
port: 1,
path: 'path',
query: 'query',
fragment: 'fragment'
})
})
benchUriJs.add('urijs: serialize uri', function () {
uriJsSerialize({
scheme: 'uri',
userinfo: 'foo:bar',
host: 'example.com',
port: 1,
path: 'path',
query: 'query',
fragment: 'fragment'
})
})
benchFastUri.add('fast-uri: serialize long uri with dots', function () {
fastUriSerialize({
scheme: 'uri',
userinfo: 'foo:bar',
host: 'example.com',
port: 1,
path: './a/./b/c/../.././d/../e/f/.././/',
query: 'query',
fragment: 'fragment'
})
})
benchUriJs.add('urijs: serialize long uri with dots', function () {
uriJsSerialize({
scheme: 'uri',
userinfo: 'foo:bar',
host: 'example.com',
port: 1,
path: './a/./b/c/../.././d/../e/f/.././/',
query: 'query',
fragment: 'fragment'
})
})
benchFastUri.add('fast-uri: serialize IPv6', function () {
fastUriSerialize({ host: '2606:2800:220:1:248:1893:25c8:1946' })
})
benchUriJs.add('urijs: serialize IPv6', function () {
uriJsSerialize({ host: '2606:2800:220:1:248:1893:25c8:1946' })
})
benchFastUri.add('fast-uri: serialize ws', function () {
fastUriSerialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo?bar', secure: true })
})
benchUriJs.add('urijs: serialize ws', function () {
uriJsSerialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo?bar', secure: true })
})
benchFastUri.add('fast-uri: resolve', function () {
fastUriResolve(base, '../../../g')
})
benchUriJs.add('urijs: resolve', function () {
uriJsResolve(base, '../../../g')
})
benchFastUri.add('fast-uri: equal', function () {
fastUriEqual('example://a/b/c/%7Bfoo%7D', 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d')
})
benchUriJs.add('urijs: equal', function () {
uriJsEqual('example://a/b/c/%7Bfoo%7D', 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d')
})
await benchFastUri.run()
console.log(benchFastUri.name)
console.table(benchFastUri.table())
await benchUriJs.run()
console.log(benchUriJs.name)
console.table(benchUriJs.table())
await benchWHATWG.run()
console.log(benchWHATWG.name)
console.table(benchWHATWG.table())

View File

@@ -0,0 +1 @@
{"version":3,"file":"traceData.d.ts","sourceRoot":"","sources":["../../../src/utils/traceData.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAGxC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAMlE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAC1B,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5F,mBAAmB,CAkCrB"}

View File

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

View File

@@ -0,0 +1,58 @@
import type { Cache } from "./cache/core/cache.js";
import type { AnyColumn } from "./column.js";
import type { Logger } from "./logger.js";
import { Param, SQL, View } from "./sql/sql.js";
import { Table } from "./table.js";
export declare function haveSameKeys(left: Record<string, unknown>, right: Record<string, unknown>): boolean;
export type UpdateSet = Record<string, SQL | Param | AnyColumn | null | undefined>;
export type OneOrMany<T> = T | T[];
export type Update<T, TUpdate> = {
[K in Exclude<keyof T, keyof TUpdate>]: T[K];
} & TUpdate;
export type Simplify<T> = {
[K in keyof T]: T[K];
} & {};
export type SimplifyMappedType<T> = [T] extends [unknown] ? T : never;
export type ShallowRecord<K extends keyof any, T> = SimplifyMappedType<{
[P in K]: T;
}>;
export type Assume<T, U> = T extends U ? T : U;
export type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
export interface DrizzleTypeError<T extends string> {
$drizzleTypeError: T;
}
export type ValueOrArray<T> = T | T[];
export type Or<T1, T2> = T1 extends true ? true : T2 extends true ? true : false;
export type IfThenElse<If, Then, Else> = If extends true ? Then : Else;
export type PromiseOf<T> = T extends Promise<infer U> ? U : T;
export type Writable<T> = {
-readonly [P in keyof T]: T[P];
};
export type NonArray<T> = T extends any[] ? never : T;
export declare function getTableColumns<T extends Table>(table: T): T['_']['columns'];
export declare function getViewSelectedFields<T extends View>(view: T): T['_']['selectedFields'];
export type ColumnsWithTable<TTableName extends string, TForeignTableName extends string, TColumns extends AnyColumn<{
tableName: TTableName;
}>[]> = {
[Key in keyof TColumns]: AnyColumn<{
tableName: TForeignTableName;
}>;
};
export type Casing = 'snake_case' | 'camelCase';
export interface DrizzleConfig<TSchema extends Record<string, unknown> = Record<string, never>> {
logger?: boolean | Logger;
schema?: TSchema;
casing?: Casing;
cache?: Cache;
}
export type ValidateShape<T, ValidShape, TResult = T> = T extends ValidShape ? Exclude<keyof T, keyof ValidShape> extends never ? TResult : DrizzleTypeError<`Invalid key(s): ${Exclude<(keyof T) & (string | number | bigint | boolean | null | undefined), keyof ValidShape>}`> : never;
export type KnownKeysOnly<T, U> = {
[K in keyof T]: K extends keyof U ? T[K] : never;
};
export type IsAny<T> = 0 extends (1 & T) ? true : false;
export type IfNotImported<T, Y, N> = unknown extends T ? Y : N;
export type ImportTypeError<TPackageName extends string> = `Please install \`${TPackageName}\` to allow Drizzle ORM to connect to the database`;
export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Keys extends any ? Required<Pick<T, Keys>> & Partial<Omit<T, Keys>> : never;
export declare function isConfig(data: any): boolean;
export type NeonAuthToken = string | (() => string | Promise<string>);
export declare const textDecoder: TextDecoder | null;

View File

@@ -0,0 +1,17 @@
import { Event, Primitive } from '@sentry/core';
type GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';
type GlobalHandlersIntegrations = Record<GlobalHandlersIntegrationsOptionKeys, boolean>;
export declare const globalHandlersIntegration: (options?: Partial<GlobalHandlersIntegrations> | undefined) => import("@sentry/core").Integration;
/**
*
*/
export declare function _getUnhandledRejectionError(error: unknown): unknown;
/**
* Create an event from a promise rejection where the `reason` is a primitive.
*
* @param reason: The `reason` property of the promise rejection
* @returns An Event object with an appropriate `exception` value
*/
export declare function _eventFromRejectionWithPrimitive(reason: Primitive): Event;
export {};
//# sourceMappingURL=globalhandlers.d.ts.map

View File

@@ -0,0 +1,77 @@
import { MergeCoreCollection } from "../types/schema.cjs";
//#region src/schema/field.d.ts
type DirectusField<Schema = any> = {
collection: string;
field: string;
type: string;
meta: MergeCoreCollection<Schema, 'directus_fields', {
id: number;
collection: string;
field: string;
special: string[] | null;
interface: string | null;
options: Record<string, any> | null;
display: string | null;
display_options: Record<string, any> | null;
readonly: boolean;
hidden: boolean;
sort: number | null;
width: string | null;
translations: FieldMetaTranslationType[] | null;
note: string | null;
conditions: FieldMetaConditionType[] | null;
required: boolean;
searchable: boolean;
group: string | null;
validation: Record<string, any> | null;
validation_message: string | null;
}>;
schema: {
name: string;
table: string;
schema: string;
data_type: string;
is_nullable: boolean;
default_value: any | null;
is_indexed: boolean;
is_generated: boolean;
generation_expression: unknown | null;
max_length: number | null;
comment: string | null;
numeric_precision: number | null;
numeric_scale: number | null;
is_unique: boolean;
is_primary_key: boolean;
has_auto_increment: boolean;
foreign_key_schema: string | null;
foreign_key_table: string | null;
foreign_key_column: string | null;
};
};
type FieldMetaConditionType = {
hidden: boolean;
name: string;
options: FieldMetaConditionOptionType;
readonly: boolean;
required: boolean;
rule: unknown;
};
type FieldMetaConditionOptionType = {
clear: boolean;
font: string;
iconLeft?: string;
iconRight?: string;
masked: boolean;
placeholder: string;
slug: boolean;
softLength?: number;
trim: boolean;
};
type FieldMetaTranslationType = {
language: string;
translation: string;
};
//#endregion
export { DirectusField, FieldMetaConditionOptionType, FieldMetaConditionType, FieldMetaTranslationType };
//# sourceMappingURL=field.d.cts.map

View File

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

View File

@@ -0,0 +1,19 @@
import unsupportedIterableToArray from "./unsupportedIterableToArray.js";
function _createForOfIteratorHelperLoose(r, e) {
var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (t) return (t = t.call(r)).next.bind(t);
if (Array.isArray(r) || (t = unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) {
t && (r = t);
var o = 0;
return function () {
return o >= r.length ? {
done: !0
} : {
done: !1,
value: r[o++]
};
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
export { _createForOfIteratorHelperLoose as default };

View File

@@ -0,0 +1,38 @@
"use strict";
exports.lastDayOfISOWeekYear = lastDayOfISOWeekYear;
var _index = require("./getISOWeekYear.js");
var _index2 = require("./startOfISOWeek.js");
var _index3 = require("./constructFrom.js");
/**
* @name lastDayOfISOWeekYear
* @category ISO Week-Numbering Year Helpers
* @summary Return the last day of an ISO week-numbering year for the given date.
*
* @description
* Return the last day of an ISO week-numbering year,
* which always starts 3 days before the year's first Thursday.
* The result will be in the local timezone.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
*
* @returns The end of an ISO week-numbering year
*
* @example
* // The last day of an ISO week-numbering year for 2 July 2005:
* const result = lastDayOfISOWeekYear(new Date(2005, 6, 2))
* //=> Sun Jan 01 2006 00:00:00
*/
function lastDayOfISOWeekYear(date) {
const year = (0, _index.getISOWeekYear)(date);
const fourthOfJanuary = (0, _index3.constructFrom)(date, 0);
fourthOfJanuary.setFullYear(year + 1, 0, 4);
fourthOfJanuary.setHours(0, 0, 0, 0);
const _date = (0, _index2.startOfISOWeek)(fourthOfJanuary);
_date.setDate(_date.getDate() - 1);
return _date;
}

View File

@@ -0,0 +1,11 @@
"use strict";
var _array_with_holes = require("./_array_with_holes.cjs");
var _iterable_to_array_limit_loose = require("./_iterable_to_array_limit_loose.cjs");
var _non_iterable_rest = require("./_non_iterable_rest.cjs");
var _unsupported_iterable_to_array = require("./_unsupported_iterable_to_array.cjs");
function _sliced_to_array_loose(arr, i) {
return _array_with_holes._(arr) || _iterable_to_array_limit_loose._(arr, i) || _unsupported_iterable_to_array._(arr, i) || _non_iterable_rest._();
}
exports._ = _sliced_to_array_loose;

View File

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

View File

@@ -0,0 +1,4 @@
export declare const nextFriday: import("./types.js").FPFn1<
Date,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,13 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Monaco Loader: Playground</title>
</head>
<body style="height: 100vh">
<div id="app"></div>
<script type="module" src="/main.js"></script>
</body>
</html>

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