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

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

View File

@@ -0,0 +1,49 @@
import { WINDOW } from '../helpers.js';
/**
* Checks if the baggage header has Sentry values.
*/
function baggageHeaderHasSentryValues(baggageHeader) {
return baggageHeader.split(',').some(value => value.trim().startsWith('sentry-'));
}
/**
* Gets the full URL from a given URL string.
*/
function getFullURL(url) {
try {
// By adding a base URL to new URL(), this will also work for relative urls
// If `url` is a full URL, the base URL is ignored anyhow
const parsed = new URL(url, WINDOW.location.origin);
return parsed.href;
} catch {
return undefined;
}
}
/**
* Checks if the entry is a PerformanceResourceTiming.
*/
function isPerformanceResourceTiming(entry) {
return (
entry.entryType === 'resource' &&
'initiatorType' in entry &&
typeof (entry ).nextHopProtocol === 'string' &&
(entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')
);
}
/**
* Creates a Headers object from a record of string key-value pairs, and returns undefined if it fails.
*/
function createHeadersSafely(headers) {
try {
return new Headers(headers);
} catch {
// noop
return undefined;
}
}
export { baggageHeaderHasSentryValues, createHeadersSafely, getFullURL, isPerformanceResourceTiming };
//# sourceMappingURL=utils.js.map

View File

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

View File

@@ -0,0 +1,91 @@
import { concat, uint64be } from '../lib/buffer_utils.js';
import checkIvLength from '../lib/check_iv_length.js';
import checkCekLength from './check_cek_length.js';
import timingSafeEqual from './timing_safe_equal.js';
import { JOSENotSupported, JWEDecryptionFailed, JWEInvalid } from '../util/errors.js';
import crypto, { isCryptoKey } from './webcrypto.js';
import { checkEncCryptoKey } from '../lib/crypto_key.js';
import invalidKeyInput from '../lib/invalid_key_input.js';
import { types } from './is_key_like.js';
async function cbcDecrypt(enc, cek, ciphertext, iv, tag, aad) {
if (!(cek instanceof Uint8Array)) {
throw new TypeError(invalidKeyInput(cek, 'Uint8Array'));
}
const keySize = parseInt(enc.slice(1, 4), 10);
const encKey = await crypto.subtle.importKey('raw', cek.subarray(keySize >> 3), 'AES-CBC', false, ['decrypt']);
const macKey = await crypto.subtle.importKey('raw', cek.subarray(0, keySize >> 3), {
hash: `SHA-${keySize << 1}`,
name: 'HMAC',
}, false, ['sign']);
const macData = concat(aad, iv, ciphertext, uint64be(aad.length << 3));
const expectedTag = new Uint8Array((await crypto.subtle.sign('HMAC', macKey, macData)).slice(0, keySize >> 3));
let macCheckPassed;
try {
macCheckPassed = timingSafeEqual(tag, expectedTag);
}
catch {
}
if (!macCheckPassed) {
throw new JWEDecryptionFailed();
}
let plaintext;
try {
plaintext = new Uint8Array(await crypto.subtle.decrypt({ iv, name: 'AES-CBC' }, encKey, ciphertext));
}
catch {
}
if (!plaintext) {
throw new JWEDecryptionFailed();
}
return plaintext;
}
async function gcmDecrypt(enc, cek, ciphertext, iv, tag, aad) {
let encKey;
if (cek instanceof Uint8Array) {
encKey = await crypto.subtle.importKey('raw', cek, 'AES-GCM', false, ['decrypt']);
}
else {
checkEncCryptoKey(cek, enc, 'decrypt');
encKey = cek;
}
try {
return new Uint8Array(await crypto.subtle.decrypt({
additionalData: aad,
iv,
name: 'AES-GCM',
tagLength: 128,
}, encKey, concat(ciphertext, tag)));
}
catch {
throw new JWEDecryptionFailed();
}
}
const decrypt = async (enc, cek, ciphertext, iv, tag, aad) => {
if (!isCryptoKey(cek) && !(cek instanceof Uint8Array)) {
throw new TypeError(invalidKeyInput(cek, ...types, 'Uint8Array'));
}
if (!iv) {
throw new JWEInvalid('JWE Initialization Vector missing');
}
if (!tag) {
throw new JWEInvalid('JWE Authentication Tag missing');
}
checkIvLength(enc, iv);
switch (enc) {
case 'A128CBC-HS256':
case 'A192CBC-HS384':
case 'A256CBC-HS512':
if (cek instanceof Uint8Array)
checkCekLength(cek, parseInt(enc.slice(-3), 10));
return cbcDecrypt(enc, cek, ciphertext, iv, tag, aad);
case 'A128GCM':
case 'A192GCM':
case 'A256GCM':
if (cek instanceof Uint8Array)
checkCekLength(cek, parseInt(enc.slice(1, 4), 10));
return gcmDecrypt(enc, cek, ciphertext, iv, tag, aad);
default:
throw new JOSENotSupported('Unsupported JWE Content Encryption Algorithm');
}
};
export default decrypt;

View File

@@ -0,0 +1,25 @@
export interface SpanStatus {
/** The status code of this message. */
code: SpanStatusCode;
/** A developer-facing error message. */
message?: string;
}
/**
* An enumeration of status codes.
*/
export declare enum SpanStatusCode {
/**
* The default status.
*/
UNSET = 0,
/**
* The operation has been validated by an Application developer or
* Operator to have completed successfully.
*/
OK = 1,
/**
* The operation contains an error.
*/
ERROR = 2
}
//# sourceMappingURL=status.d.ts.map

View File

@@ -0,0 +1,14 @@
/**
* The base implementation of `_.propertyOf` without support for deep paths.
*
* @private
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyOf(object) {
return function(key) {
return object == null ? undefined : object[key];
};
}
module.exports = basePropertyOf;

View File

@@ -0,0 +1 @@
{"version":3,"file":"plane-landing.js","sources":["../../../src/icons/plane-landing.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PlaneLanding\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiAyMmgyMCIgLz4KICA8cGF0aCBkPSJNMy43NyAxMC43NyAyIDlsMi00LjUgMS4xLjU1Yy41NS4yOC45Ljg0LjkgMS40NXMuMzUgMS4xNy45IDEuNDVMOCA4LjVsMy02IDEuMDUuNTNhMiAyIDAgMCAxIDEuMDkgMS41MmwuNzIgNS40YTIgMiAwIDAgMCAxLjA5IDEuNTJsNC40IDIuMmMuNDIuMjIuNzguNTUgMS4wMS45NmwuNiAxLjAzYy40OS44OC0uMDYgMS45OC0xLjA2IDIuMWwtMS4xOC4xNWMtLjQ3LjA2LS45NS0uMDItMS4zNy0uMjRMNC4yOSAxMS4xNWEyIDIgMCAwIDEtLjUyLS4zOFoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/plane-landing\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 PlaneLanding = createLucideIcon('PlaneLanding', [\n ['path', { d: 'M2 22h20', key: '272qi7' }],\n [\n 'path',\n {\n d: 'M3.77 10.77 2 9l2-4.5 1.1.55c.55.28.9.84.9 1.45s.35 1.17.9 1.45L8 8.5l3-6 1.05.53a2 2 0 0 1 1.09 1.52l.72 5.4a2 2 0 0 0 1.09 1.52l4.4 2.2c.42.22.78.55 1.01.96l.6 1.03c.49.88-.06 1.98-1.06 2.1l-1.18.15c-.47.06-.95-.02-1.37-.24L4.29 11.15a2 2 0 0 1-.52-.38Z',\n key: '1ma21e',\n },\n ],\n]);\n\nexport default PlaneLanding;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/pg-core/alias.ts"],"sourcesContent":["import { TableAliasProxyHandler } from '~/alias.ts';\nimport type { BuildAliasTable } from './query-builders/select.types.ts';\n\nimport type { PgTable } from './table.ts';\nimport type { PgViewBase } from './view-base.ts';\n\nexport function alias<TTable extends PgTable | PgViewBase, TAlias extends string>(\n\ttable: TTable,\n\talias: TAlias,\n): BuildAliasTable<TTable, TAlias> {\n\treturn new Proxy(table, new TableAliasProxyHandler(alias, false)) as any;\n}\n"],"mappings":"AAAA,SAAS,8BAA8B;AAMhC,SAAS,MACf,OACAA,QACkC;AAClC,SAAO,IAAI,MAAM,OAAO,IAAI,uBAAuBA,QAAO,KAAK,CAAC;AACjE;","names":["alias"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"chevron-down-square.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,22 @@
'use strict'
const { Writable } = require('stream')
const parentPort = require('worker_threads').parentPort
async function run (opts) {
return new Writable({
autoDestroy: true,
write (chunk, enc, cb) {
if (parentPort) {
parentPort.postMessage({
code: 'EVENT',
name: 'context',
args: opts.$context
})
}
cb()
}
})
}
module.exports = run

View File

@@ -0,0 +1 @@
!function(e){for(var r="(?:[^\\\\()[\\]{}\"'/]|<string>|/(?![*/])|<comment>|\\(<expr>*\\)|\\[<expr>*\\]|\\{<expr>*\\}|\\\\[^])".replace(/<string>/g,(function(){return"\"(?:\\\\.|[^\\\\\"\r\n])*\"|'(?:\\\\.|[^\\\\'\r\n])*'"})).replace(/<comment>/g,(function(){return"//.*(?!.)|/\\*(?:[^*]|\\*(?!/))*\\*/"})),t=0;t<2;t++)r=r.replace(/<expr>/g,(function(){return r}));r=r.replace(/<expr>/g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*\\s*\\(<js>*\\)\\s*\\{<js>*\\}".replace(/<js>/g,(function(){return r})),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}])<js>)+".replace(/<js>/g,(function(){return r})),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism);

View File

@@ -0,0 +1,2 @@
export { LruMemoizerInstrumentation } from './instrumentation';
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,11 @@
import { motionValue } from '../../value/index.mjs';
import { isMotionValue } from '../../value/utils/is-motion-value.mjs';
import { animateMotionValue } from '../interfaces/motion-value.mjs';
function animateSingleValue(value, keyframes, options) {
const motionValue$1 = isMotionValue(value) ? value : motionValue(value);
motionValue$1.start(animateMotionValue("", motionValue$1, keyframes, options));
return motionValue$1.animation;
}
export { animateSingleValue };

View File

@@ -0,0 +1,9 @@
import type { Field } from '@aws-sdk/client-rds-data';
import { TypeHint } from '@aws-sdk/client-rds-data';
import type { QueryTypingsValue } from "../../sql/sql.cjs";
export declare function getValueFromDataApi(field: Field): string | number | boolean | string[] | number[] | Uint8Array | boolean[] | import("@aws-sdk/client-rds-data").ArrayValue[] | null;
export declare function typingsToAwsTypeHint(typings?: QueryTypingsValue): TypeHint | undefined;
export declare function toValueParam(value: any, typings?: QueryTypingsValue): {
value: Field;
typeHint?: TypeHint;
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Modal/index.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAc,EAAE,QAAQ,EAA0B,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AA6B9C,MAAM,MAAM,GAEP,CAAC,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE3B,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,OAAO,QAAQ,KAAK,UAAU,EAAE,CAAC;YACnC,OAAO,CACL,KAAC,QAAQ,cACN,QAAQ,CAAC,KAAK,CAAC,GACP,CACZ,CAAA;QACH,CAAC;QAED,OAAO,CACL,KAAC,QAAQ,cACN,QAAQ,GACA,CACZ,CAAA;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA"}

View File

@@ -0,0 +1,67 @@
# forwarded-parse
[![Version npm][npm-forwarded-parse-badge]][npm-forwarded-parse]
[![Build Status][ci-forwarded-parse-badge]][ci-forwarded-parse]
[![Coverage Status][coverage-forwarded-parse-badge]][coverage-forwarded-parse]
Parse the `Forwarded` header ([RFC 7239][rfc7239]) into an array of objects.
## Install
```
npm install --save forwarded-parse
```
## API
This module exports a single function that takes a string and returns an array
of objects.
### `parse(text)`
#### Arguments
- `text` - The header field value.
#### Return value
An array of objects, one for each set of parameters added by a proxy.
#### Exceptions
Throws a `ParseError` exception if the header field value is invalid.
#### Example
```js
var parse = require('forwarded-parse');
console.log(
parse('for=198.51.100.17;by=203.0.113.60;proto=http;host=example.com')
);
/*
[{
for: '198.51.100.17',
by: '203.0.113.60',
proto: 'http',
host: 'example.com'
}]
*/
```
## License
[MIT](LICENSE)
[npm-forwarded-parse-badge]: https://img.shields.io/npm/v/forwarded-parse.svg
[npm-forwarded-parse]: https://www.npmjs.com/package/forwarded-parse
[ci-forwarded-parse-badge]:
https://img.shields.io/github/workflow/status/lpinca/forwarded-parse/CI/master?label=CI
[ci-forwarded-parse]:
https://github.com/lpinca/forwarded-parse/actions?query=workflow%3ACI+branch%3Amaster
[coverage-forwarded-parse-badge]:
https://img.shields.io/coveralls/lpinca/forwarded-parse/master.svg
[coverage-forwarded-parse]:
https://coveralls.io/r/lpinca/forwarded-parse?branch=master
[rfc7239]: https://datatracker.ietf.org/doc/html/rfc7239

View File

@@ -0,0 +1 @@
{"version":3,"file":"whenActivated.js","sources":["../../../../../src/metrics/web-vitals/lib/whenActivated.ts"],"sourcesContent":["/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { WINDOW } from '../../../types';\n\nexport const whenActivated = (callback: () => void) => {\n if (WINDOW.document?.prerendering) {\n addEventListener('prerenderingchange', () => callback(), true);\n } else {\n callback();\n }\n};\n"],"names":["WINDOW"],"mappings":";;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;MAIa,aAAA,GAAgB,CAAC,QAAQ,KAAiB;AACvD,EAAE,IAAIA,YAAM,CAAC,QAAQ,EAAE,YAAY,EAAE;AACrC,IAAI,gBAAgB,CAAC,oBAAoB,EAAE,MAAM,QAAQ,EAAE,EAAE,IAAI,CAAC;AAClE,EAAE,OAAO;AACT,IAAI,QAAQ,EAAE;AACd,EAAE;AACF;;;;"}

View File

@@ -0,0 +1,17 @@
export interface Options {
/**
* Whether breadcrumbs should be recorded for requests
* Defaults to true
*/
breadcrumbs: boolean;
/**
* Function determining whether or not to create spans to track outgoing requests to the given URL.
* By default, spans will be created for all outgoing requests.
*/
shouldCreateSpanForRequest?: (url: string) => boolean;
}
/**
* Creates spans and attaches tracing headers to fetch requests on WinterCG runtimes.
*/
export declare const winterCGFetchIntegration: (options?: Partial<Options> | undefined) => import("@sentry/core").Integration;
//# sourceMappingURL=wintercg-fetch.d.ts.map

View File

@@ -0,0 +1,9 @@
import { entityKind } from "../entity.js";
import { View } from "../sql/sql.js";
class SQLiteViewBase extends View {
static [entityKind] = "SQLiteViewBase";
}
export {
SQLiteViewBase
};
//# sourceMappingURL=view-base.js.map

View File

@@ -0,0 +1,24 @@
/**
* A time duration.
*/
export type DurationUnit = 'nanosecond' | 'microsecond' | 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'week';
/**
* Size of information derived from bytes.
*/
export type InformationUnit = 'bit' | 'byte' | 'kilobyte' | 'kibibyte' | 'megabyte' | 'mebibyte' | 'gigabyte' | 'gibibyte' | 'terabyte' | 'tebibyte' | 'petabyte' | 'pebibyte' | 'exabyte' | 'exbibyte';
/**
* Fractions such as percentages.
*/
export type FractionUnit = 'ratio' | 'percent';
/**
* Untyped value without a unit.
*/
export type NoneUnit = '' | 'none';
type LiteralUnion<T extends string> = T | Omit<T, T>;
export type MeasurementUnit = LiteralUnion<DurationUnit | InformationUnit | FractionUnit | NoneUnit>;
export type Measurements = Record<string, {
value: number;
unit: MeasurementUnit;
}>;
export {};
//# sourceMappingURL=measurement.d.ts.map

View File

@@ -0,0 +1,46 @@
{
"name": "get-tsconfig",
"version": "4.8.1",
"description": "Find and parse the tsconfig.json file from a directory path",
"keywords": [
"get-tsconfig",
"get",
"typescript",
"tsconfig",
"tsconfig.json"
],
"license": "MIT",
"repository": "privatenumber/get-tsconfig",
"funding": "https://github.com/privatenumber/get-tsconfig?sponsor=1",
"author": {
"name": "Hiroki Osame",
"email": "hiroki.osame@gmail.com"
},
"files": [
"dist"
],
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"imports": {
"#get-tsconfig": {
"types": "./src/index.ts",
"development": "./src/index.ts",
"default": "./dist/index.mjs"
}
},
"dependencies": {
"resolve-pkg-maps": "^1.0.0"
}
}

View File

@@ -0,0 +1,5 @@
export declare const toCodePoints: (str: string) => number[];
export declare const fromCodePoint: (...codePoints: number[]) => string;
export declare const decode: (base64: string) => ArrayBuffer | number[];
export declare const polyUint16Array: (buffer: number[]) => number[];
export declare const polyUint32Array: (buffer: number[]) => number[];

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"webpack5.js","sources":["../../src/webpack5.ts"],"sourcesContent":["import { SentryWebpackPluginOptions, sentryWebpackUnpluginFactory } from \"./webpack4and5\";\n\nconst sentryUnplugin = sentryWebpackUnpluginFactory();\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryWebpackPlugin: (options?: SentryWebpackPluginOptions) => any =\n sentryUnplugin.webpack;\n\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\n\nexport type { SentryWebpackPluginOptions };\n"],"names":["sentryUnplugin","sentryWebpackUnpluginFactory","sentryWebpackPlugin","webpack"],"mappings":";;;;;;;;;;AAEA,IAAMA,cAAc,GAAGC,yCAA4B,EAAE,CAAA;;AAErD;AACaC,IAAAA,mBAAkE,GAC7EF,cAAc,CAACG;;;;;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EACL,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EACL,UAAU,EACV,aAAa,EACb,MAAM,EACN,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EACL,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,GACjB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,cAAc,GACf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,mBAAmB,EACnB,eAAe,EACf,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,OAAO;CACR,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport { W3CBaggagePropagator } from './baggage/propagation/W3CBaggagePropagator';\nexport { AnchoredClock } from './common/anchored-clock';\nexport type { Clock } from './common/anchored-clock';\nexport { isAttributeValue, sanitizeAttributes } from './common/attributes';\nexport {\n globalErrorHandler,\n setGlobalErrorHandler,\n} from './common/global-error-handler';\nexport { loggingErrorHandler } from './common/logging-error-handler';\nexport {\n addHrTimes,\n getTimeOrigin,\n hrTime,\n hrTimeDuration,\n hrTimeToMicroseconds,\n hrTimeToMilliseconds,\n hrTimeToNanoseconds,\n hrTimeToTimeStamp,\n isTimeInput,\n isTimeInputHrTime,\n millisToHrTime,\n timeInputToHrTime,\n} from './common/time';\nexport { unrefTimer } from './common/timer-util';\nexport type { ErrorHandler, InstrumentationScope } from './common/types';\nexport { ExportResultCode } from './ExportResult';\nexport type { ExportResult } from './ExportResult';\nexport { parseKeyPairsIntoRecord } from './baggage/utils';\nexport {\n SDK_INFO,\n _globalThis,\n getStringFromEnv,\n getBooleanFromEnv,\n getNumberFromEnv,\n getStringListFromEnv,\n otperformance,\n} from './platform';\nexport { CompositePropagator } from './propagation/composite';\nexport type { CompositePropagatorConfig } from './propagation/composite';\nexport {\n TRACE_PARENT_HEADER,\n TRACE_STATE_HEADER,\n W3CTraceContextPropagator,\n parseTraceParent,\n} from './trace/W3CTraceContextPropagator';\nexport {\n RPCType,\n deleteRPCMetadata,\n getRPCMetadata,\n setRPCMetadata,\n} from './trace/rpc-metadata';\nexport type { RPCMetadata } from './trace/rpc-metadata';\nexport {\n isTracingSuppressed,\n suppressTracing,\n unsuppressTracing,\n} from './trace/suppress-tracing';\nexport { TraceState } from './trace/TraceState';\nexport { merge } from './utils/merge';\nexport { TimeoutError, callWithTimeout } from './utils/timeout';\nexport { isUrlIgnored, urlMatches } from './utils/url';\nexport { BindOnceFuture } from './utils/callback';\nexport { diagLogLevelFromString } from './utils/configuration';\nimport { _export } from './internal/exporter';\nexport const internal = {\n _export,\n};\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utilities/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,MAAM,CAAA;AACxC,OAAO,EAAS,KAAK,UAAU,EAAsB,MAAM,aAAa,CAAA;AAExE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAEhD;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,CAAA;AAQlC,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,YAInD,CAAA;AAEF,eAAO,MAAM,oBAAoB,EAAE,UAAU,CAAC,YAAmC,CAAA;AAEjF,eAAO,MAAM,SAAS,2BAA+B,MAAM,CAAC,QAAQ,CAAC,KAAG,aA2BvE,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"getFolderResultsComponentAndData.d.ts","sourceRoot":"","sources":["../../src/utilities/getFolderResultsComponentAndData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,oCAAoC,EACpC,cAAc,EAEf,MAAM,SAAS,CAAA;AAChB,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAWxE,KAAK,sCAAsC,GAAG;IAC5C,WAAW,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAChC,SAAS,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC9B,yBAAyB,CAAC,EAAE,cAAc,EAAE,CAAA;IAC5C,sBAAsB,EAAE,KAAK,CAAC,SAAS,CAAA;IACvC,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAChC,CAAA;AAED,KAAK,2CAA2C,GAAG;IACjD,WAAW,CAAC,EAAE,KAAK,CAAA;IACnB,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,sBAAsB,CAAC,EAAE,KAAK,CAAA;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GAAG,CACA;IACE,OAAO,EAAE,MAAM,CAAA;CAChB,GACD,WAAW,CACd,CAAA;AAED,eAAO,MAAM,uCAAuC,EAAE,cAAc,CAClE,oCAAoC,EACpC,OAAO,CAAC,2CAA2C,GAAG,sCAAsC,CAAC,CAe9F,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gCAAgC,gIAQ1C,oCAAoC,KAAG,OAAO,CAAC,sCAAsC,CA8HvF,CAAA"}

View File

@@ -0,0 +1,32 @@
import { browserTracingIntegration } from '@sentry/browser';
import { Integration } from '@sentry/core';
import { ReactRouterOptions } from './reactrouter-compat-utils';
import { CreateRouterFunction, Router, RouterState, UseRoutes } from './types';
/**
* A browser tracing integration that uses React Router v6 to instrument navigations.
* Expects `useEffect`, `useLocation`, `useNavigationType`, `createRoutesFromChildren` and `matchRoutes` to be passed as options.
*/
export declare function reactRouterV6BrowserTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions): Integration;
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v6 useRoutes hook.
* This is used to automatically capture route changes as transactions when using the useRoutes hook.
*/
export declare function wrapUseRoutesV6(origUseRoutes: UseRoutes): UseRoutes;
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v6 createBrowserRouter function.
* This is used to automatically capture route changes as transactions when using the createBrowserRouter API.
*/
export declare function wrapCreateBrowserRouterV6<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
/**
* A wrapper function that adds Sentry routing instrumentation to a React Router v6 createMemoryRouter function.
* This is used to automatically capture route changes as transactions when using the createMemoryRouter API.
* The difference between createBrowserRouter and createMemoryRouter is that with createMemoryRouter,
* optional `initialEntries` are also taken into account.
*/
export declare function wrapCreateMemoryRouterV6<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createMemoryRouterFunction: CreateRouterFunction<TState, TRouter>): CreateRouterFunction<TState, TRouter>;
/**
* A higher-order component that adds Sentry routing instrumentation to a React Router v6 Route component.
* This is used to automatically capture route changes as transactions.
*/
export declare function withSentryReactRouterV6Routing<P extends Record<string, any>, R extends React.FC<P>>(routes: R): R;
//# sourceMappingURL=reactrouterv6.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"injectLoader.d.ts","sourceRoot":"","sources":["../../../src/sdk/injectLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAQ7E;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,qBAAqB,GAAG,IAAI,CAkC5E"}

