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,347 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import { useWindowInfo } from '@faceless-ui/window-info';
import { isImage } from 'payload/shared';
import React from 'react';
import { SelectInput } from '../../../fields/Select/Input.js';
import { ChevronIcon } from '../../../icons/Chevron/index.js';
import { XIcon } from '../../../icons/X/index.js';
import { useConfig } from '../../../providers/Config/index.js';
import { useTranslation } from '../../../providers/Translation/index.js';
import { AnimateHeight } from '../../AnimateHeight/index.js';
import { Button } from '../../Button/index.js';
import { Drawer } from '../../Drawer/index.js';
import { ErrorPill } from '../../ErrorPill/index.js';
import { Pill } from '../../Pill/index.js';
import { ShimmerEffect } from '../../ShimmerEffect/index.js';
import { createThumbnail } from '../../Thumbnail/createThumbnail.js';
import { Thumbnail } from '../../Thumbnail/index.js';
import { Actions } from '../ActionsBar/index.js';
import { AddFilesView } from '../AddFilesView/index.js';
import './index.scss';
import { useFormsManager } from '../FormsManager/index.js';
import { useBulkUpload } from '../index.js';
const addMoreFilesDrawerSlug = 'bulk-upload-drawer--add-more-files';
const baseClass = 'file-selections';
export function FileSidebar() {
const $ = _c(39);
const {
activeIndex,
addFiles,
forms,
isInitializing,
removeFile,
setActiveIndex,
totalErrorCount
} = useFormsManager();
const {
initialFiles,
initialForms,
maxFiles
} = useBulkUpload();
const {
i18n,
t
} = useTranslation();
const {
closeModal,
openModal
} = useModal();
const [showFiles, setShowFiles] = React.useState(false);
const {
breakpoints
} = useWindowInfo();
let t0;
if ($[0] !== removeFile) {
t0 = indexToRemove => {
removeFile(indexToRemove);
};
$[0] = removeFile;
$[1] = t0;
} else {
t0 = $[1];
}
const handleRemoveFile = t0;
let t1;
if ($[2] !== addFiles || $[3] !== closeModal) {
t1 = filelist => {
addFiles(filelist);
closeModal(addMoreFilesDrawerSlug);
};
$[2] = addFiles;
$[3] = closeModal;
$[4] = t1;
} else {
t1 = $[4];
}
const handleAddFiles = t1;
const getFileSize = _temp;
const totalFileCount = isInitializing ? initialFiles?.length ?? initialForms?.length : forms.length;
const {
collectionSlug: bulkUploadCollectionSlug,
selectableCollections,
setCollectionSlug
} = useBulkUpload();
const {
getEntityConfig
} = useConfig();
const t2 = showFiles && `${baseClass}__showingFiles`;
let t3;
if ($[5] !== t2) {
t3 = [baseClass, t2].filter(Boolean);
$[5] = t2;
$[6] = t3;
} else {
t3 = $[6];
}
const t4 = t3.join(" ");
let t5;
if ($[7] !== activeIndex || $[8] !== breakpoints.m || $[9] !== bulkUploadCollectionSlug || $[10] !== closeModal || $[11] !== forms || $[12] !== getEntityConfig || $[13] !== handleAddFiles || $[14] !== handleRemoveFile || $[15] !== i18n || $[16] !== initialFiles || $[17] !== initialForms || $[18] !== isInitializing || $[19] !== maxFiles || $[20] !== openModal || $[21] !== selectableCollections || $[22] !== setActiveIndex || $[23] !== setCollectionSlug || $[24] !== showFiles || $[25] !== t || $[26] !== t4 || $[27] !== totalErrorCount || $[28] !== totalFileCount) {
let t6;
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
t6 = () => setShowFiles(_temp2);
$[30] = t6;
} else {
t6 = $[30];
}
let t7;
if ($[31] !== closeModal) {
t7 = () => closeModal(addMoreFilesDrawerSlug);
$[31] = closeModal;
$[32] = t7;
} else {
t7 = $[32];
}
let t8;
if ($[33] !== activeIndex || $[34] !== handleRemoveFile || $[35] !== i18n || $[36] !== setActiveIndex || $[37] !== t) {
t8 = (t9, index_0) => {
const {
errorCount,
formID,
formState
} = t9;
const currentFile = formState?.file?.value || {};
return _jsxs("div", {
className: [`${baseClass}__fileRowContainer`, index_0 === activeIndex && `${baseClass}__fileRowContainer--active`, errorCount && errorCount > 0 && `${baseClass}__fileRowContainer--error`].filter(Boolean).join(" "),
children: [_jsxs("button", {
className: `${baseClass}__fileRow`,
onClick: () => setActiveIndex(index_0),
type: "button",
children: [_jsx(SidebarThumbnail, {
file: currentFile,
formID
}), _jsx("div", {
className: `${baseClass}__fileDetails`,
children: _jsx("p", {
className: `${baseClass}__fileName`,
title: currentFile.name,
children: currentFile.name || t("upload:noFile")
})
}), currentFile instanceof File ? _jsx("p", {
className: `${baseClass}__fileSize`,
children: getFileSize(currentFile)
}) : null, _jsx("div", {
className: `${baseClass}__remove ${baseClass}__remove--underlay`,
children: _jsx(XIcon, {})
}), errorCount ? _jsx(ErrorPill, {
className: `${baseClass}__errorCount`,
count: errorCount,
i18n
}) : null]
}), _jsx("button", {
"aria-label": t("general:remove"),
className: `${baseClass}__remove ${baseClass}__remove--overlay`,
onClick: () => handleRemoveFile(index_0),
type: "button",
children: _jsx(XIcon, {})
})]
}, formID);
};
$[33] = activeIndex;
$[34] = handleRemoveFile;
$[35] = i18n;
$[36] = setActiveIndex;
$[37] = t;
$[38] = t8;
} else {
t8 = $[38];
}
t5 = _jsxs("div", {
className: t4,
children: [breakpoints.m && showFiles ? _jsx("div", {
className: `${baseClass}__mobileBlur`
}) : null, _jsxs("div", {
className: `${baseClass}__header`,
children: [selectableCollections?.length > 1 && _jsx(SelectInput, {
className: `${baseClass}__collectionSelect`,
isClearable: false,
name: "groupBy",
onChange: e => {
const val = typeof e === "object" && "value" in e ? e?.value : e;
setCollectionSlug(val);
},
options: selectableCollections?.map(coll => {
const config = getEntityConfig({
collectionSlug: coll
});
return {
label: config.labels.singular,
value: config.slug
};
}) || [],
path: "groupBy",
required: true,
value: bulkUploadCollectionSlug
}), _jsxs("div", {
className: `${baseClass}__headerTopRow`,
children: [_jsxs("div", {
className: `${baseClass}__header__text`,
children: [_jsx(ErrorPill, {
count: totalErrorCount,
i18n,
withMessage: true
}), _jsx("p", {
children: _jsxs("strong", {
title: `${totalFileCount} ${t(totalFileCount > 1 ? "upload:filesToUpload" : "upload:fileToUpload")}`,
children: [totalFileCount, " ", t(totalFileCount > 1 ? "upload:filesToUpload" : "upload:fileToUpload")]
})
})]
}), _jsxs("div", {
className: `${baseClass}__header__actions`,
children: [(typeof maxFiles === "number" ? totalFileCount < maxFiles : true) ? _jsx(Pill, {
className: `${baseClass}__header__addFile`,
onClick: () => openModal(addMoreFilesDrawerSlug),
size: "small",
children: t("upload:addFile")
}) : null, _jsxs(Button, {
buttonStyle: "transparent",
className: `${baseClass}__toggler`,
onClick: t6,
children: [_jsx("span", {
className: `${baseClass}__toggler__label`,
children: _jsxs("strong", {
title: `${totalFileCount} ${t(totalFileCount > 1 ? "upload:filesToUpload" : "upload:fileToUpload")}`,
children: [totalFileCount, " ", t(totalFileCount > 1 ? "upload:filesToUpload" : "upload:fileToUpload")]
})
}), _jsx(ChevronIcon, {
direction: showFiles ? "down" : "up"
})]
}), _jsx(Drawer, {
gutter: false,
Header: null,
slug: addMoreFilesDrawerSlug,
children: _jsx(AddFilesView, {
onCancel: t7,
onDrop: handleAddFiles
})
})]
})]
}), _jsx("div", {
className: `${baseClass}__header__mobileDocActions`,
children: _jsx(Actions, {})
})]
}), _jsx("div", {
className: `${baseClass}__animateWrapper`,
children: _jsx(AnimateHeight, {
height: !breakpoints.m || showFiles ? "auto" : 0,
children: _jsxs("div", {
className: `${baseClass}__filesContainer`,
children: [isInitializing && forms.length === 0 && (initialFiles?.length > 0 || initialForms?.length > 0) ? (initialFiles ? Array.from(initialFiles) : initialForms).map(_temp3) : null, forms.map(t8)]
})
})
})]
});
$[7] = activeIndex;
$[8] = breakpoints.m;
$[9] = bulkUploadCollectionSlug;
$[10] = closeModal;
$[11] = forms;
$[12] = getEntityConfig;
$[13] = handleAddFiles;
$[14] = handleRemoveFile;
$[15] = i18n;
$[16] = initialFiles;
$[17] = initialForms;
$[18] = isInitializing;
$[19] = maxFiles;
$[20] = openModal;
$[21] = selectableCollections;
$[22] = setActiveIndex;
$[23] = setCollectionSlug;
$[24] = showFiles;
$[25] = t;
$[26] = t4;
$[27] = totalErrorCount;
$[28] = totalFileCount;
$[29] = t5;
} else {
t5 = $[29];
}
return t5;
}
function _temp3(file_0, index) {
return _jsx(ShimmerEffect, {
animationDelay: `calc(${index} * ${60}ms)`,
height: "35px"
}, index);
}
function _temp2(prev) {
return !prev;
}
function _temp(file) {
const size = file.size;
const i = size === 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024));
const decimals = i > 1 ? 1 : 0;
const formattedSize = (size / Math.pow(1024, i)).toFixed(decimals) + " " + ["B", "kB", "MB", "GB", "TB"][i];
return formattedSize;
}
function SidebarThumbnail({
file,
formID
}) {
const [thumbnailURL, setThumbnailURL] = React.useState(null);
const [isLoading, setIsLoading] = React.useState(true);
React.useEffect(() => {
let isCancelled = false;
async function generateThumbnail() {
setIsLoading(true);
setThumbnailURL(null);
try {
if (isImage(file.type)) {
const url = await createThumbnail(file);
if (!isCancelled) {
setThumbnailURL(url);
}
} else {
setThumbnailURL(null);
}
} catch (_) {
if (!isCancelled) {
setThumbnailURL(null);
}
} finally {
if (!isCancelled) {
setIsLoading(false);
}
}
}
void generateThumbnail();
return () => {
isCancelled = true;
};
}, [file]);
if (isLoading) {
return /*#__PURE__*/_jsx(ShimmerEffect, {
className: `${baseClass}__thumbnail-shimmer`,
disableInlineStyles: true
});
}
return /*#__PURE__*/_jsx(Thumbnail, {
className: `${baseClass}__thumbnail`,
fileSrc: thumbnailURL
}, `${formID}-${thumbnailURL || 'placeholder'}`);
}
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,6 @@
import { readFileSync } from 'fs';
import { join } from 'path';
export default JSON.parse(
readFileSync(join(process.cwd(), 'package.json'), { encoding: 'utf8' })
);

View File

@@ -0,0 +1,31 @@
import { millisecondsInSecond } from "./constants.js";
/**
* @name millisecondsToSeconds
* @category Conversion Helpers
* @summary Convert milliseconds to seconds.
*
* @description
* Convert a number of milliseconds to a full number of seconds.
*
* @param milliseconds - The number of milliseconds to be converted
*
* @returns The number of milliseconds converted in seconds
*
* @example
* // Convert 1000 milliseconds to seconds:
* const result = millisecondsToSeconds(1000)
* //=> 1
*
* @example
* // It uses floor rounding:
* const result = millisecondsToSeconds(1999)
* //=> 1
*/
export function millisecondsToSeconds(milliseconds) {
const seconds = milliseconds / millisecondsInSecond;
return Math.trunc(seconds);
}
// Fallback for modularized imports:
export default millisecondsToSeconds;

View File

