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

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions
@@ -0,0 +1,379 @@
@import '../../scss/styles.scss';
@layer payload-default {
a.btn {
display: inline-block;
}
.btn--withPopup {
margin-block: 4px;
.btn {
margin: 0;
}
}
.btn {
--btn-font-weight: normal;
* {
pointer-events: none;
}
// button aesthetic styles
&--style-primary {
--color: var(--theme-elevation-0);
--bg-color: var(--theme-elevation-800);
--box-shadow: none;
--hover-bg: var(--theme-elevation-600);
--hover-color: var(--color);
&.btn--disabled {
--bg-color: var(--theme-elevation-200);
--color: var(--theme-elevation-800);
--hover-bg: var(--bg-color);
--hover-color: var(--color);
}
}
&--style-secondary {
--color: var(--theme-text);
--bg-color: transparent;
--box-shadow: inset 0 0 0 1px var(--theme-elevation-800);
--hover-color: var(--theme-elevation-600);
--hover-box-shadow: inset 0 0 0 1px var(--theme-elevation-400);
&.btn--disabled {
--color: var(--theme-elevation-200);
--box-shadow: inset 0 0 0 1px var(--theme-elevation-200);
--hover-box-shadow: inset 0 0 0 1px var(--theme-elevation-200);
--hover-color: var(--color);
}
}
&--style-pill {
--bg-color: var(--theme-elevation-150);
--color: var(--theme-elevation-800);
--hover-color: var(--theme-elevation-800);
--hover-bg: var(--theme-elevation-100);
&.btn--disabled {
--color: var(--theme-elevation-600);
--hover-bg: var(--bg-color);
--hover-color: var(--color);
}
}
// colors and padding are mixed on this class
&--style-icon-label,
&--style-icon-label.btn--icon-position-left,
&--style-icon-label.btn--icon-position-right {
padding: 0;
font-weight: 600;
--color: var(--theme-text);
--bg-color: transparent;
--hover-color: var(--theme-elevation-600);
&.btn--disabled {
--color: var(--theme-elevation-200);
--hover-color: var(--color);
}
.btn__content {
--btn-icon-content-gap: calc(var(--base) * 0.4);
}
}
&--style-subtle {
--color: var(--theme-text);
--bg-color: var(--theme-elevation-100);
--hover-bg: var(--theme-elevation-150);
--box-shadow: inset 0 0 0 1px var(--theme-elevation-200);
--hover-box-shadow: inset 0 0 0 1px var(--theme-elevation-250);
&.btn--disabled {
--color: var(--theme-elevation-450);
--hover-box-shadow: var(--box-shadow);
--hover-bg: var(--bg-color);
--hover-color: var(--color);
}
}
&--style-tab {
--bg-color: transparent;
--hover-bg: var(--theme-elevation-50);
--color: var(--theme-text);
--btn-font-weight: 500;
&.btn--disabled {
--btn-font-weight: 600;
--hover-box-shadow: var(--box-shadow);
--bg-color: var(--theme-elevation-100);
--hover-bg: var(--bg-color);
--hover-color: var(--color);
}
}
}
.popup--active .btn {
background-color: var(--hover-bg);
}
.btn--withPopup {
.popup-button {
color: var(--color, inherit);
background-color: var(--bg-color);
box-shadow: var(--box-shadow);
border-radius: $style-radius-m;
align-items: center;
html:not([dir='RTL']) & {
border-left: 1px solid var(--theme-bg);
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
html[dir='RTL'] & {
border-right: 1px solid var(--theme-bg);
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
&:hover,
&:focus-visible,
&:focus,
&:active {
background-color: var(--hover-bg);
color: var(--hover-color);
box-shadow: var(--hover-box-shadow);
}
}
}
.btn,
.btn--withPopup .btn {
&:hover,
&:focus-visible,
&:focus,
&:active {
color: var(--hover-color);
box-shadow: var(--hover-box-shadow);
background-color: var(--hover-bg);
}
}
.btn--disabled,
.btn--disabled .btn {
cursor: not-allowed;
}
.btn {
--btn-padding-block-start: 0;
--btn-padding-inline-end: 0;
--btn-padding-block-end: 0;
--btn-padding-inline-start: 0;
--btn-icon-size: calc(var(--base) * 1.2);
--btn-icon-border-color: currentColor;
--btn-icon-padding: 0px; // This will be needed when we make icons go edge to edge instead of having built in padding in the svg code
--btn-icon-content-gap: calc(var(--base) * 0.4);
--margin-block: calc(var(--base) * 1.2);
--btn-line-height: calc(var(--base) * 1.2);
border-radius: var(--style-radius-s);
font-size: var(--base-body-size);
font-family: var(--font-body);
font-weight: var(--btn-font-weight, normal);
margin-block: var(--margin-block);
line-height: var(--btn-line-height);
border: 0;
cursor: pointer;
text-decoration: none;
transition-property: border, color, box-shadow, background;
transition-duration: 100ms;
transition-timing-function: cubic-bezier(0, 0.2, 0.2, 1);
padding: var(--btn-padding-block-start) var(--btn-padding-inline-end)
var(--btn-padding-block-end) var(--btn-padding-inline-start);
color: var(--color, inherit);
background-color: var(--bg-color, transparent);
box-shadow: var(--box-shadow, none);
&__icon {
width: 100%;
height: 100%;
.stroke {
stroke: var(--color, currentColor);
fill: none;
}
.fill {
fill: var(--color, currentColor);
}
}
&__content {
display: flex;
align-items: center;
justify-content: center;
}
&__icon {
width: var(--btn-icon-size);
height: var(--btn-icon-size);
display: flex;
align-items: center;
justify-content: center;
border: 1px solid var(--btn-icon-border-color);
border-radius: 100%;
padding: var(--btn-icon-padding);
color: inherit;
svg {
width: 100%;
height: 100%;
}
&.btn--size-small {
padding: calc(var(--base) * (0.2));
}
}
&--withPopup {
display: flex;
}
&--has-tooltip {
position: relative;
}
&--icon {
.btn__content {
gap: var(--btn-icon-content-gap);
}
}
&--icon-style-without-border,
&--icon-style-none {
--btn-icon-border-color: transparent;
}
&--icon-position-left {
.btn__content {
flex-direction: row-reverse;
}
}
&--size-small {
--btn-icon-size: calc(var(--base) * 0.9);
// --btn-icon-padding: 0px; // This will be needed when we make icons go edge to edge instead of having built in padding in the svg code
--btn-icon-content-gap: calc(var(--base) * 0.2);
--btn-padding-block-start: 0;
--btn-padding-inline-end: calc(var(--base) * 0.4);
--btn-padding-inline-start: calc(var(--base) * 0.4);
--btn-padding-block-end: 0;
&.btn--icon-position-left {
--btn-padding-inline-start: calc(var(--base) * 0.3);
}
&.btn--icon-position-right {
--btn-padding-inline-end: calc(var(--base) * 0.3);
}
&.btn--icon-style-with-border {
// --btn-icon-padding: 0px; // This will be needed when we make icons go edge to edge instead of having built in padding in the svg code
}
}
&--size-xsmall {
--btn-icon-size: calc(var(--base) * 0.8);
// --btn-icon-padding: 0px; // This will be needed when we make icons go edge to edge instead of having built in padding in the svg code
--btn-icon-content-gap: calc(var(--base) * 0.2);
--btn-padding-block-start: 0;
--btn-padding-inline-end: calc(var(--base) * 0.3);
--btn-padding-inline-start: calc(var(--base) * 0.3);
--btn-padding-block-end: 0;
&.btn--icon-position-left {
--btn-padding-inline-start: calc(var(--base) * 0.2);
}
&.btn--icon-position-right {
--btn-padding-inline-end: calc(var(--base) * 0.2);
}
&.btn--icon-style-with-border {
// --btn-icon-padding: 0px; // This will be needed when we make icons go edge to edge instead of having built in padding in the svg code
}
}
&--size-medium {
// --btn-icon-padding: 0px;
--btn-icon-size: calc(var(--base) * 1.2);
--btn-icon-content-gap: calc(var(--base) * 0.2);
--btn-padding-block-start: calc(var(--base) * 0.2);
--btn-padding-inline-end: calc(var(--base) * 0.6);
--btn-padding-block-end: calc(var(--base) * 0.2);
--btn-padding-inline-start: calc(var(--base) * 0.6);
&.btn--icon-position-left {
--btn-padding-inline-start: calc(var(--base) * 0.4);
}
&.btn--icon-position-right {
--btn-padding-inline-end: calc(var(--base) * 0.4);
}
&.btn--icon-style-with-border {
// --btn-icon-padding: 0px; // This will be needed when we make icons go edge to edge instead of having built in padding in the svg code
}
}
&--size-large {
// --btn-icon-padding: 0px;
--btn-icon-size: calc(var(--base) * 1.2);
--btn-icon-content-gap: calc(var(--base) * 0.4);
--btn-padding-block-start: calc(var(--base) * 0.4);
--btn-padding-inline-end: calc(var(--base) * 0.8);
--btn-padding-inline-start: calc(var(--base) * 0.8);
--btn-padding-block-end: calc(var(--base) * 0.4);
&.btn--icon-position-left {
--btn-padding-inline-start: calc(var(--base) * 0.6);
}
&.btn--icon-position-right {
--btn-padding-inline-end: calc(var(--base) * 0.6);
}
&.btn--icon-style-with-border {
// --btn-icon-padding: 0px; // This will be needed when we make icons go edge to edge instead of having built in padding in the svg code
}
}
&--withPopup .btn {
html:not([dir='RTL']) & {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
html[dir='RTL'] & {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
}
&:focus-visible {
outline: var(--accessibility-outline);
outline-offset: var(--accessibility-outline-offset);
}
&.btn--disabled {
cursor: not-allowed;
}
&--style-none {
padding: 0;
}
&--no-margin {
--margin-block: 0;
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"asyncLocalStorageStrategy.js","sources":["../../../src/light/asyncLocalStorageStrategy.ts"],"sourcesContent":["import { AsyncLocalStorage } from 'node:async_hooks';\nimport type { Scope } from '@sentry/core';\nimport { getDefaultCurrentScope, getDefaultIsolationScope, setAsyncContextStrategy } from '@sentry/core';\n\n/**\n * Sets the async context strategy to use AsyncLocalStorage.\n *\n * This is a lightweight alternative to the OpenTelemetry-based strategy.\n * It uses Node's native AsyncLocalStorage directly without any OpenTelemetry dependencies.\n */\nexport function setAsyncLocalStorageAsyncContextStrategy(): void {\n const asyncStorage = new AsyncLocalStorage<{\n scope: Scope;\n isolationScope: Scope;\n }>();\n\n function getScopes(): { scope: Scope; isolationScope: Scope } {\n const scopes = asyncStorage.getStore();\n\n if (scopes) {\n return scopes;\n }\n\n // fallback behavior:\n // if, for whatever reason, we can't find scopes on the context here, we have to fix this somehow\n return {\n scope: getDefaultCurrentScope(),\n isolationScope: getDefaultIsolationScope(),\n };\n }\n\n function withScope<T>(callback: (scope: Scope) => T): T {\n const scope = getScopes().scope.clone();\n const isolationScope = getScopes().isolationScope;\n return asyncStorage.run({ scope, isolationScope }, () => {\n return callback(scope);\n });\n }\n\n function withSetScope<T>(scope: Scope, callback: (scope: Scope) => T): T {\n const isolationScope = getScopes().isolationScope.clone();\n return asyncStorage.run({ scope, isolationScope }, () => {\n return callback(scope);\n });\n }\n\n function withIsolationScope<T>(callback: (isolationScope: Scope) => T): T {\n const scope = getScopes().scope.clone();\n const isolationScope = getScopes().isolationScope.clone();\n return asyncStorage.run({ scope, isolationScope }, () => {\n return callback(isolationScope);\n });\n }\n\n function withSetIsolationScope<T>(isolationScope: Scope, callback: (isolationScope: Scope) => T): T {\n const scope = getScopes().scope.clone();\n return asyncStorage.run({ scope, isolationScope }, () => {\n return callback(isolationScope);\n });\n }\n\n // In contrast to the browser, we can rely on async context isolation here\n function suppressTracing<T>(callback: () => T): T {\n return withScope(scope => {\n scope.setSDKProcessingMetadata({ __SENTRY_SUPPRESS_TRACING__: true });\n return callback();\n });\n }\n\n setAsyncContextStrategy({\n suppressTracing,\n withScope,\n withSetScope,\n withIsolationScope,\n withSetIsolationScope,\n getCurrentScope: () => getScopes().scope,\n getIsolationScope: () => getScopes().isolationScope,\n });\n}\n"],"names":[],"mappings":";;;AAIA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,wCAAwC,GAAS;AACjE,EAAE,MAAM,YAAA,GAAe,IAAI;;AAGzB,EAAI;;AAEN,EAAE,SAAS,SAAS,GAA4C;AAChE,IAAI,MAAM,MAAA,GAAS,YAAY,CAAC,QAAQ,EAAE;;AAE1C,IAAI,IAAI,MAAM,EAAE;AAChB,MAAM,OAAO,MAAM;AACnB,IAAI;;AAEJ;AACA;AACA,IAAI,OAAO;AACX,MAAM,KAAK,EAAE,sBAAsB,EAAE;AACrC,MAAM,cAAc,EAAE,wBAAwB,EAAE;AAChD,KAAK;AACL,EAAE;;AAEF,EAAE,SAAS,SAAS,CAAI,QAAQ,EAA0B;AAC1D,IAAI,MAAM,KAAA,GAAQ,SAAS,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE;AAC3C,IAAI,MAAM,cAAA,GAAiB,SAAS,EAAE,CAAC,cAAc;AACrD,IAAI,OAAO,YAAY,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,cAAA,EAAgB,EAAE,MAAM;AAC7D,MAAM,OAAO,QAAQ,CAAC,KAAK,CAAC;AAC5B,IAAI,CAAC,CAAC;AACN,EAAE;;AAEF,EAAE,SAAS,YAAY,CAAI,KAAK,EAAS,QAAQ,EAA0B;AAC3E,IAAI,MAAM,cAAA,GAAiB,SAAS,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE;AAC7D,IAAI,OAAO,YAAY,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,cAAA,EAAgB,EAAE,MAAM;AAC7D,MAAM,OAAO,QAAQ,CAAC,KAAK,CAAC;AAC5B,IAAI,CAAC,CAAC;AACN,EAAE;;AAEF,EAAE,SAAS,kBAAkB,CAAI,QAAQ,EAAmC;AAC5E,IAAI,MAAM,KAAA,GAAQ,SAAS,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE;AAC3C,IAAI,MAAM,cAAA,GAAiB,SAAS,EAAE,CAAC,cAAc,CAAC,KAAK,EAAE;AAC7D,IAAI,OAAO,YAAY,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,cAAA,EAAgB,EAAE,MAAM;AAC7D,MAAM,OAAO,QAAQ,CAAC,cAAc,CAAC;AACrC,IAAI,CAAC,CAAC;AACN,EAAE;;AAEF,EAAE,SAAS,qBAAqB,CAAI,cAAc,EAAS,QAAQ,EAAmC;AACtG,IAAI,MAAM,KAAA,GAAQ,SAAS,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE;AAC3C,IAAI,OAAO,YAAY,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,cAAA,EAAgB,EAAE,MAAM;AAC7D,MAAM,OAAO,QAAQ,CAAC,cAAc,CAAC;AACrC,IAAI,CAAC,CAAC;AACN,EAAE;;AAEF;AACA,EAAE,SAAS,eAAe,CAAI,QAAQ,EAAc;AACpD,IAAI,OAAO,SAAS,CAAC,KAAA,IAAS;AAC9B,MAAM,KAAK,CAAC,wBAAwB,CAAC,EAAE,2BAA2B,EAAE,IAAA,EAAM,CAAC;AAC3E,MAAM,OAAO,QAAQ,EAAE;AACvB,IAAI,CAAC,CAAC;AACN,EAAE;;AAEF,EAAE,uBAAuB,CAAC;AAC1B,IAAI,eAAe;AACnB,IAAI,SAAS;AACb,IAAI,YAAY;AAChB,IAAI,kBAAkB;AACtB,IAAI,qBAAqB;AACzB,IAAI,eAAe,EAAE,MAAM,SAAS,EAAE,CAAC,KAAK;AAC5C,IAAI,iBAAiB,EAAE,MAAM,SAAS,EAAE,CAAC,cAAc;AACvD,GAAG,CAAC;AACJ;;;;"}
@@ -0,0 +1,15 @@
/**
* @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 ArrowBigDown = createLucideIcon("ArrowBigDown", [
["path", { d: "M15 6v6h4l-7 7-7-7h4V6h6z", key: "1thax2" }]
]);
export { ArrowBigDown as default };
//# sourceMappingURL=arrow-big-down.js.map
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './square-user-round.js';
//# sourceMappingURL=user-square-2.js.map
@@ -0,0 +1 @@
{"version":3,"file":"getLoginOptions.d.ts","sourceRoot":"","sources":["../../src/auth/getLoginOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAEtC,eAAO,MAAM,eAAe,sBACP,IAAI,CAAC,mBAAmB,CAAC,KAC3C;IACD,iBAAiB,EAAE,OAAO,CAAA;IAC1B,oBAAoB,EAAE,OAAO,CAAA;CAM9B,CAAA"}
@@ -0,0 +1,18 @@
@import '../../scss/styles';
@layer payload-default {
.field-error.tooltip {
font-family: var(--font-body);
left: auto;
max-width: 75%;
right: 0;
transform: translateY(calc(var(--caret-size) * -1));
color: var(--theme-error-950);
background-color: var(--theme-error-300);
&::after {
border-top-color: var(--theme-error-300);
border-bottom-color: var(--theme-error-300);
}
}
}
@@ -0,0 +1 @@
{"version":3,"file":"constants.js","sources":["../../src/constants.ts"],"sourcesContent":["export const REACT_RENDER_OP = 'ui.react.render';\n\nexport const REACT_UPDATE_OP = 'ui.react.update';\n\nexport const REACT_MOUNT_OP = 'ui.react.mount';\n"],"names":[],"mappings":";;AAAO,MAAM,eAAA,GAAkB;;AAExB,MAAM,eAAA,GAAkB;;AAExB,MAAM,cAAA,GAAiB;;;;;;"}
@@ -0,0 +1,50 @@
import type { LocalizedOptions, WeekOptions } from "./types.js";
/**
* The {@link formatRelative} function options.
*/
export interface FormatRelativeOptions
extends LocalizedOptions<
"options" | "localize" | "formatLong" | "formatRelative"
>,
WeekOptions {}
/**
* @name formatRelative
* @category Common Helpers
* @summary Represent the date in words relative to the given base date.
*
* @description
* Represent the date in words relative to the given base date.
*
* | Distance to the base date | Result |
* |---------------------------|---------------------------|
* | Previous 6 days | last Sunday at 04:30 AM |
* | Last day | yesterday at 04:30 AM |
* | Same day | today at 04:30 AM |
* | Next day | tomorrow at 04:30 AM |
* | Next 6 days | Sunday at 04:30 AM |
* | Other | 12/31/2017 |
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to format
* @param baseDate - The date to compare with
* @param options - An object with options
*
* @returns The date in words
*
* @throws `date` must not be Invalid Date
* @throws `baseDate` must not be Invalid Date
* @throws `options.locale` must contain `localize` property
* @throws `options.locale` must contain `formatLong` property
* @throws `options.locale` must contain `formatRelative` property
*
* @example
* // Represent the date of 6 days ago in words relative to the given base date. In this example, today is Wednesday
* const result = formatRelative(subDays(new Date(), 6), new Date())
* //=> "last Thursday at 12:45 AM"
*/
export declare function formatRelative<DateType extends Date>(
date: DateType | number | string,
baseDate: DateType | number | string,
options?: FormatRelativeOptions,
): string;
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.duration = void 0;
var parser_1 = require("../syntax/parser");
var time_1 = require("../types/time");
exports.duration = {
name: 'duration',
initialValue: '0s',
prefix: false,
type: 1 /* LIST */,
parse: function (context, tokens) {
return tokens.filter(parser_1.isDimensionToken).map(function (token) { return time_1.time.parse(context, token); });
}
};
//# sourceMappingURL=duration.js.map
@@ -0,0 +1,23 @@
// @ts-ignore TS6133
import { expect, test } from "vitest";
import { type SyncParseReturnType, isAborted, isDirty, isValid } from "../helpers/parseUtil.js";
test("parseUtil isInvalid should use structural typing", () => {
// Test for issue #556: https://github.com/colinhacks/zod/issues/556
const aborted: SyncParseReturnType = { status: "aborted" };
const dirty: SyncParseReturnType = { status: "dirty", value: "whatever" };
const valid: SyncParseReturnType = { status: "valid", value: "whatever" };
expect(isAborted(aborted)).toBe(true);
expect(isAborted(dirty)).toBe(false);
expect(isAborted(valid)).toBe(false);
expect(isDirty(aborted)).toBe(false);
expect(isDirty(dirty)).toBe(true);
expect(isDirty(valid)).toBe(false);
expect(isValid(aborted)).toBe(false);
expect(isValid(dirty)).toBe(false);
expect(isValid(valid)).toBe(true);
});
@@ -0,0 +1 @@
{"version":3,"file":"setupCheck.d.ts","sourceRoot":"","sources":["../../../src/utils/setupCheck.ts"],"names":[],"mappings":"AAAA,KAAK,oBAAoB,GAAG,qBAAqB,GAAG,sBAAsB,GAAG,kBAAkB,GAAG,eAAe,CAAC;AAIlH,gEAAgE;AAChE,wBAAgB,uBAAuB,IAAI,oBAAoB,EAAE,CAEhE;AAED,8CAA8C;AAC9C,wBAAgB,UAAU,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI,CAE9D;AAED,+BAA+B;AAC/B,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
@@ -0,0 +1,40 @@
import type { Event, EventHint, Exception, ParameterizedString, SeverityLevel, StackParser } from '@sentry/core';
/**
* This function creates an exception from a JavaScript Error
*/
export declare function exceptionFromError(stackParser: StackParser, ex: Error): Exception;
/**
* Extracts from errors what we use as the exception `type` in error events.
*
* Usually, this is the `name` property on Error objects but WASM errors need to be treated differently.
*/
export declare function extractType(ex: Error & {
message: {
error?: Error;
};
}): string | undefined;
/**
* There are cases where stacktrace.message is an Event object
* https://github.com/getsentry/sentry-javascript/issues/1949
* In this specific case we try to extract stacktrace.message.error.message
*/
export declare function extractMessage(ex: Error & {
message: {
error?: Error;
};
}): string;
/**
* Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
* @hidden
*/
export declare function eventFromException(stackParser: StackParser, exception: unknown, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
/**
* Builds and Event from a Message
* @hidden
*/
export declare function eventFromMessage(stackParser: StackParser, message: ParameterizedString, level?: SeverityLevel, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
/**
* @hidden
*/
export declare function eventFromUnknownInput(stackParser: StackParser, exception: unknown, syntheticException?: Error, attachStacktrace?: boolean, isUnhandledRejection?: boolean): Event;
//# sourceMappingURL=eventbuilder.d.ts.map
@@ -0,0 +1 @@
Prism.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:function(){var r=["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"];return r=r.map((function(r){return r.split("").join(" *")})).join("|"),RegExp("\\b(?:"+r+")\\b")}(),function:/\b\w(?:[\w ]*\w)?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *(?:[+-] *)?\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?: *>|(?: *<)?(?: *=)?)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/};
@@ -0,0 +1 @@
{"version":3,"file":"node.js","sources":["../../../src/utils/node.ts"],"sourcesContent":["/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the `debug` singleton, or b) put your function elsewhere.\n */\n\nimport { isBrowserBundle } from './env';\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv(): boolean {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod: any, request: string): any {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @param existingModule module to use for requiring\n * @returns possibly required module\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function loadModule<T>(moduleName: string, existingModule: any = module): T | undefined {\n let mod: T | undefined;\n\n try {\n mod = dynamicRequire(existingModule, moduleName);\n } catch {\n // no-empty\n }\n\n if (!mod) {\n try {\n const { cwd } = dynamicRequire(existingModule, 'process');\n mod = dynamicRequire(existingModule, `${cwd()}/node_modules/${moduleName}`) as T;\n } catch {\n // no-empty\n }\n }\n\n return mod;\n}\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;;;AAIA;AACA;AACA;AACA;AACA;AACO,SAAS,SAAS,GAAY;AACrC;AACA;AACA,EAAE;AACF,IAAI,CAAC,eAAe,EAAC;AACrB,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,OAAA,KAAY,WAAA,GAAc,UAAU,CAAC,MAAM;AACrF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,GAAG,EAAO,OAAO,EAAe;AACxD;AACA,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC;AAC7B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,UAAU,CAAI,UAAU,EAAU,cAAc,GAAQ,MAAM,EAAiB;AAC/F,EAAE,IAAI,GAAG;;AAET,EAAE,IAAI;AACN,IAAI,MAAM,cAAc,CAAC,cAAc,EAAE,UAAU,CAAC;AACpD,EAAE,EAAE,MAAM;AACV;AACA,EAAE;;AAEF,EAAE,IAAI,CAAC,GAAG,EAAE;AACZ,IAAI,IAAI;AACR,MAAM,MAAM,EAAE,GAAA,EAAI,GAAI,cAAc,CAAC,cAAc,EAAE,SAAS,CAAC;AAC/D,MAAM,MAAM,cAAc,CAAC,cAAc,EAAE,CAAC,EAAA,GAAA,EAAA,CAAA,cAAA,EAAA,UAAA,CAAA,CAAA,CAAA;AACA,IAAA,CAAA,CAAA,MAAA;AACA;AACA,IAAA;AACA,EAAA;;AAEA,EAAA,OAAA,GAAA;AACA;;;;"}
@@ -0,0 +1,468 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Natsu @xiaoxiaojx
*/
"use strict";
const FileSystemInfo = require("./FileSystemInfo");
const createSchemaValidation = require("./util/create-schema-validation");
const { join } = require("./util/fs");
/** @typedef {import("../declarations/WebpackOptions").DotenvPluginOptions} DotenvPluginOptions */
/** @typedef {import("./Compiler")} Compiler */
/** @typedef {import("./CacheFacade").ItemCacheFacade} ItemCacheFacade */
/** @typedef {import("./util/fs").InputFileSystem} InputFileSystem */
/** @typedef {import("./FileSystemInfo").Snapshot} Snapshot */
/** @typedef {Exclude<DotenvPluginOptions["prefix"], string | undefined>} Prefix */
/** @typedef {Record<string, string>} Env */
/** @type {DotenvPluginOptions} */
const DEFAULT_OPTIONS = {
prefix: "WEBPACK_",
template: [".env", ".env.local", ".env.[mode]", ".env.[mode].local"]
};
// Regex for parsing .env files
// ported from https://github.com/motdotla/dotenv/blob/master/lib/main.js#L49
const LINE =
/^\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?$/gm;
const PLUGIN_NAME = "DotenvPlugin";
const validate = createSchemaValidation(
undefined,
() => {
const { definitions } = require("../schemas/WebpackOptions.json");
return {
definitions,
oneOf: [{ $ref: "#/definitions/DotenvPluginOptions" }]
};
},
{
name: "Dotenv Plugin",
baseDataPath: "options"
}
);
/**
* Parse .env file content
* ported from https://github.com/motdotla/dotenv/blob/master/lib/main.js#L49
* @param {string | Buffer} src the source content to parse
* @returns {Env} parsed environment variables object
*/
function parse(src) {
const obj = /** @type {Env} */ (Object.create(null));
// Convert buffer to string
let lines = src.toString();
// Convert line breaks to same format
lines = lines.replace(/\r\n?/g, "\n");
/** @type {null | RegExpExecArray} */
let match;
while ((match = LINE.exec(lines)) !== null) {
const key = match[1];
// Default undefined or null to empty string
let value = match[2] || "";
// Remove whitespace
value = value.trim();
// Check if double quoted
const maybeQuote = value[0];
// Remove surrounding quotes
value = value.replace(/^(['"`])([\s\S]*)\1$/gm, "$2");
// Expand newlines if double quoted
if (maybeQuote === '"') {
value = value.replace(/\\n/g, "\n");
value = value.replace(/\\r/g, "\r");
}
// Add to object
obj[key] = value;
}
return obj;
}
/**
* Resolve escape sequences
* ported from https://github.com/motdotla/dotenv-expand
* @param {string} value value to resolve
* @returns {string} resolved value
*/
function _resolveEscapeSequences(value) {
return value.replace(/\\\$/g, "$");
}
/**
* Expand environment variable value
* ported from https://github.com/motdotla/dotenv-expand
* @param {string} value value to expand
* @param {Record<string, string | undefined>} processEnv process.env object
* @param {Env} runningParsed running parsed object
* @returns {string} expanded value
*/
function expandValue(value, processEnv, runningParsed) {
const env = { ...runningParsed, ...processEnv }; // process.env wins
const regex = /(?<!\\)\$\{([^{}]+)\}|(?<!\\)\$([a-z_]\w*)/gi;
let result = value;
/** @type {null | RegExpExecArray} */
let match;
/** @type {Set<string>} */
const seen = new Set(); // self-referential checker
while ((match = regex.exec(result)) !== null) {
seen.add(result);
const [template, bracedExpression, unbracedExpression] = match;
const expression = bracedExpression || unbracedExpression;
// match the operators `:+`, `+`, `:-`, and `-`
const opRegex = /(:\+|\+|:-|-)/;
// find first match
const opMatch = expression.match(opRegex);
const splitter = opMatch ? opMatch[0] : null;
const r = expression.split(/** @type {string} */ (splitter));
// const r = splitter ? expression.split(splitter) : [expression];
/** @type {string} */
let defaultValue;
/** @type {undefined | null | string} */
let value;
const key = r.shift();
if ([":+", "+"].includes(splitter || "")) {
defaultValue = env[key || ""] ? r.join(splitter || "") : "";
value = null;
} else {
defaultValue = r.join(splitter || "");
value = env[key || ""];
}
if (value) {
// self-referential check
result = seen.has(value)
? result.replace(template, defaultValue)
: result.replace(template, value);
} else {
result = result.replace(template, defaultValue);
}
// if the result equaled what was in process.env and runningParsed then stop expanding
if (result === runningParsed[key || ""]) {
break;
}
regex.lastIndex = 0; // reset regex search position to re-evaluate after each replacement
}
return result;
}
/**
* Expand environment variables in parsed object
* ported from https://github.com/motdotla/dotenv-expand
* @param {{ parsed: Env, processEnv: Record<string, string | undefined> }} options expand options
* @returns {{ parsed: Env }} expanded options
*/
function expand(options) {
// for use with progressive expansion
const runningParsed = /** @type {Env} */ (Object.create(null));
const processEnv = options.processEnv;
// dotenv.config() ran before this so the assumption is process.env has already been set
for (const key in options.parsed) {
let value = options.parsed[key];
// short-circuit scenario: process.env was already set prior to the file value
value =
Object.prototype.hasOwnProperty.call(processEnv, key) &&
processEnv[key] !== value
? /** @type {string} */ (processEnv[key])
: expandValue(value, processEnv, runningParsed);
const resolvedValue = _resolveEscapeSequences(value);
options.parsed[key] = resolvedValue;
// for use with progressive expansion
runningParsed[key] = resolvedValue;
}
// Part of `dotenv-expand` code, but we don't need it because of we don't modify `process.env`
// for (const processKey in options.parsed) {
// if (processEnv) {
// processEnv[processKey] = options.parsed[processKey];
// }
// }
return options;
}
/**
* Format environment variables as DefinePlugin definitions
* @param {Env} env environment variables
* @returns {Record<string, string>} formatted definitions
*/
const envToDefinitions = (env) => {
const definitions = /** @type {Record<string, string>} */ ({});
for (const [key, value] of Object.entries(env)) {
const defValue = JSON.stringify(value);
definitions[`process.env.${key}`] = defValue;
definitions[`import.meta.env.${key}`] = defValue;
}
return definitions;
};
class DotenvPlugin {
/**
* @param {DotenvPluginOptions=} options options object
*/
constructor(options = {}) {
validate(options);
this.options = { ...DEFAULT_OPTIONS, ...options };
}
/**
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply(compiler) {
const definePlugin = new compiler.webpack.DefinePlugin({});
const prefixes = Array.isArray(this.options.prefix)
? this.options.prefix
: [this.options.prefix || "WEBPACK_"];
/** @type {string | false} */
const dir =
typeof this.options.dir === "string"
? this.options.dir
: typeof this.options.dir === "undefined"
? compiler.context
: this.options.dir;
/** @type {undefined | Snapshot} */
let snapshot;
const cache = compiler.getCache(PLUGIN_NAME);
const identifier = JSON.stringify(this.options.template);
const itemCache = cache.getItemCache(identifier, null);
compiler.hooks.beforeCompile.tapPromise(PLUGIN_NAME, async () => {
const { parsed, snapshot: newSnapshot } = dir
? await this._loadEnv(compiler, itemCache, dir)
: { parsed: {} };
const env = this._getEnv(prefixes, parsed);
definePlugin.definitions = envToDefinitions(env || {});
snapshot = newSnapshot;
});
compiler.hooks.compilation.tap(PLUGIN_NAME, (compilation) => {
if (snapshot) {
compilation.fileDependencies.addAll(snapshot.getFileIterable());
compilation.missingDependencies.addAll(snapshot.getMissingIterable());
}
});
definePlugin.apply(compiler);
}
/**
* Get list of env files to load based on mode and template
* Similar to Vite's getEnvFilesForMode
* @private
* @param {InputFileSystem} inputFileSystem the input file system
* @param {string | false} dir the directory containing .env files
* @param {string | undefined} mode the mode (e.g., 'production', 'development')
* @returns {string[]} array of file paths to load
*/
_getEnvFilesForMode(inputFileSystem, dir, mode) {
if (!dir) {
return [];
}
const { template } = /** @type {DotenvPluginOptions} */ (this.options);
const templates = template || [];
return templates
.map((pattern) => pattern.replace(/\[mode\]/g, mode || "development"))
.map((file) => join(inputFileSystem, dir, file));
}
/**
* Get parsed env variables from `.env` files
* @private
* @param {InputFileSystem} fs input file system
* @param {string} dir dir to load `.env` files
* @param {string} mode mode
* @returns {Promise<{ parsed: Env, fileDependencies: string[], missingDependencies: string[] }>} parsed env variables and dependencies
*/
async _getParsed(fs, dir, mode) {
/** @type {string[]} */
const fileDependencies = [];
/** @type {string[]} */
const missingDependencies = [];
// Get env files to load
const envFiles = this._getEnvFilesForMode(fs, dir, mode);
// Read all files
const contents = await Promise.all(
envFiles.map((filePath) =>
this._loadFile(fs, filePath).then(
(content) => {
fileDependencies.push(filePath);
return content;
},
() => {
// File doesn't exist, add to missingDependencies (this is normal)
missingDependencies.push(filePath);
return "";
}
)
)
);
// Parse all files and merge (later files override earlier ones)
// Similar to Vite's implementation
const parsed = /** @type {Env} */ (Object.create(null));
for (const content of contents) {
if (!content) continue;
const entries = parse(content);
for (const key in entries) {
parsed[key] = entries[key];
}
}
return { parsed, fileDependencies, missingDependencies };
}
/**
* @private
* @param {Compiler} compiler compiler
* @param {ItemCacheFacade} itemCache item cache facade
* @param {string} dir directory to read
* @returns {Promise<{ parsed: Env, snapshot: Snapshot }>} parsed result and snapshot
*/
async _loadEnv(compiler, itemCache, dir) {
const fs = /** @type {InputFileSystem} */ (compiler.inputFileSystem);
const fileSystemInfo = new FileSystemInfo(fs, {
unmanagedPaths: compiler.unmanagedPaths,
managedPaths: compiler.managedPaths,
immutablePaths: compiler.immutablePaths,
hashFunction: compiler.options.output.hashFunction
});
const result = await itemCache.getPromise();
if (result) {
const isSnapshotValid = await new Promise((resolve, reject) => {
fileSystemInfo.checkSnapshotValid(result.snapshot, (error, isValid) => {
if (error) {
reject(error);
return;
}
resolve(isValid);
});
});
if (isSnapshotValid) {
return { parsed: result.parsed, snapshot: result.snapshot };
}
}
const { parsed, fileDependencies, missingDependencies } =
await this._getParsed(
fs,
dir,
/** @type {string} */
(compiler.options.mode)
);
const startTime = Date.now();
const newSnapshot = await new Promise((resolve, reject) => {
fileSystemInfo.createSnapshot(
startTime,
fileDependencies,
null,
missingDependencies,
// `.env` files are build dependencies
compiler.options.snapshot.buildDependencies,
(err, snapshot) => {
if (err) return reject(err);
resolve(snapshot);
}
);
});
await itemCache.storePromise({ parsed, snapshot: newSnapshot });
return { parsed, snapshot: newSnapshot };
}
/**
* Generate env variables
* @private
* @param {Prefix} prefixes expose only environment variables that start with these prefixes
* @param {Env} parsed parsed env variables
* @returns {Env} env variables
*/
_getEnv(prefixes, parsed) {
// Always expand environment variables (like Vite does)
// Make a copy of process.env so that dotenv-expand doesn't modify global process.env
const processEnv = { ...process.env };
expand({ parsed, processEnv });
const env = /** @type {Env} */ (Object.create(null));
// Get all keys from parser and process.env
const keys = [...Object.keys(parsed), ...Object.keys(process.env)];
// Prioritize actual env variables from `process.env`, fallback to parsed
for (const key of keys) {
if (prefixes.some((prefix) => key.startsWith(prefix))) {
env[key] =
Object.prototype.hasOwnProperty.call(process.env, key) &&
process.env[key]
? process.env[key]
: parsed[key];
}
}
return env;
}
/**
* Load a file with proper path resolution
* @private
* @param {InputFileSystem} fs the input file system
* @param {string} file the file to load
* @returns {Promise<string>} the content of the file
*/
_loadFile(fs, file) {
return new Promise((resolve, reject) => {
fs.readFile(file, (err, content) => {
if (err) reject(err);
else resolve(/** @type {Buffer} */ (content).toString() || "");
});
});
}
}
module.exports = DotenvPlugin;
@@ -0,0 +1,5 @@
import type { SanitizedCollectionConfig } from '../collections/config/types.js';
import type { SanitizedConfig } from '../config/types.js';
import type { Field, FlattenedField } from '../fields/config/types.js';
export declare const buildVersionCollectionFields: <T extends boolean = false>(config: SanitizedConfig, collection: SanitizedCollectionConfig, flatten?: T) => true extends T ? FlattenedField[] : Field[];
//# sourceMappingURL=buildCollectionFields.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,4DAA4D;AAC/C,QAAA,eAAe,GAAG,QAAQ,CAAC;AAC3B,QAAA,YAAY,GAAG,2CAA2C,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// this is autogenerated file, see scripts/version-update.js\nexport const PACKAGE_VERSION = '0.28.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-dataloader';\n"]}
@@ -0,0 +1,123 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["М.А", "М"],
abbreviated: ["М.А", "М"],
wide: ["Милоддан Аввалги", "Милодий"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["1-чор.", "2-чор.", "3-чор.", "4-чор."],
wide: ["1-чорак", "2-чорак", "3-чорак", "4-чорак"],
};
const monthValues = {
narrow: ["Я", "Ф", "М", "А", "М", "И", "И", "А", "С", "О", "Н", "Д"],
abbreviated: [
"янв",
"фев",
"мар",
"апр",
"май",
"июн",
"июл",
"авг",
"сен",
"окт",
"ноя",
"дек",
],
wide: [
"январ",
"феврал",
"март",
"апрел",
"май",
"июн",
"июл",
"август",
"сентабр",
"октабр",
"ноябр",
"декабр",
],
};
const dayValues = {
narrow: ["Я", "Д", "С", "Ч", "П", "Ж", "Ш"],
short: ["як", "ду", "се", "чо", "па", "жу", "ша"],
abbreviated: ["якш", "душ", "сеш", "чор", "пай", "жум", "шан"],
wide: [
"якшанба",
"душанба",
"сешанба",
"чоршанба",
"пайшанба",
"жума",
"шанба",
],
};
const dayPeriodValues = {
any: {
am: "П.О.",
pm: "П.К.",
midnight: "ярим тун",
noon: "пешин",
morning: "эрталаб",
afternoon: "пешиндан кейин",
evening: "кечаси",
night: "тун",
},
};
const formattingDayPeriodValues = {
any: {
am: "П.О.",
pm: "П.К.",
midnight: "ярим тун",
noon: "пешин",
morning: "эрталаб",
afternoon: "пешиндан кейин",
evening: "кечаси",
night: "тун",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
return String(dirtyNumber);
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "any",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "any",
}),
};
@@ -0,0 +1,994 @@
'use strict';
// lib/types/utils.ts
var decoder = new TextDecoder();
var toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
var toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce((memo, i) => memo + `0${i.toString(16)}`.slice(-2), "");
var getView = (input, offset) => new DataView(input.buffer, input.byteOffset + offset);
var readInt16LE = (input, offset = 0) => getView(input, offset).getInt16(0, true);
var readUInt16BE = (input, offset = 0) => getView(input, offset).getUint16(0, false);
var readUInt16LE = (input, offset = 0) => getView(input, offset).getUint16(0, true);
var readUInt24LE = (input, offset = 0) => {
const view = getView(input, offset);
return view.getUint16(0, true) + (view.getUint8(2) << 16);
};
var readInt32LE = (input, offset = 0) => getView(input, offset).getInt32(0, true);
var readUInt32BE = (input, offset = 0) => getView(input, offset).getUint32(0, false);
var readUInt32LE = (input, offset = 0) => getView(input, offset).getUint32(0, true);
var readUInt64 = (input, offset, isBigEndian) => getView(input, offset).getBigUint64(0, !isBigEndian);
var methods = {
readUInt16BE,
readUInt16LE,
readUInt32BE,
readUInt32LE
};
function readUInt(input, bits, offset = 0, isBigEndian = false) {
const endian = isBigEndian ? "BE" : "LE";
const methodName = `readUInt${bits}${endian}`;
return methods[methodName](input, offset);
}
function readBox(input, offset) {
if (input.length - offset < 4) return;
const boxSize = readUInt32BE(input, offset);
if (input.length - offset < boxSize) return;
return {
name: toUTF8String(input, 4 + offset, 8 + offset),
offset,
size: boxSize
};
}
function findBox(input, boxName, currentOffset) {
while (currentOffset < input.length) {
const box = readBox(input, currentOffset);
if (!box) break;
if (box.name === boxName) return box;
currentOffset += box.size > 0 ? box.size : 8;
}
}
// lib/types/bmp.ts
var BMP = {
validate: (input) => toUTF8String(input, 0, 2) === "BM",
calculate: (input) => ({
height: Math.abs(readInt32LE(input, 22)),
width: readUInt32LE(input, 18)
})
};
// lib/types/ico.ts
var TYPE_ICON = 1;
var SIZE_HEADER = 2 + 2 + 2;
var SIZE_IMAGE_ENTRY = 1 + 1 + 1 + 1 + 2 + 2 + 4 + 4;
function getSizeFromOffset(input, offset) {
const value = input[offset];
return value === 0 ? 256 : value;
}
function getImageSize(input, imageIndex) {
const offset = SIZE_HEADER + imageIndex * SIZE_IMAGE_ENTRY;
return {
height: getSizeFromOffset(input, offset + 1),
width: getSizeFromOffset(input, offset)
};
}
var ICO = {
validate(input) {
const reserved = readUInt16LE(input, 0);
const imageCount = readUInt16LE(input, 4);
if (reserved !== 0 || imageCount === 0) return false;
const imageType = readUInt16LE(input, 2);
return imageType === TYPE_ICON;
},
calculate(input) {
const nbImages = readUInt16LE(input, 4);
const imageSize2 = getImageSize(input, 0);
if (nbImages === 1) return imageSize2;
const images = [];
for (let imageIndex = 0; imageIndex < nbImages; imageIndex += 1) {
images.push(getImageSize(input, imageIndex));
}
return {
width: imageSize2.width,
height: imageSize2.height,
images
};
}
};
// lib/types/cur.ts
var TYPE_CURSOR = 2;
var CUR = {
validate(input) {
const reserved = readUInt16LE(input, 0);
const imageCount = readUInt16LE(input, 4);
if (reserved !== 0 || imageCount === 0) return false;
const imageType = readUInt16LE(input, 2);
return imageType === TYPE_CURSOR;
},
calculate: (input) => ICO.calculate(input)
};
// lib/types/dds.ts
var DDS = {
validate: (input) => readUInt32LE(input, 0) === 542327876,
calculate: (input) => ({
height: readUInt32LE(input, 12),
width: readUInt32LE(input, 16)
})
};
// lib/types/gif.ts
var gifRegexp = /^GIF8[79]a/;
var GIF = {
validate: (input) => gifRegexp.test(toUTF8String(input, 0, 6)),
calculate: (input) => ({
height: readUInt16LE(input, 8),
width: readUInt16LE(input, 6)
})
};
// lib/types/heif.ts
var brandMap = {
avif: "avif",
mif1: "heif",
msf1: "heif",
// heif-sequence
heic: "heic",
heix: "heic",
hevc: "heic",
// heic-sequence
hevx: "heic"
// heic-sequence
};
var HEIF = {
validate(input) {
const boxType = toUTF8String(input, 4, 8);
if (boxType !== "ftyp") return false;
const ftypBox = findBox(input, "ftyp", 0);
if (!ftypBox) return false;
const brand = toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12);
return brand in brandMap;
},
calculate(input) {
const metaBox = findBox(input, "meta", 0);
const iprpBox = metaBox && findBox(input, "iprp", metaBox.offset + 12);
const ipcoBox = iprpBox && findBox(input, "ipco", iprpBox.offset + 8);
if (!ipcoBox) {
throw new TypeError("Invalid HEIF, no ipco box found");
}
const type = toUTF8String(input, 8, 12);
const images = [];
let currentOffset = ipcoBox.offset + 8;
while (currentOffset < ipcoBox.offset + ipcoBox.size) {
const ispeBox = findBox(input, "ispe", currentOffset);
if (!ispeBox) break;
const rawWidth = readUInt32BE(input, ispeBox.offset + 12);
const rawHeight = readUInt32BE(input, ispeBox.offset + 16);
const clapBox = findBox(input, "clap", currentOffset);
let width = rawWidth;
let height = rawHeight;
if (clapBox && clapBox.offset < ipcoBox.offset + ipcoBox.size) {
const cropRight = readUInt32BE(input, clapBox.offset + 12);
width = rawWidth - cropRight;
}
images.push({ height, width });
currentOffset = ispeBox.offset + ispeBox.size;
}
if (images.length === 0) {
throw new TypeError("Invalid HEIF, no sizes found");
}
return {
width: images[0].width,
height: images[0].height,
type,
...images.length > 1 ? { images } : {}
};
}
};
// lib/types/icns.ts
var SIZE_HEADER2 = 4 + 4;
var FILE_LENGTH_OFFSET = 4;
var ENTRY_LENGTH_OFFSET = 4;
var ICON_TYPE_SIZE = {
ICON: 32,
"ICN#": 32,
// m => 16 x 16
"icm#": 16,
icm4: 16,
icm8: 16,
// s => 16 x 16
"ics#": 16,
ics4: 16,
ics8: 16,
is32: 16,
s8mk: 16,
icp4: 16,
// l => 32 x 32
icl4: 32,
icl8: 32,
il32: 32,
l8mk: 32,
icp5: 32,
ic11: 32,
// h => 48 x 48
ich4: 48,
ich8: 48,
ih32: 48,
h8mk: 48,
// . => 64 x 64
icp6: 64,
ic12: 32,
// t => 128 x 128
it32: 128,
t8mk: 128,
ic07: 128,
// . => 256 x 256
ic08: 256,
ic13: 256,
// . => 512 x 512
ic09: 512,
ic14: 512,
// . => 1024 x 1024
ic10: 1024
};
function readImageHeader(input, imageOffset) {
const imageLengthOffset = imageOffset + ENTRY_LENGTH_OFFSET;
return [
toUTF8String(input, imageOffset, imageLengthOffset),
readUInt32BE(input, imageLengthOffset)
];
}
function getImageSize2(type) {
const size = ICON_TYPE_SIZE[type];
return { width: size, height: size, type };
}
var ICNS = {
validate: (input) => toUTF8String(input, 0, 4) === "icns",
calculate(input) {
const inputLength = input.length;
const fileLength = readUInt32BE(input, FILE_LENGTH_OFFSET);
let imageOffset = SIZE_HEADER2;
const images = [];
while (imageOffset < fileLength && imageOffset < inputLength) {
const imageHeader = readImageHeader(input, imageOffset);
const imageSize2 = getImageSize2(imageHeader[0]);
images.push(imageSize2);
imageOffset += imageHeader[1];
}
if (images.length === 0) {
throw new TypeError("Invalid ICNS, no sizes found");
}
return {
width: images[0].width,
height: images[0].height,
...images.length > 1 ? { images } : {}
};
}
};
// lib/types/j2c.ts
var J2C = {
// TODO: this doesn't seem right. SIZ marker doesn't have to be right after the SOC
validate: (input) => readUInt32BE(input, 0) === 4283432785,
calculate: (input) => ({
height: readUInt32BE(input, 12),
width: readUInt32BE(input, 8)
})
};
// lib/types/jp2.ts
var JP2 = {
validate(input) {
const boxType = toUTF8String(input, 4, 8);
if (boxType !== "jP ") return false;
const ftypBox = findBox(input, "ftyp", 0);
if (!ftypBox) return false;
const brand = toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12);
return brand === "jp2 ";
},
calculate(input) {
const jp2hBox = findBox(input, "jp2h", 0);
const ihdrBox = jp2hBox && findBox(input, "ihdr", jp2hBox.offset + 8);
if (ihdrBox) {
return {
height: readUInt32BE(input, ihdrBox.offset + 8),
width: readUInt32BE(input, ihdrBox.offset + 12)
};
}
throw new TypeError("Unsupported JPEG 2000 format");
}
};
// lib/types/jpg.ts
var EXIF_MARKER = "45786966";
var APP1_DATA_SIZE_BYTES = 2;
var EXIF_HEADER_BYTES = 6;
var TIFF_BYTE_ALIGN_BYTES = 2;
var BIG_ENDIAN_BYTE_ALIGN = "4d4d";
var LITTLE_ENDIAN_BYTE_ALIGN = "4949";
var IDF_ENTRY_BYTES = 12;
var NUM_DIRECTORY_ENTRIES_BYTES = 2;
function isEXIF(input) {
return toHexString(input, 2, 6) === EXIF_MARKER;
}
function extractSize(input, index) {
return {
height: readUInt16BE(input, index),
width: readUInt16BE(input, index + 2)
};
}
function extractOrientation(exifBlock, isBigEndian) {
const idfOffset = 8;
const offset = EXIF_HEADER_BYTES + idfOffset;
const idfDirectoryEntries = readUInt(exifBlock, 16, offset, isBigEndian);
for (let directoryEntryNumber = 0; directoryEntryNumber < idfDirectoryEntries; directoryEntryNumber++) {
const start = offset + NUM_DIRECTORY_ENTRIES_BYTES + directoryEntryNumber * IDF_ENTRY_BYTES;
const end = start + IDF_ENTRY_BYTES;
if (start > exifBlock.length) {
return;
}
const block = exifBlock.slice(start, end);
const tagNumber = readUInt(block, 16, 0, isBigEndian);
if (tagNumber === 274) {
const dataFormat = readUInt(block, 16, 2, isBigEndian);
if (dataFormat !== 3) {
return;
}
const numberOfComponents = readUInt(block, 32, 4, isBigEndian);
if (numberOfComponents !== 1) {
return;
}
return readUInt(block, 16, 8, isBigEndian);
}
}
}
function validateExifBlock(input, index) {
const exifBlock = input.slice(APP1_DATA_SIZE_BYTES, index);
const byteAlign = toHexString(
exifBlock,
EXIF_HEADER_BYTES,
EXIF_HEADER_BYTES + TIFF_BYTE_ALIGN_BYTES
);
const isBigEndian = byteAlign === BIG_ENDIAN_BYTE_ALIGN;
const isLittleEndian = byteAlign === LITTLE_ENDIAN_BYTE_ALIGN;
if (isBigEndian || isLittleEndian) {
return extractOrientation(exifBlock, isBigEndian);
}
}
function validateInput(input, index) {
if (index > input.length) {
throw new TypeError("Corrupt JPG, exceeded buffer limits");
}
}
var JPG = {
validate: (input) => toHexString(input, 0, 2) === "ffd8",
calculate(_input) {
let input = _input.slice(4);
let orientation;
let next;
while (input.length) {
const i = readUInt16BE(input, 0);
validateInput(input, i);
if (input[i] !== 255) {
input = input.slice(1);
continue;
}
if (isEXIF(input)) {
orientation = validateExifBlock(input, i);
}
next = input[i + 1];
if (next === 192 || next === 193 || next === 194) {
const size = extractSize(input, i + 5);
if (!orientation) {
return size;
}
return {
height: size.height,
orientation,
width: size.width
};
}
input = input.slice(i + 2);
}
throw new TypeError("Invalid JPG, no size found");
}
};
// lib/utils/bit-reader.ts
var BitReader = class {
constructor(input, endianness) {
this.input = input;
this.endianness = endianness;
// Skip the first 16 bits (2 bytes) of signature
this.byteOffset = 2;
this.bitOffset = 0;
}
/** Reads a specified number of bits, and move the offset */
getBits(length = 1) {
let result = 0;
let bitsRead = 0;
while (bitsRead < length) {
if (this.byteOffset >= this.input.length) {
throw new Error("Reached end of input");
}
const currentByte = this.input[this.byteOffset];
const bitsLeft = 8 - this.bitOffset;
const bitsToRead = Math.min(length - bitsRead, bitsLeft);
if (this.endianness === "little-endian") {
const mask = (1 << bitsToRead) - 1;
const bits = currentByte >> this.bitOffset & mask;
result |= bits << bitsRead;
} else {
const mask = (1 << bitsToRead) - 1 << 8 - this.bitOffset - bitsToRead;
const bits = (currentByte & mask) >> 8 - this.bitOffset - bitsToRead;
result = result << bitsToRead | bits;
}
bitsRead += bitsToRead;
this.bitOffset += bitsToRead;
if (this.bitOffset === 8) {
this.byteOffset++;
this.bitOffset = 0;
}
}
return result;
}
};
// lib/types/jxl-stream.ts
function calculateImageDimension(reader, isSmallImage) {
if (isSmallImage) {
return 8 * (1 + reader.getBits(5));
}
const sizeClass = reader.getBits(2);
const extraBits = [9, 13, 18, 30][sizeClass];
return 1 + reader.getBits(extraBits);
}
function calculateImageWidth(reader, isSmallImage, widthMode, height) {
if (isSmallImage && widthMode === 0) {
return 8 * (1 + reader.getBits(5));
}
if (widthMode === 0) {
return calculateImageDimension(reader, false);
}
const aspectRatios = [1, 1.2, 4 / 3, 1.5, 16 / 9, 5 / 4, 2];
return Math.floor(height * aspectRatios[widthMode - 1]);
}
var JXLStream = {
validate: (input) => {
return toHexString(input, 0, 2) === "ff0a";
},
calculate(input) {
const reader = new BitReader(input, "little-endian");
const isSmallImage = reader.getBits(1) === 1;
const height = calculateImageDimension(reader, isSmallImage);
const widthMode = reader.getBits(3);
const width = calculateImageWidth(reader, isSmallImage, widthMode, height);
return { width, height };
}
};
// lib/types/jxl.ts
function extractCodestream(input) {
const jxlcBox = findBox(input, "jxlc", 0);
if (jxlcBox) {
return input.slice(jxlcBox.offset + 8, jxlcBox.offset + jxlcBox.size);
}
const partialStreams = extractPartialStreams(input);
if (partialStreams.length > 0) {
return concatenateCodestreams(partialStreams);
}
return void 0;
}
function extractPartialStreams(input) {
const partialStreams = [];
let offset = 0;
while (offset < input.length) {
const jxlpBox = findBox(input, "jxlp", offset);
if (!jxlpBox) break;
partialStreams.push(
input.slice(jxlpBox.offset + 12, jxlpBox.offset + jxlpBox.size)
);
offset = jxlpBox.offset + jxlpBox.size;
}
return partialStreams;
}
function concatenateCodestreams(partialCodestreams) {
const totalLength = partialCodestreams.reduce(
(acc, curr) => acc + curr.length,
0
);
const codestream = new Uint8Array(totalLength);
let position = 0;
for (const partial of partialCodestreams) {
codestream.set(partial, position);
position += partial.length;
}
return codestream;
}
var JXL = {
validate: (input) => {
const boxType = toUTF8String(input, 4, 8);
if (boxType !== "JXL ") return false;
const ftypBox = findBox(input, "ftyp", 0);
if (!ftypBox) return false;
const brand = toUTF8String(input, ftypBox.offset + 8, ftypBox.offset + 12);
return brand === "jxl ";
},
calculate(input) {
const codestream = extractCodestream(input);
if (codestream) return JXLStream.calculate(codestream);
throw new Error("No codestream found in JXL container");
}
};
// lib/types/ktx.ts
var KTX = {
validate: (input) => {
const signature = toUTF8String(input, 1, 7);
return ["KTX 11", "KTX 20"].includes(signature);
},
calculate: (input) => {
const type = input[5] === 49 ? "ktx" : "ktx2";
const offset = type === "ktx" ? 36 : 20;
return {
height: readUInt32LE(input, offset + 4),
width: readUInt32LE(input, offset),
type
};
}
};
// lib/types/png.ts
var pngSignature = "PNG\r\n\n";
var pngImageHeaderChunkName = "IHDR";
var pngFriedChunkName = "CgBI";
var PNG = {
validate(input) {
if (pngSignature === toUTF8String(input, 1, 8)) {
let chunkName = toUTF8String(input, 12, 16);
if (chunkName === pngFriedChunkName) {
chunkName = toUTF8String(input, 28, 32);
}
if (chunkName !== pngImageHeaderChunkName) {
throw new TypeError("Invalid PNG");
}
return true;
}
return false;
},
calculate(input) {
if (toUTF8String(input, 12, 16) === pngFriedChunkName) {
return {
height: readUInt32BE(input, 36),
width: readUInt32BE(input, 32)
};
}
return {
height: readUInt32BE(input, 20),
width: readUInt32BE(input, 16)
};
}
};
// lib/types/pnm.ts
var PNMTypes = {
P1: "pbm/ascii",
P2: "pgm/ascii",
P3: "ppm/ascii",
P4: "pbm",
P5: "pgm",
P6: "ppm",
P7: "pam",
PF: "pfm"
};
var handlers = {
default: (lines) => {
let dimensions = [];
while (lines.length > 0) {
const line = lines.shift();
if (line[0] === "#") {
continue;
}
dimensions = line.split(" ");
break;
}
if (dimensions.length === 2) {
return {
height: Number.parseInt(dimensions[1], 10),
width: Number.parseInt(dimensions[0], 10)
};
}
throw new TypeError("Invalid PNM");
},
pam: (lines) => {
const size = {};
while (lines.length > 0) {
const line = lines.shift();
if (line.length > 16 || line.charCodeAt(0) > 128) {
continue;
}
const [key, value] = line.split(" ");
if (key && value) {
size[key.toLowerCase()] = Number.parseInt(value, 10);
}
if (size.height && size.width) {
break;
}
}
if (size.height && size.width) {
return {
height: size.height,
width: size.width
};
}
throw new TypeError("Invalid PAM");
}
};
var PNM = {
validate: (input) => toUTF8String(input, 0, 2) in PNMTypes,
calculate(input) {
const signature = toUTF8String(input, 0, 2);
const type = PNMTypes[signature];
const lines = toUTF8String(input, 3).split(/[\r\n]+/);
const handler = handlers[type] || handlers.default;
return handler(lines);
}
};
// lib/types/psd.ts
var PSD = {
validate: (input) => toUTF8String(input, 0, 4) === "8BPS",
calculate: (input) => ({
height: readUInt32BE(input, 14),
width: readUInt32BE(input, 18)
})
};
// lib/types/svg.ts
var svgReg = /<svg\s([^>"']|"[^"]*"|'[^']*')*>/;
var extractorRegExps = {
height: /\sheight=(['"])([^%]+?)\1/,
root: svgReg,
viewbox: /\sviewBox=(['"])(.+?)\1/i,
width: /\swidth=(['"])([^%]+?)\1/
};
var INCH_CM = 2.54;
var units = {
in: 96,
cm: 96 / INCH_CM,
em: 16,
ex: 8,
m: 96 / INCH_CM * 100,
mm: 96 / INCH_CM / 10,
pc: 96 / 72 / 12,
pt: 96 / 72,
px: 1
};
var unitsReg = new RegExp(
`^([0-9.]+(?:e\\d+)?)(${Object.keys(units).join("|")})?$`
);
function parseLength(len) {
const m = unitsReg.exec(len);
if (!m) {
return void 0;
}
return Math.round(Number(m[1]) * (units[m[2]] || 1));
}
function parseViewbox(viewbox) {
const bounds = viewbox.split(" ");
return {
height: parseLength(bounds[3]),
width: parseLength(bounds[2])
};
}
function parseAttributes(root) {
const width = root.match(extractorRegExps.width);
const height = root.match(extractorRegExps.height);
const viewbox = root.match(extractorRegExps.viewbox);
return {
height: height && parseLength(height[2]),
viewbox: viewbox && parseViewbox(viewbox[2]),
width: width && parseLength(width[2])
};
}
function calculateByDimensions(attrs) {
return {
height: attrs.height,
width: attrs.width
};
}
function calculateByViewbox(attrs, viewbox) {
const ratio = viewbox.width / viewbox.height;
if (attrs.width) {
return {
height: Math.floor(attrs.width / ratio),
width: attrs.width
};
}
if (attrs.height) {
return {
height: attrs.height,
width: Math.floor(attrs.height * ratio)
};
}
return {
height: viewbox.height,
width: viewbox.width
};
}
var SVG = {
// Scan only the first kilo-byte to speed up the check on larger files
validate: (input) => svgReg.test(toUTF8String(input, 0, 1e3)),
calculate(input) {
const root = toUTF8String(input).match(extractorRegExps.root);
if (root) {
const attrs = parseAttributes(root[0]);
if (attrs.width && attrs.height) {
return calculateByDimensions(attrs);
}
if (attrs.viewbox) {
return calculateByViewbox(attrs, attrs.viewbox);
}
}
throw new TypeError("Invalid SVG");
}
};
// lib/types/tga.ts
var TGA = {
validate(input) {
return readUInt16LE(input, 0) === 0 && readUInt16LE(input, 4) === 0;
},
calculate(input) {
return {
height: readUInt16LE(input, 14),
width: readUInt16LE(input, 12)
};
}
};
// lib/types/tiff.ts
var CONSTANTS = {
TAG: {
WIDTH: 256,
HEIGHT: 257,
COMPRESSION: 259
},
TYPE: {
SHORT: 3,
LONG: 4,
LONG8: 16
},
ENTRY_SIZE: {
STANDARD: 12,
BIG: 20
},
COUNT_SIZE: {
STANDARD: 2,
BIG: 8
}
};
function readIFD(input, { isBigEndian, isBigTiff }) {
const ifdOffset = isBigTiff ? Number(readUInt64(input, 8, isBigEndian)) : readUInt(input, 32, 4, isBigEndian);
const entryCountSize = isBigTiff ? CONSTANTS.COUNT_SIZE.BIG : CONSTANTS.COUNT_SIZE.STANDARD;
return input.slice(ifdOffset + entryCountSize);
}
function readTagValue(input, type, offset, isBigEndian) {
switch (type) {
case CONSTANTS.TYPE.SHORT:
return readUInt(input, 16, offset, isBigEndian);
case CONSTANTS.TYPE.LONG:
return readUInt(input, 32, offset, isBigEndian);
case CONSTANTS.TYPE.LONG8: {
const value = Number(readUInt64(input, offset, isBigEndian));
if (value > Number.MAX_SAFE_INTEGER) {
throw new TypeError("Value too large");
}
return value;
}
default:
return 0;
}
}
function nextTag(input, isBigTiff) {
const entrySize = isBigTiff ? CONSTANTS.ENTRY_SIZE.BIG : CONSTANTS.ENTRY_SIZE.STANDARD;
if (input.length > entrySize) {
return input.slice(entrySize);
}
}
function extractTags(input, { isBigEndian, isBigTiff }) {
const tags = {};
let temp = input;
while (temp?.length) {
const code = readUInt(temp, 16, 0, isBigEndian);
const type = readUInt(temp, 16, 2, isBigEndian);
const length = isBigTiff ? Number(readUInt64(temp, 4, isBigEndian)) : readUInt(temp, 32, 4, isBigEndian);
if (code === 0) break;
if (length === 1 && (type === CONSTANTS.TYPE.SHORT || type === CONSTANTS.TYPE.LONG || isBigTiff && type === CONSTANTS.TYPE.LONG8)) {
const valueOffset = isBigTiff ? 12 : 8;
tags[code] = readTagValue(temp, type, valueOffset, isBigEndian);
}
temp = nextTag(temp, isBigTiff);
}
return tags;
}
function determineFormat(input) {
const signature = toUTF8String(input, 0, 2);
const version = readUInt(input, 16, 2, signature === "MM");
return {
isBigEndian: signature === "MM",
isBigTiff: version === 43
};
}
function validateBigTIFFHeader(input, isBigEndian) {
const byteSize = readUInt(input, 16, 4, isBigEndian);
const reserved = readUInt(input, 16, 6, isBigEndian);
if (byteSize !== 8 || reserved !== 0) {
throw new TypeError("Invalid BigTIFF header");
}
}
var signatures = /* @__PURE__ */ new Set([
"49492a00",
// Little Endian
"4d4d002a",
// Big Endian
"49492b00",
// BigTIFF Little Endian
"4d4d002b"
// BigTIFF Big Endian
]);
var TIFF = {
validate: (input) => {
const signature = toHexString(input, 0, 4);
return signatures.has(signature);
},
calculate(input) {
const format = determineFormat(input);
if (format.isBigTiff) {
validateBigTIFFHeader(input, format.isBigEndian);
}
const ifdBuffer = readIFD(input, format);
const tags = extractTags(ifdBuffer, format);
const info = {
height: tags[CONSTANTS.TAG.HEIGHT],
width: tags[CONSTANTS.TAG.WIDTH],
type: format.isBigTiff ? "bigtiff" : "tiff"
};
if (tags[CONSTANTS.TAG.COMPRESSION]) {
info.compression = tags[CONSTANTS.TAG.COMPRESSION];
}
if (!info.width || !info.height) {
throw new TypeError("Invalid Tiff. Missing tags");
}
return info;
}
};
// lib/types/webp.ts
function calculateExtended(input) {
return {
height: 1 + readUInt24LE(input, 7),
width: 1 + readUInt24LE(input, 4)
};
}
function calculateLossless(input) {
return {
height: 1 + ((input[4] & 15) << 10 | input[3] << 2 | (input[2] & 192) >> 6),
width: 1 + ((input[2] & 63) << 8 | input[1])
};
}
function calculateLossy(input) {
return {
height: readInt16LE(input, 8) & 16383,
width: readInt16LE(input, 6) & 16383
};
}
var WEBP = {
validate(input) {
const riffHeader = "RIFF" === toUTF8String(input, 0, 4);
const webpHeader = "WEBP" === toUTF8String(input, 8, 12);
const vp8Header = "VP8" === toUTF8String(input, 12, 15);
return riffHeader && webpHeader && vp8Header;
},
calculate(_input) {
const chunkHeader = toUTF8String(_input, 12, 16);
const input = _input.slice(20, 30);
if (chunkHeader === "VP8X") {
const extendedHeader = input[0];
const validStart = (extendedHeader & 192) === 0;
const validEnd = (extendedHeader & 1) === 0;
if (validStart && validEnd) {
return calculateExtended(input);
}
throw new TypeError("Invalid WebP");
}
if (chunkHeader === "VP8 " && input[0] !== 47) {
return calculateLossy(input);
}
const signature = toHexString(input, 3, 6);
if (chunkHeader === "VP8L" && signature !== "9d012a") {
return calculateLossless(input);
}
throw new TypeError("Invalid WebP");
}
};
// lib/types/index.ts
var typeHandlers = /* @__PURE__ */ new Map([
["bmp", BMP],
["cur", CUR],
["dds", DDS],
["gif", GIF],
["heif", HEIF],
["icns", ICNS],
["ico", ICO],
["j2c", J2C],
["jp2", JP2],
["jpg", JPG],
["jxl", JXL],
["jxl-stream", JXLStream],
["ktx", KTX],
["png", PNG],
["pnm", PNM],
["psd", PSD],
["svg", SVG],
["tga", TGA],
["tiff", TIFF],
["webp", WEBP]
]);
var types = Array.from(typeHandlers.keys());
// lib/detector.ts
var firstBytes = /* @__PURE__ */ new Map([
[0, "heif"],
[56, "psd"],
[66, "bmp"],
[68, "dds"],
[71, "gif"],
[73, "tiff"],
[77, "tiff"],
[82, "webp"],
[105, "icns"],
[137, "png"],
[255, "jpg"]
]);
function detector(input) {
const byte = input[0];
const type = firstBytes.get(byte);
if (type && typeHandlers.get(type).validate(input)) {
return type;
}
return types.find((type2) => typeHandlers.get(type2).validate(input));
}
// lib/lookup.ts
var globalOptions = {
disabledTypes: []
};
function imageSize(input) {
const type = detector(input);
if (typeof type !== "undefined") {
if (globalOptions.disabledTypes.indexOf(type) > -1) {
throw new TypeError(`disabled file type: ${type}`);
}
const size = typeHandlers.get(type).calculate(input);
if (size !== void 0) {
size.type = size.type ?? type;
if (size.images && size.images.length > 1) {
const largestImage = size.images.reduce((largest, current) => {
return current.width * current.height > largest.width * largest.height ? current : largest;
}, size.images[0]);
size.width = largestImage.width;
size.height = largestImage.height;
}
return size;
}
}
throw new TypeError(`unsupported file type: ${type}`);
}
var disableTypes = (types2) => {
globalOptions.disabledTypes = types2;
};
exports.disableTypes = disableTypes;
exports.imageSize = imageSize;
@@ -0,0 +1,187 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.assumptionsNames = void 0;
exports.checkNoUnwrappedItemOptionPairs = checkNoUnwrappedItemOptionPairs;
exports.validate = validate;
var _removed = require("./removed.js");
var _optionAssertions = require("./option-assertions.js");
var _configError = require("../../errors/config-error.js");
const ROOT_VALIDATORS = {
cwd: _optionAssertions.assertString,
root: _optionAssertions.assertString,
rootMode: _optionAssertions.assertRootMode,
configFile: _optionAssertions.assertConfigFileSearch,
caller: _optionAssertions.assertCallerMetadata,
filename: _optionAssertions.assertString,
filenameRelative: _optionAssertions.assertString,
code: _optionAssertions.assertBoolean,
ast: _optionAssertions.assertBoolean,
cloneInputAst: _optionAssertions.assertBoolean,
envName: _optionAssertions.assertString
};
const BABELRC_VALIDATORS = {
babelrc: _optionAssertions.assertBoolean,
babelrcRoots: _optionAssertions.assertBabelrcSearch
};
const NONPRESET_VALIDATORS = {
extends: _optionAssertions.assertString,
ignore: _optionAssertions.assertIgnoreList,
only: _optionAssertions.assertIgnoreList,
targets: _optionAssertions.assertTargets,
browserslistConfigFile: _optionAssertions.assertConfigFileSearch,
browserslistEnv: _optionAssertions.assertString
};
const COMMON_VALIDATORS = {
inputSourceMap: _optionAssertions.assertInputSourceMap,
presets: _optionAssertions.assertPluginList,
plugins: _optionAssertions.assertPluginList,
passPerPreset: _optionAssertions.assertBoolean,
assumptions: _optionAssertions.assertAssumptions,
env: assertEnvSet,
overrides: assertOverridesList,
test: _optionAssertions.assertConfigApplicableTest,
include: _optionAssertions.assertConfigApplicableTest,
exclude: _optionAssertions.assertConfigApplicableTest,
retainLines: _optionAssertions.assertBoolean,
comments: _optionAssertions.assertBoolean,
shouldPrintComment: _optionAssertions.assertFunction,
compact: _optionAssertions.assertCompact,
minified: _optionAssertions.assertBoolean,
auxiliaryCommentBefore: _optionAssertions.assertString,
auxiliaryCommentAfter: _optionAssertions.assertString,
sourceType: _optionAssertions.assertSourceType,
wrapPluginVisitorMethod: _optionAssertions.assertFunction,
highlightCode: _optionAssertions.assertBoolean,
sourceMaps: _optionAssertions.assertSourceMaps,
sourceMap: _optionAssertions.assertSourceMaps,
sourceFileName: _optionAssertions.assertString,
sourceRoot: _optionAssertions.assertString,
parserOpts: _optionAssertions.assertObject,
generatorOpts: _optionAssertions.assertObject
};
Object.assign(COMMON_VALIDATORS, {
getModuleId: _optionAssertions.assertFunction,
moduleRoot: _optionAssertions.assertString,
moduleIds: _optionAssertions.assertBoolean,
moduleId: _optionAssertions.assertString
});
const knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "noUninitializedPrivateFieldAccess", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"];
const assumptionsNames = exports.assumptionsNames = new Set(knownAssumptions);
function getSource(loc) {
return loc.type === "root" ? loc.source : getSource(loc.parent);
}
function validate(type, opts, filename) {
try {
return validateNested({
type: "root",
source: type
}, opts);
} catch (error) {
const configError = new _configError.default(error.message, filename);
if (error.code) configError.code = error.code;
throw configError;
}
}
function validateNested(loc, opts) {
const type = getSource(loc);
assertNoDuplicateSourcemap(opts);
Object.keys(opts).forEach(key => {
const optLoc = {
type: "option",
name: key,
parent: loc
};
if (type === "preset" && NONPRESET_VALIDATORS[key]) {
throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in preset options`);
}
if (type !== "arguments" && ROOT_VALIDATORS[key]) {
throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options`);
}
if (type !== "arguments" && type !== "configfile" && BABELRC_VALIDATORS[key]) {
if (type === "babelrcfile" || type === "extendsfile") {
throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is not allowed in .babelrc or "extends"ed files, only in root programmatic options, ` + `or babel.config.js/config file options`);
}
throw new Error(`${(0, _optionAssertions.msg)(optLoc)} is only allowed in root programmatic options, or babel.config.js/config file options`);
}
const validator = COMMON_VALIDATORS[key] || NONPRESET_VALIDATORS[key] || BABELRC_VALIDATORS[key] || ROOT_VALIDATORS[key] || throwUnknownError;
validator(optLoc, opts[key]);
});
return opts;
}
function throwUnknownError(loc) {
const key = loc.name;
if (_removed.default[key]) {
const {
message,
version = 5
} = _removed.default[key];
throw new Error(`Using removed Babel ${version} option: ${(0, _optionAssertions.msg)(loc)} - ${message}`);
} else {
const unknownOptErr = new Error(`Unknown option: ${(0, _optionAssertions.msg)(loc)}. Check out https://babeljs.io/docs/en/babel-core/#options for more information about options.`);
unknownOptErr.code = "BABEL_UNKNOWN_OPTION";
throw unknownOptErr;
}
}
function assertNoDuplicateSourcemap(opts) {
if (hasOwnProperty.call(opts, "sourceMap") && hasOwnProperty.call(opts, "sourceMaps")) {
throw new Error(".sourceMap is an alias for .sourceMaps, cannot use both");
}
}
function assertEnvSet(loc, value) {
if (loc.parent.type === "env") {
throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside of another .env block`);
}
const parent = loc.parent;
const obj = (0, _optionAssertions.assertObject)(loc, value);
if (obj) {
for (const envName of Object.keys(obj)) {
const env = (0, _optionAssertions.assertObject)((0, _optionAssertions.access)(loc, envName), obj[envName]);
if (!env) continue;
const envLoc = {
type: "env",
name: envName,
parent
};
validateNested(envLoc, env);
}
}
return obj;
}
function assertOverridesList(loc, value) {
if (loc.parent.type === "env") {
throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .env block`);
}
if (loc.parent.type === "overrides") {
throw new Error(`${(0, _optionAssertions.msg)(loc)} is not allowed inside an .overrides block`);
}
const parent = loc.parent;
const arr = (0, _optionAssertions.assertArray)(loc, value);
if (arr) {
for (const [index, item] of arr.entries()) {
const objLoc = (0, _optionAssertions.access)(loc, index);
const env = (0, _optionAssertions.assertObject)(objLoc, item);
if (!env) throw new Error(`${(0, _optionAssertions.msg)(objLoc)} must be an object`);
const overridesLoc = {
type: "overrides",
index,
parent
};
validateNested(overridesLoc, env);
}
}
return arr;
}
function checkNoUnwrappedItemOptionPairs(items, index, type, e) {
if (index === 0) return;
const lastItem = items[index - 1];
const thisItem = items[index];
if (lastItem.file && lastItem.options === undefined && typeof thisItem.value === "object") {
e.message += `\n- Maybe you meant to use\n` + `"${type}s": [\n ["${lastItem.file.request}", ${JSON.stringify(thisItem.value, undefined, 2)}]\n]\n` + `To be a valid ${type}, its name and options should be wrapped in a pair of brackets`;
}
}
0 && 0;
//# sourceMappingURL=options.js.map
@@ -0,0 +1,6 @@
{
"name": "react-transition-group/Transition",
"private": true,
"main": "../cjs/Transition.js",
"module": "../esm/Transition.js"
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/sql-js/driver.ts"],"sourcesContent":["import type { Database } from 'sql.js';\nimport { DefaultLogger } from '~/logger.ts';\nimport {\n\tcreateTableRelationsHelpers,\n\textractTablesRelationalConfig,\n\ttype RelationalSchemaConfig,\n\ttype TablesRelationalConfig,\n} from '~/relations.ts';\nimport { BaseSQLiteDatabase } from '~/sqlite-core/db.ts';\nimport { SQLiteSyncDialect } from '~/sqlite-core/dialect.ts';\nimport type { DrizzleConfig } from '~/utils.ts';\nimport { SQLJsSession } from './session.ts';\n\nexport type SQLJsDatabase<\n\tTSchema extends Record<string, unknown> = Record<string, never>,\n> = BaseSQLiteDatabase<'sync', void, TSchema>;\n\nexport function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(\n\tclient: Database,\n\tconfig: DrizzleConfig<TSchema> = {},\n): SQLJsDatabase<TSchema> {\n\tconst dialect = new SQLiteSyncDialect({ casing: config.casing });\n\tlet logger;\n\tif (config.logger === true) {\n\t\tlogger = new DefaultLogger();\n\t} else if (config.logger !== false) {\n\t\tlogger = config.logger;\n\t}\n\n\tlet schema: RelationalSchemaConfig<TablesRelationalConfig> | undefined;\n\tif (config.schema) {\n\t\tconst tablesConfig = extractTablesRelationalConfig(\n\t\t\tconfig.schema,\n\t\t\tcreateTableRelationsHelpers,\n\t\t);\n\t\tschema = {\n\t\t\tfullSchema: config.schema,\n\t\t\tschema: tablesConfig.tables,\n\t\t\ttableNamesMap: tablesConfig.tableNamesMap,\n\t\t};\n\t}\n\n\tconst session = new SQLJsSession(client, dialect, schema, { logger });\n\treturn new BaseSQLiteDatabase('sync', dialect, session, schema) as SQLJsDatabase<TSchema>;\n}\n"],"mappings":"AACA,SAAS,qBAAqB;AAC9B;AAAA,EACC;AAAA,EACA;AAAA,OAGM;AACP,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAElC,SAAS,oBAAoB;AAMtB,SAAS,QACf,QACA,SAAiC,CAAC,GACT;AACzB,QAAM,UAAU,IAAI,kBAAkB,EAAE,QAAQ,OAAO,OAAO,CAAC;AAC/D,MAAI;AACJ,MAAI,OAAO,WAAW,MAAM;AAC3B,aAAS,IAAI,cAAc;AAAA,EAC5B,WAAW,OAAO,WAAW,OAAO;AACnC,aAAS,OAAO;AAAA,EACjB;AAEA,MAAI;AACJ,MAAI,OAAO,QAAQ;AAClB,UAAM,eAAe;AAAA,MACpB,OAAO;AAAA,MACP;AAAA,IACD;AACA,aAAS;AAAA,MACR,YAAY,OAAO;AAAA,MACnB,QAAQ,aAAa;AAAA,MACrB,eAAe,aAAa;AAAA,IAC7B;AAAA,EACD;AAEA,QAAM,UAAU,IAAI,aAAa,QAAQ,SAAS,QAAQ,EAAE,OAAO,CAAC;AACpE,SAAO,IAAI,mBAAmB,QAAQ,SAAS,SAAS,MAAM;AAC/D;","names":[]}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","PlusIcon","_jsx","className","height","viewBox","width","xmlns","d","strokeLinecap"],"sources":["../../../src/icons/Plus/index.tsx"],"sourcesContent":["import React from 'react'\n\nimport './index.scss'\n\nexport const PlusIcon: React.FC = () => (\n <svg\n className=\"icon icon--plus\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n width=\"20\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n className=\"stroke\"\n d=\"M5.33333 9.99998H14.6667M9.99999 5.33331V14.6666\"\n strokeLinecap=\"square\"\n />\n </svg>\n)\n"],"mappings":";AAAA,OAAOA,KAAA,MAAW;AAElB,OAAO;AAEP,OAAO,MAAMC,QAAA,GAAqBA,CAAA,kBAChCC,IAAA,CAAC;EACCC,SAAA,EAAU;EACVC,MAAA,EAAO;EACPC,OAAA,EAAQ;EACRC,KAAA,EAAM;EACNC,KAAA,EAAM;YAEN,aAAAL,IAAA,CAAC;IACCC,SAAA,EAAU;IACVK,CAAA,EAAE;IACFC,aAAA,EAAc","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"gantt-chart.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -0,0 +1,69 @@
(function (Prism) {
var interpolation = /\\\((?:[^()]|\([^()]*\))*\)/.source;
var string = RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g, function () { return interpolation; }));
var stringInterpolation = {
'interpolation': {
pattern: RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + interpolation),
lookbehind: true,
inside: {
'content': {
pattern: /^(\\\()[\s\S]+(?=\)$)/,
lookbehind: true,
inside: null // see below
},
'punctuation': /^\\\(|\)$/
}
}
};
var jq = Prism.languages.jq = {
'comment': /#.*/,
'property': {
pattern: RegExp(string.source + /(?=\s*:(?!:))/.source),
lookbehind: true,
greedy: true,
inside: stringInterpolation
},
'string': {
pattern: string,
lookbehind: true,
greedy: true,
inside: stringInterpolation
},
'function': {
pattern: /(\bdef\s+)[a-z_]\w+/i,
lookbehind: true
},
'variable': /\B\$\w+/,
'property-literal': {
pattern: /\b[a-z_]\w*(?=\s*:(?!:))/i,
alias: 'property'
},
'keyword': /\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,
'boolean': /\b(?:false|true)\b/,
'number': /(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,
'operator': [
{
pattern: /\|=?/,
alias: 'pipe'
},
/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/
],
'c-style-function': {
pattern: /\b[a-z_]\w*(?=\s*\()/i,
alias: 'function'
},
'punctuation': /::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,
'dot': {
pattern: /\./,
alias: 'important'
}
};
stringInterpolation.interpolation.inside.content.inside = jq;
}(Prism));
@@ -0,0 +1,3 @@
import type { Plugin } from "ajv";
declare const dynamicDefaults: Plugin<undefined>;
export default dynamicDefaults;
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/GroupByBuilder/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAS,yBAAyB,EAAE,MAAM,SAAS,CAAA;AAE5E,OAAO,cAAc,CAAA;AAErB,OAAO,KAAkB,MAAM,OAAO,CAAA;AAStC,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,CAAC,cAAc,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAA;IAC1D,MAAM,EAAE,WAAW,EAAE,CAAA;CACtB,CAAA;AAyBD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiH1C,CAAA"}
@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.js");
const dateFormats = {
full: "EEEE, do MMMM, y",
long: "do, MMMM, y",
medium: "d, MMM, y",
short: "dd/MM/yyyy",
};
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
const dateTimeFormats = {
full: "{{date}} {{time}}'-ზე'",
long: "{{date}} {{time}}'-ზე'",
medium: "{{date}}, {{time}}",
short: "{{date}}, {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Volume2 = createLucideIcon("Volume2", [
[
"path",
{
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
key: "uqj9uw"
}
],
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
]);
export { Volume2 as default };
//# sourceMappingURL=volume-2.js.map
@@ -0,0 +1,11 @@
import type { Payload } from '../../../../types/index.js';
export type LocalizeStatusArgs = {
collectionSlug?: string;
db: any;
globalSlug?: string;
payload: Payload;
req?: any;
sql: any;
};
export declare function up(args: LocalizeStatusArgs): Promise<void>;
//# sourceMappingURL=up.d.ts.map
@@ -0,0 +1,5 @@
type RequiredProperty<Type, Keys extends keyof Type> = Type & {
[P in Keys]-?: Type[P];
};
export type { RequiredProperty as R };
@@ -0,0 +1,7 @@
import { IPropertyIdentValueDescriptor } from '../IPropertyDescriptor';
export declare const enum VISIBILITY {
VISIBLE = 0,
HIDDEN = 1,
COLLAPSE = 2
}
export declare const visibility: IPropertyIdentValueDescriptor<VISIBILITY>;
@@ -0,0 +1 @@
{"version":3,"file":"reactrouterv6.js","sources":["../../src/reactrouterv6.tsx"],"sourcesContent":["import type { browserTracingIntegration } from '@sentry/browser';\nimport type { Integration } from '@sentry/core';\nimport type { ReactRouterOptions } from './reactrouter-compat-utils';\nimport {\n createReactRouterV6CompatibleTracingIntegration,\n createV6CompatibleWithSentryReactRouterRouting,\n createV6CompatibleWrapCreateBrowserRouter,\n createV6CompatibleWrapCreateMemoryRouter,\n createV6CompatibleWrapUseRoutes,\n} from './reactrouter-compat-utils';\nimport type { CreateRouterFunction, Router, RouterState, UseRoutes } from './types';\n\n/**\n * A browser tracing integration that uses React Router v6 to instrument navigations.\n * Expects `useEffect`, `useLocation`, `useNavigationType`, `createRoutesFromChildren` and `matchRoutes` to be passed as options.\n */\nexport function reactRouterV6BrowserTracingIntegration(\n options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions,\n): Integration {\n return createReactRouterV6CompatibleTracingIntegration(options, '6');\n}\n\n/**\n * A wrapper function that adds Sentry routing instrumentation to a React Router v6 useRoutes hook.\n * This is used to automatically capture route changes as transactions when using the useRoutes hook.\n */\nexport function wrapUseRoutesV6(origUseRoutes: UseRoutes): UseRoutes {\n return createV6CompatibleWrapUseRoutes(origUseRoutes, '6');\n}\n\n/**\n * A wrapper function that adds Sentry routing instrumentation to a React Router v6 createBrowserRouter function.\n * This is used to automatically capture route changes as transactions when using the createBrowserRouter API.\n */\nexport function wrapCreateBrowserRouterV6<\n TState extends RouterState = RouterState,\n TRouter extends Router<TState> = Router<TState>,\n>(createRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter> {\n return createV6CompatibleWrapCreateBrowserRouter(createRouterFunction, '6');\n}\n\n/**\n * A wrapper function that adds Sentry routing instrumentation to a React Router v6 createMemoryRouter function.\n * This is used to automatically capture route changes as transactions when using the createMemoryRouter API.\n * The difference between createBrowserRouter and createMemoryRouter is that with createMemoryRouter,\n * optional `initialEntries` are also taken into account.\n */\nexport function wrapCreateMemoryRouterV6<\n TState extends RouterState = RouterState,\n TRouter extends Router<TState> = Router<TState>,\n>(createMemoryRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter> {\n return createV6CompatibleWrapCreateMemoryRouter(createMemoryRouterFunction, '6');\n}\n\n/**\n * A higher-order component that adds Sentry routing instrumentation to a React Router v6 Route component.\n * This is used to automatically capture route changes as transactions.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function withSentryReactRouterV6Routing<P extends Record<string, any>, R extends React.FC<P>>(routes: R): R {\n return createV6CompatibleWithSentryReactRouterRouting<P, R>(routes, '6');\n}\n"],"names":["createReactRouterV6CompatibleTracingIntegration","createV6CompatibleWrapUseRoutes","createV6CompatibleWrapCreateBrowserRouter","createV6CompatibleWrapCreateMemoryRouter","createV6CompatibleWithSentryReactRouterRouting"],"mappings":";;;;;;AAYA;AACA;AACA;AACA;AACO,SAAS,sCAAsC;AACtD,EAAE,OAAO;AACT,EAAe;AACf,EAAE,OAAOA,+DAA+C,CAAC,OAAO,EAAE,GAAG,CAAC;AACtE;;AAEA;AACA;AACA;AACA;AACO,SAAS,eAAe,CAAC,aAAa,EAAwB;AACrE,EAAE,OAAOC,+CAA+B,CAAC,aAAa,EAAE,GAAG,CAAC;AAC5D;;AAEA;AACA;AACA;AACA;AACO,SAAS;;AAGhB,CAAE,oBAAoB,EAAgF;AACtG,EAAE,OAAOC,yDAAyC,CAAC,oBAAoB,EAAE,GAAG,CAAC;AAC7E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS;;AAGhB,CAAE,0BAA0B,EAAgF;AAC5G,EAAE,OAAOC,wDAAwC,CAAC,0BAA0B,EAAE,GAAG,CAAC;AAClF;;AAEA;AACA;AACA;AACA;AACA;AACO,SAAS,8BAA8B,CAAuD,MAAM,EAAQ;AACnH,EAAE,OAAOC,8DAA8C,CAAO,MAAM,EAAE,GAAG,CAAC;AAC1E;;;;;;;;"}
@@ -0,0 +1,9 @@
import {format as prettify} from 'prettier'
import {Options} from './'
export async function format(code: string, options: Options): Promise<string> {
if (!options.format) {
return code
}
return prettify(code, {parser: 'typescript', ...options.style})
}
@@ -0,0 +1,14 @@
import type { Match } from "../../../locale/types.js";
import { Parser } from "../Parser.js";
import type { ParseFlags, ParseResult } from "../types.js";
export declare class SecondParser extends Parser<number> {
priority: number;
parse(dateString: string, token: string, match: Match): ParseResult<number>;
validate<DateType extends Date>(_date: DateType, value: number): boolean;
set<DateType extends Date>(
date: DateType,
_flags: ParseFlags,
value: number,
): DateType;
incompatibleTokens: string[];
}
@@ -0,0 +1 @@
{"version":3,"file":"AnyValue.js","sourceRoot":"","sources":["../../../src/types/AnyValue.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\nexport type AnyValueScalar = string | number | boolean;\n\nexport type AnyValueArray = Array<AnyValue>;\n\n/**\n * AnyValueMap is a map from string to AnyValue (attribute value or a nested map)\n */\nexport interface AnyValueMap {\n [attributeKey: string]: AnyValue;\n}\n\n/**\n * AnyValue can be one of the following:\n * - a scalar value\n * - a byte array\n * - array of any value\n * - map from string to any value\n * - empty value\n */\nexport type AnyValue =\n | AnyValueScalar\n | Uint8Array\n | AnyValueArray\n | AnyValueMap\n | null\n | undefined;\n"]}
@@ -0,0 +1,28 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link isThisYear} function options.
*/
export interface IsThisYearOptions extends ContextOptions<Date> {}
/**
* @name isThisYear
* @category Year Helpers
* @summary Is the given date in the same year as the current date?
* @pure false
*
* @description
* Is the given date in the same year as the current date?
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is in this year
*
* @example
* // If today is 25 September 2014, is 2 July 2014 in this year?
* const result = isThisYear(new Date(2014, 6, 2))
* //=> true
*/
export declare function isThisYear(
date: DateArg<Date> & {},
options?: IsThisYearOptions | undefined,
): boolean;
@@ -0,0 +1 @@
{"version":3,"file":"hash.cjs","names":[],"sources":["../../../../src/rest/commands/utils/hash.ts"],"sourcesContent":["import type { RestCommand } from '../../types.js';\n\n/**\n * Generate a hash for a given string.\n * @param string String to hash.\n * @returns Hashed string.\n */\nexport const generateHash =\n\t<Schema>(string: string): RestCommand<string, Schema> =>\n\t() => ({\n\t\tmethod: 'POST',\n\t\tpath: `/utils/hash/generate`,\n\t\tbody: JSON.stringify({ string }),\n\t});\n\n/**\n * Verify a string with a hash.\n * @param string Source string.\n * @param hash Hash you want to verify against.\n * @returns Boolean.\n */\nexport const verifyHash =\n\t<Schema>(string: string, hash: string): RestCommand<boolean, Schema> =>\n\t() => ({\n\t\tmethod: 'POST',\n\t\tpath: `/utils/hash/verify`,\n\t\tbody: JSON.stringify({ string, hash }),\n\t});\n"],"mappings":"AAOA,MAAa,EACH,QACF,CACN,OAAQ,OACR,KAAM,uBACN,KAAM,KAAK,UAAU,CAAE,SAAQ,CAAC,CAChC,EAQW,GACH,EAAgB,SAClB,CACN,OAAQ,OACR,KAAM,qBACN,KAAM,KAAK,UAAU,CAAE,SAAQ,OAAM,CAAC,CACtC"}
@@ -0,0 +1,93 @@
import { Decimal } from "decimal.js";
/**
* https://tc39.es/ecma262/#sec-tostring
*/
export declare function ToString(o: unknown): string;
/**
* https://tc39.es/ecma262/#sec-tonumber
* @param val
*/
export declare function ToNumber(arg: any): Decimal;
/**
* https://tc39.es/ecma262/#sec-timeclip
* @param time
*/
export declare function TimeClip(time: Decimal): Decimal;
/**
* https://tc39.es/ecma262/#sec-toobject
* @param arg
*/
export declare function ToObject<T>(arg: T): T extends null ? never : T extends undefined ? never : T;
/**
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-samevalue
* @param x
* @param y
*/
export declare function SameValue(x: any, y: any): boolean;
/**
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-arraycreate
* @param len
*/
export declare function ArrayCreate<T = any>(len: number): T[];
/**
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-hasownproperty
* @param o
* @param prop
*/
export declare function HasOwnProperty(o: object, prop: string): boolean;
/**
* https://www.ecma-international.org/ecma-262/11.0/index.html#sec-type
* @param x
*/
export declare function Type(x: any): "Null" | "Undefined" | "Object" | "Number" | "Boolean" | "String" | "Symbol" | "BigInt" | undefined;
/**
* https://tc39.es/ecma262/#eqn-Day
* @param t
*/
export declare function Day(t: number): number;
/**
* https://tc39.es/ecma262/#sec-week-day
* @param t
*/
export declare function WeekDay(t: number): number;
/**
* https://tc39.es/ecma262/#sec-year-number
* @param y
*/
export declare function DayFromYear(y: number): number;
/**
* https://tc39.es/ecma262/#sec-year-number
* @param y
*/
export declare function TimeFromYear(y: number): number;
/**
* https://tc39.es/ecma262/#sec-year-number
* @param t
*/
export declare function YearFromTime(t: number): number;
export declare function DaysInYear(y: number): 365 | 366;
export declare function DayWithinYear(t: number): number;
export declare function InLeapYear(t: number): 0 | 1;
/**
* https://tc39.es/ecma262/#sec-month-number
* @param t
*/
export declare function MonthFromTime(t: number): 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
export declare function DateFromTime(t: number): number;
export declare function HourFromTime(t: number): number;
export declare function MinFromTime(t: number): number;
export declare function SecFromTime(t: number): number;
/**
* The abstract operation OrdinaryHasInstance implements
* the default algorithm for determining if an object O
* inherits from the instance object inheritance path
* provided by constructor C.
* @param C class
* @param O object
* @param internalSlots internalSlots
*/
export declare function OrdinaryHasInstance(C: object, O: any, internalSlots?: {
boundTargetFunction: any;
}): boolean;
export declare function msFromTime(t: number): number;
export declare function ToPrimitive<T extends "string" | "number" = "string" | "number">(input: any, preferredType: T): string | number | boolean | undefined | null;
@@ -0,0 +1,83 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import * as React from 'react';
import { useDelay } from './useDelay.js';
export const useDelayedRender = t0 => {
const $ = _c(13);
const {
delayBeforeShow,
inTimeout,
minShowTime,
outTimeout,
show
} = t0;
const totalMountTime = inTimeout + minShowTime + outTimeout;
const [hasDelayed, triggerDelay] = useDelay(delayBeforeShow);
const [isMounted, setIsMounted] = React.useState(false);
const [isUnmounting, setIsUnmounting] = React.useState(false);
const onMountTimestampRef = React.useRef(0);
const unmountTimeoutRef = React.useRef(undefined);
let t1;
if ($[0] !== outTimeout) {
t1 = () => {
setIsUnmounting(true);
unmountTimeoutRef.current = setTimeout(() => {
setIsMounted(false);
setIsUnmounting(false);
}, outTimeout);
};
$[0] = outTimeout;
$[1] = t1;
} else {
t1 = $[1];
}
const unmount = t1;
let t2;
let t3;
if ($[2] !== hasDelayed || $[3] !== isMounted || $[4] !== show || $[5] !== totalMountTime || $[6] !== unmount) {
t2 = () => {
const shouldMount = hasDelayed && !isMounted && show;
const shouldUnmount = isMounted && !show;
if (shouldMount) {
onMountTimestampRef.current = Date.now();
setIsMounted(true);
} else {
if (shouldUnmount) {
const totalTimeMounted = Date.now() - onMountTimestampRef.current;
const remainingTime = totalMountTime - totalTimeMounted;
clearTimeout(unmountTimeoutRef.current);
unmountTimeoutRef.current = setTimeout(unmount, Math.max(0, remainingTime));
}
}
};
t3 = [isMounted, show, unmount, totalMountTime, hasDelayed];
$[2] = hasDelayed;
$[3] = isMounted;
$[4] = show;
$[5] = totalMountTime;
$[6] = unmount;
$[7] = t2;
$[8] = t3;
} else {
t2 = $[7];
t3 = $[8];
}
React.useEffect(t2, t3);
let t4;
if ($[9] !== isMounted || $[10] !== isUnmounting || $[11] !== triggerDelay) {
t4 = {
isMounted,
isUnmounting,
triggerDelayedRender: triggerDelay
};
$[9] = isMounted;
$[10] = isUnmounting;
$[11] = triggerDelay;
$[12] = t4;
} else {
t4 = $[12];
}
return t4;
};
//# sourceMappingURL=useDelayedRender.js.map
@@ -0,0 +1 @@
{"version":3,"file":"file-music.js","sources":["../../../src/icons/file-music.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FileMusic\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxNCIgY3k9IjE2IiByPSIyIiAvPgogIDxjaXJjbGUgY3g9IjYiIGN5PSIxOCIgcj0iMiIgLz4KICA8cGF0aCBkPSJNNCAxMi40VjRhMiAyIDAgMCAxIDItMmg4LjVMMjAgNy41VjIwYTIgMiAwIDAgMS0yIDJoLTcuNSIgLz4KICA8cGF0aCBkPSJNOCAxOHYtNy43TDE2IDl2NyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/file-music\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 FileMusic = createLucideIcon('FileMusic', [\n ['circle', { cx: '14', cy: '16', r: '2', key: '1bzzi3' }],\n ['circle', { cx: '6', cy: '18', r: '2', key: '1fncim' }],\n ['path', { d: 'M4 12.4V4a2 2 0 0 1 2-2h8.5L20 7.5V20a2 2 0 0 1-2 2h-7.5', key: 'skc018' }],\n ['path', { d: 'M8 18v-7.7L16 9v7', key: '1oie6o' }],\n]);\n\nexport default FileMusic;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,iBAAiB,WAAa,CAAA,CAAA,CAAA;AAAA,CAC9C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,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,CAAqB,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;AACpD,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"touchpad-off.js","sources":["../../../src/icons/touchpad-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name TouchpadOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCA0YTIgMiAwIDAgMC0yIDJ2MTJhMiAyIDAgMCAwIDIgMmgxNiIgLz4KICA8cGF0aCBkPSJNMiAxNGgxMiIgLz4KICA8cGF0aCBkPSJNMjIgMTRoLTIiIC8+CiAgPHBhdGggZD0iTTEyIDIwdi02IiAvPgogIDxwYXRoIGQ9Im0yIDIgMjAgMjAiIC8+CiAgPHBhdGggZD0iTTIyIDE2VjZhMiAyIDAgMCAwLTItMkgxMCIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/touchpad-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst TouchpadOff = createLucideIcon('TouchpadOff', [\n ['path', { d: 'M4 4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16', key: 'lnt0bk' }],\n ['path', { d: 'M2 14h12', key: 'd8icqz' }],\n ['path', { d: 'M22 14h-2', key: 'jrx26d' }],\n ['path', { d: 'M12 20v-6', key: '1rm09r' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n ['path', { d: 'M22 16V6a2 2 0 0 0-2-2H10', key: '11y8e4' }],\n]);\n\nexport default TouchpadOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CACvE,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { differenceInBusinessDays as fn } from "../differenceInBusinessDays.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const differenceInBusinessDays = convertToFP(fn, 2);
// Fallback for modularized imports:
export default differenceInBusinessDays;
@@ -0,0 +1,30 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { RESERVED_IDENTIFIER, SAFE_IDENTIFIER } = require("./propertyName");
/**
* @param {ArrayLike<string>} properties properties
* @param {number} start start index
* @returns {string} chain of property accesses
*/
const propertyAccess = (properties, start = 0) => {
let str = "";
for (let i = start; i < properties.length; i++) {
const p = properties[i];
if (`${Number(p)}` === p) {
str += `[${p}]`;
} else if (SAFE_IDENTIFIER.test(p) && !RESERVED_IDENTIFIER.has(p)) {
str += `.${p}`;
} else {
str += `[${JSON.stringify(p)}]`;
}
}
return str;
};
module.exports = propertyAccess;
@@ -0,0 +1,63 @@
"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 real_exports = {};
__export(real_exports, {
PgReal: () => PgReal,
PgRealBuilder: () => PgRealBuilder,
real: () => real
});
module.exports = __toCommonJS(real_exports);
var import_entity = require("../../entity.cjs");
var import_common = require("./common.cjs");
class PgRealBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgRealBuilder";
constructor(name, length) {
super(name, "number", "PgReal");
this.config.length = length;
}
/** @internal */
build(table) {
return new PgReal(table, this.config);
}
}
class PgReal extends import_common.PgColumn {
static [import_entity.entityKind] = "PgReal";
constructor(table, config) {
super(table, config);
}
getSQLType() {
return "real";
}
mapFromDriverValue = (value) => {
if (typeof value === "string") {
return Number.parseFloat(value);
}
return value;
};
}
function real(name) {
return new PgRealBuilder(name ?? "");
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgReal,
PgRealBuilder,
real
});
//# sourceMappingURL=real.cjs.map
@@ -0,0 +1,4 @@
/**
* The middleware, available as `next-intl/middleware`.
*/
export { default } from './middleware.js';
@@ -0,0 +1,6 @@
/**
* https://tc39.es/ecma402/#sec-bestavailablelocale
* @param availableLocales
* @param locale
*/
export declare function BestAvailableLocale(availableLocales: readonly string[], locale: string): string | undefined;
@@ -0,0 +1,10 @@
"use strict";
exports.parseJSON = void 0;
var _index = require("../parseJSON.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const parseJSON = (exports.parseJSON = (0, _index2.convertToFP)(
_index.parseJSON,
1,
));
@@ -0,0 +1,7 @@
"use strict";
exports.getWeek = void 0;
var _index = require("../getWeek.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const getWeek = (exports.getWeek = (0, _index2.convertToFP)(_index.getWeek, 1));
@@ -0,0 +1,38 @@
import { toDate } from "./toDate.js";
/**
* The {@link startOfMonth} function options.
*/
/**
* @name startOfMonth
* @category Month Helpers
* @summary Return the start of a month for the given date.
*
* @description
* Return the start of a month 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 start of a month
*
* @example
* // The start of a month for 2 September 2014 11:55:00:
* const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))
* //=> Mon Sep 01 2014 00:00:00
*/
export function startOfMonth(date, options) {
const _date = toDate(date, options?.in);
_date.setDate(1);
_date.setHours(0, 0, 0, 0);
return _date;
}
// Fallback for modularized imports:
export default startOfMonth;
@@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 David Clark
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.
@@ -0,0 +1,6 @@
import type { BlocksFieldClient, DefaultCellComponentProps } from 'payload';
import React from 'react';
export interface BlocksCellProps extends DefaultCellComponentProps<BlocksFieldClient> {
}
export declare const BlocksCell: React.FC<BlocksCellProps>;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const unevaluatedProperties_1 = require("./unevaluatedProperties");
const unevaluatedItems_1 = require("./unevaluatedItems");
const unevaluated = [unevaluatedProperties_1.default, unevaluatedItems_1.default];
exports.default = unevaluated;
//# sourceMappingURL=index.js.map
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Keyboard = createLucideIcon("Keyboard", [
["path", { d: "M10 8h.01", key: "1r9ogq" }],
["path", { d: "M12 12h.01", key: "1mp3jc" }],
["path", { d: "M14 8h.01", key: "1primd" }],
["path", { d: "M16 12h.01", key: "1l6xoz" }],
["path", { d: "M18 8h.01", key: "emo2bl" }],
["path", { d: "M6 8h.01", key: "x9i8wu" }],
["path", { d: "M7 16h10", key: "wp8him" }],
["path", { d: "M8 12h.01", key: "czm47f" }],
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }]
]);
export { Keyboard as default };
//# sourceMappingURL=keyboard.js.map
@@ -0,0 +1,288 @@
/*!
Copyright 2013 Lovell Fuller and others.
SPDX-License-Identifier: Apache-2.0
*/
#include <cmath>
#include <cstdio>
#include <string>
#include <napi.h>
#include <vips/vips8>
#include <vips/vector.h>
#include "./common.h"
#include "./operations.h"
#include "./utilities.h"
/*
Get and set cache limits
*/
Napi::Value cache(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
// Set memory limit
if (info[size_t(0)].IsNumber()) {
vips_cache_set_max_mem(info[size_t(0)].As<Napi::Number>().Int32Value() * 1048576);
}
// Set file limit
if (info[size_t(1)].IsNumber()) {
vips_cache_set_max_files(info[size_t(1)].As<Napi::Number>().Int32Value());
}
// Set items limit
if (info[size_t(2)].IsNumber()) {
vips_cache_set_max(info[size_t(2)].As<Napi::Number>().Int32Value());
}
// Get memory stats
Napi::Object memory = Napi::Object::New(env);
memory.Set("current", round(vips_tracked_get_mem() / 1048576));
memory.Set("high", round(vips_tracked_get_mem_highwater() / 1048576));
memory.Set("max", round(vips_cache_get_max_mem() / 1048576));
// Get file stats
Napi::Object files = Napi::Object::New(env);
files.Set("current", vips_tracked_get_files());
files.Set("max", vips_cache_get_max_files());
// Get item stats
Napi::Object items = Napi::Object::New(env);
items.Set("current", vips_cache_get_size());
items.Set("max", vips_cache_get_max());
Napi::Object cache = Napi::Object::New(env);
cache.Set("memory", memory);
cache.Set("files", files);
cache.Set("items", items);
return cache;
}
/*
Get and set size of thread pool
*/
Napi::Value concurrency(const Napi::CallbackInfo& info) {
// Set concurrency
if (info[size_t(0)].IsNumber()) {
vips_concurrency_set(info[size_t(0)].As<Napi::Number>().Int32Value());
}
// Get concurrency
return Napi::Number::New(info.Env(), vips_concurrency_get());
}
/*
Get internal counters (queued tasks, processing tasks)
*/
Napi::Value counters(const Napi::CallbackInfo& info) {
Napi::Object counters = Napi::Object::New(info.Env());
counters.Set("queue", static_cast<int>(sharp::counterQueue));
counters.Set("process", static_cast<int>(sharp::counterProcess));
return counters;
}
/*
Get and set use of SIMD vector unit instructions
*/
Napi::Value simd(const Napi::CallbackInfo& info) {
// Set state
if (info[size_t(0)].IsBoolean()) {
vips_vector_set_enabled(info[size_t(0)].As<Napi::Boolean>().Value());
}
// Get state
return Napi::Boolean::New(info.Env(), vips_vector_isenabled());
}
/*
Get libvips version
*/
Napi::Value libvipsVersion(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::Object version = Napi::Object::New(env);
char semver[9];
std::snprintf(semver, sizeof(semver), "%d.%d.%d", vips_version(0), vips_version(1), vips_version(2));
version.Set("semver", Napi::String::New(env, semver));
#ifdef SHARP_USE_GLOBAL_LIBVIPS
version.Set("isGlobal", Napi::Boolean::New(env, true));
#else
version.Set("isGlobal", Napi::Boolean::New(env, false));
#endif
#ifdef __EMSCRIPTEN__
version.Set("isWasm", Napi::Boolean::New(env, true));
#else
version.Set("isWasm", Napi::Boolean::New(env, false));
#endif
return version;
}
/*
Get available input/output file/buffer/stream formats
*/
Napi::Value format(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
Napi::Object format = Napi::Object::New(env);
for (std::string const f : {
"jpeg", "png", "webp", "tiff", "magick", "openslide", "dz",
"ppm", "fits", "gif", "svg", "heif", "pdf", "vips", "jp2k", "jxl", "rad", "dcraw"
}) {
// Input
const VipsObjectClass *oc = vips_class_find("VipsOperation", (f + "load").c_str());
Napi::Boolean hasInputFile = Napi::Boolean::New(env, oc);
Napi::Boolean hasInputBuffer =
Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "load_buffer").c_str()));
Napi::Object input = Napi::Object::New(env);
input.Set("file", hasInputFile);
input.Set("buffer", hasInputBuffer);
input.Set("stream", hasInputBuffer);
if (hasInputFile) {
const VipsForeignClass *fc = VIPS_FOREIGN_CLASS(oc);
if (fc->suffs) {
Napi::Array fileSuffix = Napi::Array::New(env);
const char **suffix = fc->suffs;
for (int i = 0; *suffix; i++, suffix++) {
fileSuffix.Set(i, Napi::String::New(env, *suffix));
}
input.Set("fileSuffix", fileSuffix);
}
}
// Output
Napi::Boolean hasOutputFile =
Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "save").c_str()));
Napi::Boolean hasOutputBuffer =
Napi::Boolean::New(env, vips_type_find("VipsOperation", (f + "save_buffer").c_str()));
Napi::Object output = Napi::Object::New(env);
output.Set("file", hasOutputFile);
output.Set("buffer", hasOutputBuffer);
output.Set("stream", hasOutputBuffer);
// Other attributes
Napi::Object container = Napi::Object::New(env);
container.Set("id", f);
container.Set("input", input);
container.Set("output", output);
// Add to set of formats
format.Set(f, container);
}
// Raw, uncompressed data
Napi::Boolean supported = Napi::Boolean::New(env, true);
Napi::Boolean unsupported = Napi::Boolean::New(env, false);
Napi::Object rawInput = Napi::Object::New(env);
rawInput.Set("file", unsupported);
rawInput.Set("buffer", supported);
rawInput.Set("stream", supported);
Napi::Object rawOutput = Napi::Object::New(env);
rawOutput.Set("file", unsupported);
rawOutput.Set("buffer", supported);
rawOutput.Set("stream", supported);
Napi::Object raw = Napi::Object::New(env);
raw.Set("id", "raw");
raw.Set("input", rawInput);
raw.Set("output", rawOutput);
format.Set("raw", raw);
return format;
}
/*
(Un)block libvips operations at runtime.
*/
void block(const Napi::CallbackInfo& info) {
Napi::Array ops = info[size_t(0)].As<Napi::Array>();
bool const state = info[size_t(1)].As<Napi::Boolean>().Value();
for (unsigned int i = 0; i < ops.Length(); i++) {
vips_operation_block_set(ops.Get(i).As<Napi::String>().Utf8Value().c_str(), state);
}
}
/*
Synchronous, internal-only method used by some of the functional tests.
Calculates the maximum colour distance using the DE2000 algorithm
between two images of the same dimensions and number of channels.
*/
Napi::Value _maxColourDistance(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
// Open input files
VImage image1;
sharp::ImageType imageType1 = sharp::DetermineImageType(info[size_t(0)].As<Napi::String>().Utf8Value().data());
if (imageType1 != sharp::ImageType::UNKNOWN) {
try {
image1 = VImage::new_from_file(info[size_t(0)].As<Napi::String>().Utf8Value().c_str());
} catch (...) {
throw Napi::Error::New(env, "Input file 1 has corrupt header");
}
} else {
throw Napi::Error::New(env, "Input file 1 is of an unsupported image format");
}
VImage image2;
sharp::ImageType imageType2 = sharp::DetermineImageType(info[size_t(1)].As<Napi::String>().Utf8Value().data());
if (imageType2 != sharp::ImageType::UNKNOWN) {
try {
image2 = VImage::new_from_file(info[size_t(1)].As<Napi::String>().Utf8Value().c_str());
} catch (...) {
throw Napi::Error::New(env, "Input file 2 has corrupt header");
}
} else {
throw Napi::Error::New(env, "Input file 2 is of an unsupported image format");
}
// Ensure same number of channels
if (image1.bands() != image2.bands()) {
throw Napi::Error::New(env, "mismatchedBands");
}
// Ensure same dimensions
if (image1.width() != image2.width() || image1.height() != image2.height()) {
throw Napi::Error::New(env, "mismatchedDimensions");
}
double maxColourDistance;
try {
// Premultiply and remove alpha
if (image1.has_alpha()) {
image1 = image1.premultiply().extract_band(1, VImage::option()->set("n", image1.bands() - 1));
}
if (image2.has_alpha()) {
image2 = image2.premultiply().extract_band(1, VImage::option()->set("n", image2.bands() - 1));
}
// Calculate colour distance
maxColourDistance = image1.dE00(image2).max();
} catch (vips::VError const &err) {
throw Napi::Error::New(env, err.what());
}
// Clean up libvips' per-request data and threads
vips_error_clear();
vips_thread_shutdown();
return Napi::Number::New(env, maxColourDistance);
}
#if defined(__GNUC__)
// mallctl will be resolved by the runtime linker when jemalloc is being used
extern "C" {
int mallctl(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) __attribute__((weak));
}
Napi::Value _isUsingJemalloc(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
return Napi::Boolean::New(env, mallctl != nullptr);
}
#else
Napi::Value _isUsingJemalloc(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
return Napi::Boolean::New(env, false);
}
#endif
#if defined(__GNUC__) && defined(__x86_64__)
// Are SSE 4.2 intrinsics available at runtime?
Napi::Value _isUsingX64V2(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
unsigned int eax, ebx, ecx, edx;
__asm__ __volatile__("cpuid"
: "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx)
: "a"(1));
return Napi::Boolean::New(env, (ecx & 1U << 20) != 0);
}
#else
Napi::Value _isUsingX64V2(const Napi::CallbackInfo& info) {
Napi::Env env = info.Env();
return Napi::Boolean::New(env, false);
}
#endif
@@ -0,0 +1,41 @@
"use strict";
exports.formatLong = void 0;
var _index = require("../../_lib/buildFormatLongFn.cjs");
const dateFormats = {
full: "EEEE, d. MMMM yyyy.",
long: "d. MMMM yyyy.",
medium: "d. MMM yy.",
short: "dd. MM. yy.",
};
const timeFormats = {
full: "HH:mm:ss (zzzz)",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} 'u' {{time}}",
long: "{{date}} 'u' {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
const formatLong = (exports.formatLong = {
date: (0, _index.buildFormatLongFn)({
formats: dateFormats,
defaultWidth: "full",
}),
time: (0, _index.buildFormatLongFn)({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: (0, _index.buildFormatLongFn)({
formats: dateTimeFormats,
defaultWidth: "full",
}),
});
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const MessageCircleReply = createLucideIcon("MessageCircleReply", [
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }],
["path", { d: "m10 15-3-3 3-3", key: "1pgupc" }],
["path", { d: "M7 12h7a2 2 0 0 1 2 2v1", key: "1gheu4" }]
]);
export { MessageCircleReply as default };
//# sourceMappingURL=message-circle-reply.js.map
@@ -0,0 +1,44 @@
import { isSVGElement } from '../../render/dom/utils/is-svg-element.mjs';
import { SVGVisualElement } from '../../render/svg/SVGVisualElement.mjs';
import { HTMLVisualElement } from '../../render/html/HTMLVisualElement.mjs';
import { visualElementStore } from '../../render/store.mjs';
import { ObjectVisualElement } from '../../render/object/ObjectVisualElement.mjs';
function createDOMVisualElement(element) {
const options = {
presenceContext: null,
props: {},
visualState: {
renderState: {
transform: {},
transformOrigin: {},
style: {},
vars: {},
attrs: {},
},
latestValues: {},
},
};
const node = isSVGElement(element)
? new SVGVisualElement(options)
: new HTMLVisualElement(options);
node.mount(element);
visualElementStore.set(element, node);
}
function createObjectVisualElement(subject) {
const options = {
presenceContext: null,
props: {},
visualState: {
renderState: {
output: {},
},
latestValues: {},
},
};
const node = new ObjectVisualElement(options);
node.mount(subject);
visualElementStore.set(subject, node);
}
export { createDOMVisualElement, createObjectVisualElement };
@@ -0,0 +1,29 @@
import { toDate } from "./toDate.mjs";
/**
* @name getMilliseconds
* @category Millisecond Helpers
* @summary Get the milliseconds of the given date.
*
* @description
* Get the milliseconds of the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
*
* @returns The milliseconds
*
* @example
* // Get the milliseconds of 29 February 2012 11:45:05.123:
* const result = getMilliseconds(new Date(2012, 1, 29, 11, 45, 5, 123))
* //=> 123
*/
export function getMilliseconds(date) {
const _date = toDate(date);
const milliseconds = _date.getMilliseconds();
return milliseconds;
}
// Fallback for modularized imports:
export default getMilliseconds;
@@ -0,0 +1,34 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link previousSunday} function options.
*/
export interface PreviousSundayOptions<DateType extends Date = Date>
extends ContextOptions<DateType> {}
/**
* @name previousSunday
* @category Weekday Helpers
* @summary When is the previous Sunday?
*
* @description
* When is the previous Sunday?
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to start counting from
* @param options - The options
*
* @returns The previous Sunday
*
* @example
* // When is the previous Sunday before Jun, 21, 2021?
* const result = previousSunday(new Date(2021, 5, 21))
* //=> Sun June 20 2021 00:00:00
*/
export declare function previousSunday<
DateType extends Date,
ResultDate extends Date = DateType,
>(
date: DateArg<DateType>,
options?: PreviousSundayOptions<ResultDate> | undefined,
): ResultDate;
@@ -0,0 +1,28 @@
import type { CollectionConfig } from '../../collections/config/types.js';
import type { SanitizedConfig } from '../types.js';
/**
* This function creates:
* - N fields per collection, named `_order` or `_<collection>_<joinField>_order`
* - 1 hook per collection
* - 1 endpoint per app
*
* Also, if collection.defaultSort or joinField.defaultSort is not set, it will be set to the orderable field.
*/
export declare const setupOrderable: (config: SanitizedConfig) => void;
export declare const addOrderableFieldsAndHook: (collection: CollectionConfig, orderableFieldNames: string[]) => void;
/**
* The body of the reorder endpoint.
* @internal
*/
export type OrderableEndpointBody = {
collectionSlug: string;
docsToMove: string[];
newKeyWillBe: 'greater' | 'less';
orderableFieldName: string;
target: {
id: string;
key: string;
};
};
export declare const addOrderableEndpoint: (config: SanitizedConfig) => void;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,52 @@
"use strict";
exports.getWeekOfMonth = getWeekOfMonth;
var _index = require("./getDate.js");
var _index2 = require("./getDay.js");
var _index3 = require("./startOfMonth.js");
var _index4 = require("./_lib/defaultOptions.js");
/**
* The {@link getWeekOfMonth} function options.
*/
/**
* @name getWeekOfMonth
* @category Week Helpers
* @summary Get the week of the month of the given date.
*
* @description
* Get the week of the month of the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
* @param options - An object with options.
*
* @returns The week of month
*
* @example
* // Which week of the month is 9 November 2017?
* const result = getWeekOfMonth(new Date(2017, 10, 9))
* //=> 2
*/
function getWeekOfMonth(date, options) {
const defaultOptions = (0, _index4.getDefaultOptions)();
const weekStartsOn =
options?.weekStartsOn ??
options?.locale?.options?.weekStartsOn ??
defaultOptions.weekStartsOn ??
defaultOptions.locale?.options?.weekStartsOn ??
0;
const currentDayOfMonth = (0, _index.getDate)(date);
if (isNaN(currentDayOfMonth)) return NaN;
const startWeekDay = (0, _index2.getDay)((0, _index3.startOfMonth)(date));
let lastDayOfFirstWeek = weekStartsOn - startWeekDay;
if (lastDayOfFirstWeek <= 0) lastDayOfFirstWeek += 7;
const remainingDaysAfterFirstWeek = currentDayOfMonth - lastDayOfFirstWeek;
return Math.ceil(remainingDaysAfterFirstWeek / 7) + 1;
}
@@ -0,0 +1 @@
!function(e){var n=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});n=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:n.keyword,variable:n.variable,function:n.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:n.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:n.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:n.expression,keyword:n.keyword,variable:n.variable,function:n.function,escape:n.escape,"parser-punctuation":{pattern:n.punctuation,alias:"punctuation"}},n.tag.inside["attr-value"])}(Prism);
@@ -0,0 +1,126 @@
import { fieldAffectsData, tabHasName } from '../fields/config/types.js';
export const flattenBlock = ({ block })=>{
return {
...block,
flattenedFields: flattenAllFields({
fields: block.fields
})
};
};
const flattenedFieldsCache = new Map();
/**
* Flattens all fields in a collection, preserving the nested field structure.
* @param cache
* @param fields
*/ export const flattenAllFields = ({ cache, fields })=>{
if (cache) {
const maybeFields = flattenedFieldsCache.get(fields);
if (maybeFields) {
return maybeFields;
}
}
const result = [];
for (const field of fields){
switch(field.type){
case 'array':
case 'group':
{
if (fieldAffectsData(field)) {
result.push({
...field,
flattenedFields: flattenAllFields({
fields: field.fields
})
});
} else {
for (const nestedField of flattenAllFields({
fields: field.fields
})){
result.push(nestedField);
}
}
break;
}
case 'blocks':
{
const blocks = [];
let blockReferences = undefined;
if (field.blockReferences) {
blockReferences = [];
for (const block of field.blockReferences){
if (typeof block === 'string') {
blockReferences.push(block);
continue;
}
blockReferences.push(flattenBlock({
block
}));
}
} else {
for (const block of field.blocks){
if (typeof block === 'string') {
blocks.push(block);
continue;
}
blocks.push(flattenBlock({
block
}));
}
}
const resultField = {
...field,
blockReferences,
blocks
};
result.push(resultField);
break;
}
case 'collapsible':
case 'row':
{
for (const nestedField of flattenAllFields({
fields: field.fields
})){
result.push(nestedField);
}
break;
}
case 'join':
{
result.push(field);
break;
}
case 'tabs':
{
for (const tab of field.tabs){
if (!tabHasName(tab)) {
for (const nestedField of flattenAllFields({
fields: tab.fields
})){
result.push(nestedField);
}
} else {
result.push({
...tab,
type: 'tab',
flattenedFields: flattenAllFields({
fields: tab.fields
})
});
}
}
break;
}
default:
{
if (field.type !== 'ui') {
result.push(field);
}
}
}
}
flattenedFieldsCache.set(fields, result);
return result;
};
//# sourceMappingURL=flattenAllFields.js.map
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CornerLeftDown = createLucideIcon("CornerLeftDown", [
["polyline", { points: "14 15 9 20 4 15", key: "nkc4i" }],
["path", { d: "M20 4h-7a4 4 0 0 0-4 4v12", key: "nbpdq2" }]
]);
export { CornerLeftDown as default };
//# sourceMappingURL=corner-left-down.js.map
@@ -0,0 +1,4 @@
export {
Fragment,
jsxDEV
} from "./emotion-react-jsx-dev-runtime.cjs.js";
@@ -0,0 +1,10 @@
"use strict";
var _async_generator = require("./_async_generator.cjs");
function _wrap_async_generator(fn) {
return function() {
return new _async_generator._(fn.apply(this, arguments));
};
}
exports._ = _wrap_async_generator;
@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Plug2 = createLucideIcon("Plug2", [
["path", { d: "M9 2v6", key: "17ngun" }],
["path", { d: "M15 2v6", key: "s7yy2p" }],
["path", { d: "M12 17v5", key: "bb1du9" }],
["path", { d: "M5 8h14", key: "pcz4l3" }],
["path", { d: "M6 11V8h12v3a6 6 0 1 1-12 0Z", key: "wtfw2c" }]
]);
export { Plug2 as default };
//# sourceMappingURL=plug-2.js.map
@@ -0,0 +1,40 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = traverseFast;
var _index = require("../definitions/index.js");
const _skip = Symbol();
const _stop = Symbol();
function traverseFast(node, enter, opts) {
if (!node) return false;
const keys = _index.VISITOR_KEYS[node.type];
if (!keys) return false;
opts = opts || {};
const ret = enter(node, opts);
if (ret !== undefined) {
switch (ret) {
case _skip:
return false;
case _stop:
return true;
}
}
for (const key of keys) {
const subNode = node[key];
if (!subNode) continue;
if (Array.isArray(subNode)) {
for (const node of subNode) {
if (traverseFast(node, enter, opts)) return true;
}
} else {
if (traverseFast(subNode, enter, opts)) return true;
}
}
return false;
}
traverseFast.skip = _skip;
traverseFast.stop = _stop;
//# sourceMappingURL=traverseFast.js.map
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { startOfSecond as fn } from "../startOfSecond.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const startOfSecond = convertToFP(fn, 1);
// Fallback for modularized imports:
export default startOfSecond;
@@ -0,0 +1 @@
{"version":3,"file":"wrapGenerationFunctionWithSentry.js","sources":["../../../src/common/wrapGenerationFunctionWithSentry.ts"],"sourcesContent":["import type { RequestEventData } from '@sentry/core';\nimport {\n captureException,\n getActiveSpan,\n getIsolationScope,\n handleCallbackErrors,\n SPAN_STATUS_ERROR,\n SPAN_STATUS_OK,\n winterCGHeadersToDict,\n} from '@sentry/core';\nimport type { GenerationFunctionContext } from '../common/types';\nimport { isNotFoundNavigationError, isRedirectNavigationError } from './nextNavigationErrorUtils';\nimport { flushSafelyWithTimeout, waitUntil } from './utils/responseEnd';\n\n/**\n * Wraps a generation function (e.g. generateMetadata) with Sentry error instrumentation.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrapGenerationFunctionWithSentry<F extends (...args: any[]) => any>(\n generationFunction: F,\n context: GenerationFunctionContext,\n): F {\n return new Proxy(generationFunction, {\n apply: (originalFunction, thisArg, args) => {\n const isolationScope = getIsolationScope();\n\n let headers = undefined;\n // We try-catch here just in case anything goes wrong with the async storage since it is Next.js internal API\n try {\n headers = context.requestAsyncStorage?.getStore()?.headers;\n } catch {\n /** empty */\n }\n\n const headersDict = headers ? winterCGHeadersToDict(headers) : undefined;\n\n isolationScope.setSDKProcessingMetadata({\n normalizedRequest: {\n headers: headersDict,\n } satisfies RequestEventData,\n });\n\n return handleCallbackErrors(\n () => originalFunction.apply(thisArg, args),\n error => {\n const span = getActiveSpan();\n const { componentRoute, componentType, generationFunctionIdentifier } = context;\n let shouldCapture = true;\n isolationScope.setTransactionName(`${componentType}.${generationFunctionIdentifier} (${componentRoute})`);\n\n if (span) {\n if (isNotFoundNavigationError(error)) {\n // We don't want to report \"not-found\"s\n shouldCapture = false;\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'not_found' });\n } else if (isRedirectNavigationError(error)) {\n // We don't want to report redirects\n shouldCapture = false;\n span.setStatus({ code: SPAN_STATUS_OK });\n } else {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n }\n\n if (shouldCapture) {\n captureException(error, {\n mechanism: {\n handled: false,\n type: 'auto.function.nextjs.generation_function',\n data: {\n function: generationFunctionIdentifier,\n },\n },\n });\n }\n },\n () => {\n waitUntil(flushSafelyWithTimeout());\n },\n );\n },\n });\n}\n"],"names":[],"mappings":";;;;AAcA;AACA;AACA;AACA;AACO,SAAS,gCAAgC;AAChD,EAAE,kBAAkB;AACpB,EAAE,OAAO;AACT,EAAK;AACL,EAAE,OAAO,IAAI,KAAK,CAAC,kBAAkB,EAAE;AACvC,IAAI,KAAK,EAAE,CAAC,gBAAgB,EAAE,OAAO,EAAE,IAAI,KAAK;AAChD,MAAM,MAAM,cAAA,GAAiB,iBAAiB,EAAE;;AAEhD,MAAM,IAAI,OAAA,GAAU,SAAS;AAC7B;AACA,MAAM,IAAI;AACV,QAAQ,OAAA,GAAU,OAAO,CAAC,mBAAmB,EAAE,QAAQ,EAAE,EAAE,OAAO;AAClE,MAAM,EAAE,MAAM;AACd;AACA,MAAM;;AAEN,MAAM,MAAM,WAAA,GAAc,OAAA,GAAU,qBAAqB,CAAC,OAAO,CAAA,GAAI,SAAS;;AAE9E,MAAM,cAAc,CAAC,wBAAwB,CAAC;AAC9C,QAAQ,iBAAiB,EAAE;AAC3B,UAAU,OAAO,EAAE,WAAW;AAC9B,SAAQ;AACR,OAAO,CAAC;;AAER,MAAM,OAAO,oBAAoB;AACjC,QAAQ,MAAM,gBAAgB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;AACnD,QAAQ,SAAS;AACjB,UAAU,MAAM,IAAA,GAAO,aAAa,EAAE;AACtC,UAAU,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,4BAAA,EAA6B,GAAI,OAAO;AACzF,UAAU,IAAI,aAAA,GAAgB,IAAI;AAClC,UAAU,cAAc,CAAC,kBAAkB,CAAC,CAAC,EAAA,aAAA,CAAA,CAAA,EAAA,4BAAA,CAAA,EAAA,EAAA,cAAA,CAAA,CAAA,CAAA,CAAA;;AAEA,UAAA,IAAA,IAAA,EAAA;AACA,YAAA,IAAA,yBAAA,CAAA,KAAA,CAAA,EAAA;AACA;AACA,cAAA,aAAA,GAAA,KAAA;AACA,cAAA,IAAA,CAAA,SAAA,CAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,WAAA,EAAA,CAAA;AACA,YAAA,CAAA,MAAA,IAAA,yBAAA,CAAA,KAAA,CAAA,EAAA;AACA;AACA,cAAA,aAAA,GAAA,KAAA;AACA,cAAA,IAAA,CAAA,SAAA,CAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA;AACA,YAAA,CAAA,MAAA;AACA,cAAA,IAAA,CAAA,SAAA,CAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,gBAAA,EAAA,CAAA;AACA,YAAA;AACA,UAAA;;AAEA,UAAA,IAAA,aAAA,EAAA;AACA,YAAA,gBAAA,CAAA,KAAA,EAAA;AACA,cAAA,SAAA,EAAA;AACA,gBAAA,OAAA,EAAA,KAAA;AACA,gBAAA,IAAA,EAAA,0CAAA;AACA,gBAAA,IAAA,EAAA;AACA,kBAAA,QAAA,EAAA,4BAAA;AACA,iBAAA;AACA,eAAA;AACA,aAAA,CAAA;AACA,UAAA;AACA,QAAA,CAAA;AACA,QAAA,MAAA;AACA,UAAA,SAAA,CAAA,sBAAA,EAAA,CAAA;AACA,QAAA,CAAA;AACA,OAAA;AACA,IAAA,CAAA;AACA,GAAA,CAAA;AACA;;;;"}
@@ -0,0 +1,597 @@
'use strict'
exports['string/varchar'] = {
format: 'text',
id: 1043,
tests: [
['bang', 'bang']
]
}
exports['integer/int4'] = {
format: 'text',
id: 23,
tests: [
['2147483647', 2147483647]
]
}
exports['smallint/int2'] = {
format: 'text',
id: 21,
tests: [
['32767', 32767]
]
}
exports['bigint/int8'] = {
format: 'text',
id: 20,
tests: [
['9223372036854775807', '9223372036854775807']
]
}
exports.oid = {
format: 'text',
id: 26,
tests: [
['103', 103]
]
}
var bignum = '31415926535897932384626433832795028841971693993751058.16180339887498948482045868343656381177203091798057628'
exports.numeric = {
format: 'text',
id: 1700,
tests: [
[bignum, bignum]
]
}
exports['real/float4'] = {
format: 'text',
id: 700,
tests: [
['123.456', 123.456]
]
}
exports['double precision / float 8'] = {
format: 'text',
id: 701,
tests: [
['12345678.12345678', 12345678.12345678]
]
}
exports.boolean = {
format: 'text',
id: 16,
tests: [
['TRUE', true],
['t', true],
['true', true],
['y', true],
['yes', true],
['on', true],
['1', true],
['f', false],
[null, null]
]
}
exports.timestamptz = {
format: 'text',
id: 1184,
tests: [
[
'2010-10-31 14:54:13.74-05:30',
dateEquals(2010, 9, 31, 20, 24, 13, 740)
],
[
'2011-01-23 22:05:00.68-06',
dateEquals(2011, 0, 24, 4, 5, 0, 680)
],
[
'2010-10-30 14:11:12.730838Z',
dateEquals(2010, 9, 30, 14, 11, 12, 730)
],
[
'2010-10-30 13:10:01+05',
dateEquals(2010, 9, 30, 8, 10, 1, 0)
]
]
}
exports.timestamp = {
format: 'text',
id: 1114,
tests: [
[
'2010-10-31 00:00:00',
function (t, value) {
t.equal(
value.toUTCString(),
new Date(2010, 9, 31, 0, 0, 0, 0, 0).toUTCString()
)
t.equal(
value.toString(),
new Date(2010, 9, 31, 0, 0, 0, 0, 0, 0).toString()
)
}
]
]
}
exports.date = {
format: 'text',
id: 1082,
tests: [
['2010-10-31', function (t, value) {
var now = new Date(2010, 9, 31)
dateEquals(
2010,
now.getUTCMonth(),
now.getUTCDate(),
now.getUTCHours(), 0, 0, 0)(t, value)
t.equal(value.getHours(), now.getHours())
}]
]
}
exports.inet = {
format: 'text',
id: 869,
tests: [
['8.8.8.8', '8.8.8.8'],
['2001:4860:4860::8888', '2001:4860:4860::8888'],
['127.0.0.1', '127.0.0.1'],
['fd00:1::40e', 'fd00:1::40e'],
['1.2.3.4', '1.2.3.4']
]
}
exports.cidr = {
format: 'text',
id: 650,
tests: [
['172.16.0.0/12', '172.16.0.0/12'],
['fe80::/10', 'fe80::/10'],
['fc00::/7', 'fc00::/7'],
['192.168.0.0/24', '192.168.0.0/24'],
['10.0.0.0/8', '10.0.0.0/8']
]
}
exports.macaddr = {
format: 'text',
id: 829,
tests: [
['08:00:2b:01:02:03', '08:00:2b:01:02:03'],
['16:10:9f:0d:66:00', '16:10:9f:0d:66:00']
]
}
exports.numrange = {
format: 'text',
id: 3906,
tests: [
['[,]', '[,]'],
['(,)', '(,)'],
['(,]', '(,]'],
['[1,)', '[1,)'],
['[,1]', '[,1]'],
['(1,2)', '(1,2)'],
['(1,20.5]', '(1,20.5]']
]
}
exports.interval = {
format: 'text',
id: 1186,
tests: [
['01:02:03', function (t, value) {
t.equal(value.toPostgres(), '3 seconds 2 minutes 1 hours')
t.deepEqual(value, {hours: 1, minutes: 2, seconds: 3})
}],
['01:02:03.456', function (t, value) {
t.deepEqual(value, {hours: 1, minutes:2, seconds: 3, milliseconds: 456})
}],
['1 year -32 days', function (t, value) {
t.equal(value.toPostgres(), '-32 days 1 years')
t.deepEqual(value, {years: 1, days: -32})
}],
['1 day -00:00:03', function (t, value) {
t.equal(value.toPostgres(), '-3 seconds 1 days')
t.deepEqual(value, {days: 1, seconds: -3})
}]
]
}
exports.bytea = {
format: 'text',
id: 17,
tests: [
['foo\\000\\200\\\\\\377', function (t, value) {
var buffer = new Buffer([102, 111, 111, 0, 128, 92, 255])
t.ok(buffer.equals(value))
}],
['', function (t, value) {
var buffer = new Buffer(0)
t.ok(buffer.equals(value))
}]
]
}
exports['array/boolean'] = {
format: 'text',
id: 1000,
tests: [
['{true,false}', function (t, value) {
t.deepEqual(value, [true, false])
}]
]
}
exports['array/char'] = {
format: 'text',
id: 1014,
tests: [
['{foo,bar}', function (t, value) {
t.deepEqual(value, ['foo', 'bar'])
}]
]
}
exports['array/varchar'] = {
format: 'text',
id: 1015,
tests: [
['{foo,bar}', function (t, value) {
t.deepEqual(value, ['foo', 'bar'])
}]
]
}
exports['array/text'] = {
format: 'text',
id: 1008,
tests: [
['{foo}', function (t, value) {
t.deepEqual(value, ['foo'])
}]
]
}
exports['array/bytea'] = {
format: 'text',
id: 1001,
tests: [
['{"\\\\x00000000"}', function (t, value) {
var buffer = new Buffer('00000000', 'hex')
t.ok(Array.isArray(value))
t.equal(value.length, 1)
t.ok(buffer.equals(value[0]))
}],
['{NULL,"\\\\x4e554c4c"}', function (t, value) {
var buffer = new Buffer('4e554c4c', 'hex')
t.ok(Array.isArray(value))
t.equal(value.length, 2)
t.equal(value[0], null)
t.ok(buffer.equals(value[1]))
}],
]
}
exports['array/numeric'] = {
format: 'text',
id: 1231,
tests: [
['{1.2,3.4}', function (t, value) {
t.deepEqual(value, [1.2, 3.4])
}]
]
}
exports['array/int2'] = {
format: 'text',
id: 1005,
tests: [
['{-32768, -32767, 32766, 32767}', function (t, value) {
t.deepEqual(value, [-32768, -32767, 32766, 32767])
}]
]
}
exports['array/int4'] = {
format: 'text',
id: 1005,
tests: [
['{-2147483648, -2147483647, 2147483646, 2147483647}', function (t, value) {
t.deepEqual(value, [-2147483648, -2147483647, 2147483646, 2147483647])
}]
]
}
exports['array/int8'] = {
format: 'text',
id: 1016,
tests: [
[
'{-9223372036854775808, -9223372036854775807, 9223372036854775806, 9223372036854775807}',
function (t, value) {
t.deepEqual(value, [
'-9223372036854775808',
'-9223372036854775807',
'9223372036854775806',
'9223372036854775807'
])
}
]
]
}
exports['array/json'] = {
format: 'text',
id: 199,
tests: [
[
'{{1,2},{[3],"[4,5]"},{null,NULL}}',
function (t, value) {
t.deepEqual(value, [
[1, 2],
[[3], [4, 5]],
[null, null],
])
}
]
]
}
exports['array/jsonb'] = {
format: 'text',
id: 3807,
tests: exports['array/json'].tests
}
exports['array/point'] = {
format: 'text',
id: 1017,
tests: [
['{"(25.1,50.5)","(10.1,40)"}', function (t, value) {
t.deepEqual(value, [{x: 25.1, y: 50.5}, {x: 10.1, y: 40}])
}]
]
}
exports['array/oid'] = {
format: 'text',
id: 1028,
tests: [
['{25864,25860}', function (t, value) {
t.deepEqual(value, [25864, 25860])
}]
]
}
exports['array/float4'] = {
format: 'text',
id: 1021,
tests: [
['{1.2, 3.4}', function (t, value) {
t.deepEqual(value, [1.2, 3.4])
}]
]
}
exports['array/float8'] = {
format: 'text',
id: 1022,
tests: [
['{-12345678.1234567, 12345678.12345678}', function (t, value) {
t.deepEqual(value, [-12345678.1234567, 12345678.12345678])
}]
]
}
exports['array/date'] = {
format: 'text',
id: 1182,
tests: [
['{2014-01-01,2015-12-31}', function (t, value) {
var expecteds = [new Date(2014, 0, 1), new Date(2015, 11, 31)]
t.equal(value.length, 2)
value.forEach(function (date, index) {
var expected = expecteds[index]
dateEquals(
expected.getUTCFullYear(),
expected.getUTCMonth(),
expected.getUTCDate(),
expected.getUTCHours(), 0, 0, 0)(t, date)
})
}]
]
}
exports['array/interval'] = {
format: 'text',
id: 1187,
tests: [
['{01:02:03,1 day -00:00:03}', function (t, value) {
var expecteds = [{hours: 1, minutes: 2, seconds: 3},
{days: 1, seconds: -3}]
t.equal(value.length, 2)
t.deepEqual(value, expecteds);
}]
]
}
exports['array/inet'] = {
format: 'text',
id: 1041,
tests: [
['{8.8.8.8}', function (t, value) {
t.deepEqual(value, ['8.8.8.8']);
}],
['{2001:4860:4860::8888}', function (t, value) {
t.deepEqual(value, ['2001:4860:4860::8888']);
}],
['{127.0.0.1,fd00:1::40e,1.2.3.4}', function (t, value) {
t.deepEqual(value, ['127.0.0.1', 'fd00:1::40e', '1.2.3.4']);
}]
]
}
exports['array/cidr'] = {
format: 'text',
id: 651,
tests: [
['{172.16.0.0/12}', function (t, value) {
t.deepEqual(value, ['172.16.0.0/12']);
}],
['{fe80::/10}', function (t, value) {
t.deepEqual(value, ['fe80::/10']);
}],
['{10.0.0.0/8,fc00::/7,192.168.0.0/24}', function (t, value) {
t.deepEqual(value, ['10.0.0.0/8', 'fc00::/7', '192.168.0.0/24']);
}]
]
}
exports['array/macaddr'] = {
format: 'text',
id: 1040,
tests: [
['{08:00:2b:01:02:03,16:10:9f:0d:66:00}', function (t, value) {
t.deepEqual(value, ['08:00:2b:01:02:03', '16:10:9f:0d:66:00']);
}]
]
}
exports['array/numrange'] = {
format: 'text',
id: 3907,
tests: [
['{"[1,2]","(4.5,8)","[10,40)","(-21.2,60.3]"}', function (t, value) {
t.deepEqual(value, ['[1,2]', '(4.5,8)', '[10,40)', '(-21.2,60.3]']);
}],
['{"[,20]","[3,]","[,]","(,35)","(1,)","(,)"}', function (t, value) {
t.deepEqual(value, ['[,20]', '[3,]', '[,]', '(,35)', '(1,)', '(,)']);
}],
['{"[,20)","[3,)","[,)","[,35)","[1,)","[,)"}', function (t, value) {
t.deepEqual(value, ['[,20)', '[3,)', '[,)', '[,35)', '[1,)', '[,)']);
}]
]
}
exports['binary-string/varchar'] = {
format: 'binary',
id: 1043,
tests: [
['bang', 'bang']
]
}
exports['binary-integer/int4'] = {
format: 'binary',
id: 23,
tests: [
[[0, 0, 0, 100], 100]
]
}
exports['binary-smallint/int2'] = {
format: 'binary',
id: 21,
tests: [
[[0, 101], 101]
]
}
exports['binary-bigint/int8'] = {
format: 'binary',
id: 20,
tests: [
[new Buffer([0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), '9223372036854775807']
]
}
exports['binary-oid'] = {
format: 'binary',
id: 26,
tests: [
[[0, 0, 0, 103], 103]
]
}
exports['binary-numeric'] = {
format: 'binary',
id: 1700,
tests: [
[
[0, 2, 0, 0, 0, 0, 0, hex('0x64'), 0, 12, hex('0xd'), hex('0x48'), 0, 0, 0, 0],
12.34
]
]
}
exports['binary-real/float4'] = {
format: 'binary',
id: 700,
tests: [
[['0x41', '0x48', '0x00', '0x00'].map(hex), 12.5]
]
}
exports['binary-boolean'] = {
format: 'binary',
id: 16,
tests: [
[[1], true],
[[0], false],
[null, null]
]
}
exports['binary-string'] = {
format: 'binary',
id: 25,
tests: [
[
new Buffer(['0x73', '0x6c', '0x61', '0x64', '0x64', '0x61'].map(hex)),
'sladda'
]
]
}
exports.point = {
format: 'text',
id: 600,
tests: [
['(25.1,50.5)', function (t, value) {
t.deepEqual(value, {x: 25.1, y: 50.5})
}]
]
}
exports.circle = {
format: 'text',
id: 718,
tests: [
['<(25,10),5>', function (t, value) {
t.deepEqual(value, {x: 25, y: 10, radius: 5})
}]
]
}
function hex (string) {
return parseInt(string, 16)
}
function dateEquals () {
var timestamp = Date.UTC.apply(Date, arguments)
return function (t, value) {
t.equal(value.toUTCString(), new Date(timestamp).toUTCString())
}
}
@@ -0,0 +1,4 @@
import React from 'react';
import './index.scss';
export declare const LineIcon: React.FC;
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"DrawerContent.d.ts","sourceRoot":"","sources":["../../../src/elements/ListDrawer/DrawerContent.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAG/D,OAAO,KAAK,EACV,eAAe,EAGhB,MAAM,YAAY,CAAA;AAUnB,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4LvD,CAAA"}
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { setDay as fn } from "../setDay.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const setDayWithOptions = convertToFP(fn, 3);
// Fallback for modularized imports:
export default setDayWithOptions;
@@ -0,0 +1,9 @@
@layer payload-default {
.live-preview-iframe {
background-color: white;
border: 0;
width: 100%;
height: 100%;
transform-origin: top left;
}
}
@@ -0,0 +1 @@
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/queues/endpoints/run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAInE;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,QAuG7B,CAAA;AAED,eAAO,MAAM,aAAa,eAAgB,mBAAmB,KAAG,OAE/D,CAAA"}
@@ -0,0 +1,19 @@
/**
* 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.
*
*/
const mod = await (process.env.NODE_ENV !== 'production' ? import('./LexicalYjs.dev.mjs') : import('./LexicalYjs.prod.mjs'));
export const CONNECTED_COMMAND = mod.CONNECTED_COMMAND;
export const TOGGLE_CONNECT_COMMAND = mod.TOGGLE_CONNECT_COMMAND;
export const createBinding = mod.createBinding;
export const createUndoManager = mod.createUndoManager;
export const getAnchorAndFocusCollabNodesForUserState = mod.getAnchorAndFocusCollabNodesForUserState;
export const initLocalState = mod.initLocalState;
export const setLocalStateFocus = mod.setLocalStateFocus;
export const syncCursorPositions = mod.syncCursorPositions;
export const syncLexicalUpdateToYjs = mod.syncLexicalUpdateToYjs;
export const syncYjsChangesToLexical = mod.syncYjsChangesToLexical;
@@ -0,0 +1,376 @@
import type { CorePluginList } from './generated/corePluginList'
import type { DefaultColors } from './generated/colors'
// Helpers
type Expand<T> = T extends object
? T extends infer O
? { [K in keyof O]: Expand<O[K]> }
: never
: T
type KeyValuePair<K extends keyof any = string, V = string> = Record<K, V>
interface RecursiveKeyValuePair<K extends keyof any = string, V = string> {
[key: string]: V | RecursiveKeyValuePair<K, V>
}
export type ResolvableTo<T> = T | ((utils: PluginUtils) => T)
type CSSRuleObject = RecursiveKeyValuePair<string, null | string | string[]>
interface PluginUtils {
colors: DefaultColors
theme(path: string, defaultValue?: unknown): any
breakpoints<I = Record<string, unknown>, O = I>(arg: I): O
rgb(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string
hsl(arg: string): (arg: Partial<{ opacityVariable: string; opacityValue: number }>) => string
}
// Content related config
type FilePath = string
type RawFile = { raw: string; extension?: string }
type ExtractorFn = (content: string) => string[]
type TransformerFn = (content: string) => string
type ContentConfig =
| (FilePath | RawFile)[]
| {
files: (FilePath | RawFile)[]
relative?: boolean
extract?: ExtractorFn | { [extension: string]: ExtractorFn }
transform?: TransformerFn | { [extension: string]: TransformerFn }
}
// Important related config
type ImportantConfig = boolean | string
// Prefix related config
type PrefixConfig = string
// Separator related config
type SeparatorConfig = string
// Safelist related config
type SafelistConfig = string | { pattern: RegExp; variants?: string[] }
// Blocklist related config
type BlocklistConfig = string
// Presets related config
type PresetsConfig = Partial<Config>
// Future related config
type FutureConfigValues =
| 'hoverOnlyWhenSupported'
| 'respectDefaultRingColorOpacity'
| 'disableColorOpacityUtilitiesByDefault'
| 'relativeContentPathsByDefault'
type FutureConfig = Expand<'all' | Partial<Record<FutureConfigValues, boolean>>> | []
// Experimental related config
type ExperimentalConfigValues = 'optimizeUniversalDefaults' | 'matchVariant'
type ExperimentalConfig = Expand<'all' | Partial<Record<ExperimentalConfigValues, boolean>>> | []
// DarkMode related config
type DarkModeConfig =
// Use the `media` query strategy.
| 'media'
// Use the `class` strategy, which requires a `.dark` class on the `html`.
| 'class'
// Use the `class` strategy with a custom class instead of `.dark`.
| ['class', string]
// Use the `selector` strategy — same as `class` but uses `:where()` for more predicable behavior
| 'selector'
// Use the `selector` strategy with a custom selector instead of `.dark`.
| ['selector', string]
// Use the `variant` strategy, which allows you to completely customize the selector
// It takes a string or an array of strings, which are passed directly to `addVariant()`
| ['variant', string | string[]]
type Screen = { raw: string } | { min: string } | { max: string } | { min: string; max: string }
type ScreensConfig = string[] | KeyValuePair<string, string | Screen | Screen[]>
// Theme related config
export interface ThemeConfig {
// Responsiveness
screens: ResolvableTo<ScreensConfig>
supports: ResolvableTo<Record<string, string>>
data: ResolvableTo<Record<string, string>>
// Reusable base configs
colors: ResolvableTo<RecursiveKeyValuePair>
spacing: ResolvableTo<KeyValuePair>
// Components
container: ResolvableTo<
Partial<{
screens: ScreensConfig
center: boolean
padding: string | Record<string, string>
}>
>
// Utilities
inset: ThemeConfig['spacing']
zIndex: ResolvableTo<KeyValuePair>
order: ResolvableTo<KeyValuePair>
gridColumn: ResolvableTo<KeyValuePair>
gridColumnStart: ResolvableTo<KeyValuePair>
gridColumnEnd: ResolvableTo<KeyValuePair>
gridRow: ResolvableTo<KeyValuePair>
gridRowStart: ResolvableTo<KeyValuePair>
gridRowEnd: ResolvableTo<KeyValuePair>
margin: ThemeConfig['spacing']
aspectRatio: ResolvableTo<KeyValuePair>
height: ThemeConfig['spacing']
maxHeight: ThemeConfig['spacing']
minHeight: ResolvableTo<KeyValuePair>
width: ThemeConfig['spacing']
maxWidth: ResolvableTo<KeyValuePair>
minWidth: ResolvableTo<KeyValuePair>
flex: ResolvableTo<KeyValuePair>
flexShrink: ResolvableTo<KeyValuePair>
flexGrow: ResolvableTo<KeyValuePair>
flexBasis: ThemeConfig['spacing']
borderSpacing: ThemeConfig['spacing']
transformOrigin: ResolvableTo<KeyValuePair>
translate: ThemeConfig['spacing']
rotate: ResolvableTo<KeyValuePair>
skew: ResolvableTo<KeyValuePair>
scale: ResolvableTo<KeyValuePair>
animation: ResolvableTo<KeyValuePair>
keyframes: ResolvableTo<KeyValuePair<string, KeyValuePair<string, KeyValuePair>>>
cursor: ResolvableTo<KeyValuePair>
scrollMargin: ThemeConfig['spacing']
scrollPadding: ThemeConfig['spacing']
listStyleType: ResolvableTo<KeyValuePair>
columns: ResolvableTo<KeyValuePair>
gridAutoColumns: ResolvableTo<KeyValuePair>
gridAutoRows: ResolvableTo<KeyValuePair>
gridTemplateColumns: ResolvableTo<KeyValuePair>
gridTemplateRows: ResolvableTo<KeyValuePair>
gap: ThemeConfig['spacing']
space: ThemeConfig['spacing']
divideWidth: ThemeConfig['borderWidth']
divideColor: ThemeConfig['borderColor']
divideOpacity: ThemeConfig['borderOpacity']
borderRadius: ResolvableTo<KeyValuePair>
borderWidth: ResolvableTo<KeyValuePair>
borderColor: ThemeConfig['colors']
borderOpacity: ThemeConfig['opacity']
backgroundColor: ThemeConfig['colors']
backgroundOpacity: ThemeConfig['opacity']
backgroundImage: ResolvableTo<KeyValuePair>
gradientColorStops: ThemeConfig['colors']
backgroundSize: ResolvableTo<KeyValuePair>
backgroundPosition: ResolvableTo<KeyValuePair>
fill: ThemeConfig['colors']
stroke: ThemeConfig['colors']
strokeWidth: ResolvableTo<KeyValuePair>
objectPosition: ResolvableTo<KeyValuePair>
padding: ThemeConfig['spacing']
textIndent: ThemeConfig['spacing']
fontFamily: ResolvableTo<
KeyValuePair<
string,
| string
| string[]
| [
fontFamily: string | string[],
configuration: Partial<{
fontFeatureSettings: string
fontVariationSettings: string
}>
]
>
>
fontSize: ResolvableTo<
KeyValuePair<
string,
| string
| [fontSize: string, lineHeight: string]
| [
fontSize: string,
configuration: Partial<{
lineHeight: string
letterSpacing: string
fontWeight: string | number
}>
]
>
>
fontWeight: ResolvableTo<KeyValuePair>
lineHeight: ResolvableTo<KeyValuePair>
letterSpacing: ResolvableTo<KeyValuePair>
textColor: ThemeConfig['colors']
textOpacity: ThemeConfig['opacity']
textDecorationColor: ThemeConfig['colors']
textDecorationThickness: ResolvableTo<KeyValuePair>
textUnderlineOffset: ResolvableTo<KeyValuePair>
placeholderColor: ThemeConfig['colors']
placeholderOpacity: ThemeConfig['opacity']
caretColor: ThemeConfig['colors']
accentColor: ThemeConfig['colors']
opacity: ResolvableTo<KeyValuePair>
boxShadow: ResolvableTo<KeyValuePair>
boxShadowColor: ThemeConfig['colors']
outlineWidth: ResolvableTo<KeyValuePair>
outlineOffset: ResolvableTo<KeyValuePair>
outlineColor: ThemeConfig['colors']
ringWidth: ResolvableTo<KeyValuePair>
ringColor: ThemeConfig['colors']
ringOpacity: ThemeConfig['opacity']
ringOffsetWidth: ResolvableTo<KeyValuePair>
ringOffsetColor: ThemeConfig['colors']
blur: ResolvableTo<KeyValuePair>
brightness: ResolvableTo<KeyValuePair>
contrast: ResolvableTo<KeyValuePair>
dropShadow: ResolvableTo<KeyValuePair<string, string | string[]>>
grayscale: ResolvableTo<KeyValuePair>
hueRotate: ResolvableTo<KeyValuePair>
invert: ResolvableTo<KeyValuePair>
saturate: ResolvableTo<KeyValuePair>
sepia: ResolvableTo<KeyValuePair>
backdropBlur: ThemeConfig['blur']
backdropBrightness: ThemeConfig['brightness']
backdropContrast: ThemeConfig['contrast']
backdropGrayscale: ThemeConfig['grayscale']
backdropHueRotate: ThemeConfig['hueRotate']
backdropInvert: ThemeConfig['invert']
backdropOpacity: ThemeConfig['opacity']
backdropSaturate: ThemeConfig['saturate']
backdropSepia: ThemeConfig['sepia']
transitionProperty: ResolvableTo<KeyValuePair>
transitionTimingFunction: ResolvableTo<KeyValuePair>
transitionDelay: ResolvableTo<KeyValuePair>
transitionDuration: ResolvableTo<KeyValuePair>
willChange: ResolvableTo<KeyValuePair>
content: ResolvableTo<KeyValuePair>
}
interface CustomThemeConfig extends ThemeConfig {
[key: string]: any
}
// Core plugins related config
type CorePluginsConfig = CorePluginList[] | Expand<Partial<Record<CorePluginList, boolean>>>
// Plugins related config
type ValueType =
| 'any'
| 'color'
| 'url'
| 'image'
| 'length'
| 'percentage'
| 'position'
| 'lookup'
| 'generic-name'
| 'family-name'
| 'number'
| 'line-width'
| 'absolute-size'
| 'relative-size'
| 'shadow'
export interface PluginAPI {
// for registering new static utility styles
addUtilities(
utilities: CSSRuleObject | CSSRuleObject[],
options?: Partial<{
respectPrefix: boolean
respectImportant: boolean
}>
): void
// for registering new dynamic utility styles
matchUtilities<T = string, U = string>(
utilities: KeyValuePair<
string,
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
>,
options?: Partial<{
respectPrefix: boolean
respectImportant: boolean
type: ValueType | ValueType[]
values: KeyValuePair<string, T>
modifiers: 'any' | KeyValuePair<string, U>
supportsNegativeValues: boolean
}>
): void
// for registering new static component styles
addComponents(
components: CSSRuleObject | CSSRuleObject[],
options?: Partial<{
respectPrefix: boolean
respectImportant: boolean
}>
): void
// for registering new dynamic component styles
matchComponents<T = string, U = string>(
components: KeyValuePair<
string,
(value: T | string, extra: { modifier: U | string | null }) => CSSRuleObject | null
>,
options?: Partial<{
respectPrefix: boolean
respectImportant: boolean
type: ValueType | ValueType[]
values: KeyValuePair<string, T>
modifiers: 'any' | KeyValuePair<string, U>
supportsNegativeValues: boolean
}>
): void
// for registering new base styles
addBase(base: CSSRuleObject | CSSRuleObject[]): void
// for registering custom variants
addVariant(name: string, definition: string | string[] | (() => string) | (() => string)[]): void
matchVariant<T = string>(
name: string,
cb: (value: T | string, extra: { modifier: string | null }) => string | string[],
options?: {
values?: KeyValuePair<string, T>
sort?(
a: { value: T | string; modifier: string | null },
b: { value: T | string; modifier: string | null }
): number
}
): void
// for looking up values in the user’s theme configuration
theme: <TDefaultValue = Config['theme']>(
path?: string,
defaultValue?: TDefaultValue
) => TDefaultValue
// for looking up values in the user’s Tailwind configuration
config: <TDefaultValue = Config>(path?: string, defaultValue?: TDefaultValue) => TDefaultValue
// for checking if a core plugin is enabled
corePlugins(path: string): boolean
// for manually escaping strings meant to be used in class names
e: (className: string) => string
}
export type PluginCreator = (api: PluginAPI) => void
export type PluginsConfig = (
| PluginCreator
| { handler: PluginCreator; config?: Partial<Config> }
| {
(options: any): { handler: PluginCreator; config?: Partial<Config> }
__isOptionsFunction: true
}
)[]
// Top level config related
interface RequiredConfig {
content: ContentConfig
}
interface OptionalConfig {
important: Partial<ImportantConfig>
prefix: Partial<PrefixConfig>
separator: Partial<SeparatorConfig>
safelist: Array<SafelistConfig>
blocklist: Array<BlocklistConfig>
presets: Array<PresetsConfig>
future: Partial<FutureConfig>
experimental: Partial<ExperimentalConfig>
darkMode: Partial<DarkModeConfig>
theme: Partial<CustomThemeConfig & { extend: Partial<CustomThemeConfig> }>
corePlugins: Partial<CorePluginsConfig>
plugins: Partial<PluginsConfig>
// Custom
[key: string]: any
}
export type Config = RequiredConfig & Partial<OptionalConfig>
@@ -0,0 +1,58 @@
import { entityKind } from "./entity.js";
import { Table } from "./table.js";
function toSnakeCase(input) {
const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
return words.map((word) => word.toLowerCase()).join("_");
}
function toCamelCase(input) {
const words = input.replace(/['\u2019]/g, "").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g) ?? [];
return words.reduce((acc, word, i) => {
const formattedWord = i === 0 ? word.toLowerCase() : `${word[0].toUpperCase()}${word.slice(1)}`;
return acc + formattedWord;
}, "");
}
function noopCase(input) {
return input;
}
class CasingCache {
static [entityKind] = "CasingCache";
/** @internal */
cache = {};
cachedTables = {};
convert;
constructor(casing) {
this.convert = casing === "snake_case" ? toSnakeCase : casing === "camelCase" ? toCamelCase : noopCase;
}
getColumnCasing(column) {
if (!column.keyAsName) return column.name;
const schema = column.table[Table.Symbol.Schema] ?? "public";
const tableName = column.table[Table.Symbol.OriginalName];
const key = `${schema}.${tableName}.${column.name}`;
if (!this.cache[key]) {
this.cacheTable(column.table);
}
return this.cache[key];
}
cacheTable(table) {
const schema = table[Table.Symbol.Schema] ?? "public";
const tableName = table[Table.Symbol.OriginalName];
const tableKey = `${schema}.${tableName}`;
if (!this.cachedTables[tableKey]) {
for (const column of Object.values(table[Table.Symbol.Columns])) {
const columnKey = `${tableKey}.${column.name}`;
this.cache[columnKey] = this.convert(column.name);
}
this.cachedTables[tableKey] = true;
}
}
clearCache() {
this.cache = {};
this.cachedTables = {};
}
}
export {
CasingCache,
toCamelCase,
toSnakeCase
};
//# sourceMappingURL=casing.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/gel-core/roles.ts"],"sourcesContent":["import { entityKind } from '~/entity.ts';\n\nexport interface GelRoleConfig {\n\tcreateDb?: boolean;\n\tcreateRole?: boolean;\n\tinherit?: boolean;\n}\n\nexport class GelRole implements GelRoleConfig {\n\tstatic readonly [entityKind]: string = 'GelRole';\n\n\t/** @internal */\n\t_existing?: boolean;\n\n\t/** @internal */\n\treadonly createDb: GelRoleConfig['createDb'];\n\t/** @internal */\n\treadonly createRole: GelRoleConfig['createRole'];\n\t/** @internal */\n\treadonly inherit: GelRoleConfig['inherit'];\n\n\tconstructor(\n\t\treadonly name: string,\n\t\tconfig?: GelRoleConfig,\n\t) {\n\t\tif (config) {\n\t\t\tthis.createDb = config.createDb;\n\t\t\tthis.createRole = config.createRole;\n\t\t\tthis.inherit = config.inherit;\n\t\t}\n\t}\n\n\texisting(): this {\n\t\tthis._existing = true;\n\t\treturn this;\n\t}\n}\n\nexport function gelRole(name: string, config?: GelRoleConfig) {\n\treturn new GelRole(name, config);\n}\n"],"mappings":"AAAA,SAAS,kBAAkB;AAQpB,MAAM,QAAiC;AAAA,EAa7C,YACU,MACT,QACC;AAFQ;AAGT,QAAI,QAAQ;AACX,WAAK,WAAW,OAAO;AACvB,WAAK,aAAa,OAAO;AACzB,WAAK,UAAU,OAAO;AAAA,IACvB;AAAA,EACD;AAAA,EArBA,QAAiB,UAAU,IAAY;AAAA;AAAA,EAGvC;AAAA;AAAA,EAGS;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EAaT,WAAiB;AAChB,SAAK,YAAY;AACjB,WAAO;AAAA,EACR;AACD;AAEO,SAAS,QAAQ,MAAc,QAAwB;AAC7D,SAAO,IAAI,QAAQ,MAAM,MAAM;AAChC;","names":[]}
@@ -0,0 +1,40 @@
import type { DateArg, RoundingOptions } from "./types.js";
/**
* The {@link differenceInMinutes} function options.
*/
export interface DifferenceInMinutesOptions extends RoundingOptions {}
/**
* @name differenceInMinutes
* @category Minute Helpers
* @summary Get the number of minutes between the given dates.
*
* @description
* Get the signed number of full (rounded towards 0) minutes between the given dates.
*
* @param dateLeft - The later date
* @param dateRight - The earlier date
* @param options - An object with options.
*
* @returns The number of minutes
*
* @example
* // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?
* const result = differenceInMinutes(
* new Date(2014, 6, 2, 12, 20, 0),
* new Date(2014, 6, 2, 12, 7, 59)
* )
* //=> 12
*
* @example
* // How many minutes are between 10:01:59 and 10:00:00
* const result = differenceInMinutes(
* new Date(2000, 0, 1, 10, 0, 0),
* new Date(2000, 0, 1, 10, 1, 59)
* )
* //=> -1
*/
export declare function differenceInMinutes(
dateLeft: DateArg<Date> & {},
dateRight: DateArg<Date> & {},
options?: DifferenceInMinutesOptions,
): number;
@@ -0,0 +1,10 @@
"use strict";
exports.isSameWeek = void 0;
var _index = require("../isSameWeek.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const isSameWeek = (exports.isSameWeek = (0, _index2.convertToFP)(
_index.isSameWeek,
2,
));
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/icons/Plus/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,cAAc,CAAA;AAErB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAc5B,CAAA"}
@@ -0,0 +1 @@
{"version":3,"file":"reply.js","sources":["../../../src/icons/reply.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Reply\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cG9seWxpbmUgcG9pbnRzPSI5IDE3IDQgMTIgOSA3IiAvPgogIDxwYXRoIGQ9Ik0yMCAxOHYtMmE0IDQgMCAwIDAtNC00SDQiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/reply\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 Reply = createLucideIcon('Reply', [\n ['polyline', { points: '9 17 4 12 9 7', key: 'hvgpf2' }],\n ['path', { d: 'M20 18v-2a4 4 0 0 0-4-4H4', key: '5vmcpk' }],\n]);\n\nexport default Reply;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,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,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5D,CAAC,CAAA,CAAA;;"}

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