View File

@@ -0,0 +1,71 @@
"use strict";
exports.eachDayOfInterval = eachDayOfInterval;
var _index = require("./_lib/normalizeInterval.cjs");
var _index2 = require("./constructFrom.cjs");
/**
* The {@link eachDayOfInterval} function options.
*/
/**
* The {@link eachDayOfInterval} function result type. It resolves the proper data type.
* It uses the first argument date object type, starting from the date argument,
* then the start interval date, and finally the end interval date. If
* a context function is passed, it uses the context function return type.
*/
/**
* @name eachDayOfInterval
* @category Interval Helpers
* @summary Return the array of dates within the specified time interval.
*
* @description
* Return the array of dates within the specified time interval.
*
* @typeParam IntervalType - Interval type.
* @typeParam Options - Options type.
*
* @param interval - The interval.
* @param options - An object with options.
*
* @returns The array with starts of days from the day of the interval start to the day of the interval end
*
* @example
* // Each day between 6 October 2014 and 10 October 2014:
* const result = eachDayOfInterval({
* start: new Date(2014, 9, 6),
* end: new Date(2014, 9, 10)
* })
* //=> [
* // Mon Oct 06 2014 00:00:00,
* // Tue Oct 07 2014 00:00:00,
* // Wed Oct 08 2014 00:00:00,
* // Thu Oct 09 2014 00:00:00,
* // Fri Oct 10 2014 00:00:00
* // ]
*/
function eachDayOfInterval(interval, options) {
const { start, end } = (0, _index.normalizeInterval)(options?.in, interval);
let reversed = +start > +end;
const endTime = reversed ? +start : +end;
const date = reversed ? end : start;
date.setHours(0, 0, 0, 0);
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+date <= endTime) {
dates.push((0, _index2.constructFrom)(start, date));
date.setDate(date.getDate() + step);
date.setHours(0, 0, 0, 0);
}
return reversed ? dates.reverse() : dates;
}

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../src/utilities/migrationTableExists.ts"],"sourcesContent":["import type { LibSQLDatabase } from 'drizzle-orm/libsql'\n\nimport type { DrizzleAdapter, PostgresDB } from '../types.js'\n\nexport const migrationTableExists = async (\n adapter: DrizzleAdapter,\n db?: LibSQLDatabase | PostgresDB,\n): Promise<boolean> => {\n let statement\n\n if (adapter.name === 'postgres') {\n const prependSchema = adapter.schemaName ? `\"${adapter.schemaName}\".` : ''\n statement = `SELECT to_regclass('${prependSchema}\"payload_migrations\"') AS exists;`\n }\n\n if (adapter.name === 'sqlite') {\n statement = `\n SELECT CASE\n WHEN COUNT(*) > 0 THEN 1\n ELSE 0\n END AS 'exists'\n FROM sqlite_master\n WHERE type = 'table'\n AND name = 'payload_migrations';`\n }\n\n const result = await adapter.execute({\n drizzle: db ?? adapter.drizzle,\n raw: statement,\n })\n\n const [row] = result.rows\n\n return row && typeof row === 'object' && 'exists' in row && !!row.exists\n}\n"],"names":["migrationTableExists","adapter","db","statement","name","prependSchema","schemaName","result","execute","drizzle","raw","row","rows","exists"],"mappings":"AAIA,OAAO,MAAMA,uBAAuB,OAClCC,SACAC;IAEA,IAAIC;IAEJ,IAAIF,QAAQG,IAAI,KAAK,YAAY;QAC/B,MAAMC,gBAAgBJ,QAAQK,UAAU,GAAG,CAAC,CAAC,EAAEL,QAAQK,UAAU,CAAC,EAAE,CAAC,GAAG;QACxEH,YAAY,CAAC,oBAAoB,EAAEE,cAAc,iCAAiC,CAAC;IACrF;IAEA,IAAIJ,QAAQG,IAAI,KAAK,UAAU;QAC7BD,YAAY,CAAC;;;;;;;wCAOuB,CAAC;IACvC;IAEA,MAAMI,SAAS,MAAMN,QAAQO,OAAO,CAAC;QACnCC,SAASP,MAAMD,QAAQQ,OAAO;QAC9BC,KAAKP;IACP;IAEA,MAAM,CAACQ,IAAI,GAAGJ,OAAOK,IAAI;IAEzB,OAAOD,OAAO,OAAOA,QAAQ,YAAY,YAAYA,OAAO,CAAC,CAACA,IAAIE,MAAM;AAC1E,EAAC"}

View File

@@ -0,0 +1,12 @@
const AttributeNames = {
HONO_TYPE: 'hono.type',
HONO_NAME: 'hono.name',
} ;
const HonoTypes = {
MIDDLEWARE: 'middleware',
REQUEST_HANDLER: 'request_handler',
} ;
export { AttributeNames, HonoTypes };
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"star-off.js","sources":["../../../src/icons/star-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name StarOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOC4zNCA4LjM0IDIgOS4yN2w1IDQuODdMNS44MiAyMSAxMiAxNy43NyAxOC4xOCAyMWwtLjU5LTMuNDMiIC8+CiAgPHBhdGggZD0iTTE4LjQyIDEyLjc2IDIyIDkuMjdsLTYuOTEtMUwxMiAybC0xLjQ0IDIuOTEiIC8+CiAgPGxpbmUgeDE9IjIiIHgyPSIyMiIgeTE9IjIiIHkyPSIyMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/star-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 StarOff = createLucideIcon('StarOff', [\n ['path', { d: 'M8.34 8.34 2 9.27l5 4.87L5.82 21 12 17.77 18.18 21l-.59-3.43', key: '16m0ql' }],\n ['path', { d: 'M18.42 12.76 22 9.27l-6.91-1L12 2l-1.44 2.91', key: '1vt8nq' }],\n ['line', { x1: '2', x2: '22', y1: '2', y2: '22', key: 'a6p6uj' }],\n]);\n\nexport default StarOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC7F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAC7E,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAClE,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,30 @@
var arrayFilter = require('./_arrayFilter'),
stubArray = require('./stubArray');
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Built-in value references. */
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeGetSymbols = Object.getOwnPropertySymbols;
/**
* Creates an array of the own enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
if (object == null) {
return [];
}
object = Object(object);
return arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
});
};
module.exports = getSymbols;

View File

@@ -0,0 +1 @@
Prism.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#[\w-]+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:False|True)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,punctuation:/[\[\]().,:]/};

View File

@@ -0,0 +1,313 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const _exports = require('../../exports.js');
const semanticAttributes = require('../../semanticAttributes.js');
const spanstatus = require('../spanstatus.js');
const trace = require('../trace.js');
const genAiAttributes = require('../ai/gen-ai-attributes.js');
const constants = require('./constants.js');
const utils = require('./utils.js');
/**
* Creates a Sentry callback handler for LangChain
* Returns a plain object that LangChain will call via duck-typing
*
* This is a stateful handler that tracks spans across multiple LangChain executions.
*/
function createLangChainCallbackHandler(options = {}) {
const recordInputs = options.recordInputs ?? false;
const recordOutputs = options.recordOutputs ?? false;
// Internal state - single instance tracks all spans
const spanMap = new Map();
/**
* Exit a span and clean up
*/
const exitSpan = (runId) => {
const span = spanMap.get(runId);
if (span?.isRecording()) {
span.end();
spanMap.delete(runId);
}
};
/**
* Handler for LLM Start
* This handler will be called by LangChain's callback handler when an LLM event is detected.
*/
const handler = {
// Required LangChain BaseCallbackHandler properties
lc_serializable: false,
lc_namespace: ['langchain_core', 'callbacks', 'sentry'],
lc_secrets: undefined,
lc_attributes: undefined,
lc_aliases: undefined,
lc_serializable_keys: undefined,
lc_id: ['langchain_core', 'callbacks', 'sentry'],
lc_kwargs: {},
name: 'SentryCallbackHandler',
// BaseCallbackHandlerInput boolean flags
ignoreLLM: false,
ignoreChain: false,
ignoreAgent: false,
ignoreRetriever: false,
ignoreCustomEvent: false,
raiseError: false,
awaitHandlers: true,
handleLLMStart(
llm,
prompts,
runId,
_parentRunId,
_extraParams,
tags,
metadata,
_runName,
) {
const invocationParams = utils.getInvocationParams(tags);
const attributes = utils.extractLLMRequestAttributes(
llm ,
prompts,
recordInputs,
invocationParams,
metadata,
);
const modelName = attributes[genAiAttributes.GEN_AI_REQUEST_MODEL_ATTRIBUTE];
const operationName = attributes[genAiAttributes.GEN_AI_OPERATION_NAME_ATTRIBUTE];
trace.startSpanManual(
{
name: `${operationName} ${modelName}`,
op: 'gen_ai.chat',
attributes: {
...attributes,
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.chat',
},
},
span => {
spanMap.set(runId, span);
return span;
},
);
},
// Chat Model Start Handler
handleChatModelStart(
llm,
messages,
runId,
_parentRunId,
_extraParams,
tags,
metadata,
_runName,
) {
const invocationParams = utils.getInvocationParams(tags);
const attributes = utils.extractChatModelRequestAttributes(
llm ,
messages ,
recordInputs,
invocationParams,
metadata,
);
const modelName = attributes[genAiAttributes.GEN_AI_REQUEST_MODEL_ATTRIBUTE];
const operationName = attributes[genAiAttributes.GEN_AI_OPERATION_NAME_ATTRIBUTE];
trace.startSpanManual(
{
name: `${operationName} ${modelName}`,
op: 'gen_ai.chat',
attributes: {
...attributes,
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.chat',
},
},
span => {
spanMap.set(runId, span);
return span;
},
);
},
// LLM End Handler - note: handleLLMEnd with capital LLM (used by both LLMs and chat models!)
handleLLMEnd(
output,
runId,
_parentRunId,
_tags,
_extraParams,
) {
const span = spanMap.get(runId);
if (span?.isRecording()) {
const attributes = utils.extractLlmResponseAttributes(output , recordOutputs);
if (attributes) {
span.setAttributes(attributes);
}
exitSpan(runId);
}
},
// LLM Error Handler - note: handleLLMError with capital LLM
handleLLMError(error, runId) {
const span = spanMap.get(runId);
if (span?.isRecording()) {
span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: 'llm_error' });
exitSpan(runId);
}
_exports.captureException(error, {
mechanism: {
handled: false,
type: `${constants.LANGCHAIN_ORIGIN}.llm_error_handler`,
},
});
},
// Chain Start Handler
handleChainStart(chain, inputs, runId, _parentRunId) {
const chainName = chain.name || 'unknown_chain';
const attributes = {
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.ai.langchain',
'langchain.chain.name': chainName,
};
// Add inputs if recordInputs is enabled
if (recordInputs) {
attributes['langchain.chain.inputs'] = JSON.stringify(inputs);
}
trace.startSpanManual(
{
name: `chain ${chainName}`,
op: 'gen_ai.invoke_agent',
attributes: {
...attributes,
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.invoke_agent',
},
},
span => {
spanMap.set(runId, span);
return span;
},
);
},
// Chain End Handler
handleChainEnd(outputs, runId) {
const span = spanMap.get(runId);
if (span?.isRecording()) {
// Add outputs if recordOutputs is enabled
if (recordOutputs) {
span.setAttributes({
'langchain.chain.outputs': JSON.stringify(outputs),
});
}
exitSpan(runId);
}
},
// Chain Error Handler
handleChainError(error, runId) {
const span = spanMap.get(runId);
if (span?.isRecording()) {
span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: 'chain_error' });
exitSpan(runId);
}
_exports.captureException(error, {
mechanism: {
handled: false,
type: `${constants.LANGCHAIN_ORIGIN}.chain_error_handler`,
},
});
},
// Tool Start Handler
handleToolStart(tool, input, runId, _parentRunId) {
const toolName = tool.name || 'unknown_tool';
const attributes = {
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: constants.LANGCHAIN_ORIGIN,
[genAiAttributes.GEN_AI_TOOL_NAME_ATTRIBUTE]: toolName,
};
// Add input if recordInputs is enabled
if (recordInputs) {
attributes[genAiAttributes.GEN_AI_TOOL_INPUT_ATTRIBUTE] = input;
}
trace.startSpanManual(
{
name: `execute_tool ${toolName}`,
op: 'gen_ai.execute_tool',
attributes: {
...attributes,
[semanticAttributes.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'gen_ai.execute_tool',
},
},
span => {
spanMap.set(runId, span);
return span;
},
);
},
// Tool End Handler
handleToolEnd(output, runId) {
const span = spanMap.get(runId);
if (span?.isRecording()) {
// Add output if recordOutputs is enabled
if (recordOutputs) {
span.setAttributes({
[genAiAttributes.GEN_AI_TOOL_OUTPUT_ATTRIBUTE]: JSON.stringify(output),
});
}
exitSpan(runId);
}
},
// Tool Error Handler
handleToolError(error, runId) {
const span = spanMap.get(runId);
if (span?.isRecording()) {
span.setStatus({ code: spanstatus.SPAN_STATUS_ERROR, message: 'tool_error' });
exitSpan(runId);
}
_exports.captureException(error, {
mechanism: {
handled: false,
type: `${constants.LANGCHAIN_ORIGIN}.tool_error_handler`,
},
});
},
// LangChain BaseCallbackHandler required methods
copy() {
return handler;
},
toJSON() {
return {
lc: 1,
type: 'not_implemented',
id: handler.lc_id,
};
},
toJSONNotImplemented() {
return {
lc: 1,
type: 'not_implemented',
id: handler.lc_id,
};
},
};
return handler;
}
exports.createLangChainCallbackHandler = createLangChainCallbackHandler;
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,335 @@
import { errorMonitor } from 'node:events';
import { SpanKind, context, trace } from '@opentelemetry/api';
import { RPCType, setRPCMetadata, isTracingSuppressed, getRPCMetadata } from '@opentelemetry/core';
import { SEMATTRS_NET_HOST_IP, SEMATTRS_NET_HOST_PORT, SEMATTRS_NET_PEER_IP, SEMATTRS_HTTP_STATUS_CODE, ATTR_HTTP_ROUTE, ATTR_HTTP_RESPONSE_STATUS_CODE } from '@opentelemetry/semantic-conventions';
import { debug, parseStringToURLObject, stripUrlQueryAndFragment, httpHeadersToSpanAttributes, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP, getSpanStatusFromHttpCode, SPAN_STATUS_ERROR, getIsolationScope } from '@sentry/core';
import { DEBUG_BUILD } from '../../debug-build.js';
import { addStartSpanCallback } from './httpServerIntegration.js';
const INTEGRATION_NAME = 'Http.ServerSpans';
// Tree-shakable guard to remove all code related to tracing
const _httpServerSpansIntegration = ((options = {}) => {
const ignoreStaticAssets = options.ignoreStaticAssets ?? true;
const ignoreIncomingRequests = options.ignoreIncomingRequests;
const ignoreStatusCodes = options.ignoreStatusCodes ?? [
[401, 404],
// 300 and 304 are possibly valid status codes we do not want to filter
[301, 303],
[305, 399],
];
const { onSpanCreated } = options;
// eslint-disable-next-line deprecation/deprecation
const { requestHook, responseHook, applyCustomAttributesOnSpan } = options.instrumentation ?? {};
return {
name: INTEGRATION_NAME,
setup(client) {
// If no tracing, we can just skip everything here
if (typeof __SENTRY_TRACING__ !== 'undefined' && !__SENTRY_TRACING__) {
return;
}
client.on('httpServerRequest', (_request, _response, normalizedRequest) => {
// Type-casting this here because we do not want to put the node types into core
const request = _request ;
const response = _response ;
const startSpan = (next) => {
if (
shouldIgnoreSpansForIncomingRequest(request, {
ignoreStaticAssets,
ignoreIncomingRequests,
})
) {
DEBUG_BUILD && debug.log(INTEGRATION_NAME, 'Skipping span creation for incoming request', request.url);
return next();
}
const fullUrl = normalizedRequest.url || request.url || '/';
const urlObj = parseStringToURLObject(fullUrl);
const headers = request.headers;
const userAgent = headers['user-agent'];
const ips = headers['x-forwarded-for'];
const httpVersion = request.httpVersion;
const host = headers.host;
const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, '$1') || 'localhost';
const tracer = client.tracer;
const scheme = fullUrl.startsWith('https') ? 'https' : 'http';
const method = normalizedRequest.method || request.method?.toUpperCase() || 'GET';
const httpTargetWithoutQueryFragment = urlObj ? urlObj.pathname : stripUrlQueryAndFragment(fullUrl);
const bestEffortTransactionName = `${method} ${httpTargetWithoutQueryFragment}`;
// We use the plain tracer.startSpan here so we can pass the span kind
const span = tracer.startSpan(bestEffortTransactionName, {
kind: SpanKind.SERVER,
attributes: {
// Sentry specific attributes
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.server',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.http',
'sentry.http.prefetch': isKnownPrefetchRequest(request) || undefined,
// Old Semantic Conventions attributes - added for compatibility with what `@opentelemetry/instrumentation-http` output before
'http.url': fullUrl,
'http.method': normalizedRequest.method,
'http.target': urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,
'http.host': host,
'net.host.name': hostname,
'http.client_ip': typeof ips === 'string' ? ips.split(',')[0] : undefined,
'http.user_agent': userAgent,
'http.scheme': scheme,
'http.flavor': httpVersion,
'net.transport': httpVersion?.toUpperCase() === 'QUIC' ? 'ip_udp' : 'ip_tcp',
...getRequestContentLengthAttribute(request),
...httpHeadersToSpanAttributes(
normalizedRequest.headers || {},
client.getOptions().sendDefaultPii ?? false,
),
},
});
// TODO v11: Remove the following three hooks, only onSpanCreated should remain
requestHook?.(span, request);
responseHook?.(span, response);
applyCustomAttributesOnSpan?.(span, request, response);
onSpanCreated?.(span, request, response);
const rpcMetadata = {
type: RPCType.HTTP,
span,
};
return context.with(setRPCMetadata(trace.setSpan(context.active(), span), rpcMetadata), () => {
context.bind(context.active(), request);
context.bind(context.active(), response);
// Ensure we only end the span once
// E.g. error can be emitted before close is emitted
let isEnded = false;
function endSpan(status) {
if (isEnded) {
return;
}
isEnded = true;
const newAttributes = getIncomingRequestAttributesOnResponse(request, response);
span.setAttributes(newAttributes);
span.setStatus(status);
span.end();
// Update the transaction name if the route has changed
const route = newAttributes['http.route'];
if (route) {
getIsolationScope().setTransactionName(`${request.method?.toUpperCase() || 'GET'} ${route}`);
}
}
response.on('close', () => {
endSpan(getSpanStatusFromHttpCode(response.statusCode));
});
response.on(errorMonitor, () => {
const httpStatus = getSpanStatusFromHttpCode(response.statusCode);
// Ensure we def. have an error status here
endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });
});
return next();
});
};
addStartSpanCallback(request, startSpan);
});
},
processEvent(event) {
// Drop transaction if it has a status code that should be ignored
if (event.type === 'transaction') {
const statusCode = event.contexts?.trace?.data?.['http.response.status_code'];
if (typeof statusCode === 'number') {
const shouldDrop = shouldFilterStatusCode(statusCode, ignoreStatusCodes);
if (shouldDrop) {
DEBUG_BUILD && debug.log('Dropping transaction due to status code', statusCode);
return null;
}
}
}
return event;
},
afterAllSetup(client) {
if (!DEBUG_BUILD) {
return;
}
if (client.getIntegrationByName('Http')) {
debug.warn(
'It seems that you have manually added `httpServerSpansIntergation` while `httpIntegration` is also present. Make sure to remove `httpIntegration` when adding `httpServerSpansIntegration`.',
);
}
if (!client.getIntegrationByName('Http.Server')) {
debug.error(
'It seems that you have manually added `httpServerSpansIntergation` without adding `httpServerIntegration`. This is a requiement for spans to be created - please add the `httpServerIntegration` integration.',
);
}
},
};
}) ;
/**
* This integration emits spans for incoming requests handled via the node `http` module.
* It requires the `httpServerIntegration` to be present.
*/
const httpServerSpansIntegration = _httpServerSpansIntegration
;
function isKnownPrefetchRequest(req) {
// Currently only handles Next.js prefetch requests but may check other frameworks in the future.
return req.headers['next-router-prefetch'] === '1';
}
/**
* Check if a request is for a common static asset that should be ignored by default.
*
* Only exported for tests.
*/
function isStaticAssetRequest(urlPath) {
const path = stripUrlQueryAndFragment(urlPath);
// Common static file extensions
if (path.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
return true;
}
// Common metadata files
if (path.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
return true;
}
return false;
}
function shouldIgnoreSpansForIncomingRequest(
request,
{
ignoreStaticAssets,
ignoreIncomingRequests,
}
,
) {
if (isTracingSuppressed(context.active())) {
return true;
}
// request.url is the only property that holds any information about the url
// it only consists of the URL path and query string (if any)
const urlPath = request.url;
const method = request.method?.toUpperCase();
// We do not capture OPTIONS/HEAD requests as spans
if (method === 'OPTIONS' || method === 'HEAD' || !urlPath) {
return true;
}
// Default static asset filtering
if (ignoreStaticAssets && method === 'GET' && isStaticAssetRequest(urlPath)) {
return true;
}
if (ignoreIncomingRequests?.(urlPath, request)) {
return true;
}
return false;
}
function getRequestContentLengthAttribute(request) {
const length = getContentLength(request.headers);
if (length == null) {
return {};
}
if (isCompressed(request.headers)) {
return {
['http.request_content_length']: length,
};
} else {
return {
['http.request_content_length_uncompressed']: length,
};
}
}
function getContentLength(headers) {
const contentLengthHeader = headers['content-length'];
if (contentLengthHeader === undefined) return null;
const contentLength = parseInt(contentLengthHeader, 10);
if (isNaN(contentLength)) return null;
return contentLength;
}
function isCompressed(headers) {
const encoding = headers['content-encoding'];
return !!encoding && encoding !== 'identity';
}
function getIncomingRequestAttributesOnResponse(request, response) {
// take socket from the request,
// since it may be detached from the response object in keep-alive mode
const { socket } = request;
const { statusCode, statusMessage } = response;
const newAttributes = {
[ATTR_HTTP_RESPONSE_STATUS_CODE]: statusCode,
// eslint-disable-next-line deprecation/deprecation
[SEMATTRS_HTTP_STATUS_CODE]: statusCode,
'http.status_text': statusMessage?.toUpperCase(),
};
const rpcMetadata = getRPCMetadata(context.active());
if (socket) {
const { localAddress, localPort, remoteAddress, remotePort } = socket;
// eslint-disable-next-line deprecation/deprecation
newAttributes[SEMATTRS_NET_HOST_IP] = localAddress;
// eslint-disable-next-line deprecation/deprecation
newAttributes[SEMATTRS_NET_HOST_PORT] = localPort;
// eslint-disable-next-line deprecation/deprecation
newAttributes[SEMATTRS_NET_PEER_IP] = remoteAddress;
newAttributes['net.peer.port'] = remotePort;
}
// eslint-disable-next-line deprecation/deprecation
newAttributes[SEMATTRS_HTTP_STATUS_CODE] = statusCode;
newAttributes['http.status_text'] = (statusMessage || '').toUpperCase();
if (rpcMetadata?.type === RPCType.HTTP && rpcMetadata.route !== undefined) {
const routeName = rpcMetadata.route;
newAttributes[ATTR_HTTP_ROUTE] = routeName;
}
return newAttributes;
}
/**
* If the given status code should be filtered for the given list of status codes/ranges.
*/
function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
return dropForStatusCodes.some(code => {
if (typeof code === 'number') {
return code === statusCode;
}
const [min, max] = code;
return statusCode >= min && statusCode <= max;
});
}
export { httpServerSpansIntegration, isStaticAssetRequest };
//# sourceMappingURL=httpServerSpansIntegration.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"tracer.js","sourceRoot":"","sources":["../../../src/trace/tracer.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\nimport { Context } from '../context/types';\nimport { Span } from './span';\nimport { SpanOptions } from './SpanOptions';\n\n/**\n * Tracer provides an interface for creating {@link Span}s.\n */\nexport interface Tracer {\n /**\n * Starts a new {@link Span}. Start the span without setting it on context.\n *\n * This method do NOT modify the current Context.\n *\n * @param name The name of the span\n * @param [options] SpanOptions used for span creation\n * @param [context] Context to use to extract parent\n * @returns Span The newly created span\n * @example\n * const span = tracer.startSpan('op');\n * span.setAttribute('key', 'value');\n * span.end();\n */\n startSpan(name: string, options?: SpanOptions, context?: Context): Span;\n\n /**\n * Starts a new {@link Span} and calls the given function passing it the\n * created span as first argument.\n * Additionally the new span gets set in context and this context is activated\n * for the duration of the function call.\n *\n * @param name The name of the span\n * @param [options] SpanOptions used for span creation\n * @param [context] Context to use to extract parent\n * @param fn function called in the context of the span and receives the newly created span as an argument\n * @returns return value of fn\n * @example\n * const something = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * span.setStatus({code: SpanStatusCode.OK});\n * return something;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * } finally {\n * span.end();\n * }\n * });\n *\n * @example\n * const span = tracer.startActiveSpan('op', span => {\n * try {\n * do some work\n * return span;\n * } catch (err) {\n * span.setStatus({\n * code: SpanStatusCode.ERROR,\n * message: err.message,\n * });\n * throw err;\n * }\n * });\n * do some more work\n * span.end();\n */\n startActiveSpan<F extends (span: Span) => unknown>(\n name: string,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: Span) => unknown>(\n name: string,\n options: SpanOptions,\n fn: F\n ): ReturnType<F>;\n startActiveSpan<F extends (span: Span) => unknown>(\n name: string,\n options: SpanOptions,\n context: Context,\n fn: F\n ): ReturnType<F>;\n}\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"dateLocales.d.ts","sourceRoot":"","sources":["../../src/utilities/dateLocales.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BvB,CAAA"}

