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,32 @@
import { Query } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/delete/items.d.ts
/**
* Delete multiple existing items.
*
* @param collection The collection of the items
* @param keysOrQuery The primary keys or a query
*
* @returns Nothing
* @throws Will throw if collection is empty
* @throws Will throw if collection is a core collection
* @throws Will throw if keysOrQuery is empty
*/
declare const deleteItems: <Schema, Collection extends keyof Schema, const TQuery extends Query<Schema, Schema[Collection]>>(collection: Collection, keysOrQuery: string[] | number[] | TQuery) => RestCommand<void, Schema>;
/**
* Delete an existing item.
*
* @param collection The collection of the item
* @param key The primary key of the item
*
* @returns Nothing
* @throws Will throw if collection is empty
* @throws Will throw if collection is a core collection
* @throws Will throw if key is empty
*/
declare const deleteItem: <Schema, Collection extends keyof Schema>(collection: Collection, key: string | number) => RestCommand<void, Schema>;
//#endregion
export { deleteItem, deleteItems };
//# sourceMappingURL=items.d.ts.map

View File

@@ -0,0 +1,111 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import * as React from 'react';
import { Banner } from '../../elements/Banner/index.js';
import { CheckboxField } from '../../fields/Checkbox/index.js';
import { useConfig } from '../../providers/Config/index.js';
import { useLocale } from '../../providers/Locale/index.js';
import { useTranslation } from '../../providers/Translation/index.js';
import { useForm } from '../Form/context.js';
import './index.scss';
const baseClass = 'nullify-locale-field';
export const NullifyLocaleField = t0 => {
const $ = _c(13);
const {
fieldValue,
localized,
path,
readOnly: t1
} = t0;
const readOnly = t1 === undefined ? false : t1;
const {
code: currentLocale
} = useLocale();
const {
config: t2
} = useConfig();
const {
localization
} = t2;
const [checked, setChecked] = React.useState(typeof fieldValue !== "number");
const {
t
} = useTranslation();
const {
dispatchFields,
setModified
} = useForm();
if (!localized || !localization) {
return null;
}
if (localization.defaultLocale === currentLocale || !localization.fallback) {
return null;
}
let t3;
if ($[0] !== checked || $[1] !== dispatchFields || $[2] !== fieldValue || $[3] !== path || $[4] !== setModified) {
t3 = () => {
const useFallback = !checked;
dispatchFields({
type: "UPDATE",
path,
value: useFallback ? null : fieldValue || 0
});
setModified(true);
setChecked(useFallback);
};
$[0] = checked;
$[1] = dispatchFields;
$[2] = fieldValue;
$[3] = path;
$[4] = setModified;
$[5] = t3;
} else {
t3 = $[5];
}
const onChange = t3;
if (fieldValue) {
let hideCheckbox = false;
if (typeof fieldValue === "number" && fieldValue > 0) {
hideCheckbox = true;
}
if (Array.isArray(fieldValue) && fieldValue.length > 0) {
hideCheckbox = true;
}
if (hideCheckbox) {
if (checked) {
setChecked(false);
}
return null;
}
}
let t4;
if ($[6] !== checked || $[7] !== fieldValue || $[8] !== onChange || $[9] !== path || $[10] !== readOnly || $[11] !== t) {
t4 = _jsx(Banner, {
className: baseClass,
children: !fieldValue && readOnly ? t("general:fallbackToDefaultLocale") : _jsx(CheckboxField, {
checked,
field: {
name: "",
label: t("general:fallbackToDefaultLocale")
},
id: `field-${path.replace(/\./g, "__")}`,
onChange,
path,
schemaPath: ""
})
});
$[6] = checked;
$[7] = fieldValue;
$[8] = onChange;
$[9] = path;
$[10] = readOnly;
$[11] = t;
$[12] = t4;
} else {
t4 = $[12];
}
return t4;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,22 @@
var createCaseFirst = require('./_createCaseFirst');
/**
* Converts the first character of `string` to lower case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.lowerFirst('Fred');
* // => 'fred'
*
* _.lowerFirst('FRED');
* // => 'fRED'
*/
var lowerFirst = createCaseFirst('toLowerCase');
module.exports = lowerFirst;

View File

@@ -0,0 +1,6 @@
'use strict'
exports = module.exports = require('./decode')
exports.Encoder = require('./encoder')
exports.Decoder = require('./decoder')

View File

@@ -0,0 +1,32 @@
import { entityKind } from "../../entity.js";
class Cache {
static [entityKind] = "Cache";
}
class NoopCache extends Cache {
strategy() {
return "all";
}
static [entityKind] = "NoopCache";
async get(_key) {
return void 0;
}
async put(_hashedQuery, _response, _tables, _config) {
}
async onMutate(_params) {
}
}
async function hashQuery(sql, params) {
const dataToHash = `${sql}-${JSON.stringify(params)}`;
const encoder = new TextEncoder();
const data = encoder.encode(dataToHash);
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
const hashArray = [...new Uint8Array(hashBuffer)];
const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
return hashHex;
}
export {
Cache,
NoopCache,
hashQuery
};
//# sourceMappingURL=cache.js.map

View File

@@ -0,0 +1,20 @@
import type { ServerFunction } from 'payload';
import React from 'react';
export type RenderWidgetServerFnArgs = {
/**
* Instance-specific data for this widget
*/
/**
* The slug of the widget to render
*/
widgetSlug: string;
};
export type RenderWidgetServerFnReturnType = {
component: React.ReactNode;
};
/**
* Server function to render a widget on-demand.
* Similar to render-field but specifically for dashboard widgets.
*/
export declare const renderWidgetHandler: ServerFunction<RenderWidgetServerFnArgs, RenderWidgetServerFnReturnType>;
//# sourceMappingURL=renderWidgetServerFn.d.ts.map

View File

@@ -0,0 +1 @@
import{cache as t}from"react";import o from"./getConfig.js";const r=t((async function(t){return(await o(t)).now}));export{r as default};

View File

@@ -0,0 +1,30 @@
import { complex } from './index.mjs';
import { floatRegex } from '../utils/float-regex.mjs';
/**
* Properties that should default to 1 or 100%
*/
const maxDefaults = new Set(["brightness", "contrast", "saturate", "opacity"]);
function applyDefaultFilter(v) {
const [name, value] = v.slice(0, -1).split("(");
if (name === "drop-shadow")
return v;
const [number] = value.match(floatRegex) || [];
if (!number)
return v;
const unit = value.replace(number, "");
let defaultValue = maxDefaults.has(name) ? 1 : 0;
if (number !== value)
defaultValue *= 100;
return name + "(" + defaultValue + unit + ")";
}
const functionRegex = /\b([a-z-]*)\(.*?\)/gu;
const filter = {
...complex,
getAnimatableNone: (v) => {
const functions = v.match(functionRegex);
return functions ? functions.map(applyDefaultFilter).join(" ") : v;
},
};
export { filter };

View File

@@ -0,0 +1,9 @@
import { ISizeCalculationResult } from './types/interface.js';
declare const setConcurrency: (c: number) => void;
/**
* @param {string} filePath - relative/absolute path of the image file
*/
declare const imageSizeFromFile: (filePath: string) => Promise<ISizeCalculationResult>;
export { imageSizeFromFile, setConcurrency };

View File

@@ -0,0 +1,25 @@
"use strict";
var _define_property = require("./_define_property.cjs");
function _object_spread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === "function") {
ownKeys = ownKeys.concat(
Object.getOwnPropertySymbols(source).filter(function(sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
})
);
}
ownKeys.forEach(function(key) {
_define_property._(target, key, source[key]);
});
}
return target;
}
exports._ = _object_spread;

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env node
console.error(
'`pino` cli has been removed. Use `pino-pretty` cli instead.\n' +
'\nSee: https://github.com/pinojs/pino-pretty'
)
process.exit(1)

View File

@@ -0,0 +1,15 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: "'նախորդ' eeee p'֊ին'",
yesterday: "'երեկ' p'֊ին'",
today: "'այսօր' p'֊ին'",
tomorrow: "'վաղը' p'֊ին'",
nextWeek: "'հաջորդ' eeee p'֊ին'",
other: "P",
};
const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1 @@
{"version":3,"file":"bed.js","sources":["../../../src/icons/bed.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Bed\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiA0djE2IiAvPgogIDxwYXRoIGQ9Ik0yIDhoMThhMiAyIDAgMCAxIDIgMnYxMCIgLz4KICA8cGF0aCBkPSJNMiAxN2gyMCIgLz4KICA8cGF0aCBkPSJNNiA4djkiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/bed\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 Bed = createLucideIcon('Bed', [\n ['path', { d: 'M2 4v16', key: 'vw9hq8' }],\n ['path', { d: 'M2 8h18a2 2 0 0 1 2 2v10', key: '1dgv2r' }],\n ['path', { d: 'M2 17h20', key: '18nfp3' }],\n ['path', { d: 'M6 8v9', key: '1yriud' }],\n]);\n\nexport default Bed;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAiB,KAAO,CAAA,CAAA,CAAA;AAAA,CAAA,CAClC,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,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,65 @@
import { entityKind } from "../../entity.js";
import { getColumnNameAndConfig } from "../../utils.js";
import { SingleStoreColumn, SingleStoreColumnBuilder } from "./common.js";
class SingleStoreDateBuilder extends SingleStoreColumnBuilder {
static [entityKind] = "SingleStoreDateBuilder";
constructor(name) {
super(name, "date", "SingleStoreDate");
}
/** @internal */
build(table) {
return new SingleStoreDate(
table,
this.config
);
}
}
class SingleStoreDate extends SingleStoreColumn {
static [entityKind] = "SingleStoreDate";
constructor(table, config) {
super(table, config);
}
getSQLType() {
return `date`;
}
mapFromDriverValue(value) {
return new Date(value);
}
}
class SingleStoreDateStringBuilder extends SingleStoreColumnBuilder {
static [entityKind] = "SingleStoreDateStringBuilder";
constructor(name) {
super(name, "string", "SingleStoreDateString");
}
/** @internal */
build(table) {
return new SingleStoreDateString(
table,
this.config
);
}
}
class SingleStoreDateString extends SingleStoreColumn {
static [entityKind] = "SingleStoreDateString";
constructor(table, config) {
super(table, config);
}
getSQLType() {
return `date`;
}
}
function date(a, b) {
const { name, config } = getColumnNameAndConfig(a, b);
if (config?.mode === "string") {
return new SingleStoreDateStringBuilder(name);
}
return new SingleStoreDateBuilder(name);
}
export {
SingleStoreDate,
SingleStoreDateBuilder,
SingleStoreDateString,
SingleStoreDateStringBuilder,
date
};
//# sourceMappingURL=date.js.map

View File

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

View File

@@ -0,0 +1,406 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { HookMap, SyncBailHook, SyncWaterfallHook } = require("tapable");
const { concatComparators, keepOriginalOrder } = require("../util/comparators");
const smartGrouping = require("../util/smartGrouping");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../ChunkGroup").OriginRecord} OriginRecord */
/** @typedef {import("../Compilation")} Compilation */
/** @typedef {import("../Compilation").Asset} Asset */
/** @typedef {import("../Compilation").NormalizedStatsOptions} NormalizedStatsOptions */
/** @typedef {import("../Dependency")} Dependency */
/** @typedef {import("../Module")} Module */
/** @typedef {import("../ModuleGraph").ModuleProfile} ModuleProfile */
/** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */
/** @typedef {import("../WebpackError")} WebpackError */
/** @typedef {import("../util/comparators").Comparator<EXPECTED_ANY>} Comparator */
/** @typedef {import("../util/runtime").RuntimeSpec} RuntimeSpec */
/**
* @template T, R
* @typedef {import("../util/smartGrouping").GroupConfig<T, R>} GroupConfig
*/
/** @typedef {import("./DefaultStatsFactoryPlugin").ChunkGroupInfoWithName} ChunkGroupInfoWithName */
/** @typedef {import("./DefaultStatsFactoryPlugin").ModuleIssuerPath} ModuleIssuerPath */
/** @typedef {import("./DefaultStatsFactoryPlugin").ModuleTrace} ModuleTrace */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsAsset} StatsAsset */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsChunk} StatsChunk */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsChunkGroup} StatsChunkGroup */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsChunkOrigin} StatsChunkOrigin */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsCompilation} StatsCompilation */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsError} StatsError */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsModule} StatsModule */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsModuleIssuer} StatsModuleIssuer */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsModuleReason} StatsModuleReason */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsModuleTraceDependency} StatsModuleTraceDependency */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsModuleTraceItem} StatsModuleTraceItem */
/** @typedef {import("./DefaultStatsFactoryPlugin").StatsProfile} StatsProfile */
/**
* @typedef {object} KnownStatsFactoryContext
* @property {string} type
* @property {Compilation} compilation
* @property {(path: string) => string} makePathsRelative
* @property {Set<Module>} rootModules
* @property {Map<string, Chunk[]>} compilationFileToChunks
* @property {Map<string, Chunk[]>} compilationAuxiliaryFileToChunks
* @property {RuntimeSpec} runtime
* @property {(compilation: Compilation) => Error[]} cachedGetErrors
* @property {(compilation: Compilation) => Error[]} cachedGetWarnings
*/
/** @typedef {KnownStatsFactoryContext & Record<string, EXPECTED_ANY>} StatsFactoryContext */
// StatsLogging StatsLoggingEntry
/**
* @template T
* @template F
* @typedef {T extends Compilation ? StatsCompilation : T extends ChunkGroupInfoWithName ? StatsChunkGroup : T extends Chunk ? StatsChunk : T extends OriginRecord ? StatsChunkOrigin : T extends Module ? StatsModule : T extends ModuleGraphConnection ? StatsModuleReason : T extends Asset ? StatsAsset : T extends ModuleTrace ? StatsModuleTraceItem : T extends Dependency ? StatsModuleTraceDependency : T extends Error ? StatsError : T extends ModuleProfile ? StatsProfile : F} StatsObject
*/
/**
* @template T
* @template F
* @typedef {T extends ChunkGroupInfoWithName[] ? Record<string, StatsObject<ChunkGroupInfoWithName, F>> : T extends (infer V)[] ? StatsObject<V, F>[] : StatsObject<T, F>} CreatedObject
*/
/** @typedef {EXPECTED_ANY} ObjectForExtract */
/** @typedef {EXPECTED_ANY} FactoryData */
/** @typedef {EXPECTED_ANY} FactoryDataItem */
/** @typedef {EXPECTED_ANY} Result */
/**
* @typedef {object} StatsFactoryHooks
* @property {HookMap<SyncBailHook<[ObjectForExtract, FactoryData, StatsFactoryContext], void>>} extract
* @property {HookMap<SyncBailHook<[FactoryDataItem, StatsFactoryContext, number, number], boolean | void>>} filter
* @property {HookMap<SyncBailHook<[Comparator[], StatsFactoryContext], void>>} sort
* @property {HookMap<SyncBailHook<[FactoryDataItem, StatsFactoryContext, number, number], boolean | void>>} filterSorted
* @property {HookMap<SyncBailHook<[GroupConfig<EXPECTED_ANY, EXPECTED_ANY>[], StatsFactoryContext], void>>} groupResults
* @property {HookMap<SyncBailHook<[Comparator[], StatsFactoryContext], void>>} sortResults
* @property {HookMap<SyncBailHook<[FactoryDataItem, StatsFactoryContext, number, number], boolean | void>>} filterResults
* @property {HookMap<SyncBailHook<[FactoryDataItem[], StatsFactoryContext], Result | void>>} merge
* @property {HookMap<SyncBailHook<[Result, StatsFactoryContext], Result>>} result
* @property {HookMap<SyncBailHook<[FactoryDataItem, StatsFactoryContext], string | void>>} getItemName
* @property {HookMap<SyncBailHook<[FactoryDataItem, StatsFactoryContext], StatsFactory | void>>} getItemFactory
*/
/**
* @template T
* @typedef {Map<string, T[]>} Caches
*/
class StatsFactory {
constructor() {
/** @type {StatsFactoryHooks} */
this.hooks = Object.freeze({
extract: new HookMap(
() => new SyncBailHook(["object", "data", "context"])
),
filter: new HookMap(
() => new SyncBailHook(["item", "context", "index", "unfilteredIndex"])
),
sort: new HookMap(() => new SyncBailHook(["comparators", "context"])),
filterSorted: new HookMap(
() => new SyncBailHook(["item", "context", "index", "unfilteredIndex"])
),
groupResults: new HookMap(
() => new SyncBailHook(["groupConfigs", "context"])
),
sortResults: new HookMap(
() => new SyncBailHook(["comparators", "context"])
),
filterResults: new HookMap(
() => new SyncBailHook(["item", "context", "index", "unfilteredIndex"])
),
merge: new HookMap(() => new SyncBailHook(["items", "context"])),
result: new HookMap(() => new SyncWaterfallHook(["result", "context"])),
getItemName: new HookMap(() => new SyncBailHook(["item", "context"])),
getItemFactory: new HookMap(() => new SyncBailHook(["item", "context"]))
});
const hooks = this.hooks;
this._caches =
/** @type {{ [Key in keyof StatsFactoryHooks]: Map<string, SyncBailHook<EXPECTED_ANY, EXPECTED_ANY>[]> }} */ ({});
for (const key of Object.keys(hooks)) {
this._caches[/** @type {keyof StatsFactoryHooks} */ (key)] = new Map();
}
this._inCreate = false;
}
/**
* @template {StatsFactoryHooks[keyof StatsFactoryHooks]} HM
* @template {HM extends HookMap<infer H> ? H : never} H
* @param {HM} hookMap hook map
* @param {Caches<H>} cache cache
* @param {string} type type
* @returns {H[]} hooks
* @private
*/
_getAllLevelHooks(hookMap, cache, type) {
const cacheEntry = cache.get(type);
if (cacheEntry !== undefined) {
return cacheEntry;
}
const hooks = /** @type {H[]} */ ([]);
const typeParts = type.split(".");
for (let i = 0; i < typeParts.length; i++) {
const hook = /** @type {H} */ (hookMap.get(typeParts.slice(i).join(".")));
if (hook) {
hooks.push(hook);
}
}
cache.set(type, hooks);
return hooks;
}
/**
* @template {StatsFactoryHooks[keyof StatsFactoryHooks]} HM
* @template {HM extends HookMap<infer H> ? H : never} H
* @template {H extends import("tapable").Hook<EXPECTED_ANY, infer R> ? R : never} R
* @param {HM} hookMap hook map
* @param {Caches<H>} cache cache
* @param {string} type type
* @param {(hook: H) => R | void} fn fn
* @returns {R | void} hook
* @private
*/
_forEachLevel(hookMap, cache, type, fn) {
for (const hook of this._getAllLevelHooks(hookMap, cache, type)) {
const result = fn(/** @type {H} */ (hook));
if (result !== undefined) return result;
}
}
/**
* @template {StatsFactoryHooks[keyof StatsFactoryHooks]} HM
* @template {HM extends HookMap<infer H> ? H : never} H
* @param {HM} hookMap hook map
* @param {Caches<H>} cache cache
* @param {string} type type
* @param {FactoryData} data data
* @param {(hook: H, factoryData: FactoryData) => FactoryData} fn fn
* @returns {FactoryData} data
* @private
*/
_forEachLevelWaterfall(hookMap, cache, type, data, fn) {
for (const hook of this._getAllLevelHooks(hookMap, cache, type)) {
data = fn(/** @type {H} */ (hook), data);
}
return data;
}
/**
* @template {StatsFactoryHooks[keyof StatsFactoryHooks]} T
* @template {T extends HookMap<infer H> ? H : never} H
* @template {H extends import("tapable").Hook<EXPECTED_ANY, infer R> ? R : never} R
* @param {T} hookMap hook map
* @param {Caches<H>} cache cache
* @param {string} type type
* @param {FactoryData[]} items items
* @param {(hook: H, item: R, idx: number, i: number) => R | undefined} fn fn
* @param {boolean} forceClone force clone
* @returns {R[]} result for each level
* @private
*/
_forEachLevelFilter(hookMap, cache, type, items, fn, forceClone) {
const hooks = this._getAllLevelHooks(hookMap, cache, type);
if (hooks.length === 0) return forceClone ? [...items] : items;
let i = 0;
return items.filter((item, idx) => {
for (const hook of hooks) {
const r = fn(/** @type {H} */ (hook), item, idx, i);
if (r !== undefined) {
if (r) i++;
return r;
}
}
i++;
return true;
});
}
/**
* @template FactoryData
* @template FallbackCreatedObject
* @param {string} type type
* @param {FactoryData} data factory data
* @param {Omit<StatsFactoryContext, "type">} baseContext context used as base
* @returns {CreatedObject<FactoryData, FallbackCreatedObject>} created object
*/
create(type, data, baseContext) {
if (this._inCreate) {
return this._create(type, data, baseContext);
}
try {
this._inCreate = true;
return this._create(type, data, baseContext);
} finally {
for (const key of Object.keys(this._caches)) {
this._caches[/** @type {keyof StatsFactoryHooks} */ (key)].clear();
}
this._inCreate = false;
}
}
/**
* @private
* @template FactoryData
* @template FallbackCreatedObject
* @param {string} type type
* @param {FactoryData} data factory data
* @param {Omit<StatsFactoryContext, "type">} baseContext context used as base
* @returns {CreatedObject<FactoryData, FallbackCreatedObject>} created object
*/
_create(type, data, baseContext) {
const context = /** @type {StatsFactoryContext} */ ({
...baseContext,
type,
[type]: data
});
if (Array.isArray(data)) {
// run filter on unsorted items
const items = this._forEachLevelFilter(
this.hooks.filter,
this._caches.filter,
type,
data,
(h, r, idx, i) => h.call(r, context, idx, i),
true
);
// sort items
/** @type {Comparator[]} */
const comparators = [];
this._forEachLevel(this.hooks.sort, this._caches.sort, type, (h) =>
h.call(comparators, context)
);
if (comparators.length > 0) {
items.sort(
// @ts-expect-error number of arguments is correct
concatComparators(...comparators, keepOriginalOrder(items))
);
}
// run filter on sorted items
const items2 = this._forEachLevelFilter(
this.hooks.filterSorted,
this._caches.filterSorted,
type,
items,
(h, r, idx, i) => h.call(r, context, idx, i),
false
);
// for each item
let resultItems = items2.map((item, i) => {
/** @type {StatsFactoryContext} */
const itemContext = {
...context,
_index: i
};
// run getItemName
const itemName = this._forEachLevel(
this.hooks.getItemName,
this._caches.getItemName,
`${type}[]`,
(h) => h.call(item, itemContext)
);
if (itemName) itemContext[itemName] = item;
const innerType = itemName ? `${type}[].${itemName}` : `${type}[]`;
// run getItemFactory
const itemFactory =
this._forEachLevel(
this.hooks.getItemFactory,
this._caches.getItemFactory,
innerType,
(h) => h.call(item, itemContext)
) || this;
// run item factory
return itemFactory.create(innerType, item, itemContext);
});
// sort result items
/** @type {Comparator[]} */
const comparators2 = [];
this._forEachLevel(
this.hooks.sortResults,
this._caches.sortResults,
type,
(h) => h.call(comparators2, context)
);
if (comparators2.length > 0) {
resultItems.sort(
// @ts-expect-error number of arguments is correct
concatComparators(...comparators2, keepOriginalOrder(resultItems))
);
}
// group result items
/** @type {GroupConfig<EXPECTED_ANY, EXPECTED_ANY>[]} */
const groupConfigs = [];
this._forEachLevel(
this.hooks.groupResults,
this._caches.groupResults,
type,
(h) => h.call(groupConfigs, context)
);
if (groupConfigs.length > 0) {
resultItems = smartGrouping(resultItems, groupConfigs);
}
// run filter on sorted result items
const finalResultItems = this._forEachLevelFilter(
this.hooks.filterResults,
this._caches.filterResults,
type,
resultItems,
(h, r, idx, i) => h.call(r, context, idx, i),
false
);
// run merge on mapped items
let result = this._forEachLevel(
this.hooks.merge,
this._caches.merge,
type,
(h) => h.call(finalResultItems, context)
);
if (result === undefined) result = finalResultItems;
// run result on merged items
return this._forEachLevelWaterfall(
this.hooks.result,
this._caches.result,
type,
result,
(h, r) => h.call(r, context)
);
}
/** @type {ObjectForExtract} */
const object = {};
// run extract on value
this._forEachLevel(this.hooks.extract, this._caches.extract, type, (h) =>
h.call(object, data, context)
);
// run result on extracted object
return this._forEachLevelWaterfall(
this.hooks.result,
this._caches.result,
type,
object,
(h, r) => h.call(r, context)
);
}
}
module.exports = StatsFactory;

View File