@@ -0,0 +1,117 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "ตัวอักษร", verb: "ควรมี" },
file: { unit: "ไบต์", verb: "ควรมี" },
array: { unit: "รายการ", verb: "ควรมี" },
set: { unit: "รายการ", verb: "ควรมี" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "ไม่ใช่ตัวเลข (NaN)" : "ตัวเลข";
}
case "object": {
if (Array.isArray(data)) {
return "อาร์เรย์ (Array)";
}
if (data === null) {
return "ไม่มีค่า (null)";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "ข้อมูลที่ป้อน",
email: "ที่อยู่อีเมล",
url: "URL",
emoji: "อิโมจิ",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "วันที่เวลาแบบ ISO",
date: "วันที่แบบ ISO",
time: "เวลาแบบ ISO",
duration: "ช่วงเวลาแบบ ISO",
ipv4: "ที่อยู่ IPv4",
ipv6: "ที่อยู่ IPv6",
cidrv4: "ช่วง IP แบบ IPv4",
cidrv6: "ช่วง IP แบบ IPv6",
base64: "ข้อความแบบ Base64",
base64url: "ข้อความแบบ Base64 สำหรับ URL",
json_string: "ข้อความแบบ JSON",
e164: "เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",
jwt: "โทเคน JWT",
template_literal: "ข้อมูลที่ป้อน",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${issue.expected} แต่ได้รับ ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `ค่าไม่ถูกต้อง: ควรเป็น ${util.stringifyPrimitive(issue.values[0])}`;
return `ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "ไม่เกิน" : "น้อยกว่า";
const sizing = getSizing(issue.origin);
if (sizing)
return `เกินกำหนด: ${issue.origin ?? "ค่า"} ควรมี${adj} ${issue.maximum.toString()} ${sizing.unit ?? "รายการ"}`;
return `เกินกำหนด: ${issue.origin ?? "ค่า"} ควรมี${adj} ${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? "อย่างน้อย" : "มากกว่า";
const sizing = getSizing(issue.origin);
if (sizing) {
return `น้อยกว่ากำหนด: ${issue.origin} ควรมี${adj} ${issue.minimum.toString()} ${sizing.unit}`;
}
return `น้อยกว่ากำหนด: ${issue.origin} ควรมี${adj} ${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${_issue.suffix}"`;
if (_issue.format === "includes")
return `รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${_issue.includes}" อยู่ในข้อความ`;
if (_issue.format === "regex")
return `รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${_issue.pattern}`;
return `รูปแบบไม่ถูกต้อง: ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${issue.divisor} ได้ลงตัว`;
case "unrecognized_keys":
return `พบคีย์ที่ไม่รู้จัก: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `คีย์ไม่ถูกต้องใน ${issue.origin}`;
case "invalid_union":
return "ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";
case "invalid_element":
return `ข้อมูลไม่ถูกต้องใน ${issue.origin}`;
default:
return `ข้อมูลไม่ถูกต้อง`;
}
};
};
export default function () {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"nativeNodeFetchIntegration.d.ts","sourceRoot":"","sources":["../../../../src/light/integrations/nativeNodeFetchIntegration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,cAAc,CAAC;AAW/D,MAAM,WAAW,iCAAiC;IAChD;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACnD;AA8BD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAkC,CACvE,OAAO,CAAC,EAAE,iCAAiC,KACxC,WAAW,GAAG;IACjB,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC"}

View File

@@ -0,0 +1,36 @@
var baseIsArguments = require('./_baseIsArguments'),
isObjectLike = require('./isObjectLike');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
module.exports = isArguments;

View File

@@ -0,0 +1,59 @@
import { entityKind } from "../entity.js";
import type { SQL } from "../sql/sql.js";
import type { AnyMySqlColumn, MySqlColumn } from "./columns/index.js";
import type { MySqlTable } from "./table.js";
interface IndexConfig {
name: string;
columns: IndexColumn[];
/**
* If true, the index will be created as `create unique index` instead of `create index`.
*/
unique?: boolean;
/**
* If set, the index will be created as `create index ... using { 'btree' | 'hash' }`.
*/
using?: 'btree' | 'hash';
/**
* If set, the index will be created as `create index ... algorythm { 'default' | 'inplace' | 'copy' }`.
*/
algorythm?: 'default' | 'inplace' | 'copy';
/**
* If set, adds locks to the index creation.
*/
lock?: 'default' | 'none' | 'shared' | 'exclusive';
}
export type IndexColumn = MySqlColumn | SQL;
export declare class IndexBuilderOn {
private name;
private unique;
static readonly [entityKind]: string;
constructor(name: string, unique: boolean);
on(...columns: [IndexColumn, ...IndexColumn[]]): IndexBuilder;
}
export interface AnyIndexBuilder {
build(table: MySqlTable): Index;
}
export interface IndexBuilder extends AnyIndexBuilder {
}
export declare class IndexBuilder implements AnyIndexBuilder {
static readonly [entityKind]: string;
constructor(name: string, columns: IndexColumn[], unique: boolean);
using(using: IndexConfig['using']): this;
algorythm(algorythm: IndexConfig['algorythm']): this;
lock(lock: IndexConfig['lock']): this;
}
export declare class Index {
static readonly [entityKind]: string;
readonly config: IndexConfig & {
table: MySqlTable;
};
constructor(config: IndexConfig, table: MySqlTable);
}
export type GetColumnsTableName<TColumns> = TColumns extends AnyMySqlColumn<{
tableName: infer TTableName extends string;
}> | AnyMySqlColumn<{
tableName: infer TTableName extends string;
}>[] ? TTableName : never;
export declare function index(name: string): IndexBuilderOn;
export declare function uniqueIndex(name: string): IndexBuilderOn;
export {};

View File

@@ -0,0 +1 @@
{"version":3,"file":"useDrawerSlug.d.ts","sourceRoot":"","sources":["../../../src/elements/Drawer/useDrawerSlug.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,SAAU,MAAM,KAAG,MAO5C,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/platform/node/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GACxB,WAAW,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport {\n getStringFromEnv,\n getBooleanFromEnv,\n getNumberFromEnv,\n getStringListFromEnv,\n} from './environment';\nexport { _globalThis } from '../../common/globalThis';\nexport { SDK_INFO } from './sdk-info';\n\n/**\n * @deprecated Use performance directly.\n */\nexport const otperformance: { now(): number; readonly timeOrigin: number } =\n performance;\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"battery-medium.js","sources":["../../../src/icons/battery-medium.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BatteryMedium\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iMTAiIHg9IjIiIHk9IjciIHJ4PSIyIiByeT0iMiIgLz4KICA8bGluZSB4MT0iMjIiIHgyPSIyMiIgeTE9IjExIiB5Mj0iMTMiIC8+CiAgPGxpbmUgeDE9IjYiIHgyPSI2IiB5MT0iMTEiIHkyPSIxMyIgLz4KICA8bGluZSB4MT0iMTAiIHgyPSIxMCIgeTE9IjExIiB5Mj0iMTMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/battery-medium\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 BatteryMedium = createLucideIcon('BatteryMedium', [\n ['rect', { width: '16', height: '10', x: '2', y: '7', rx: '2', ry: '2', key: '1w10f2' }],\n ['line', { x1: '22', x2: '22', y1: '11', y2: '13', key: '4dh1rd' }],\n ['line', { x1: '6', x2: '6', y1: '11', y2: '13', key: '1wd6dw' }],\n ['line', { x1: '10', x2: '10', y1: '11', y2: '13', key: 'haxvl5' }],\n]);\n\nexport default BatteryMedium;\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,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CACvF,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAClE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAChE,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,147 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useModal } from '@faceless-ui/modal';
import React, { useState } from 'react';
import { useAuth } from '../../providers/Auth/index.js';
import { EditDepthProvider } from '../../providers/EditDepth/index.js';
import { SelectAllStatus, useSelection } from '../../providers/Selection/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { Drawer } from '../Drawer/index.js';
import { ListSelectionButton } from '../ListSelection/index.js';
import { EditManyDrawerContent } from './DrawerContent.js';
import './index.scss';
export const baseClass = 'edit-many';
export const EditMany = props => {
const $ = _c(8);
const {
count,
selectAll,
selectedIDs,
toggleAll
} = useSelection();
let t0;
if ($[0] !== toggleAll) {
t0 = () => toggleAll();
$[0] = toggleAll;
$[1] = t0;
} else {
t0 = $[1];
}
const t1 = selectAll === SelectAllStatus.AllAvailable;
let t2;
if ($[2] !== count || $[3] !== props || $[4] !== selectedIDs || $[5] !== t0 || $[6] !== t1) {
t2 = _jsx(EditMany_v4, {
...props,
count,
ids: selectedIDs,
onSuccess: t0,
selectAll: t1
});
$[2] = count;
$[3] = props;
$[4] = selectedIDs;
$[5] = t0;
$[6] = t1;
$[7] = t2;
} else {
t2 = $[7];
}
return t2;
};
export const EditMany_v4 = t0 => {
const $ = _c(16);
const {
collection,
count,
ids,
modalPrefix,
onSuccess,
selectAll,
where
} = t0;
const {
permissions
} = useAuth();
const {
openModal
} = useModal();
const {
t
} = useTranslation();
let t1;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t1 = [];
$[0] = t1;
} else {
t1 = $[0];
}
const [selectedFields, setSelectedFields] = useState(t1);
const collectionPermissions = permissions?.collections?.[collection.slug];
const drawerSlug = `${modalPrefix ? `${modalPrefix}-` : ""}edit-${collection.slug}`;
if (count === 0 || !collectionPermissions?.update) {
return null;
}
let t2;
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
t2 = [baseClass, `${baseClass}__toggle`].filter(Boolean);
$[1] = t2;
} else {
t2 = $[1];
}
let t3;
if ($[2] !== collection || $[3] !== count || $[4] !== drawerSlug || $[5] !== ids || $[6] !== onSuccess || $[7] !== openModal || $[8] !== selectAll || $[9] !== selectedFields || $[10] !== t || $[11] !== where) {
let t4;
if ($[13] !== drawerSlug || $[14] !== openModal) {
t4 = () => {
openModal(drawerSlug);
setSelectedFields([]);
};
$[13] = drawerSlug;
$[14] = openModal;
$[15] = t4;
} else {
t4 = $[15];
}
t3 = _jsxs("div", {
className: t2.join(" "),
children: [_jsx(ListSelectionButton, {
"aria-label": t("general:edit"),
onClick: t4,
children: t("general:edit")
}), _jsx(EditDepthProvider, {
children: _jsx(Drawer, {
Header: null,
slug: drawerSlug,
children: _jsx(EditManyDrawerContent, {
collection,
count,
drawerSlug,
ids,
onSuccess,
selectAll,
selectedFields,
setSelectedFields,
where
})
})
})]
});
$[2] = collection;
$[3] = count;
$[4] = drawerSlug;
$[5] = ids;
$[6] = onSuccess;
$[7] = openModal;
$[8] = selectAll;
$[9] = selectedFields;
$[10] = t;
$[11] = where;
$[12] = t3;
} else {
t3 = $[12];
}
return t3;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,83 @@
import { normalizeInterval } from "./_lib/normalizeInterval.js";
import { addWeeks } from "./addWeeks.js";
import { constructFrom } from "./constructFrom.js";
import { startOfWeek } from "./startOfWeek.js";
/**
* The {@link eachWeekOfInterval} function options.
*/
/**
* The {@link eachWeekOfInterval} function result type. It resolves the proper data type.
* It uses the first argument date object type, starting from the interval start date,
* then the end interval date. If a context function is passed, it uses the context function return type.
*/
/**
* @name eachWeekOfInterval
* @category Interval Helpers
* @summary Return the array of weeks within the specified time interval.
*
* @description
* Return the array of weeks within the specified time interval.
*
* @param interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of weeks from the week of the interval start to the week of the interval end
*
* @example
* // Each week within interval 6 October 2014 - 23 November 2014:
* const result = eachWeekOfInterval({
* start: new Date(2014, 9, 6),
* end: new Date(2014, 10, 23)
* })
* //=> [
* // Sun Oct 05 2014 00:00:00,
* // Sun Oct 12 2014 00:00:00,
* // Sun Oct 19 2014 00:00:00,
* // Sun Oct 26 2014 00:00:00,
* // Sun Nov 02 2014 00:00:00,
* // Sun Nov 09 2014 00:00:00,
* // Sun Nov 16 2014 00:00:00,
* // Sun Nov 23 2014 00:00:00
* // ]
*/
export function eachWeekOfInterval(interval, options) {
const { start, end } = normalizeInterval(options?.in, interval);
let reversed = +start > +end;
const startDateWeek = reversed
? startOfWeek(end, options)
: startOfWeek(start, options);
const endDateWeek = reversed
? startOfWeek(start, options)
: startOfWeek(end, options);
startDateWeek.setHours(15);
endDateWeek.setHours(15);
const endTime = +endDateWeek.getTime();
let currentDate = startDateWeek;
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+currentDate <= endTime) {
currentDate.setHours(0);
dates.push(constructFrom(start, currentDate));
currentDate = addWeeks(currentDate, step);
currentDate.setHours(15);
}
return reversed ? dates.reverse() : dates;
}
// Fallback for modularized imports:
export default eachWeekOfInterval;

View File

@@ -0,0 +1,8 @@
import { Decimal } from "decimal.js";
import { type NumberFormatInternal } from "../types/number.js";
/**
* The abstract operation ComputeExponentForMagnitude computes an exponent by which to scale a
* number of the given magnitude (power of ten of the most significant digit) according to the
* locale and the desired notation (scientific, engineering, or compact).
*/
export declare function ComputeExponentForMagnitude(internalSlots: NumberFormatInternal, magnitude: Decimal): number;

View File

@@ -0,0 +1,140 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchPatternFn.js");
var _index2 = require("../../_lib/buildMatchFn.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 de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i,
};
const parseEraPatterns = {
any: [/^ac/i, /^dc/i],
wide: [
/^(antes de cristo|antes de la era com[uú]n)/i,
/^(despu[eé]s de cristo|era com[uú]n)/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: /^[efmajsond]/i,
abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
};
const parseMonthPatterns = {
narrow: [
/^e/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^en/i,
/^feb/i,
/^mar/i,
/^abr/i,
/^may/i,
/^jun/i,
/^jul/i,
/^ago/i,
/^sep/i,
/^oct/i,
/^nov/i,
/^dic/i,
],
};
const matchDayPatterns = {
narrow: /^[dlmjvs]/i,
short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mn/i,
noon: /^md/i,
morning: /mañana/i,
afternoon: /tarde/i,
evening: /tarde/i,
night: /noche/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function (value) {
return parseInt(value, 10);
},
}),
era: (0, _index2.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index2.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: (0, _index2.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,938 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.QuoteType = void 0;
var decode_js_1 = require("entities/lib/decode.js");
var CharCodes;
(function (CharCodes) {
CharCodes[CharCodes["Tab"] = 9] = "Tab";
CharCodes[CharCodes["NewLine"] = 10] = "NewLine";
CharCodes[CharCodes["FormFeed"] = 12] = "FormFeed";
CharCodes[CharCodes["CarriageReturn"] = 13] = "CarriageReturn";
CharCodes[CharCodes["Space"] = 32] = "Space";
CharCodes[CharCodes["ExclamationMark"] = 33] = "ExclamationMark";
CharCodes[CharCodes["Number"] = 35] = "Number";
CharCodes[CharCodes["Amp"] = 38] = "Amp";
CharCodes[CharCodes["SingleQuote"] = 39] = "SingleQuote";
CharCodes[CharCodes["DoubleQuote"] = 34] = "DoubleQuote";
CharCodes[CharCodes["Dash"] = 45] = "Dash";
CharCodes[CharCodes["Slash"] = 47] = "Slash";
CharCodes[CharCodes["Zero"] = 48] = "Zero";
CharCodes[CharCodes["Nine"] = 57] = "Nine";
CharCodes[CharCodes["Semi"] = 59] = "Semi";
CharCodes[CharCodes["Lt"] = 60] = "Lt";
CharCodes[CharCodes["Eq"] = 61] = "Eq";
CharCodes[CharCodes["Gt"] = 62] = "Gt";
CharCodes[CharCodes["Questionmark"] = 63] = "Questionmark";
CharCodes[CharCodes["UpperA"] = 65] = "UpperA";
CharCodes[CharCodes["LowerA"] = 97] = "LowerA";
CharCodes[CharCodes["UpperF"] = 70] = "UpperF";
CharCodes[CharCodes["LowerF"] = 102] = "LowerF";
CharCodes[CharCodes["UpperZ"] = 90] = "UpperZ";
CharCodes[CharCodes["LowerZ"] = 122] = "LowerZ";
CharCodes[CharCodes["LowerX"] = 120] = "LowerX";
CharCodes[CharCodes["OpeningSquareBracket"] = 91] = "OpeningSquareBracket";
})(CharCodes || (CharCodes = {}));
/** All the states the tokenizer can be in. */
var State;
(function (State) {
State[State["Text"] = 1] = "Text";
State[State["BeforeTagName"] = 2] = "BeforeTagName";
State[State["InTagName"] = 3] = "InTagName";
State[State["InSelfClosingTag"] = 4] = "InSelfClosingTag";
State[State["BeforeClosingTagName"] = 5] = "BeforeClosingTagName";
State[State["InClosingTagName"] = 6] = "InClosingTagName";
State[State["AfterClosingTagName"] = 7] = "AfterClosingTagName";
// Attributes
State[State["BeforeAttributeName"] = 8] = "BeforeAttributeName";
State[State["InAttributeName"] = 9] = "InAttributeName";
State[State["AfterAttributeName"] = 10] = "AfterAttributeName";
State[State["BeforeAttributeValue"] = 11] = "BeforeAttributeValue";
State[State["InAttributeValueDq"] = 12] = "InAttributeValueDq";
State[State["InAttributeValueSq"] = 13] = "InAttributeValueSq";
State[State["InAttributeValueNq"] = 14] = "InAttributeValueNq";
// Declarations
State[State["BeforeDeclaration"] = 15] = "BeforeDeclaration";
State[State["InDeclaration"] = 16] = "InDeclaration";
// Processing instructions
State[State["InProcessingInstruction"] = 17] = "InProcessingInstruction";
// Comments & CDATA
State[State["BeforeComment"] = 18] = "BeforeComment";
State[State["CDATASequence"] = 19] = "CDATASequence";
State[State["InSpecialComment"] = 20] = "InSpecialComment";
State[State["InCommentLike"] = 21] = "InCommentLike";
// Special tags
State[State["BeforeSpecialS"] = 22] = "BeforeSpecialS";
State[State["SpecialStartSequence"] = 23] = "SpecialStartSequence";
State[State["InSpecialTag"] = 24] = "InSpecialTag";
State[State["BeforeEntity"] = 25] = "BeforeEntity";
State[State["BeforeNumericEntity"] = 26] = "BeforeNumericEntity";
State[State["InNamedEntity"] = 27] = "InNamedEntity";
State[State["InNumericEntity"] = 28] = "InNumericEntity";
State[State["InHexEntity"] = 29] = "InHexEntity";
})(State || (State = {}));
function isWhitespace(c) {
return (c === CharCodes.Space ||
c === CharCodes.NewLine ||
c === CharCodes.Tab ||
c === CharCodes.FormFeed ||
c === CharCodes.CarriageReturn);
}
function isEndOfTagSection(c) {
return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace(c);
}
function isNumber(c) {
return c >= CharCodes.Zero && c <= CharCodes.Nine;
}
function isASCIIAlpha(c) {
return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||
(c >= CharCodes.UpperA && c <= CharCodes.UpperZ));
}
function isHexDigit(c) {
return ((c >= CharCodes.UpperA && c <= CharCodes.UpperF) ||
(c >= CharCodes.LowerA && c <= CharCodes.LowerF));
}
var QuoteType;
(function (QuoteType) {
QuoteType[QuoteType["NoValue"] = 0] = "NoValue";
QuoteType[QuoteType["Unquoted"] = 1] = "Unquoted";
QuoteType[QuoteType["Single"] = 2] = "Single";
QuoteType[QuoteType["Double"] = 3] = "Double";
})(QuoteType = exports.QuoteType || (exports.QuoteType = {}));
/**
* Sequences used to match longer strings.
*
* We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End
* sequences with an increased offset.
*/
var Sequences = {
Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]),
CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]),
CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]),
ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]),
StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]),
TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`
};
var Tokenizer = /** @class */ (function () {
function Tokenizer(_a, cbs) {
var _b = _a.xmlMode, xmlMode = _b === void 0 ? false : _b, _c = _a.decodeEntities, decodeEntities = _c === void 0 ? true : _c;
this.cbs = cbs;
/** The current state the tokenizer is in. */
this.state = State.Text;
/** The read buffer. */
this.buffer = "";
/** The beginning of the section that is currently being read. */
this.sectionStart = 0;
/** The index within the buffer that we are currently looking at. */
this.index = 0;
/** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
this.baseState = State.Text;
/** For special parsing behavior inside of script and style tags. */
this.isSpecial = false;
/** Indicates whether the tokenizer has been paused. */
this.running = true;
/** The offset of the current buffer. */
this.offset = 0;
this.currentSequence = undefined;
this.sequenceIndex = 0;
this.trieIndex = 0;
this.trieCurrent = 0;
/** For named entities, the index of the value. For numeric entities, the code point. */
this.entityResult = 0;
this.entityExcess = 0;
this.xmlMode = xmlMode;
this.decodeEntities = decodeEntities;
this.entityTrie = xmlMode ? decode_js_1.xmlDecodeTree : decode_js_1.htmlDecodeTree;
}
Tokenizer.prototype.reset = function () {
this.state = State.Text;
this.buffer = "";
this.sectionStart = 0;
this.index = 0;
this.baseState = State.Text;
this.currentSequence = undefined;
this.running = true;
this.offset = 0;
};
Tokenizer.prototype.write = function (chunk) {
this.offset += this.buffer.length;
this.buffer = chunk;
this.parse();
};
Tokenizer.prototype.end = function () {
if (this.running)
this.finish();
};
Tokenizer.prototype.pause = function () {
this.running = false;
};
Tokenizer.prototype.resume = function () {
this.running = true;
if (this.index < this.buffer.length + this.offset) {
this.parse();
}
};
/**
* The current index within all of the written data.
*/
Tokenizer.prototype.getIndex = function () {
return this.index;
};
/**
* The start of the current section.
*/
Tokenizer.prototype.getSectionStart = function () {
return this.sectionStart;
};
Tokenizer.prototype.stateText = function (c) {
if (c === CharCodes.Lt ||
(!this.decodeEntities && this.fastForwardTo(CharCodes.Lt))) {
if (this.index > this.sectionStart) {
this.cbs.ontext(this.sectionStart, this.index);
}
this.state = State.BeforeTagName;
this.sectionStart = this.index;
}
else if (this.decodeEntities && c === CharCodes.Amp) {
this.state = State.BeforeEntity;
}
};
Tokenizer.prototype.stateSpecialStartSequence = function (c) {
var isEnd = this.sequenceIndex === this.currentSequence.length;
var isMatch = isEnd
? // If we are at the end of the sequence, make sure the tag name has ended
isEndOfTagSection(c)
: // Otherwise, do a case-insensitive comparison
(c | 0x20) === this.currentSequence[this.sequenceIndex];
if (!isMatch) {
this.isSpecial = false;
}
else if (!isEnd) {
this.sequenceIndex++;
return;
}
this.sequenceIndex = 0;
this.state = State.InTagName;
this.stateInTagName(c);
};
/** Look for an end tag. For <title> tags, also decode entities. */
Tokenizer.prototype.stateInSpecialTag = function (c) {
if (this.sequenceIndex === this.currentSequence.length) {
if (c === CharCodes.Gt || isWhitespace(c)) {
var endOfText = this.index - this.currentSequence.length;
if (this.sectionStart < endOfText) {
// Spoof the index so that reported locations match up.
var actualIndex = this.index;
this.index = endOfText;
this.cbs.ontext(this.sectionStart, endOfText);
this.index = actualIndex;
}
this.isSpecial = false;
this.sectionStart = endOfText + 2; // Skip over the `</`
this.stateInClosingTagName(c);
return; // We are done; skip the rest of the function.
}
this.sequenceIndex = 0;
}
if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
this.sequenceIndex += 1;
}
else if (this.sequenceIndex === 0) {
if (this.currentSequence === Sequences.TitleEnd) {
// We have to parse entities in <title> tags.
if (this.decodeEntities && c === CharCodes.Amp) {
this.state = State.BeforeEntity;
}
}
else if (this.fastForwardTo(CharCodes.Lt)) {
// Outside of <title> tags, we can fast-forward.
this.sequenceIndex = 1;
}
}
else {
// If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.
this.sequenceIndex = Number(c === CharCodes.Lt);
}
};
Tokenizer.prototype.stateCDATASequence = function (c) {
if (c === Sequences.Cdata[this.sequenceIndex]) {
if (++this.sequenceIndex === Sequences.Cdata.length) {
this.state = State.InCommentLike;
this.currentSequence = Sequences.CdataEnd;
this.sequenceIndex = 0;
this.sectionStart = this.index + 1;
}
}
else {
this.sequenceIndex = 0;
this.state = State.InDeclaration;
this.stateInDeclaration(c); // Reconsume the character
}
};
/**
* When we wait for one specific character, we can speed things up
* by skipping through the buffer until we find it.
*
* @returns Whether the character was found.
*/
Tokenizer.prototype.fastForwardTo = function (c) {
while (++this.index < this.buffer.length + this.offset) {
if (this.buffer.charCodeAt(this.index - this.offset) === c) {
return true;
}
}
/*
* We increment the index at the end of the `parse` loop,
* so set it to `buffer.length - 1` here.
*
* TODO: Refactor `parse` to increment index before calling states.
*/
this.index = this.buffer.length + this.offset - 1;
return false;
};
/**
* Comments and CDATA end with `-->` and `]]>`.
*
* Their common qualities are:
* - Their end sequences have a distinct character they start with.
* - That character is then repeated, so we have to check multiple repeats.
* - All characters but the start character of the sequence can be skipped.
*/
Tokenizer.prototype.stateInCommentLike = function (c) {
if (c === this.currentSequence[this.sequenceIndex]) {
if (++this.sequenceIndex === this.currentSequence.length) {
if (this.currentSequence === Sequences.CdataEnd) {
this.cbs.oncdata(this.sectionStart, this.index, 2);
}
else {
this.cbs.oncomment(this.sectionStart, this.index, 2);
}
this.sequenceIndex = 0;
this.sectionStart = this.index + 1;
this.state = State.Text;
}
}
else if (this.sequenceIndex === 0) {
// Fast-forward to the first character of the sequence
if (this.fastForwardTo(this.currentSequence[0])) {
this.sequenceIndex = 1;
}
}
else if (c !== this.currentSequence[this.sequenceIndex - 1]) {
// Allow long sequences, eg. --->, ]]]>
this.sequenceIndex = 0;
}
};
/**
* HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
*
* XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
* We allow anything that wouldn't end the tag.
*/
Tokenizer.prototype.isTagStartChar = function (c) {
return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
};
Tokenizer.prototype.startSpecial = function (sequence, offset) {
this.isSpecial = true;
this.currentSequence = sequence;
this.sequenceIndex = offset;
this.state = State.SpecialStartSequence;
};
Tokenizer.prototype.stateBeforeTagName = function (c) {
if (c === CharCodes.ExclamationMark) {
this.state = State.BeforeDeclaration;
this.sectionStart = this.index + 1;
}
else if (c === CharCodes.Questionmark) {
this.state = State.InProcessingInstruction;
this.sectionStart = this.index + 1;
}
else if (this.isTagStartChar(c)) {
var lower = c | 0x20;
this.sectionStart = this.index;
if (!this.xmlMode && lower === Sequences.TitleEnd[2]) {
this.startSpecial(Sequences.TitleEnd, 3);
}
else {
this.state =
!this.xmlMode && lower === Sequences.ScriptEnd[2]
? State.BeforeSpecialS
: State.InTagName;
}
}
else if (c === CharCodes.Slash) {
this.state = State.BeforeClosingTagName;
}
else {
this.state = State.Text;
this.stateText(c);
}
};
Tokenizer.prototype.stateInTagName = function (c) {
if (isEndOfTagSection(c)) {
this.cbs.onopentagname(this.sectionStart, this.index);
this.sectionStart = -1;
this.state = State.BeforeAttributeName;
this.stateBeforeAttributeName(c);
}
};
Tokenizer.prototype.stateBeforeClosingTagName = function (c) {
if (isWhitespace(c)) {
// Ignore
}
else if (c === CharCodes.Gt) {
this.state = State.Text;
}
else {
this.state = this.isTagStartChar(c)
? State.InClosingTagName
: State.InSpecialComment;
this.sectionStart = this.index;
}
};
Tokenizer.prototype.stateInClosingTagName = function (c) {
if (c === CharCodes.Gt || isWhitespace(c)) {
this.cbs.onclosetag(this.sectionStart, this.index);
this.sectionStart = -1;
this.state = State.AfterClosingTagName;
this.stateAfterClosingTagName(c);
}
};
Tokenizer.prototype.stateAfterClosingTagName = function (c) {
// Skip everything until ">"
if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
this.state = State.Text;
this.baseState = State.Text;
this.sectionStart = this.index + 1;
}
};
Tokenizer.prototype.stateBeforeAttributeName = function (c) {
if (c === CharCodes.Gt) {
this.cbs.onopentagend(this.index);
if (this.isSpecial) {
this.state = State.InSpecialTag;
this.sequenceIndex = 0;
}
else {
this.state = State.Text;
}
this.baseState = this.state;
this.sectionStart = this.index + 1;
}
else if (c === CharCodes.Slash) {
this.state = State.InSelfClosingTag;
}
else if (!isWhitespace(c)) {
this.state = State.InAttributeName;
this.sectionStart = this.index;
}
};
Tokenizer.prototype.stateInSelfClosingTag = function (c) {
if (c === CharCodes.Gt) {
this.cbs.onselfclosingtag(this.index);
this.state = State.Text;
this.baseState = State.Text;
this.sectionStart = this.index + 1;
this.isSpecial = false; // Reset special state, in case of self-closing special tags
}
else if (!isWhitespace(c)) {
this.state = State.BeforeAttributeName;
this.stateBeforeAttributeName(c);
}
};
Tokenizer.prototype.stateInAttributeName = function (c) {
if (c === CharCodes.Eq || isEndOfTagSection(c)) {
this.cbs.onattribname(this.sectionStart, this.index);
this.sectionStart = -1;
this.state = State.AfterAttributeName;
this.stateAfterAttributeName(c);
}
};
Tokenizer.prototype.stateAfterAttributeName = function (c) {
if (c === CharCodes.Eq) {
this.state = State.BeforeAttributeValue;
}
else if (c === CharCodes.Slash || c === CharCodes.Gt) {
this.cbs.onattribend(QuoteType.NoValue, this.index);
this.state = State.BeforeAttributeName;
this.stateBeforeAttributeName(c);
}
else if (!isWhitespace(c)) {
this.cbs.onattribend(QuoteType.NoValue, this.index);
this.state = State.InAttributeName;
this.sectionStart = this.index;
}
};
Tokenizer.prototype.stateBeforeAttributeValue = function (c) {
if (c === CharCodes.DoubleQuote) {
this.state = State.InAttributeValueDq;
this.sectionStart = this.index + 1;
}
else if (c === CharCodes.SingleQuote) {
this.state = State.InAttributeValueSq;
this.sectionStart = this.index + 1;
}
else if (!isWhitespace(c)) {
this.sectionStart = this.index;
this.state = State.InAttributeValueNq;
this.stateInAttributeValueNoQuotes(c); // Reconsume token
}
};
Tokenizer.prototype.handleInAttributeValue = function (c, quote) {
if (c === quote ||
(!this.decodeEntities && this.fastForwardTo(quote))) {
this.cbs.onattribdata(this.sectionStart, this.index);
this.sectionStart = -1;
this.cbs.onattribend(quote === CharCodes.DoubleQuote
? QuoteType.Double
: QuoteType.Single, this.index);
this.state = State.BeforeAttributeName;
}
else if (this.decodeEntities && c === CharCodes.Amp) {
this.baseState = this.state;
this.state = State.BeforeEntity;
}
};
Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {
this.handleInAttributeValue(c, CharCodes.DoubleQuote);
};
Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {
this.handleInAttributeValue(c, CharCodes.SingleQuote);
};
Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {
if (isWhitespace(c) || c === CharCodes.Gt) {
this.cbs.onattribdata(this.sectionStart, this.index);
this.sectionStart = -1;
this.cbs.onattribend(QuoteType.Unquoted, this.index);
this.state = State.BeforeAttributeName;
this.stateBeforeAttributeName(c);
}
else if (this.decodeEntities && c === CharCodes.Amp) {
this.baseState = this.state;
this.state = State.BeforeEntity;
}
};
Tokenizer.prototype.stateBeforeDeclaration = function (c) {
if (c === CharCodes.OpeningSquareBracket) {
this.state = State.CDATASequence;
this.sequenceIndex = 0;
}
else {
this.state =
c === CharCodes.Dash
? State.BeforeComment
: State.InDeclaration;
}
};
Tokenizer.prototype.stateInDeclaration = function (c) {
if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
this.cbs.ondeclaration(this.sectionStart, this.index);
this.state = State.Text;
this.sectionStart = this.index + 1;
}
};
Tokenizer.prototype.stateInProcessingInstruction = function (c) {
if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
this.cbs.onprocessinginstruction(this.sectionStart, this.index);
this.state = State.Text;
this.sectionStart = this.index + 1;
}
};
Tokenizer.prototype.stateBeforeComment = function (c) {
if (c === CharCodes.Dash) {
this.state = State.InCommentLike;
this.currentSequence = Sequences.CommentEnd;
// Allow short comments (eg. <!-->)
this.sequenceIndex = 2;
this.sectionStart = this.index + 1;
}
else {
this.state = State.InDeclaration;
}
};
Tokenizer.prototype.stateInSpecialComment = function (c) {
if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
this.cbs.oncomment(this.sectionStart, this.index, 0);
this.state = State.Text;
this.sectionStart = this.index + 1;
}
};
Tokenizer.prototype.stateBeforeSpecialS = function (c) {
var lower = c | 0x20;
if (lower === Sequences.ScriptEnd[3]) {
this.startSpecial(Sequences.ScriptEnd, 4);
}
else if (lower === Sequences.StyleEnd[3]) {
this.startSpecial(Sequences.StyleEnd, 4);
}
else {
this.state = State.InTagName;
this.stateInTagName(c); // Consume the token again
}
};
Tokenizer.prototype.stateBeforeEntity = function (c) {
// Start excess with 1 to include the '&'
this.entityExcess = 1;
this.entityResult = 0;
if (c === CharCodes.Number) {
this.state = State.BeforeNumericEntity;
}
else if (c === CharCodes.Amp) {
// We have two `&` characters in a row. Stay in the current state.
}
else {
this.trieIndex = 0;
this.trieCurrent = this.entityTrie[0];
this.state = State.InNamedEntity;
this.stateInNamedEntity(c);
}
};
Tokenizer.prototype.stateInNamedEntity = function (c) {
this.entityExcess += 1;
this.trieIndex = (0, decode_js_1.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c);
if (this.trieIndex < 0) {
this.emitNamedEntity();
this.index--;
return;
}
this.trieCurrent = this.entityTrie[this.trieIndex];
var masked = this.trieCurrent & decode_js_1.BinTrieFlags.VALUE_LENGTH;
// If the branch is a value, store it and continue
if (masked) {
// The mask is the number of bytes of the value, including the current byte.
var valueLength = (masked >> 14) - 1;
// If we have a legacy entity while parsing strictly, just skip the number of bytes
if (!this.allowLegacyEntity() && c !== CharCodes.Semi) {
this.trieIndex += valueLength;
}
else {
// Add 1 as we have already incremented the excess
var entityStart = this.index - this.entityExcess + 1;
if (entityStart > this.sectionStart) {
this.emitPartial(this.sectionStart, entityStart);
}
// If this is a surrogate pair, consume the next two bytes
this.entityResult = this.trieIndex;
this.trieIndex += valueLength;
this.entityExcess = 0;
this.sectionStart = this.index + 1;
if (valueLength === 0) {
this.emitNamedEntity();
}
}
}
};
Tokenizer.prototype.emitNamedEntity = function () {
this.state = this.baseState;
if (this.entityResult === 0) {
return;
}
var valueLength = (this.entityTrie[this.entityResult] & decode_js_1.BinTrieFlags.VALUE_LENGTH) >>
14;
switch (valueLength) {
case 1: {
this.emitCodePoint(this.entityTrie[this.entityResult] &
~decode_js_1.BinTrieFlags.VALUE_LENGTH);
break;
}
case 2: {
this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
break;
}
case 3: {
this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
this.emitCodePoint(this.entityTrie[this.entityResult + 2]);
}
}
};
Tokenizer.prototype.stateBeforeNumericEntity = function (c) {
if ((c | 0x20) === CharCodes.LowerX) {
this.entityExcess++;
this.state = State.InHexEntity;
}
else {
this.state = State.InNumericEntity;
this.stateInNumericEntity(c);
}
};
Tokenizer.prototype.emitNumericEntity = function (strict) {
var entityStart = this.index - this.entityExcess - 1;
var numberStart = entityStart + 2 + Number(this.state === State.InHexEntity);
if (numberStart !== this.index) {
// Emit leading data if any
if (entityStart > this.sectionStart) {
this.emitPartial(this.sectionStart, entityStart);
}
this.sectionStart = this.index + Number(strict);
this.emitCodePoint((0, decode_js_1.replaceCodePoint)(this.entityResult));
}
this.state = this.baseState;
};
Tokenizer.prototype.stateInNumericEntity = function (c) {
if (c === CharCodes.Semi) {
this.emitNumericEntity(true);
}
else if (isNumber(c)) {
this.entityResult = this.entityResult * 10 + (c - CharCodes.Zero);
this.entityExcess++;
}
else {
if (this.allowLegacyEntity()) {
this.emitNumericEntity(false);
}
else {
this.state = this.baseState;
}
this.index--;
}
};
Tokenizer.prototype.stateInHexEntity = function (c) {
if (c === CharCodes.Semi) {
this.emitNumericEntity(true);
}
else if (isNumber(c)) {
this.entityResult = this.entityResult * 16 + (c - CharCodes.Zero);
this.entityExcess++;
}
else if (isHexDigit(c)) {
this.entityResult =
this.entityResult * 16 + ((c | 0x20) - CharCodes.LowerA + 10);
this.entityExcess++;
}
else {
if (this.allowLegacyEntity()) {
this.emitNumericEntity(false);
}
else {
this.state = this.baseState;
}
this.index--;
}
};
Tokenizer.prototype.allowLegacyEntity = function () {
return (!this.xmlMode &&
(this.baseState === State.Text ||
this.baseState === State.InSpecialTag));
};
/**
* Remove data that has already been consumed from the buffer.
*/
Tokenizer.prototype.cleanup = function () {
// If we are inside of text or attributes, emit what we already have.
if (this.running && this.sectionStart !== this.index) {
if (this.state === State.Text ||
(this.state === State.InSpecialTag && this.sequenceIndex === 0)) {
this.cbs.ontext(this.sectionStart, this.index);
this.sectionStart = this.index;
}
else if (this.state === State.InAttributeValueDq ||
this.state === State.InAttributeValueSq ||
this.state === State.InAttributeValueNq) {
this.cbs.onattribdata(this.sectionStart, this.index);
this.sectionStart = this.index;
}
}
};
Tokenizer.prototype.shouldContinue = function () {
return this.index < this.buffer.length + this.offset && this.running;
};
/**
* Iterates through the buffer, calling the function corresponding to the current state.
*
* States that are more likely to be hit are higher up, as a performance improvement.
*/
Tokenizer.prototype.parse = function () {
while (this.shouldContinue()) {
var c = this.buffer.charCodeAt(this.index - this.offset);
switch (this.state) {
case State.Text: {
this.stateText(c);
break;
}
case State.SpecialStartSequence: {
this.stateSpecialStartSequence(c);
break;
}
case State.InSpecialTag: {
this.stateInSpecialTag(c);
break;
}
case State.CDATASequence: {
this.stateCDATASequence(c);
break;
}
case State.InAttributeValueDq: {
this.stateInAttributeValueDoubleQuotes(c);
break;
}
case State.InAttributeName: {
this.stateInAttributeName(c);
break;
}
case State.InCommentLike: {
this.stateInCommentLike(c);
break;
}
case State.InSpecialComment: {
this.stateInSpecialComment(c);
break;
}
case State.BeforeAttributeName: {
this.stateBeforeAttributeName(c);
break;
}
case State.InTagName: {
this.stateInTagName(c);
break;
}
case State.InClosingTagName: {
this.stateInClosingTagName(c);
break;
}
case State.BeforeTagName: {
this.stateBeforeTagName(c);
break;
}
case State.AfterAttributeName: {
this.stateAfterAttributeName(c);
break;
}
case State.InAttributeValueSq: {
this.stateInAttributeValueSingleQuotes(c);
break;
}
case State.BeforeAttributeValue: {
this.stateBeforeAttributeValue(c);
break;
}
case State.BeforeClosingTagName: {
this.stateBeforeClosingTagName(c);
break;
}
case State.AfterClosingTagName: {
this.stateAfterClosingTagName(c);
break;
}
case State.BeforeSpecialS: {
this.stateBeforeSpecialS(c);
break;
}
case State.InAttributeValueNq: {
this.stateInAttributeValueNoQuotes(c);
break;
}
case State.InSelfClosingTag: {
this.stateInSelfClosingTag(c);
break;
}
case State.InDeclaration: {
this.stateInDeclaration(c);
break;
}
case State.BeforeDeclaration: {
this.stateBeforeDeclaration(c);
break;
}
case State.BeforeComment: {
this.stateBeforeComment(c);
break;
}
case State.InProcessingInstruction: {
this.stateInProcessingInstruction(c);
break;
}
case State.InNamedEntity: {
this.stateInNamedEntity(c);
break;
}
case State.BeforeEntity: {
this.stateBeforeEntity(c);
break;
}
case State.InHexEntity: {
this.stateInHexEntity(c);
break;
}
case State.InNumericEntity: {
this.stateInNumericEntity(c);
break;
}
default: {
// `this._state === State.BeforeNumericEntity`
this.stateBeforeNumericEntity(c);
}
}
this.index++;
}
this.cleanup();
};
Tokenizer.prototype.finish = function () {
if (this.state === State.InNamedEntity) {
this.emitNamedEntity();
}
// If there is remaining data, emit it in a reasonable way
if (this.sectionStart < this.index) {
this.handleTrailingData();
}
this.cbs.onend();
};
/** Handle any trailing data. */
Tokenizer.prototype.handleTrailingData = function () {
var endIndex = this.buffer.length + this.offset;
if (this.state === State.InCommentLike) {
if (this.currentSequence === Sequences.CdataEnd) {
this.cbs.oncdata(this.sectionStart, endIndex, 0);
}
else {
this.cbs.oncomment(this.sectionStart, endIndex, 0);
}
}
else if (this.state === State.InNumericEntity &&
this.allowLegacyEntity()) {
this.emitNumericEntity(false);
// All trailing data will have been consumed
}
else if (this.state === State.InHexEntity &&
this.allowLegacyEntity()) {
this.emitNumericEntity(false);
// All trailing data will have been consumed
}
else if (this.state === State.InTagName ||
this.state === State.BeforeAttributeName ||
this.state === State.BeforeAttributeValue ||
this.state === State.AfterAttributeName ||
this.state === State.InAttributeName ||
this.state === State.InAttributeValueSq ||
this.state === State.InAttributeValueDq ||
this.state === State.InAttributeValueNq ||
this.state === State.InClosingTagName) {
/*
* If we are currently in an opening or closing tag, us not calling the
* respective callback signals that the tag should be ignored.
*/
}
else {
this.cbs.ontext(this.sectionStart, endIndex);
}
};
Tokenizer.prototype.emitPartial = function (start, endIndex) {
if (this.baseState !== State.Text &&
this.baseState !== State.InSpecialTag) {
this.cbs.onattribdata(start, endIndex);
}
else {
this.cbs.ontext(start, endIndex);
}
};
Tokenizer.prototype.emitCodePoint = function (cp) {
if (this.baseState !== State.Text &&
this.baseState !== State.InSpecialTag) {
this.cbs.onattribentity(cp);
}
else {
this.cbs.ontextentity(cp);
}
};
return Tokenizer;
}());
exports.default = Tokenizer;
//# sourceMappingURL=Tokenizer.js.map