View File

@@ -0,0 +1,13 @@
"use strict";
var _get_prototype_of = require("./_get_prototype_of.cjs");
function _super_prop_base(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = _get_prototype_of._(object);
if (object === null) break;
}
return object;
}
exports._ = _super_prop_base;

View File

@@ -0,0 +1,140 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchPatternFn.cjs");
var _index2 = require("../../_lib/buildMatchFn.cjs");
const matchOrdinalNumberPattern = /^(\d+)(-?a)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^([ap]k)/i,
abbreviated: /^([ap]\.?\s?k\.?\s?e\.?)/i,
wide: /^((antaǔ |post )?komuna erao)/i,
};
const parseEraPatterns = {
any: [/^a/i, /^[kp]/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^k[1234]/i,
wide: /^[1234](-?a)? kvaronjaro/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[jfmasond]/i,
abbreviated: /^(jan|feb|mar|apr|maj|jun|jul|a(ŭ|ux|uh|u)g|sep|okt|nov|dec)/i,
wide: /^(januaro|februaro|marto|aprilo|majo|junio|julio|a(ŭ|ux|uh|u)gusto|septembro|oktobro|novembro|decembro)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^a/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^maj/i,
/^jun/i,
/^jul/i,
/^a(u|ŭ)/i,
/^s/i,
/^o/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[dlmĵjvs]/i,
short: /^(di|lu|ma|me|(ĵ|jx|jh|j)a|ve|sa)/i,
abbreviated: /^(dim|lun|mar|mer|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)|ven|sab)/i,
wide: /^(diman(ĉ|cx|ch|c)o|lundo|mardo|merkredo|(ĵ|jx|jh|j)a(ŭ|ux|uh|u)do|vendredo|sabato)/i,
};
const parseDayPatterns = {
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^(j|ĵ)/i, /^v/i, /^s/i],
any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^(j|ĵ)/i, /^v/i, /^s/i],
};
const matchDayPeriodPatterns = {
narrow: /^([ap]|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,
abbreviated:
/^([ap][.\s]?t[.\s]?m[.\s]?|(posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo])/i,
wide: /^(anta(ŭ|ux)tagmez|posttagmez|noktomez|tagmez|maten|vesper|nokt)[eo]/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^noktom/i,
noon: /^t/i,
morning: /^m/i,
afternoon: /^posttagmeze/i,
evening: /^v/i,
night: /^n/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function (value) {
return parseInt(value, 10);
},
}),
era: (0, _index2.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index2.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function (index) {
return index + 1;
},
}),
month: (0, _index2.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,12 @@
import { Mechanism } from './mechanism';
import { Stacktrace } from './stacktrace';
/** JSDoc */
export interface Exception {
type?: string;
value?: string;
mechanism?: Mechanism;
module?: string;
thread_id?: number | string;
stacktrace?: Stacktrace;
}
//# sourceMappingURL=exception.d.ts.map

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/animated/index.js";
export { _default as default } from "./react-select-animated.cjs.default.js";
//# sourceMappingURL=react-select-animated.cjs.d.mts.map

View File

@@ -0,0 +1,399 @@
'use strict'
const { Transform } = require('node:stream')
const { isASCIINumber, isValidLastEventId } = require('./util')
/**
* @type {number[]} BOM
*/
const BOM = [0xEF, 0xBB, 0xBF]
/**
* @type {10} LF
*/
const LF = 0x0A
/**
* @type {13} CR
*/
const CR = 0x0D
/**
* @type {58} COLON
*/
const COLON = 0x3A
/**
* @type {32} SPACE
*/
const SPACE = 0x20
/**
* @typedef {object} EventSourceStreamEvent
* @type {object}
* @property {string} [event] The event type.
* @property {string} [data] The data of the message.
* @property {string} [id] A unique ID for the event.
* @property {string} [retry] The reconnection time, in milliseconds.
*/
/**
* @typedef eventSourceSettings
* @type {object}
* @property {string} [lastEventId] The last event ID received from the server.
* @property {string} [origin] The origin of the event source.
* @property {number} [reconnectionTime] The reconnection time, in milliseconds.
*/
class EventSourceStream extends Transform {
/**
* @type {eventSourceSettings}
*/
state
/**
* Leading byte-order-mark check.
* @type {boolean}
*/
checkBOM = true
/**
* @type {boolean}
*/
crlfCheck = false
/**
* @type {boolean}
*/
eventEndCheck = false
/**
* @type {Buffer|null}
*/
buffer = null
pos = 0
event = {
data: undefined,
event: undefined,
id: undefined,
retry: undefined
}
/**
* @param {object} options
* @param {boolean} [options.readableObjectMode]
* @param {eventSourceSettings} [options.eventSourceSettings]
* @param {(chunk: any, encoding?: BufferEncoding | undefined) => boolean} [options.push]
*/
constructor (options = {}) {
// Enable object mode as EventSourceStream emits objects of shape
// EventSourceStreamEvent
options.readableObjectMode = true
super(options)
this.state = options.eventSourceSettings || {}
if (options.push) {
this.push = options.push
}
}
/**
* @param {Buffer} chunk
* @param {string} _encoding
* @param {Function} callback
* @returns {void}
*/
_transform (chunk, _encoding, callback) {
if (chunk.length === 0) {
callback()
return
}
// Cache the chunk in the buffer, as the data might not be complete while
// processing it
// TODO: Investigate if there is a more performant way to handle
// incoming chunks
// see: https://github.com/nodejs/undici/issues/2630
if (this.buffer) {
this.buffer = Buffer.concat([this.buffer, chunk])
} else {
this.buffer = chunk
}
// Strip leading byte-order-mark if we opened the stream and started
// the processing of the incoming data
if (this.checkBOM) {
switch (this.buffer.length) {
case 1:
// Check if the first byte is the same as the first byte of the BOM
if (this.buffer[0] === BOM[0]) {
// If it is, we need to wait for more data
callback()
return
}
// Set the checkBOM flag to false as we don't need to check for the
// BOM anymore
this.checkBOM = false
// The buffer only contains one byte so we need to wait for more data
callback()
return
case 2:
// Check if the first two bytes are the same as the first two bytes
// of the BOM
if (
this.buffer[0] === BOM[0] &&
this.buffer[1] === BOM[1]
) {
// If it is, we need to wait for more data, because the third byte
// is needed to determine if it is the BOM or not
callback()
return
}
// Set the checkBOM flag to false as we don't need to check for the
// BOM anymore
this.checkBOM = false
break
case 3:
// Check if the first three bytes are the same as the first three
// bytes of the BOM
if (
this.buffer[0] === BOM[0] &&
this.buffer[1] === BOM[1] &&
this.buffer[2] === BOM[2]
) {
// If it is, we can drop the buffered data, as it is only the BOM
this.buffer = Buffer.alloc(0)
// Set the checkBOM flag to false as we don't need to check for the
// BOM anymore
this.checkBOM = false
// Await more data
callback()
return
}
// If it is not the BOM, we can start processing the data
this.checkBOM = false
break
default:
// The buffer is longer than 3 bytes, so we can drop the BOM if it is
// present
if (
this.buffer[0] === BOM[0] &&
this.buffer[1] === BOM[1] &&
this.buffer[2] === BOM[2]
) {
// Remove the BOM from the buffer
this.buffer = this.buffer.subarray(3)
}
// Set the checkBOM flag to false as we don't need to check for the
this.checkBOM = false
break
}
}
while (this.pos < this.buffer.length) {
// If the previous line ended with an end-of-line, we need to check
// if the next character is also an end-of-line.
if (this.eventEndCheck) {
// If the the current character is an end-of-line, then the event
// is finished and we can process it
// If the previous line ended with a carriage return, we need to
// check if the current character is a line feed and remove it
// from the buffer.
if (this.crlfCheck) {
// If the current character is a line feed, we can remove it
// from the buffer and reset the crlfCheck flag
if (this.buffer[this.pos] === LF) {
this.buffer = this.buffer.subarray(this.pos + 1)
this.pos = 0
this.crlfCheck = false
// It is possible that the line feed is not the end of the
// event. We need to check if the next character is an
// end-of-line character to determine if the event is
// finished. We simply continue the loop to check the next
// character.
// As we removed the line feed from the buffer and set the
// crlfCheck flag to false, we basically don't make any
// distinction between a line feed and a carriage return.
continue
}
this.crlfCheck = false
}
if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {
// If the current character is a carriage return, we need to
// set the crlfCheck flag to true, as we need to check if the
// next character is a line feed so we can remove it from the
// buffer
if (this.buffer[this.pos] === CR) {
this.crlfCheck = true
}
this.buffer = this.buffer.subarray(this.pos + 1)
this.pos = 0
if (
this.event.data !== undefined || this.event.event || this.event.id !== undefined || this.event.retry) {
this.processEvent(this.event)
}
this.clearEvent()
continue
}
// If the current character is not an end-of-line, then the event
// is not finished and we have to reset the eventEndCheck flag
this.eventEndCheck = false
continue
}
// If the current character is an end-of-line, we can process the
// line
if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) {
// If the current character is a carriage return, we need to
// set the crlfCheck flag to true, as we need to check if the
// next character is a line feed
if (this.buffer[this.pos] === CR) {
this.crlfCheck = true
}
// In any case, we can process the line as we reached an
// end-of-line character
this.parseLine(this.buffer.subarray(0, this.pos), this.event)
// Remove the processed line from the buffer
this.buffer = this.buffer.subarray(this.pos + 1)
// Reset the position as we removed the processed line from the buffer
this.pos = 0
// A line was processed and this could be the end of the event. We need
// to check if the next line is empty to determine if the event is
// finished.
this.eventEndCheck = true
continue
}
this.pos++
}
callback()
}
/**
* @param {Buffer} line
* @param {EventSourceStreamEvent} event
*/
parseLine (line, event) {
// If the line is empty (a blank line)
// Dispatch the event, as defined below.
// This will be handled in the _transform method
if (line.length === 0) {
return
}
// If the line starts with a U+003A COLON character (:)
// Ignore the line.
const colonPosition = line.indexOf(COLON)
if (colonPosition === 0) {
return
}
let field = ''
let value = ''
// If the line contains a U+003A COLON character (:)
if (colonPosition !== -1) {
// Collect the characters on the line before the first U+003A COLON
// character (:), and let field be that string.
// TODO: Investigate if there is a more performant way to extract the
// field
// see: https://github.com/nodejs/undici/issues/2630
field = line.subarray(0, colonPosition).toString('utf8')
// Collect the characters on the line after the first U+003A COLON
// character (:), and let value be that string.
// If value starts with a U+0020 SPACE character, remove it from value.
let valueStart = colonPosition + 1
if (line[valueStart] === SPACE) {
++valueStart
}
// TODO: Investigate if there is a more performant way to extract the
// value
// see: https://github.com/nodejs/undici/issues/2630
value = line.subarray(valueStart).toString('utf8')
// Otherwise, the string is not empty but does not contain a U+003A COLON
// character (:)
} else {
// Process the field using the steps described below, using the whole
// line as the field name, and the empty string as the field value.
field = line.toString('utf8')
value = ''
}
// Modify the event with the field name and value. The value is also
// decoded as UTF-8
switch (field) {
case 'data':
if (event[field] === undefined) {
event[field] = value
} else {
event[field] += `\n${value}`
}
break
case 'retry':
if (isASCIINumber(value)) {
event[field] = value
}
break
case 'id':
if (isValidLastEventId(value)) {
event[field] = value
}
break
case 'event':
if (value.length > 0) {
event[field] = value
}
break
}
}
/**
* @param {EventSourceStreamEvent} event
*/
processEvent (event) {
if (event.retry && isASCIINumber(event.retry)) {
this.state.reconnectionTime = parseInt(event.retry, 10)
}
if (event.id !== undefined && isValidLastEventId(event.id)) {
this.state.lastEventId = event.id
}
// only dispatch event, when data is provided
if (event.data !== undefined) {
this.push({
type: event.event || 'message',
options: {
data: event.data,
lastEventId: this.state.lastEventId,
origin: this.state.origin
}
})
}
}
clearEvent () {
this.event = {
data: undefined,
event: undefined,
id: undefined,
retry: undefined
}
}
}
module.exports = {
EventSourceStream
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"ttfb.d.ts","sourceRoot":"","sources":["../../../../../src/metrics/web-vitals/types/ttfb.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,MAAM;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,2BAA2B,EAAE,CAAC;CACxC;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;;OAKG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,eAAe,CAAC,EAAE,2BAA2B,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,UAAU;IAC3D,WAAW,EAAE,eAAe,CAAC;CAC9B"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"folders.cjs","names":[],"sources":["../../../../src/rest/commands/read/folders.ts"],"sourcesContent":["import type { DirectusFolder } from '../../../schema/folder.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadFolderOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusFolder<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * List all folders that exist in Directus.\n * @param query The query parameters\n * @returns An array of up to limit folder objects. If no items are available, data will be an empty array.\n */\nexport const readFolders =\n\t<Schema, const TQuery extends Query<Schema, DirectusFolder<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadFolderOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/folders`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing folder by primary key.\n * @param key The primary key of the dashboard\n * @param query The query parameters\n * @returns Returns a folder object if a valid primary key was provided.\n * @throws Will throw if key is empty\n */\nexport const readFolder =\n\t<Schema, const TQuery extends Query<Schema, DirectusFolder<Schema>>>(\n\t\tkey: DirectusFolder<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadFolderOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/folders/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"kDAgBa,EAEX,QAEM,CACN,KAAM,WACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASW,GAEX,EACA,SAGA,EAAA,aAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,YAAY,IAClB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}

View File

@@ -0,0 +1,96 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = isReferenced;
function isReferenced(node, parent, grandparent) {
switch (parent.type) {
case "MemberExpression":
case "OptionalMemberExpression":
if (parent.property === node) {
return !!parent.computed;
}
return parent.object === node;
case "JSXMemberExpression":
return parent.object === node;
case "VariableDeclarator":
return parent.init === node;
case "ArrowFunctionExpression":
return parent.body === node;
case "PrivateName":
return false;
case "ClassMethod":
case "ClassPrivateMethod":
case "ObjectMethod":
if (parent.key === node) {
return !!parent.computed;
}
return false;
case "ObjectProperty":
if (parent.key === node) {
return !!parent.computed;
}
return (grandparent == null ? void 0 : grandparent.type) !== "ObjectPattern";
case "ClassProperty":
case "ClassAccessorProperty":
if (parent.key === node) {
return !!parent.computed;
}
return true;
case "ClassPrivateProperty":
return parent.key !== node;
case "ClassDeclaration":
case "ClassExpression":
return parent.superClass === node;
case "AssignmentExpression":
return parent.right === node;
case "AssignmentPattern":
return parent.right === node;
case "LabeledStatement":
return false;
case "CatchClause":
return false;
case "RestElement":
return false;
case "BreakStatement":
case "ContinueStatement":
return false;
case "FunctionDeclaration":
case "FunctionExpression":
return false;
case "ExportNamespaceSpecifier":
case "ExportDefaultSpecifier":
return false;
case "ExportSpecifier":
if (grandparent != null && grandparent.source) {
return false;
}
return parent.local === node;
case "ImportDefaultSpecifier":
case "ImportNamespaceSpecifier":
case "ImportSpecifier":
return false;
case "ImportAttribute":
return false;
case "JSXAttribute":
return false;
case "ObjectPattern":
case "ArrayPattern":
return false;
case "MetaProperty":
return false;
case "ObjectTypeProperty":
return parent.key !== node;
case "TSEnumMember":
return parent.id !== node;
case "TSPropertySignature":
if (parent.key === node) {
return !!parent.computed;
}
return true;
}
return true;
}
//# sourceMappingURL=isReferenced.js.map

View File

@@ -0,0 +1,23 @@
/**
* If there is an incoming row id,
* and it matches the existing sibling doc id,
* this is an existing row, so it should be merged.
* Otherwise, return an empty object.
*/ export const getExistingRowDoc = (incomingRow, existingRows)=>{
if (incomingRow.id && Array.isArray(existingRows)) {
const matchedExistingRow = existingRows.find((existingRow)=>{
if (typeof existingRow === 'object' && 'id' in existingRow) {
if (existingRow.id === incomingRow.id) {
return existingRow;
}
}
return false;
});
if (matchedExistingRow) {
return matchedExistingRow;
}
}
return {};
};
//# sourceMappingURL=getExistingRowDoc.js.map

View File

@@ -0,0 +1,6 @@
import type { GenerationFunctionContext } from '../common/types';
/**
* Wraps a generation function (e.g. generateMetadata) with Sentry error instrumentation.
*/
export declare function wrapGenerationFunctionWithSentry<F extends (...args: any[]) => any>(generationFunction: F, context: GenerationFunctionContext): F;
//# sourceMappingURL=wrapGenerationFunctionWithSentry.d.ts.map

View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _toConsumableArray;
var _arrayWithoutHoles = require("./arrayWithoutHoles.js");
var _iterableToArray = require("./iterableToArray.js");
var _unsupportedIterableToArray = require("./unsupportedIterableToArray.js");
var _nonIterableSpread = require("./nonIterableSpread.js");
function _toConsumableArray(arr) {
return (0, _arrayWithoutHoles.default)(arr) || (0, _iterableToArray.default)(arr) || (0, _unsupportedIterableToArray.default)(arr) || (0, _nonIterableSpread.default)();
}
//# sourceMappingURL=toConsumableArray.js.map

View File

@@ -0,0 +1,2 @@
export * from './exports';
//# sourceMappingURL=index.bundle.base.d.ts.map

View File

@@ -0,0 +1,47 @@
{
"name": "@selderee/plugin-htmlparser2",
"version": "0.11.0",
"description": "selderee plugin - selectors decision tree builder for htmlparser2 DOM.",
"keywords": [
"htmlparser2",
"selderee",
"plugin",
"selderee plugin"
],
"repository": {
"type": "git",
"url": "git+https://github.com/mxxii/selderee.git"
},
"bugs": {
"url": "https://github.com/mxxii/selderee/issues"
},
"homepage": "https://github.com/mxxii/selderee",
"author": "KillyMXI",
"funding": "https://ko-fi.com/killymxi",
"license": "MIT",
"exports": {
"import": "./lib/hp2-builder.mjs",
"require": "./lib/hp2-builder.cjs"
},
"type": "module",
"main": "./lib/hp2-builder.cjs",
"module": "./lib/hp2-builder.mjs",
"types": "./lib/hp2-builder.d.ts",
"typedocMain": "./src/hp2-builder.ts",
"files": [
"lib"
],
"scripts": {
"build:rollup": "rollup -c",
"build:types": "tsc -d --emitDeclarationOnly --declarationDir ./lib",
"build": "npm run clean && npm run build:rollup && npm run build:types",
"clean": "rimraf lib"
},
"dependencies": {
"domhandler": "^5.0.3",
"selderee": "^0.11.0"
},
"devDependencies": {
"htmlparser2": "^8.0.1"
}
}

View File

@@ -0,0 +1,532 @@
function _typeof(o) {"@babel/helpers - typeof";return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {return typeof o;} : function (o) {return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;}, _typeof(o);}function ownKeys(e, r) {var t = Object.keys(e);if (Object.getOwnPropertySymbols) {var o = Object.getOwnPropertySymbols(e);r && (o = o.filter(function (r) {return Object.getOwnPropertyDescriptor(e, r).enumerable;})), t.push.apply(t, o);}return t;}function _objectSpread(e) {for (var r = 1; r < arguments.length; r++) {var t = null != arguments[r] ? arguments[r] : {};r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {_defineProperty(e, r, t[r]);}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));});}return e;}function _defineProperty(obj, key, value) {key = _toPropertyKey(key);if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toPropertyKey(t) {var i = _toPrimitive(t, "string");return "symbol" == _typeof(i) ? i : String(i);}function _toPrimitive(t, r) {if ("object" != _typeof(t) || !t) return t;var e = t[Symbol.toPrimitive];if (void 0 !== e) {var i = e.call(t, r || "default");if ("object" != _typeof(i)) return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return ("string" === r ? String : Number)(t);}(function (_window$dateFns) {var __defProp = Object.defineProperty;
var __export = function __export(target, all) {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: function set(newValue) {return all[name] = function () {return newValue;};}
});
};
// lib/locale/zh-HK/_lib/formatDistance.mjs
var formatDistanceLocale = {
lessThanXSeconds: {
one: "\u5C11\u65BC 1 \u79D2",
other: "\u5C11\u65BC {{count}} \u79D2"
},
xSeconds: {
one: "1 \u79D2",
other: "{{count}} \u79D2"
},
halfAMinute: "\u534A\u5206\u9418",
lessThanXMinutes: {
one: "\u5C11\u65BC 1 \u5206\u9418",
other: "\u5C11\u65BC {{count}} \u5206\u9418"
},
xMinutes: {
one: "1 \u5206\u9418",
other: "{{count}} \u5206\u9418"
},
xHours: {
one: "1 \u5C0F\u6642",
other: "{{count}} \u5C0F\u6642"
},
aboutXHours: {
one: "\u5927\u7D04 1 \u5C0F\u6642",
other: "\u5927\u7D04 {{count}} \u5C0F\u6642"
},
xDays: {
one: "1 \u5929",
other: "{{count}} \u5929"
},
aboutXWeeks: {
one: "\u5927\u7D04 1 \u500B\u661F\u671F",
other: "\u5927\u7D04 {{count}} \u500B\u661F\u671F"
},
xWeeks: {
one: "1 \u500B\u661F\u671F",
other: "{{count}} \u500B\u661F\u671F"
},
aboutXMonths: {
one: "\u5927\u7D04 1 \u500B\u6708",
other: "\u5927\u7D04 {{count}} \u500B\u6708"
},
xMonths: {
one: "1 \u500B\u6708",
other: "{{count}} \u500B\u6708"
},
aboutXYears: {
one: "\u5927\u7D04 1 \u5E74",
other: "\u5927\u7D04 {{count}} \u5E74"
},
xYears: {
one: "1 \u5E74",
other: "{{count}} \u5E74"
},
overXYears: {
one: "\u8D85\u904E 1 \u5E74",
other: "\u8D85\u904E {{count}} \u5E74"
},
almostXYears: {
one: "\u5C07\u8FD1 1 \u5E74",
other: "\u5C07\u8FD1 {{count}} \u5E74"
}
};
var formatDistance = function formatDistance(token, count, options) {
var result;
var tokenValue = formatDistanceLocale[token];
if (typeof tokenValue === "string") {
result = tokenValue;
} else if (count === 1) {
result = tokenValue.one;
} else {
result = tokenValue.other.replace("{{count}}", String(count));
}
if (options !== null && options !== void 0 && options.addSuffix) {
if (options.comparison && options.comparison > 0) {
return result + "\u5167";
} else {
return result + "\u524D";
}
}
return result;
};
// lib/locale/_lib/buildFormatLongFn.mjs
function buildFormatLongFn(args) {
return function () {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var width = options.width ? String(options.width) : args.defaultWidth;
var format = args.formats[width] || args.formats[args.defaultWidth];
return format;
};
}
// lib/locale/zh-HK/_lib/formatLong.mjs
var dateFormats = {
full: "y'\u5E74'M'\u6708'd'\u65E5' EEEE",
long: "y'\u5E74'M'\u6708'd'\u65E5'",
medium: "yyyy-MM-dd",
short: "yy-MM-dd"
};
var timeFormats = {
full: "zzzz a h:mm:ss",
long: "z a h:mm:ss",
medium: "a h:mm:ss",
short: "a h:mm"
};
var dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}"
};
var formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full"
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full"
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full"
})
};
// lib/locale/zh-HK/_lib/formatRelative.mjs
var formatRelativeLocale = {
lastWeek: "'\u4E0A\u500B'eeee p",
yesterday: "'\u6628\u5929' p",
today: "'\u4ECA\u5929' p",
tomorrow: "'\u660E\u5929' p",
nextWeek: "'\u4E0B\u500B'eeee p",
other: "P"
};
var formatRelative = function formatRelative(token, _date, _baseDate, _options) {return formatRelativeLocale[token];};
// lib/locale/_lib/buildLocalizeFn.mjs
function buildLocalizeFn(args) {
return function (value, options) {
var context = options !== null && options !== void 0 && options.context ? String(options.context) : "standalone";
var valuesArray;
if (context === "formatting" && args.formattingValues) {
var defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
var width = options !== null && options !== void 0 && options.width ? String(options.width) : defaultWidth;
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
} else {
var _defaultWidth = args.defaultWidth;
var _width = options !== null && options !== void 0 && options.width ? String(options.width) : args.defaultWidth;
valuesArray = args.values[_width] || args.values[_defaultWidth];
}
var index = args.argumentCallback ? args.argumentCallback(value) : value;
return valuesArray[index];
};
}
// lib/locale/zh-HK/_lib/localize.mjs
var eraValues = {
narrow: ["\u524D", "\u516C\u5143"],
abbreviated: ["\u524D", "\u516C\u5143"],
wide: ["\u516C\u5143\u524D", "\u516C\u5143"]
};
var quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["\u7B2C\u4E00\u5B63", "\u7B2C\u4E8C\u5B63", "\u7B2C\u4E09\u5B63", "\u7B2C\u56DB\u5B63"],
wide: ["\u7B2C\u4E00\u5B63\u5EA6", "\u7B2C\u4E8C\u5B63\u5EA6", "\u7B2C\u4E09\u5B63\u5EA6", "\u7B2C\u56DB\u5B63\u5EA6"]
};
var monthValues = {
narrow: [
"\u4E00",
"\u4E8C",
"\u4E09",
"\u56DB",
"\u4E94",
"\u516D",
"\u4E03",
"\u516B",
"\u4E5D",
"\u5341",
"\u5341\u4E00",
"\u5341\u4E8C"],
abbreviated: [
"1\u6708",
"2\u6708",
"3\u6708",
"4\u6708",
"5\u6708",
"6\u6708",
"7\u6708",
"8\u6708",
"9\u6708",
"10\u6708",
"11\u6708",
"12\u6708"],
wide: [
"\u4E00\u6708",
"\u4E8C\u6708",
"\u4E09\u6708",
"\u56DB\u6708",
"\u4E94\u6708",
"\u516D\u6708",
"\u4E03\u6708",
"\u516B\u6708",
"\u4E5D\u6708",
"\u5341\u6708",
"\u5341\u4E00\u6708",
"\u5341\u4E8C\u6708"]
};
var dayValues = {
narrow: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
short: ["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
abbreviated: ["\u9031\u65E5", "\u9031\u4E00", "\u9031\u4E8C", "\u9031\u4E09", "\u9031\u56DB", "\u9031\u4E94", "\u9031\u516D"],
wide: ["\u661F\u671F\u65E5", "\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D"]
};
var dayPeriodValues = {
narrow: {
am: "\u4E0A",
pm: "\u4E0B",
midnight: "\u5348\u591C",
noon: "\u664C",
morning: "\u65E9",
afternoon: "\u5348",
evening: "\u665A",
night: "\u591C"
},
abbreviated: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u5348\u591C",
noon: "\u4E2D\u5348",
morning: "\u4E0A\u5348",
afternoon: "\u4E0B\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u665A"
},
wide: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u5348\u591C",
noon: "\u4E2D\u5348",
morning: "\u4E0A\u5348",
afternoon: "\u4E0B\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u665A"
}
};
var formattingDayPeriodValues = {
narrow: {
am: "\u4E0A",
pm: "\u4E0B",
midnight: "\u5348\u591C",
noon: "\u664C",
morning: "\u65E9",
afternoon: "\u5348",
evening: "\u665A",
night: "\u591C"
},
abbreviated: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u5348\u591C",
noon: "\u4E2D\u5348",
morning: "\u4E0A\u5348",
afternoon: "\u4E0B\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u665A"
},
wide: {
am: "\u4E0A\u5348",
pm: "\u4E0B\u5348",
midnight: "\u5348\u591C",
noon: "\u4E2D\u5348",
morning: "\u4E0A\u5348",
afternoon: "\u4E0B\u5348",
evening: "\u665A\u4E0A",
night: "\u591C\u665A"
}
};
var ordinalNumber = function ordinalNumber(dirtyNumber, options) {
var number = Number(dirtyNumber);
switch (options === null || options === void 0 ? void 0 : options.unit) {
case "date":
return number + "\u65E5";
case "hour":
return number + "\u6642";
case "minute":
return number + "\u5206";
case "second":
return number + "\u79D2";
default:
return "\u7B2C " + number;
}
};
var localize = {
ordinalNumber: ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide"
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: function argumentCallback(quarter) {return quarter - 1;}
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide"
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide"
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide"
})
};
// lib/locale/_lib/buildMatchFn.mjs
function buildMatchFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var width = options.width;
var matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
var matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
var matchedString = matchResult[0];
var parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
var key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, function (pattern) {return pattern.test(matchedString);}) : findKey(parsePatterns, function (pattern) {return pattern.test(matchedString);});
var value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
var findKey = function findKey(object, predicate) {
for (var key in object) {
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
return key;
}
}
return;
};
var findIndex = function findIndex(array, predicate) {
for (var key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return;
};
// lib/locale/_lib/buildMatchPatternFn.mjs
function buildMatchPatternFn(args) {
return function (string) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var matchResult = string.match(args.matchPattern);
if (!matchResult)
return null;
var matchedString = matchResult[0];
var parseResult = string.match(args.parsePattern);
if (!parseResult)
return null;
var value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
value = options.valueCallback ? options.valueCallback(value) : value;
var rest = string.slice(matchedString.length);
return { value: value, rest: rest };
};
}
// lib/locale/zh-HK/_lib/match.mjs
var matchOrdinalNumberPattern = /^(第\s*)?\d+(日|時|分|秒)?/i;
var parseOrdinalNumberPattern = /\d+/i;
var matchEraPatterns = {
narrow: /^(前)/i,
abbreviated: /^(前)/i,
wide: /^(公元前|公元)/i
};
var parseEraPatterns = {
any: [/^(前)/i, /^(公元)/i]
};
var matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^第[一二三四]季/i,
wide: /^第[一二三四]季度/i
};
var parseQuarterPatterns = {
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i]
};
var matchMonthPatterns = {
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i
};
var parseMonthPatterns = {
narrow: [
/^一/i,
/^二/i,
/^三/i,
/^四/i,
/^五/i,
/^六/i,
/^七/i,
/^八/i,
/^九/i,
/^十(?!(一|二))/i,
/^十一/i,
/^十二/i],
any: [
/^一|1/i,
/^二|2/i,
/^三|3/i,
/^四|4/i,
/^五|5/i,
/^六|6/i,
/^七|7/i,
/^八|8/i,
/^九|9/i,
/^十(?!(一|二))|10/i,
/^十一|11/i,
/^十二|12/i]
};
var matchDayPatterns = {
narrow: /^[一二三四五六日]/i,
short: /^[一二三四五六日]/i,
abbreviated: /^週[一二三四五六日]/i,
wide: /^星期[一二三四五六日]/i
};
var parseDayPatterns = {
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i]
};
var matchDayPeriodPatterns = {
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨)/i
};
var parseDayPeriodPatterns = {
any: {
am: /^上午?/i,
pm: /^下午?/i,
midnight: /^午夜/i,
noon: /^[中正]午/i,
morning: /^早上/i,
afternoon: /^下午/i,
evening: /^晚上?/i,
night: /^凌晨/i
}
};
var match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: function valueCallback(value) {return parseInt(value, 10);}
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any"
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: function valueCallback(index) {return index + 1;}
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any"
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any"
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any"
})
};
// lib/locale/zh-HK.mjs
var zhHK = {
code: "zh-HK",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 0,
firstWeekContainsDate: 1
}
};
// lib/locale/zh-HK/cdn.js
window.dateFns = _objectSpread(_objectSpread({},
window.dateFns), {}, {
locale: _objectSpread(_objectSpread({}, (_window$dateFns =
window.dateFns) === null || _window$dateFns === void 0 ? void 0 : _window$dateFns.locale), {}, {
zhHK: zhHK }) });
//# debugId=577879BF0C784FE264756e2164756e21
})();
//# sourceMappingURL=cdn.js.map