@@ -0,0 +1,23 @@
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
export const Success = () => {
return /*#__PURE__*/_jsxs("svg", {
fill: "none",
height: "26",
viewBox: "0 0 26 26",
width: "26",
xmlns: "http://www.w3.org/2000/svg",
children: [/*#__PURE__*/_jsx("path", {
d: "M13 21C17.4183 21 21 17.4183 21 13C21 8.58172 17.4183 5 13 5C8.58172 5 5 8.58172 5 13C5 17.4183 8.58172 21 13 21Z",
fill: "var(--theme-success-500)"
}), /*#__PURE__*/_jsx("path", {
d: "M10.6001 13.0004L12.2001 14.6004L15.4001 11.4004",
stroke: "var(--theme-success-50)",
strokeLinecap: "round",
strokeLinejoin: "round"
})]
});
};
//# sourceMappingURL=Success.js.map

View File

@@ -0,0 +1,4 @@
import type { DefaultTranslationsObject, Language } from '../types.js';
export declare const lvTranslations: DefaultTranslationsObject;
export declare const lv: Language;
//# sourceMappingURL=lv.d.ts.map

View File

@@ -0,0 +1,29 @@
import { formatDistance } from "./en-US/_lib/formatDistance.js";
import { formatRelative } from "./en-US/_lib/formatRelative.js";
import { localize } from "./en-US/_lib/localize.js";
import { match } from "./en-US/_lib/match.js";
import { formatLong } from "./en-GB/_lib/formatLong.js";
/**
* @category Locales
* @summary English locale (Ireland).
* @language English
* @iso-639-2 eng
* @author Tetiana [@tan75](https://github.com/tan75)
*/
export const enIE = {
code: "en-IE",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default enIE;

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 SquarePilcrow = createLucideIcon("SquarePilcrow", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M12 12H9.5a2.5 2.5 0 0 1 0-5H17", key: "1l9586" }],
["path", { d: "M12 7v10", key: "jspqdw" }],
["path", { d: "M16 7v10", key: "lavkr4" }]
]);
export { SquarePilcrow as default };
//# sourceMappingURL=square-pilcrow.js.map

View File

@@ -0,0 +1,2 @@
// Needed for projects with `moduleResolution: 'node'`
export * from './dist/types/routing';

View File

@@ -0,0 +1,27 @@
"use strict";
exports.isThisSecond = isThisSecond;
var _index = require("./constructNow.cjs");
var _index2 = require("./isSameSecond.cjs");
/**
* @name isThisSecond
* @category Second Helpers
* @summary Is the given date in the same second as the current date?
* @pure false
*
* @description
* Is the given date in the same second as the current date?
*
* @param date - The date to check
*
* @returns The date is in this second
*
* @example
* // If now is 25 September 2014 18:30:15.500,
* // is 25 September 2014 18:30:15.000 in this second?
* const result = isThisSecond(new Date(2014, 8, 25, 18, 30, 15))
* //=> true
*/
function isThisSecond(date) {
return (0, _index2.isSameSecond)(date, (0, _index.constructNow)(date));
}

View File

@@ -0,0 +1,33 @@
/**
* Bounding boxes tend to be defined as top, left, right, bottom. For various operations
* it's easier to consider each axis individually. This function returns a bounding box
* as a map of single-axis min/max values.
*/
function convertBoundingBoxToBox({ top, left, right, bottom, }) {
return {
x: { min: left, max: right },
y: { min: top, max: bottom },
};
}
function convertBoxToBoundingBox({ x, y }) {
return { top: y.min, right: x.max, bottom: y.max, left: x.min };
}
/**
* Applies a TransformPoint function to a bounding box. TransformPoint is usually a function
* provided by Framer to allow measured points to be corrected for device scaling. This is used
* when measuring DOM elements and DOM event points.
*/
function transformBoxPoints(point, transformPoint) {
if (!transformPoint)
return point;
const topLeft = transformPoint({ x: point.left, y: point.top });
const bottomRight = transformPoint({ x: point.right, y: point.bottom });
return {
top: topLeft.y,
left: topLeft.x,
bottom: bottomRight.y,
right: bottomRight.x,
};
}
export { convertBoundingBoxToBox, convertBoxToBoundingBox, transformBoxPoints };

View File

@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE, d. MMMM y",
long: "d. MMMM y",
medium: "d. MMM y",
short: "dd.MM.y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'kell' {{time}}",
long: "{{date}} 'kell' {{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,5 @@
import type { PayloadRequest, VisibleEntities } from 'payload';
export declare function getVisibleEntities({ req }: {
req: PayloadRequest;
}): VisibleEntities;
//# sourceMappingURL=getVisibleEntities.d.ts.map

View File

@@ -0,0 +1,21 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.VERSION = void 0;
// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '0.207.0';
//# sourceMappingURL=version.js.map

View File