View File

@@ -0,0 +1,33 @@
import type { BaseTransportOptions, OfflineTransportOptions, Transport } from '@sentry/core';
type Store = <T>(callback: (store: IDBObjectStore) => T | PromiseLike<T>) => Promise<T>;
/** Create or open an IndexedDb store */
export declare function createStore(dbName: string, storeName: string): Store;
/** Insert into the end of the store */
export declare function push(store: Store, value: Uint8Array | string, maxQueueSize: number): Promise<void>;
/** Insert into the front of the store */
export declare function unshift(store: Store, value: Uint8Array | string, maxQueueSize: number): Promise<void>;
/** Pop the oldest value from the store */
export declare function shift(store: Store): Promise<Uint8Array | string | undefined>;
export interface BrowserOfflineTransportOptions extends Omit<OfflineTransportOptions, 'createStore'> {
/**
* Name of indexedDb database to store envelopes in
* Default: 'sentry-offline'
*/
dbName?: string;
/**
* Name of indexedDb object store to store envelopes in
* Default: 'queue'
*/
storeName?: string;
/**
* Maximum number of envelopes to store
* Default: 30
*/
maxQueueSize?: number;
}
/**
* Creates a transport that uses IndexedDb to store events when offline.
*/
export declare function makeBrowserOfflineTransport<T extends BaseTransportOptions>(createTransport?: (options: T) => Transport): (options: T & BrowserOfflineTransportOptions) => Transport;
export {};
//# sourceMappingURL=offline.d.ts.map

View File