View File

@@ -0,0 +1,6 @@
export declare const formatRelativeWithOptions: import("./types.js").FPFn3<
string,
import("../formatRelative.js").FormatRelativeOptions | undefined,
string | number | Date,
string | number | Date
>;

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"elements.js","sourceRoot":"","sources":["../../../lib/vocabularies/jtd/elements.ts"],"names":[],"mappings":";;AAEA,6CAAoD;AACpD,kCAAqC;AACrC,mDAA4C;AAC5C,yCAAwC;AACxC,yCAAwC;AACxC,mCAAgD;AAIhD,MAAM,GAAG,GAA0B;IACjC,OAAO,EAAE,UAAU;IACnB,UAAU,EAAE,QAAQ;IACpB,KAAK,EAAE,IAAA,iBAAS,EAAC,OAAO,CAAC;IACzB,IAAI,CAAC,GAAe;QAClB,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAA;QAClB,MAAM,EAAC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAC,GAAG,GAAG,CAAA;QACnC,IAAI,IAAA,wBAAiB,EAAC,EAAE,EAAE,MAAM,CAAC;YAAE,OAAM;QACzC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAA,wBAAa,EAAC,GAAG,CAAC,CAAA;QAClC,GAAG,CAAC,EAAE,CAAC,IAAA,aAAG,EAAC,KAAK,CAAC,EAAE,GAAG,EAAE,CACtB,GAAG,CAAC,EAAE,CACJ,IAAA,WAAC,EAAA,iBAAiB,IAAI,GAAG,EACzB,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,IAAA,oBAAa,EAAC,GAAG,CAAC,CAAC,EAC3C,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,CAClB,CACF,CAAA;QACD,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,CAAA;IACf,CAAC;CACF,CAAA;AAED,kBAAe,GAAG,CAAA"}