@@ -0,0 +1,23 @@
"use strict";
var _object_without_properties_loose = require("./_object_without_properties_loose.cjs");
function _object_without_properties(source, excluded) {
if (source == null) return {};
var target = _object_without_properties_loose._(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
exports._ = _object_without_properties;

View File

@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=(t,n,r)=>()=>(e.throwIfEmpty(t,`Keys cannot be empty`),{path:`/shares`,params:r??{},body:JSON.stringify({keys:t,data:n}),method:`PATCH`}),n=(e,t)=>()=>({path:`/shares`,params:t??{},body:JSON.stringify(e),method:`PATCH`}),r=(t,n,r)=>()=>(e.throwIfEmpty(t,`Key cannot be empty`),{path:`/shares/${t}`,params:r??{},body:JSON.stringify(n),method:`PATCH`});exports.updateShare=r,exports.updateShares=t,exports.updateSharesBatch=n;
//# sourceMappingURL=shares.cjs.map

View File

@@ -0,0 +1,90 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var migrator_exports = {};
__export(migrator_exports, {
migrate: () => migrate,
useMigrations: () => useMigrations
});
module.exports = __toCommonJS(migrator_exports);
var import_react = require("react");
async function readMigrationFiles({ journal, migrations }) {
const migrationQueries = [];
for await (const journalEntry of journal.entries) {
const query = migrations[`m${journalEntry.idx.toString().padStart(4, "0")}`];
if (!query) {
throw new Error(`Missing migration: ${journalEntry.tag}`);
}
try {
const result = query.split("--> statement-breakpoint").map((it) => {
return it;
});
migrationQueries.push({
sql: result,
bps: journalEntry.breakpoints,
folderMillis: journalEntry.when,
hash: ""
});
} catch {
throw new Error(`Failed to parse migration: ${journalEntry.tag}`);
}
}
return migrationQueries;
}
async function migrate(db, config) {
const migrations = await readMigrationFiles(config);
return db.dialect.migrate(migrations, db.session);
}
const useMigrations = (db, migrations) => {
const initialState = {
success: false,
error: void 0
};
const fetchReducer = (state2, action) => {
switch (action.type) {
case "migrating": {
return { ...initialState };
}
case "migrated": {
return { ...initialState, success: action.payload };
}
case "error": {
return { ...initialState, error: action.payload };
}
default: {
return state2;
}
}
};
const [state, dispatch] = (0, import_react.useReducer)(fetchReducer, initialState);
(0, import_react.useEffect)(() => {
dispatch({ type: "migrating" });
migrate(db, migrations).then(() => {
dispatch({ type: "migrated", payload: true });
}).catch((error) => {
dispatch({ type: "error", payload: error });
});
}, []);
return state;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
migrate,
useMigrations
});
//# sourceMappingURL=migrator.cjs.map

View File

@@ -0,0 +1,18 @@
/**
* 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.
*
* @flow strict
*/
import type {TextNode} from 'lexical';
export type EntityMatch = {end: number, start: number};
declare export function useLexicalTextEntity<N: TextNode>(
getMatch: (text: string) => null | EntityMatch,
targetNode: Class<N>,
createNode: (textNode: TextNode) => N,
): void;

View File

@@ -0,0 +1 @@
{"version":3,"file":"gallery-vertical.js","sources":["../../../src/icons/gallery-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GalleryVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAyaDE4IiAvPgogIDxyZWN0IHdpZHRoPSIxOCIgaGVpZ2h0PSIxMiIgeD0iMyIgeT0iNiIgcng9IjIiIC8+CiAgPHBhdGggZD0iTTMgMjJoMTgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/gallery-vertical\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 GalleryVertical = createLucideIcon('GalleryVertical', [\n ['path', { d: 'M3 2h18', key: '15qxfx' }],\n ['rect', { width: '18', height: '12', x: '3', y: '6', rx: '2', key: '1439r6' }],\n ['path', { d: 'M3 22h18', key: '8prr45' }],\n]);\n\nexport default GalleryVertical;\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,CAAkB,iBAAiB,iBAAmB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,602 @@
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "^Duplex" }] */
'use strict';
const { Duplex } = require('stream');
const { randomFillSync } = require('crypto');
const PerMessageDeflate = require('./permessage-deflate');
const { EMPTY_BUFFER, kWebSocket, NOOP } = require('./constants');
const { isBlob, isValidStatusCode } = require('./validation');
const { mask: applyMask, toBuffer } = require('./buffer-util');
const kByteLength = Symbol('kByteLength');
const maskBuffer = Buffer.alloc(4);
const RANDOM_POOL_SIZE = 8 * 1024;
let randomPool;
let randomPoolPointer = RANDOM_POOL_SIZE;
const DEFAULT = 0;
const DEFLATING = 1;
const GET_BLOB_DATA = 2;
/**
* HyBi Sender implementation.
*/
class Sender {
/**
* Creates a Sender instance.
*
* @param {Duplex} socket The connection socket
* @param {Object} [extensions] An object containing the negotiated extensions
* @param {Function} [generateMask] The function used to generate the masking
* key
*/
constructor(socket, extensions, generateMask) {
this._extensions = extensions || {};
if (generateMask) {
this._generateMask = generateMask;
this._maskBuffer = Buffer.alloc(4);
}
this._socket = socket;
this._firstFragment = true;
this._compress = false;
this._bufferedBytes = 0;
this._queue = [];
this._state = DEFAULT;
this.onerror = NOOP;
this[kWebSocket] = undefined;
}
/**
* Frames a piece of data according to the HyBi WebSocket protocol.
*
* @param {(Buffer|String)} data The data to frame
* @param {Object} options Options object
* @param {Boolean} [options.fin=false] Specifies whether or not to set the
* FIN bit
* @param {Function} [options.generateMask] The function used to generate the
* masking key
* @param {Boolean} [options.mask=false] Specifies whether or not to mask
* `data`
* @param {Buffer} [options.maskBuffer] The buffer used to store the masking
* key
* @param {Number} options.opcode The opcode
* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
* modified
* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
* RSV1 bit
* @return {(Buffer|String)[]} The framed data
* @public
*/
static frame(data, options) {
let mask;
let merge = false;
let offset = 2;
let skipMasking = false;
if (options.mask) {
mask = options.maskBuffer || maskBuffer;
if (options.generateMask) {
options.generateMask(mask);
} else {
if (randomPoolPointer === RANDOM_POOL_SIZE) {
/* istanbul ignore else */
if (randomPool === undefined) {
//
// This is lazily initialized because server-sent frames must not
// be masked so it may never be used.
//
randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
}
randomFillSync(randomPool, 0, RANDOM_POOL_SIZE);
randomPoolPointer = 0;
}
mask[0] = randomPool[randomPoolPointer++];
mask[1] = randomPool[randomPoolPointer++];
mask[2] = randomPool[randomPoolPointer++];
mask[3] = randomPool[randomPoolPointer++];
}
skipMasking = (mask[0] | mask[1] | mask[2] | mask[3]) === 0;
offset = 6;
}
let dataLength;
if (typeof data === 'string') {
if (
(!options.mask || skipMasking) &&
options[kByteLength] !== undefined
) {
dataLength = options[kByteLength];
} else {
data = Buffer.from(data);
dataLength = data.length;
}
} else {
dataLength = data.length;
merge = options.mask && options.readOnly && !skipMasking;
}
let payloadLength = dataLength;
if (dataLength >= 65536) {
offset += 8;
payloadLength = 127;
} else if (dataLength > 125) {
offset += 2;
payloadLength = 126;
}
const target = Buffer.allocUnsafe(merge ? dataLength + offset : offset);
target[0] = options.fin ? options.opcode | 0x80 : options.opcode;
if (options.rsv1) target[0] |= 0x40;
target[1] = payloadLength;
if (payloadLength === 126) {
target.writeUInt16BE(dataLength, 2);
} else if (payloadLength === 127) {
target[2] = target[3] = 0;
target.writeUIntBE(dataLength, 4, 6);
}
if (!options.mask) return [target, data];
target[1] |= 0x80;
target[offset - 4] = mask[0];
target[offset - 3] = mask[1];
target[offset - 2] = mask[2];
target[offset - 1] = mask[3];
if (skipMasking) return [target, data];
if (merge) {
applyMask(data, mask, target, offset, dataLength);
return [target];
}
applyMask(data, mask, data, 0, dataLength);
return [target, data];
}
/**
* Sends a close message to the other peer.
*
* @param {Number} [code] The status code component of the body
* @param {(String|Buffer)} [data] The message component of the body
* @param {Boolean} [mask=false] Specifies whether or not to mask the message
* @param {Function} [cb] Callback
* @public
*/
close(code, data, mask, cb) {
let buf;
if (code === undefined) {
buf = EMPTY_BUFFER;
} else if (typeof code !== 'number' || !isValidStatusCode(code)) {
throw new TypeError('First argument must be a valid error code number');
} else if (data === undefined || !data.length) {
buf = Buffer.allocUnsafe(2);
buf.writeUInt16BE(code, 0);
} else {
const length = Buffer.byteLength(data);
if (length > 123) {
throw new RangeError('The message must not be greater than 123 bytes');
}
buf = Buffer.allocUnsafe(2 + length);
buf.writeUInt16BE(code, 0);
if (typeof data === 'string') {
buf.write(data, 2);
} else {
buf.set(data, 2);
}
}
const options = {
[kByteLength]: buf.length,
fin: true,
generateMask: this._generateMask,
mask,
maskBuffer: this._maskBuffer,
opcode: 0x08,
readOnly: false,
rsv1: false
};
if (this._state !== DEFAULT) {
this.enqueue([this.dispatch, buf, false, options, cb]);
} else {
this.sendFrame(Sender.frame(buf, options), cb);
}
}
/**
* Sends a ping message to the other peer.
*
* @param {*} data The message to send
* @param {Boolean} [mask=false] Specifies whether or not to mask `data`
* @param {Function} [cb] Callback
* @public
*/
ping(data, mask, cb) {
let byteLength;
let readOnly;
if (typeof data === 'string') {
byteLength = Buffer.byteLength(data);
readOnly = false;
} else if (isBlob(data)) {
byteLength = data.size;
readOnly = false;
} else {
data = toBuffer(data);
byteLength = data.length;
readOnly = toBuffer.readOnly;
}
if (byteLength > 125) {
throw new RangeError('The data size must not be greater than 125 bytes');
}
const options = {
[kByteLength]: byteLength,
fin: true,
generateMask: this._generateMask,
mask,
maskBuffer: this._maskBuffer,
opcode: 0x09,
readOnly,
rsv1: false
};
if (isBlob(data)) {
if (this._state !== DEFAULT) {
this.enqueue([this.getBlobData, data, false, options, cb]);
} else {
this.getBlobData(data, false, options, cb);
}
} else if (this._state !== DEFAULT) {
this.enqueue([this.dispatch, data, false, options, cb]);
} else {
this.sendFrame(Sender.frame(data, options), cb);
}
}
/**
* Sends a pong message to the other peer.
*
* @param {*} data The message to send
* @param {Boolean} [mask=false] Specifies whether or not to mask `data`
* @param {Function} [cb] Callback
* @public
*/
pong(data, mask, cb) {
let byteLength;
let readOnly;
if (typeof data === 'string') {
byteLength = Buffer.byteLength(data);
readOnly = false;
} else if (isBlob(data)) {
byteLength = data.size;
readOnly = false;
} else {
data = toBuffer(data);
byteLength = data.length;
readOnly = toBuffer.readOnly;
}
if (byteLength > 125) {
throw new RangeError('The data size must not be greater than 125 bytes');
}
const options = {
[kByteLength]: byteLength,
fin: true,
generateMask: this._generateMask,
mask,
maskBuffer: this._maskBuffer,
opcode: 0x0a,
readOnly,
rsv1: false
};
if (isBlob(data)) {
if (this._state !== DEFAULT) {
this.enqueue([this.getBlobData, data, false, options, cb]);
} else {
this.getBlobData(data, false, options, cb);
}
} else if (this._state !== DEFAULT) {
this.enqueue([this.dispatch, data, false, options, cb]);
} else {
this.sendFrame(Sender.frame(data, options), cb);
}
}
/**
* Sends a data message to the other peer.
*
* @param {*} data The message to send
* @param {Object} options Options object
* @param {Boolean} [options.binary=false] Specifies whether `data` is binary
* or text
* @param {Boolean} [options.compress=false] Specifies whether or not to
* compress `data`
* @param {Boolean} [options.fin=false] Specifies whether the fragment is the
* last one
* @param {Boolean} [options.mask=false] Specifies whether or not to mask
* `data`
* @param {Function} [cb] Callback
* @public
*/
send(data, options, cb) {
const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
let opcode = options.binary ? 2 : 1;
let rsv1 = options.compress;
let byteLength;
let readOnly;
if (typeof data === 'string') {
byteLength = Buffer.byteLength(data);
readOnly = false;
} else if (isBlob(data)) {
byteLength = data.size;
readOnly = false;
} else {
data = toBuffer(data);
byteLength = data.length;
readOnly = toBuffer.readOnly;
}
if (this._firstFragment) {
this._firstFragment = false;
if (
rsv1 &&
perMessageDeflate &&
perMessageDeflate.params[
perMessageDeflate._isServer
? 'server_no_context_takeover'
: 'client_no_context_takeover'
]
) {
rsv1 = byteLength >= perMessageDeflate._threshold;
}
this._compress = rsv1;
} else {
rsv1 = false;
opcode = 0;
}
if (options.fin) this._firstFragment = true;
const opts = {
[kByteLength]: byteLength,
fin: options.fin,
generateMask: this._generateMask,
mask: options.mask,
maskBuffer: this._maskBuffer,
opcode,
readOnly,
rsv1
};
if (isBlob(data)) {
if (this._state !== DEFAULT) {
this.enqueue([this.getBlobData, data, this._compress, opts, cb]);
} else {
this.getBlobData(data, this._compress, opts, cb);
}
} else if (this._state !== DEFAULT) {
this.enqueue([this.dispatch, data, this._compress, opts, cb]);
} else {
this.dispatch(data, this._compress, opts, cb);
}
}
/**
* Gets the contents of a blob as binary data.
*
* @param {Blob} blob The blob
* @param {Boolean} [compress=false] Specifies whether or not to compress
* the data
* @param {Object} options Options object
* @param {Boolean} [options.fin=false] Specifies whether or not to set the
* FIN bit
* @param {Function} [options.generateMask] The function used to generate the
* masking key
* @param {Boolean} [options.mask=false] Specifies whether or not to mask
* `data`
* @param {Buffer} [options.maskBuffer] The buffer used to store the masking
* key
* @param {Number} options.opcode The opcode
* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
* modified
* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
* RSV1 bit
* @param {Function} [cb] Callback
* @private
*/
getBlobData(blob, compress, options, cb) {
this._bufferedBytes += options[kByteLength];
this._state = GET_BLOB_DATA;
blob
.arrayBuffer()
.then((arrayBuffer) => {
if (this._socket.destroyed) {
const err = new Error(
'The socket was closed while the blob was being read'
);
//
// `callCallbacks` is called in the next tick to ensure that errors
// that might be thrown in the callbacks behave like errors thrown
// outside the promise chain.
//
process.nextTick(callCallbacks, this, err, cb);
return;
}
this._bufferedBytes -= options[kByteLength];
const data = toBuffer(arrayBuffer);
if (!compress) {
this._state = DEFAULT;
this.sendFrame(Sender.frame(data, options), cb);
this.dequeue();
} else {
this.dispatch(data, compress, options, cb);
}
})
.catch((err) => {
//
// `onError` is called in the next tick for the same reason that
// `callCallbacks` above is.
//
process.nextTick(onError, this, err, cb);
});
}
/**
* Dispatches a message.
*
* @param {(Buffer|String)} data The message to send
* @param {Boolean} [compress=false] Specifies whether or not to compress
* `data`
* @param {Object} options Options object
* @param {Boolean} [options.fin=false] Specifies whether or not to set the
* FIN bit
* @param {Function} [options.generateMask] The function used to generate the
* masking key
* @param {Boolean} [options.mask=false] Specifies whether or not to mask
* `data`
* @param {Buffer} [options.maskBuffer] The buffer used to store the masking
* key
* @param {Number} options.opcode The opcode
* @param {Boolean} [options.readOnly=false] Specifies whether `data` can be
* modified
* @param {Boolean} [options.rsv1=false] Specifies whether or not to set the
* RSV1 bit
* @param {Function} [cb] Callback
* @private
*/
dispatch(data, compress, options, cb) {
if (!compress) {
this.sendFrame(Sender.frame(data, options), cb);
return;
}
const perMessageDeflate = this._extensions[PerMessageDeflate.extensionName];
this._bufferedBytes += options[kByteLength];
this._state = DEFLATING;
perMessageDeflate.compress(data, options.fin, (_, buf) => {
if (this._socket.destroyed) {
const err = new Error(
'The socket was closed while data was being compressed'
);
callCallbacks(this, err, cb);
return;
}
this._bufferedBytes -= options[kByteLength];
this._state = DEFAULT;
options.readOnly = false;
this.sendFrame(Sender.frame(buf, options), cb);
this.dequeue();
});
}
/**
* Executes queued send operations.
*
* @private
*/
dequeue() {
while (this._state === DEFAULT && this._queue.length) {
const params = this._queue.shift();
this._bufferedBytes -= params[3][kByteLength];
Reflect.apply(params[0], this, params.slice(1));
}
}
/**
* Enqueues a send operation.
*
* @param {Array} params Send operation parameters.
* @private
*/
enqueue(params) {
this._bufferedBytes += params[3][kByteLength];
this._queue.push(params);
}
/**
* Sends a frame.
*
* @param {(Buffer | String)[]} list The frame to send
* @param {Function} [cb] Callback
* @private
*/
sendFrame(list, cb) {
if (list.length === 2) {
this._socket.cork();
this._socket.write(list[0]);
this._socket.write(list[1], cb);
this._socket.uncork();
} else {
this._socket.write(list[0], cb);
}
}
}
module.exports = Sender;
/**
* Calls queued callbacks with an error.
*
* @param {Sender} sender The `Sender` instance
* @param {Error} err The error to call the callbacks with
* @param {Function} [cb] The first callback
* @private
*/
function callCallbacks(sender, err, cb) {
if (typeof cb === 'function') cb(err);
for (let i = 0; i < sender._queue.length; i++) {
const params = sender._queue[i];
const callback = params[params.length - 1];
if (typeof callback === 'function') callback(err);
}
}
/**
* Handles a `Sender` error.
*
* @param {Sender} sender The `Sender` instance
* @param {Error} err The error
* @param {Function} [cb] The first pending callback
* @private
*/
function onError(sender, err, cb) {
callCallbacks(sender, err, cb);
sender.onerror(err);
}

View File

@@ -0,0 +1,46 @@
{
"name": "po-parser",
"version": "2.1.1",
"homepage": "https://github.com/amannn/po-parser",
"repository": {
"type": "git",
"url": "git@github.com:amannn/po-parser.git"
},
"description": "Parses and serializes `.po` file content.",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"type": "module",
"scripts": {
"build": "bunchee",
"lint": "tsc --noEmit",
"test": "vitest",
"prepublishOnly": "pnpm lint && pnpm test && pnpm build"
},
"keywords": [
"po",
"parse",
"serialize"
],
"files": [
"dist"
],
"author": "Jan Amann <jan@amann.work>",
"license": "MIT",
"packageManager": "pnpm@10.17.1",
"publishConfig": {
"provenance": true
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^13.0.1",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^12.0.2",
"@semantic-release/npm": "^12.0.0",
"@semantic-release/release-notes-generator": "^14.1.0",
"bunchee": "^6.6.2",
"conventional-changelog-conventionalcommits": "^9.1.0",
"semantic-release": "^25.0.2",
"typescript": "^5.9.3",
"vitest": "^4.0.9"
}
}

View File

@@ -0,0 +1,62 @@
export { count } from './count.js';
export { countGlobalVersions } from './countGlobalVersions.js';
export { countVersions } from './countVersions.js';
export { create } from './create.js';
export { createGlobal } from './createGlobal.js';
export { createGlobalVersion } from './createGlobalVersion.js';
export { createTableName } from './createTableName.js';
export { createVersion } from './createVersion.js';
export { deleteMany } from './deleteMany.js';
export { deleteOne } from './deleteOne.js';
export { deleteVersions } from './deleteVersions.js';
export { destroy } from './destroy.js';
export { find } from './find.js';
export { chainMethods } from './find/chainMethods.js';
export { findDistinct } from './findDistinct.js';
export { findGlobal } from './findGlobal.js';
export { findGlobalVersions } from './findGlobalVersions.js';
export { findOne } from './findOne.js';
export { findVersions } from './findVersions.js';
export { migrate } from './migrate.js';
export { migrateDown } from './migrateDown.js';
export { migrateFresh } from './migrateFresh.js';
export { migrateRefresh } from './migrateRefresh.js';
export { migrateReset } from './migrateReset.js';
export { migrateStatus } from './migrateStatus.js';
export { buildQuery } from './queries/buildQuery.js';
export { operatorMap } from './queries/operatorMap.js';
export type { Operators } from './queries/operatorMap.js';
export { parseParams } from './queries/parseParams.js';
export { queryDrafts } from './queryDrafts.js';
export { buildDrizzleRelations } from './schema/buildDrizzleRelations.js';
export { buildRawSchema } from './schema/buildRawSchema.js';
export { beginTransaction } from './transactions/beginTransaction.js';
export { commitTransaction } from './transactions/commitTransaction.js';
export { rollbackTransaction } from './transactions/rollbackTransaction.js';
export type { BaseRawColumn, BlocksToJsonMigrator, BuildDrizzleTable, BuildQueryJoinAliases, ChainedMethods, ColumnToCodeConverter, CountDistinct, CreateJSONQueryArgs, DeleteWhere, DrizzleAdapter, DrizzleTransaction, DropDatabase, EnumRawColumn, Execute, GenericColumn, GenericColumns, GenericPgColumn, GenericRelation, GenericTable, IDType, Insert, IntegerRawColumn, Migration, PostgresDB, RawColumn, RawForeignKey, RawIndex, RawRelation, RawTable, RelationMap, RequireDrizzleKit, SetColumnID, SQLiteDB, TimestampRawColumn, TransactionPg, TransactionSQLite, UUIDRawColumn, VectorRawColumn, } from './types.js';
export { updateGlobal } from './updateGlobal.js';
export { updateGlobalVersion } from './updateGlobalVersion.js';
export { updateJobs } from './updateJobs.js';
export { updateMany } from './updateMany.js';
export { updateOne } from './updateOne.js';
export { updateVersion } from './updateVersion.js';
export { upsert } from './upsert.js';
export { upsertRow } from './upsertRow/index.js';
export { buildDynamicPredefinedBlocksToJsonMigration, createBlocksToJsonMigrator, getBlocksToJsonMigrator, } from './utilities/blocksToJsonMigrator.js';
export { buildCreateMigration } from './utilities/buildCreateMigration.js';
export { buildIndexName } from './utilities/buildIndexName.js';
export { createSchemaGenerator } from './utilities/createSchemaGenerator.js';
export { executeSchemaHooks } from './utilities/executeSchemaHooks.js';
export { extendDrizzleTable } from './utilities/extendDrizzleTable.js';
export { hasLocalesTable } from './utilities/hasLocalesTable.js';
export { pushDevSchema } from './utilities/pushDevSchema.js';
export { validateExistingBlockIsIdentical } from './utilities/validateExistingBlockIsIdentical.js';
/**
* @deprecated remove in 4.0
* use
* ```ts
* import { findMigrationDir } from 'payload'
* ```
*/
export declare const findMigrationDir: (migrationDir?: string) => string;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,2 @@
export * from "./cache.js";
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,9 @@
import React from 'react';
import './index.scss';
type Props = {
description?: React.ReactNode | string;
heading: string;
};
export declare function FormHeader({ description, heading }: Props): React.JSX.Element;
export {};
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/xata-http/index.ts"],"sourcesContent":["export * from './driver.ts';\nexport * from './session.ts';\n"],"mappings":";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,8BAAc,wBAAd;AACA,8BAAc,yBADd;","names":[]}

View File

@@ -0,0 +1,53 @@
Prism.languages.cobol = {
'comment': {
pattern: /\*>.*|(^[ \t]*)\*.*/m,
lookbehind: true,
greedy: true
},
'string': {
pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,
greedy: true
},
'level': {
pattern: /(^[ \t]*)\d+\b/m,
lookbehind: true,
greedy: true,
alias: 'number'
},
'class-name': {
// https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015
pattern: /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,
lookbehind: true,
inside: {
'number': {
pattern: /(\()\d+/,
lookbehind: true
},
'punctuation': /[()]/
}
},
'keyword': {
pattern: /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,
lookbehind: true
},
'boolean': {
pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i,
lookbehind: true
},
'number': {
pattern: /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,
lookbehind: true
},
'operator': [
/<>|[<>]=?|[=+*/&]/,
{
pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,
lookbehind: true
}
],
'punctuation': /[.:,()]/
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tracing/langgraph/index.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG/D;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,EACtD,OAAO,EAAE,gBAAgB,GACxB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,CAkDvC;AAiGD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS;IAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CAAE,EAChF,UAAU,EAAE,CAAC,EACb,OAAO,CAAC,EAAE,gBAAgB,GACzB,CAAC,CAMH"}

View File

@@ -0,0 +1,55 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FontMetrics = void 0;
var util_1 = require("../core/util");
var SAMPLE_TEXT = 'Hidden Text';
var FontMetrics = /** @class */ (function () {
function FontMetrics(document) {
this._data = {};
this._document = document;
}
FontMetrics.prototype.parseMetrics = function (fontFamily, fontSize) {
var container = this._document.createElement('div');
var img = this._document.createElement('img');
var span = this._document.createElement('span');
var body = this._document.body;
container.style.visibility = 'hidden';
container.style.fontFamily = fontFamily;
container.style.fontSize = fontSize;
container.style.margin = '0';
container.style.padding = '0';
container.style.whiteSpace = 'nowrap';
body.appendChild(container);
img.src = util_1.SMALL_IMAGE;
img.width = 1;
img.height = 1;
img.style.margin = '0';
img.style.padding = '0';
img.style.verticalAlign = 'baseline';
span.style.fontFamily = fontFamily;
span.style.fontSize = fontSize;
span.style.margin = '0';
span.style.padding = '0';
span.appendChild(this._document.createTextNode(SAMPLE_TEXT));
container.appendChild(span);
container.appendChild(img);
var baseline = img.offsetTop - span.offsetTop + 2;
container.removeChild(span);
container.appendChild(this._document.createTextNode(SAMPLE_TEXT));
container.style.lineHeight = 'normal';
img.style.verticalAlign = 'super';
var middle = img.offsetTop - container.offsetTop + 2;
body.removeChild(container);
return { baseline: baseline, middle: middle };
};
FontMetrics.prototype.getMetrics = function (fontFamily, fontSize) {
var key = fontFamily + " " + fontSize;
if (typeof this._data[key] === 'undefined') {
this._data[key] = this.parseMetrics(fontFamily, fontSize);
}
return this._data[key];
};
return FontMetrics;
}());
exports.FontMetrics = FontMetrics;
//# sourceMappingURL=font-metrics.js.map

View File

@@ -0,0 +1 @@
module.exports={C:{"5":0.06832,"38":0.00342,"49":0.00342,"77":0.00342,"94":0.00683,"112":0.01025,"115":0.20154,"127":0.00342,"128":0.02733,"139":0.0205,"140":0.00342,"141":0.00342,"142":0.00683,"143":0.02733,"144":0.01366,"145":0.39967,"146":0.35868,"147":0.01366,_:"2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 113 114 116 117 118 119 120 121 122 123 124 125 126 129 130 131 132 133 134 135 136 137 138 148 149 3.5 3.6"},D:{"41":0.00342,"47":0.01366,"48":0.00683,"49":0.00342,"58":0.01708,"59":0.00342,"62":0.00683,"64":0.01366,"65":0.00342,"67":0.01366,"68":0.01366,"69":0.08198,"70":0.01025,"71":0.00683,"73":0.00683,"74":0.03074,"75":0.01708,"77":0.01025,"79":0.09565,"80":0.00342,"81":0.03758,"83":0.00683,"85":0.00683,"86":0.01025,"87":0.00683,"88":0.00342,"89":0.00683,"92":0.00342,"93":0.01708,"94":0.00683,"95":0.00683,"96":0.02391,"97":0.00342,"98":0.00683,"101":0.01025,"102":0.06149,"103":0.0649,"104":0.01025,"105":0.01025,"106":0.0205,"107":0.00683,"108":0.02733,"109":0.10248,"110":0.00683,"111":0.10931,"112":0.01025,"113":0.00342,"114":0.01366,"115":0.00342,"116":0.05807,"117":0.01025,"118":0.01708,"119":0.06149,"120":0.03416,"121":0.00342,"122":0.05124,"123":0.00342,"124":0.0205,"125":0.03074,"126":0.21179,"127":0.01025,"128":0.06832,"129":0.00683,"130":0.03416,"131":0.08198,"132":0.07857,"133":0.05466,"134":0.00683,"135":0.07857,"136":0.03074,"137":0.0649,"138":0.4475,"139":0.10248,"140":0.20154,"141":0.3416,"142":4.08212,"143":4.51937,"144":0.00683,"145":0.01708,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 50 51 52 53 54 55 56 57 60 61 63 66 72 76 78 84 90 91 99 100 146"},F:{"34":0.00683,"37":0.00683,"64":0.00683,"73":0.03074,"79":0.01025,"86":0.00683,"89":0.00342,"90":0.01366,"91":0.00683,"92":0.0205,"93":0.32794,"95":0.04099,"100":0.02733,"113":0.01366,"114":0.00342,"117":0.00342,"119":0.00342,"120":0.00683,"122":0.01366,"123":0.03758,"124":0.48166,"125":0.15372,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 35 36 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 65 66 67 68 69 70 71 72 74 75 76 77 78 80 81 82 83 84 85 87 88 94 96 97 98 99 101 102 103 104 105 106 107 108 109 110 111 112 115 116 118 121 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"12":0.01366,"13":0.00342,"14":0.00342,"15":0.00342,"16":0.01708,"18":0.0854,"84":0.00342,"90":0.03074,"92":0.06149,"100":0.03074,"109":0.00683,"112":0.00342,"114":0.00342,"121":0.00342,"122":0.01708,"131":0.01025,"133":0.02391,"136":0.00683,"137":0.00342,"138":0.03074,"139":0.01366,"140":0.03758,"141":0.02733,"142":1.15461,"143":2.38095,_:"17 79 80 81 83 85 86 87 88 89 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 113 115 116 117 118 119 120 123 124 125 126 127 128 129 130 132 134 135"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 10.1 12.1 15.1 15.2-15.3 15.4 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.3 18.0 18.2 26.3","5.1":0.00683,"9.1":0.00342,"11.1":0.00342,"13.1":0.04441,"14.1":0.00683,"15.5":0.00342,"15.6":0.0649,"16.6":0.05466,"17.1":0.08882,"17.2":0.01366,"17.4":0.02733,"17.5":0.00342,"17.6":0.12298,"18.1":0.00342,"18.3":0.00342,"18.4":0.00342,"18.5-18.6":0.0205,"26.0":0.00683,"26.1":0.04099,"26.2":0.01025},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.0011,"5.0-5.1":0,"6.0-6.1":0.00221,"7.0-7.1":0.00165,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00441,"10.0-10.2":0.00055,"10.3":0.00772,"11.0-11.2":0.09488,"11.3-11.4":0.00276,"12.0-12.1":0.00221,"12.2-12.5":0.02482,"13.0-13.1":0.00055,"13.2":0.00386,"13.3":0.0011,"13.4-13.7":0.00386,"14.0-14.4":0.00772,"14.5-14.8":0.00827,"15.0-15.1":0.00883,"15.2-15.3":0.00662,"15.4":0.00717,"15.5":0.00772,"15.6-15.8":0.11971,"16.0":0.01379,"16.1":0.02648,"16.2":0.01379,"16.3":0.02482,"16.4":0.00607,"16.5":0.01048,"16.6-16.7":0.15557,"17.0":0.00883,"17.1":0.01434,"17.2":0.01048,"17.3":0.016,"17.4":0.02703,"17.5":0.05296,"17.6-17.7":0.12247,"18.0":0.02758,"18.1":0.05737,"18.2":0.03034,"18.3":0.09875,"18.4":0.05075,"18.5-18.7":3.64424,"26.0":0.07116,"26.1":0.59193,"26.2":0.11254,"26.3":0.00496},P:{"4":0.04105,"21":0.01026,"22":0.01026,"24":0.12314,"25":0.08209,"26":0.02052,"27":0.30785,"28":0.23602,"29":0.47204,_:"20 23 5.0-5.4 8.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 17.0 18.0 19.0","6.2-6.4":0.01026,"7.2-7.4":0.05131,"9.2":0.02052,"16.0":0.01026},I:{"0":0.02629,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00001,"4.4":0,"4.4.3-4.4.4":0.00002},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":9.53934,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{"2.5":0.01317,_:"3.0-3.1"},J:{_:"7 10"},Q:{"14.9":0.00658},O:{"0":0.19091},H:{"0":1.79},L:{"0":62.11892},R:{_:"0"},M:{"0":0.09875}};

View File

@@ -0,0 +1 @@
{"version":3,"file":"cloud-drizzle.js","sources":["../../../src/icons/cloud-drizzle.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name CloudDrizzle\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxNC44OTlBNyA3IDAgMSAxIDE1LjcxIDhoMS43OWE0LjUgNC41IDAgMCAxIDIuNSA4LjI0MiIgLz4KICA8cGF0aCBkPSJNOCAxOXYxIiAvPgogIDxwYXRoIGQ9Ik04IDE0djEiIC8+CiAgPHBhdGggZD0iTTE2IDE5djEiIC8+CiAgPHBhdGggZD0iTTE2IDE0djEiIC8+CiAgPHBhdGggZD0iTTEyIDIxdjEiIC8+CiAgPHBhdGggZD0iTTEyIDE2djEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/cloud-drizzle\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 CloudDrizzle = createLucideIcon('CloudDrizzle', [\n ['path', { d: 'M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242', key: '1pljnt' }],\n ['path', { d: 'M8 19v1', key: '1dk2by' }],\n ['path', { d: 'M8 14v1', key: '84yxot' }],\n ['path', { d: 'M16 19v1', key: 'v220m7' }],\n ['path', { d: 'M16 14v1', key: 'g12gj6' }],\n ['path', { d: 'M12 21v1', key: 'q8vafk' }],\n ['path', { d: 'M12 16v1', key: '1mx6rx' }],\n]);\n\nexport default CloudDrizzle;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,4 @@
import type { CreateVersionArgs, JsonObject, TypeWithVersion } from 'payload';
import type { DrizzleAdapter } from './types.js';
export declare function createVersion<T extends JsonObject = JsonObject>(this: DrizzleAdapter, { autosave, collectionSlug, createdAt, parent, publishedLocale, req, returning, select, snapshot, updatedAt, versionData, }: CreateVersionArgs<T>): Promise<TypeWithVersion<T>>;
//# sourceMappingURL=createVersion.d.ts.map

View File

@@ -0,0 +1,10 @@
const formatRelativeLocale = {
lastWeek: "eeee 'إلي فات مع' p",
yesterday: "'البارح مع' p",
today: "'اليوم مع' p",
tomorrow: "'غدوة مع' p",
nextWeek: "eeee 'الجمعة الجاية مع' p 'نهار'",
other: "P",
};
export const formatRelative = (token) => formatRelativeLocale[token];

View File

@@ -0,0 +1,15 @@
import type { Payload } from '../../../index.js';
import type { PayloadRequest } from '../../../types/index.js';
export type AdminInitEvent = {
domainID?: string;
type: 'admin-init';
userID?: string;
};
type Args = {
headers: Request['headers'];
payload: Payload;
user: PayloadRequest['user'];
};
export declare const adminInit: ({ headers, payload, user }: Args) => void;
export {};
//# sourceMappingURL=adminInit.d.ts.map

View File

@@ -0,0 +1,9 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import{createLexicalComposerContext as e,LexicalComposerContext as t}from"@lexical/react/LexicalComposerContext";import{createEditor as o,$getRoot as n,$createParagraphNode as i,$getSelection as r,HISTORY_MERGE_TAG as a}from"lexical";import{useLayoutEffect as c,useEffect as l,useMemo as d}from"react";import{jsx as s}from"react/jsx-runtime";const m="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,u=m?c:l,p={tag:a};function f({initialConfig:a,children:c}){const l=d((()=>{const{theme:t,namespace:c,nodes:l,onError:d,editorState:s,html:u}=a,f=e(null,t),E=o({editable:a.editable,html:u,namespace:c,nodes:l,onError:e=>d(e,E),theme:t});return function(e,t){if(null===t)return;if(void 0===t)e.update((()=>{const t=n();if(t.isEmpty()){const o=i();t.append(o);const n=m?document.activeElement:null;(null!==r()||null!==n&&n===e.getRootElement())&&o.select()}}),p);else if(null!==t)switch(typeof t){case"string":{const o=e.parseEditorState(t);e.setEditorState(o,p);break}case"object":e.setEditorState(t,p);break;case"function":e.update((()=>{n().isEmpty()&&t(e)}),p)}}(E,s),[E,f]}),[]);return u((()=>{const e=a.editable,[t]=l;t.setEditable(void 0===e||e)}),[]),s(t.Provider,{value:l,children:c})}export{f as LexicalComposer};

View File

@@ -0,0 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "OptionValidator", {
enumerable: true,
get: function () {
return _validator.OptionValidator;
}
});
Object.defineProperty(exports, "findSuggestion", {
enumerable: true,
get: function () {
return _findSuggestion.findSuggestion;
}
});
var _validator = require("./validator.js");
var _findSuggestion = require("./find-suggestion.js");
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,30 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.default = getscrollAccessor;
var _isWindow = _interopRequireDefault(require("./isWindow"));
function getscrollAccessor(offset) {
var prop = offset === 'pageXOffset' ? 'scrollLeft' : 'scrollTop';
function scrollAccessor(node, val) {
var win = (0, _isWindow.default)(node);
if (val === undefined) {
return win ? win[offset] : node[prop];
}
if (win) {
win.scrollTo(win[offset], val);
} else {
node[prop] = val;
}
}
return scrollAccessor;
}
module.exports = exports["default"];

View File

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

View File

@@ -0,0 +1,11 @@
const formatRelativeLocale = {
lastWeek: "'pasinta' eeee 'je' p",
yesterday: "'hieraŭ je' p",
today: "'hodiaŭ je' p",
tomorrow: "'morgaŭ je' p",
nextWeek: "eeee 'je' p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];

View File

@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9saWIvYW55LWZ1bmN0aW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBBbnlGdW5jdGlvbjxBcmdzIGV4dGVuZHMgYW55W10gPSBhbnlbXSwgUmV0dXJuVHlwZSA9IGFueT4gPSAoLi4uYXJnczogQXJncykgPT4gUmV0dXJuVHlwZTtcbiJdfQ==

View File

@@ -0,0 +1 @@
class e{isSaving=!1;pendingResolvers=[];constructor(e=50){this.delayMs=e}async schedule(e){return new Promise(((s,i)=>{this.pendingResolvers.push({resolve:s,reject:i}),this.nextSaveTask=e,this.isSaving||this.saveTimeout?this.saveTimeout&&this.scheduleSave():this.executeSave()}))}scheduleSave(){this.saveTimeout&&clearTimeout(this.saveTimeout),this.saveTimeout=setTimeout((()=>{this.saveTimeout=void 0,this.executeSave()}),this.delayMs)}async executeSave(){if(this.isSaving)return;const e=this.nextSaveTask;if(!e)return;const s=this.pendingResolvers;this.pendingResolvers=[],this.nextSaveTask=void 0,this.isSaving=!0;try{const i=await e();s.forEach((({resolve:e})=>e(i)))}catch(e){s.forEach((({reject:s})=>s(e)))}finally{this.isSaving=!1,this.pendingResolvers.length>0&&this.scheduleSave()}}[Symbol.dispose](){this.saveTimeout&&(clearTimeout(this.saveTimeout),this.saveTimeout=void 0),this.pendingResolvers=[],this.nextSaveTask=void 0,this.isSaving=!1}}export{e as default};

View File

@@ -0,0 +1,285 @@
'use strict';
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
const color = require('kleur');
const Prompt = require('./prompt');
const _require = require('sisteransi'),
erase = _require.erase,
cursor = _require.cursor;
const _require2 = require('../util'),
style = _require2.style,
clear = _require2.clear,
figures = _require2.figures,
wrap = _require2.wrap,
entriesToDisplay = _require2.entriesToDisplay;
const getVal = (arr, i) => arr[i] && (arr[i].value || arr[i].title || arr[i]);
const getTitle = (arr, i) => arr[i] && (arr[i].title || arr[i].value || arr[i]);
const getIndex = (arr, valOrTitle) => {
const index = arr.findIndex(el => el.value === valOrTitle || el.title === valOrTitle);
return index > -1 ? index : undefined;
};
/**
* TextPrompt Base Element
* @param {Object} opts Options
* @param {String} opts.message Message
* @param {Array} opts.choices Array of auto-complete choices objects
* @param {Function} [opts.suggest] Filter function. Defaults to sort by title
* @param {Number} [opts.limit=10] Max number of results to show
* @param {Number} [opts.cursor=0] Cursor start position
* @param {String} [opts.style='default'] Render style
* @param {String} [opts.fallback] Fallback message - initial to default value
* @param {String} [opts.initial] Index of the default value
* @param {Boolean} [opts.clearFirst] The first ESCAPE keypress will clear the input
* @param {Stream} [opts.stdin] The Readable stream to listen to
* @param {Stream} [opts.stdout] The Writable stream to write readline data to
* @param {String} [opts.noMatches] The no matches found label
*/
class AutocompletePrompt extends Prompt {
constructor(opts = {}) {
super(opts);
this.msg = opts.message;
this.suggest = opts.suggest;
this.choices = opts.choices;
this.initial = typeof opts.initial === 'number' ? opts.initial : getIndex(opts.choices, opts.initial);
this.select = this.initial || opts.cursor || 0;
this.i18n = {
noMatches: opts.noMatches || 'no matches found'
};
this.fallback = opts.fallback || this.initial;
this.clearFirst = opts.clearFirst || false;
this.suggestions = [];
this.input = '';
this.limit = opts.limit || 10;
this.cursor = 0;
this.transform = style.render(opts.style);
this.scale = this.transform.scale;
this.render = this.render.bind(this);
this.complete = this.complete.bind(this);
this.clear = clear('', this.out.columns);
this.complete(this.render);
this.render();
}
set fallback(fb) {
this._fb = Number.isSafeInteger(parseInt(fb)) ? parseInt(fb) : fb;
}
get fallback() {
let choice;
if (typeof this._fb === 'number') choice = this.choices[this._fb];else if (typeof this._fb === 'string') choice = {
title: this._fb
};
return choice || this._fb || {
title: this.i18n.noMatches
};
}
moveSelect(i) {
this.select = i;
if (this.suggestions.length > 0) this.value = getVal(this.suggestions, i);else this.value = this.fallback.value;
this.fire();
}
complete(cb) {
var _this = this;
return _asyncToGenerator(function* () {
const p = _this.completing = _this.suggest(_this.input, _this.choices);
const suggestions = yield p;
if (_this.completing !== p) return;
_this.suggestions = suggestions.map((s, i, arr) => ({
title: getTitle(arr, i),
value: getVal(arr, i),
description: s.description
}));
_this.completing = false;
const l = Math.max(suggestions.length - 1, 0);
_this.moveSelect(Math.min(l, _this.select));
cb && cb();
})();
}
reset() {
this.input = '';
this.complete(() => {
this.moveSelect(this.initial !== void 0 ? this.initial : 0);
this.render();
});
this.render();
}
exit() {
if (this.clearFirst && this.input.length > 0) {
this.reset();
} else {
this.done = this.exited = true;
this.aborted = false;
this.fire();
this.render();
this.out.write('\n');
this.close();
}
}
abort() {
this.done = this.aborted = true;
this.exited = false;
this.fire();
this.render();
this.out.write('\n');
this.close();
}
submit() {
this.done = true;
this.aborted = this.exited = false;
this.fire();
this.render();
this.out.write('\n');
this.close();
}
_(c, key) {
let s1 = this.input.slice(0, this.cursor);
let s2 = this.input.slice(this.cursor);
this.input = `${s1}${c}${s2}`;
this.cursor = s1.length + 1;
this.complete(this.render);
this.render();
}
delete() {
if (this.cursor === 0) return this.bell();
let s1 = this.input.slice(0, this.cursor - 1);
let s2 = this.input.slice(this.cursor);
this.input = `${s1}${s2}`;
this.complete(this.render);
this.cursor = this.cursor - 1;
this.render();
}
deleteForward() {
if (this.cursor * this.scale >= this.rendered.length) return this.bell();
let s1 = this.input.slice(0, this.cursor);
let s2 = this.input.slice(this.cursor + 1);
this.input = `${s1}${s2}`;
this.complete(this.render);
this.render();
}
first() {
this.moveSelect(0);
this.render();
}
last() {
this.moveSelect(this.suggestions.length - 1);
this.render();
}
up() {
if (this.select === 0) {
this.moveSelect(this.suggestions.length - 1);
} else {
this.moveSelect(this.select - 1);
}
this.render();
}
down() {
if (this.select === this.suggestions.length - 1) {
this.moveSelect(0);
} else {
this.moveSelect(this.select + 1);
}
this.render();
}
next() {
if (this.select === this.suggestions.length - 1) {
this.moveSelect(0);
} else this.moveSelect(this.select + 1);
this.render();
}
nextPage() {
this.moveSelect(Math.min(this.select + this.limit, this.suggestions.length - 1));
this.render();
}
prevPage() {
this.moveSelect(Math.max(this.select - this.limit, 0));
this.render();
}
left() {
if (this.cursor <= 0) return this.bell();
this.cursor = this.cursor - 1;
this.render();
}
right() {
if (this.cursor * this.scale >= this.rendered.length) return this.bell();
this.cursor = this.cursor + 1;
this.render();
}
renderOption(v, hovered, isStart, isEnd) {
let desc;
let prefix = isStart ? figures.arrowUp : isEnd ? figures.arrowDown : ' ';
let title = hovered ? color.cyan().underline(v.title) : v.title;
prefix = (hovered ? color.cyan(figures.pointer) + ' ' : ' ') + prefix;
if (v.description) {
desc = ` - ${v.description}`;
if (prefix.length + title.length + desc.length >= this.out.columns || v.description.split(/\r?\n/).length > 1) {
desc = '\n' + wrap(v.description, {
margin: 3,
width: this.out.columns
});
}
}
return prefix + ' ' + title + color.gray(desc || '');
}
render() {
if (this.closed) return;
if (this.firstRender) this.out.write(cursor.hide);else this.out.write(clear(this.outputText, this.out.columns));
super.render();
let _entriesToDisplay = entriesToDisplay(this.select, this.choices.length, this.limit),
startIndex = _entriesToDisplay.startIndex,
endIndex = _entriesToDisplay.endIndex;
this.outputText = [style.symbol(this.done, this.aborted, this.exited), color.bold(this.msg), style.delimiter(this.completing), this.done && this.suggestions[this.select] ? this.suggestions[this.select].title : this.rendered = this.transform.render(this.input)].join(' ');
if (!this.done) {
const suggestions = this.suggestions.slice(startIndex, endIndex).map((item, i) => this.renderOption(item, this.select === i + startIndex, i === 0 && startIndex > 0, i + startIndex === endIndex - 1 && endIndex < this.choices.length)).join('\n');
this.outputText += `\n` + (suggestions || color.gray(this.fallback.title));
}
this.out.write(erase.line + cursor.to(0) + this.outputText);
}
}
module.exports = AutocompletePrompt;

View File

@@ -0,0 +1,12 @@
/**
* 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.
*
*/
type Props = {
defaultSelection?: 'rootStart' | 'rootEnd';
};
export declare function AutoFocusPlugin({ defaultSelection }: Props): null;
export {};

View File

@@ -0,0 +1,43 @@
# to-snake-case [![Build Status](https://travis-ci.org/ianstormtaylor/to-snake-case.svg?branch=master)](https://travis-ci.org/ianstormtaylor/to-snake-case)
Convert a string to a snake case. Part of the series of [case helpers](https://github.com/ianstormtaylor/to-case).
## Installation
```
$ npm install to-snake-case
```
## Example
```js
var snake = require('to-snake-case');
snake('camelCase'); // "camel_case"
snake('space case'); // "snake_case"
snake('dot.case'); // "dot_case"
snake('weird[case'); // "weird_case"
```
## API
### toSnakeCase(string)
Returns the `string` converted to snake case.
## License
The MIT License (MIT)
Copyright &copy; 2016, Ian Storm Taylor
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -0,0 +1,29 @@
export function combineWhereConstraints(constraints, as = 'and') {
if (constraints.length === 0) {
return {};
}
const reducedConstraints = constraints.reduce((acc, constraint)=>{
if (constraint && typeof constraint === 'object' && Object.keys(constraint).length > 0) {
if (as in constraint) {
// merge the objects under the shared key
acc[as] = [
...acc[as],
...constraint[as]
];
} else {
// the constraint does not share the key
acc[as]?.push(constraint);
}
}
return acc;
}, {
[as]: []
});
if (reducedConstraints[as]?.length === 0) {
// If there are no constraints, return an empty object
return {};
}
return reducedConstraints;
}
//# sourceMappingURL=combineWhereConstraints.js.map

View File

@@ -0,0 +1,47 @@
/// <reference types="node" />
/// <reference types="node" />
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
import { Span } from '@opentelemetry/api';
export type CommandArgs = Array<string | Buffer | number | any[]>;
/**
* Function that can be used to serialize db.statement tag
* @param cmdName - The name of the command (eg. set, get, mset)
* @param cmdArgs - Array of arguments passed to the command
*
* @returns serialized string that will be used as the db.statement attribute.
*/
export type DbStatementSerializer = (cmdName: string, cmdArgs: CommandArgs) => string;
export interface IORedisRequestHookInformation {
moduleVersion?: string;
cmdName: string;
cmdArgs: CommandArgs;
}
export interface RedisRequestCustomAttributeFunction {
(span: Span, requestInfo: IORedisRequestHookInformation): void;
}
/**
* Function that can be used to add custom attributes to span on response from redis server
* @param span - The span created for the redis command, on which attributes can be set
* @param cmdName - The name of the command (eg. set, get, mset)
* @param cmdArgs - Array of arguments passed to the command
* @param response - The response object which is returned to the user who called this command.
* Can be used to set custom attributes on the span.
* The type of the response varies depending on the specific command.
*/
export interface RedisResponseCustomAttributeFunction {
(span: Span, cmdName: string, cmdArgs: CommandArgs, response: unknown): void;
}
/**
* Options available for the IORedis Instrumentation (see [documentation](https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/packages/instrumentation-ioredis/README.md#ioredis-instrumentation-options))
*/
export interface IORedisInstrumentationConfig extends InstrumentationConfig {
/** Custom serializer function for the db.statement tag */
dbStatementSerializer?: DbStatementSerializer;
/** Function for adding custom attributes on db request */
requestHook?: RedisRequestCustomAttributeFunction;
/** Function for adding custom attributes on db response */
responseHook?: RedisResponseCustomAttributeFunction;
/** Require parent to create ioredis span, default when unset is true */
requireParentSpan?: boolean;
}
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).memoizeOne=t()}(this,(function(){"use strict";var e=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function t(t,n){if(t.length!==n.length)return!1;for(var r=0;r<t.length;r++)if(i=t[r],u=n[r],!(i===u||e(i)&&e(u)))return!1;var i,u;return!0}return function(e,n){void 0===n&&(n=t);var r=null;function i(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];if(r&&r.lastThis===this&&n(t,r.lastArgs))return r.lastResult;var u=e.apply(this,t);return r={lastResult:u,lastArgs:t,lastThis:this},u}return i.clear=function(){r=null},i}}));

View File

@@ -0,0 +1 @@
{"version":3,"file":"user.js","sources":["../../../src/icons/user.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name User\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTkgMjF2LTJhNCA0IDAgMCAwLTQtNEg5YTQgNCAwIDAgMC00IDR2MiIgLz4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjciIHI9IjQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/user\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 User = createLucideIcon('User', [\n ['path', { d: 'M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2', key: '975kel' }],\n ['circle', { cx: '12', cy: '7', r: '4', key: '17ys0d' }],\n]);\n\nexport default User;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC1E,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA;AACzD,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,218 @@
import { Accessibility, Argument, ArrayExpression, ArrayPattern, ArrowFunctionExpression, AssignmentExpression, AssignmentPattern, AssignmentPatternProperty, AssignmentProperty, AwaitExpression, BigIntLiteral, BinaryExpression, BindingIdentifier, BlockStatement, BooleanLiteral, BreakStatement, CallExpression, CatchClause, Class, ClassDeclaration, ClassExpression, ClassMember, ClassMethod, ClassProperty, ComputedPropName, ConditionalExpression, Constructor, ContinueStatement, DebuggerStatement, Declaration, Decorator, DefaultDecl, DoWhileStatement, EmptyStatement, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportDefaultExpression, ExportDefaultSpecifier, ExportNamedDeclaration, ExportNamespaceSpecifier, ExportSpecifier, ExprOrSpread, Expression, ExpressionStatement, Fn, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, GetterProperty, Identifier, IfStatement, Import, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, JSXAttrValue, JSXAttribute, JSXAttributeName, JSXAttributeOrSpread, JSXClosingElement, JSXClosingFragment, JSXElement, JSXElementChild, JSXElementName, JSXEmptyExpression, JSXExpressionContainer, JSXFragment, JSXMemberExpression, JSXNamespacedName, JSXObject, JSXOpeningElement, JSXOpeningFragment, JSXSpreadChild, JSXText, KeyValuePatternProperty, KeyValueProperty, LabeledStatement, MemberExpression, MetaProperty, MethodProperty, Module, ModuleDeclaration, ModuleExportName, ModuleItem, NamedExportSpecifier, NamedImportSpecifier, NewExpression, NullLiteral, NumericLiteral, ObjectExpression, ObjectPattern, ObjectPatternProperty, OptionalChainingCall, OptionalChainingExpression, Param, ParenthesisExpression, Pattern, PrivateMethod, PrivateName, PrivateProperty, Program, Property, PropertyName, RegExpLiteral, RestElement, ReturnStatement, Script, SequenceExpression, SetterProperty, SpreadElement, Statement, StaticBlock, StringLiteral, Super, SuperPropExpression, SwitchCase, SwitchStatement, TaggedTemplateExpression, TemplateLiteral, ThisExpression, ThrowStatement, TryStatement, TsAsExpression, TsCallSignatureDeclaration, TsConstAssertion, TsConstructSignatureDeclaration, TsEntityName, TsEnumDeclaration, TsEnumMember, TsEnumMemberId, TsExportAssignment, TsExpressionWithTypeArguments, TsExternalModuleReference, TsFnParameter, TsGetterSignature, TsImportEqualsDeclaration, TsIndexSignature, TsInstantiation, TsInterfaceBody, TsInterfaceDeclaration, TsMethodSignature, TsModuleBlock, TsModuleDeclaration, TsModuleName, TsModuleReference, TsNamespaceBody, TsNamespaceDeclaration, TsNamespaceExportDeclaration, TsNonNullExpression, TsParameterProperty, TsParameterPropertyParameter, TsPropertySignature, TsQualifiedName, TsSatisfiesExpression, TsSetterSignature, TsType, TsTypeAliasDeclaration, TsTypeAnnotation, TsTypeAssertion, TsTypeElement, TsTypeParameter, TsTypeParameterDeclaration, TsTypeParameterInstantiation, UnaryExpression, UpdateExpression, VariableDeclaration, VariableDeclarator, WhileStatement, WithStatement, YieldExpression } from "@swc/types";
/**
* @deprecated JavaScript API is deprecated. Please use Wasm plugin instead.
*/
export declare class Visitor {
visitProgram(n: Program): Program;
visitModule(m: Module): Module;
visitScript(m: Script): Script;
visitModuleItems(items: ModuleItem[]): ModuleItem[];
visitModuleItem(n: ModuleItem): ModuleItem;
visitModuleDeclaration(n: ModuleDeclaration): ModuleDeclaration;
visitTsNamespaceExportDeclaration(n: TsNamespaceExportDeclaration): ModuleDeclaration;
visitTsExportAssignment(n: TsExportAssignment): TsExportAssignment;
visitTsImportEqualsDeclaration(n: TsImportEqualsDeclaration): ModuleDeclaration;
visitTsModuleReference(n: TsModuleReference): TsModuleReference;
visitTsExternalModuleReference(n: TsExternalModuleReference): TsExternalModuleReference;
visitExportAllDeclaration(n: ExportAllDeclaration): ModuleDeclaration;
visitExportDefaultExpression(n: ExportDefaultExpression): ModuleDeclaration;
visitExportNamedDeclaration(n: ExportNamedDeclaration): ModuleDeclaration;
visitExportSpecifiers(nodes: ExportSpecifier[]): ExportSpecifier[];
visitExportSpecifier(n: ExportSpecifier): ExportSpecifier;
visitNamedExportSpecifier(n: NamedExportSpecifier): ExportSpecifier;
visitModuleExportName(n: ModuleExportName): ModuleExportName;
visitExportNamespaceSpecifier(n: ExportNamespaceSpecifier): ExportSpecifier;
visitExportDefaultSpecifier(n: ExportDefaultSpecifier): ExportSpecifier;
visitOptionalStringLiteral(n: StringLiteral | undefined): StringLiteral | undefined;
visitExportDefaultDeclaration(n: ExportDefaultDeclaration): ModuleDeclaration;
visitDefaultDeclaration(n: DefaultDecl): DefaultDecl;
visitFunctionExpression(n: FunctionExpression): FunctionExpression;
visitClassExpression(n: ClassExpression): ClassExpression;
visitExportDeclaration(n: ExportDeclaration): ModuleDeclaration;
visitArrayExpression(e: ArrayExpression): Expression;
visitArrayElement(e: ExprOrSpread | undefined): ExprOrSpread | undefined;
visitExprOrSpread(e: ExprOrSpread): ExprOrSpread;
visitExprOrSpreads(nodes: ExprOrSpread[]): ExprOrSpread[];
visitSpreadElement(e: SpreadElement): SpreadElement;
visitOptionalExpression(e: Expression | undefined): Expression | undefined;
visitArrowFunctionExpression(e: ArrowFunctionExpression): Expression;
visitArrowBody(body: BlockStatement | Expression): BlockStatement | Expression;
visitBlockStatement(block: BlockStatement): BlockStatement;
visitStatements(stmts: Statement[]): Statement[];
visitStatement(stmt: Statement): Statement;
visitSwitchStatement(stmt: SwitchStatement): Statement;
visitSwitchCases(cases: SwitchCase[]): SwitchCase[];
visitSwitchCase(c: SwitchCase): SwitchCase;
visitIfStatement(stmt: IfStatement): Statement;
visitOptionalStatement(stmt: Statement | undefined): Statement | undefined;
visitBreakStatement(stmt: BreakStatement): Statement;
visitWhileStatement(stmt: WhileStatement): Statement;
visitTryStatement(stmt: TryStatement): Statement;
visitCatchClause(handler: CatchClause | undefined): CatchClause | undefined;
visitThrowStatement(stmt: ThrowStatement): Statement;
visitReturnStatement(stmt: ReturnStatement): Statement;
visitLabeledStatement(stmt: LabeledStatement): Statement;
visitForStatement(stmt: ForStatement): Statement;
visitForOfStatement(stmt: ForOfStatement): Statement;
visitForInStatement(stmt: ForInStatement): Statement;
visitEmptyStatement(stmt: EmptyStatement): EmptyStatement;
visitDoWhileStatement(stmt: DoWhileStatement): Statement;
visitDebuggerStatement(stmt: DebuggerStatement): Statement;
visitWithStatement(stmt: WithStatement): Statement;
visitDeclaration(decl: Declaration): Declaration;
visitVariableDeclaration(n: VariableDeclaration): VariableDeclaration;
visitVariableDeclarators(nodes: VariableDeclarator[]): VariableDeclarator[];
visitVariableDeclarator(n: VariableDeclarator): VariableDeclarator;
visitTsTypeAliasDeclaration(n: TsTypeAliasDeclaration): Declaration;
visitTsModuleDeclaration(n: TsModuleDeclaration): Declaration;
visitTsModuleName(n: TsModuleName): TsModuleName;
visitTsNamespaceBody(n: TsNamespaceBody): TsNamespaceBody | undefined;
visitTsNamespaceDeclaration(n: TsNamespaceDeclaration): TsModuleBlock | TsNamespaceDeclaration;
visitTsModuleBlock(n: TsModuleBlock): TsModuleBlock | TsNamespaceDeclaration;
visitTsInterfaceDeclaration(n: TsInterfaceDeclaration): TsInterfaceDeclaration;
visitTsInterfaceBody(n: TsInterfaceBody): TsInterfaceBody;
visitTsTypeElements(nodes: TsTypeElement[]): TsTypeElement[];
visitTsTypeElement(n: TsTypeElement): TsTypeElement;
visitTsCallSignatureDeclaration(n: TsCallSignatureDeclaration): TsCallSignatureDeclaration;
visitTsConstructSignatureDeclaration(n: TsConstructSignatureDeclaration): TsConstructSignatureDeclaration;
visitTsPropertySignature(n: TsPropertySignature): TsPropertySignature;
visitTsGetterSignature(n: TsGetterSignature): TsGetterSignature;
visitTsSetterSignature(n: TsSetterSignature): TsSetterSignature;
visitTsMethodSignature(n: TsMethodSignature): TsMethodSignature;
visitTsEnumDeclaration(n: TsEnumDeclaration): Declaration;
visitTsEnumMembers(nodes: TsEnumMember[]): TsEnumMember[];
visitTsEnumMember(n: TsEnumMember): TsEnumMember;
visitTsEnumMemberId(n: TsEnumMemberId): TsEnumMemberId;
visitFunctionDeclaration(decl: FunctionDeclaration): Declaration;
visitClassDeclaration(decl: ClassDeclaration): Declaration;
visitClassBody(members: ClassMember[]): ClassMember[];
visitClassMember(member: ClassMember): ClassMember;
visitTsIndexSignature(n: TsIndexSignature): TsIndexSignature;
visitTsFnParameters(params: TsFnParameter[]): TsFnParameter[];
visitTsFnParameter(n: TsFnParameter): TsFnParameter;
visitPrivateProperty(n: PrivateProperty): ClassMember;
visitPrivateMethod(n: PrivateMethod): ClassMember;
visitPrivateName(n: PrivateName): PrivateName;
visitConstructor(n: Constructor): ClassMember;
visitConstructorParameters(nodes: (Param | TsParameterProperty)[]): (Param | TsParameterProperty)[];
visitConstructorParameter(n: Param | TsParameterProperty): Param | TsParameterProperty;
visitStaticBlock(n: StaticBlock): StaticBlock;
visitTsParameterProperty(n: TsParameterProperty): TsParameterProperty | Param;
visitTsParameterPropertyParameter(n: TsParameterPropertyParameter): TsParameterPropertyParameter;
visitPropertyName(key: PropertyName): PropertyName;
visitAccessibility(n: Accessibility | undefined): Accessibility | undefined;
visitClassProperty(n: ClassProperty): ClassMember;
visitClassMethod(n: ClassMethod): ClassMember;
visitComputedPropertyKey(n: ComputedPropName): ComputedPropName;
visitClass<T extends Class>(n: T): T;
visitFunction<T extends Fn>(n: T): T;
visitTsExpressionsWithTypeArguments(nodes: TsExpressionWithTypeArguments[]): TsExpressionWithTypeArguments[];
visitTsExpressionWithTypeArguments(n: TsExpressionWithTypeArguments): TsExpressionWithTypeArguments;
visitTsTypeParameterInstantiation(n: TsTypeParameterInstantiation | undefined): TsTypeParameterInstantiation | undefined;
visitTsTypes(nodes: TsType[]): TsType[];
visitTsEntityName(n: TsEntityName): TsEntityName;
visitTsQualifiedName(n: TsQualifiedName): TsQualifiedName;
visitDecorators(nodes: Decorator[] | undefined): Decorator[] | undefined;
visitDecorator(n: Decorator): Decorator;
visitExpressionStatement(stmt: ExpressionStatement): Statement;
visitContinueStatement(stmt: ContinueStatement): Statement;
visitExpression(n: Expression): Expression;
visitOptionalChainingExpression(n: OptionalChainingExpression): Expression;
visitMemberExpressionOrOptionalChainingCall(n: MemberExpression | OptionalChainingCall): MemberExpression | OptionalChainingCall;
visitOptionalChainingCall(n: OptionalChainingCall): OptionalChainingCall;
visitAssignmentExpression(n: AssignmentExpression): Expression;
visitPatternOrExpression(n: Pattern | Expression): Pattern | Expression;
visitYieldExpression(n: YieldExpression): Expression;
visitUpdateExpression(n: UpdateExpression): Expression;
visitUnaryExpression(n: UnaryExpression): Expression;
visitTsTypeAssertion(n: TsTypeAssertion): Expression;
visitTsConstAssertion(n: TsConstAssertion): Expression;
visitTsInstantiation(n: TsInstantiation): TsInstantiation;
visitTsNonNullExpression(n: TsNonNullExpression): Expression;
visitTsAsExpression(n: TsAsExpression): Expression;
visitTsSatisfiesExpression(n: TsSatisfiesExpression): Expression;
visitThisExpression(n: ThisExpression): Expression;
visitTemplateLiteral(n: TemplateLiteral): Expression;
visitParameters(n: Param[]): Param[];
visitParameter(n: Param): Param;
visitTaggedTemplateExpression(n: TaggedTemplateExpression): Expression;
visitSequenceExpression(n: SequenceExpression): Expression;
visitRegExpLiteral(n: RegExpLiteral): Expression;
visitParenthesisExpression(n: ParenthesisExpression): Expression;
visitObjectExpression(n: ObjectExpression): Expression;
visitObjectProperties(nodes: (Property | SpreadElement)[]): (Property | SpreadElement)[];
visitObjectProperty(n: Property | SpreadElement): Property | SpreadElement;
visitProperty(n: Property): Property | SpreadElement;
visitSetterProperty(n: SetterProperty): Property | SpreadElement;
visitMethodProperty(n: MethodProperty): Property | SpreadElement;
visitKeyValueProperty(n: KeyValueProperty): Property | SpreadElement;
visitGetterProperty(n: GetterProperty): Property | SpreadElement;
visitAssignmentProperty(n: AssignmentProperty): Property | SpreadElement;
visitNullLiteral(n: NullLiteral): NullLiteral;
visitNewExpression(n: NewExpression): Expression;
visitTsTypeArguments(n: TsTypeParameterInstantiation | undefined): TsTypeParameterInstantiation | undefined;
visitArguments(nodes: Argument[]): Argument[];
visitArgument(n: Argument): Argument;
visitMetaProperty(n: MetaProperty): Expression;
visitMemberExpression(n: MemberExpression): MemberExpression;
visitSuperPropExpression(n: SuperPropExpression): Expression;
visitCallee(n: Expression | Super | Import): Expression | Super | Import;
visitJSXText(n: JSXText): JSXText;
visitJSXNamespacedName(n: JSXNamespacedName): JSXNamespacedName;
visitJSXMemberExpression(n: JSXMemberExpression): JSXMemberExpression;
visitJSXObject(n: JSXObject): JSXObject;
visitJSXFragment(n: JSXFragment): JSXFragment;
visitJSXClosingFragment(n: JSXClosingFragment): JSXClosingFragment;
visitJSXElementChildren(nodes: JSXElementChild[]): JSXElementChild[];
visitJSXElementChild(n: JSXElementChild): JSXElementChild;
visitJSXExpressionContainer(n: JSXExpressionContainer): JSXExpressionContainer;
visitJSXSpreadChild(n: JSXSpreadChild): JSXElementChild;
visitJSXOpeningFragment(n: JSXOpeningFragment): JSXOpeningFragment;
visitJSXEmptyExpression(n: JSXEmptyExpression): Expression;
visitJSXElement(n: JSXElement): JSXElement;
visitJSXClosingElement(n: JSXClosingElement | undefined): JSXClosingElement | undefined;
visitJSXElementName(n: JSXElementName): JSXElementName;
visitJSXOpeningElement(n: JSXOpeningElement): JSXOpeningElement;
visitJSXAttributes(attrs: JSXAttributeOrSpread[] | undefined): JSXAttributeOrSpread[] | undefined;
visitJSXAttributeOrSpread(n: JSXAttributeOrSpread): JSXAttributeOrSpread;
visitJSXAttributeOrSpreads(nodes: JSXAttributeOrSpread[]): JSXAttributeOrSpread[];
visitJSXAttribute(n: JSXAttribute): JSXAttributeOrSpread;
visitJSXAttributeValue(n: JSXAttrValue | undefined): JSXAttrValue | undefined;
visitJSXAttributeName(n: JSXAttributeName): JSXAttributeName;
visitConditionalExpression(n: ConditionalExpression): Expression;
visitCallExpression(n: CallExpression): Expression;
visitBooleanLiteral(n: BooleanLiteral): BooleanLiteral;
visitBinaryExpression(n: BinaryExpression): Expression;
visitAwaitExpression(n: AwaitExpression): Expression;
visitTsTypeParameterDeclaration(n: TsTypeParameterDeclaration | undefined): TsTypeParameterDeclaration | undefined;
visitTsTypeParameters(nodes: TsTypeParameter[]): TsTypeParameter[];
visitTsTypeParameter(n: TsTypeParameter): TsTypeParameter;
visitTsTypeAnnotation(a: TsTypeAnnotation | undefined): TsTypeAnnotation | undefined;
visitTsType(n: TsType): TsType;
visitPatterns(nodes: Pattern[]): Pattern[];
visitImportDeclaration(n: ImportDeclaration): ImportDeclaration;
visitImportSpecifiers(nodes: ImportSpecifier[]): ImportSpecifier[];
visitImportSpecifier(node: ImportSpecifier): ImportSpecifier;
visitNamedImportSpecifier(node: NamedImportSpecifier): NamedImportSpecifier;
visitImportNamespaceSpecifier(node: ImportNamespaceSpecifier): ImportNamespaceSpecifier;
visitImportDefaultSpecifier(node: ImportDefaultSpecifier): ImportSpecifier;
visitBindingIdentifier(i: BindingIdentifier): BindingIdentifier;
visitIdentifierReference(i: Identifier): Identifier;
visitLabelIdentifier(label: Identifier): Identifier;
visitIdentifier(n: Identifier): Identifier;
visitStringLiteral(n: StringLiteral): StringLiteral;
visitNumericLiteral(n: NumericLiteral): NumericLiteral;
visitBigIntLiteral(n: BigIntLiteral): BigIntLiteral;
visitPattern(n: Pattern): Pattern;
visitRestElement(n: RestElement): RestElement;
visitAssignmentPattern(n: AssignmentPattern): Pattern;
visitObjectPattern(n: ObjectPattern): Pattern;
visitObjectPatternProperties(nodes: ObjectPatternProperty[]): ObjectPatternProperty[];
visitObjectPatternProperty(n: ObjectPatternProperty): ObjectPatternProperty;
visitKeyValuePatternProperty(n: KeyValuePatternProperty): ObjectPatternProperty;
visitAssignmentPatternProperty(n: AssignmentPatternProperty): ObjectPatternProperty;
visitArrayPattern(n: ArrayPattern): Pattern;
visitArrayPatternElements(nodes: (Pattern | undefined)[]): (Pattern | undefined)[];
visitArrayPatternElement(n: Pattern | undefined): Pattern | undefined;
}
export default Visitor;

View File

@@ -0,0 +1 @@
{"version":3,"file":"linkederrors.js","sources":["../../../../../src/integrations/linkederrors.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { applyAggregateErrorsToEvent, defineIntegration } from '@sentry/core';\nimport { exceptionFromError } from '../eventbuilder';\n\ninterface LinkedErrorsOptions {\n key?: string;\n limit?: number;\n}\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\nconst INTEGRATION_NAME = 'LinkedErrors';\n\nconst _linkedErrorsIntegration = ((options: LinkedErrorsOptions = {}) => {\n const limit = options.limit || DEFAULT_LIMIT;\n const key = options.key || DEFAULT_KEY;\n\n return {\n name: INTEGRATION_NAME,\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n // This differs from the LinkedErrors integration in core by using a different exceptionFromError function\n exceptionFromError,\n options.stackParser,\n key,\n limit,\n event,\n hint,\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Aggregrate linked errors in an event.\n */\nexport const linkedErrorsIntegration = defineIntegration(_linkedErrorsIntegration);\n"],"names":[],"mappings":";;;AASA,MAAM,WAAA,GAAc,OAAO;AAC3B,MAAM,aAAA,GAAgB,CAAC;;AAEvB,MAAM,gBAAA,GAAmB,cAAc;;AAEvC,MAAM,wBAAA,IAA4B,CAAC,OAAO,GAAwB,EAAE,KAAK;AACzE,EAAE,MAAM,KAAA,GAAQ,OAAO,CAAC,KAAA,IAAS,aAAa;AAC9C,EAAE,MAAM,GAAA,GAAM,OAAO,CAAC,GAAA,IAAO,WAAW;;AAExC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,gBAAgB;AAC1B,IAAI,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE;AACzC,MAAM,MAAM,OAAA,GAAU,MAAM,CAAC,UAAU,EAAE;;AAEzC,MAAM,2BAA2B;AACjC;AACA,QAAQ,kBAAkB;AAC1B,QAAQ,OAAO,CAAC,WAAW;AAC3B,QAAQ,GAAG;AACX,QAAQ,KAAK;AACb,QAAQ,KAAK;AACb,QAAQ,IAAI;AACZ,OAAO;AACP,IAAI,CAAC;AACL,GAAG;AACH,CAAC,CAAA;;AAED;AACA;AACA;MACa,uBAAA,GAA0B,iBAAiB,CAAC,wBAAwB;;;;"}

View File

@@ -0,0 +1,11 @@
import { TZDate } from "../date/index.js";
/**
* The function creates accepts a time zone and returns a function that creates
* a new `TZDate` instance in the time zone from the provided value. Use it to
* provide the context for the date-fns functions, via the `in` option.
*
* @param timeZone - Time zone name (IANA or UTC offset)
*
* @returns Function that creates a new `TZDate` instance in the time zone
*/
export declare const tz: (timeZone: string) => (value: Date | number | string) => TZDate;

View File

@@ -0,0 +1,639 @@
'use strict'
const { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require('./headers')
const { extractBody, cloneBody, mixinBody, streamRegistry, bodyUnusable } = require('./body')
const util = require('../../core/util')
const nodeUtil = require('node:util')
const { kEnumerableProperty } = util
const {
isValidReasonPhrase,
isCancelled,
isAborted,
isErrorLike,
environmentSettingsObject: relevantRealm
} = require('./util')
const {
redirectStatusSet,
nullBodyStatus
} = require('./constants')
const { webidl } = require('../webidl')
const { URLSerializer } = require('./data-url')
const { kConstruct } = require('../../core/symbols')
const assert = require('node:assert')
const { isomorphicEncode, serializeJavascriptValueToJSONString } = require('../infra')
const textEncoder = new TextEncoder('utf-8')
// https://fetch.spec.whatwg.org/#response-class
class Response {
/** @type {Headers} */
#headers
#state
// Creates network error Response.
static error () {
// The static error() method steps are to return the result of creating a
// Response object, given a new network error, "immutable", and thiss
// relevant Realm.
const responseObject = fromInnerResponse(makeNetworkError(), 'immutable')
return responseObject
}
// https://fetch.spec.whatwg.org/#dom-response-json
static json (data, init = undefined) {
webidl.argumentLengthCheck(arguments, 1, 'Response.json')
if (init !== null) {
init = webidl.converters.ResponseInit(init)
}
// 1. Let bytes the result of running serialize a JavaScript value to JSON bytes on data.
const bytes = textEncoder.encode(
serializeJavascriptValueToJSONString(data)
)
// 2. Let body be the result of extracting bytes.
const body = extractBody(bytes)
// 3. Let responseObject be the result of creating a Response object, given a new response,
// "response", and thiss relevant Realm.
const responseObject = fromInnerResponse(makeResponse({}), 'response')
// 4. Perform initialize a response given responseObject, init, and (body, "application/json").
initializeResponse(responseObject, init, { body: body[0], type: 'application/json' })
// 5. Return responseObject.
return responseObject
}
// Creates a redirect Response that redirects to url with status status.
static redirect (url, status = 302) {
webidl.argumentLengthCheck(arguments, 1, 'Response.redirect')
url = webidl.converters.USVString(url)
status = webidl.converters['unsigned short'](status)
// 1. Let parsedURL be the result of parsing url with current settings
// objects API base URL.
// 2. If parsedURL is failure, then throw a TypeError.
// TODO: base-URL?
let parsedURL
try {
parsedURL = new URL(url, relevantRealm.settingsObject.baseUrl)
} catch (err) {
throw new TypeError(`Failed to parse URL from ${url}`, { cause: err })
}
// 3. If status is not a redirect status, then throw a RangeError.
if (!redirectStatusSet.has(status)) {
throw new RangeError(`Invalid status code ${status}`)
}
// 4. Let responseObject be the result of creating a Response object,
// given a new response, "immutable", and thiss relevant Realm.
const responseObject = fromInnerResponse(makeResponse({}), 'immutable')
// 5. Set responseObjects responses status to status.
responseObject.#state.status = status
// 6. Let value be parsedURL, serialized and isomorphic encoded.
const value = isomorphicEncode(URLSerializer(parsedURL))
// 7. Append `Location`/value to responseObjects responses header list.
responseObject.#state.headersList.append('location', value, true)
// 8. Return responseObject.
return responseObject
}
// https://fetch.spec.whatwg.org/#dom-response
constructor (body = null, init = undefined) {
webidl.util.markAsUncloneable(this)
if (body === kConstruct) {
return
}
if (body !== null) {
body = webidl.converters.BodyInit(body, 'Response', 'body')
}
init = webidl.converters.ResponseInit(init)
// 1. Set thiss response to a new response.
this.#state = makeResponse({})
// 2. Set thiss headers to a new Headers object with thiss relevant
// Realm, whose header list is thiss responses header list and guard
// is "response".
this.#headers = new Headers(kConstruct)
setHeadersGuard(this.#headers, 'response')
setHeadersList(this.#headers, this.#state.headersList)
// 3. Let bodyWithType be null.
let bodyWithType = null
// 4. If body is non-null, then set bodyWithType to the result of extracting body.
if (body != null) {
const [extractedBody, type] = extractBody(body)
bodyWithType = { body: extractedBody, type }
}
// 5. Perform initialize a response given this, init, and bodyWithType.
initializeResponse(this, init, bodyWithType)
}
// Returns responses type, e.g., "cors".
get type () {
webidl.brandCheck(this, Response)
// The type getter steps are to return thiss responses type.
return this.#state.type
}
// Returns responses URL, if it has one; otherwise the empty string.
get url () {
webidl.brandCheck(this, Response)
const urlList = this.#state.urlList
// The url getter steps are to return the empty string if thiss
// responses URL is null; otherwise thiss responses URL,
// serialized with exclude fragment set to true.
const url = urlList[urlList.length - 1] ?? null
if (url === null) {
return ''
}
return URLSerializer(url, true)
}
// Returns whether response was obtained through a redirect.
get redirected () {
webidl.brandCheck(this, Response)
// The redirected getter steps are to return true if thiss responses URL
// list has more than one item; otherwise false.
return this.#state.urlList.length > 1
}
// Returns responses status.
get status () {
webidl.brandCheck(this, Response)
// The status getter steps are to return thiss responses status.
return this.#state.status
}
// Returns whether responses status is an ok status.
get ok () {
webidl.brandCheck(this, Response)
// The ok getter steps are to return true if thiss responses status is an
// ok status; otherwise false.
return this.#state.status >= 200 && this.#state.status <= 299
}
// Returns responses status message.
get statusText () {
webidl.brandCheck(this, Response)
// The statusText getter steps are to return thiss responses status
// message.
return this.#state.statusText
}
// Returns responses headers as Headers.
get headers () {
webidl.brandCheck(this, Response)
// The headers getter steps are to return thiss headers.
return this.#headers
}
get body () {
webidl.brandCheck(this, Response)
return this.#state.body ? this.#state.body.stream : null
}
get bodyUsed () {
webidl.brandCheck(this, Response)
return !!this.#state.body && util.isDisturbed(this.#state.body.stream)
}
// Returns a clone of response.
clone () {
webidl.brandCheck(this, Response)
// 1. If this is unusable, then throw a TypeError.
if (bodyUnusable(this.#state)) {
throw webidl.errors.exception({
header: 'Response.clone',
message: 'Body has already been consumed.'
})
}
// 2. Let clonedResponse be the result of cloning thiss response.
const clonedResponse = cloneResponse(this.#state)
// Note: To re-register because of a new stream.
if (this.#state.body?.stream) {
streamRegistry.register(this, new WeakRef(this.#state.body.stream))
}
// 3. Return the result of creating a Response object, given
// clonedResponse, thiss headerss guard, and thiss relevant Realm.
return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers))
}
[nodeUtil.inspect.custom] (depth, options) {
if (options.depth === null) {
options.depth = 2
}
options.colors ??= true
const properties = {
status: this.status,
statusText: this.statusText,
headers: this.headers,
body: this.body,
bodyUsed: this.bodyUsed,
ok: this.ok,
redirected: this.redirected,
type: this.type,
url: this.url
}
return `Response ${nodeUtil.formatWithOptions(options, properties)}`
}
/**
* @param {Response} response
*/
static getResponseHeaders (response) {
return response.#headers
}
/**
* @param {Response} response
* @param {Headers} newHeaders
*/
static setResponseHeaders (response, newHeaders) {
response.#headers = newHeaders
}
/**
* @param {Response} response
*/
static getResponseState (response) {
return response.#state
}
/**
* @param {Response} response
* @param {any} newState
*/
static setResponseState (response, newState) {
response.#state = newState
}
}
const { getResponseHeaders, setResponseHeaders, getResponseState, setResponseState } = Response
Reflect.deleteProperty(Response, 'getResponseHeaders')
Reflect.deleteProperty(Response, 'setResponseHeaders')
Reflect.deleteProperty(Response, 'getResponseState')
Reflect.deleteProperty(Response, 'setResponseState')
mixinBody(Response, getResponseState)
Object.defineProperties(Response.prototype, {
type: kEnumerableProperty,
url: kEnumerableProperty,
status: kEnumerableProperty,
ok: kEnumerableProperty,
redirected: kEnumerableProperty,
statusText: kEnumerableProperty,
headers: kEnumerableProperty,
clone: kEnumerableProperty,
body: kEnumerableProperty,
bodyUsed: kEnumerableProperty,
[Symbol.toStringTag]: {
value: 'Response',
configurable: true
}
})
Object.defineProperties(Response, {
json: kEnumerableProperty,
redirect: kEnumerableProperty,
error: kEnumerableProperty
})
// https://fetch.spec.whatwg.org/#concept-response-clone
function cloneResponse (response) {
// To clone a response response, run these steps:
// 1. If response is a filtered response, then return a new identical
// filtered response whose internal response is a clone of responses
// internal response.
if (response.internalResponse) {
return filterResponse(
cloneResponse(response.internalResponse),
response.type
)
}
// 2. Let newResponse be a copy of response, except for its body.
const newResponse = makeResponse({ ...response, body: null })
// 3. If responses body is non-null, then set newResponses body to the
// result of cloning responses body.
if (response.body != null) {
newResponse.body = cloneBody(response.body)
}
// 4. Return newResponse.
return newResponse
}
function makeResponse (init) {
return {
aborted: false,
rangeRequested: false,
timingAllowPassed: false,
requestIncludesCredentials: false,
type: 'default',
status: 200,
timingInfo: null,
cacheState: '',
statusText: '',
...init,
headersList: init?.headersList
? new HeadersList(init?.headersList)
: new HeadersList(),
urlList: init?.urlList ? [...init.urlList] : []
}
}
function makeNetworkError (reason) {
const isError = isErrorLike(reason)
return makeResponse({
type: 'error',
status: 0,
error: isError
? reason
: new Error(reason ? String(reason) : reason),
aborted: reason && reason.name === 'AbortError'
})
}
// @see https://fetch.spec.whatwg.org/#concept-network-error
function isNetworkError (response) {
return (
// A network error is a response whose type is "error",
response.type === 'error' &&
// status is 0
response.status === 0
)
}
function makeFilteredResponse (response, state) {
state = {
internalResponse: response,
...state
}
return new Proxy(response, {
get (target, p) {
return p in state ? state[p] : target[p]
},
set (target, p, value) {
assert(!(p in state))
target[p] = value
return true
}
})
}
// https://fetch.spec.whatwg.org/#concept-filtered-response
function filterResponse (response, type) {
// Set response to the following filtered response with response as its
// internal response, depending on requests response tainting:
if (type === 'basic') {
// A basic filtered response is a filtered response whose type is "basic"
// and header list excludes any headers in internal responses header list
// whose name is a forbidden response-header name.
// Note: undici does not implement forbidden response-header names
return makeFilteredResponse(response, {
type: 'basic',
headersList: response.headersList
})
} else if (type === 'cors') {
// A CORS filtered response is a filtered response whose type is "cors"
// and header list excludes any headers in internal responses header
// list whose name is not a CORS-safelisted response-header name, given
// internal responses CORS-exposed header-name list.
// Note: undici does not implement CORS-safelisted response-header names
return makeFilteredResponse(response, {
type: 'cors',
headersList: response.headersList
})
} else if (type === 'opaque') {
// An opaque filtered response is a filtered response whose type is
// "opaque", URL list is the empty list, status is 0, status message
// is the empty byte sequence, header list is empty, and body is null.
return makeFilteredResponse(response, {
type: 'opaque',
urlList: [],
status: 0,
statusText: '',
body: null
})
} else if (type === 'opaqueredirect') {
// An opaque-redirect filtered response is a filtered response whose type
// is "opaqueredirect", status is 0, status message is the empty byte
// sequence, header list is empty, and body is null.
return makeFilteredResponse(response, {
type: 'opaqueredirect',
status: 0,
statusText: '',
headersList: [],
body: null
})
} else {
assert(false)
}
}
// https://fetch.spec.whatwg.org/#appropriate-network-error
function makeAppropriateNetworkError (fetchParams, err = null) {
// 1. Assert: fetchParams is canceled.
assert(isCancelled(fetchParams))
// 2. Return an aborted network error if fetchParams is aborted;
// otherwise return a network error.
return isAborted(fetchParams)
? makeNetworkError(Object.assign(new DOMException('The operation was aborted.', 'AbortError'), { cause: err }))
: makeNetworkError(Object.assign(new DOMException('Request was cancelled.'), { cause: err }))
}
// https://whatpr.org/fetch/1392.html#initialize-a-response
function initializeResponse (response, init, body) {
// 1. If init["status"] is not in the range 200 to 599, inclusive, then
// throw a RangeError.
if (init.status !== null && (init.status < 200 || init.status > 599)) {
throw new RangeError('init["status"] must be in the range of 200 to 599, inclusive.')
}
// 2. If init["statusText"] does not match the reason-phrase token production,
// then throw a TypeError.
if ('statusText' in init && init.statusText != null) {
// See, https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2:
// reason-phrase = *( HTAB / SP / VCHAR / obs-text )
if (!isValidReasonPhrase(String(init.statusText))) {
throw new TypeError('Invalid statusText')
}
}
// 3. Set responses responses status to init["status"].
if ('status' in init && init.status != null) {
getResponseState(response).status = init.status
}
// 4. Set responses responses status message to init["statusText"].
if ('statusText' in init && init.statusText != null) {
getResponseState(response).statusText = init.statusText
}
// 5. If init["headers"] exists, then fill responses headers with init["headers"].
if ('headers' in init && init.headers != null) {
fill(getResponseHeaders(response), init.headers)
}
// 6. If body was given, then:
if (body) {
// 1. If response's status is a null body status, then throw a TypeError.
if (nullBodyStatus.includes(response.status)) {
throw webidl.errors.exception({
header: 'Response constructor',
message: `Invalid response status code ${response.status}`
})
}
// 2. Set response's body to body's body.
getResponseState(response).body = body.body
// 3. If body's type is non-null and response's header list does not contain
// `Content-Type`, then append (`Content-Type`, body's type) to response's header list.
if (body.type != null && !getResponseState(response).headersList.contains('content-type', true)) {
getResponseState(response).headersList.append('content-type', body.type, true)
}
}
}
/**
* @see https://fetch.spec.whatwg.org/#response-create
* @param {any} innerResponse
* @param {'request' | 'immutable' | 'request-no-cors' | 'response' | 'none'} guard
* @returns {Response}
*/
function fromInnerResponse (innerResponse, guard) {
const response = new Response(kConstruct)
setResponseState(response, innerResponse)
const headers = new Headers(kConstruct)
setResponseHeaders(response, headers)
setHeadersList(headers, innerResponse.headersList)
setHeadersGuard(headers, guard)
if (innerResponse.body?.stream) {
// If the target (response) is reclaimed, the cleanup callback may be called at some point with
// the held value provided for it (innerResponse.body.stream). The held value can be any value:
// a primitive or an object, even undefined. If the held value is an object, the registry keeps
// a strong reference to it (so it can pass it to the cleanup callback later). Reworded from
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/FinalizationRegistry
streamRegistry.register(response, new WeakRef(innerResponse.body.stream))
}
return response
}
// https://fetch.spec.whatwg.org/#typedefdef-xmlhttprequestbodyinit
webidl.converters.XMLHttpRequestBodyInit = function (V, prefix, name) {
if (typeof V === 'string') {
return webidl.converters.USVString(V, prefix, name)
}
if (webidl.is.Blob(V)) {
return V
}
if (webidl.is.BufferSource(V)) {
return V
}
if (webidl.is.FormData(V)) {
return V
}
if (webidl.is.URLSearchParams(V)) {
return V
}
return webidl.converters.DOMString(V, prefix, name)
}
// https://fetch.spec.whatwg.org/#bodyinit
webidl.converters.BodyInit = function (V, prefix, argument) {
if (webidl.is.ReadableStream(V)) {
return V
}
// Note: the spec doesn't include async iterables,
// this is an undici extension.
if (V?.[Symbol.asyncIterator]) {
return V
}
return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument)
}
webidl.converters.ResponseInit = webidl.dictionaryConverter([
{
key: 'status',
converter: webidl.converters['unsigned short'],
defaultValue: () => 200
},
{
key: 'statusText',
converter: webidl.converters.ByteString,
defaultValue: () => ''
},
{
key: 'headers',
converter: webidl.converters.HeadersInit
}
])
webidl.is.Response = webidl.util.MakeTypeAssertion(Response)
module.exports = {
isNetworkError,
makeNetworkError,
makeResponse,
makeAppropriateNetworkError,
filterResponse,
Response,
cloneResponse,
fromInnerResponse,
getResponseState
}

View File

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

View File

@@ -0,0 +1,8 @@
type Args = {
data: unknown;
id?: unknown;
locale?: string;
};
export declare const transformSelects: ({ id, data, locale }: Args) => Record<string, unknown>[];
export {};
//# sourceMappingURL=selects.d.ts.map

View File

@@ -0,0 +1,39 @@
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { useRouteCache } from '../../../../providers/RouteCache/index.js';
import { useTranslation } from '../../../../providers/Translation/index.js';
import { useDocumentDrawer } from '../../../DocumentDrawer/index.js';
import { ListSelectionButton } from '../../../ListSelection/index.js';
export const EditFolderAction = ({
id,
folderCollectionSlug
}) => {
const {
clearRouteCache
} = useRouteCache();
const {
t
} = useTranslation();
const [FolderDocumentDrawer,, {
closeDrawer,
openDrawer
}] = useDocumentDrawer({
id,
collectionSlug: folderCollectionSlug
});
if (!id) {
return null;
}
return /*#__PURE__*/_jsxs(_Fragment, {
children: [/*#__PURE__*/_jsx(ListSelectionButton, {
onClick: openDrawer,
type: "button",
children: t('general:edit')
}), /*#__PURE__*/_jsx(FolderDocumentDrawer, {
onSave: () => {
closeDrawer();
clearRouteCache();
}
})]
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Exception.js","sourceRoot":"","sources":["../../../src/common/Exception.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG","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\ninterface ExceptionWithCode {\n code: string | number;\n name?: string;\n message?: string;\n stack?: string;\n}\n\ninterface ExceptionWithMessage {\n code?: string | number;\n message: string;\n name?: string;\n stack?: string;\n}\n\ninterface ExceptionWithName {\n code?: string | number;\n message?: string;\n name: string;\n stack?: string;\n}\n\n/**\n * Defines Exception.\n *\n * string or an object with one of (message or name or code) and optional stack\n */\nexport type Exception =\n | ExceptionWithCode\n | ExceptionWithMessage\n | ExceptionWithName\n | string;\n"]}

View File

@@ -0,0 +1,42 @@
import { normalizeDates } from "./_lib/normalizeDates.js";
import { startOfQuarter } from "./startOfQuarter.js";
/**
* The {@link isSameQuarter} function options.
*/
/**
* @name isSameQuarter
* @category Quarter Helpers
* @summary Are the given dates in the same quarter (and year)?
*
* @description
* Are the given dates in the same quarter (and year)?
*
* @param laterDate - The first date to check
* @param earlierDate - The second date to check
* @param options - An object with options
*
* @returns The dates are in the same quarter (and year)
*
* @example
* // Are 1 January 2014 and 8 March 2014 in the same quarter?
* const result = isSameQuarter(new Date(2014, 0, 1), new Date(2014, 2, 8))
* //=> true
*
* @example
* // Are 1 January 2014 and 1 January 2015 in the same quarter?
* const result = isSameQuarter(new Date(2014, 0, 1), new Date(2015, 0, 1))
* //=> false
*/
export function isSameQuarter(laterDate, earlierDate, options) {
const [dateLeft_, dateRight_] = normalizeDates(
options?.in,
laterDate,
earlierDate,
);
return +startOfQuarter(dateLeft_) === +startOfQuarter(dateRight_);
}
// Fallback for modularized imports:
export default isSameQuarter;

View File

@@ -0,0 +1,10 @@
@layer payload-default {
.rah-static {
interpolate-size: allow-keywords;
height: 0;
&--height-auto {
height: auto;
}
}
}

View File

@@ -0,0 +1,558 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {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/ar-TN/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u0623\u0642\u0644 \u0645\u0646 \u062B\u0627\u0646\u064A\u0629",
two: "\u0623\u0642\u0644 \u0645\u0646 \u0632\u0648\u0632 \u062B\u0648\u0627\u0646\u064A",
threeToTen: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062B\u0648\u0627\u0646\u064A",
other: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062B\u0627\u0646\u064A\u0629"
},
xSeconds: {
one: "\u062B\u0627\u0646\u064A\u0629",
two: "\u0632\u0648\u0632 \u062B\u0648\u0627\u0646\u064A",
threeToTen: "{{count}} \u062B\u0648\u0627\u0646\u064A",
other: "{{count}} \u062B\u0627\u0646\u064A\u0629"
},
halfAMinute: "\u0646\u0635 \u062F\u0642\u064A\u0642\u0629",
lessThanXMinutes: {
one: "\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u0629",
two: "\u0623\u0642\u0644 \u0645\u0646 \u062F\u0642\u064A\u0642\u062A\u064A\u0646",
threeToTen: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062F\u0642\u0627\u064A\u0642",
other: "\u0623\u0642\u0644 \u0645\u0646 {{count}} \u062F\u0642\u064A\u0642\u0629"
},
xMinutes: {
one: "\u062F\u0642\u064A\u0642\u0629",
two: "\u062F\u0642\u064A\u0642\u062A\u064A\u0646",
threeToTen: "{{count}} \u062F\u0642\u0627\u064A\u0642",
other: "{{count}} \u062F\u0642\u064A\u0642\u0629"
},
aboutXHours: {
one: "\u0633\u0627\u0639\u0629 \u062A\u0642\u0631\u064A\u0628",
two: "\u0633\u0627\u0639\u062A\u064A\u0646 \u062A\u0642\u0631\u064A\u0628",
threeToTen: "{{count}} \u0633\u0648\u0627\u064A\u0639 \u062A\u0642\u0631\u064A\u0628",
other: "{{count}} \u0633\u0627\u0639\u0629 \u062A\u0642\u0631\u064A\u0628"
},
xHours: {
one: "\u0633\u0627\u0639\u0629",
two: "\u0633\u0627\u0639\u062A\u064A\u0646",
threeToTen: "{{count}} \u0633\u0648\u0627\u064A\u0639",
other: "{{count}} \u0633\u0627\u0639\u0629"
},
xDays: {
one: "\u0646\u0647\u0627\u0631",
two: "\u0646\u0647\u0627\u0631\u064A\u0646",
threeToTen: "{{count}} \u0623\u064A\u0627\u0645",
other: "{{count}} \u064A\u0648\u0645"
},
aboutXWeeks: {
one: "\u062C\u0645\u0639\u0629 \u062A\u0642\u0631\u064A\u0628",
two: "\u062C\u0645\u0639\u062A\u064A\u0646 \u062A\u0642\u0631\u064A\u0628",
threeToTen: "{{count}} \u062C\u0645\u0627\u0639 \u062A\u0642\u0631\u064A\u0628",
other: "{{count}} \u062C\u0645\u0639\u0629 \u062A\u0642\u0631\u064A\u0628"
},
xWeeks: {
one: "\u062C\u0645\u0639\u0629",
two: "\u062C\u0645\u0639\u062A\u064A\u0646",
threeToTen: "{{count}} \u062C\u0645\u0627\u0639",
other: "{{count}} \u062C\u0645\u0639\u0629"
},
aboutXMonths: {
one: "\u0634\u0647\u0631 \u062A\u0642\u0631\u064A\u0628",
two: "\u0634\u0647\u0631\u064A\u0646 \u062A\u0642\u0631\u064A\u0628",
threeToTen: "{{count}} \u0623\u0634\u0647\u0631\u0629 \u062A\u0642\u0631\u064A\u0628",
other: "{{count}} \u0634\u0647\u0631 \u062A\u0642\u0631\u064A\u0628"
},
xMonths: {
one: "\u0634\u0647\u0631",
two: "\u0634\u0647\u0631\u064A\u0646",
threeToTen: "{{count}} \u0623\u0634\u0647\u0631\u0629",
other: "{{count}} \u0634\u0647\u0631"
},
aboutXYears: {
one: "\u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628",
two: "\u0639\u0627\u0645\u064A\u0646 \u062A\u0642\u0631\u064A\u0628",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645 \u062A\u0642\u0631\u064A\u0628",
other: "{{count}} \u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628"
},
xYears: {
one: "\u0639\u0627\u0645",
two: "\u0639\u0627\u0645\u064A\u0646",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645",
other: "{{count}} \u0639\u0627\u0645"
},
overXYears: {
one: "\u0623\u0643\u062B\u0631 \u0645\u0646 \u0639\u0627\u0645",
two: "\u0623\u0643\u062B\u0631 \u0645\u0646 \u0639\u0627\u0645\u064A\u0646",
threeToTen: "\u0623\u0643\u062B\u0631 \u0645\u0646 {{count}} \u0623\u0639\u0648\u0627\u0645",
other: "\u0623\u0643\u062B\u0631 \u0645\u0646 {{count}} \u0639\u0627\u0645"
},
almostXYears: {
one: "\u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628",
two: "\u0639\u0627\u0645\u064A\u0646 \u062A\u0642\u0631\u064A\u0628",
threeToTen: "{{count}} \u0623\u0639\u0648\u0627\u0645 \u062A\u0642\u0631\u064A\u0628",
other: "{{count}} \u0639\u0627\u0645 \u062A\u0642\u0631\u064A\u0628"
}
};
var formatDistance = function formatDistance(token, count, options) {
var usageGroup = formatDistanceLocale[token];
var result;
if (typeof usageGroup === "string") {
result = usageGroup;
} else if (count === 1) {
result = usageGroup.one;
} else if (count === 2) {
result = usageGroup.two;
} else if (count <= 10) {
result = usageGroup.threeToTen.replace("{{count}}", String(count));
} else {
result = usageGroup.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return "\u0641\u064A " + result;
} else {
return "\u0639\u0646\u062F\u0648 " + result;
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
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/ar-TN/_lib/formatLong.mjs
var dateFormats = {
full: "EEEE\u060C do MMMM y",
long: "do MMMM y",
medium: "d MMM y",
short: "dd/MM/yyyy"
};
var timeFormats = {
full: "HH:mm:ss",
long: "HH:mm:ss",
medium: "HH:mm:ss",
short: "HH:mm"
};
var dateTimeFormats = {
full: "{{date}} '\u0645\u0639' {{time}}",
long: "{{date}} '\u0645\u0639' {{time}}",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/ar-TN/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "eeee '\u0625\u0644\u064A \u0641\u0627\u062A \u0645\u0639' p",
yesterday: "'\u0627\u0644\u0628\u0627\u0631\u062D \u0645\u0639' p",
today: "'\u0627\u0644\u064A\u0648\u0645 \u0645\u0639' p",
tomorrow: "'\u063A\u062F\u0648\u0629 \u0645\u0639' p",
nextWeek: "eeee '\u0627\u0644\u062C\u0645\u0639\u0629 \u0627\u0644\u062C\u0627\u064A\u0629 \u0645\u0639' p '\u0646\u0647\u0627\u0631'",
other: "P"
};
var formatRelative = function formatRelative(token) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.mjs
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/ar-TN/_lib/localize.mjs
var eraValues = {
narrow: ["\u0642", "\u0628"],
abbreviated: ["\u0642.\u0645.", "\u0628.\u0645."],
wide: ["\u0642\u0628\u0644 \u0627\u0644\u0645\u064A\u0644\u0627\u062F", "\u0628\u0639\u062F \u0627\u0644\u0645\u064A\u0644\u0627\u062F"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["\u06311", "\u06312", "\u06313", "\u06314"],
wide: ["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062B\u0627\u0646\u064A", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062B\u0627\u0644\u062B", "\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"]
};
var monthValues = {
narrow: ["\u062F", "\u0646", "\u0623", "\u0633", "\u0623", "\u062C", "\u062C", "\u0645", "\u0623", "\u0645", "\u0641", "\u062C"],
abbreviated: [
"\u062C\u0627\u0646\u0641\u064A",
"\u0641\u064A\u0641\u0631\u064A",
"\u0645\u0627\u0631\u0633",
"\u0623\u0641\u0631\u064A\u0644",
"\u0645\u0627\u064A",
"\u062C\u0648\u0627\u0646",
"\u062C\u0648\u064A\u0644\u064A\u0629",
"\u0623\u0648\u062A",
"\u0633\u0628\u062A\u0645\u0628\u0631",
"\u0623\u0643\u062A\u0648\u0628\u0631",
"\u0646\u0648\u0641\u0645\u0628\u0631",
"\u062F\u064A\u0633\u0645\u0628\u0631"],
wide: [
"\u062C\u0627\u0646\u0641\u064A",
"\u0641\u064A\u0641\u0631\u064A",
"\u0645\u0627\u0631\u0633",
"\u0623\u0641\u0631\u064A\u0644",
"\u0645\u0627\u064A",
"\u062C\u0648\u0627\u0646",
"\u062C\u0648\u064A\u0644\u064A\u0629",
"\u0623\u0648\u062A",
"\u0633\u0628\u062A\u0645\u0628\u0631",
"\u0623\u0643\u062A\u0648\u0628\u0631",
"\u0646\u0648\u0641\u0645\u0628\u0631",
"\u062F\u064A\u0633\u0645\u0628\u0631"]
};
var dayValues = {
narrow: ["\u062D", "\u0646", "\u062B", "\u0631", "\u062E", "\u062C", "\u0633"],
short: ["\u0623\u062D\u062F", "\u0627\u062B\u0646\u064A\u0646", "\u062B\u0644\u0627\u062B\u0627\u0621", "\u0623\u0631\u0628\u0639\u0627\u0621", "\u062E\u0645\u064A\u0633", "\u062C\u0645\u0639\u0629", "\u0633\u0628\u062A"],
abbreviated: ["\u0623\u062D\u062F", "\u0627\u062B\u0646\u064A\u0646", "\u062B\u0644\u0627\u062B\u0627\u0621", "\u0623\u0631\u0628\u0639\u0627\u0621", "\u062E\u0645\u064A\u0633", "\u062C\u0645\u0639\u0629", "\u0633\u0628\u062A"],
wide: [
"\u0627\u0644\u0623\u062D\u062F",
"\u0627\u0644\u0627\u062B\u0646\u064A\u0646",
"\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621",
"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
"\u0627\u0644\u062E\u0645\u064A\u0633",
"\u0627\u0644\u062C\u0645\u0639\u0629",
"\u0627\u0644\u0633\u0628\u062A"]
};
var dayPeriodValues = {
narrow: {
am: "\u0635",
pm: "\u0639",
morning: "\u0627\u0644\u0635\u0628\u0627\u062D",
noon: "\u0627\u0644\u0642\u0627\u064A\u0644\u0629",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
evening: "\u0627\u0644\u0639\u0634\u064A\u0629",
night: "\u0627\u0644\u0644\u064A\u0644",
midnight: "\u0646\u0635 \u0627\u0644\u0644\u064A\u0644"
},
abbreviated: {
am: "\u0635",
pm: "\u0639",
morning: "\u0627\u0644\u0635\u0628\u0627\u062D",
noon: "\u0627\u0644\u0642\u0627\u064A\u0644\u0629",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
evening: "\u0627\u0644\u0639\u0634\u064A\u0629",
night: "\u0627\u0644\u0644\u064A\u0644",
midnight: "\u0646\u0635 \u0627\u0644\u0644\u064A\u0644"
},
wide: {
am: "\u0635",
pm: "\u0639",
morning: "\u0627\u0644\u0635\u0628\u0627\u062D",
noon: "\u0627\u0644\u0642\u0627\u064A\u0644\u0629",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
evening: "\u0627\u0644\u0639\u0634\u064A\u0629",
night: "\u0627\u0644\u0644\u064A\u0644",
midnight: "\u0646\u0635 \u0627\u0644\u0644\u064A\u0644"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u0635",
pm: "\u0639",
morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
noon: "\u0641\u064A \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
evening: "\u0641\u064A \u0627\u0644\u0639\u0634\u064A\u0629",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644",
midnight: "\u0646\u0635 \u0627\u0644\u0644\u064A\u0644"
},
abbreviated: {
am: "\u0635",
pm: "\u0639",
morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
noon: "\u0641\u064A \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
evening: "\u0641\u064A \u0627\u0644\u0639\u0634\u064A\u0629",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644",
midnight: "\u0646\u0635 \u0627\u0644\u0644\u064A\u0644"
},
wide: {
am: "\u0635",
pm: "\u0639",
morning: "\u0641\u064A \u0627\u0644\u0635\u0628\u0627\u062D",
noon: "\u0641\u064A \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
afternoon: "\u0628\u0639\u062F \u0627\u0644\u0642\u0627\u064A\u0644\u0629",
evening: "\u0641\u064A \u0627\u0644\u0639\u0634\u064A\u0629",
night: "\u0641\u064A \u0627\u0644\u0644\u064A\u0644",
midnight: "\u0646\u0635 \u0627\u0644\u0644\u064A\u0644"
}
};
var ordinalNumber = function ordinalNumber(num) {return String(num);};
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/buildMatchPatternFn.mjs
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/_lib/buildMatchFn.mjs
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 };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/ar-TN/_lib/match.mjs
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /[قب]/,
abbreviated: /[قب]\.م\./,
wide: /(قبل|بعد) الميلاد/
};
var parseEraPatterns = {
any: [/قبل/, /بعد/]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /ر[1234]/,
wide: /الربع (الأول|الثاني|الثالث|الرابع)/
};
var parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i]
};
var matchMonthPatterns = {
narrow: /^[جفمأسند]/,
abbreviated: /^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/,
wide: /^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/
};
var parseMonthPatterns = {
narrow: [
/^ج/i,
/^ف/i,
/^م/i,
/^أ/i,
/^م/i,
/^ج/i,
/^ج/i,
/^أ/i,
/^س/i,
/^أ/i,
/^ن/i,
/^د/i],
any: [
/^جانفي/i,
/^فيفري/i,
/^مارس/i,
/^أفريل/i,
/^ماي/i,
/^جوان/i,
/^جويلية/i,
/^أوت/i,
/^سبتمبر/i,
/^أكتوبر/i,
/^نوفمبر/i,
/^ديسمبر/i]
};
var matchDayPatterns = {
narrow: /^[حنثرخجس]/i,
short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
abbreviated: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i
};
var parseDayPatterns = {
narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
wide: [
/^الأحد/i,
/^الاثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i],
any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i]
};
var matchDayPeriodPatterns = {
narrow: /^(ص|ع|ن ل|ل|(في|مع) (صباح|قايلة|عشية|ليل))/,
any: /^([صع]|نص الليل|قايلة|(في|مع) (صباح|قايلة|عشية|ليل))/
};
var parseDayPeriodPatterns = {
any: {
am: /^ص/,
pm: /^ع/,
midnight: /نص الليل/,
noon: /قايلة/,
afternoon: /بعد القايلة/,
morning: /صباح/,
evening: /عشية/,
night: /ليل/
}
};
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/ar-TN.mjs
var arTN = {
code: "ar-TN",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1,
firstWeekContainsDate: 1
}
};
// lib/locale/ar-TN/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), {}, {
arTN: arTN }) });
//# debugId=C2AAC8C37DED92A364756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1,44 @@
import { entityKind } from "../../entity.cjs";
import { QueryPromise } from "../../query-promise.cjs";
import { type BuildQueryResult, type DBQueryConfig, type TableRelationalConfig, type TablesRelationalConfig } from "../../relations.cjs";
import type { Query } from "../../sql/sql.cjs";
import type { KnownKeysOnly } from "../../utils.cjs";
import type { MySqlDialect } from "../dialect.cjs";
import type { Mode, MySqlPreparedQueryConfig, MySqlSession, PreparedQueryHKTBase, PreparedQueryKind } from "../session.cjs";
import type { MySqlTable } from "../table.cjs";
export declare class RelationalQueryBuilder<TPreparedQueryHKT extends PreparedQueryHKTBase, TSchema extends TablesRelationalConfig, TFields extends TableRelationalConfig> {
private fullSchema;
private schema;
private tableNamesMap;
private table;
private tableConfig;
private dialect;
private session;
private mode;
static readonly [entityKind]: string;
constructor(fullSchema: Record<string, unknown>, schema: TSchema, tableNamesMap: Record<string, string>, table: MySqlTable, tableConfig: TableRelationalConfig, dialect: MySqlDialect, session: MySqlSession, mode: Mode);
findMany<TConfig extends DBQueryConfig<'many', true, TSchema, TFields>>(config?: KnownKeysOnly<TConfig, DBQueryConfig<'many', true, TSchema, TFields>>): MySqlRelationalQuery<TPreparedQueryHKT, BuildQueryResult<TSchema, TFields, TConfig>[]>;
findFirst<TSelection extends Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>(config?: KnownKeysOnly<TSelection, Omit<DBQueryConfig<'many', true, TSchema, TFields>, 'limit'>>): MySqlRelationalQuery<TPreparedQueryHKT, BuildQueryResult<TSchema, TFields, TSelection> | undefined>;
}
export declare class MySqlRelationalQuery<TPreparedQueryHKT extends PreparedQueryHKTBase, TResult> extends QueryPromise<TResult> {
private fullSchema;
private schema;
private tableNamesMap;
private table;
private tableConfig;
private dialect;
private session;
private config;
private queryMode;
private mode?;
static readonly [entityKind]: string;
protected $brand: 'MySqlRelationalQuery';
constructor(fullSchema: Record<string, unknown>, schema: TablesRelationalConfig, tableNamesMap: Record<string, string>, table: MySqlTable, tableConfig: TableRelationalConfig, dialect: MySqlDialect, session: MySqlSession, config: DBQueryConfig<'many', true> | true, queryMode: 'many' | 'first', mode?: Mode | undefined);
prepare(): PreparedQueryKind<TPreparedQueryHKT, MySqlPreparedQueryConfig & {
execute: TResult;
}, true>;
private _getQuery;
private _toSQL;
toSQL(): Query;
execute(): Promise<TResult>;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/internal/utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;GAIG;AACH,wBAAwB;AACxB,MAAM,UAAU,cAAc,CAAI,MAAyB;IACzD,4EAA4E;IAC5E,IAAI,GAAG,GAAQ,EAAE,CAAC;IAClB,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC;IAC1B,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE,EAAE;QAC/B,MAAM,GAAG,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC;QACvB,IAAI,GAAG,EAAE;YACP,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;SAC5D;KACF;IAED,OAAO,GAAQ,CAAC;AAClB,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\n/**\n * Creates a const map from the given values\n * @param values - An array of values to be used as keys and values in the map.\n * @returns A populated version of the map with the values and keys derived from the values.\n */\n/*#__NO_SIDE_EFFECTS__*/\nexport function createConstMap<T>(values: Array<T[keyof T]>): T {\n // eslint-disable-next-line prefer-const, @typescript-eslint/no-explicit-any\n let res: any = {};\n const len = values.length;\n for (let lp = 0; lp < len; lp++) {\n const val = values[lp];\n if (val) {\n res[String(val).toUpperCase().replace(/[-.]/g, '_')] = val;\n }\n }\n\n return res as T;\n}\n"]}

View File

@@ -0,0 +1,189 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.graphqlHttp = {}));
})(this, (function (exports) { 'use strict';
/**
*
* utils
*
*/
/** @private */
/** @private */
function isObject(val) {
return typeof val === 'object' && val !== null;
}
/**
*
* client
*
*/
/**
* Creates a disposable GraphQL over HTTP client to transmit
* GraphQL operation results.
*
* @category Client
*/
function createClient(options) {
const { credentials = 'same-origin', referrer, referrerPolicy, shouldRetry = () => false, } = options;
const fetchFn = (options.fetchFn || fetch);
const AbortControllerImpl = (options.abortControllerImpl ||
AbortController);
// we dont use yet another AbortController here because of
// node's max EventEmitters listeners being only 10
const client = (() => {
let disposed = false;
const listeners = [];
return {
get disposed() {
return disposed;
},
onDispose(cb) {
if (disposed) {
// empty the call stack and then call the cb
setTimeout(() => cb(), 0);
return () => {
// noop
};
}
listeners.push(cb);
return () => {
listeners.splice(listeners.indexOf(cb), 1);
};
},
dispose() {
if (disposed)
return;
disposed = true;
// we copy the listeners so that onDispose unlistens dont "pull the rug under our feet"
for (const listener of [...listeners]) {
listener();
}
},
};
})();
return {
subscribe(request, sink) {
if (client.disposed)
throw new Error('Client has been disposed');
const control = new AbortControllerImpl();
const unlisten = client.onDispose(() => {
unlisten();
control.abort();
});
(async () => {
var _a;
let retryingErr = null, retries = 0;
for (;;) {
if (retryingErr) {
const should = await shouldRetry(retryingErr, retries);
// requst might've been canceled while waiting for retry
if (control.signal.aborted)
return;
if (!should)
throw retryingErr;
retries++;
}
try {
const url = typeof options.url === 'function'
? await options.url(request)
: options.url;
if (control.signal.aborted)
return;
const headers = typeof options.headers === 'function'
? await options.headers()
: (_a = options.headers) !== null && _a !== void 0 ? _a : {};
if (control.signal.aborted)
return;
let res;
try {
res = await fetchFn(url, {
signal: control.signal,
method: 'POST',
headers: Object.assign(Object.assign({}, headers), { 'content-type': 'application/json; charset=utf-8', accept: 'application/graphql-response+json, application/json' }),
credentials,
referrer,
referrerPolicy,
body: JSON.stringify(request),
});
}
catch (err) {
throw new NetworkError(err);
}
if (!res.ok)
throw new NetworkError(res);
if (!res.body)
throw new Error('Missing response body');
const contentType = res.headers.get('content-type');
if (!contentType)
throw new Error('Missing response content-type');
if (!contentType.includes('application/graphql-response+json') &&
!contentType.includes('application/json')) {
throw new Error(`Unsupported response content-type ${contentType}`);
}
const result = await res.json();
// eslint-disable-next-line @typescript-eslint/no-explicit-any
sink.next(result);
return control.abort();
}
catch (err) {
if (control.signal.aborted)
return;
// all non-network errors are worth reporting immediately
if (!(err instanceof NetworkError))
throw err;
// try again
retryingErr = err;
}
}
})()
.then(() => sink.complete())
.catch((err) => sink.error(err));
return () => control.abort();
},
dispose() {
client.dispose();
},
};
}
/**
* A network error caused by the client or an unexpected response from the server.
*
* To avoid bundling DOM typings (because the client can run in Node env too),
* you should supply the `Response` generic depending on your Fetch implementation.
*
* @category Client
*/
class NetworkError extends Error {
constructor(msgOrErrOrResponse) {
let message, response;
if (isResponseLike(msgOrErrOrResponse)) {
response = msgOrErrOrResponse;
message =
'Server responded with ' +
msgOrErrOrResponse.status +
': ' +
msgOrErrOrResponse.statusText;
}
else if (msgOrErrOrResponse instanceof Error)
message = msgOrErrOrResponse.message;
else
message = String(msgOrErrOrResponse);
super(message);
this.name = this.constructor.name;
this.response = response;
}
}
function isResponseLike(val) {
return (isObject(val) &&
typeof val['ok'] === 'boolean' &&
typeof val['status'] === 'number' &&
typeof val['statusText'] === 'string');
}
exports.NetworkError = NetworkError;
exports.createClient = createClient;
}));

View File

@@ -0,0 +1 @@
export { _ as default } from "../esm/_interop_require_default.js";

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/versions/schedule/types.ts"],"sourcesContent":["import type { CollectionSlug, GlobalSlug } from '../../index.js'\n\nexport type SchedulePublishTaskInput = {\n doc?: {\n relationTo: CollectionSlug\n value: string\n }\n global?: GlobalSlug\n locale?: string\n type?: string\n user?: number | string\n}\n"],"names":[],"mappings":"AAEA,WASC"}

View File

@@ -0,0 +1,42 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = v6;
var _stringify = require("./stringify.js");
var _v = _interopRequireDefault(require("./v1.js"));
var _v1ToV = _interopRequireDefault(require("./v1ToV6.js"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : 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); }
/**
*
* @param {object} options
* @param {Uint8Array=} buf
* @param {number=} offset
* @returns
*/
function v6(options = {}, buf, offset = 0) {
// v6 is v1 with different field layout, so we start with a v1 UUID, albeit
// with slightly different behavior around how the clock_seq and node fields
// are randomized, which is why we call v1 with _v6: true.
var bytes = (0, _v.default)(_objectSpread(_objectSpread({}, options), {}, {
_v6: true
}), new Uint8Array(16));
// Reorder the fields to v6 layout.
bytes = (0, _v1ToV.default)(bytes);
// Return as a byte array if requested
if (buf) {
for (var i = 0; i < 16; i++) {
buf[offset + i] = bytes[i];
}
return buf;
}
return (0, _stringify.unsafeStringify)(bytes);
}

View File

@@ -0,0 +1,3 @@
export { vi } from '@payloadcms/translations/languages/vi';
//# sourceMappingURL=vi.js.map

View File

@@ -0,0 +1,155 @@
@import '../../scss/styles.scss';
@layer payload-default {
.group-field {
margin-left: calc(var(--gutter-h) * -1);
margin-right: calc(var(--gutter-h) * -1);
border-bottom: 1px solid var(--theme-elevation-100);
border-top: 1px solid var(--theme-elevation-100);
&--top-level {
padding: base(2) var(--gutter-h);
&:first-child {
padding-top: 0;
border-top: 0;
}
}
&--within-collapsible {
margin-left: calc(var(--base) * -1);
margin-right: calc(var(--base) * -1);
padding: var(--base);
&:first-child {
border-top: 0;
padding-top: 0;
margin-top: 0;
}
&:last-child {
padding-bottom: 0;
border-bottom: 0;
}
}
&--within-group {
margin-left: 0;
margin-right: 0;
padding: 0;
border-top: 0;
border-bottom: 0;
}
&--within-row {
margin: 0;
border-top: 0;
border-bottom: 0;
}
&--within-tab:first-child {
margin-top: 0;
border-top: 0;
padding-top: 0;
}
&--within-tab:last-child {
margin-bottom: 0;
border-bottom: 0;
padding-bottom: 0;
}
&--gutter {
border-left: 1px solid var(--theme-elevation-100);
padding: 0 0 0 $baseline;
}
&__header {
margin-bottom: calc(var(--base) / 2);
display: flex;
align-items: center;
gap: base(0.5);
> header {
display: flex;
flex-direction: column;
gap: calc(var(--base) / 4);
}
}
&__title {
margin-bottom: 0;
}
@include small-break {
&--top-level {
padding: var(--base) var(--gutter-h);
&:first-child {
padding-top: 0;
border-top: 0;
}
}
&__header {
margin-bottom: calc(var(--base) / 2);
}
&--within-collapsible {
margin-left: calc(var(--gutter-h) * -1);
margin-right: calc(var(--gutter-h) * -1);
}
&--within-group {
margin-left: 0;
margin-right: 0;
padding: 0;
}
&--gutter {
padding-left: var(--gutter-h);
}
}
}
.group-field + .group-field {
border-top: 0;
padding-top: 0;
}
.group-field--within-row + .group-field--within-row {
margin-top: 0;
}
.group-field--within-tab + .group-field--within-row {
padding-top: 0;
}
html[data-theme='light'] {
.group-field {
&--has-error {
.group-field__header {
color: var(--theme-error-750);
&:after {
background: var(--theme-error-500);
}
}
}
}
}
html[data-theme='dark'] {
.group-field {
&--has-error {
.group-field__header {
color: var(--theme-error-500);
&:after {
background: var(--theme-error-500);
}
}
}
}
}
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"option.js","sources":["../../../src/icons/option.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Option\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyAzaDZsNiAxOGg2IiAvPgogIDxwYXRoIGQ9Ik0xNCAzaDciIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/option\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 Option = createLucideIcon('Option', [\n ['path', { d: 'M3 3h6l6 18h6', key: 'ph9rgk' }],\n ['path', { d: 'M14 3h7', key: '16f0ms' }],\n]);\n\nexport default Option;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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;AAC1C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,3 @@
export { ja } from '@payloadcms/translations/languages/ja';
//# sourceMappingURL=ja.js.map

View File

@@ -0,0 +1,35 @@
"use strict";
exports.endOfDay = endOfDay;
var _index = require("./toDate.cjs");
/**
* The {@link endOfDay} function options.
*/
/**
* @name endOfDay
* @category Day Helpers
* @summary Return the end of a day for the given date.
*
* @description
* Return the end of a day for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The original date
* @param options - An object with options
*
* @returns The end of a day
*
* @example
* // The end of a day for 2 September 2014 11:55:00:
* const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
* //=> Tue Sep 02 2014 23:59:59.999
*/
function endOfDay(date, options) {
const _date = (0, _index.toDate)(date, options?.in);
_date.setHours(23, 59, 59, 999);
return _date;
}

View File

@@ -0,0 +1,13 @@
const fs = require('fs')
const JSON5 = require('./')
// eslint-disable-next-line node/no-deprecated-api
require.extensions['.json5'] = function (module, filename) {
const content = fs.readFileSync(filename, 'utf8')
try {
module.exports = JSON5.parse(content)
} catch (err) {
err.message = filename + ': ' + err.message
throw err
}
}

View File

@@ -0,0 +1,21 @@
"use strict";
/*
* Copyright The OpenTelemetry Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.hostDetector = void 0;
const NoopDetector_1 = require("../../NoopDetector");
exports.hostDetector = NoopDetector_1.noopDetector;
//# sourceMappingURL=HostDetector.js.map

View File

@@ -0,0 +1,912 @@
'use strict'
const test = require('tape')
const fastURI = require('..')
/**
* URI.js
*
* @fileoverview An RFC 3986 compliant, scheme extendable URI parsing/normalizing/resolving/serializing library for JavaScript.
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
* @see http://github.com/garycourt/uri-js
*/
/**
* Copyright 2011 Gary Court. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY GARY COURT ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GARY COURT OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of Gary Court.
*/
test('Acquire URI', (t) => {
t.ok(fastURI)
t.end()
})
test('URI Parsing', (t) => {
let components
// scheme
components = fastURI.parse('uri:')
t.equal(components.error, undefined, 'scheme errors')
t.equal(components.scheme, 'uri', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// userinfo
components = fastURI.parse('//@')
t.equal(components.error, undefined, 'userinfo errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, '', 'userinfo')
t.equal(components.host, '', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// host
components = fastURI.parse('//')
t.equal(components.error, undefined, 'host errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// port
components = fastURI.parse('//:')
t.equal(components.error, undefined, 'port errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '', 'host')
t.equal(components.port, '', 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// path
components = fastURI.parse('')
t.equal(components.error, undefined, 'path errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// query
components = fastURI.parse('?')
t.equal(components.error, undefined, 'query errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, '', 'query')
t.equal(components.fragment, undefined, 'fragment')
// fragment
components = fastURI.parse('#')
t.equal(components.error, undefined, 'fragment errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, '', 'fragment')
// fragment with character tabulation
components = fastURI.parse('#\t')
t.equal(components.error, undefined, 'path errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, '%09', 'fragment')
// fragment with line feed
components = fastURI.parse('#\n')
t.equal(components.error, undefined, 'path errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, '%0A', 'fragment')
// fragment with line tabulation
components = fastURI.parse('#\v')
t.equal(components.error, undefined, 'path errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, '%0B', 'fragment')
// fragment with form feed
components = fastURI.parse('#\f')
t.equal(components.error, undefined, 'path errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, '%0C', 'fragment')
// fragment with carriage return
components = fastURI.parse('#\r')
t.equal(components.error, undefined, 'path errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, '%0D', 'fragment')
// all
components = fastURI.parse('uri://user:pass@example.com:123/one/two.three?q1=a1&q2=a2#body')
t.equal(components.error, undefined, 'all errors')
t.equal(components.scheme, 'uri', 'scheme')
t.equal(components.userinfo, 'user:pass', 'userinfo')
t.equal(components.host, 'example.com', 'host')
t.equal(components.port, 123, 'port')
t.equal(components.path, '/one/two.three', 'path')
t.equal(components.query, 'q1=a1&q2=a2', 'query')
t.equal(components.fragment, 'body', 'fragment')
// IPv4address
components = fastURI.parse('//10.10.10.10')
t.equal(components.error, undefined, 'IPv4address errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '10.10.10.10', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// IPv6address
components = fastURI.parse('//[2001:db8::7]')
t.equal(components.error, undefined, 'IPv4address errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '2001:db8::7', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// mixed IPv4address & IPv6address
components = fastURI.parse('//[::ffff:129.144.52.38]')
t.equal(components.error, undefined, 'IPv4address errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '::ffff:129.144.52.38', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// mixed IPv4address & reg-name, example from terion-name (https://github.com/garycourt/uri-js/issues/4)
components = fastURI.parse('uri://10.10.10.10.example.com/en/process')
t.equal(components.error, undefined, 'mixed errors')
t.equal(components.scheme, 'uri', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '10.10.10.10.example.com', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '/en/process', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// IPv6address, example from bkw (https://github.com/garycourt/uri-js/pull/16)
components = fastURI.parse('//[2606:2800:220:1:248:1893:25c8:1946]/test')
t.equal(components.error, undefined, 'IPv6address errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '2606:2800:220:1:248:1893:25c8:1946', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '/test', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// IPv6address, example from RFC 5952
components = fastURI.parse('//[2001:db8::1]:80')
t.equal(components.error, undefined, 'IPv6address errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '2001:db8::1', 'host')
t.equal(components.port, 80, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// IPv6address with zone identifier, RFC 6874
components = fastURI.parse('//[fe80::a%25en1]')
t.equal(components.error, undefined, 'IPv4address errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, 'fe80::a%en1', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
// IPv6address with an unescaped interface specifier, example from pekkanikander (https://github.com/garycourt/uri-js/pull/22)
components = fastURI.parse('//[2001:db8::7%en0]')
t.equal(components.error, undefined, 'IPv6address interface errors')
t.equal(components.scheme, undefined, 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, '2001:db8::7%en0', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, '', 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
t.end()
})
test('URI Serialization', (t) => {
let components = {
scheme: undefined,
userinfo: undefined,
host: undefined,
port: undefined,
path: undefined,
query: undefined,
fragment: undefined
}
t.equal(fastURI.serialize(components), '', 'Undefined Components')
components = {
scheme: '',
userinfo: '',
host: '',
port: 0,
path: '',
query: '',
fragment: ''
}
t.equal(fastURI.serialize(components), '//@:0?#', 'Empty Components')
components = {
scheme: 'uri',
userinfo: 'foo:bar',
host: 'example.com',
port: 1,
path: 'path',
query: 'query',
fragment: 'fragment'
}
t.equal(fastURI.serialize(components), 'uri://foo:bar@example.com:1/path?query#fragment', 'All Components')
components = {
scheme: 'uri',
host: 'example.com',
port: '9000'
}
t.equal(fastURI.serialize(components), 'uri://example.com:9000', 'String port')
t.equal(fastURI.serialize({ path: '//path' }), '/%2Fpath', 'Double slash path')
t.equal(fastURI.serialize({ path: 'foo:bar' }), 'foo%3Abar', 'Colon path')
t.equal(fastURI.serialize({ path: '?query' }), '%3Fquery', 'Query path')
// mixed IPv4address & reg-name, example from terion-name (https://github.com/garycourt/uri-js/issues/4)
t.equal(fastURI.serialize({ host: '10.10.10.10.example.com' }), '//10.10.10.10.example.com', 'Mixed IPv4address & reg-name')
// IPv6address
t.equal(fastURI.serialize({ host: '2001:db8::7' }), '//[2001:db8::7]', 'IPv6 Host')
t.equal(fastURI.serialize({ host: '::ffff:129.144.52.38' }), '//[::ffff:129.144.52.38]', 'IPv6 Mixed Host')
t.equal(fastURI.serialize({ host: '2606:2800:220:1:248:1893:25c8:1946' }), '//[2606:2800:220:1:248:1893:25c8:1946]', 'IPv6 Full Host')
// IPv6address with zone identifier, RFC 6874
t.equal(fastURI.serialize({ host: 'fe80::a%en1' }), '//[fe80::a%25en1]', 'IPv6 Zone Unescaped Host')
t.equal(fastURI.serialize({ host: 'fe80::a%25en1' }), '//[fe80::a%25en1]', 'IPv6 Zone Escaped Host')
t.end()
})
test('URI Resolving', { skip: true }, (t) => {
// normal examples from RFC 3986
const base = 'uri://a/b/c/d;p?q'
t.equal(fastURI.resolve(base, 'g:h'), 'g:h', 'g:h')
t.equal(fastURI.resolve(base, 'g'), 'uri://a/b/c/g', 'g')
t.equal(fastURI.resolve(base, './g'), 'uri://a/b/c/g', './g')
t.equal(fastURI.resolve(base, 'g/'), 'uri://a/b/c/g/', 'g/')
t.equal(fastURI.resolve(base, '/g'), 'uri://a/g', '/g')
t.equal(fastURI.resolve(base, '//g'), 'uri://g', '//g')
t.equal(fastURI.resolve(base, '?y'), 'uri://a/b/c/d;p?y', '?y')
t.equal(fastURI.resolve(base, 'g?y'), 'uri://a/b/c/g?y', 'g?y')
t.equal(fastURI.resolve(base, '#s'), 'uri://a/b/c/d;p?q#s', '#s')
t.equal(fastURI.resolve(base, 'g#s'), 'uri://a/b/c/g#s', 'g#s')
t.equal(fastURI.resolve(base, 'g?y#s'), 'uri://a/b/c/g?y#s', 'g?y#s')
t.equal(fastURI.resolve(base, ';x'), 'uri://a/b/c/;x', ';x')
t.equal(fastURI.resolve(base, 'g;x'), 'uri://a/b/c/g;x', 'g;x')
t.equal(fastURI.resolve(base, 'g;x?y#s'), 'uri://a/b/c/g;x?y#s', 'g;x?y#s')
t.equal(fastURI.resolve(base, ''), 'uri://a/b/c/d;p?q', '')
t.equal(fastURI.resolve(base, '.'), 'uri://a/b/c/', '.')
t.equal(fastURI.resolve(base, './'), 'uri://a/b/c/', './')
t.equal(fastURI.resolve(base, '..'), 'uri://a/b/', '..')
t.equal(fastURI.resolve(base, '../'), 'uri://a/b/', '../')
t.equal(fastURI.resolve(base, '../g'), 'uri://a/b/g', '../g')
t.equal(fastURI.resolve(base, '../..'), 'uri://a/', '../..')
t.equal(fastURI.resolve(base, '../../'), 'uri://a/', '../../')
t.equal(fastURI.resolve(base, '../../g'), 'uri://a/g', '../../g')
// abnormal examples from RFC 3986
t.equal(fastURI.resolve(base, '../../../g'), 'uri://a/g', '../../../g')
t.equal(fastURI.resolve(base, '../../../../g'), 'uri://a/g', '../../../../g')
t.equal(fastURI.resolve(base, '/./g'), 'uri://a/g', '/./g')
t.equal(fastURI.resolve(base, '/../g'), 'uri://a/g', '/../g')
t.equal(fastURI.resolve(base, 'g.'), 'uri://a/b/c/g.', 'g.')
t.equal(fastURI.resolve(base, '.g'), 'uri://a/b/c/.g', '.g')
t.equal(fastURI.resolve(base, 'g..'), 'uri://a/b/c/g..', 'g..')
t.equal(fastURI.resolve(base, '..g'), 'uri://a/b/c/..g', '..g')
t.equal(fastURI.resolve(base, './../g'), 'uri://a/b/g', './../g')
t.equal(fastURI.resolve(base, './g/.'), 'uri://a/b/c/g/', './g/.')
t.equal(fastURI.resolve(base, 'g/./h'), 'uri://a/b/c/g/h', 'g/./h')
t.equal(fastURI.resolve(base, 'g/../h'), 'uri://a/b/c/h', 'g/../h')
t.equal(fastURI.resolve(base, 'g;x=1/./y'), 'uri://a/b/c/g;x=1/y', 'g;x=1/./y')
t.equal(fastURI.resolve(base, 'g;x=1/../y'), 'uri://a/b/c/y', 'g;x=1/../y')
t.equal(fastURI.resolve(base, 'g?y/./x'), 'uri://a/b/c/g?y/./x', 'g?y/./x')
t.equal(fastURI.resolve(base, 'g?y/../x'), 'uri://a/b/c/g?y/../x', 'g?y/../x')
t.equal(fastURI.resolve(base, 'g#s/./x'), 'uri://a/b/c/g#s/./x', 'g#s/./x')
t.equal(fastURI.resolve(base, 'g#s/../x'), 'uri://a/b/c/g#s/../x', 'g#s/../x')
t.equal(fastURI.resolve(base, 'uri:g'), 'uri:g', 'uri:g')
t.equal(fastURI.resolve(base, 'uri:g', { tolerant: true }), 'uri://a/b/c/g', 'uri:g')
// examples by PAEz
t.equal(fastURI.resolve('//www.g.com/', '/adf\ngf'), '//www.g.com/adf%0Agf', '/adf\\ngf')
t.equal(fastURI.resolve('//www.g.com/error\n/bleh/bleh', '..'), '//www.g.com/error%0A/', '//www.g.com/error\\n/bleh/bleh')
t.end()
})
test('URI Normalizing', { skip: true }, (t) => {
// test from RFC 3987
t.equal(fastURI.normalize('uri://www.example.org/red%09ros\xE9#red'), 'uri://www.example.org/red%09ros%C3%A9#red')
// IPv4address
t.equal(fastURI.normalize('//192.068.001.000'), '//192.68.1.0')
// IPv6address, example from RFC 3513
t.equal(fastURI.normalize('http://[1080::8:800:200C:417A]/'), 'http://[1080::8:800:200c:417a]/')
// IPv6address, examples from RFC 5952
t.equal(fastURI.normalize('//[2001:0db8::0001]/'), '//[2001:db8::1]/')
t.equal(fastURI.normalize('//[2001:db8::1:0000:1]/'), '//[2001:db8::1:0:1]/')
t.equal(fastURI.normalize('//[2001:db8:0:0:0:0:2:1]/'), '//[2001:db8::2:1]/')
t.equal(fastURI.normalize('//[2001:db8:0:1:1:1:1:1]/'), '//[2001:db8:0:1:1:1:1:1]/')
t.equal(fastURI.normalize('//[2001:0:0:1:0:0:0:1]/'), '//[2001:0:0:1::1]/')
t.equal(fastURI.normalize('//[2001:db8:0:0:1:0:0:1]/'), '//[2001:db8::1:0:0:1]/')
t.equal(fastURI.normalize('//[2001:DB8::1]/'), '//[2001:db8::1]/')
t.equal(fastURI.normalize('//[0:0:0:0:0:ffff:192.0.2.1]/'), '//[::ffff:192.0.2.1]/')
// Mixed IPv4 and IPv6 address
t.equal(fastURI.normalize('//[1:2:3:4:5:6:192.0.2.1]/'), '//[1:2:3:4:5:6:192.0.2.1]/')
t.equal(fastURI.normalize('//[1:2:3:4:5:6:192.068.001.000]/'), '//[1:2:3:4:5:6:192.68.1.0]/')
t.end()
})
test('URI Equals', (t) => {
// test from RFC 3986
t.equal(fastURI.equal('example://a/b/c/%7Bfoo%7D', 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d'), true)
// test from RFC 3987
t.equal(fastURI.equal('http://example.org/~user', 'http://example.org/%7euser'), true)
t.end()
})
test('Escape Component', { skip: true }, (t) => {
let chr
for (let d = 0; d <= 129; ++d) {
chr = String.fromCharCode(d)
if (!chr.match(/[$&+,;=]/)) {
t.equal(fastURI.escapeComponent(chr), encodeURIComponent(chr))
} else {
t.equal(fastURI.escapeComponent(chr), chr)
}
}
t.equal(fastURI.escapeComponent('\u00c0'), encodeURIComponent('\u00c0'))
t.equal(fastURI.escapeComponent('\u07ff'), encodeURIComponent('\u07ff'))
t.equal(fastURI.escapeComponent('\u0800'), encodeURIComponent('\u0800'))
t.equal(fastURI.escapeComponent('\u30a2'), encodeURIComponent('\u30a2'))
t.end()
})
test('Unescape Component', { skip: true }, (t) => {
let chr
for (let d = 0; d <= 129; ++d) {
chr = String.fromCharCode(d)
t.equal(fastURI.unescapeComponent(encodeURIComponent(chr)), chr)
}
t.equal(fastURI.unescapeComponent(encodeURIComponent('\u00c0')), '\u00c0')
t.equal(fastURI.unescapeComponent(encodeURIComponent('\u07ff')), '\u07ff')
t.equal(fastURI.unescapeComponent(encodeURIComponent('\u0800')), '\u0800')
t.equal(fastURI.unescapeComponent(encodeURIComponent('\u30a2')), '\u30a2')
t.end()
})
const IRI_OPTION = { iri: true, unicodeSupport: true }
test('IRI Parsing', { skip: true }, (t) => {
const components = fastURI.parse('uri://us\xA0er:pa\uD7FFss@example.com:123/o\uF900ne/t\uFDCFwo.t\uFDF0hree?q1=a1\uF8FF\uE000&q2=a2#bo\uFFEFdy', IRI_OPTION)
t.equal(components.error, undefined, 'all errors')
t.equal(components.scheme, 'uri', 'scheme')
t.equal(components.userinfo, 'us\xA0er:pa\uD7FFss', 'userinfo')
t.equal(components.host, 'example.com', 'host')
t.equal(components.port, 123, 'port')
t.equal(components.path, '/o\uF900ne/t\uFDCFwo.t\uFDF0hree', 'path')
t.equal(components.query, 'q1=a1\uF8FF\uE000&q2=a2', 'query')
t.equal(components.fragment, 'bo\uFFEFdy', 'fragment')
t.end()
})
test('IRI Serialization', { skip: true }, (t) => {
const components = {
scheme: 'uri',
userinfo: 'us\xA0er:pa\uD7FFss',
host: 'example.com',
port: 123,
path: '/o\uF900ne/t\uFDCFwo.t\uFDF0hree',
query: 'q1=a1\uF8FF\uE000&q2=a2',
fragment: 'bo\uFFEFdy\uE001'
}
t.equal(fastURI.serialize(components, IRI_OPTION), 'uri://us\xA0er:pa\uD7FFss@example.com:123/o\uF900ne/t\uFDCFwo.t\uFDF0hree?q1=a1\uF8FF\uE000&q2=a2#bo\uFFEFdy%EE%80%81')
t.end()
})
test('IRI Normalizing', { skip: true }, (t) => {
t.equal(fastURI.normalize('uri://www.example.org/red%09ros\xE9#red', IRI_OPTION), 'uri://www.example.org/red%09ros\xE9#red')
t.end()
})
test('IRI Equals', { skip: true }, (t) => {
// example from RFC 3987
t.equal(fastURI.equal('example://a/b/c/%7Bfoo%7D/ros\xE9', 'eXAMPLE://a/./b/../b/%63/%7bfoo%7d/ros%C3%A9', IRI_OPTION), true)
t.end()
})
test('Convert IRI to URI', { skip: true }, (t) => {
// example from RFC 3987
t.equal(fastURI.serialize(fastURI.parse('uri://www.example.org/red%09ros\xE9#red', IRI_OPTION)), 'uri://www.example.org/red%09ros%C3%A9#red')
// Internationalized Domain Name conversion via punycode example from RFC 3987
t.equal(fastURI.serialize(fastURI.parse('uri://r\xE9sum\xE9.example.org', { iri: true, domainHost: true }), { domainHost: true }), 'uri://xn--rsum-bpad.example.org')
t.end()
})
test('Convert URI to IRI', { skip: true }, (t) => {
// examples from RFC 3987
t.equal(fastURI.serialize(fastURI.parse('uri://www.example.org/D%C3%BCrst'), IRI_OPTION), 'uri://www.example.org/D\xFCrst')
t.equal(fastURI.serialize(fastURI.parse('uri://www.example.org/D%FCrst'), IRI_OPTION), 'uri://www.example.org/D%FCrst')
t.equal(fastURI.serialize(fastURI.parse('uri://xn--99zt52a.example.org/%e2%80%ae'), IRI_OPTION), 'uri://xn--99zt52a.example.org/%E2%80%AE') // or uri://\u7D0D\u8C46.example.org/%E2%80%AE
// Internationalized Domain Name conversion via punycode example from RFC 3987
t.equal(fastURI.serialize(fastURI.parse('uri://xn--rsum-bpad.example.org', { domainHost: true }), { iri: true, domainHost: true }), 'uri://r\xE9sum\xE9.example.org')
t.end()
})
if (fastURI.SCHEMES.http) {
test('HTTP Equals', (t) => {
// test from RFC 2616
t.equal(fastURI.equal('http://abc.com:80/~smith/home.html', 'http://abc.com/~smith/home.html'), true)
t.equal(fastURI.equal('http://ABC.com/%7Esmith/home.html', 'http://abc.com/~smith/home.html'), true)
t.equal(fastURI.equal('http://ABC.com:/%7esmith/home.html', 'http://abc.com/~smith/home.html'), true)
t.equal(fastURI.equal('HTTP://ABC.COM', 'http://abc.com/'), true)
// test from RFC 3986
t.equal(fastURI.equal('http://example.com:/', 'http://example.com:80/'), true)
t.end()
})
}
if (fastURI.SCHEMES.https) {
test('HTTPS Equals', (t) => {
t.equal(fastURI.equal('https://example.com', 'https://example.com:443/'), true)
t.equal(fastURI.equal('https://example.com:/', 'https://example.com:443/'), true)
t.end()
})
}
if (fastURI.SCHEMES.urn) {
test('URN Parsing', (t) => {
// example from RFC 2141
const components = fastURI.parse('urn:foo:a123,456')
t.equal(components.error, undefined, 'errors')
t.equal(components.scheme, 'urn', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, undefined, 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
t.equal(components.nid, 'foo', 'nid')
t.equal(components.nss, 'a123,456', 'nss')
t.end()
})
test('URN Serialization', (t) => {
// example from RFC 2141
const components = {
scheme: 'urn',
nid: 'foo',
nss: 'a123,456'
}
t.equal(fastURI.serialize(components), 'urn:foo:a123,456')
t.end()
})
test('URN Equals', { skip: true }, (t) => {
// test from RFC 2141
t.equal(fastURI.equal('urn:foo:a123,456', 'urn:foo:a123,456'), true)
t.equal(fastURI.equal('urn:foo:a123,456', 'URN:foo:a123,456'), true)
t.equal(fastURI.equal('urn:foo:a123,456', 'urn:FOO:a123,456'), true)
t.equal(fastURI.equal('urn:foo:a123,456', 'urn:foo:A123,456'), false)
t.equal(fastURI.equal('urn:foo:a123%2C456', 'URN:FOO:a123%2c456'), true)
t.end()
})
test('URN Resolving', (t) => {
// example from epoberezkin
t.equal(fastURI.resolve('', 'urn:some:ip:prop'), 'urn:some:ip:prop')
t.equal(fastURI.resolve('#', 'urn:some:ip:prop'), 'urn:some:ip:prop')
t.equal(fastURI.resolve('urn:some:ip:prop', 'urn:some:ip:prop'), 'urn:some:ip:prop')
t.equal(fastURI.resolve('urn:some:other:prop', 'urn:some:ip:prop'), 'urn:some:ip:prop')
t.end()
})
test('UUID Parsing', (t) => {
// example from RFC 4122
let components = fastURI.parse('urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6')
t.equal(components.error, undefined, 'errors')
t.equal(components.scheme, 'urn', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, undefined, 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
t.equal(components.nid, 'uuid', 'nid')
t.equal(components.nss, undefined, 'nss')
t.equal(components.uuid, 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6', 'uuid')
components = fastURI.parse('urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6')
t.notEqual(components.error, undefined, 'errors')
t.end()
})
test('UUID Serialization', (t) => {
// example from RFC 4122
let components = {
scheme: 'urn',
nid: 'uuid',
uuid: 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6'
}
t.equal(fastURI.serialize(components), 'urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6')
components = {
scheme: 'urn',
nid: 'uuid',
uuid: 'notauuid-7dec-11d0-a765-00a0c91e6bf6'
}
t.equal(fastURI.serialize(components), 'urn:uuid:notauuid-7dec-11d0-a765-00a0c91e6bf6')
t.end()
})
test('UUID Equals', (t) => {
t.equal(fastURI.equal('URN:UUID:F81D4FAE-7DEC-11D0-A765-00A0C91E6BF6', 'urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6'), true)
t.end()
})
test('URN NID Override', (t) => {
let components = fastURI.parse('urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6', { nid: 'uuid' })
t.equal(components.error, undefined, 'errors')
t.equal(components.scheme, 'urn', 'scheme')
t.equal(components.path, undefined, 'path')
t.equal(components.nid, 'foo', 'nid')
t.equal(components.nss, undefined, 'nss')
t.equal(components.uuid, 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6', 'uuid')
components = {
scheme: 'urn',
nid: 'foo',
uuid: 'f81d4fae-7dec-11d0-a765-00a0c91e6bf6'
}
t.equal(fastURI.serialize(components, { nid: 'uuid' }), 'urn:foo:f81d4fae-7dec-11d0-a765-00a0c91e6bf6')
t.end()
})
}
if (fastURI.SCHEMES.mailto) {
test('Mailto Parse', (t) => {
let components
// tests from RFC 6068
components = fastURI.parse('mailto:chris@example.com')
t.equal(components.error, undefined, 'error')
t.equal(components.scheme, 'mailto', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, undefined, 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, undefined, 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
t.deepEqual(components.to, ['chris@example.com'], 'to')
t.equal(components.subject, undefined, 'subject')
t.equal(components.body, undefined, 'body')
t.equal(components.headers, undefined, 'headers')
components = fastURI.parse('mailto:infobot@example.com?subject=current-issue')
t.deepEqual(components.to, ['infobot@example.com'], 'to')
t.equal(components.subject, 'current-issue', 'subject')
components = fastURI.parse('mailto:infobot@example.com?body=send%20current-issue')
t.deepEqual(components.to, ['infobot@example.com'], 'to')
t.equal(components.body, 'send current-issue', 'body')
components = fastURI.parse('mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index')
t.deepEqual(components.to, ['infobot@example.com'], 'to')
t.equal(components.body, 'send current-issue\x0D\x0Asend index', 'body')
components = fastURI.parse('mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E')
t.deepEqual(components.to, ['list@example.org'], 'to')
t.deepEqual(components.headers, { 'In-Reply-To': '<3469A91.D10AF4C@example.com>' }, 'headers')
components = fastURI.parse('mailto:majordomo@example.com?body=subscribe%20bamboo-l')
t.deepEqual(components.to, ['majordomo@example.com'], 'to')
t.equal(components.body, 'subscribe bamboo-l', 'body')
components = fastURI.parse('mailto:joe@example.com?cc=bob@example.com&body=hello')
t.deepEqual(components.to, ['joe@example.com'], 'to')
t.equal(components.body, 'hello', 'body')
t.deepEqual(components.headers, { cc: 'bob@example.com' }, 'headers')
components = fastURI.parse('mailto:joe@example.com?cc=bob@example.com?body=hello')
if (fastURI.VALIDATE_SUPPORT) t.ok(components.error, 'invalid header fields')
components = fastURI.parse('mailto:gorby%25kremvax@example.com')
t.deepEqual(components.to, ['gorby%kremvax@example.com'], 'to gorby%kremvax@example.com')
components = fastURI.parse('mailto:unlikely%3Faddress@example.com?blat=foop')
t.deepEqual(components.to, ['unlikely?address@example.com'], 'to unlikely?address@example.com')
t.deepEqual(components.headers, { blat: 'foop' }, 'headers')
components = fastURI.parse('mailto:Mike%26family@example.org')
t.deepEqual(components.to, ['Mike&family@example.org'], 'to Mike&family@example.org')
components = fastURI.parse('mailto:%22not%40me%22@example.org')
t.deepEqual(components.to, ['"not@me"@example.org'], 'to ' + '"not@me"@example.org')
components = fastURI.parse('mailto:%22oh%5C%5Cno%22@example.org')
t.deepEqual(components.to, ['"oh\\\\no"@example.org'], 'to ' + '"oh\\\\no"@example.org')
components = fastURI.parse("mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org")
t.deepEqual(components.to, ['"\\\\\\"it\'s\\ ugly\\\\\\""@example.org'], 'to ' + '"\\\\\\"it\'s\\ ugly\\\\\\""@example.org')
components = fastURI.parse('mailto:user@example.org?subject=caf%C3%A9')
t.deepEqual(components.to, ['user@example.org'], 'to')
t.equal(components.subject, 'caf\xE9', 'subject')
components = fastURI.parse('mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D')
t.deepEqual(components.to, ['user@example.org'], 'to')
t.equal(components.subject, '=?utf-8?Q?caf=C3=A9?=', 'subject') // TODO: Verify this
components = fastURI.parse('mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D')
t.deepEqual(components.to, ['user@example.org'], 'to')
t.equal(components.subject, '=?iso-8859-1?Q?caf=E9?=', 'subject') // TODO: Verify this
components = fastURI.parse('mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9')
t.deepEqual(components.to, ['user@example.org'], 'to')
t.equal(components.subject, 'caf\xE9', 'subject')
t.equal(components.body, 'caf\xE9', 'body')
if (fastURI.IRI_SUPPORT) {
components = fastURI.parse('mailto:user@%E7%B4%8D%E8%B1%86.example.org?subject=Test&body=NATTO')
t.deepEqual(components.to, ['user@xn--99zt52a.example.org'], 'to')
t.equal(components.subject, 'Test', 'subject')
t.equal(components.body, 'NATTO', 'body')
}
t.end()
})
test('Mailto Serialize', (t) => {
// tests from RFC 6068
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['chris@example.com'] }), 'mailto:chris@example.com')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['infobot@example.com'], body: 'current-issue' }), 'mailto:infobot@example.com?body=current-issue')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['infobot@example.com'], body: 'send current-issue' }), 'mailto:infobot@example.com?body=send%20current-issue')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['infobot@example.com'], body: 'send current-issue\x0D\x0Asend index' }), 'mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['list@example.org'], headers: { 'In-Reply-To': '<3469A91.D10AF4C@example.com>' } }), 'mailto:list@example.org?In-Reply-To=%3C3469A91.D10AF4C@example.com%3E')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['majordomo@example.com'], body: 'subscribe bamboo-l' }), 'mailto:majordomo@example.com?body=subscribe%20bamboo-l')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['joe@example.com'], headers: { cc: 'bob@example.com', body: 'hello' } }), 'mailto:joe@example.com?cc=bob@example.com&body=hello')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['gorby%25kremvax@example.com'] }), 'mailto:gorby%25kremvax@example.com')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['unlikely%3Faddress@example.com'], headers: { blat: 'foop' } }), 'mailto:unlikely%3Faddress@example.com?blat=foop')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['Mike&family@example.org'] }), 'mailto:Mike%26family@example.org')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['"not@me"@example.org'] }), 'mailto:%22not%40me%22@example.org')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['"oh\\\\no"@example.org'] }), 'mailto:%22oh%5C%5Cno%22@example.org')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['"\\\\\\"it\'s\\ ugly\\\\\\""@example.org'] }), "mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org")
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['user@example.org'], subject: 'caf\xE9' }), 'mailto:user@example.org?subject=caf%C3%A9')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['user@example.org'], subject: '=?utf-8?Q?caf=C3=A9?=' }), 'mailto:user@example.org?subject=%3D%3Futf-8%3FQ%3Fcaf%3DC3%3DA9%3F%3D')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['user@example.org'], subject: '=?iso-8859-1?Q?caf=E9?=' }), 'mailto:user@example.org?subject=%3D%3Fiso-8859-1%3FQ%3Fcaf%3DE9%3F%3D')
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['user@example.org'], subject: 'caf\xE9', body: 'caf\xE9' }), 'mailto:user@example.org?subject=caf%C3%A9&body=caf%C3%A9')
if (fastURI.IRI_SUPPORT) {
t.equal(fastURI.serialize({ scheme: 'mailto', to: ['us\xE9r@\u7d0d\u8c46.example.org'], subject: 'Test', body: 'NATTO' }), 'mailto:us%C3%A9r@xn--99zt52a.example.org?subject=Test&body=NATTO')
}
t.end()
})
test('Mailto Equals', (t) => {
// tests from RFC 6068
t.equal(fastURI.equal('mailto:addr1@an.example,addr2@an.example', 'mailto:?to=addr1@an.example,addr2@an.example'), true)
t.equal(fastURI.equal('mailto:?to=addr1@an.example,addr2@an.example', 'mailto:addr1@an.example?to=addr2@an.example'), true)
t.end()
})
}
if (fastURI.SCHEMES.ws) {
test('WS Parse', (t) => {
let components
// example from RFC 6455, Sec 4.1
components = fastURI.parse('ws://example.com/chat')
t.equal(components.error, undefined, 'error')
t.equal(components.scheme, 'ws', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, 'example.com', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, undefined, 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
t.equal(components.resourceName, '/chat', 'resourceName')
t.equal(components.secure, false, 'secure')
components = fastURI.parse('ws://example.com/foo?bar=baz')
t.equal(components.error, undefined, 'error')
t.equal(components.scheme, 'ws', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, 'example.com', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, undefined, 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
t.equal(components.resourceName, '/foo?bar=baz', 'resourceName')
t.equal(components.secure, false, 'secure')
components = fastURI.parse('ws://example.com/?bar=baz')
t.equal(components.resourceName, '/?bar=baz', 'resourceName')
t.end()
})
test('WS Serialize', (t) => {
t.equal(fastURI.serialize({ scheme: 'ws' }), 'ws:')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com' }), 'ws://example.com')
t.equal(fastURI.serialize({ scheme: 'ws', resourceName: '/' }), 'ws:')
t.equal(fastURI.serialize({ scheme: 'ws', resourceName: '/foo' }), 'ws:/foo')
t.equal(fastURI.serialize({ scheme: 'ws', resourceName: '/foo?bar' }), 'ws:/foo?bar')
t.equal(fastURI.serialize({ scheme: 'ws', secure: false }), 'ws:')
t.equal(fastURI.serialize({ scheme: 'ws', secure: true }), 'wss:')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo' }), 'ws://example.com/foo')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo?bar' }), 'ws://example.com/foo?bar')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', secure: false }), 'ws://example.com')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', secure: true }), 'wss://example.com')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo?bar', secure: false }), 'ws://example.com/foo?bar')
t.equal(fastURI.serialize({ scheme: 'ws', host: 'example.com', resourceName: '/foo?bar', secure: true }), 'wss://example.com/foo?bar')
t.end()
})
test('WS Equal', (t) => {
t.equal(fastURI.equal('WS://ABC.COM:80/chat#one', 'ws://abc.com/chat'), true)
t.end()
})
test('WS Normalize', (t) => {
t.equal(fastURI.normalize('ws://example.com:80/foo#hash'), 'ws://example.com/foo')
t.end()
})
}
if (fastURI.SCHEMES.wss) {
test('WSS Parse', (t) => {
let components
// example from RFC 6455, Sec 4.1
components = fastURI.parse('wss://example.com/chat')
t.equal(components.error, undefined, 'error')
t.equal(components.scheme, 'wss', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, 'example.com', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, undefined, 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
t.equal(components.resourceName, '/chat', 'resourceName')
t.equal(components.secure, true, 'secure')
components = fastURI.parse('wss://example.com/foo?bar=baz')
t.equal(components.error, undefined, 'error')
t.equal(components.scheme, 'wss', 'scheme')
t.equal(components.userinfo, undefined, 'userinfo')
t.equal(components.host, 'example.com', 'host')
t.equal(components.port, undefined, 'port')
t.equal(components.path, undefined, 'path')
t.equal(components.query, undefined, 'query')
t.equal(components.fragment, undefined, 'fragment')
t.equal(components.resourceName, '/foo?bar=baz', 'resourceName')
t.equal(components.secure, true, 'secure')
components = fastURI.parse('wss://example.com/?bar=baz')
t.equal(components.resourceName, '/?bar=baz', 'resourceName')
t.end()
})
test('WSS Serialize', (t) => {
t.equal(fastURI.serialize({ scheme: 'wss' }), 'wss:')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com' }), 'wss://example.com')
t.equal(fastURI.serialize({ scheme: 'wss', resourceName: '/' }), 'wss:')
t.equal(fastURI.serialize({ scheme: 'wss', resourceName: '/foo' }), 'wss:/foo')
t.equal(fastURI.serialize({ scheme: 'wss', resourceName: '/foo?bar' }), 'wss:/foo?bar')
t.equal(fastURI.serialize({ scheme: 'wss', secure: false }), 'ws:')
t.equal(fastURI.serialize({ scheme: 'wss', secure: true }), 'wss:')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', resourceName: '/foo' }), 'wss://example.com/foo')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', resourceName: '/foo?bar' }), 'wss://example.com/foo?bar')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', secure: false }), 'ws://example.com')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', secure: true }), 'wss://example.com')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', resourceName: '/foo?bar', secure: false }), 'ws://example.com/foo?bar')
t.equal(fastURI.serialize({ scheme: 'wss', host: 'example.com', resourceName: '/foo?bar', secure: true }), 'wss://example.com/foo?bar')
t.end()
})
test('WSS Equal', (t) => {
t.equal(fastURI.equal('WSS://ABC.COM:443/chat#one', 'wss://abc.com/chat'), true)
t.end()
})
test('WSS Normalize', (t) => {
t.equal(fastURI.normalize('wss://example.com:443/foo#hash'), 'wss://example.com/foo')
t.end()
})
}

View File

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

View File

@@ -0,0 +1,62 @@
import { toDate } from "./toDate.mjs";
/**
* The {@link eachYearOfInterval} function options.
*/
/**
* @name eachYearOfInterval
* @category Interval Helpers
* @summary Return the array of yearly timestamps within the specified time interval.
*
* @description
* Return the array of yearly timestamps within the specified time interval.
*
* @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 interval - The interval.
*
* @returns The array with starts of yearly timestamps from the month of the interval start to the month of the interval end
*
* @example
* // Each year between 6 February 2014 and 10 August 2017:
* const result = eachYearOfInterval({
* start: new Date(2014, 1, 6),
* end: new Date(2017, 7, 10)
* })
* //=> [
* // Wed Jan 01 2014 00:00:00,
* // Thu Jan 01 2015 00:00:00,
* // Fri Jan 01 2016 00:00:00,
* // Sun Jan 01 2017 00:00:00
* // ]
*/
export function eachYearOfInterval(interval, options) {
const startDate = toDate(interval.start);
const endDate = toDate(interval.end);
let reversed = +startDate > +endDate;
const endTime = reversed ? +startDate : +endDate;
const currentDate = reversed ? endDate : startDate;
currentDate.setHours(0, 0, 0, 0);
currentDate.setMonth(0, 1);
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+currentDate <= endTime) {
dates.push(toDate(currentDate));
currentDate.setFullYear(currentDate.getFullYear() + step);
}
return reversed ? dates.reverse() : dates;
}
// Fallback for modularized imports:
export default eachYearOfInterval;

View File

@@ -0,0 +1,192 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.mjs";
const eraValues = {
narrow: ["př. n. l.", "n. l."],
abbreviated: ["př. n. l.", "n. l."],
wide: ["před naším letopočtem", "našeho letopočtu"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1. čtvrtletí", "2. čtvrtletí", "3. čtvrtletí", "4. čtvrtletí"],
wide: ["1. čtvrtletí", "2. čtvrtletí", "3. čtvrtletí", "4. čtvrtletí"],
};
const monthValues = {
narrow: ["L", "Ú", "B", "D", "K", "Č", "Č", "S", "Z", "Ř", "L", "P"],
abbreviated: [
"led",
"úno",
"bře",
"dub",
"kvě",
"čvn",
"čvc",
"srp",
"zář",
"říj",
"lis",
"pro",
],
wide: [
"leden",
"únor",
"březen",
"duben",
"květen",
"červen",
"červenec",
"srpen",
"září",
"říjen",
"listopad",
"prosinec",
],
};
const formattingMonthValues = {
narrow: ["L", "Ú", "B", "D", "K", "Č", "Č", "S", "Z", "Ř", "L", "P"],
abbreviated: [
"led",
"úno",
"bře",
"dub",
"kvě",
"čvn",
"čvc",
"srp",
"zář",
"říj",
"lis",
"pro",
],
wide: [
"ledna",
"února",
"března",
"dubna",
"května",
"června",
"července",
"srpna",
"září",
"října",
"listopadu",
"prosince",
],
};
const dayValues = {
narrow: ["ne", "po", "út", "st", "čt", "pá", "so"],
short: ["ne", "po", "út", "st", "čt", "pá", "so"],
abbreviated: ["ned", "pon", "úte", "stř", "čtv", "pát", "sob"],
wide: ["neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota"],
};
const dayPeriodValues = {
narrow: {
am: "dop.",
pm: "odp.",
midnight: "půlnoc",
noon: "poledne",
morning: "ráno",
afternoon: "odpoledne",
evening: "večer",
night: "noc",
},
abbreviated: {
am: "dop.",
pm: "odp.",
midnight: "půlnoc",
noon: "poledne",
morning: "ráno",
afternoon: "odpoledne",
evening: "večer",
night: "noc",
},
wide: {
am: "dopoledne",
pm: "odpoledne",
midnight: "půlnoc",
noon: "poledne",
morning: "ráno",
afternoon: "odpoledne",
evening: "večer",
night: "noc",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "dop.",
pm: "odp.",
midnight: "půlnoc",
noon: "poledne",
morning: "ráno",
afternoon: "odpoledne",
evening: "večer",
night: "noc",
},
abbreviated: {
am: "dop.",
pm: "odp.",
midnight: "půlnoc",
noon: "poledne",
morning: "ráno",
afternoon: "odpoledne",
evening: "večer",
night: "noc",
},
wide: {
am: "dopoledne",
pm: "odpoledne",
midnight: "půlnoc",
noon: "poledne",
morning: "ráno",
afternoon: "odpoledne",
evening: "večer",
night: "noc",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + ".";
};
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",
formattingValues: formattingMonthValues,
defaultFormattingWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};

View File

@@ -0,0 +1,43 @@
import type { WebFetchHeaders } from './webfetchapi';
/**
* Request data included in an event as sent to Sentry.
*/
export interface RequestEventData {
url?: string;
method?: string;
data?: unknown;
query_string?: QueryParams;
cookies?: Record<string, string>;
env?: Record<string, string>;
headers?: {
[key: string]: string;
};
}
export type QueryParams = string | {
[key: string]: string;
} | Array<[string, string]>;
/**
* Request data that is considered safe for `span.data` on `http.client` spans
* and for `http` breadcrumbs
* See https://develop.sentry.dev/sdk/data-handling/#structuring-data
*/
export type SanitizedRequestData = {
url: string;
'http.method': string;
'http.fragment'?: string;
'http.query'?: string;
};
export interface RequestHookInfo {
headers?: WebFetchHeaders;
}
export interface ResponseHookInfo {
/**
* Headers from the response.
*/
headers?: WebFetchHeaders;
/**
* Error that may have occurred during the request.
*/
error?: unknown;
}
//# sourceMappingURL=request.d.ts.map

View File

@@ -0,0 +1,13 @@
import crypto from 'crypto';
function md5(bytes) {
if (Array.isArray(bytes)) {
bytes = Buffer.from(bytes);
} else if (typeof bytes === 'string') {
bytes = Buffer.from(bytes, 'utf8');
}
return crypto.createHash('md5').update(bytes).digest();
}
export default md5;

View File

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

View File

@@ -0,0 +1,36 @@
{
"name": "@xtuc/long",
"version": "4.2.2",
"author": "Daniel Wirtz <dcode@dcode.io>",
"description": "A Long class for representing a 64-bit two's-complement integer value.",
"main": "src/long.js",
"repository": {
"type": "git",
"url": "https://github.com/dcodeIO/long.js.git"
},
"bugs": {
"url": "https://github.com/dcodeIO/long.js/issues"
},
"keywords": [
"math"
],
"dependencies": {},
"devDependencies": {
"webpack": "^3.10.0"
},
"license": "Apache-2.0",
"scripts": {
"build": "webpack",
"test": "node tests"
},
"files": [
"index.js",
"LICENSE",
"README.md",
"src/long.js",
"dist/long.js",
"dist/long.js.map",
"index.d.ts"
],
"types": "index.d.ts"
}

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