@@ -0,0 +1,4 @@
import React from 'react';
import { ModalProps } from '../Modal/index.js';
export declare const itemBaseClass = "modal-item";
export declare const asModal: <P extends ModalProps>(ModalComponent: React.FC<P>, slugFromArg?: string) => React.FC<P>;

View File

@@ -0,0 +1,28 @@
import type { BuildFormStateArgs, ClientConfig, ClientUser, ErrorResult, FormState, ServerFunction } from 'payload';
export type LockedState = {
isLocked: boolean;
lastEditedAt: string;
user?: ClientUser | number | string;
};
type BuildFormStateSuccessResult = {
clientConfig?: ClientConfig;
errors?: never;
indexPath?: string;
livePreviewURL?: string;
lockedState?: LockedState;
previewURL?: string;
state: FormState;
};
type BuildFormStateErrorResult = {
livePreviewURL?: never;
lockedState?: never;
previewURL?: never;
state?: never;
} & ({
message: string;
} | ErrorResult);
export type BuildFormStateResult = BuildFormStateErrorResult | BuildFormStateSuccessResult;
export declare const buildFormStateHandler: ServerFunction<BuildFormStateArgs, Promise<BuildFormStateResult>>;
export declare const buildFormState: (args: BuildFormStateArgs) => Promise<BuildFormStateSuccessResult>;
export {};
//# sourceMappingURL=buildFormState.d.ts.map

View File

@@ -0,0 +1,45 @@
import { setWeek } from "../../../setWeek.mjs";
import { startOfWeek } from "../../../startOfWeek.mjs";
import { numericPatterns } from "../constants.mjs";
import { Parser } from "../Parser.mjs";
import { parseNDigits, parseNumericPattern } from "../utils.mjs";
// Local week of year
export class LocalWeekParser extends Parser {
priority = 100;
parse(dateString, token, match) {
switch (token) {
case "w":
return parseNumericPattern(numericPatterns.week, dateString);
case "wo":
return match.ordinalNumber(dateString, { unit: "week" });
default:
return parseNDigits(token.length, dateString);
}
}
validate(_date, value) {
return value >= 1 && value <= 53;
}
set(date, _flags, value, options) {
return startOfWeek(setWeek(date, value, options), options);
}
incompatibleTokens = [
"y",
"R",
"u",
"q",
"Q",
"M",
"L",
"I",
"d",
"D",
"i",
"t",
"T",
];
}

View File

@@ -0,0 +1,29 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const AsyncDependenciesBlock = require("../AsyncDependenciesBlock");
const makeSerializable = require("../util/makeSerializable");
/** @typedef {import("../AsyncDependenciesBlock").GroupOptions} GroupOptions */
/** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */
class RequireEnsureDependenciesBlock extends AsyncDependenciesBlock {
/**
* @param {GroupOptions | null} chunkName chunk name
* @param {(DependencyLocation | null)=} loc location info
*/
constructor(chunkName, loc) {
super(chunkName, loc, null);
}
}
makeSerializable(
RequireEnsureDependenciesBlock,
"webpack/lib/dependencies/RequireEnsureDependenciesBlock"
);
module.exports = RequireEnsureDependenciesBlock;

View File

@@ -0,0 +1,17 @@
export type MinimizedResult = import("./index.js").MinimizedResult;
export type CustomOptions = import("./index.js").CustomOptions;
/** @typedef {import("./index.js").MinimizedResult} MinimizedResult */
/** @typedef {import("./index.js").CustomOptions} CustomOptions */
/**
* @template T
* @param {import("./index.js").InternalOptions<T>} options options
* @returns {Promise<MinimizedResult>} minified result
*/
export function minify<T>(
options: import("./index.js").InternalOptions<T>,
): Promise<MinimizedResult>;
/**
* @param {string} options options
* @returns {Promise<MinimizedResult>} minified result
*/
export function transform(options: string): Promise<MinimizedResult>;

View File

@@ -0,0 +1,65 @@
/**
* 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 type { LexicalNode, Spread } from 'lexical';
import { ListItemNode, ListNode } from './';
/**
* Checks the depth of listNode from the root node.
* @param listNode - The ListNode to be checked.
* @returns The depth of the ListNode.
*/
export declare function $getListDepth(listNode: ListNode): number;
/**
* Finds the nearest ancestral ListNode and returns it, throws an invariant if listItem is not a ListItemNode.
* @param listItem - The node to be checked.
* @returns The ListNode found.
*/
export declare function $getTopListNode(listItem: LexicalNode): ListNode;
/**
* Checks if listItem has no child ListNodes and has no ListItemNode ancestors with siblings.
* @param listItem - the ListItemNode to be checked.
* @returns true if listItem has no child ListNode and no ListItemNode ancestors with siblings, false otherwise.
*/
export declare function $isLastItemInList(listItem: ListItemNode): boolean;
/**
* A recursive Depth-First Search (Postorder Traversal) that finds all of a node's children
* that are of type ListItemNode and returns them in an array.
* @param node - The ListNode to start the search.
* @returns An array containing all nodes of type ListItemNode found.
*/
export declare function $getAllListItems(node: ListNode): Array<ListItemNode>;
declare const NestedListNodeBrand: unique symbol;
/**
* Checks to see if the passed node is a ListItemNode and has a ListNode as a child.
* @param node - The node to be checked.
* @returns true if the node is a ListItemNode and has a ListNode child, false otherwise.
*/
export declare function isNestedListNode(node: LexicalNode | null | undefined): node is Spread<{
getFirstChild(): ListNode;
[NestedListNodeBrand]: never;
}, ListItemNode>;
/**
* Traverses up the tree and returns the first ListItemNode found.
* @param node - Node to start the search.
* @returns The first ListItemNode found, or null if none exist.
*/
export declare function $findNearestListItemNode(node: LexicalNode): ListItemNode | null;
/**
* Takes a deeply nested ListNode or ListItemNode and traverses up the branch to delete the first
* ancestral ListNode (which could be the root ListNode) or ListItemNode with siblings, essentially
* bringing the deeply nested node up the branch once. Would remove sublist if it has siblings.
* Should not break ListItem -> List -> ListItem chain as empty List/ItemNodes should be removed on .remove().
* @param sublist - The nested ListNode or ListItemNode to be brought up the branch.
*/
export declare function $removeHighestEmptyListParent(sublist: ListItemNode | ListNode): void;
/**
* Wraps a node into a ListItemNode.
* @param node - The node to be wrapped into a ListItemNode
* @returns The ListItemNode which the passed node is wrapped in.
*/
export declare function $wrapInListItem(node: LexicalNode): ListItemNode;
export {};

View File

@@ -0,0 +1,39 @@
import type { ClientCollectionConfig, ListQuery, PaginatedDocs, Sort, Where } from 'payload';
type ContextHandlers = {
handlePageChange?: (page: number) => Promise<void>;
handlePerPageChange?: (limit: number) => Promise<void>;
handleSearchChange?: (search: string) => Promise<void>;
handleSortChange?: (sort: string) => Promise<void>;
handleWhereChange?: (where: Where) => Promise<void>;
};
export type OnListQueryChange = (query: ListQuery) => void;
export type ListQueryProps = {
readonly children: React.ReactNode;
readonly collectionSlug?: ClientCollectionConfig['slug'];
readonly data: PaginatedDocs | undefined;
readonly modifySearchParams?: boolean;
readonly onQueryChange?: OnListQueryChange;
readonly orderableFieldName?: string;
/**
* @deprecated
*/
readonly preferenceKey?: string;
readonly query?: ListQuery;
};
export type IListQueryContext = {
collectionSlug: ClientCollectionConfig['slug'];
data: ListQueryProps['data'];
defaultLimit?: number;
defaultSort?: Sort;
/**
* @experimental This prop is subject to change. Use at your own risk.
*/
isGroupingBy: boolean;
modified: boolean;
orderableFieldName?: string;
query: ListQuery;
refineListData: (args: ListQuery, setModified?: boolean) => Promise<void>;
setModified: (modified: boolean) => void;
} & ContextHandlers;
export {};
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,15 @@
import { blob } from "./blob.js";
import { customType } from "./custom.js";
import { integer } from "./integer.js";
import { numeric } from "./numeric.js";
import { real } from "./real.js";
import { text } from "./text.js";
export declare function getSQLiteColumnBuilders(): {
blob: typeof blob;
customType: typeof customType;
integer: typeof integer;
numeric: typeof numeric;
real: typeof real;
text: typeof text;
};
export type SQLiteColumnBuilders = ReturnType<typeof getSQLiteColumnBuilders>;

View File

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

View File

@@ -0,0 +1,42 @@
/**
* 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 } from '@lexical/react/LexicalComposerContext';
import { INSERT_HORIZONTAL_RULE_COMMAND, $createHorizontalRuleNode } from '@lexical/react/LexicalHorizontalRuleNode';
import { $insertNodeToNearestRoot } from '@lexical/utils';
import { $getSelection, $isRangeSelection, COMMAND_PRIORITY_EDITOR } from 'lexical';
import { useEffect } from 'react';
/**
* 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.
*
*/
function HorizontalRulePlugin() {
const [editor] = useLexicalComposerContext();
useEffect(() => {
return editor.registerCommand(INSERT_HORIZONTAL_RULE_COMMAND, type => {
const selection = $getSelection();
if (!$isRangeSelection(selection)) {
return false;
}
const focusNode = selection.focus.getNode();
if (focusNode !== null) {
const horizontalRuleNode = $createHorizontalRuleNode();
$insertNodeToNearestRoot(horizontalRuleNode);
}
return true;
}, COMMAND_PRIORITY_EDITOR);
}, [editor]);
return null;
}
export { HorizontalRulePlugin };

View File