View File

@@ -0,0 +1,76 @@
import type { WebFetchHeaders } from './webfetchapi';
type XHRSendInput = unknown;
export type ConsoleLevel = 'debug' | 'info' | 'warn' | 'error' | 'log' | 'assert' | 'trace';
export interface SentryWrappedXMLHttpRequest {
__sentry_xhr_v3__?: SentryXhrData;
__sentry_own_request__?: boolean;
__sentry_xhr_span_id__?: string;
setRequestHeader?: (key: string, val: string) => void;
getResponseHeader?: (key: string) => string | null;
}
export interface SentryXhrData {
method: string;
url: string;
status_code?: number;
body?: XHRSendInput;
request_body_size?: number;
response_body_size?: number;
request_headers: Record<string, string>;
}
export interface HandlerDataXhr {
xhr: SentryWrappedXMLHttpRequest;
startTimestamp?: number;
endTimestamp?: number;
error?: unknown;
virtualError?: unknown;
}
interface SentryFetchData {
method: string;
url: string;
request_body_size?: number;
response_body_size?: number;
__span?: string;
}
export interface HandlerDataFetch {
args: any[];
fetchData: SentryFetchData;
startTimestamp: number;
endTimestamp?: number;
response?: {
readonly ok: boolean;
readonly status: number;
readonly url: string;
headers: WebFetchHeaders;
};
error?: unknown;
virtualError?: unknown;
/** Headers that the user passed to the fetch request. */
headers?: WebFetchHeaders;
}
export interface HandlerDataDom {
event: object | {
target: object;
};
name: string;
global?: boolean;
}
export interface HandlerDataConsole {
level: ConsoleLevel;
args: any[];
}
export interface HandlerDataHistory {
/** The full URL of the previous page */
from: string | undefined;
/** The full URL of the new page */
to: string;
}
export interface HandlerDataError {
column?: number;
error?: Error;
line?: number;
msg: string | object;
url?: string;
}
export type HandlerDataUnhandledRejection = unknown;
export {};
//# sourceMappingURL=instrument.d.ts.map

View File

@@ -0,0 +1,5 @@
export { DocumentHeader } from '../elements/DocumentHeader/index.js';
export { Logo } from '../elements/Logo/index.js';
export { DefaultNav } from '../elements/Nav/index.js';
export { CollectionCards, FolderField, FolderTableCell } from '@payloadcms/ui/rsc';
//# sourceMappingURL=rsc.d.ts.map

View File

@@ -0,0 +1,9 @@
import type { Knex as KnexType } from 'knex';
import type { InferInsertModel, InferSelectModel, Table } from "../table.cjs";
declare module 'knex/types/tables.ts' {
type Knexify<T extends Table> = KnexType.CompositeTableType<InferSelectModel<T, {
dbColumnNames: true;
}>, InferInsertModel<T, {
dbColumnNames: true;
}>> & {};
}

View File

@@ -0,0 +1,12 @@
import { docAccessOperationGlobal, isolateObjectProperty } from 'payload';
export function docAccessResolver(global) {
async function resolver(_, context) {
return docAccessOperationGlobal({
globalConfig: global,
req: isolateObjectProperty(context.req, 'transactionID')
});
}
return resolver;
}
//# sourceMappingURL=docAccess.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"buildTime.d.ts","sourceRoot":"","sources":["../../../../src/config/withSentryConfig/buildTime.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAErE;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,cAAc,EAAE,gBAAgB,EAChC,iBAAiB,EAAE,kBAAkB,EACrC,WAAW,EAAE,MAAM,GAAG,SAAS,GAC9B,IAAI,CAuDN;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,SAAS,CAWnD;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,IAAI,MAAM,GAAG,IAAI,CAepE"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"carrier.js","sources":["../../src/carrier.ts"],"sourcesContent":["import type { AsyncContextStack } from './asyncContext/stackStrategy';\nimport type { AsyncContextStrategy } from './asyncContext/types';\nimport type { Client } from './client';\nimport type { Scope } from './scope';\nimport type { SerializedLog } from './types-hoist/log';\nimport type { SerializedMetric } from './types-hoist/metric';\nimport { SDK_VERSION } from './utils/version';\nimport { GLOBAL_OBJ } from './utils/worldwide';\n\n/**\n * An object that contains globally accessible properties and maintains a scope stack.\n * @hidden\n */\nexport interface Carrier {\n __SENTRY__?: VersionedCarrier;\n}\n\ntype VersionedCarrier = {\n version?: string;\n} & Record<Exclude<string, 'version'>, SentryCarrier>;\n\nexport interface SentryCarrier {\n acs?: AsyncContextStrategy;\n stack?: AsyncContextStack;\n\n globalScope?: Scope;\n defaultIsolationScope?: Scope;\n defaultCurrentScope?: Scope;\n loggerSettings?: { enabled: boolean };\n /**\n * A map of Sentry clients to their log buffers.\n * This is used to store logs that are sent to Sentry.\n */\n clientToLogBufferMap?: WeakMap<Client, Array<SerializedLog>>;\n\n /**\n * A map of Sentry clients to their metric buffers.\n * This is used to store metrics that are sent to Sentry.\n */\n clientToMetricBufferMap?: WeakMap<Client, Array<SerializedMetric>>;\n\n /** Overwrites TextEncoder used in `@sentry/core`, need for `react-native@0.73` and older */\n encodePolyfill?: (input: string) => Uint8Array;\n /** Overwrites TextDecoder used in `@sentry/core`, need for `react-native@0.73` and older */\n decodePolyfill?: (input: Uint8Array) => string;\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nexport function getMainCarrier(): Carrier {\n // This ensures a Sentry carrier exists\n getSentryCarrier(GLOBAL_OBJ);\n return GLOBAL_OBJ;\n}\n\n/** Will either get the existing sentry carrier, or create a new one. */\nexport function getSentryCarrier(carrier: Carrier): SentryCarrier {\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n\n // For now: First SDK that sets the .version property wins\n __SENTRY__.version = __SENTRY__.version || SDK_VERSION;\n\n // Intentionally populating and returning the version of \"this\" SDK instance\n // rather than what's set in .version so that \"this\" SDK always gets its carrier\n return (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__[]` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nexport function getGlobalSingleton<Prop extends keyof SentryCarrier>(\n name: Prop,\n creator: () => NonNullable<SentryCarrier[Prop]>,\n obj = GLOBAL_OBJ,\n): NonNullable<SentryCarrier[Prop]> {\n const __SENTRY__ = (obj.__SENTRY__ = obj.__SENTRY__ || {});\n const carrier = (__SENTRY__[SDK_VERSION] = __SENTRY__[SDK_VERSION] || {});\n // Note: We do not want to set `carrier.version` here, as this may be called before any `init` is called, e.g. for the default scopes\n return carrier[name] || (carrier[name] = creator());\n}\n"],"names":[],"mappings":";;;AASA;AACA;AACA;AACA;;AAmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,GAAY;AAC1C;AACA,EAAE,gBAAgB,CAAC,UAAU,CAAC;AAC9B,EAAE,OAAO,UAAU;AACnB;;AAEA;AACO,SAAS,gBAAgB,CAAC,OAAO,EAA0B;AAClE,EAAE,MAAM,UAAA,IAAc,OAAO,CAAC,UAAA,GAAa,OAAO,CAAC,UAAA,IAAc,EAAE,CAAC;;AAEpE;AACA,EAAE,UAAU,CAAC,OAAA,GAAU,UAAU,CAAC,OAAA,IAAW,WAAW;;AAExD;AACA;AACA,EAAE,QAAQ,UAAU,CAAC,WAAW,CAAA,GAAI,UAAU,CAAC,WAAW,CAAA,IAAK,EAAE;AACjE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB;AAClC,EAAE,IAAI;AACN,EAAE,OAAO;AACT,EAAE,GAAA,GAAM,UAAU;AAClB,EAAoC;AACpC,EAAE,MAAM,UAAA,IAAc,GAAG,CAAC,UAAA,GAAa,GAAG,CAAC,UAAA,IAAc,EAAE,CAAC;AAC5D,EAAE,MAAM,OAAA,IAAW,UAAU,CAAC,WAAW,CAAA,GAAI,UAAU,CAAC,WAAW,CAAA,IAAK,EAAE,CAAC;AAC3E;AACA,EAAE,OAAO,OAAO,CAAC,IAAI,MAAM,OAAO,CAAC,IAAI,CAAA,GAAI,OAAO,EAAE,CAAC;AACrD;;;;"}

View File

@@ -0,0 +1 @@
module.exports={C:{"105":0.00298,"115":0.0566,"124":0.00298,"140":0.00894,"143":0.01192,"145":0.30386,"146":0.37833,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 106 107 108 109 110 111 112 113 114 116 117 118 119 120 121 122 123 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 141 142 144 147 148 149 3.5 3.6"},D:{"79":0.08937,"87":0.01787,"103":0.00894,"109":0.0149,"112":0.00298,"116":0.00596,"117":0.00298,"122":0.07745,"125":0.00298,"126":0.00596,"128":0.0149,"130":0.00894,"131":0.00298,"132":0.00894,"134":0.00298,"135":0.00894,"138":0.05362,"139":0.01787,"140":0.05064,"141":0.13703,"142":6.93511,"143":11.87727,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 104 105 106 107 108 110 111 113 114 115 118 119 120 121 123 124 127 129 133 136 137 144 145 146"},F:{"124":0.01192,"125":0.00298,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"109":0.0149,"132":0.00298,"138":0.00596,"141":0.00596,"142":0.7805,"143":2.18361,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 133 134 135 136 137 139 140"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.3 16.4 16.5 17.0 17.5 18.0 26.3","14.1":0.00298,"15.6":0.02681,"16.2":0.00298,"16.6":0.04469,"17.1":0.03575,"17.2":0.00596,"17.3":0.01192,"17.4":0.00298,"17.6":0.13108,"18.1":0.00298,"18.2":0.17576,"18.3":0.06256,"18.4":0.00894,"18.5-18.6":0.11618,"26.0":0.05362,"26.1":0.20853,"26.2":0.02085},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00506,"5.0-5.1":0,"6.0-6.1":0.01012,"7.0-7.1":0.00759,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.02024,"10.0-10.2":0.00253,"10.3":0.03542,"11.0-11.2":0.43516,"11.3-11.4":0.01265,"12.0-12.1":0.01012,"12.2-12.5":0.11385,"13.0-13.1":0.00253,"13.2":0.01771,"13.3":0.00506,"13.4-13.7":0.01771,"14.0-14.4":0.03542,"14.5-14.8":0.03795,"15.0-15.1":0.04048,"15.2-15.3":0.03036,"15.4":0.03289,"15.5":0.03542,"15.6-15.8":0.54901,"16.0":0.06325,"16.1":0.12144,"16.2":0.06325,"16.3":0.11385,"16.4":0.02783,"16.5":0.04807,"16.6-16.7":0.71346,"17.0":0.04048,"17.1":0.06578,"17.2":0.04807,"17.3":0.07337,"17.4":0.12397,"17.5":0.24288,"17.6-17.7":0.56166,"18.0":0.1265,"18.1":0.26312,"18.2":0.13915,"18.3":0.45287,"18.4":0.23276,"18.5-18.7":16.71323,"26.0":0.32637,"26.1":2.7147,"26.2":0.51612,"26.3":0.02277},P:{"4":14.76856,"21":0.01007,"22":0.04027,"23":0.01007,"24":0.15101,"25":0.02013,"26":0.07047,"27":0.08054,"28":0.51343,"29":3.42284,_:"20 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},A:{_:"6 7 8 9 10 11 5.5"},K:{"0":0.0702,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{_:"0"},H:{"0":0},L:{"0":30.54032},R:{_:"0"},M:{"0":0.16848}};

View File

@@ -0,0 +1,187 @@
/* eslint-disable @typescript-eslint/no-empty-interface */
type StrictNullChecksWrapper<Name extends string, Type> = undefined extends null
? `strictNullChecks must be true in tsconfig to use ${Name}`
: Type
type UnionToIntersection<U> = (U extends any ? (_: U) => void : never) extends (_: infer I) => void
? I
: never
export type SomeJSONSchema = UncheckedJSONSchemaType<Known, true>
type UncheckedPartialSchema<T> = Partial<UncheckedJSONSchemaType<T, true>>
export type PartialSchema<T> = StrictNullChecksWrapper<"PartialSchema", UncheckedPartialSchema<T>>
type JSONType<T extends string, IsPartial extends boolean> = IsPartial extends true
? T | undefined
: T
interface NumberKeywords {
minimum?: number
maximum?: number
exclusiveMinimum?: number
exclusiveMaximum?: number
multipleOf?: number
format?: string
}
interface StringKeywords {
minLength?: number
maxLength?: number
pattern?: string
format?: string
}
type UncheckedJSONSchemaType<T, IsPartial extends boolean> = (
| // these two unions allow arbitrary unions of types
{
anyOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]
}
| {
oneOf: readonly UncheckedJSONSchemaType<T, IsPartial>[]
}
// this union allows for { type: (primitive)[] } style schemas
| ({
type: readonly (T extends number
? JSONType<"number" | "integer", IsPartial>
: T extends string
? JSONType<"string", IsPartial>
: T extends boolean
? JSONType<"boolean", IsPartial>
: never)[]
} & UnionToIntersection<
T extends number
? NumberKeywords
: T extends string
? StringKeywords
: T extends boolean
? // eslint-disable-next-line @typescript-eslint/ban-types
{}
: never
>)
// this covers "normal" types; it's last so typescript looks to it first for errors
| ((T extends number
? {
type: JSONType<"number" | "integer", IsPartial>
} & NumberKeywords
: T extends string
? {
type: JSONType<"string", IsPartial>
} & StringKeywords
: T extends boolean
? {
type: JSONType<"boolean", IsPartial>
}
: T extends readonly [any, ...any[]]
? {
// JSON AnySchema for tuple
type: JSONType<"array", IsPartial>
items: {
readonly [K in keyof T]-?: UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>
} & {length: T["length"]}
minItems: T["length"]
} & ({maxItems: T["length"]} | {additionalItems: false})
: T extends readonly any[]
? {
type: JSONType<"array", IsPartial>
items: UncheckedJSONSchemaType<T[0], false>
contains?: UncheckedPartialSchema<T[0]>
minItems?: number
maxItems?: number
minContains?: number
maxContains?: number
uniqueItems?: true
additionalItems?: never
}
: T extends Record<string, any>
? {
// JSON AnySchema for records and dictionaries
// "required" is not optional because it is often forgotten
// "properties" are optional for more concise dictionary schemas
// "patternProperties" and can be only used with interfaces that have string index
type: JSONType<"object", IsPartial>
additionalProperties?: boolean | UncheckedJSONSchemaType<T[string], false>
unevaluatedProperties?: boolean | UncheckedJSONSchemaType<T[string], false>
properties?: IsPartial extends true
? Partial<UncheckedPropertiesSchema<T>>
: UncheckedPropertiesSchema<T>
patternProperties?: Record<string, UncheckedJSONSchemaType<T[string], false>>
propertyNames?: Omit<UncheckedJSONSchemaType<string, false>, "type"> & {type?: "string"}
dependencies?: {[K in keyof T]?: readonly (keyof T)[] | UncheckedPartialSchema<T>}
dependentRequired?: {[K in keyof T]?: readonly (keyof T)[]}
dependentSchemas?: {[K in keyof T]?: UncheckedPartialSchema<T>}
minProperties?: number
maxProperties?: number
} & (IsPartial extends true // "required" is not necessary if it's a non-partial type with no required keys // are listed it only asserts that optional cannot be listed. // "required" type does not guarantee that all required properties
? {required: readonly (keyof T)[]}
: [UncheckedRequiredMembers<T>] extends [never]
? {required?: readonly UncheckedRequiredMembers<T>[]}
: {required: readonly UncheckedRequiredMembers<T>[]})
: T extends null
? {
type: JSONType<"null", IsPartial>
nullable: true
}
: never) & {
allOf?: readonly UncheckedPartialSchema<T>[]
anyOf?: readonly UncheckedPartialSchema<T>[]
oneOf?: readonly UncheckedPartialSchema<T>[]
if?: UncheckedPartialSchema<T>
then?: UncheckedPartialSchema<T>
else?: UncheckedPartialSchema<T>
not?: UncheckedPartialSchema<T>
})
) & {
[keyword: string]: any
$id?: string
$ref?: string
$defs?: Record<string, UncheckedJSONSchemaType<Known, true>>
definitions?: Record<string, UncheckedJSONSchemaType<Known, true>>
}
export type JSONSchemaType<T> = StrictNullChecksWrapper<
"JSONSchemaType",
UncheckedJSONSchemaType<T, false>
>
type Known =
| {[key: string]: Known}
| [Known, ...Known[]]
| Known[]
| number
| string
| boolean
| null
type UncheckedPropertiesSchema<T> = {
[K in keyof T]-?: (UncheckedJSONSchemaType<T[K], false> & Nullable<T[K]>) | {$ref: string}
}
export type PropertiesSchema<T> = StrictNullChecksWrapper<
"PropertiesSchema",
UncheckedPropertiesSchema<T>
>
type UncheckedRequiredMembers<T> = {
[K in keyof T]-?: undefined extends T[K] ? never : K
}[keyof T]
export type RequiredMembers<T> = StrictNullChecksWrapper<
"RequiredMembers",
UncheckedRequiredMembers<T>
>
type Nullable<T> = undefined extends T
? {
nullable: true
const?: null // any non-null value would fail `const: null`, `null` would fail any other value in const
enum?: readonly (T | null)[] // `null` must be explicitly included in "enum" for `null` to pass
default?: T | null
}
: {
nullable?: false
const?: T
enum?: readonly T[]
default?: T
}