@@ -0,0 +1 @@
{"version":3,"file":"schedulePublishHandler.d.ts","sourceRoot":"","sources":["../../src/utilities/schedulePublishHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,wBAAwB,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAA;AAE5F,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,CAAC,EAAE,IAAI,CAAA;IACX;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,IAAI,CAAC,wBAAwB,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAA;AAE7D,eAAO,MAAM,sBAAsB,EAAE,cAAc,CAAC,0BAA0B,CAuD7E,CAAA"}

View File

@@ -0,0 +1,3 @@
import type { MigrationConfig } from "../migrator.cjs";
import type { SingleStoreDriverDatabase } from "./driver.cjs";
export declare function migrate<TSchema extends Record<string, unknown>>(db: SingleStoreDriverDatabase<TSchema>, config: MigrationConfig): Promise<void>;

View File

@@ -0,0 +1,50 @@
{
"name": "@babel/parser",
"version": "7.29.0",
"description": "A JavaScript parser",
"author": "The Babel Team (https://babel.dev/team)",
"homepage": "https://babel.dev/docs/en/next/babel-parser",
"bugs": "https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A+parser+%28babylon%29%22+is%3Aopen",
"license": "MIT",
"publishConfig": {
"access": "public"
},
"keywords": [
"babel",
"javascript",
"parser",
"tc39",
"ecmascript",
"@babel/parser"
],
"repository": {
"type": "git",
"url": "https://github.com/babel/babel.git",
"directory": "packages/babel-parser"
},
"main": "./lib/index.js",
"types": "./typings/babel-parser.d.ts",
"files": [
"bin",
"lib",
"typings/babel-parser.d.ts",
"index.cjs"
],
"engines": {
"node": ">=6.0.0"
},
"# dependencies": "This package doesn't actually have runtime dependencies. @babel/types is only needed for type definitions.",
"dependencies": {
"@babel/types": "^7.29.0"
},
"devDependencies": {
"@babel/code-frame": "^7.29.0",
"@babel/helper-check-duplicate-nodes": "^7.28.6",
"@babel/helper-fixtures": "^7.28.6",
"@babel/helper-string-parser": "^7.27.1",
"@babel/helper-validator-identifier": "^7.28.5",
"charcodes": "^0.2.0"
},
"bin": "./bin/babel-parser.js",
"type": "commonjs"
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/sqlite/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAWnC,eAAO,MAAM,IAAI,EAAE,IAiClB,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/proxy/helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,aAAa,GAAG;IACjD,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;CAC7C,CAAC;AAEF,wBAAsB,QAAQ,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE;AAGD,wBAAsB,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAUzD;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,IAAI,GAAE,KAAK,CAAC,cAAmB,GAAG,eAAe,CAQvF"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/email/consoleEmailAdapter.ts"],"sourcesContent":["import type { EmailAdapter } from './types.js'\n\nimport { emailDefaults } from './defaults.js'\nimport { getStringifiedToAddress } from './getStringifiedToAddress.js'\n\nexport const consoleEmailAdapter: EmailAdapter<void> = ({ payload }) => ({\n name: 'console',\n defaultFromAddress: emailDefaults.defaultFromAddress,\n defaultFromName: emailDefaults.defaultFromName,\n sendEmail: async (message) => {\n const stringifiedTo = getStringifiedToAddress(message)\n const res = `Email attempted without being configured. To: '${stringifiedTo}', Subject: '${message.subject}'`\n payload.logger.info({ msg: res })\n return Promise.resolve()\n },\n})\n"],"names":["emailDefaults","getStringifiedToAddress","consoleEmailAdapter","payload","name","defaultFromAddress","defaultFromName","sendEmail","message","stringifiedTo","res","subject","logger","info","msg","Promise","resolve"],"mappings":"AAEA,SAASA,aAAa,QAAQ,gBAAe;AAC7C,SAASC,uBAAuB,QAAQ,+BAA8B;AAEtE,OAAO,MAAMC,sBAA0C,CAAC,EAAEC,OAAO,EAAE,GAAM,CAAA;QACvEC,MAAM;QACNC,oBAAoBL,cAAcK,kBAAkB;QACpDC,iBAAiBN,cAAcM,eAAe;QAC9CC,WAAW,OAAOC;YAChB,MAAMC,gBAAgBR,wBAAwBO;YAC9C,MAAME,MAAM,CAAC,+CAA+C,EAAED,cAAc,aAAa,EAAED,QAAQG,OAAO,CAAC,CAAC,CAAC;YAC7GR,QAAQS,MAAM,CAACC,IAAI,CAAC;gBAAEC,KAAKJ;YAAI;YAC/B,OAAOK,QAAQC,OAAO;QACxB;IACF,CAAA,EAAE"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"ClipboardActionLabel.d.ts","sourceRoot":"","sources":["../../../src/elements/ClipboardAction/ClipboardActionLabel.tsx"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,wBAG9B;IACD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,gCAiBA,CAAA"}

View File

@@ -0,0 +1,4 @@
export {
useInsertionEffectAlwaysWithSyncFallback,
useInsertionEffectWithLayoutFallback
} from "./emotion-use-insertion-effect-with-fallbacks.browser.cjs.js";

View File

@@ -0,0 +1 @@
{"version":3,"file":"useClickOutside.d.ts","sourceRoot":"","sources":["../../src/hooks/useClickOutside.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAC7B,GAAG,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,EACjC,OAAO,EAAE,MAAM,IAAI,EACnB,OAAO,UAAO,QAaf"}

View File

@@ -0,0 +1,33 @@
import './index.scss';
import React from 'react';
export declare const baseClass = "version-drawer";
export declare const formatVersionDrawerSlug: ({ depth, uuid, }: {
depth: number;
uuid: string;
}) => string;
export declare const VersionDrawerContent: React.FC<{
collectionSlug?: string;
docID?: number | string;
drawerSlug: string;
globalSlug?: string;
}>;
export declare const VersionDrawer: React.FC<{
collectionSlug?: string;
docID?: number | string;
drawerSlug: string;
globalSlug?: string;
}>;
export declare const useVersionDrawer: ({ collectionSlug, docID, globalSlug, }: {
collectionSlug?: string;
docID?: number | string;
globalSlug?: string;
}) => {
closeDrawer: () => void;
Drawer: () => React.JSX.Element;
drawerDepth: number;
drawerSlug: string;
isDrawerOpen: boolean;
openDrawer: () => void;
toggleDrawer: () => void;
};
//# sourceMappingURL=index.d.ts.map

View File

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

View File

@@ -0,0 +1,2 @@
export declare const generateFieldID: (path: string, editDepth: number, uuid: string) => string;
//# sourceMappingURL=generateFieldID.d.ts.map

View File

@@ -0,0 +1,41 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
// DIN 5008: https://de.wikipedia.org/wiki/Datumsformat#DIN_5008
const dateFormats = {
full: "EEEE, do MMMM y", // Méindeg, 7. Januar 2018
long: "do MMMM y", // 7. Januar 2018
medium: "do MMM y", // 7. Jan 2018
short: "dd.MM.yy", // 07.01.18
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'um' {{time}}",
long: "{{date}} 'um' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};

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

View File

@@ -0,0 +1,45 @@
var arrayMap = require('./_arrayMap'),
baseIntersection = require('./_baseIntersection'),
baseIteratee = require('./_baseIteratee'),
baseRest = require('./_baseRest'),
castArrayLikeObject = require('./_castArrayLikeObject'),
last = require('./last');
/**
* This method is like `_.intersection` except that it accepts `iteratee`
* which is invoked for each element of each `arrays` to generate the criterion
* by which they're compared. The order and references of result values are
* determined by the first array. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
* // => [2.1]
*
* // The `_.property` iteratee shorthand.
* _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }]
*/
var intersectionBy = baseRest(function(arrays) {
var iteratee = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
if (iteratee === last(mapped)) {
iteratee = undefined;
} else {
mapped.pop();
}
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, baseIteratee(iteratee, 2))
: [];
});
module.exports = intersectionBy;

View File

@@ -0,0 +1 @@
!function(t){var n={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},e={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function a(t,a){var r={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var o in a)r[o]=a[o];return r.tag={pattern:/([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},r.variable=e,r.comment=n,{pattern:RegExp("^ ?\\*{3}[ \t]*<name>[ \t]*\\*{3}(?:.|[\r\n](?!\\*{3}))*".replace(/<name>/g,(function(){return t})),"im"),alias:"section",inside:r}}var r={pattern:/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},o={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:e}},i={pattern:/([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:e}};t.languages.robotframework={settings:a("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:a("Variables"),"test-cases":a("Test Cases",{"test-name":o,documentation:r,property:i}),keywords:a("Keywords",{"keyword-name":o,documentation:r,property:i}),tasks:a("Tasks",{"task-name":o,documentation:r,property:i}),comment:n},t.languages.robot=t.languages.robotframework}(Prism);

View File

@@ -0,0 +1,24 @@
import { FeedbackModalIntegration, Integration, IntegrationFn } from '@sentry/core';
import { ActorComponent } from './components/Actor';
import { OverrideFeedbackConfiguration } from './types';
type Unsubscribe = () => void;
/**
* Allow users to capture user feedback and send it to Sentry.
*/
type BuilderOptions = {
lazyLoadIntegration?: never;
getModalIntegration: () => IntegrationFn;
getScreenshotIntegration: () => IntegrationFn;
} | {
lazyLoadIntegration: (name: 'feedbackModalIntegration' | 'feedbackScreenshotIntegration', scriptNonce?: string) => Promise<IntegrationFn>;
getModalIntegration?: never;
getScreenshotIntegration?: never;
};
export declare const buildFeedbackIntegration: ({ lazyLoadIntegration, getModalIntegration, getScreenshotIntegration, }: BuilderOptions) => IntegrationFn<Integration & {
attachTo(el: Element | string, optionOverrides?: OverrideFeedbackConfiguration): Unsubscribe;
createForm(optionOverrides?: OverrideFeedbackConfiguration): Promise<ReturnType<FeedbackModalIntegration["createDialog"]>>;
createWidget(optionOverrides?: OverrideFeedbackConfiguration): ActorComponent;
remove(): void;
}>;
export {};
//# sourceMappingURL=integration.d.ts.map

View File

@@ -0,0 +1,115 @@
import * as util from "../core/util.js";
const error = () => {
const Sizable = {
string: { unit: "文字", verb: "である" },
file: { unit: "バイト", verb: "である" },
array: { unit: "要素", verb: "である" },
set: { unit: "要素", verb: "である" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "数値";
}
case "object": {
if (Array.isArray(data)) {
return "配列";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "入力値",
email: "メールアドレス",
url: "URL",
emoji: "絵文字",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO日時",
date: "ISO日付",
time: "ISO時刻",
duration: "ISO期間",
ipv4: "IPv4アドレス",
ipv6: "IPv6アドレス",
cidrv4: "IPv4範囲",
cidrv6: "IPv6範囲",
base64: "base64エンコード文字列",
base64url: "base64urlエンコード文字列",
json_string: "JSON文字列",
e164: "E.164番号",
jwt: "JWT",
template_literal: "入力値",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `無効な入力: ${issue.expected}が期待されましたが、${parsedType(issue.input)}が入力されました`;
case "invalid_value":
if (issue.values.length === 1)
return `無効な入力: ${util.stringifyPrimitive(issue.values[0])}が期待されました`;
return `無効な選択: ${util.joinValues(issue.values, "、")}のいずれかである必要があります`;
case "too_big": {
const adj = issue.inclusive ? "以下である" : "より小さい";
const sizing = getSizing(issue.origin);
if (sizing)
return `大きすぎる値: ${issue.origin ?? "値"}は${issue.maximum.toString()}${sizing.unit ?? "要素"}${adj}必要があります`;
return `大きすぎる値: ${issue.origin ?? "値"}は${issue.maximum.toString()}${adj}必要があります`;
}
case "too_small": {
const adj = issue.inclusive ? "以上である" : "より大きい";
const sizing = getSizing(issue.origin);
if (sizing)
return `小さすぎる値: ${issue.origin}は${issue.minimum.toString()}${sizing.unit}${adj}必要があります`;
return `小さすぎる値: ${issue.origin}は${issue.minimum.toString()}${adj}必要があります`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `無効な文字列: "${_issue.prefix}"で始まる必要があります`;
if (_issue.format === "ends_with")
return `無効な文字列: "${_issue.suffix}"で終わる必要があります`;
if (_issue.format === "includes")
return `無効な文字列: "${_issue.includes}"を含む必要があります`;
if (_issue.format === "regex")
return `無効な文字列: パターン${_issue.pattern}に一致する必要があります`;
return `無効な${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `無効な数値: ${issue.divisor}の倍数である必要があります`;
case "unrecognized_keys":
return `認識されていないキー${issue.keys.length > 1 ? "群" : ""}: ${util.joinValues(issue.keys, "、")}`;
case "invalid_key":
return `${issue.origin}内の無効なキー`;
case "invalid_union":
return "無効な入力";
case "invalid_element":
return `${issue.origin}内の無効な値`;
default:
return `無効な入力`;
}
};
};
export default function () {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"ferris-wheel.js","sources":["../../../src/icons/ferris-wheel.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FerrisWheel\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIyIiAvPgogIDxwYXRoIGQ9Ik0xMiAydjQiIC8+CiAgPHBhdGggZD0ibTYuOCAxNS0zLjUgMiIgLz4KICA8cGF0aCBkPSJtMjAuNyA3LTMuNSAyIiAvPgogIDxwYXRoIGQ9Ik02LjggOSAzLjMgNyIgLz4KICA8cGF0aCBkPSJtMjAuNyAxNy0zLjUtMiIgLz4KICA8cGF0aCBkPSJtOSAyMiAzLTggMyA4IiAvPgogIDxwYXRoIGQ9Ik04IDIyaDgiIC8+CiAgPHBhdGggZD0iTTE4IDE4LjdhOSA5IDAgMSAwLTEyIDAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/ferris-wheel\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 FerrisWheel = createLucideIcon('FerrisWheel', [\n ['circle', { cx: '12', cy: '12', r: '2', key: '1c9p78' }],\n ['path', { d: 'M12 2v4', key: '3427ic' }],\n ['path', { d: 'm6.8 15-3.5 2', key: 'hjy98k' }],\n ['path', { d: 'm20.7 7-3.5 2', key: 'f08gto' }],\n ['path', { d: 'M6.8 9 3.3 7', key: '1aevh4' }],\n ['path', { d: 'm20.7 17-3.5-2', key: '1liqo3' }],\n ['path', { d: 'm9 22 3-8 3 8', key: 'wees03' }],\n ['path', { d: 'M8 22h8', key: 'rmew8v' }],\n ['path', { d: 'M18 18.7a9 9 0 1 0-12 0', key: 'dhzg4g' }],\n]);\n\nexport default FerrisWheel;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAClD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACxD,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,CAAiB,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,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,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,CAC9C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,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,CAC7C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAiB,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,CAC9C,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,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Mouse = createLucideIcon("Mouse", [
["rect", { x: "5", y: "2", width: "14", height: "20", rx: "7", key: "11ol66" }],
["path", { d: "M12 6v4", key: "16clxf" }]
]);
export { Mouse as default };
//# sourceMappingURL=mouse.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["isReactServerComponentOrFunction","serverProps","React","withMergedProps","Component","sanitizeServerOnlyProps","toMergeIntoProps","undefined","MergedPropsComponent","passedProps","mergedProps","simpleMergeProps","forEach","prop","_jsx","props","toMerge"],"sources":["../../../src/elements/withMergedProps/index.tsx"],"sourcesContent":["import { isReactServerComponentOrFunction, serverProps } from 'payload/shared'\nimport React from 'react'\n\n/**\n * Creates a higher-order component (HOC) that merges predefined properties (`toMergeIntoProps`)\n * with any properties passed to the resulting component.\n *\n * Use this when you want to pre-specify some props for a component, while also allowing users to\n * pass in their own props. The HOC ensures the passed props and predefined props are combined before\n * rendering the original component.\n *\n * @example\n * const PredefinedComponent = getMergedPropsComponent({\n * Component: OriginalComponent,\n * toMergeIntoProps: { someExtraValue: 5 }\n * });\n * // Using <PredefinedComponent customProp=\"value\" /> will result in\n * // <OriginalComponent customProp=\"value\" someExtraValue={5} />\n *\n * @returns A higher-order component with combined properties.\n *\n * @param Component - The original component to wrap.\n * @param sanitizeServerOnlyProps - If true, server-only props will be removed from the merged props. @default true if the component is not a server component, false otherwise.\n * @param toMergeIntoProps - The properties to merge into the passed props.\n */\nexport function withMergedProps<ToMergeIntoProps, CompleteReturnProps>({\n Component,\n sanitizeServerOnlyProps,\n toMergeIntoProps,\n}: {\n Component: React.FC<CompleteReturnProps>\n sanitizeServerOnlyProps?: boolean\n toMergeIntoProps: ToMergeIntoProps\n}): React.FC<CompleteReturnProps> {\n if (sanitizeServerOnlyProps === undefined) {\n sanitizeServerOnlyProps = !isReactServerComponentOrFunction(Component)\n }\n // A wrapper around the args.Component to inject the args.toMergeArgs as props, which are merged with the passed props\n const MergedPropsComponent: React.FC<CompleteReturnProps> = (passedProps) => {\n const mergedProps = simpleMergeProps(passedProps, toMergeIntoProps) as CompleteReturnProps\n\n if (sanitizeServerOnlyProps) {\n serverProps.forEach((prop) => {\n delete mergedProps[prop]\n })\n }\n\n return <Component {...mergedProps} />\n }\n\n return MergedPropsComponent\n}\n\nfunction simpleMergeProps(props, toMerge) {\n return { ...props, ...toMerge }\n}\n"],"mappings":";AAAA,SAASA,gCAAgC,EAAEC,WAAW,QAAQ;AAC9D,OAAOC,KAAA,MAAW;AAElB;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,SAASC,gBAAuD;EACrEC,SAAS;EACTC,uBAAuB;EACvBC;AAAgB,CAKjB;EACC,IAAID,uBAAA,KAA4BE,SAAA,EAAW;IACzCF,uBAAA,GAA0B,CAACL,gCAAA,CAAiCI,SAAA;EAC9D;EACA;EACA,MAAMI,oBAAA,GAAuDC,WAAA;IAC3D,MAAMC,WAAA,GAAcC,gBAAA,CAAiBF,WAAA,EAAaH,gBAAA;IAElD,IAAID,uBAAA,EAAyB;MAC3BJ,WAAA,CAAYW,OAAO,CAAEC,IAAA;QACnB,OAAOH,WAAW,CAACG,IAAA,CAAK;MAC1B;IACF;IAEA,oBAAOC,IAAA,CAACV,SAAA;MAAW,GAAGM;;EACxB;EAEA,OAAOF,oBAAA;AACT;AAEA,SAASG,iBAAiBI,KAAK,EAAEC,OAAO;EACtC,OAAO;IAAE,GAAGD,KAAK;IAAE,GAAGC;EAAQ;AAChC","ignoreList":[]}

View File

@@ -0,0 +1,29 @@
var createWrap = require('./_createWrap');
/** Used to compose bitmasks for function metadata. */
var WRAP_ARY_FLAG = 128;
/**
* Creates a function that invokes `func`, with up to `n` arguments,
* ignoring any additional arguments.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} func The function to cap arguments for.
* @param {number} [n=func.length] The arity cap.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the new capped function.
* @example
*
* _.map(['6', '8', '10'], _.ary(parseInt, 1));
* // => [6, 8, 10]
*/
function ary(func, n, guard) {
n = guard ? undefined : n;
n = (func && n == null) ? func.length : n;
return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
}
module.exports = ary;

View File

@@ -0,0 +1,3 @@
import { GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
export declare const GraphQLSafeIntConfig: GraphQLScalarTypeConfig<string | number, number>;
export declare const GraphQLSafeInt: GraphQLScalarType<string | number, number>;

View File

@@ -0,0 +1,151 @@
# find-up [![Build Status](https://travis-ci.com/sindresorhus/find-up.svg?branch=master)](https://travis-ci.com/github/sindresorhus/find-up)
> Find a file or directory by walking up parent directories
## Install
```
$ npm install find-up
```
## Usage
```
/
└── Users
└── sindresorhus
├── unicorn.png
└── foo
└── bar
├── baz
└── example.js
```
`example.js`
```js
const path = require('path');
const findUp = require('find-up');
(async () => {
console.log(await findUp('unicorn.png'));
//=> '/Users/sindresorhus/unicorn.png'
console.log(await findUp(['rainbow.png', 'unicorn.png']));
//=> '/Users/sindresorhus/unicorn.png'
console.log(await findUp(async directory => {
const hasUnicorns = await findUp.exists(path.join(directory, 'unicorn.png'));
return hasUnicorns && directory;
}, {type: 'directory'}));
//=> '/Users/sindresorhus'
})();
```
## API
### findUp(name, options?)
### findUp(matcher, options?)
Returns a `Promise` for either the path or `undefined` if it couldn't be found.
### findUp([...name], options?)
Returns a `Promise` for either the first path found (by respecting the order of the array) or `undefined` if none could be found.
### findUp.sync(name, options?)
### findUp.sync(matcher, options?)
Returns a path or `undefined` if it couldn't be found.
### findUp.sync([...name], options?)
Returns the first path found (by respecting the order of the array) or `undefined` if none could be found.
#### name
Type: `string`
Name of the file or directory to find.
#### matcher
Type: `Function`
A function that will be called with each directory until it returns a `string` with the path, which stops the search, or the root directory has been reached and nothing was found. Useful if you want to match files with certain patterns, set of permissions, or other advanced use-cases.
When using async mode, the `matcher` may optionally be an async or promise-returning function that returns the path.
#### options
Type: `object`
##### cwd
Type: `string`\
Default: `process.cwd()`
Directory to start from.
##### type
Type: `string`\
Default: `'file'`\
Values: `'file'` `'directory'`
The type of paths that can match.
##### allowSymlinks
Type: `boolean`\
Default: `true`
Allow symbolic links to match if they point to the chosen path type.
### findUp.exists(path)
Returns a `Promise<boolean>` of whether the path exists.
### findUp.sync.exists(path)
Returns a `boolean` of whether the path exists.
#### path
Type: `string`
Path to a file or directory.
### findUp.stop
A [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) that can be returned by a `matcher` function to stop the search and cause `findUp` to immediately return `undefined`. Useful as a performance optimization in case the current working directory is deeply nested in the filesystem.
```js
const path = require('path');
const findUp = require('find-up');
(async () => {
await findUp(directory => {
return path.basename(directory) === 'work' ? findUp.stop : 'logo.png';
});
})();
```
## Related
- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path
---
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-find-up?utm_source=npm-find-up&utm_medium=referral&utm_campaign=readme">Get professional support for 'find-up' with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>

View File

@@ -0,0 +1,2 @@
export { ro } from '@payloadcms/translations/languages/ro';
//# sourceMappingURL=ro.d.ts.map

View File

@@ -0,0 +1,42 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const makeSerializable = require("../util/makeSerializable");
const ModuleDependency = require("./ModuleDependency");
const ModuleDependencyTemplateAsId = require("./ModuleDependencyTemplateAsId");
/** @typedef {import("../javascript/JavascriptParser").Range} Range */
class CommonJsRequireDependency extends ModuleDependency {
/**
* @param {string} request request
* @param {Range=} range location in source code
* @param {string=} context request context
*/
constructor(request, range, context) {
super(request);
this.range = range;
this._context = context;
}
get type() {
return "cjs require";
}
get category() {
return "commonjs";
}
}
CommonJsRequireDependency.Template = ModuleDependencyTemplateAsId;
makeSerializable(
CommonJsRequireDependency,
"webpack/lib/dependencies/CommonJsRequireDependency"
);
module.exports = CommonJsRequireDependency;

View File

@@ -0,0 +1 @@
{"version":3,"file":"combineQueries.d.ts","sourceRoot":"","sources":["../../src/database/combineQueries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAI9C;;GAEG;AACH,eAAO,MAAM,cAAc,UAAW,KAAK,UAAU,OAAO,GAAG,KAAK,KAAG,KActE,CAAA"}

View File

@@ -0,0 +1,41 @@
var apply = require('./_apply'),
baseEach = require('./_baseEach'),
baseInvoke = require('./_baseInvoke'),
baseRest = require('./_baseRest'),
isArrayLike = require('./isArrayLike');
/**
* Invokes the method at `path` of each element in `collection`, returning
* an array of the results of each invoked method. Any additional arguments
* are provided to each invoked method. If `path` is a function, it's invoked
* for, and `this` bound to, each element in `collection`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Array|Function|string} path The path of the method to invoke or
* the function invoked per iteration.
* @param {...*} [args] The arguments to invoke each method with.
* @returns {Array} Returns the array of results.
* @example
*
* _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
* // => [[1, 5, 7], [1, 2, 3]]
*
* _.invokeMap([123, 456], String.prototype.split, '');
* // => [['1', '2', '3'], ['4', '5', '6']]
*/
var invokeMap = baseRest(function(collection, path, args) {
var index = -1,
isFunc = typeof path == 'function',
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value) {
result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
});
return result;
});
module.exports = invokeMap;

View File

@@ -0,0 +1,9 @@
type OpenTelemetryElement = 'SentrySpanProcessor' | 'SentryContextManager' | 'SentryPropagator' | 'SentrySampler';
/** Get all the OpenTelemetry elements that have been set up. */
export declare function openTelemetrySetupCheck(): OpenTelemetryElement[];
/** Mark an OpenTelemetry element as setup. */
export declare function setIsSetup(element: OpenTelemetryElement): void;
/** Only exported for tests. */
export declare function clearOpenTelemetrySetupCheck(): void;
export {};
//# sourceMappingURL=setupCheck.d.ts.map

View File

@@ -0,0 +1,27 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.js";
import type { ColumnBaseConfig } from "../../column.js";
import { entityKind } from "../../entity.js";
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.js";
export type MySqlIntBuilderInitial<TName extends string> = MySqlIntBuilder<{
name: TName;
dataType: 'number';
columnType: 'MySqlInt';
data: number;
driverParam: number | string;
enumValues: undefined;
}>;
export declare class MySqlIntBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlInt'>> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlIntConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config?: MySqlIntConfig);
}
export declare class MySqlInt<T extends ColumnBaseConfig<'number', 'MySqlInt'>> extends MySqlColumnWithAutoIncrement<T, MySqlIntConfig> {
static readonly [entityKind]: string;
getSQLType(): string;
mapFromDriverValue(value: number | string): number;
}
export interface MySqlIntConfig {
unsigned?: boolean;
}
export declare function int(): MySqlIntBuilderInitial<''>;
export declare function int(config?: MySqlIntConfig): MySqlIntBuilderInitial<''>;
export declare function int<TName extends string>(name: TName, config?: MySqlIntConfig): MySqlIntBuilderInitial<TName>;

View File

@@ -0,0 +1,11 @@
import { type LinkProps } from 'next/link.js';
import { type ComponentProps } from 'react';
import { type Locale } from 'use-intl';
import type { InitializedLocaleCookieConfig } from '../../routing/config.js';
type NextLinkProps = Omit<ComponentProps<'a'>, keyof LinkProps> & Omit<LinkProps, 'locale'>;
type Props = NextLinkProps & {
locale?: Locale;
localeCookie: InitializedLocaleCookieConfig;
};
declare const _default: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
export default _default;

View File

@@ -0,0 +1,12 @@
import { defineConfig } from 'tsup';
export default defineConfig((opts) => ({
clean: true,
dts: true,
entry: ['src/index.ts'],
format: ['cjs', 'esm'],
minify: !opts.watch,
sourcemap: true,
target: 'esnext',
outDir: 'dist',
}));

View File

@@ -0,0 +1 @@
{"version":3,"file":"common-exports.d.ts","sourceRoot":"","sources":["../../src/common-exports.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,MAAM,MAAM,gBAAgB,CAAC;AAGzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,mCAAmC,EAAE,MAAM,6CAA6C,CAAC;AAClG,OAAO,EAAE,iBAAiB,EAAE,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC5E,YAAY,EAAE,gCAAgC,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,OAAO,EACL,aAAa,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,WAAW,EACX,KAAK,EACL,eAAe,EACf,KAAK,EACL,WAAW,EACX,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,WAAW,EACX,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,4BAA4B,EAC5B,gCAAgC,EAChC,gCAAgC,EAChC,qCAAqC,EACrC,gBAAgB,EAChB,KAAK,EACL,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,eAAe,EACf,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,YAAY,EACZ,cAAc,EACd,UAAU,EACV,cAAc,EACd,SAAS,EACT,eAAe,EACf,iBAAiB,EACjB,aAAa,EACb,eAAe,EACf,aAAa,EACb,cAAc,EACd,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACxB,oBAAoB,EACpB,QAAQ,EACR,yBAAyB,EACzB,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,UAAU,EACV,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,OAAO,EACP,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAE,CAAC"}

View File

@@ -0,0 +1,23 @@
name: lint
on:
pull_request:
push:
branches: [ master ]
env:
NODE_VERSION: 16.x
jobs:
lint-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install ESLint + ESLint configs/plugins
run: npm install --only=dev
- name: Lint files
run: npm run lint

View File

@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileTerminal = createLucideIcon("FileTerminal", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "m8 16 2-2-2-2", key: "10vzyd" }],
["path", { d: "M12 18h4", key: "1wd2n7" }]
]);
export { FileTerminal as default };
//# sourceMappingURL=file-terminal.js.map

View File

@@ -0,0 +1,79 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { fieldIsSidebar } from 'payload/shared';
import React, { useMemo } from 'react';
import { RenderFields } from '../../forms/RenderFields/index.js';
import { Gutter } from '../Gutter/index.js';
import { TrashBanner } from '../TrashBanner/index.js';
import './index.scss';
const baseClass = 'document-fields';
export const DocumentFields = ({
AfterFields,
BeforeFields,
docPermissions,
fields,
forceSidebarWrap,
isTrashed = false,
readOnly,
schemaPathSegments
}) => {
const {
hasSidebarFields,
mainFields,
sidebarFields
} = useMemo(() => {
return fields.reduce((acc, field) => {
if (fieldIsSidebar(field)) {
acc.sidebarFields.push(field);
acc.mainFields.push(null);
acc.hasSidebarFields = true;
} else {
acc.mainFields.push(field);
acc.sidebarFields.push(null);
}
return acc;
}, {
hasSidebarFields: false,
mainFields: [],
sidebarFields: []
});
}, [fields]);
return /*#__PURE__*/_jsxs("div", {
className: [baseClass, hasSidebarFields ? `${baseClass}--has-sidebar` : `${baseClass}--no-sidebar`, forceSidebarWrap && `${baseClass}--force-sidebar-wrap`].filter(Boolean).join(' '),
children: [/*#__PURE__*/_jsx("div", {
className: `${baseClass}__main`,
children: /*#__PURE__*/_jsxs(Gutter, {
className: `${baseClass}__edit`,
children: [isTrashed && /*#__PURE__*/_jsx(TrashBanner, {}), BeforeFields, /*#__PURE__*/_jsx(RenderFields, {
className: `${baseClass}__fields`,
fields: mainFields,
forceRender: true,
parentIndexPath: "",
parentPath: "",
parentSchemaPath: schemaPathSegments.join('.'),
permissions: docPermissions?.fields,
readOnly: readOnly
}), AfterFields]
})
}), hasSidebarFields ? /*#__PURE__*/_jsx("div", {
className: `${baseClass}__sidebar-wrap`,
children: /*#__PURE__*/_jsx("div", {
className: `${baseClass}__sidebar`,
children: /*#__PURE__*/_jsx("div", {
className: `${baseClass}__sidebar-fields`,
children: /*#__PURE__*/_jsx(RenderFields, {
fields: sidebarFields,
forceRender: true,
parentIndexPath: "",
parentPath: "",
parentSchemaPath: schemaPathSegments.join('.'),
permissions: docPermissions?.fields,
readOnly: readOnly
})
})
})
}) : null]
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,19 @@
/**
* @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 ContactRound = createLucideIcon("ContactRound", [
["path", { d: "M16 2v2", key: "scm5qe" }],
["path", { d: "M17.915 22a6 6 0 0 0-12 0", key: "suqz9p" }],
["path", { d: "M8 2v2", key: "pbkmx" }],
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
["rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", key: "12vinp" }]
]);
export { ContactRound as default };
//# sourceMappingURL=contact-round.js.map

View File

@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnicodeExtensionValue = UnicodeExtensionValue;
var utils_1 = require("./utils");
/**
* https://tc39.es/ecma402/#sec-unicodeextensionvalue
* @param extension
* @param key
*/
function UnicodeExtensionValue(extension, key) {
(0, utils_1.invariant)(key.length === 2, 'key must have 2 elements');
var size = extension.length;
var searchValue = "-".concat(key, "-");
var pos = extension.indexOf(searchValue);
if (pos !== -1) {
var start = pos + 4;
var end = start;
var k = start;
var done = false;
while (!done) {
var e = extension.indexOf('-', k);
var len = void 0;
if (e === -1) {
len = size - k;
}
else {
len = e - k;
}
if (len === 2) {
done = true;
}
else if (e === -1) {
end = size;
done = true;
}
else {
end = e;
k = e + 1;
}
}
return extension.slice(start, end);
}
searchValue = "-".concat(key);
pos = extension.indexOf(searchValue);
if (pos !== -1 && pos + 3 === size) {
return '';
}
return undefined;
}

View File

@@ -0,0 +1,11 @@
type PathConditionsMap = {
[condition: string]: PathConditions | null;
};
type PathOrMap = string | PathConditionsMap;
type PathConditions = PathOrMap | readonly PathOrMap[];
declare const resolveExports: (exports: PathConditions, request: string, conditions: readonly string[]) => string[];
declare const resolveImports: (imports: PathConditionsMap, request: string, conditions: readonly string[]) => string[];
export { PathConditions, PathConditionsMap, resolveExports, resolveImports };

View File

@@ -0,0 +1,33 @@
var baseIteratee = require('./_baseIteratee'),
baseSortedIndexBy = require('./_baseSortedIndexBy');
/**
* This method is like `_.sortedIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* var objects = [{ 'x': 4 }, { 'x': 5 }];
*
* _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.sortedIndexBy(objects, { 'x': 4 }, 'x');
* // => 0
*/
function sortedIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, baseIteratee(iteratee, 2));
}
module.exports = sortedIndexBy;

View File

@@ -0,0 +1 @@
{"version":3,"file":"formatRelationshipTitle.d.ts","sourceRoot":"","sources":["../../../src/utilities/formatDocTitle/formatRelationshipTitle.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,iBAAW,MAkB9C,CAAA"}

View File

@@ -0,0 +1,23 @@
{
"name": "pg-numeric",
"version": "1.0.2",
"description": "reads PostgreSQL binary format for numeric values into a string",
"bugs": "https://github.com/charmander/pg-numeric/issues",
"license": "ISC",
"files": [
"index.js"
],
"repository": {
"type": "git",
"url": "https://github.com/charmander/pg-numeric"
},
"scripts": {
"test": "node test"
},
"devDependencies": {
"@charmander/eslint-config-base": "1.2.0"
},
"engines": {
"node": ">=4"
}
}

View File

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

View File

@@ -0,0 +1,4 @@
function _classNameTDZError(e) {
throw new ReferenceError('Class "' + e + '" cannot be referenced in computed property keys.');
}
export { _classNameTDZError as default };

View File

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

View File

@@ -0,0 +1,357 @@
# jackspeak
A very strict and proper argument parser.
Validate string, boolean, and number options, from the command
line and the environment.
Call the `jack` method with a config object, and then chain
methods off of it.
At the end, call the `.parse()` method, and you'll get an object
with `positionals` and `values` members.
Any unrecognized configs or invalid values will throw an error.
As long as you define configs using object literals, types will
be properly inferred and TypeScript will know what kinds of
things you got.
If you give it a prefix for environment variables, then defaults
will be read from the environment, and parsed values written back
to it, so you can easily pass configs through to child processes.
Automatically generates a `usage`/`help` banner by calling the
`.usage()` method.
Unless otherwise noted, all methods return the object itself.
## USAGE
```js
import { jack } from 'jackspeak'
// this works too:
// const { jack } = require('jackspeak')
const { positionals, values } = jack({ envPrefix: 'FOO' })
.flag({
asdf: { description: 'sets the asfd flag', short: 'a', default: true },
'no-asdf': { description: 'unsets the asdf flag', short: 'A' },
foo: { description: 'another boolean', short: 'f' },
})
.optList({
'ip-addrs': {
description: 'addresses to ip things',
delim: ',', // defaults to '\n'
default: ['127.0.0.1'],
},
})
.parse([
'some',
'positional',
'--ip-addrs',
'192.168.0.1',
'--ip-addrs',
'1.1.1.1',
'args',
'--foo', // sets the foo flag
'-A', // short for --no-asdf, sets asdf flag to false
])
console.log(process.env.FOO_ASDF) // '0'
console.log(process.env.FOO_FOO) // '1'
console.log(values) // {
// 'ip-addrs': ['192.168.0.1', '1.1.1.1'],
// foo: true,
// asdf: false,
// }
console.log(process.env.FOO_IP_ADDRS) // '192.168.0.1,1.1.1.1'
console.log(positionals) // ['some', 'positional', 'args']
```
## `jack(options: JackOptions = {}) => Jack`
Returns a `Jack` object that can be used to chain and add
field definitions. The other methods (apart from `validate()`,
`parse()`, and `usage()` obviously) return the same Jack object,
updated with the new types, so they can be chained together as
shown in the code examples.
Options:
- `allowPositionals` Defaults to true. Set to `false` to not
allow any positional arguments.
- `envPrefix` Set to a string to write configs to and read
configs from the environment. For example, if set to `MY_APP`
then the `foo-bar` config will default based on the value of
`env.MY_APP_FOO_BAR` and will write back to that when parsed.
Boolean values are written as `'1'` and `'0'`, and will be
treated as `true` if they're `'1'` or false otherwise.
Number values are written with their `toString()`
representation.
Strings are just strings.
Any value with `multiple: true` will be represented in the
environment split by a delimiter, which defaults to `\n`.
- `env` The place to read/write environment variables. Defaults
to `process.env`.
- `usage` A short usage string to print at the top of the help
banner.
- `stopAtPositional` Boolean, default false. Stop parsing opts
and flags at the first positional argument. This is useful if
you want to pass certain options to subcommands, like some
programs do, so you can stop parsing and pass the positionals
to the subcommand to parse.
- `stopAtPositionalTest` Conditional `stopAtPositional`. Provide
a function that takes a positional argument string and returns
boolean. If it returns `true`, then parsing will stop. Useful
when _some_ subcommands should parse the rest of the command
line options, and others should not.
### `Jack.heading(text: string, level?: 1 | 2 | 3 | 4 | 5 | 6)`
Define a short string heading, used in the `usage()` output.
Indentation of the heading and subsequent description/config
usage entries (up until the next heading) is set by the heading
level.
If the first usage item defined is a heading, it is always
treated as level 1, regardless of the argument provided.
Headings level 1 and 2 will have a line of padding underneath
them. Headings level 3 through 6 will not.
### `Jack.description(text: string, { pre?: boolean } = {})`
Define a long string description, used in the `usage()` output.
If the `pre` option is set to `true`, then whitespace will not be
normalized. However, if any line is too long for the width
allotted, it will still be wrapped.
## Option Definitions
Configs are defined by calling the appropriate field definition
method with an object where the keys are the long option name,
and the value defines the config.
Options:
- `type` Only needed for the `addFields` method, as the others
set it implicitly. Can be `'string'`, `'boolean'`, or
`'number'`.
- `multiple` Only needed for the `addFields` method, as the
others set it implicitly. Set to `true` to define an array
type. This means that it can be set on the CLI multiple times,
set as an array in the `values`
and it is represented in the environment as a delimited string.
- `short` A one-character shorthand for the option.
- `description` Some words to describe what this option is and
why you'd set it.
- `hint` (Only relevant for non-boolean types) The thing to show
in the usage output, like `--option=<hint>`
- `validate` A function that returns false (or throws) if an
option value is invalid.
- `validOptions` An array of strings or numbers that define the
valid values that can be set. This is not allowed on `boolean`
(flag) options. May be used along with a `validate()` method.
- `default` A default value for the field. Note that this may be
overridden by an environment variable, if present.
### `Jack.flag({ [option: string]: definition, ... })`
Define one or more boolean fields.
Boolean options may be set to `false` by using a
`--no-${optionName}` argument, which will be implicitly created
if it's not defined to be something else.
If a boolean option named `no-${optionName}` with the same
`multiple` setting is in the configuration, then that will be
treated as a negating flag.
### `Jack.flagList({ [option: string]: definition, ... })`
Define one or more boolean array fields.
### `Jack.num({ [option: string]: definition, ... })`
Define one or more number fields. These will be set in the
environment as a stringified number, and included in the `values`
object as a number.
### `Jack.numList({ [option: string]: definition, ... })`
Define one or more number list fields. These will be set in the
environment as a delimited set of stringified numbers, and
included in the `values` as a number array.
### `Jack.opt({ [option: string]: definition, ... })`
Define one or more string option fields.
### `Jack.optList({ [option: string]: definition, ... })`
Define one or more string list fields.
### `Jack.addFields({ [option: string]: definition, ... })`
Define one or more fields of any type. Note that `type` and
`multiple` must be set explicitly on each definition when using
this method.
## Actions
Use these methods on a Jack object that's already had its config
fields defined.
### `Jack.parse(args: string[] = process.argv): { positionals: string[], values: OptionsResults }`
Parse the arguments list, write to the environment if `envPrefix`
is set, and returned the parsed values and remaining positional
arguments.
### `Jack.validate(o: any): asserts o is OptionsResults`
Throws an error if the object provided is not a valid result set,
for the configurations defined thusfar.
### `Jack.usage(): string`
Returns the compiled `usage` string, with all option descriptions
and heading/description text, wrapped to the appropriate width
for the terminal.
### `Jack.setConfigValues(options: OptionsResults, src?: string)`
Validate the `options` argument, and set the default value for
each field that appears in the options.
Values provided will be overridden by environment variables or
command line arguments.
### `Jack.usageMarkdown(): string`
Returns the compiled `usage` string, with all option descriptions
and heading/description text, but as markdown instead of
formatted for a terminal, for generating HTML documentation for
your CLI.
## Some Example Code
Also see [the examples
folder](https://github.com/isaacs/jackspeak/tree/master/examples)
```js
import { jack } from 'jackspeak'
const j = jack({
// Optional
// This will be auto-generated from the descriptions if not supplied
// top level usage line, printed by -h
// will be auto-generated if not specified
usage: 'foo [options] <files>',
})
.heading('The best Foo that ever Fooed')
.description(
`
Executes all the files and interprets their output as
TAP formatted test result data.
To parse TAP data from stdin, specify "-" as a filename.
`,
)
// flags don't take a value, they're boolean on or off, and can be
// turned off by prefixing with `--no-`
// so this adds support for -b to mean --bail, or -B to mean --no-bail
.flag({
flag: {
// specify a short value if you like. this must be a single char
short: 'f',
// description is optional as well.
description: `Make the flags wave`,
// default value for flags is 'false', unless you change it
default: true,
},
'no-flag': {
// you can can always negate a flag with `--no-flag`
// specifying a negate option will let you define a short
// single-char option for negation.
short: 'F',
description: `Do not wave the flags`,
},
})
// Options that take a value are specified with `opt()`
.opt({
reporter: {
short: 'R',
description: 'the style of report to display',
},
})
// if you want a number, say so, and jackspeak will enforce it
.num({
jobs: {
short: 'j',
description: 'how many jobs to run in parallel',
default: 1,
},
})
// A list is an option that can be specified multiple times,
// to expand into an array of all the settings. Normal opts
// will just give you the last value specified.
.optList({
'node-arg': {},
})
// a flagList is an array of booleans, so `-ddd` is [true, true, true]
// count the `true` values to treat it as a counter.
.flagList({
debug: { short: 'd' },
})
// opts take a value, and is set to the string in the results
// you can combine multiple short-form flags together, but
// an opt will end the combine chain, posix-style. So,
// -bofilename would be like --bail --output-file=filename
.opt({
'output-file': {
short: 'o',
// optional: make it -o<file> in the help output insead of -o<value>
hint: 'file',
description: `Send the raw output to the specified file.`,
},
})
// now we can parse argv like this:
const { values, positionals } = j.parse(process.argv)
// or decide to show the usage banner
console.log(j.usage())
// or validate an object config we got from somewhere else
try {
j.validate(someConfig)
} catch (er) {
console.error('someConfig is not valid!', er)
}
```
## Name
The inspiration for this module is [yargs](http://npm.im/yargs), which
is pirate talk themed. Yargs has all the features, and is infinitely
flexible. "Jackspeak" is the slang of the royal navy. This module
does not have all the features. It is declarative and rigid by design.

View File

@@ -0,0 +1,22 @@
export const formatAdminURL = (args)=>{
const { adminRoute, apiRoute, includeBasePath: includeBasePathArg, path = '', relative = false, serverURL } = args;
const basePath = process.env.NEXT_BASE_PATH || args.basePath || '';
const routePath = adminRoute || apiRoute;
const segments = [
routePath && routePath !== '/' && routePath,
path && path
].filter(Boolean);
const pathname = segments.join('') || '/';
const pathnameWithBase = (basePath + pathname).replace(/\/$/, '') || '/';
const includeBasePath = includeBasePathArg ?? (adminRoute ? false : true);
if (relative || !serverURL) {
if (includeBasePath && basePath) {
return pathnameWithBase;
}
return pathname;
}
const serverURLObj = new URL(serverURL);
return new URL(pathnameWithBase, serverURLObj.origin).toString();
};
//# sourceMappingURL=formatAdminURL.js.map

View File

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

View File

@@ -0,0 +1,253 @@
"use strict";
exports.formatDistance = void 0;
const formatDistanceLocale = {
lessThanXSeconds: {
regular: {
one: "1 секундтан аз",
singularNominative: "{{count}} секундтан аз",
singularGenitive: "{{count}} секундтан аз",
pluralGenitive: "{{count}} секундтан аз",
},
future: {
one: "бір секундтан кейін",
singularNominative: "{{count}} секундтан кейін",
singularGenitive: "{{count}} секундтан кейін",
pluralGenitive: "{{count}} секундтан кейін",
},
},
xSeconds: {
regular: {
singularNominative: "{{count}} секунд",
singularGenitive: "{{count}} секунд",
pluralGenitive: "{{count}} секунд",
},
past: {
singularNominative: "{{count}} секунд бұрын",
singularGenitive: "{{count}} секунд бұрын",
pluralGenitive: "{{count}} секунд бұрын",
},
future: {
singularNominative: "{{count}} секундтан кейін",
singularGenitive: "{{count}} секундтан кейін",
pluralGenitive: "{{count}} секундтан кейін",
},
},
halfAMinute: (options) => {
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "жарты минут ішінде";
} else {
return "жарты минут бұрын";
}
}
return "жарты минут";
},
lessThanXMinutes: {
regular: {
one: "1 минуттан аз",
singularNominative: "{{count}} минуттан аз",
singularGenitive: "{{count}} минуттан аз",
pluralGenitive: "{{count}} минуттан аз",
},
future: {
one: "минуттан кем ",
singularNominative: "{{count}} минуттан кем",
singularGenitive: "{{count}} минуттан кем",
pluralGenitive: "{{count}} минуттан кем",
},
},
xMinutes: {
regular: {
singularNominative: "{{count}} минут",
singularGenitive: "{{count}} минут",
pluralGenitive: "{{count}} минут",
},
past: {
singularNominative: "{{count}} минут бұрын",
singularGenitive: "{{count}} минут бұрын",
pluralGenitive: "{{count}} минут бұрын",
},
future: {
singularNominative: "{{count}} минуттан кейін",
singularGenitive: "{{count}} минуттан кейін",
pluralGenitive: "{{count}} минуттан кейін",
},
},
aboutXHours: {
regular: {
singularNominative: "шамамен {{count}} сағат",
singularGenitive: "шамамен {{count}} сағат",
pluralGenitive: "шамамен {{count}} сағат",
},
future: {
singularNominative: "шамамен {{count}} сағаттан кейін",
singularGenitive: "шамамен {{count}} сағаттан кейін",
pluralGenitive: "шамамен {{count}} сағаттан кейін",
},
},
xHours: {
regular: {
singularNominative: "{{count}} сағат",
singularGenitive: "{{count}} сағат",
pluralGenitive: "{{count}} сағат",
},
},
xDays: {
regular: {
singularNominative: "{{count}} күн",
singularGenitive: "{{count}} күн",
pluralGenitive: "{{count}} күн",
},
future: {
singularNominative: "{{count}} күннен кейін",
singularGenitive: "{{count}} күннен кейін",
pluralGenitive: "{{count}} күннен кейін",
},
},
aboutXWeeks: {
type: "weeks",
one: "шамамен 1 апта",
other: "шамамен {{count}} апта",
},
xWeeks: {
type: "weeks",
one: "1 апта",
other: "{{count}} апта",
},
aboutXMonths: {
regular: {
singularNominative: "шамамен {{count}} ай",
singularGenitive: "шамамен {{count}} ай",
pluralGenitive: "шамамен {{count}} ай",
},
future: {
singularNominative: "шамамен {{count}} айдан кейін",
singularGenitive: "шамамен {{count}} айдан кейін",
pluralGenitive: "шамамен {{count}} айдан кейін",
},
},
xMonths: {
regular: {
singularNominative: "{{count}} ай",
singularGenitive: "{{count}} ай",
pluralGenitive: "{{count}} ай",
},
},
aboutXYears: {
regular: {
singularNominative: "шамамен {{count}} жыл",
singularGenitive: "шамамен {{count}} жыл",
pluralGenitive: "шамамен {{count}} жыл",
},
future: {
singularNominative: "шамамен {{count}} жылдан кейін",
singularGenitive: "шамамен {{count}} жылдан кейін",
pluralGenitive: "шамамен {{count}} жылдан кейін",
},
},
xYears: {
regular: {
singularNominative: "{{count}} жыл",
singularGenitive: "{{count}} жыл",
pluralGenitive: "{{count}} жыл",
},
future: {
singularNominative: "{{count}} жылдан кейін",
singularGenitive: "{{count}} жылдан кейін",
pluralGenitive: "{{count}} жылдан кейін",
},
},
overXYears: {
regular: {
singularNominative: "{{count}} жылдан астам",
singularGenitive: "{{count}} жылдан астам",
pluralGenitive: "{{count}} жылдан астам",
},
future: {
singularNominative: "{{count}} жылдан астам",
singularGenitive: "{{count}} жылдан астам",
pluralGenitive: "{{count}} жылдан астам",
},
},
almostXYears: {
regular: {
singularNominative: "{{count}} жылға жақын",
singularGenitive: "{{count}} жылға жақын",
pluralGenitive: "{{count}} жылға жақын",
},
future: {
singularNominative: "{{count}} жылдан кейін",
singularGenitive: "{{count}} жылдан кейін",
pluralGenitive: "{{count}} жылдан кейін",
},
},
};
function declension(scheme, count) {
// scheme for count=1 exists
if (scheme.one && count === 1) return scheme.one;
const rem10 = count % 10;
const rem100 = count % 100;
// 1, 21, 31, ...
if (rem10 === 1 && rem100 !== 11) {
return scheme.singularNominative.replace("{{count}}", String(count));
// 2, 3, 4, 22, 23, 24, 32 ...
} else if (rem10 >= 2 && rem10 <= 4 && (rem100 < 10 || rem100 > 20)) {
return scheme.singularGenitive.replace("{{count}}", String(count));
// 5, 6, 7, 8, 9, 10, 11, ...
} else {
return scheme.pluralGenitive.replace("{{count}}", String(count));
}
}
const formatDistance = (token, count, options) => {
const tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "function") return tokenValue(options);
if (tokenValue.type === "weeks") {
return count === 1
? tokenValue.one
: tokenValue.other.replace("{{count}}", String(count));
}
if (options?.addSuffix) {
if (options.comparison && options.comparison > 0) {
if (tokenValue.future) {
return declension(tokenValue.future, count);
} else {
return declension(tokenValue.regular, count) + " кейін";
}
} else {
if (tokenValue.past) {
return declension(tokenValue.past, count);
} else {
return declension(tokenValue.regular, count) + " бұрын";
}
}
} else {
return declension(tokenValue.regular, count);
}
};
exports.formatDistance = formatDistance;

View File

@@ -0,0 +1,127 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["av. J.-K", "ap. J.-K"],
abbreviated: ["av. J.-K", "ap. J.-K"],
wide: ["anvan Jezi Kris", "apre Jezi Kris"],
};
const quarterValues = {
narrow: ["T1", "T2", "T3", "T4"],
abbreviated: ["1ye trim.", "2yèm trim.", "3yèm trim.", "4yèm trim."],
wide: ["1ye trimès", "2yèm trimès", "3yèm trimès", "4yèm trimès"],
};
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "O", "S", "O", "N", "D"],
abbreviated: [
"janv.",
"fevr.",
"mas",
"avr.",
"me",
"jen",
"jiyè",
"out",
"sept.",
"okt.",
"nov.",
"des.",
],
wide: [
"janvye",
"fevrye",
"mas",
"avril",
"me",
"jen",
"jiyè",
"out",
"septanm",
"oktòb",
"novanm",
"desanm",
],
};
const dayValues = {
narrow: ["D", "L", "M", "M", "J", "V", "S"],
short: ["di", "le", "ma", "mè", "je", "va", "sa"],
abbreviated: ["dim.", "len.", "mad.", "mèk.", "jed.", "van.", "sam."],
wide: ["dimanch", "lendi", "madi", "mèkredi", "jedi", "vandredi", "samdi"],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "minwit",
noon: "midi",
morning: "mat.",
afternoon: "ap.m.",
evening: "swa",
night: "mat.",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "minwit",
noon: "midi",
morning: "maten",
afternoon: "aprèmidi",
evening: "swa",
night: "maten",
},
wide: {
am: "AM",
pm: "PM",
midnight: "minwit",
noon: "midi",
morning: "nan maten",
afternoon: "nan aprèmidi",
evening: "nan aswè",
night: "nan maten",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
if (number === 0) return String(number);
const suffix = number === 1 ? "ye" : "yèm";
return number + suffix;
};
export const localize = {
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",
}),
};

View File

@@ -0,0 +1,128 @@
(function (Prism) {
var multilineComment = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source;
for (var i = 0; i < 2; i++) {
// support 4 levels of nested comments
multilineComment = multilineComment.replace(/<self>/g, function () { return multilineComment; });
}
multilineComment = multilineComment.replace(/<self>/g, function () { return /[^\s\S]/.source; });
Prism.languages.rust = {
'comment': [
{
pattern: RegExp(/(^|[^\\])/.source + multilineComment),
lookbehind: true,
greedy: true
},
{
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true,
greedy: true
}
],
'string': {
pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,
greedy: true
},
'char': {
pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,
greedy: true
},
'attribute': {
pattern: /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,
greedy: true,
alias: 'attr-name',
inside: {
'string': null // see below
}
},
// Closure params should not be confused with bitwise OR |
'closure-params': {
pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,
lookbehind: true,
greedy: true,
inside: {
'closure-punctuation': {
pattern: /^\||\|$/,
alias: 'punctuation'
},
rest: null // see below
}
},
'lifetime-annotation': {
pattern: /'\w+/,
alias: 'symbol'
},
'fragment-specifier': {
pattern: /(\$\w+:)[a-z]+/,
lookbehind: true,
alias: 'punctuation'
},
'variable': /\$\w+/,
'function-definition': {
pattern: /(\bfn\s+)\w+/,
lookbehind: true,
alias: 'function'
},
'type-definition': {
pattern: /(\b(?:enum|struct|trait|type|union)\s+)\w+/,
lookbehind: true,
alias: 'class-name'
},
'module-declaration': [
{
pattern: /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,
lookbehind: true,
alias: 'namespace'
},
{
pattern: /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,
lookbehind: true,
alias: 'namespace',
inside: {
'punctuation': /::/
}
}
],
'keyword': [
// https://github.com/rust-lang/reference/blob/master/src/keywords.md
/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,
// primitives and str
// https://doc.rust-lang.org/stable/rust-by-example/primitives.html
/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/
],
// functions can technically start with an upper-case letter, but this will introduce a lot of false positives
// and Rust's naming conventions recommend snake_case anyway.
// https://doc.rust-lang.org/1.0.0/style/style/naming/README.html
'function': /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,
'macro': {
pattern: /\b\w+!/,
alias: 'property'
},
'constant': /\b[A-Z_][A-Z_\d]+\b/,
'class-name': /\b[A-Z]\w*\b/,
'namespace': {
pattern: /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,
inside: {
'punctuation': /::/
}
},
// Hex, oct, bin, dec numbers with visual separators and type suffix
'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,
'boolean': /\b(?:false|true)\b/,
'punctuation': /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
'operator': /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
};
Prism.languages.rust['closure-params'].inside.rest = Prism.languages.rust;
Prism.languages.rust['attribute'].inside['string'] = Prism.languages.rust['string'];
}(Prism));

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"dropDatabase.d.ts","sourceRoot":"","sources":["../../src/postgres/dropDatabase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,eAAO,MAAM,YAAY,EAAE,YAM1B,CAAA"}

View File

@@ -0,0 +1,42 @@
import type { ColumnBuilderBase, ColumnBuilderBaseConfig, ColumnBuilderExtraConfig, ColumnBuilderRuntimeConfig, ColumnDataType, HasGenerated } from "../../column-builder.cjs";
import { ColumnBuilder } from "../../column-builder.cjs";
import { Column } from "../../column.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import type { SQL } from "../../sql/sql.cjs";
import type { UpdateDeleteAction } from "../foreign-keys.cjs";
import type { SQLiteTable } from "../table.cjs";
import type { Update } from "../../utils.cjs";
export interface ReferenceConfig {
ref: () => SQLiteColumn;
actions: {
onUpdate?: UpdateDeleteAction;
onDelete?: UpdateDeleteAction;
};
}
export interface SQLiteColumnBuilderBase<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TTypeConfig extends object = object> extends ColumnBuilderBase<T, TTypeConfig & {
dialect: 'sqlite';
}> {
}
export interface SQLiteGeneratedColumnConfig {
mode?: 'virtual' | 'stored';
}
export declare abstract class SQLiteColumnBuilder<T extends ColumnBuilderBaseConfig<ColumnDataType, string> = ColumnBuilderBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = object, TTypeConfig extends object = object, TExtraConfig extends ColumnBuilderExtraConfig = object> extends ColumnBuilder<T, TRuntimeConfig, TTypeConfig & {
dialect: 'sqlite';
}, TExtraConfig> implements SQLiteColumnBuilderBase<T, TTypeConfig> {
static readonly [entityKind]: string;
private foreignKeyConfigs;
references(ref: ReferenceConfig['ref'], actions?: ReferenceConfig['actions']): this;
unique(name?: string): this;
generatedAlwaysAs(as: SQL | T['data'] | (() => SQL), config?: SQLiteGeneratedColumnConfig): HasGenerated<this, {
type: 'always';
}>;
}
export declare abstract class SQLiteColumn<T extends ColumnBaseConfig<ColumnDataType, string> = ColumnBaseConfig<ColumnDataType, string>, TRuntimeConfig extends object = {}, TTypeConfig extends object = {}> extends Column<T, TRuntimeConfig, TTypeConfig & {
dialect: 'sqlite';
}> {
readonly table: SQLiteTable;
static readonly [entityKind]: string;
constructor(table: SQLiteTable, config: ColumnBuilderRuntimeConfig<T['data'], TRuntimeConfig>);
}
export type AnySQLiteColumn<TPartial extends Partial<ColumnBaseConfig<ColumnDataType, string>> = {}> = SQLiteColumn<Required<Update<ColumnBaseConfig<ColumnDataType, string>, TPartial>>>;

View File

@@ -0,0 +1,3 @@
import type { NavPreferences, PayloadRequest } from 'payload';
export declare const getNavPrefs: (req: PayloadRequest) => Promise<NavPreferences>;
//# sourceMappingURL=getNavPrefs.d.ts.map

View File

@@ -0,0 +1,96 @@
import type { LocalizedOptions } from "./types.js";
/**
* The {@link formatDistance} function options.
*/
export interface FormatDistanceOptions
extends LocalizedOptions<"formatDistance"> {
/** Distances less than a minute are more detailed */
includeSeconds?: boolean;
/** Add "X ago"/"in X" in the locale language */
addSuffix?: boolean;
}
/**
* @name formatDistance
* @category Common Helpers
* @summary Return the distance between the given dates in words.
*
* @description
* Return the distance between the given dates in words.
*
* | Distance between dates | Result |
* |-------------------------------------------------------------------|---------------------|
* | 0 ... 30 secs | less than a minute |
* | 30 secs ... 1 min 30 secs | 1 minute |
* | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |
* | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |
* | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |
* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |
* | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |
* | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |
* | 1 yr ... 1 yr 3 months | about 1 year |
* | 1 yr 3 months ... 1 yr 9 month s | over 1 year |
* | 1 yr 9 months ... 2 yrs | almost 2 years |
* | N yrs ... N yrs 3 months | about N years |
* | N yrs 3 months ... N yrs 9 months | over N years |
* | N yrs 9 months ... N+1 yrs | almost N+1 years |
*
* With `options.includeSeconds == true`:
* | Distance between dates | Result |
* |------------------------|----------------------|
* | 0 secs ... 5 secs | less than 5 seconds |
* | 5 secs ... 10 secs | less than 10 seconds |
* | 10 secs ... 20 secs | less than 20 seconds |
* | 20 secs ... 40 secs | half a minute |
* | 40 secs ... 60 secs | less than a minute |
* | 60 secs ... 90 secs | 1 minute |
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date
* @param baseDate - The date to compare with
* @param options - An object with options
*
* @returns The distance in words
*
* @throws `date` must not be Invalid Date
* @throws `baseDate` must not be Invalid Date
* @throws `options.locale` must contain `formatDistance` property
*
* @example
* // What is the distance between 2 July 2014 and 1 January 2015?
* const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))
* //=> '6 months'
*
* @example
* // What is the distance between 1 January 2015 00:00:15
* // and 1 January 2015 00:00:00, including seconds?
* const result = formatDistance(
* new Date(2015, 0, 1, 0, 0, 15),
* new Date(2015, 0, 1, 0, 0, 0),
* { includeSeconds: true }
* )
* //=> 'less than 20 seconds'
*
* @example
* // What is the distance from 1 January 2016
* // to 1 January 2015, with a suffix?
* const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {
* addSuffix: true
* })
* //=> 'about 1 year ago'
*
* @example
* // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?
* import { eoLocale } from 'date-fns/locale/eo'
* const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {
* locale: eoLocale
* })
* //=> 'pli ol 1 jaro'
*/
export declare function formatDistance<DateType extends Date>(
date: DateType | number | string,
baseDate: DateType | number | string,
options?: FormatDistanceOptions,
): string;

View File

@@ -0,0 +1,5 @@
export declare enum AttributeNames {
EXPRESS_TYPE = "express.type",
EXPRESS_NAME = "express.name"
}
//# sourceMappingURL=AttributeNames.d.ts.map

View File

@@ -0,0 +1,56 @@
{
"name": "strip-json-comments",
"version": "5.0.3",
"description": "Strip comments from JSON. Lets you use comments in your JSON files!",
"license": "MIT",
"repository": "sindresorhus/strip-json-comments",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"sideEffects": false,
"engines": {
"node": ">=14.16"
},
"scripts": {
"test": "xo && ava && tsd",
"bench": "matcha benchmark.js"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"json",
"strip",
"comments",
"remove",
"delete",
"trim",
"multiline",
"parse",
"config",
"configuration",
"settings",
"util",
"env",
"environment",
"jsonc"
],
"devDependencies": {
"ava": "^4.3.1",
"matcha": "^0.7.0",
"tsd": "^0.22.0",
"xo": "^0.54.2"
},
"xo": {
"rules": {
"complexity": "off"
}
}
}

View File

@@ -0,0 +1,642 @@
(() => {
var _window$dateFns;function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o, minLen) {if (!o) return;if (typeof o === "string") return _arrayLikeToArray(o, minLen);var n = Object.prototype.toString.call(o).slice(8, -1);if (n === "Object" && o.constructor) n = o.constructor.name;if (n === "Map" || n === "Set") return Array.from(o);if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);}function _arrayLikeToArray(arr, len) {if (len == null || len > arr.length) len = arr.length;for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];return arr2;}function _iterableToArrayLimit(r, l) {var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];if (null != t) {var e,n,i,u,a = [],f = !0,o = !1;try {if (i = (t = t.call(r)).next, 0 === l) {if (Object(t) !== t) return;f = !1;} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);} catch (r) {o = !0, n = r;} finally {try {if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;} finally {if (o) throw n;}}return a;}}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/it/_lib/formatDistance.js
var formatDistanceLocale = {
lessThanXSeconds: {
one: "meno di un secondo",
other: "meno di {{count}} secondi"
},
xSeconds: {
one: "un secondo",
other: "{{count}} secondi"
},
halfAMinute: "alcuni secondi",
lessThanXMinutes: {
one: "meno di un minuto",
other: "meno di {{count}} minuti"
},
xMinutes: {
one: "un minuto",
other: "{{count}} minuti"
},
aboutXHours: {
one: "circa un'ora",
other: "circa {{count}} ore"
},
xHours: {
one: "un'ora",
other: "{{count}} ore"
},
xDays: {
one: "un giorno",
other: "{{count}} giorni"
},
aboutXWeeks: {
one: "circa una settimana",
other: "circa {{count}} settimane"
},
xWeeks: {
one: "una settimana",
other: "{{count}} settimane"
},
aboutXMonths: {
one: "circa un mese",
other: "circa {{count}} mesi"
},
xMonths: {
one: "un mese",
other: "{{count}} mesi"
},
aboutXYears: {
one: "circa un anno",
other: "circa {{count}} anni"
},
xYears: {
one: "un anno",
other: "{{count}} anni"
},
overXYears: {
one: "pi\xF9 di un anno",
other: "pi\xF9 di {{count}} anni"
},
almostXYears: {
one: "quasi un anno",
other: "quasi {{count}} anni"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", count.toString());
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "tra " + result;
} else {
return result + " fa";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.js
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/it/_lib/formatLong.js
var dateFormats = {
full: "EEEE d MMMM y",
long: "d MMMM y",
medium: "d MMM y",
short: "dd/MM/y"
};
var timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/constants.js
var daysInWeek = 7;
var daysInYear = 365.2425;
var maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;
var minTime = -maxTime;
var millisecondsInWeek = 604800000;
var millisecondsInDay = 86400000;
var millisecondsInMinute = 60000;
var millisecondsInHour = 3600000;
var millisecondsInSecond = 1000;
var minutesInYear = 525600;
var minutesInMonth = 43200;
var minutesInDay = 1440;
var minutesInHour = 60;
var monthsInQuarter = 3;
var monthsInYear = 12;
var quartersInYear = 4;
var secondsInHour = 3600;
var secondsInMinute = 60;
var secondsInDay = secondsInHour * 24;
var secondsInWeek = secondsInDay * 7;
var secondsInYear = secondsInDay * daysInYear;
var secondsInMonth = secondsInYear / 12;
var secondsInQuarter = secondsInMonth * 3;
var constructFromSymbol = Symbol.for("constructDateFrom");
// lib/constructFrom.js
function constructFrom(date, value) {
if (typeof date === "function")
return date(value);
if (date && _typeof(date) === "object" && constructFromSymbol in date)
return date[constructFromSymbol](value);
if (date instanceof Date)
return new date.constructor(value);
return new Date(value);
}
// lib/_lib/normalizeDates.js
function normalizeDates(context) {for (var _len = arguments.length, dates = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {dates[_key - 1] = arguments[_key];}
var normalize = constructFrom.bind(null, context || dates.find(function (date) {return _typeof(date) === "object";}));
return dates.map(normalize);
}
// lib/_lib/defaultOptions.js
function getDefaultOptions() {
return defaultOptions;
}
function setDefaultOptions(newOptions) {
defaultOptions = newOptions;
}
var defaultOptions = {};
// lib/toDate.js
function toDate(argument, context) {
return constructFrom(context || argument, argument);
}
// lib/startOfWeek.js
function startOfWeek(date, options) {var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _defaultOptions3$loca;
var defaultOptions3 = getDefaultOptions();
var weekStartsOn = (_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 || (_options$locale = options.locale) === null || _options$locale === void 0 || (_options$locale = _options$locale.options) === null || _options$locale === void 0 ? void 0 : _options$locale.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions3.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions3$loca = defaultOptions3.locale) === null || _defaultOptions3$loca === void 0 || (_defaultOptions3$loca = _defaultOptions3$loca.options) === null || _defaultOptions3$loca === void 0 ? void 0 : _defaultOptions3$loca.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0;
var _date = toDate(date, options === null || options === void 0 ? void 0 : options.in);
var day = _date.getDay();
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
_date.setDate(_date.getDate() - diff);
_date.setHours(0, 0, 0, 0);
return _date;
}
// lib/isSameWeek.js
function isSameWeek(laterDate, earlierDate, options) {
var _normalizeDates = normalizeDates(options === null || options === void 0 ? void 0 : options.in, laterDate, earlierDate),_normalizeDates2 = _slicedToArray(_normalizeDates, 2),laterDate_ = _normalizeDates2[0],earlierDate_ = _normalizeDates2[1];
return +startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options);
}
// lib/locale/it/_lib/formatRelative.js
function _lastWeek(day) {
switch (day) {
case 0:
return "'domenica scorsa alle' p";
default:
return "'" + weekdays[day] + " scorso alle' p";
}
}
function thisWeek(day) {
return "'" + weekdays[day] + " alle' p";
}
function _nextWeek(day) {
switch (day) {
case 0:
return "'domenica prossima alle' p";
default:
return "'" + weekdays[day] + " prossimo alle' p";
}
}
var weekdays = [
"domenica",
"luned\xEC",
"marted\xEC",
"mercoled\xEC",
"gioved\xEC",
"venerd\xEC",
"sabato"];
var formatRelativeLocale = {
lastWeek: function lastWeek(date, baseDate, options) {
var day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return _lastWeek(day);
}
},
yesterday: "'ieri alle' p",
today: "'oggi alle' p",
tomorrow: "'domani alle' p",
nextWeek: function nextWeek(date, baseDate, options) {
var day = date.getDay();
if (isSameWeek(date, baseDate, options)) {
return thisWeek(day);
} else {
return _nextWeek(day);
}
},
other: "P"
};
var formatRelative = function formatRelative(token, date, baseDate, options) {
var format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date, baseDate, options);
}
return format;
};
// lib/locale/_lib/buildLocalizeFn.js
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/it/_lib/localize.js
var eraValues = {
narrow: ["aC", "dC"],
abbreviated: ["a.C.", "d.C."],
wide: ["avanti Cristo", "dopo Cristo"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["T1", "T2", "T3", "T4"],
wide: ["1\xBA trimestre", "2\xBA trimestre", "3\xBA trimestre", "4\xBA trimestre"]
};
var monthValues = {
narrow: ["G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"],
abbreviated: [
"gen",
"feb",
"mar",
"apr",
"mag",
"giu",
"lug",
"ago",
"set",
"ott",
"nov",
"dic"],
wide: [
"gennaio",
"febbraio",
"marzo",
"aprile",
"maggio",
"giugno",
"luglio",
"agosto",
"settembre",
"ottobre",
"novembre",
"dicembre"]
};
var dayValues = {
narrow: ["D", "L", "M", "M", "G", "V", "S"],
short: ["dom", "lun", "mar", "mer", "gio", "ven", "sab"],
abbreviated: ["dom", "lun", "mar", "mer", "gio", "ven", "sab"],
wide: [
"domenica",
"luned\xEC",
"marted\xEC",
"mercoled\xEC",
"gioved\xEC",
"venerd\xEC",
"sabato"]
};
var dayPeriodValues = {
narrow: {
am: "m.",
pm: "p.",
midnight: "mezzanotte",
noon: "mezzogiorno",
morning: "mattina",
afternoon: "pomeriggio",
evening: "sera",
night: "notte"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "mezzanotte",
noon: "mezzogiorno",
morning: "mattina",
afternoon: "pomeriggio",
evening: "sera",
night: "notte"
},
wide: {
am: "AM",
pm: "PM",
midnight: "mezzanotte",
noon: "mezzogiorno",
morning: "mattina",
afternoon: "pomeriggio",
evening: "sera",
night: "notte"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "m.",
pm: "p.",
midnight: "mezzanotte",
noon: "mezzogiorno",
morning: "di mattina",
afternoon: "del pomeriggio",
evening: "di sera",
night: "di notte"
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "mezzanotte",
noon: "mezzogiorno",
morning: "di mattina",
afternoon: "del pomeriggio",
evening: "di sera",
night: "di notte"
},
wide: {
am: "AM",
pm: "PM",
midnight: "mezzanotte",
noon: "mezzogiorno",
morning: "di mattina",
afternoon: "del pomeriggio",
evening: "di sera",
night: "di notte"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, _options) {
var number = Number(dirtyNumber);
return String(number);
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.js
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
}
function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
}
// lib/locale/_lib/buildMatchPatternFn.js
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/it/_lib/match.js
var matchOrdinalNumberPattern = /^(\d+)(º)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(aC|dC)/i,
abbreviated: /^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i,
wide: /^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i
};
var parseEraPatterns = {
any: [/^a/i, /^(d|e)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^t[1234]/i,
wide: /^[1234](º)? trimestre/i
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[gfmalsond]/i,
abbreviated: /^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i,
wide: /^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i
};
var parseMonthPatterns = {
narrow: [
/^g/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^g/i,
/^l/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i],
any: [
/^ge/i,
/^f/i,
/^mar/i,
/^ap/i,
/^mag/i,
/^gi/i,
/^l/i,
/^ag/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i]
};
var matchDayPatterns = {
narrow: /^[dlmgvs]/i,
short: /^(do|lu|ma|me|gi|ve|sa)/i,
abbreviated: /^(dom|lun|mar|mer|gio|ven|sab)/i,
wide: /^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i
};
var parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^g/i, /^v/i, /^s/i],
any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^g/i, /^v/i, /^s/i]
};
var matchDayPeriodPatterns = {
narrow: /^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i,
any: /^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i
};
var parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mezza/i,
noon: /^mezzo/i,
morning: /mattina/i,
afternoon: /pomeriggio/i,
evening: /sera/i,
night: /notte/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/it.js
var it = {
code: "it",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 4
}
};
// lib/locale/it/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
it: it }) });
//# debugId=81A22612D6569A7264756E2164756E21
//# sourceMappingURL=cdn.js.map
})();

View File

@@ -0,0 +1,15 @@
/**
* 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 type { JSX } from 'react';
export declare function CharacterLimitPlugin({ charset, maxLength, renderer, }: {
charset: 'UTF-8' | 'UTF-16';
maxLength: number;
renderer?: ({ remainingCharacters, }: {
remainingCharacters: number;
}) => JSX.Element;
}): JSX.Element;

View File

@@ -0,0 +1 @@
{"version":3,"file":"remove-formatting.js","sources":["../../../src/icons/remove-formatting.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name RemoveFormatting\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCA3VjRoMTZ2MyIgLz4KICA8cGF0aCBkPSJNNSAyMGg2IiAvPgogIDxwYXRoIGQ9Ik0xMyA0IDggMjAiIC8+CiAgPHBhdGggZD0ibTE1IDE1IDUgNSIgLz4KICA8cGF0aCBkPSJtMjAgMTUtNSA1IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/remove-formatting\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 RemoveFormatting = createLucideIcon('RemoveFormatting', [\n ['path', { d: 'M4 7V4h16v3', key: '9msm58' }],\n ['path', { d: 'M5 20h6', key: '1h6pxn' }],\n ['path', { d: 'M13 4 8 20', key: 'kqq6aj' }],\n ['path', { d: 'm15 15 5 5', key: 'me55sn' }],\n ['path', { d: 'm20 15-5 5', key: '11p7ol' }],\n]);\n\nexport default RemoveFormatting;\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,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,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,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,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,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const SunDim = createLucideIcon("SunDim", [
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
["path", { d: "M12 4h.01", key: "1ujb9j" }],
["path", { d: "M20 12h.01", key: "1ykeid" }],
["path", { d: "M12 20h.01", key: "zekei9" }],
["path", { d: "M4 12h.01", key: "158zrr" }],
["path", { d: "M17.657 6.343h.01", key: "31pqzk" }],
["path", { d: "M17.657 17.657h.01", key: "jehnf4" }],
["path", { d: "M6.343 17.657h.01", key: "gdk6ow" }],
["path", { d: "M6.343 6.343h.01", key: "1uurf0" }]
]);
export { SunDim as default };
//# sourceMappingURL=sun-dim.js.map

View File

@@ -0,0 +1,214 @@
import cjs from "./sass.node.js";
export const compile = cjs.compile;
export const compileAsync = cjs.compileAsync;
export const compileString = cjs.compileString;
export const compileStringAsync = cjs.compileStringAsync;
export const initCompiler = cjs.initCompiler;
export const initAsyncCompiler = cjs.initAsyncCompiler;
export const Compiler = cjs.Compiler;
export const AsyncCompiler = cjs.AsyncCompiler;
export const Logger = cjs.Logger;
export const SassArgumentList = cjs.SassArgumentList;
export const SassBoolean = cjs.SassBoolean;
export const SassCalculation = cjs.SassCalculation;
export const CalculationOperation = cjs.CalculationOperation;
export const CalculationInterpolation = cjs.CalculationInterpolation;
export const SassColor = cjs.SassColor;
export const SassFunction = cjs.SassFunction;
export const SassList = cjs.SassList;
export const SassMap = cjs.SassMap;
export const SassMixin = cjs.SassMixin;
export const SassNumber = cjs.SassNumber;
export const SassString = cjs.SassString;
export const Value = cjs.Value;
export const CustomFunction = cjs.CustomFunction;
export const ListSeparator = cjs.ListSeparator;
export const sassFalse = cjs.sassFalse;
export const sassNull = cjs.sassNull;
export const sassTrue = cjs.sassTrue;
export const Exception = cjs.Exception;
export const PromiseOr = cjs.PromiseOr;
export const info = cjs.info;
export const render = cjs.render;
export const renderSync = cjs.renderSync;
export const TRUE = cjs.TRUE;
export const FALSE = cjs.FALSE;
export const NULL = cjs.NULL;
export const types = cjs.types;
export const NodePackageImporter = cjs.NodePackageImporter;
export const deprecations = cjs.deprecations;
export const Version = cjs.Version;
export const parser_ = cjs.parser_;
let printedDefaultExportDeprecation = false;
function defaultExportDeprecation() {
if (printedDefaultExportDeprecation) return;
printedDefaultExportDeprecation = true;
console.error(
"`import sass from 'sass'` is deprecated.\n" +
"Please use `import * as sass from 'sass'` instead.");
}
export default {
get compile() {
defaultExportDeprecation();
return cjs.compile;
},
get compileAsync() {
defaultExportDeprecation();
return cjs.compileAsync;
},
get compileString() {
defaultExportDeprecation();
return cjs.compileString;
},
get compileStringAsync() {
defaultExportDeprecation();
return cjs.compileStringAsync;
},
get initCompiler() {
defaultExportDeprecation();
return cjs.initCompiler;
},
get initAsyncCompiler() {
defaultExportDeprecation();
return cjs.initAsyncCompiler;
},
get Compiler() {
defaultExportDeprecation();
return cjs.Compiler;
},
get AsyncCompiler() {
defaultExportDeprecation();
return cjs.AsyncCompiler;
},
get Logger() {
defaultExportDeprecation();
return cjs.Logger;
},
get SassArgumentList() {
defaultExportDeprecation();
return cjs.SassArgumentList;
},
get SassBoolean() {
defaultExportDeprecation();
return cjs.SassBoolean;
},
get SassCalculation() {
defaultExportDeprecation();
return cjs.SassCalculation;
},
get CalculationOperation() {
defaultExportDeprecation();
return cjs.CalculationOperation;
},
get CalculationInterpolation() {
defaultExportDeprecation();
return cjs.CalculationInterpolation;
},
get SassColor() {
defaultExportDeprecation();
return cjs.SassColor;
},
get SassFunction() {
defaultExportDeprecation();
return cjs.SassFunction;
},
get SassList() {
defaultExportDeprecation();
return cjs.SassList;
},
get SassMap() {
defaultExportDeprecation();
return cjs.SassMap;
},
get SassMixin() {
defaultExportDeprecation();
return cjs.SassMixin;
},
get SassNumber() {
defaultExportDeprecation();
return cjs.SassNumber;
},
get SassString() {
defaultExportDeprecation();
return cjs.SassString;
},
get Value() {
defaultExportDeprecation();
return cjs.Value;
},
get CustomFunction() {
defaultExportDeprecation();
return cjs.CustomFunction;
},
get ListSeparator() {
defaultExportDeprecation();
return cjs.ListSeparator;
},
get sassFalse() {
defaultExportDeprecation();
return cjs.sassFalse;
},
get sassNull() {
defaultExportDeprecation();
return cjs.sassNull;
},
get sassTrue() {
defaultExportDeprecation();
return cjs.sassTrue;
},
get Exception() {
defaultExportDeprecation();
return cjs.Exception;
},
get PromiseOr() {
defaultExportDeprecation();
return cjs.PromiseOr;
},
get info() {
defaultExportDeprecation();
return cjs.info;
},
get render() {
defaultExportDeprecation();
return cjs.render;
},
get renderSync() {
defaultExportDeprecation();
return cjs.renderSync;
},
get TRUE() {
defaultExportDeprecation();
return cjs.TRUE;
},
get FALSE() {
defaultExportDeprecation();
return cjs.FALSE;
},
get NULL() {
defaultExportDeprecation();
return cjs.NULL;
},
get types() {
defaultExportDeprecation();
return cjs.types;
},
get NodePackageImporter() {
defaultExportDeprecation();
return cjs.NodePackageImporter;
},
get deprecations() {
defaultExportDeprecation();
return cjs.deprecations;
},
get Version() {
defaultExportDeprecation();
return cjs.Version;
},
get parser_() {
defaultExportDeprecation();
return cjs.parser_;
},
};

View File

@@ -0,0 +1,8 @@
var arrayWithHoles = require("./arrayWithHoles.js");
var iterableToArray = require("./iterableToArray.js");
var unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
var nonIterableRest = require("./nonIterableRest.js");
function _toArray(r) {
return arrayWithHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableRest();
}
module.exports = _toArray, module.exports.__esModule = true, module.exports["default"] = module.exports;

View File

@@ -0,0 +1,45 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { type Writable } from "../../utils.cjs";
import { MySqlColumn, MySqlColumnBuilder } from "./common.cjs";
export type MySqlTextColumnType = 'tinytext' | 'text' | 'mediumtext' | 'longtext';
export type MySqlTextBuilderInitial<TName extends string, TEnum extends [string, ...string[]]> = MySqlTextBuilder<{
name: TName;
dataType: 'string';
columnType: 'MySqlText';
data: TEnum[number];
driverParam: string;
enumValues: TEnum;
}>;
export declare class MySqlTextBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySqlText'>> extends MySqlColumnBuilder<T, {
textType: MySqlTextColumnType;
enumValues: T['enumValues'];
}> {
static readonly [entityKind]: string;
constructor(name: T['name'], textType: MySqlTextColumnType, config: MySqlTextConfig<T['enumValues']>);
}
export declare class MySqlText<T extends ColumnBaseConfig<'string', 'MySqlText'>> extends MySqlColumn<T, {
textType: MySqlTextColumnType;
enumValues: T['enumValues'];
}> {
static readonly [entityKind]: string;
readonly textType: MySqlTextColumnType;
readonly enumValues: T["enumValues"];
getSQLType(): string;
}
export interface MySqlTextConfig<TEnum extends readonly string[] | string[] | undefined = readonly string[] | string[] | undefined> {
enum?: TEnum;
}
export declare function text(): MySqlTextBuilderInitial<'', [string, ...string[]]>;
export declare function text<U extends string, T extends Readonly<[U, ...U[]]>>(config?: MySqlTextConfig<T | Writable<T>>): MySqlTextBuilderInitial<'', Writable<T>>;
export declare function text<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: MySqlTextConfig<T | Writable<T>>): MySqlTextBuilderInitial<TName, Writable<T>>;
export declare function tinytext(): MySqlTextBuilderInitial<'', [string, ...string[]]>;
export declare function tinytext<U extends string, T extends Readonly<[U, ...U[]]>>(config?: MySqlTextConfig<T | Writable<T>>): MySqlTextBuilderInitial<'', Writable<T>>;
export declare function tinytext<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: MySqlTextConfig<T | Writable<T>>): MySqlTextBuilderInitial<TName, Writable<T>>;
export declare function mediumtext(): MySqlTextBuilderInitial<'', [string, ...string[]]>;
export declare function mediumtext<U extends string, T extends Readonly<[U, ...U[]]>>(config?: MySqlTextConfig<T | Writable<T>>): MySqlTextBuilderInitial<'', Writable<T>>;
export declare function mediumtext<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: MySqlTextConfig<T | Writable<T>>): MySqlTextBuilderInitial<TName, Writable<T>>;
export declare function longtext(): MySqlTextBuilderInitial<'', [string, ...string[]]>;
export declare function longtext<U extends string, T extends Readonly<[U, ...U[]]>>(config?: MySqlTextConfig<T | Writable<T>>): MySqlTextBuilderInitial<'', Writable<T>>;
export declare function longtext<TName extends string, U extends string, T extends Readonly<[U, ...U[]]>>(name: TName, config?: MySqlTextConfig<T | Writable<T>>): MySqlTextBuilderInitial<TName, Writable<T>>;

View File

@@ -0,0 +1,71 @@
import { isBrowserBundle } from './env.js';
/**
* NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
* you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.
*/
/**
* Checks whether we're in the Node.js or Browser environment
*
* @returns Answer to given question
*/
function isNodeEnv() {
// explicitly check for browser bundles as those can be optimized statically
// by terser/rollup.
return (
!isBrowserBundle() &&
Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'
);
}
/**
* Requires a module which is protected against bundler minification.
*
* @param request The module path to resolve
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function dynamicRequire(mod, request) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
return mod.require(request);
}
/**
* Helper for dynamically loading module that should work with linked dependencies.
* The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
* However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during
* build time. `require.resolve` is also not available in any other way, so we cannot create,
* a fake helper like we do with `dynamicRequire`.
*
* We always prefer to use local package, thus the value is not returned early from each `try/catch` block.
* That is to mimic the behavior of `require.resolve` exactly.
*
* @param moduleName module name to require
* @param existingModule module to use for requiring
* @returns possibly required module
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function loadModule(moduleName, existingModule = module) {
let mod;
try {
mod = dynamicRequire(existingModule, moduleName);
} catch {
// no-empty
}
if (!mod) {
try {
const { cwd } = dynamicRequire(existingModule, 'process');
mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`) ;
} catch {
// no-empty
}
}
return mod;
}
export { isNodeEnv, loadModule };
//# sourceMappingURL=node.js.map

View File

@@ -0,0 +1,5 @@
export { ListBulkUploadButton } from './ListBulkUploadButton.js';
export { ListCreateNewButton } from './ListCreateNewDocButton.js';
export { ListCreateNewDocInFolderButton } from './ListCreateNewDocInFolderButton.js';
export { ListEmptyTrashButton } from './ListEmptyTrashButton.js';
//# sourceMappingURL=index.d.ts.map

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