View File

@@ -0,0 +1,134 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)(\.)?/i;
const parseOrdinalNumberPattern = /\d+(\.)?/i;
const matchEraPatterns = {
narrow: /^(f\.Kr\.|e\.Kr\.)/i,
abbreviated: /^(f\.Kr\.|e\.Kr\.)/i,
wide: /^(fyrir Krist|eftir Krist)/i,
};
const parseEraPatterns = {
any: [/^(f\.Kr\.)/i, /^(e\.Kr\.)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]\.?/i,
abbreviated: /^q[1234]\.?/i,
wide: /^[1234]\.? fjórðungur/i,
};
const parseQuarterPatterns = {
any: [/1\.?/i, /2\.?/i, /3\.?/i, /4\.?/i],
};
const matchMonthPatterns = {
narrow: /^[jfmásónd]/i,
abbreviated:
/^(jan\.|feb\.|mars\.|apríl\.|maí|júní|júlí|águst|sep\.|oct\.|nov\.|dec\.)/i,
wide: /^(januar|febrúar|mars|apríl|maí|júní|júlí|águst|september|október|nóvember|desember)/i,
};
const parseMonthPatterns = {
narrow: [
/^j/i,
/^f/i,
/^m/i,
/^a/i,
/^m/i,
/^j/i,
/^j/i,
/^á/i,
/^s/i,
/^ó/i,
/^n/i,
/^d/i,
],
any: [
/^ja/i,
/^f/i,
/^mar/i,
/^ap/i,
/^maí/i,
/^jún/i,
/^júl/i,
/^áu/i,
/^s/i,
/^ó/i,
/^n/i,
/^d/i,
],
};
const matchDayPatterns = {
narrow: /^[smtwf]/i,
short: /^(su|má|þr|mi|fi|fö|la)/i,
abbreviated: /^(sun|mán|þri|mið|fim|fös|lau)\.?/i,
wide: /^(sunnudagur|mánudagur|þriðjudagur|miðvikudagur|fimmtudagur|föstudagur|laugardagur)/i,
};
const parseDayPatterns = {
narrow: [/^s/i, /^m/i, /^þ/i, /^m/i, /^f/i, /^f/i, /^l/i],
any: [/^su/i, /^má/i, /^þr/i, /^mi/i, /^fi/i, /^fö/i, /^la/i],
};
const matchDayPeriodPatterns = {
narrow: /^(f|e|síðdegis|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i,
any: /^(fyrir hádegi|eftir hádegi|[ef]\.?h\.?|síðdegis|morgunn|(á|að|um) (morgni|kvöld|nótt|miðnætti))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^f/i,
pm: /^e/i,
midnight: /^mi/i,
noon: /^há/i,
morning: /morgunn/i,
afternoon: /síðdegi/i,
evening: /kvöld/i,
night: /nótt/i,
},
};
export const match = {
ordinalNumber: buildMatchPatternFn({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: buildMatchFn({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: buildMatchFn({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => index + 1,
}),
month: buildMatchFn({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: buildMatchFn({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: buildMatchFn({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
};

View File

@@ -0,0 +1,33 @@
var charenc = {
// UTF-8 encoding
utf8: {
// Convert a string to a byte array
stringToBytes: function(str) {
return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
},
// Convert a byte array to a string
bytesToString: function(bytes) {
return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
}
},
// Binary encoding
bin: {
// Convert a string to a byte array
stringToBytes: function(str) {
for (var bytes = [], i = 0; i < str.length; i++)
bytes.push(str.charCodeAt(i) & 0xFF);
return bytes;
},
// Convert a byte array to a string
bytesToString: function(bytes) {
for (var str = [], i = 0; i < bytes.length; i++)
str.push(String.fromCharCode(bytes[i]));
return str.join('');
}
}
};
module.exports = charenc;

View File

@@ -0,0 +1 @@
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/collections/operations/update.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAKhD,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAA;AACjG,OAAO,KAAK,EACV,mBAAmB,EACnB,UAAU,EAEV,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,oBAAoB,CAAA;AAO3B,OAAO,EAAE,KAAK,cAAc,EAAwB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAkB5F,MAAM,MAAM,SAAS,CAAC,KAAK,SAAS,cAAc,IAAI;IACpD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,UAAU,CAAA;IACtB,IAAI,EAAE,WAAW,CAAC,8BAA8B,CAAC,KAAK,CAAC,CAAC,CAAA;IACxD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,GAAG,EAAE,cAAc,CAAA;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,KAAK,EAAE,KAAK,CAAA;CACb,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAA;AAElD,eAAO,MAAM,eAAe,GAC1B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,wBAAwB,CAAC,KAAK,CAAC,gBAEjC,SAAS,CAAC,KAAK,CAAC,KAC7B,OAAO,CAAC,mBAAmB,CAAC,KAAK,EAAE,OAAO,CAAC,CAoR7C,CAAA"}

View File

@@ -0,0 +1,561 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
// Simulations show these probabilities for a single change
// 93.1% that one group is invalidated
// 4.8% that two groups are invalidated
// 1.1% that 3 groups are invalidated
// 0.1% that 4 or more groups are invalidated
//
// And these for removing/adding 10 lexically adjacent files
// 64.5% that one group is invalidated
// 24.8% that two groups are invalidated
// 7.8% that 3 groups are invalidated
// 2.7% that 4 or more groups are invalidated
//
// And these for removing/adding 3 random files
// 0% that one group is invalidated
// 3.7% that two groups are invalidated
// 80.8% that 3 groups are invalidated
// 12.3% that 4 groups are invalidated
// 3.2% that 5 or more groups are invalidated
/**
* @param {string} a key
* @param {string} b key
* @returns {number} the similarity as number
*/
const similarity = (a, b) => {
const l = Math.min(a.length, b.length);
let dist = 0;
for (let i = 0; i < l; i++) {
const ca = a.charCodeAt(i);
const cb = b.charCodeAt(i);
dist += Math.max(0, 10 - Math.abs(ca - cb));
}
return dist;
};
/**
* @param {string} a key
* @param {string} b key
* @param {Set<string>} usedNames set of already used names
* @returns {string} the common part and a single char for the difference
*/
const getName = (a, b, usedNames) => {
const l = Math.min(a.length, b.length);
let i = 0;
while (i < l) {
if (a.charCodeAt(i) !== b.charCodeAt(i)) {
i++;
break;
}
i++;
}
while (i < l) {
const name = a.slice(0, i);
const lowerName = name.toLowerCase();
if (!usedNames.has(lowerName)) {
usedNames.add(lowerName);
return name;
}
i++;
}
// names always contain a hash, so this is always unique
// we don't need to check usedNames nor add it
return a;
};
/** @typedef {Record<string, number>} Sizes */
/**
* @param {Sizes} total total size
* @param {Sizes} size single size
* @returns {void}
*/
const addSizeTo = (total, size) => {
for (const key of Object.keys(size)) {
total[key] = (total[key] || 0) + size[key];
}
};
/**
* @param {Sizes} total total size
* @param {Sizes} size single size
* @returns {void}
*/
const subtractSizeFrom = (total, size) => {
for (const key of Object.keys(size)) {
total[key] -= size[key];
}
};
/**
* @template T
* @param {Iterable<Node<T>>} nodes some nodes
* @returns {Sizes} total size
*/
const sumSize = (nodes) => {
/** @type {Sizes} */
const sum = Object.create(null);
for (const node of nodes) {
addSizeTo(sum, node.size);
}
return sum;
};
/**
* @param {Sizes} size size
* @param {Sizes} maxSize minimum size
* @returns {boolean} true, when size is too big
*/
const isTooBig = (size, maxSize) => {
for (const key of Object.keys(size)) {
const s = size[key];
if (s === 0) continue;
const maxSizeValue = maxSize[key];
if (typeof maxSizeValue === "number" && s > maxSizeValue) return true;
}
return false;
};
/**
* @param {Sizes} size size
* @param {Sizes} minSize minimum size
* @returns {boolean} true, when size is too small
*/
const isTooSmall = (size, minSize) => {
for (const key of Object.keys(size)) {
const s = size[key];
if (s === 0) continue;
const minSizeValue = minSize[key];
if (typeof minSizeValue === "number" && s < minSizeValue) return true;
}
return false;
};
/** @typedef {Set<string>} Types */
/**
* @param {Sizes} size size
* @param {Sizes} minSize minimum size
* @returns {Types} set of types that are too small
*/
const getTooSmallTypes = (size, minSize) => {
/** @type {Types} */
const types = new Set();
for (const key of Object.keys(size)) {
const s = size[key];
if (s === 0) continue;
const minSizeValue = minSize[key];
if (typeof minSizeValue === "number" && s < minSizeValue) types.add(key);
}
return types;
};
/**
* @template {object} T
* @param {T} size size
* @param {Types} types types
* @returns {number} number of matching size types
*/
const getNumberOfMatchingSizeTypes = (size, types) => {
let i = 0;
for (const key of Object.keys(size)) {
if (size[/** @type {keyof T} */ (key)] !== 0 && types.has(key)) i++;
}
return i;
};
/**
* @param {Sizes} size size
* @param {Types} types types
* @returns {number} selective size sum
*/
const selectiveSizeSum = (size, types) => {
let sum = 0;
for (const key of Object.keys(size)) {
if (size[key] !== 0 && types.has(key)) sum += size[key];
}
return sum;
};
/**
* @template T
*/
class Node {
/**
* @param {T} item item
* @param {string} key key
* @param {Sizes} size size
*/
constructor(item, key, size) {
this.item = item;
this.key = key;
this.size = size;
}
}
/** @typedef {number[]} Similarities */
/**
* @template T
*/
class Group {
/**
* @param {Node<T>[]} nodes nodes
* @param {Similarities | null} similarities similarities between the nodes (length = nodes.length - 1)
* @param {Sizes=} size size of the group
*/
constructor(nodes, similarities, size) {
this.nodes = nodes;
this.similarities = similarities;
this.size = size || sumSize(nodes);
/** @type {string | undefined} */
this.key = undefined;
}
/**
* @param {(node: Node<T>) => boolean} filter filter function
* @returns {Node<T>[] | undefined} removed nodes
*/
popNodes(filter) {
/** @type {Node<T>[]} */
const newNodes = [];
/** @type {Similarities} */
const newSimilarities = [];
/** @type {Node<T>[]} */
const resultNodes = [];
/** @type {undefined | Node<T>} */
let lastNode;
for (let i = 0; i < this.nodes.length; i++) {
const node = this.nodes[i];
if (filter(node)) {
resultNodes.push(node);
} else {
if (newNodes.length > 0) {
newSimilarities.push(
lastNode === this.nodes[i - 1]
? /** @type {Similarities} */ (this.similarities)[i - 1]
: similarity(/** @type {Node<T>} */ (lastNode).key, node.key)
);
}
newNodes.push(node);
lastNode = node;
}
}
if (resultNodes.length === this.nodes.length) return;
this.nodes = newNodes;
this.similarities = newSimilarities;
this.size = sumSize(newNodes);
return resultNodes;
}
}
/**
* @template T
* @param {Iterable<Node<T>>} nodes nodes
* @returns {Similarities} similarities
*/
const getSimilarities = (nodes) => {
// calculate similarities between lexically adjacent nodes
/** @type {Similarities} */
const similarities = [];
/** @type {undefined | Node<T>} */
let last;
for (const node of nodes) {
if (last !== undefined) {
similarities.push(similarity(last.key, node.key));
}
last = node;
}
return similarities;
};
/**
* @template T
* @typedef {object} GroupedItems<T>
* @property {string} key
* @property {T[]} items
* @property {Sizes} size
*/
/**
* @template T
* @typedef {object} Options
* @property {Sizes} maxSize maximum size of a group
* @property {Sizes} minSize minimum size of a group (preferred over maximum size)
* @property {Iterable<T>} items a list of items
* @property {(item: T) => Sizes} getSize function to get size of an item
* @property {(item: T) => string} getKey function to get the key of an item
*/
/**
* @template T
* @param {Options<T>} options options object
* @returns {GroupedItems<T>[]} grouped items
*/
module.exports = ({ maxSize, minSize, items, getSize, getKey }) => {
/** @type {Group<T>[]} */
const result = [];
const nodes = Array.from(
items,
(item) => new Node(item, getKey(item), getSize(item))
);
/** @type {Node<T>[]} */
const initialNodes = [];
// lexically ordering of keys
nodes.sort((a, b) => {
if (a.key < b.key) return -1;
if (a.key > b.key) return 1;
return 0;
});
// return nodes bigger than maxSize directly as group
// But make sure that minSize is not violated
for (const node of nodes) {
if (isTooBig(node.size, maxSize) && !isTooSmall(node.size, minSize)) {
result.push(new Group([node], []));
} else {
initialNodes.push(node);
}
}
if (initialNodes.length > 0) {
const initialGroup = new Group(initialNodes, getSimilarities(initialNodes));
/**
* @param {Group<T>} group group
* @param {Sizes} consideredSize size of the group to consider
* @returns {boolean} true, if the group was modified
*/
const removeProblematicNodes = (group, consideredSize = group.size) => {
const problemTypes = getTooSmallTypes(consideredSize, minSize);
if (problemTypes.size > 0) {
// We hit an edge case where the working set is already smaller than minSize
// We merge problematic nodes with the smallest result node to keep minSize intact
const problemNodes = group.popNodes(
(n) => getNumberOfMatchingSizeTypes(n.size, problemTypes) > 0
);
if (problemNodes === undefined) return false;
// Only merge it with result nodes that have the problematic size type
const possibleResultGroups = result.filter(
(n) => getNumberOfMatchingSizeTypes(n.size, problemTypes) > 0
);
if (possibleResultGroups.length > 0) {
const bestGroup = possibleResultGroups.reduce((min, group) => {
const minMatches = getNumberOfMatchingSizeTypes(min, problemTypes);
const groupMatches = getNumberOfMatchingSizeTypes(
group,
problemTypes
);
if (minMatches !== groupMatches) {
return minMatches < groupMatches ? group : min;
}
if (
selectiveSizeSum(min.size, problemTypes) >
selectiveSizeSum(group.size, problemTypes)
) {
return group;
}
return min;
});
for (const node of problemNodes) bestGroup.nodes.push(node);
bestGroup.nodes.sort((a, b) => {
if (a.key < b.key) return -1;
if (a.key > b.key) return 1;
return 0;
});
} else {
// There are no other nodes with the same size types
// We create a new group and have to accept that it's smaller than minSize
result.push(new Group(problemNodes, null));
}
return true;
}
return false;
};
if (initialGroup.nodes.length > 0) {
const queue = [initialGroup];
while (queue.length) {
const group = /** @type {Group<T>} */ (queue.pop());
// only groups bigger than maxSize need to be splitted
if (!isTooBig(group.size, maxSize)) {
result.push(group);
continue;
}
// If the group is already too small
// we try to work only with the unproblematic nodes
if (removeProblematicNodes(group)) {
// This changed something, so we try this group again
queue.push(group);
continue;
}
// find unsplittable area from left and right
// going minSize from left and right
// at least one node need to be included otherwise we get stuck
let left = 1;
/** @type {Sizes} */
const leftSize = Object.create(null);
addSizeTo(leftSize, group.nodes[0].size);
while (left < group.nodes.length && isTooSmall(leftSize, minSize)) {
addSizeTo(leftSize, group.nodes[left].size);
left++;
}
let right = group.nodes.length - 2;
/** @type {Sizes} */
const rightSize = Object.create(null);
addSizeTo(rightSize, group.nodes[group.nodes.length - 1].size);
while (right >= 0 && isTooSmall(rightSize, minSize)) {
addSizeTo(rightSize, group.nodes[right].size);
right--;
}
// left v v right
// [ O O O ] O O O [ O O O ]
// ^^^^^^^^^ leftSize
// rightSize ^^^^^^^^^
// leftSize > minSize
// rightSize > minSize
// Perfect split: [ O O O ] [ O O O ]
// right === left - 1
if (left - 1 > right) {
// We try to remove some problematic nodes to "fix" that
/** @type {Sizes} */
let prevSize;
if (right < group.nodes.length - left) {
subtractSizeFrom(rightSize, group.nodes[right + 1].size);
prevSize = rightSize;
} else {
subtractSizeFrom(leftSize, group.nodes[left - 1].size);
prevSize = leftSize;
}
if (removeProblematicNodes(group, prevSize)) {
// This changed something, so we try this group again
queue.push(group);
continue;
}
// can't split group while holding minSize
// because minSize is preferred of maxSize we return
// the problematic nodes as result here even while it's too big
// To avoid this make sure maxSize > minSize * 3
result.push(group);
continue;
}
if (left <= right) {
// when there is a area between left and right
// we look for best split point
// we split at the minimum similarity
// here key space is separated the most
// But we also need to make sure to not create too small groups
let best = -1;
let bestSimilarity = Infinity;
let pos = left;
const rightSize = sumSize(group.nodes.slice(pos));
// pos v v right
// [ O O O ] O O O [ O O O ]
// ^^^^^^^^^ leftSize
// rightSize ^^^^^^^^^^^^^^^
while (pos <= right + 1) {
const similarity =
/** @type {Similarities} */
(group.similarities)[pos - 1];
if (
similarity < bestSimilarity &&
!isTooSmall(leftSize, minSize) &&
!isTooSmall(rightSize, minSize)
) {
best = pos;
bestSimilarity = similarity;
}
addSizeTo(leftSize, group.nodes[pos].size);
subtractSizeFrom(rightSize, group.nodes[pos].size);
pos++;
}
if (best < 0) {
// This can't happen
// but if that assumption is wrong
// fallback to a big group
result.push(group);
continue;
}
left = best;
right = best - 1;
}
// create two new groups for left and right area
// and queue them up
/** @type {Node<T>[]} */
const rightNodes = [group.nodes[right + 1]];
/** @type {Similarities} */
const rightSimilarities = [];
for (let i = right + 2; i < group.nodes.length; i++) {
rightSimilarities.push(
/** @type {Similarities} */ (group.similarities)[i - 1]
);
rightNodes.push(group.nodes[i]);
}
queue.push(new Group(rightNodes, rightSimilarities));
/** @type {Node<T>[]} */
const leftNodes = [group.nodes[0]];
/** @type {Similarities} */
const leftSimilarities = [];
for (let i = 1; i < left; i++) {
leftSimilarities.push(
/** @type {Similarities} */ (group.similarities)[i - 1]
);
leftNodes.push(group.nodes[i]);
}
queue.push(new Group(leftNodes, leftSimilarities));
}
}
}
// lexically ordering
result.sort((a, b) => {
if (a.nodes[0].key < b.nodes[0].key) return -1;
if (a.nodes[0].key > b.nodes[0].key) return 1;
return 0;
});
// give every group a name
/** @type {Set<string>} */
const usedNames = new Set();
for (let i = 0; i < result.length; i++) {
const group = result[i];
if (group.nodes.length === 1) {
group.key = group.nodes[0].key;
} else {
const first = group.nodes[0];
const last = group.nodes[group.nodes.length - 1];
const name = getName(first.key, last.key, usedNames);
group.key = name;
}
}
// return the results
return result.map(
(group) =>
/** @type {GroupedItems<T>} */
({
key: group.key,
items: group.nodes.map((node) => node.item),
size: group.size
})
);
};

View File

@@ -0,0 +1,58 @@
// https://github.com/abhiaiyer91/graphql-currency-scalars
import { GraphQLScalarType, Kind } from 'graphql';
import { createGraphQLError } from '../error.js';
function generateCurrency(value) {
if (typeof value !== 'number') {
throw createGraphQLError(`Currency cannot represent non integer type ${JSON.stringify(value)}`);
}
const currencyInCents = parseInt(value.toString(), 10);
return (currencyInCents / 100).toLocaleString('en-US', {
style: 'currency',
currency: 'USD',
});
}
function generateCents(value) {
const digits = value.replace('$', '').replace(',', '');
const number = parseFloat(digits);
return number * 100;
}
/**
* An Currency Scalar.
*
* Input:
* This scalar takes a currency string as input and
* formats it to currency in cents.
*
* Output:
* This scalar serializes currency in cents to
* currency strings.
*/
export const GraphQLUSCurrency = /*#__PURE__*/ new GraphQLScalarType({
name: 'USCurrency',
description: 'A currency string, such as $21.25',
serialize: generateCurrency,
parseValue(value) {
if (typeof value !== 'string') {
throw createGraphQLError(`Currency cannot represent non string type ${JSON.stringify(value)}`);
}
return generateCents(value);
},
parseLiteral(ast) {
if (ast.kind === Kind.STRING) {
if (typeof ast.value === 'string') {
return generateCents(ast.value);
}
}
throw createGraphQLError(`Currency cannot represent an invalid currency-string ${JSON.stringify(ast)}.`, {
nodes: ast,
});
},
extensions: {
codegenScalarType: 'string',
jsonSchema: {
title: 'USCurrency',
type: 'string',
pattern: '^\\$[0-9]+(\\.[0-9]{2})?$',
},
},
});

View File

@@ -0,0 +1,11 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { DefaultEditView } from '@payloadcms/ui';
import React from 'react';
export const EditView = props => {
return /*#__PURE__*/_jsx(DefaultEditView, {
...props
});
};
//# sourceMappingURL=index.js.map

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"wrapGetServerSidePropsWithSentry.js","sources":["../../../../src/common/pages-router-instrumentation/wrapGetServerSidePropsWithSentry.ts"],"sourcesContent":["import type { GetServerSideProps } from 'next';\nimport { isBuild } from '../utils/isBuild';\nimport { withErrorInstrumentation, withTracedServerSideDataFetcher } from '../utils/wrapperUtils';\n\n/**\n * Create a wrapped version of the user's exported `getServerSideProps` function\n *\n * @param origGetServerSideProps The user's `getServerSideProps` function\n * @param parameterizedRoute The page's parameterized route\n * @returns A wrapped version of the function\n */\nexport function wrapGetServerSidePropsWithSentry(\n origGetServerSideProps: GetServerSideProps,\n parameterizedRoute: string,\n): GetServerSideProps {\n return new Proxy(origGetServerSideProps, {\n apply: async (wrappingTarget, thisArg, args: Parameters<GetServerSideProps>) => {\n if (isBuild()) {\n return wrappingTarget.apply(thisArg, args);\n }\n\n const [context] = args;\n const { req, res } = context;\n\n const errorWrappedGetServerSideProps = withErrorInstrumentation(wrappingTarget);\n const tracedGetServerSideProps = withTracedServerSideDataFetcher(errorWrappedGetServerSideProps, req, res, {\n dataFetcherRouteName: parameterizedRoute,\n requestedRouteName: parameterizedRoute,\n dataFetchingMethodName: 'getServerSideProps',\n });\n\n const {\n data: serverSideProps,\n baggage,\n sentryTrace,\n }: {\n data?: unknown;\n baggage?: string;\n sentryTrace?: string;\n } = await (tracedGetServerSideProps.apply(thisArg, args) as ReturnType<typeof tracedGetServerSideProps>);\n\n if (typeof serverSideProps === 'object' && serverSideProps !== null && 'props' in serverSideProps) {\n // The Next.js serializer throws on undefined values so we need to guard for it (#12102)\n if (sentryTrace) {\n (serverSideProps.props as Record<string, unknown>)._sentryTraceData = sentryTrace;\n }\n\n // The Next.js serializer throws on undefined values so we need to guard for it (#12102)\n if (baggage) {\n (serverSideProps.props as Record<string, unknown>)._sentryBaggage = baggage;\n }\n }\n\n return serverSideProps;\n },\n });\n}\n"],"names":["isBuild","withErrorInstrumentation","withTracedServerSideDataFetcher"],"mappings":";;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gCAAgC;AAChD,EAAE,sBAAsB;AACxB,EAAE,kBAAkB;AACpB,EAAsB;AACtB,EAAE,OAAO,IAAI,KAAK,CAAC,sBAAsB,EAAE;AAC3C,IAAI,KAAK,EAAE,OAAO,cAAc,EAAE,OAAO,EAAE,IAAI,KAAqC;AACpF,MAAM,IAAIA,eAAO,EAAE,EAAE;AACrB,QAAQ,OAAO,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;AAClD,MAAM;;AAEN,MAAM,MAAM,CAAC,OAAO,CAAA,GAAI,IAAI;AAC5B,MAAM,MAAM,EAAE,GAAG,EAAE,GAAA,EAAI,GAAI,OAAO;;AAElC,MAAM,MAAM,8BAAA,GAAiCC,qCAAwB,CAAC,cAAc,CAAC;AACrF,MAAM,MAAM,wBAAA,GAA2BC,4CAA+B,CAAC,8BAA8B,EAAE,GAAG,EAAE,GAAG,EAAE;AACjH,QAAQ,oBAAoB,EAAE,kBAAkB;AAChD,QAAQ,kBAAkB,EAAE,kBAAkB;AAC9C,QAAQ,sBAAsB,EAAE,oBAAoB;AACpD,OAAO,CAAC;;AAER,MAAM,MAAM;AACZ,QAAQ,IAAI,EAAE,eAAe;AAC7B,QAAQ,OAAO;AACf,QAAQ,WAAW;AACnB;;AAIM,GAAI,OAAO,wBAAwB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAA,EAAiD;;AAE9G,MAAM,IAAI,OAAO,eAAA,KAAoB,QAAA,IAAY,eAAA,KAAoB,IAAA,IAAQ,OAAA,IAAW,eAAe,EAAE;AACzG;AACA,QAAQ,IAAI,WAAW,EAAE;AACzB,UAAU,CAAC,eAAe,CAAC,KAAA,GAAkC,gBAAA,GAAmB,WAAW;AAC3F,QAAQ;;AAER;AACA,QAAQ,IAAI,OAAO,EAAE;AACrB,UAAU,CAAC,eAAe,CAAC,KAAA,GAAkC,cAAA,GAAiB,OAAO;AACrF,QAAQ;AACR,MAAM;;AAEN,MAAM,OAAO,eAAe;AAC5B,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"buildPaginatedListType.d.ts","sourceRoot":"","sources":["../../src/schema/buildPaginatedListType.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2D,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEpG,eAAO,MAAM,sBAAsB,0DAkB/B,CAAA"}

View File

@@ -0,0 +1,125 @@
import { _INTERNAL_captureMetric } from './internal.js';
/**
* Options for capturing a metric.
*/
/**
* Capture a metric with the given type, name, and value.
*
* @param type - The type of the metric.
* @param name - The name of the metric.
* @param value - The value of the metric.
* @param options - Options for capturing the metric.
*/
function captureMetric(type, name, value, options) {
_INTERNAL_captureMetric(
{ type, name, value, unit: options?.unit, attributes: options?.attributes },
{ scope: options?.scope },
);
}
/**
* @summary Increment a counter metric.
*
* @param name - The name of the counter metric.
* @param value - The value to increment by (defaults to 1).
* @param options - Options for capturing the metric.
*
* @example
*
* ```
* Sentry.metrics.count('api.requests', 1, {
* attributes: {
* endpoint: '/api/users',
* method: 'GET',
* status: 200
* }
* });
* ```
*
* @example With custom value
*
* ```
* Sentry.metrics.count('items.processed', 5, {
* attributes: {
* processor: 'batch-processor',
* queue: 'high-priority'
* }
* });
* ```
*/
function count(name, value = 1, options) {
captureMetric('counter', name, value, options);
}
/**
* @summary Set a gauge metric to a specific value.
*
* @param name - The name of the gauge metric.
* @param value - The current value of the gauge.
* @param options - Options for capturing the metric.
*
* @example
*
* ```
* Sentry.metrics.gauge('memory.usage', 1024, {
* unit: 'megabyte',
* attributes: {
* process: 'web-server',
* region: 'us-east-1'
* }
* });
* ```
*
* @example Without unit
*
* ```
* Sentry.metrics.gauge('active.connections', 42, {
* attributes: {
* server: 'api-1',
* protocol: 'websocket'
* }
* });
* ```
*/
function gauge(name, value, options) {
captureMetric('gauge', name, value, options);
}
/**
* @summary Record a value in a distribution metric.
*
* @param name - The name of the distribution metric.
* @param value - The value to record in the distribution.
* @param options - Options for capturing the metric.
*
* @example
*
* ```
* Sentry.metrics.distribution('task.duration', 500, {
* unit: 'millisecond',
* attributes: {
* task: 'data-processing',
* priority: 'high'
* }
* });
* ```
*
* @example Without unit
*
* ```
* Sentry.metrics.distribution('batch.size', 100, {
* attributes: {
* processor: 'batch-1',
* type: 'async'
* }
* });
* ```
*/
function distribution(name, value, options) {
captureMetric('distribution', name, value, options);
}
export { count, distribution, gauge };
//# sourceMappingURL=public-api.js.map

View File

@@ -0,0 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LineBreaker = exports.fromCodePoint = exports.toCodePoints = void 0;
var Util_1 = require("./Util");
Object.defineProperty(exports, "toCodePoints", { enumerable: true, get: function () { return Util_1.toCodePoints; } });
Object.defineProperty(exports, "fromCodePoint", { enumerable: true, get: function () { return Util_1.fromCodePoint; } });
var LineBreak_1 = require("./LineBreak");
Object.defineProperty(exports, "LineBreaker", { enumerable: true, get: function () { return LineBreak_1.LineBreaker; } });
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"gallery-horizontal-end.js","sources":["../../../src/icons/gallery-horizontal-end.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GalleryHorizontalEnd\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMiA3djEwIiAvPgogIDxwYXRoIGQ9Ik02IDV2MTQiIC8+CiAgPHJlY3Qgd2lkdGg9IjEyIiBoZWlnaHQ9IjE4IiB4PSIxMCIgeT0iMyIgcng9IjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/gallery-horizontal-end\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 GalleryHorizontalEnd = createLucideIcon('GalleryHorizontalEnd', [\n ['path', { d: 'M2 7v10', key: 'a2pl2d' }],\n ['path', { d: 'M6 5v14', key: '1kq3d7' }],\n ['rect', { width: '12', height: '18', x: '10', y: '3', rx: '2', key: '13i7bc' }],\n]);\n\nexport default GalleryHorizontalEnd;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuB,iBAAiB,sBAAwB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjF,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"download-cloud.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}

View File

@@ -0,0 +1,10 @@
import type { Placeholder, SQL, SQLWrapper } from "../sql/sql.js";
import type { SingleStoreColumn } from "./columns/index.js";
export * from "../sql/expressions/index.js";
export declare function concat(column: SingleStoreColumn | SQL.Aliased, value: string | Placeholder | SQLWrapper): SQL;
export declare function substring(column: SingleStoreColumn | SQL.Aliased, { from, for: _for }: {
from?: number | Placeholder | SQLWrapper;
for?: number | Placeholder | SQLWrapper;
}): SQL;
export declare function dotProduct(column: SingleStoreColumn | SQL.Aliased, value: Array<number>): SQL;
export declare function euclideanDistance(column: SingleStoreColumn | SQL.Aliased, value: Array<number>): SQL;

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["React","Fragment","EyeIcon","active","className","_jsx","filter","Boolean","join","viewBox","xmlns","_jsxs","cx","cy","r","d"],"sources":["../../../src/icons/Eye/index.tsx"],"sourcesContent":["import React, { Fragment } from 'react'\n\nimport './index.scss'\n\nexport const EyeIcon: React.FC<{ active?: boolean; className?: string }> = ({\n active = true,\n className,\n}) => (\n <svg\n className={[className, 'icon icon--eye'].filter(Boolean).join(' ')}\n viewBox=\"0 0 16 12\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n {!active ? (\n <Fragment>\n <circle className=\"stroke\" cx=\"8.5\" cy=\"6\" r=\"2.5\" />\n <path\n className=\"stroke\"\n d=\"M8.5 1C3.83333 1 1.5 6 1.5 6C1.5 6 3.83333 11 8.5 11C13.1667 11 15.5 6 15.5 6C15.5 6 13.1667 1 8.5 1Z\"\n />\n </Fragment>\n ) : (\n <Fragment>\n <path\n className=\"stroke\"\n d=\"M2 11.5L4.35141 9.51035M15 0.5L12.6486 2.48965M10.915 6.64887C10.6493 7.64011 9.78959 8.38832 8.7408 8.48855M10.4085 4.38511C9.94992 3.84369 9.2651 3.5 8.5 3.5C7.11929 3.5 6 4.61929 6 6C6 6.61561 6.22251 7.17926 6.59149 7.61489M10.4085 4.38511L6.59149 7.61489M10.4085 4.38511L12.6486 2.48965M6.59149 7.61489L4.35141 9.51035M14.1292 3.92915C15.0431 5.02085 15.5 6 15.5 6C15.5 6 13.1667 11 8.5 11C7.67995 11 6.93195 10.8456 6.256 10.5911M4.35141 9.51035C2.45047 8.03672 1.5 6 1.5 6C1.5 6 3.83333 1 8.5 1C10.1882 1 11.5711 1.65437 12.6486 2.48965\"\n />\n </Fragment>\n )}\n </svg>\n)\n"],"mappings":";AAAA,OAAOA,KAAA,IAASC,QAAQ,QAAQ;AAEhC,OAAO;AAEP,OAAO,MAAMC,OAAA,GAA8DA,CAAC;EAC1EC,MAAA,GAAS,IAAI;EACbC;AAAS,CACV,kBACCC,IAAA,CAAC;EACCD,SAAA,EAAW,CAACA,SAAA,EAAW,iBAAiB,CAACE,MAAM,CAACC,OAAA,EAASC,IAAI,CAAC;EAC9DC,OAAA,EAAQ;EACRC,KAAA,EAAM;YAEL,CAACP,MAAA,gBACAQ,KAAA,CAACV,QAAA;4BACCI,IAAA,CAAC;MAAOD,SAAA,EAAU;MAASQ,EAAA,EAAG;MAAMC,EAAA,EAAG;MAAIC,CAAA,EAAE;qBAC7CT,IAAA,CAAC;MACCD,SAAA,EAAU;MACVW,CAAA,EAAE;;oBAINV,IAAA,CAACJ,QAAA;cACC,aAAAI,IAAA,CAAC;MACCD,SAAA,EAAU;MACVW,CAAA,EAAE","ignoreList":[]}

View File

@@ -0,0 +1 @@
export { _lt as lt, _lte as lte, _gt as gt, _gte as gte, _positive as positive, _negative as negative, _nonpositive as nonpositive, _nonnegative as nonnegative, _multipleOf as multipleOf, _maxSize as maxSize, _minSize as minSize, _size as size, _maxLength as maxLength, _minLength as minLength, _length as length, _regex as regex, _lowercase as lowercase, _uppercase as uppercase, _includes as includes, _startsWith as startsWith, _endsWith as endsWith, _property as property, _mime as mime, _overwrite as overwrite, _normalize as normalize, _trim as trim, _toLowerCase as toLowerCase, _toUpperCase as toUpperCase, } from "../core/index.js";

View File

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

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/gel-core/columns/integer.ts"],"sourcesContent":["import type { ColumnBuilderBaseConfig, ColumnBuilderRuntimeConfig, MakeColumnConfig } from '~/column-builder.ts';\nimport type { ColumnBaseConfig } from '~/column.ts';\nimport { entityKind } from '~/entity.ts';\nimport type { AnyGelTable } from '../table.ts';\nimport { GelColumn } from './common.ts';\nimport { GelIntColumnBaseBuilder } from './int.common.ts';\n\nexport type GelIntegerBuilderInitial<TName extends string> = GelIntegerBuilder<{\n\tname: TName;\n\tdataType: 'number';\n\tcolumnType: 'GelInteger';\n\tdata: number;\n\tdriverParam: number;\n\tenumValues: undefined;\n}>;\n\nexport class GelIntegerBuilder<T extends ColumnBuilderBaseConfig<'number', 'GelInteger'>>\n\textends GelIntColumnBaseBuilder<T>\n{\n\tstatic override readonly [entityKind]: string = 'GelIntegerBuilder';\n\n\tconstructor(name: T['name']) {\n\t\tsuper(name, 'number', 'GelInteger');\n\t}\n\n\t/** @internal */\n\toverride build<TTableName extends string>(\n\t\ttable: AnyGelTable<{ name: TTableName }>,\n\t): GelInteger<MakeColumnConfig<T, TTableName>> {\n\t\treturn new GelInteger<MakeColumnConfig<T, TTableName>>(table, this.config as ColumnBuilderRuntimeConfig<any, any>);\n\t}\n}\n\nexport class GelInteger<T extends ColumnBaseConfig<'number', 'GelInteger'>> extends GelColumn<T> {\n\tstatic override readonly [entityKind]: string = 'GelInteger';\n\n\tgetSQLType(): string {\n\t\treturn 'integer';\n\t}\n}\n\nexport function integer(): GelIntegerBuilderInitial<''>;\nexport function integer<TName extends string>(name: TName): GelIntegerBuilderInitial<TName>;\nexport function integer(name?: string) {\n\treturn new GelIntegerBuilder(name ?? '');\n}\n"],"mappings":"AAEA,SAAS,kBAAkB;AAE3B,SAAS,iBAAiB;AAC1B,SAAS,+BAA+B;AAWjC,MAAM,0BACJ,wBACT;AAAA,EACC,QAA0B,UAAU,IAAY;AAAA,EAEhD,YAAY,MAAiB;AAC5B,UAAM,MAAM,UAAU,YAAY;AAAA,EACnC;AAAA;AAAA,EAGS,MACR,OAC8C;AAC9C,WAAO,IAAI,WAA4C,OAAO,KAAK,MAA8C;AAAA,EAClH;AACD;AAEO,MAAM,mBAAuE,UAAa;AAAA,EAChG,QAA0B,UAAU,IAAY;AAAA,EAEhD,aAAqB;AACpB,WAAO;AAAA,EACR;AACD;AAIO,SAAS,QAAQ,MAAe;AACtC,SAAO,IAAI,kBAAkB,QAAQ,EAAE;AACxC;","names":[]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","getTranslation","React","useEditDepth","useTranslation","baseClass","Radio","props","$","isSelected","onChange","option","path","readOnly","uuid","i18n","editDepth","id","value","t0","t1","filter","Boolean","t2","join","t3","t4","label","t5","_jsx","checked","disabled","name","type","t6","t7","htmlFor","children","_jsxs","className"],"sources":["../../../../src/fields/RadioGroup/Radio/index.tsx"],"sourcesContent":["'use client'\nimport type { OptionObject, RadioFieldClientProps } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\nimport React from 'react'\n\nimport { useEditDepth } from '../../../providers/EditDepth/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport './index.scss'\n\nconst baseClass = 'radio-input'\n\nexport const Radio: React.FC<{\n id: string\n isSelected: boolean\n onChange: RadioFieldClientProps['onChange']\n option: OptionObject\n path: string\n readOnly?: boolean\n uuid?: string\n}> = (props) => {\n const { isSelected, onChange, option, path, readOnly, uuid } = props\n const { i18n } = useTranslation()\n\n const editDepth = useEditDepth()\n\n const id = `field-${path}-${option.value}${editDepth > 1 ? `-${editDepth}` : ''}${uuid ? `-${uuid}` : ''}`\n\n return (\n <label htmlFor={id}>\n <div\n className={[baseClass, isSelected && `${baseClass}--is-selected`].filter(Boolean).join(' ')}\n >\n <input\n checked={isSelected}\n disabled={readOnly}\n id={id}\n name={path}\n onChange={() => (typeof onChange === 'function' ? onChange(option.value) : null)}\n type=\"radio\"\n />\n <span\n className={[\n `${baseClass}__styled-radio`,\n readOnly && `${baseClass}__styled-radio--disabled`,\n ]\n .filter(Boolean)\n .join(' ')}\n />\n <span className={`${baseClass}__label`}>{getTranslation(option.label, i18n)}</span>\n </div>\n </label>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAC/B,OAAOC,KAAA,MAAW;AAElB,SAASC,YAAY,QAAQ;AAC7B,SAASC,cAAc,QAAQ;AAC/B,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,MAAMC,KAAA,GAQRC,KAAA;EAAA,MAAAC,CAAA,GAAAR,EAAA;EACH;IAAAS,UAAA;IAAAC,QAAA;IAAAC,MAAA;IAAAC,IAAA;IAAAC,QAAA;IAAAC;EAAA,IAA+DP,KAAA;EAC/D;IAAAQ;EAAA,IAAiBX,cAAA;EAEjB,MAAAY,SAAA,GAAkBb,YAAA;EAElB,MAAAc,EAAA,GAAW,SAASL,IAAA,IAAQD,MAAA,CAAAO,KAAA,GAAeF,SAAA,IAAY,GAAI,IAAIA,SAAA,EAAW,GAAG,KAAKF,IAAA,GAAO,IAAIA,IAAA,EAAM,GAAG,IAAI;EAK7E,MAAAK,EAAA,GAAAV,UAAA,IAAc,GAAAJ,SAAA,eAA2B;EAAA,IAAAe,EAAA;EAAA,IAAAZ,CAAA,QAAAW,EAAA;IAArDC,EAAA,IAAAf,SAAA,EAAYc,EAAyC,EAAAE,MAAA,CAAAC,OAAS;IAAAd,CAAA,MAAAW,EAAA;IAAAX,CAAA,MAAAY,EAAA;EAAA;IAAAA,EAAA,GAAAZ,CAAA;EAAA;EAA9D,MAAAe,EAAA,GAAAH,EAA8D,CAAAI,IAAA,CAAc;EAAA,IAAAC,EAAA;EAAA,IAAAjB,CAAA,QAAAE,QAAA,IAAAF,CAAA,QAAAG,MAAA,CAAAO,KAAA;IAO3EO,EAAA,GAAAA,CAAA,KAAO,OAAOf,QAAA,KAAa,aAAaA,QAAA,CAASC,MAAA,CAAAO,KAAY,QAAI;IAAAV,CAAA,MAAAE,QAAA;IAAAF,CAAA,MAAAG,MAAA,CAAAO,KAAA;IAAAV,CAAA,MAAAiB,EAAA;EAAA;IAAAA,EAAA,GAAAjB,CAAA;EAAA;EAAA,IAAAkB,EAAA;EAAA,IAAAlB,CAAA,QAAAO,IAAA,IAAAP,CAAA,QAAAS,EAAA,IAAAT,CAAA,QAAAC,UAAA,IAAAD,CAAA,QAAAG,MAAA,CAAAgB,KAAA,IAAAnB,CAAA,QAAAI,IAAA,IAAAJ,CAAA,SAAAK,QAAA,IAAAL,CAAA,SAAAe,EAAA,IAAAf,CAAA,SAAAiB,EAAA;IAL7E,MAAAG,EAAA,GAAAC,IAAA,CAAC;MAAAC,OAAA,EACUrB,UAAA;MAAAsB,QAAA,EACClB,QAAA;MAAAI,EAAA;MAAAe,IAAA,EAEJpB,IAAA;MAAAF,QAAA,EACIe,EAAiE;MAAAQ,IAAA,EACtE;IAAA,C;IAKH,MAAAC,EAAA,GAAArB,QAAA,IAAY,GAAAR,SAAA,0BAAsC;IAAA,IAAA8B,EAAA;IAAA,IAAA3B,CAAA,SAAA0B,EAAA;MAFzCC,EAAA,IACT,GAAA9B,SAAA,gBAA4B,EAC5B6B,EAAkD,EAAAb,MAAA,CAAAC,OAE1C;MAAAd,CAAA,OAAA0B,EAAA;MAAA1B,CAAA,OAAA2B,EAAA;IAAA;MAAAA,EAAA,GAAA3B,CAAA;IAAA;IAjBhBkB,EAAA,GAAAG,IAAA,CAAC;MAAAO,OAAA,EAAenB,EAAA;MAAAoB,QAAA,EACdC,KAAA,CAAC;QAAAC,SAAA,EACYhB,EAA4E;QAAAc,QAAA,GAEvFT,E,EAQAC,IAAA,CAAC;UAAAU,SAAA,EACYJ,EAID,CAAAX,IAAA,CACF;QAAA,C,GAEVK,IAAA,CAAC;UAAAU,SAAA,EAAgB,GAAAlC,SAAA,SAAqB;UAAAgC,QAAA,EAAGpC,cAAA,CAAeU,MAAA,CAAAgB,KAAA,EAAcZ,IAAA;QAAA,C;;;;;;;;;;;;;;;SApB1EW,E;CAwBJ","ignoreList":[]}

View File

@@ -0,0 +1,167 @@
# [4.3.1](https://github.com/TehShrike/deepmerge/releases/tag/v4.3.1)
- Fix type definition for arrayMerge options. [#239](https://github.com/TehShrike/deepmerge/pull/239)
# [4.3.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.3.0)
- Avoid thrown errors if the target doesn't have `propertyIsEnumerable`. [#252](https://github.com/TehShrike/deepmerge/pull/252)
# [4.2.2](https://github.com/TehShrike/deepmerge/releases/tag/v4.2.2)
- `isMergeableObject` is now only called if there are two values that could be merged. [a34dd4d2](https://github.com/TehShrike/deepmerge/commit/a34dd4d25bf5e250653540a2022bc832c7b00a19)
# [4.2.1](https://github.com/TehShrike/deepmerge/releases/tag/v4.2.1)
- Fix: falsey values can now be merged. [#170](https://github.com/TehShrike/deepmerge/issues/170)
# [4.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.2.0)
- Properties are now only overwritten if they exist on the target object and are enumerable. [#164](https://github.com/TehShrike/deepmerge/pull/164)
Technically this could probably be a patch release since "which properties get overwritten" wasn't documented and accidentally overwriting a built-in function or some function up the property chain would almost certainly be undesirable, but it feels like a gray area, so here we are with a feature version bump.
# [4.1.2](https://github.com/TehShrike/deepmerge/releases/tag/v4.1.2)
- Rolled back #167 since `Object.assign` breaks ES5 support. [55067352](https://github.com/TehShrike/deepmerge/commit/55067352a92c65a6c44a5165f3387720aae1e192)
# [4.1.1](https://github.com/TehShrike/deepmerge/releases/tag/v4.1.1)
- The `options` argument is no longer mutated [#167](https://github.com/TehShrike/deepmerge/pull/167)
# [4.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.1.0)
- `cloneUnlessOtherwiseSpecified` is now exposed to the `arrayMerge` function [#165](https://github.com/TehShrike/deepmerge/pull/165)
# [4.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v4.0.0)
- The `main` entry point in `package.json` is now a CommonJS module instead of a UMD module [#155](https://github.com/TehShrike/deepmerge/pull/155)
# [3.3.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.3.0)
- Enumerable Symbol properties are now copied [#151](https://github.com/TehShrike/deepmerge/pull/151)
# [3.2.1](https://github.com/TehShrike/deepmerge/releases/tag/v3.2.1)
- bumping dev dependency versions to try to shut up bogus security warnings from Github/npm [#149](https://github.com/TehShrike/deepmerge/pull/149)
# [3.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.2.0)
- feature: added the [`customMerge`](https://github.com/TehShrike/deepmerge#custommerge) option [#133](https://github.com/TehShrike/deepmerge/pull/133)
# [3.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.1.0)
- typescript typing: make the `all` function generic [#129](https://github.com/TehShrike/deepmerge/pull/129)
# [3.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v3.0.0)
- drop ES module build [#123](https://github.com/TehShrike/deepmerge/issues/123)
# [2.2.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.2.1)
- bug: typescript export type was wrong [#121](https://github.com/TehShrike/deepmerge/pull/121)
# [2.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.2.0)
- feature: added TypeScript typings [#119](https://github.com/TehShrike/deepmerge/pull/119)
# [2.1.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.1.1)
- documentation: Rename "methods" to "api", note ESM syntax [#103](https://github.com/TehShrike/deepmerge/pull/103)
- documentation: Fix grammar [#107](https://github.com/TehShrike/deepmerge/pull/107)
- documentation: Restructure headers for clarity + some wording tweaks [108](https://github.com/TehShrike/deepmerge/pull/108) + [109](https://github.com/TehShrike/deepmerge/pull/109)
# [2.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.1.0)
- feature: Support a custom `isMergeableObject` function [#96](https://github.com/TehShrike/deepmerge/pull/96)
- documentation: note a Webpack bug that some users might need to work around [#100](https://github.com/TehShrike/deepmerge/pull/100)
# [2.0.1](https://github.com/TehShrike/deepmerge/releases/tag/v2.0.1)
- documentation: fix the old array merge algorithm in the readme. [#84](https://github.com/TehShrike/deepmerge/pull/84)
# [2.0.0](https://github.com/TehShrike/deepmerge/releases/tag/v2.0.0)
- breaking: the array merge algorithm has changed from a complicated thing to `target.concat(source).map(element => cloneUnlessOtherwiseSpecified(element, optionsArgument))`
- breaking: The `clone` option now defaults to `true`
- feature: `merge.all` now accepts an array of any size, even 0 or 1 elements
See [pull request 77](https://github.com/TehShrike/deepmerge/pull/77).
# [1.5.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.2)
- fix: no longer attempts to merge React elements [#76](https://github.com/TehShrike/deepmerge/issues/76)
# [1.5.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.1)
- bower support: officially dropping bower support. If you use bower, please depend on the [unpkg distribution](https://unpkg.com/deepmerge/dist/umd.js). See [#63](https://github.com/TehShrike/deepmerge/issues/63)
# [1.5.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.5.0)
- bug fix: merging objects into arrays was allowed, and doesn't make any sense. [#65](https://github.com/TehShrike/deepmerge/issues/65) published as a feature release instead of a patch because it is a decent behavior change.
# [1.4.4](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.4)
- bower support: updated `main` in bower.json
# [1.4.3](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.3)
- bower support: inline is-mergeable-object in a new CommonJS build, so that people using both bower and CommonJS can bundle the library [0b34e6](https://github.com/TehShrike/deepmerge/commit/0b34e6e95f989f2fc8091d25f0d291c08f3d2d24)
# [1.4.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.2)
- performance: bump is-mergeable-object dependency version for a slight performance improvement [5906c7](https://github.com/TehShrike/deepmerge/commit/5906c765d691d48e83d76efbb0d4b9ca150dc12c)
# [1.4.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.1)
- documentation: fix unpkg link [acc45b](https://github.com/TehShrike/deepmerge/commit/acc45be85519c1df906a72ecb24764b622d18d47)
# [1.4.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.4.0)
- api: instead of only exporting a UMD module, expose a UMD module with `pkg.main`, a CJS module with `pkg.browser`, and an ES module with `pkg.module` [#62](https://github.com/TehShrike/deepmerge/pull/62)
# [1.3.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.2)
- documentation: note the minified/gzipped file sizes [56](https://github.com/TehShrike/deepmerge/pull/56)
- documentation: make data structures more readable in merge example: pull request [57](https://github.com/TehShrike/deepmerge/pull/57)
# [1.3.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.1)
- documentation: clarify and test some array merging documentation: pull request [51](https://github.com/TehShrike/deepmerge/pull/51)
# [1.3.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.3.0)
- feature: `merge.all`, a merge function that merges any number of objects: pull request [50](https://github.com/TehShrike/deepmerge/pull/50)
# [1.2.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.2.0)
- fix: an error that would be thrown when an array would be merged onto a truthy non-array value: pull request [46](https://github.com/TehShrike/deepmerge/pull/46)
- feature: the ability to clone: Issue [28](https://github.com/TehShrike/deepmerge/issues/28), pull requests [44](https://github.com/TehShrike/deepmerge/pull/44) and [48](https://github.com/TehShrike/deepmerge/pull/48)
- maintenance: added tests + travis to `.npmignore`: pull request [47](https://github.com/TehShrike/deepmerge/pull/47)
# [1.1.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.1.1)
- fix an issue where an error was thrown when merging an array onto a non-array: [Pull request 46](https://github.com/TehShrike/deepmerge/pull/46)
# [1.1.0](https://github.com/TehShrike/deepmerge/releases/tag/v1.1.0)
- allow consumers to specify their own array merging algorithm: [Pull request 37](https://github.com/TehShrike/deepmerge/pull/37)
# [1.0.3](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.3)
- adding bower.json back: [Issue 38](https://github.com/TehShrike/deepmerge/pull/38)
- updating keywords and Github links in package.json [bc3898e](https://github.com/TehShrike/deepmerge/commit/bc3898e587a56f74591328f40f656b0152c1d5eb)
# [1.0.2](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.2)
- Updating the readme: dropping bower, testing that the example works: [7102fc](https://github.com/TehShrike/deepmerge/commit/7102fcc4ddec11e2d33205866f9f18df14e5aeb5)
# [1.0.1](https://github.com/TehShrike/deepmerge/releases/tag/v1.0.1)
- `null`, dates, and regular expressions are now properly merged in arrays: [Issue 18](https://github.com/TehShrike/deepmerge/pull/18), plus commit: [ef1c6b](https://github.com/TehShrike/deepmerge/commit/ef1c6bac8350ba12a24966f0bc7da02560827586)
# 1.0.0
- Should only be a patch change, because this module is READY. [Issue 15](https://github.com/TehShrike/deepmerge/issues/15)
- Regular expressions are now treated like primitive values when merging: [Issue 30](https://github.com/TehShrike/deepmerge/pull/30)
- Dates are now treated like primitives when merging: [Issue 31](https://github.com/TehShrike/deepmerge/issues/31)

View File

@@ -0,0 +1,223 @@
'use strict'
const {
MAX_SAFE_COMPONENT_LENGTH,
MAX_SAFE_BUILD_LENGTH,
MAX_LENGTH,
} = require('./constants')
const debug = require('./debug')
exports = module.exports = {}
// The actual regexps go on exports.re
const re = exports.re = []
const safeRe = exports.safeRe = []
const src = exports.src = []
const safeSrc = exports.safeSrc = []
const t = exports.t = {}
let R = 0
const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
// Replace some greedy regex tokens to prevent regex dos issues. These regex are
// used internally via the safeRe object since all inputs in this library get
// normalized first to trim and collapse all extra whitespace. The original
// regexes are exported for userland consumption and lower level usage. A
// future breaking change could export the safer regex only with a note that
// all input should have extra whitespace removed.
const safeRegexReplacements = [
['\\s', 1],
['\\d', MAX_LENGTH],
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
]
const makeSafeRegex = (value) => {
for (const [token, max] of safeRegexReplacements) {
value = value
.split(`${token}*`).join(`${token}{0,${max}}`)
.split(`${token}+`).join(`${token}{1,${max}}`)
}
return value
}
const createToken = (name, value, isGlobal) => {
const safe = makeSafeRegex(value)
const index = R++
debug(name, index, value)
t[name] = index
src[index] = value
safeSrc[index] = safe
re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
}
// The following Regular Expressions can be used for tokenizing,
// validating, and parsing SemVer version strings.
// ## Numeric Identifier
// A single `0`, or a non-zero digit followed by zero or more digits.
createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
// ## Non-numeric Identifier
// Zero or more digits, followed by a letter or hyphen, and then zero or
// more letters, digits, or hyphens.
createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
// ## Main Version
// Three dot-separated numeric identifiers.
createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
`(${src[t.NUMERICIDENTIFIER]})\\.` +
`(${src[t.NUMERICIDENTIFIER]})`)
createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
`(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
`(${src[t.NUMERICIDENTIFIERLOOSE]})`)
// ## Pre-release Version Identifier
// A numeric identifier, or a non-numeric identifier.
// Non-numeric identifiers include numeric identifiers but can be longer.
// Therefore non-numeric identifiers must go first.
createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NONNUMERICIDENTIFIER]
}|${src[t.NUMERICIDENTIFIER]})`)
createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NONNUMERICIDENTIFIER]
}|${src[t.NUMERICIDENTIFIERLOOSE]})`)
// ## Pre-release Version
// Hyphen, followed by one or more dot-separated pre-release version
// identifiers.
createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
// ## Build Metadata Identifier
// Any combination of digits, letters, or hyphens.
createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
// ## Build Metadata
// Plus sign, followed by one or more period-separated build metadata
// identifiers.
createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
// ## Full Version String
// A main version, followed optionally by a pre-release version and
// build metadata.
// Note that the only major, minor, patch, and pre-release sections of
// the version string are capturing groups. The build metadata is not a
// capturing group, because it should not ever be used in version
// comparison.
createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
}${src[t.PRERELEASE]}?${
src[t.BUILD]}?`)
createToken('FULL', `^${src[t.FULLPLAIN]}$`)
// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
// common in the npm registry.
createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
}${src[t.PRERELEASELOOSE]}?${
src[t.BUILD]}?`)
createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
createToken('GTLT', '((?:<|>)?=?)')
// Something like "2.*" or "1.2.x".
// Note that "x.x" is a valid xRange identifer, meaning "any version"
// Only the first item is strictly required.
createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
`(?:${src[t.PRERELEASE]})?${
src[t.BUILD]}?` +
`)?)?`)
createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
`(?:${src[t.PRERELEASELOOSE]})?${
src[t.BUILD]}?` +
`)?)?`)
createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
// Coercion.
// Extract anything that could conceivably be a part of a valid semver
createToken('COERCEPLAIN', `${'(^|[^\\d])' +
'(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
`(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`)
createToken('COERCE', `${src[t.COERCEPLAIN]}(?:$|[^\\d])`)
createToken('COERCEFULL', src[t.COERCEPLAIN] +
`(?:${src[t.PRERELEASE]})?` +
`(?:${src[t.BUILD]})?` +
`(?:$|[^\\d])`)
createToken('COERCERTL', src[t.COERCE], true)
createToken('COERCERTLFULL', src[t.COERCEFULL], true)
// Tilde ranges.
// Meaning is "reasonably at or greater than"
createToken('LONETILDE', '(?:~>?)')
createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
exports.tildeTrimReplace = '$1~'
createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
// Caret ranges.
// Meaning is "at least and backwards compatible with"
createToken('LONECARET', '(?:\\^)')
createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
exports.caretTrimReplace = '$1^'
createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
// A simple gt/lt/eq thing, or just "" to indicate "any version"
createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
// An expression to strip any whitespace between the gtlt and the thing
// it modifies, so that `> 1.2.3` ==> `>1.2.3`
createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
exports.comparatorTrimReplace = '$1$2$3'
// Something like `1.2.3 - 1.2.4`
// Note that these all use the loose form, because they'll be
// checked against either the strict or loose comparator form
// later.
createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
`\\s+-\\s+` +
`(${src[t.XRANGEPLAIN]})` +
`\\s*$`)
createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
`\\s+-\\s+` +
`(${src[t.XRANGEPLAINLOOSE]})` +
`\\s*$`)
// Star ranges basically just allow anything at all.
createToken('STAR', '(<|>)?=?\\s*\\*')
// >=0.0.0 is like a star
createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')

View File

@@ -0,0 +1,65 @@
import type { User } from './user';
export interface Session {
sid: string;
did?: string | number;
init: boolean;
timestamp: number;
started: number;
duration?: number;
status: SessionStatus;
release?: string;
environment?: string;
userAgent?: string;
ipAddress?: string;
errors: number;
user?: User | null;
ignoreDuration: boolean;
abnormal_mechanism?: string;
/**
* Overrides default JSON serialization of the Session because
* the Sentry servers expect a slightly different schema of a session
* which is described in the interface @see SerializedSession in this file.
*
* @return a Sentry-backend conforming JSON object of the session
*/
toJSON(): SerializedSession;
}
export type SessionContext = Partial<Session>;
export type SessionStatus = 'ok' | 'exited' | 'crashed' | 'abnormal';
/** JSDoc */
export interface SessionAggregates {
attrs?: {
environment?: string;
release?: string;
ip_address?: string | null;
};
aggregates: Array<AggregationCounts>;
}
export interface AggregationCounts {
/** ISO Timestamp rounded to the second */
started: string;
/** Number of sessions that did not have errors */
exited?: number;
/** Number of sessions that had handled errors */
errored?: number;
/** Number of sessions that had unhandled errors */
crashed?: number;
}
export interface SerializedSession {
init: boolean;
sid: string;
did?: string;
timestamp: string;
started: string;
duration?: number;
status: SessionStatus;
errors: number;
abnormal_mechanism?: string;
attrs?: {
release?: string;
environment?: string;
user_agent?: string;
ip_address?: string;
};
}
//# sourceMappingURL=session.d.ts.map

View File

@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Shapes = createLucideIcon("Shapes", [
[
"path",
{
d: "M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",
key: "1bo67w"
}
],
["rect", { x: "3", y: "14", width: "7", height: "7", rx: "1", key: "1bkyp8" }],
["circle", { cx: "17.5", cy: "17.5", r: "3.5", key: "w3z12y" }]
]);
export { Shapes as default };
//# sourceMappingURL=shapes.js.map

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