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 @@
{"version":3,"file":"text-shadow.js","sourceRoot":"","sources":["../../../../src/css/property-descriptors/text-shadow.ts"],"names":[],"mappings":";;;AACA,2CAA+E;AAC/E,gEAAuD;AACvD,wCAAoD;AACpD,0CAAiD;AAWpC,QAAA,UAAU,GAAwC;IAC3D,IAAI,EAAE,aAAa;IACnB,YAAY,EAAE,MAAM;IACpB,IAAI,cAAoC;IACxC,MAAM,EAAE,KAAK;IACb,KAAK,EAAE,UAAC,OAAgB,EAAE,MAAkB;QACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,yBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE;YAC5D,OAAO,EAAE,CAAC;SACb;QAED,OAAO,0BAAiB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,UAAC,MAAkB;YACpD,IAAM,MAAM,GAAmB;gBAC3B,KAAK,EAAE,cAAM,CAAC,WAAW;gBACzB,OAAO,EAAE,+BAAW;gBACpB,OAAO,EAAE,+BAAW;gBACpB,IAAI,EAAE,+BAAW;aACpB,CAAC;YACF,IAAI,CAAC,GAAG,CAAC,CAAC;YACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBACpC,IAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;gBACxB,IAAI,iBAAQ,CAAC,KAAK,CAAC,EAAE;oBACjB,IAAI,CAAC,KAAK,CAAC,EAAE;wBACT,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;qBAC1B;yBAAM,IAAI,CAAC,KAAK,CAAC,EAAE;wBAChB,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;qBAC1B;yBAAM;wBACH,MAAM,CAAC,IAAI,GAAG,KAAK,CAAC;qBACvB;oBACD,CAAC,EAAE,CAAC;iBACP;qBAAM;oBACH,MAAM,CAAC,KAAK,GAAG,aAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;iBAC9C;aACJ;YACD,OAAO,MAAM,CAAC;QAClB,CAAC,CAAC,CAAC;IACP,CAAC;CACJ,CAAC"}

View File

@@ -0,0 +1,268 @@
#include <unordered_set>
#include <node_api.h>
#include "wasm/include.h"
#include <napi.h>
#include "Glob.hh"
#include "Event.hh"
#include "Backend.hh"
#include "Watcher.hh"
#include "PromiseRunner.hh"
using namespace Napi;
std::unordered_set<std::string> getIgnorePaths(Env env, Value opts) {
std::unordered_set<std::string> result;
if (opts.IsObject()) {
Value v = opts.As<Object>().Get(String::New(env, "ignorePaths"));
if (v.IsArray()) {
Array items = v.As<Array>();
for (size_t i = 0; i < items.Length(); i++) {
Value item = items.Get(Number::New(env, static_cast<double>(i)));
if (item.IsString()) {
result.insert(std::string(item.As<String>().Utf8Value().c_str()));
}
}
}
}
return result;
}
std::unordered_set<Glob> getIgnoreGlobs(Env env, Value opts) {
std::unordered_set<Glob> result;
if (opts.IsObject()) {
Value v = opts.As<Object>().Get(String::New(env, "ignoreGlobs"));
if (v.IsArray()) {
Array items = v.As<Array>();
for (size_t i = 0; i < items.Length(); i++) {
Value item = items.Get(Number::New(env, static_cast<double>(i)));
if (item.IsString()) {
auto key = item.As<String>().Utf8Value();
try {
result.emplace(key);
} catch (const std::regex_error& e) {
Error::New(env, e.what()).ThrowAsJavaScriptException();
}
}
}
}
}
return result;
}
std::shared_ptr<Backend> getBackend(Env env, Value opts) {
Value b = opts.As<Object>().Get(String::New(env, "backend"));
std::string backendName;
if (b.IsString()) {
backendName = std::string(b.As<String>().Utf8Value().c_str());
}
return Backend::getShared(backendName);
}
class WriteSnapshotRunner : public PromiseRunner {
public:
WriteSnapshotRunner(Env env, Value dir, Value snap, Value opts)
: PromiseRunner(env),
snapshotPath(std::string(snap.As<String>().Utf8Value().c_str())) {
watcher = Watcher::getShared(
std::string(dir.As<String>().Utf8Value().c_str()),
getIgnorePaths(env, opts),
getIgnoreGlobs(env, opts)
);
backend = getBackend(env, opts);
}
~WriteSnapshotRunner() {
watcher->unref();
backend->unref();
}
private:
std::shared_ptr<Backend> backend;
WatcherRef watcher;
std::string snapshotPath;
void execute() override {
backend->writeSnapshot(watcher, &snapshotPath);
}
};
class GetEventsSinceRunner : public PromiseRunner {
public:
GetEventsSinceRunner(Env env, Value dir, Value snap, Value opts)
: PromiseRunner(env),
snapshotPath(std::string(snap.As<String>().Utf8Value().c_str())) {
watcher = std::make_shared<Watcher>(
std::string(dir.As<String>().Utf8Value().c_str()),
getIgnorePaths(env, opts),
getIgnoreGlobs(env, opts)
);
backend = getBackend(env, opts);
}
~GetEventsSinceRunner() {
watcher->unref();
backend->unref();
}
private:
std::shared_ptr<Backend> backend;
WatcherRef watcher;
std::string snapshotPath;
void execute() override {
backend->getEventsSince(watcher, &snapshotPath);
if (watcher->mEvents.hasError()) {
throw std::runtime_error(watcher->mEvents.getError());
}
}
Value getResult() override {
std::vector<Event> events = watcher->mEvents.getEvents();
Array eventsArray = Array::New(env, events.size());
uint32_t i = 0;
for (auto it = events.begin(); it != events.end(); it++) {
eventsArray.Set(i++, it->toJS(env));
}
return eventsArray;
}
};
template<class Runner>
Value queueSnapshotWork(const CallbackInfo& info) {
Env env = info.Env();
if (info.Length() < 1 || !info[0].IsString()) {
TypeError::New(env, "Expected a string").ThrowAsJavaScriptException();
return env.Null();
}
if (info.Length() < 2 || !info[1].IsString()) {
TypeError::New(env, "Expected a string").ThrowAsJavaScriptException();
return env.Null();
}
if (info.Length() >= 3 && !info[2].IsObject()) {
TypeError::New(env, "Expected an object").ThrowAsJavaScriptException();
return env.Null();
}
Runner *runner = new Runner(info.Env(), info[0], info[1], info[2]);
return runner->queue();
}
Value writeSnapshot(const CallbackInfo& info) {
return queueSnapshotWork<WriteSnapshotRunner>(info);
}
Value getEventsSince(const CallbackInfo& info) {
return queueSnapshotWork<GetEventsSinceRunner>(info);
}
class SubscribeRunner : public PromiseRunner {
public:
SubscribeRunner(Env env, Value dir, Value fn, Value opts) : PromiseRunner(env) {
watcher = Watcher::getShared(
std::string(dir.As<String>().Utf8Value().c_str()),
getIgnorePaths(env, opts),
getIgnoreGlobs(env, opts)
);
backend = getBackend(env, opts);
watcher->watch(fn.As<Function>());
}
private:
WatcherRef watcher;
std::shared_ptr<Backend> backend;
FunctionReference callback;
void execute() override {
try {
backend->watch(watcher);
} catch (std::exception&) {
watcher->destroy();
throw;
}
}
};
class UnsubscribeRunner : public PromiseRunner {
public:
UnsubscribeRunner(Env env, Value dir, Value fn, Value opts) : PromiseRunner(env) {
watcher = Watcher::getShared(
std::string(dir.As<String>().Utf8Value().c_str()),
getIgnorePaths(env, opts),
getIgnoreGlobs(env, opts)
);
backend = getBackend(env, opts);
shouldUnwatch = watcher->unwatch(fn.As<Function>());
}
private:
WatcherRef watcher;
std::shared_ptr<Backend> backend;
bool shouldUnwatch;
void execute() override {
if (shouldUnwatch) {
backend->unwatch(watcher);
}
}
};
template<class Runner>
Value queueSubscriptionWork(const CallbackInfo& info) {
Env env = info.Env();
if (info.Length() < 1 || !info[0].IsString()) {
TypeError::New(env, "Expected a string").ThrowAsJavaScriptException();
return env.Null();
}
if (info.Length() < 2 || !info[1].IsFunction()) {
TypeError::New(env, "Expected a function").ThrowAsJavaScriptException();
return env.Null();
}
if (info.Length() >= 3 && !info[2].IsObject()) {
TypeError::New(env, "Expected an object").ThrowAsJavaScriptException();
return env.Null();
}
Runner *runner = new Runner(info.Env(), info[0], info[1], info[2]);
return runner->queue();
}
Value subscribe(const CallbackInfo& info) {
return queueSubscriptionWork<SubscribeRunner>(info);
}
Value unsubscribe(const CallbackInfo& info) {
return queueSubscriptionWork<UnsubscribeRunner>(info);
}
Object Init(Env env, Object exports) {
exports.Set(
String::New(env, "writeSnapshot"),
Function::New(env, writeSnapshot)
);
exports.Set(
String::New(env, "getEventsSince"),
Function::New(env, getEventsSince)
);
exports.Set(
String::New(env, "subscribe"),
Function::New(env, subscribe)
);
exports.Set(
String::New(env, "unsubscribe"),
Function::New(env, unsubscribe)
);
return exports;
}
NODE_API_MODULE(watcher, Init)

View File

@@ -0,0 +1,7 @@
import type { ServerProps } from '../../config/types.js';
export type SaveButtonClientProps = {
label?: string;
};
export type SaveButtonServerPropsOnly = {} & ServerProps;
export type SaveButtonServerProps = SaveButtonClientProps & SaveButtonServerPropsOnly;
//# sourceMappingURL=SaveButton.d.ts.map

View File

@@ -0,0 +1,5 @@
export declare const setMilliseconds: import("./types.js").FPFn2<
Date,
number,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,75 @@
"use strict";
exports.setDefaultOptions = setDefaultOptions;
var _index = require("./_lib/defaultOptions.js");
/**
* @name setDefaultOptions
* @category Common Helpers
* @summary Set default options including locale.
* @pure false
*
* @description
* Sets the defaults for
* `options.locale`, `options.weekStartsOn` and `options.firstWeekContainsDate`
* arguments for all functions.
*
* @param options - An object with options
*
* @example
* // Set global locale:
* import { es } from 'date-fns/locale'
* setDefaultOptions({ locale: es })
* const result = format(new Date(2014, 8, 2), 'PPPP')
* //=> 'martes, 2 de septiembre de 2014'
*
* @example
* // Start of the week for 2 September 2014:
* const result = startOfWeek(new Date(2014, 8, 2))
* //=> Sun Aug 31 2014 00:00:00
*
* @example
* // Start of the week for 2 September 2014,
* // when we set that week starts on Monday by default:
* setDefaultOptions({ weekStartsOn: 1 })
* const result = startOfWeek(new Date(2014, 8, 2))
* //=> Mon Sep 01 2014 00:00:00
*
* @example
* // Manually set options take priority over default options:
* setDefaultOptions({ weekStartsOn: 1 })
* const result = startOfWeek(new Date(2014, 8, 2), { weekStartsOn: 0 })
* //=> Sun Aug 31 2014 00:00:00
*
* @example
* // Remove the option by setting it to `undefined`:
* setDefaultOptions({ weekStartsOn: 1 })
* setDefaultOptions({ weekStartsOn: undefined })
* const result = startOfWeek(new Date(2014, 8, 2))
* //=> Sun Aug 31 2014 00:00:00
*/
function setDefaultOptions(options) {
const result = {};
const defaultOptions = (0, _index.getDefaultOptions)();
for (const property in defaultOptions) {
if (Object.prototype.hasOwnProperty.call(defaultOptions, property)) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
result[property] = defaultOptions[property];
}
}
for (const property in options) {
if (Object.prototype.hasOwnProperty.call(options, property)) {
if (options[property] === undefined) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
delete result[property];
} else {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
result[property] = options[property];
}
}
}
(0, _index.setDefaultOptions)(result);
}

View File

@@ -0,0 +1,202 @@
import { createCheckInEnvelope } from './checkin.js';
import { Client } from './client.js';
import { getIsolationScope } from './currentScopes.js';
import { DEBUG_BUILD } from './debug-build.js';
import { registerSpanErrorInstrumentation } from './tracing/errors.js';
import { debug } from './utils/debug-logger.js';
import { uuid4 } from './utils/misc.js';
import { addUserAgentToTransportHeaders } from './transports/userAgent.js';
import { eventFromUnknownInput, eventFromMessage } from './utils/eventbuilder.js';
import { resolvedSyncPromise } from './utils/syncpromise.js';
import { _getTraceInfoFromScope } from './utils/trace-info.js';
/**
* The Sentry Server Runtime Client SDK.
*/
class ServerRuntimeClient
extends Client {
/**
* Creates a new Edge SDK instance.
* @param options Configuration options for this SDK.
*/
constructor(options) {
// Server clients always support tracing
registerSpanErrorInstrumentation();
addUserAgentToTransportHeaders(options);
super(options);
this._setUpMetricsProcessing();
}
/**
* @inheritDoc
*/
eventFromException(exception, hint) {
const event = eventFromUnknownInput(this, this._options.stackParser, exception, hint);
event.level = 'error';
return resolvedSyncPromise(event);
}
/**
* @inheritDoc
*/
eventFromMessage(
message,
level = 'info',
hint,
) {
return resolvedSyncPromise(
eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace),
);
}
/**
* @inheritDoc
*/
captureException(exception, hint, scope) {
setCurrentRequestSessionErroredOrCrashed(hint);
return super.captureException(exception, hint, scope);
}
/**
* @inheritDoc
*/
captureEvent(event, hint, scope) {
// If the event is of type Exception, then a request session should be captured
const isException = !event.type && event.exception?.values && event.exception.values.length > 0;
if (isException) {
setCurrentRequestSessionErroredOrCrashed(hint);
}
return super.captureEvent(event, hint, scope);
}
/**
* Create a cron monitor check in and send it to Sentry.
*
* @param checkIn An object that describes a check in.
* @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want
* to create a monitor automatically when sending a check in.
*/
captureCheckIn(checkIn, monitorConfig, scope) {
const id = 'checkInId' in checkIn && checkIn.checkInId ? checkIn.checkInId : uuid4();
if (!this._isEnabled()) {
DEBUG_BUILD && debug.warn('SDK not enabled, will not capture check-in.');
return id;
}
const options = this.getOptions();
const { release, environment, tunnel } = options;
const serializedCheckIn = {
check_in_id: id,
monitor_slug: checkIn.monitorSlug,
status: checkIn.status,
release,
environment,
};
if ('duration' in checkIn) {
serializedCheckIn.duration = checkIn.duration;
}
if (monitorConfig) {
serializedCheckIn.monitor_config = {
schedule: monitorConfig.schedule,
checkin_margin: monitorConfig.checkinMargin,
max_runtime: monitorConfig.maxRuntime,
timezone: monitorConfig.timezone,
failure_issue_threshold: monitorConfig.failureIssueThreshold,
recovery_threshold: monitorConfig.recoveryThreshold,
};
}
const [dynamicSamplingContext, traceContext] = _getTraceInfoFromScope(this, scope);
if (traceContext) {
serializedCheckIn.contexts = {
trace: traceContext,
};
}
const envelope = createCheckInEnvelope(
serializedCheckIn,
dynamicSamplingContext,
this.getSdkMetadata(),
tunnel,
this.getDsn(),
);
DEBUG_BUILD && debug.log('Sending checkin:', checkIn.monitorSlug, checkIn.status);
// sendEnvelope should not throw
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.sendEnvelope(envelope);
return id;
}
/**
* @inheritDoc
*/
_prepareEvent(
event,
hint,
currentScope,
isolationScope,
) {
if (this._options.platform) {
event.platform = event.platform || this._options.platform;
}
if (this._options.runtime) {
event.contexts = {
...event.contexts,
runtime: event.contexts?.runtime || this._options.runtime,
};
}
if (this._options.serverName) {
event.server_name = event.server_name || this._options.serverName;
}
return super._prepareEvent(event, hint, currentScope, isolationScope);
}
/**
* Process a server-side metric before it is captured.
*/
_setUpMetricsProcessing() {
this.on('processMetric', metric => {
if (this._options.serverName) {
metric.attributes = {
'server.address': this._options.serverName,
...metric.attributes,
};
}
});
}
}
function setCurrentRequestSessionErroredOrCrashed(eventHint) {
const requestSession = getIsolationScope().getScopeData().sdkProcessingMetadata.requestSession;
if (requestSession) {
// We mutate instead of doing `setSdkProcessingMetadata` because the http integration stores away a particular
// isolationScope. If that isolation scope is forked, setting the processing metadata here will not mutate the
// original isolation scope that the http integration stored away.
const isHandledException = eventHint?.mechanism?.handled ?? true;
// A request session can go from "errored" -> "crashed" but not "crashed" -> "errored".
// Crashed (unhandled exception) is worse than errored (handled exception).
if (isHandledException && requestSession.status !== 'crashed') {
requestSession.status = 'errored';
} else if (!isHandledException) {
requestSession.status = 'crashed';
}
}
}
export { ServerRuntimeClient };
//# sourceMappingURL=server-runtime-client.js.map

View File

@@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _superPropGet;
var _get = require("./get.js");
var _getPrototypeOf = require("./getPrototypeOf.js");
function _superPropGet(classArg, property, receiver, flags) {
var result = (0, _get.default)((0, _getPrototypeOf.default)(flags & 1 ? classArg.prototype : classArg), property, receiver);
return flags & 2 && typeof result === "function" ? function (args) {
return result.apply(receiver, args);
} : result;
}
//# sourceMappingURL=superPropGet.js.map

View File

@@ -0,0 +1,326 @@
(function (Prism) {
var stringPattern = /(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source;
var number = /\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i;
var numericConstant = {
pattern: RegExp(stringPattern + '[bx]'),
alias: 'number'
};
var macroVariable = {
pattern: /&[a-z_]\w*/i
};
var macroKeyword = {
pattern: /((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,
lookbehind: true,
alias: 'keyword'
};
var step = {
pattern: /(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,
alias: 'keyword',
lookbehind: true
};
var comment = [
/\/\*[\s\S]*?\*\//,
{
pattern: /(^[ \t]*|;\s*)\*[^;]*;/m,
lookbehind: true
}
];
var string = {
pattern: RegExp(stringPattern),
greedy: true
};
var punctuation = /[$%@.(){}\[\];,\\]/;
var func = {
pattern: /%?\b\w+(?=\()/,
alias: 'keyword'
};
var args = {
'function': func,
'arg-value': {
pattern: /(=\s*)[A-Z\.]+/i,
lookbehind: true
},
'operator': /=/,
'macro-variable': macroVariable,
'arg': {
pattern: /[A-Z]+/i,
alias: 'keyword'
},
'number': number,
'numeric-constant': numericConstant,
'punctuation': punctuation,
'string': string
};
var format = {
pattern: /\b(?:format|put)\b=?[\w'$.]+/i,
inside: {
'keyword': /^(?:format|put)(?==)/i,
'equals': /=/,
'format': {
pattern: /(?:\w|\$\d)+\.\d?/,
alias: 'number'
}
}
};
var altformat = {
pattern: /\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,
inside: {
'keyword': /^(?:format|put)/i,
'format': {
pattern: /[\w$]+\.\d?/,
alias: 'number'
}
}
};
var globalStatements = {
pattern: /((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,
lookbehind: true,
alias: 'keyword'
};
var submitStatement = {
pattern: /(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,
lookbehind: true,
alias: 'keyword'
};
var actionSets = /aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source;
var casActions = {
pattern: RegExp(/(^|\s)(?:action\s+)?(?:<act>)\.[a-z]+\b[^;]+/.source.replace(/<act>/g, function () { return actionSets; }), 'i'),
lookbehind: true,
inside: {
'keyword': RegExp(/(?:<act>)\.[a-z]+\b/.source.replace(/<act>/g, function () { return actionSets; }), 'i'),
'action': {
pattern: /(?:action)/i,
alias: 'keyword'
},
'comment': comment,
'function': func,
'arg-value': args['arg-value'],
'operator': args.operator,
'argument': args.arg,
'number': number,
'numeric-constant': numericConstant,
'punctuation': punctuation,
'string': string
}
};
var keywords = {
pattern: /((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,
lookbehind: true,
};
Prism.languages.sas = {
'datalines': {
pattern: /^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,
lookbehind: true,
alias: 'string',
inside: {
'keyword': {
pattern: /^(?:cards|(?:data)?lines)/i
},
'punctuation': /;/
}
},
'proc-sql': {
pattern: /(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,
lookbehind: true,
inside: {
'sql': {
pattern: RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:<str>|[^;"'])+;/.source.replace(/<str>/g, function () { return stringPattern; }), 'im'),
alias: 'language-sql',
inside: Prism.languages.sql
},
'global-statements': globalStatements,
'sql-statements': {
pattern: /(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,
lookbehind: true,
alias: 'keyword'
},
'number': number,
'numeric-constant': numericConstant,
'punctuation': punctuation,
'string': string
}
},
'proc-groovy': {
pattern: /(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,
lookbehind: true,
inside: {
'comment': comment,
'groovy': {
pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g, function () { return stringPattern; }), 'im'),
lookbehind: true,
alias: 'language-groovy',
inside: Prism.languages.groovy
},
'keyword': keywords,
'submit-statement': submitStatement,
'global-statements': globalStatements,
'number': number,
'numeric-constant': numericConstant,
'punctuation': punctuation,
'string': string
}
},
'proc-lua': {
pattern: /(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,
lookbehind: true,
inside: {
'comment': comment,
'lua': {
pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g, function () { return stringPattern; }), 'im'),
lookbehind: true,
alias: 'language-lua',
inside: Prism.languages.lua
},
'keyword': keywords,
'submit-statement': submitStatement,
'global-statements': globalStatements,
'number': number,
'numeric-constant': numericConstant,
'punctuation': punctuation,
'string': string
}
},
'proc-cas': {
pattern: /(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,
lookbehind: true,
inside: {
'comment': comment,
'statement-var': {
pattern: /((?:^|\s)=?)saveresult\s[^;]+/im,
lookbehind: true,
inside: {
'statement': {
pattern: /^saveresult\s+\S+/i,
inside: {
keyword: /^(?:saveresult)/i
}
},
rest: args
}
},
'cas-actions': casActions,
'statement': {
pattern: /((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,
lookbehind: true,
inside: args
},
'step': step,
'keyword': keywords,
'function': func,
'format': format,
'altformat': altformat,
'global-statements': globalStatements,
'number': number,
'numeric-constant': numericConstant,
'punctuation': punctuation,
'string': string
}
},
'proc-args': {
pattern: RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|<str>)+;/.source.replace(/<str>/g, function () { return stringPattern; }), 'im'),
lookbehind: true,
inside: args
},
/*Special keywords within macros*/
'macro-keyword': macroKeyword,
'macro-variable': macroVariable,
'macro-string-functions': {
pattern: /((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,
lookbehind: true,
inside: {
'function': {
pattern: /%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,
alias: 'keyword'
},
'macro-keyword': macroKeyword,
'macro-variable': macroVariable,
'escaped-char': {
pattern: /%['"()<>=¬^~;,#]/,
},
'punctuation': punctuation
}
},
'macro-declaration': {
pattern: /^%macro[^;]+(?=;)/im,
inside: {
'keyword': /%macro/i,
}
},
'macro-end': {
pattern: /^%mend[^;]+(?=;)/im,
inside: {
'keyword': /%mend/i,
}
},
/*%_zscore(headcir, _lhc, _mhc, _shc, headcz, headcpct, _Fheadcz); */
'macro': {
pattern: /%_\w+(?=\()/,
alias: 'keyword'
},
'input': {
pattern: /\binput\s[-\w\s/*.$&]+;/i,
inside: {
'input': {
alias: 'keyword',
pattern: /^input/i,
},
'comment': comment,
'number': number,
'numeric-constant': numericConstant
}
},
'options-args': {
pattern: /(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,
lookbehind: true,
inside: args
},
'cas-actions': casActions,
'comment': comment,
'function': func,
'format': format,
'altformat': altformat,
'numeric-constant': numericConstant,
'datetime': {
// '1jan2013'd, '9:25:19pm't, '18jan2003:9:27:05am'dt
pattern: RegExp(stringPattern + '(?:dt?|t)'),
alias: 'number'
},
'string': string,
'step': step,
'keyword': keywords,
// In SAS Studio syntax highlighting, these operators are styled like keywords
'operator-keyword': {
pattern: /\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,
alias: 'operator'
},
// Decimal (1.2e23), hexadecimal (0c1x)
'number': number,
'operator': /\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/,
'punctuation': punctuation
};
}(Prism));

View File

@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './square-slash.js';
//# sourceMappingURL=slash-square.js.map

View File

@@ -0,0 +1,2 @@
import { isArrayLikeObject } from "../fp";
export = isArrayLikeObject;

View File

@@ -0,0 +1,50 @@
# Change Log
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## 2.0.0
* Add custom error classes
<a name="1.0.2"></a>
## [1.0.2](https://github.com/npm/json-parse-even-better-errors/compare/v1.0.1...v1.0.2) (2018-03-30)
### Bug Fixes
* **messages:** More friendly messages for non-string ([#1](https://github.com/npm/json-parse-even-better-errors/issues/1)) ([a476d42](https://github.com/npm/json-parse-even-better-errors/commit/a476d42))
<a name="1.0.1"></a>
## [1.0.1](https://github.com/npm/json-parse-even-better-errors/compare/v1.0.0...v1.0.1) (2017-08-16)
### Bug Fixes
* **license:** oops. Forgot to update license.md ([efe2958](https://github.com/npm/json-parse-even-better-errors/commit/efe2958))
<a name="1.0.0"></a>
# 1.0.0 (2017-08-15)
### Features
* **init:** Initial Commit ([562c977](https://github.com/npm/json-parse-even-better-errors/commit/562c977))
### BREAKING CHANGES
* **init:** This is the first commit!
<a name="0.1.0"></a>
# 0.1.0 (2017-08-15)
### Features
* **init:** Initial Commit ([9dd1a19](https://github.com/npm/json-parse-even-better-errors/commit/9dd1a19))

View File

@@ -0,0 +1 @@
{"version":3,"file":"align-end-vertical.js","sources":["../../../src/icons/align-end-vertical.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlignEndVertical\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTYiIGhlaWdodD0iNiIgeD0iMiIgeT0iNCIgcng9IjIiIC8+CiAgPHJlY3Qgd2lkdGg9IjkiIGhlaWdodD0iNiIgeD0iOSIgeT0iMTQiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0yMiAyMlYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/align-end-vertical\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst AlignEndVertical = createLucideIcon('AlignEndVertical', [\n ['rect', { width: '16', height: '6', x: '2', y: '4', rx: '2', key: '10wcwx' }],\n ['rect', { width: '9', height: '6', x: '9', y: '14', rx: '2', key: '4p5bwg' }],\n ['path', { d: 'M22 22V2', key: '12ipfv' }],\n]);\n\nexport default AlignEndVertical;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,iBAAiB,kBAAoB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,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,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"backgroundtab.js","sources":["../../../../../src/tracing/backgroundtab.ts"],"sourcesContent":["import { debug, getActiveSpan, getRootSpan, SPAN_STATUS_ERROR, spanToJSON } from '@sentry/core';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection(): void {\n if (WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n return;\n }\n\n const rootSpan = getRootSpan(activeSpan);\n\n if (WINDOW.document.hidden && rootSpan) {\n const cancelledStatus = 'cancelled';\n\n const { op, status } = spanToJSON(rootSpan);\n\n if (DEBUG_BUILD) {\n debug.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);\n }\n\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!status) {\n rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus });\n }\n\n rootSpan.setAttribute('sentry.cancellation_reason', 'document.hidden');\n rootSpan.end();\n }\n });\n } else {\n DEBUG_BUILD && debug.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n"],"names":[],"mappings":";;;;AAIA;AACA;AACA;AACA;AACO,SAAS,8BAA8B,GAAS;AACvD,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;AACvB,IAAI,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,MAAM;AAC/D,MAAM,MAAM,UAAA,GAAa,aAAa,EAAE;AACxC,MAAM,IAAI,CAAC,UAAU,EAAE;AACvB,QAAQ;AACR,MAAM;;AAEN,MAAM,MAAM,QAAA,GAAW,WAAW,CAAC,UAAU,CAAC;;AAE9C,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAA,IAAU,QAAQ,EAAE;AAC9C,QAAQ,MAAM,eAAA,GAAkB,WAAW;;AAE3C,QAAQ,MAAM,EAAE,EAAE,EAAE,MAAA,KAAW,UAAU,CAAC,QAAQ,CAAC;;AAEnD,QAAQ,IAAI,WAAW,EAAE;AACzB,UAAU,KAAK,CAAC,GAAG,CAAC,CAAC,uBAAuB,EAAE,eAAe,CAAC,2CAA2C,EAAE,EAAE,CAAC,CAAA,CAAA;AACA,QAAA;;AAEA;AACA;AACA,QAAA,IAAA,CAAA,MAAA,EAAA;AACA,UAAA,QAAA,CAAA,SAAA,CAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,eAAA,EAAA,CAAA;AACA,QAAA;;AAEA,QAAA,QAAA,CAAA,YAAA,CAAA,4BAAA,EAAA,iBAAA,CAAA;AACA,QAAA,QAAA,CAAA,GAAA,EAAA;AACA,MAAA;AACA,IAAA,CAAA,CAAA;AACA,EAAA,CAAA,MAAA;AACA,IAAA,WAAA,IAAA,KAAA,CAAA,IAAA,CAAA,oFAAA,CAAA;AACA,EAAA;AACA;;;;"}

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const node_crypto_1 = require("node:crypto");
let ciphers;
exports.default = (algorithm) => {
ciphers ||= new Set((0, node_crypto_1.getCiphers)());
return ciphers.has(algorithm);
};

View File

@@ -0,0 +1,14 @@
import type { BasePostgresAdapter } from './types.js';
type Args = {
/**
* Name of a database, defaults to the current one
*/
name?: string;
/**
* Schema to create in addition to 'public'. Defaults to adapter.schemaName if exists.
*/
schemaName?: string;
};
export declare const createDatabase: (this: BasePostgresAdapter, args?: Args) => Promise<boolean>;
export {};
//# sourceMappingURL=createDatabase.d.ts.map

View File

@@ -0,0 +1,2 @@
import{formatFields as e}from"../../utils/format-fields.js";function t(t){return()=>{let n=t();return n.method===`GET`&&n.params&&(n.method=`SEARCH`,n.body=JSON.stringify({query:{...n.params,fields:e(n.params.fields??[])}}),delete n.params),n}}export{t as withSearch};
//# sourceMappingURL=with-search.js.map

View File

@@ -0,0 +1,23 @@
import { Exception } from '@opentelemetry/api';
/**
* This interface defines the params that are be added to the wrapped function
* using the "shimmer.wrap"
*/
export interface ShimWrapped extends Function {
__wrapped: boolean;
__unwrap: Function;
__original: Function;
}
/**
* An instrumentation scope consists of the name and optional version
* used to obtain a tracer or meter from a provider. This metadata is made
* available on ReadableSpan and MetricRecord for use by the export pipeline.
*/
export interface InstrumentationScope {
readonly name: string;
readonly version?: string;
readonly schemaUrl?: string;
}
/** Defines an error handler function */
export type ErrorHandler = (ex: Exception) => void;
//# sourceMappingURL=types.d.ts.map

View File

@@ -0,0 +1,11 @@
import { createOperation } from './create.js';
export const duplicateOperation = async (incomingArgs)=>{
const { id, ...args } = incomingArgs;
return createOperation({
...args,
data: incomingArgs?.data || {},
duplicateFromID: id
});
};
//# sourceMappingURL=duplicate.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AASpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C;;GAEG;AACH,wBAAgB,wCAAwC,IAAI,WAAW,EAAE,CAOxE;AAED,qDAAqD;AACrD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAStE;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAElF;AA4BD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAE5G"}

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const ArrowUpWideNarrow = createLucideIcon("ArrowUpWideNarrow", [
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
["path", { d: "M7 4v16", key: "1glfcx" }],
["path", { d: "M11 12h10", key: "1438ji" }],
["path", { d: "M11 16h7", key: "uosisv" }],
["path", { d: "M11 20h4", key: "1krc32" }]
]);
export { ArrowUpWideNarrow as default };
//# sourceMappingURL=arrow-up-wide-narrow.js.map

View File

@@ -0,0 +1,18 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import * as modDev from './LexicalText.dev.mjs';
import * as modProd from './LexicalText.prod.mjs';
const mod = process.env.NODE_ENV !== 'production' ? modDev : modProd;
export const $canShowPlaceholder = mod.$canShowPlaceholder;
export const $canShowPlaceholderCurry = mod.$canShowPlaceholderCurry;
export const $findTextIntersectionFromCharacters = mod.$findTextIntersectionFromCharacters;
export const $isRootTextContentEmpty = mod.$isRootTextContentEmpty;
export const $isRootTextContentEmptyCurry = mod.$isRootTextContentEmptyCurry;
export const $rootTextContent = mod.$rootTextContent;
export const registerLexicalTextEntity = mod.registerLexicalTextEntity;

View File

@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createFlowUnionType;
var _index = require("../generated/index.js");
var _removeTypeDuplicates = require("../../modifications/flow/removeTypeDuplicates.js");
function createFlowUnionType(types) {
const flattened = (0, _removeTypeDuplicates.default)(types);
if (flattened.length === 1) {
return flattened[0];
} else {
return (0, _index.unionTypeAnnotation)(flattened);
}
}
//# sourceMappingURL=createFlowUnionType.js.map

View File

@@ -0,0 +1,8 @@
export { defaultAnnouncements, defaultScreenReaderInstructions, } from './Accessibility';
export type { Announcements, ScreenReaderInstructions } from './Accessibility';
export { DndContext } from './DndContext';
export type { CancelDrop, DndContextProps, DraggableMeasuring, MeasuringConfiguration, } from './DndContext';
export { useDndMonitor } from './DndMonitor';
export type { DndMonitorListener } from './DndMonitor';
export { DragOverlay, defaultDropAnimation, defaultDropAnimationSideEffects, } from './DragOverlay';
export type { DropAnimation, DropAnimationFunction, DropAnimationFunctionArguments, DropAnimationKeyframeResolver, DropAnimationSideEffects, Props as DragOverlayProps, } from './DragOverlay';

View File

@@ -0,0 +1,21 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const misc = require('./misc.js');
/**
* Generate a random, valid trace ID.
*/
function generateTraceId() {
return misc.uuid4();
}
/**
* Generate a random, valid span ID.
*/
function generateSpanId() {
return misc.uuid4().substring(16);
}
exports.generateSpanId = generateSpanId;
exports.generateTraceId = generateTraceId;
//# sourceMappingURL=propagationContext.js.map

View File

@@ -0,0 +1,152 @@
(function (global, factory) {
if (typeof exports === 'object' && typeof module !== 'undefined') {
factory(module, require('@jridgewell/gen-mapping'), require('@jridgewell/trace-mapping'));
module.exports = def(module);
} else if (typeof define === 'function' && define.amd) {
define(['module', '@jridgewell/gen-mapping', '@jridgewell/trace-mapping'], function(mod) {
factory.apply(this, arguments);
mod.exports = def(mod);
});
} else {
const mod = { exports: {} };
factory(mod, global.genMapping, global.traceMapping);
global = typeof globalThis !== 'undefined' ? globalThis : global || self;
global.sourceMap = def(mod);
}
function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
})(this, (function (module, require_genMapping, require_traceMapping) {
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// umd:@jridgewell/trace-mapping
var require_trace_mapping = __commonJS({
"umd:@jridgewell/trace-mapping"(exports, module2) {
module2.exports = require_traceMapping;
}
});
// umd:@jridgewell/gen-mapping
var require_gen_mapping = __commonJS({
"umd:@jridgewell/gen-mapping"(exports, module2) {
module2.exports = require_genMapping;
}
});
// src/source-map.ts
var source_map_exports = {};
__export(source_map_exports, {
SourceMapConsumer: () => SourceMapConsumer,
SourceMapGenerator: () => SourceMapGenerator
});
module.exports = __toCommonJS(source_map_exports);
var import_trace_mapping = __toESM(require_trace_mapping());
var import_gen_mapping = __toESM(require_gen_mapping());
var SourceMapConsumer = class _SourceMapConsumer {
constructor(map, mapUrl) {
const trace = this._map = new import_trace_mapping.AnyMap(map, mapUrl);
this.file = trace.file;
this.names = trace.names;
this.sourceRoot = trace.sourceRoot;
this.sources = trace.resolvedSources;
this.sourcesContent = trace.sourcesContent;
this.version = trace.version;
}
static fromSourceMap(map, mapUrl) {
if (map.toDecodedMap) {
return new _SourceMapConsumer(map.toDecodedMap(), mapUrl);
}
return new _SourceMapConsumer(map.toJSON(), mapUrl);
}
get mappings() {
return (0, import_trace_mapping.encodedMappings)(this._map);
}
originalPositionFor(needle) {
return (0, import_trace_mapping.originalPositionFor)(this._map, needle);
}
generatedPositionFor(originalPosition) {
return (0, import_trace_mapping.generatedPositionFor)(this._map, originalPosition);
}
allGeneratedPositionsFor(originalPosition) {
return (0, import_trace_mapping.allGeneratedPositionsFor)(this._map, originalPosition);
}
hasContentsOfAllSources() {
if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {
return false;
}
for (const content of this.sourcesContent) {
if (content == null) {
return false;
}
}
return true;
}
sourceContentFor(source, nullOnMissing) {
const sourceContent = (0, import_trace_mapping.sourceContentFor)(this._map, source);
if (sourceContent != null) {
return sourceContent;
}
if (nullOnMissing) {
return null;
}
throw new Error(`"${source}" is not in the SourceMap.`);
}
eachMapping(callback, context) {
(0, import_trace_mapping.eachMapping)(this._map, context ? callback.bind(context) : callback);
}
destroy() {
}
};
var SourceMapGenerator = class _SourceMapGenerator {
constructor(opts) {
this._map = opts instanceof import_gen_mapping.GenMapping ? opts : new import_gen_mapping.GenMapping(opts);
}
static fromSourceMap(consumer) {
return new _SourceMapGenerator((0, import_gen_mapping.fromMap)(consumer));
}
addMapping(mapping) {
(0, import_gen_mapping.maybeAddMapping)(this._map, mapping);
}
setSourceContent(source, content) {
(0, import_gen_mapping.setSourceContent)(this._map, source, content);
}
toJSON() {
return (0, import_gen_mapping.toEncodedMap)(this._map);
}
toString() {
return JSON.stringify(this.toJSON());
}
toDecodedMap() {
return (0, import_gen_mapping.toDecodedMap)(this._map);
}
};
}));
//# sourceMappingURL=source-map.umd.js.map

View File

@@ -0,0 +1,156 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;
// eslint-disable-next-line @typescript-eslint/no-extraneous-class
class _CodeOrName {
}
exports._CodeOrName = _CodeOrName;
exports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
class Name extends _CodeOrName {
constructor(s) {
super();
if (!exports.IDENTIFIER.test(s))
throw new Error("CodeGen: name must be a valid identifier");
this.str = s;
}
toString() {
return this.str;
}
emptyStr() {
return false;
}
get names() {
return { [this.str]: 1 };
}
}
exports.Name = Name;
class _Code extends _CodeOrName {
constructor(code) {
super();
this._items = typeof code === "string" ? [code] : code;
}
toString() {
return this.str;
}
emptyStr() {
if (this._items.length > 1)
return false;
const item = this._items[0];
return item === "" || item === '""';
}
get str() {
var _a;
return ((_a = this._str) !== null && _a !== void 0 ? _a : (this._str = this._items.reduce((s, c) => `${s}${c}`, "")));
}
get names() {
var _a;
return ((_a = this._names) !== null && _a !== void 0 ? _a : (this._names = this._items.reduce((names, c) => {
if (c instanceof Name)
names[c.str] = (names[c.str] || 0) + 1;
return names;
}, {})));
}
}
exports._Code = _Code;
exports.nil = new _Code("");
function _(strs, ...args) {
const code = [strs[0]];
let i = 0;
while (i < args.length) {
addCodeArg(code, args[i]);
code.push(strs[++i]);
}
return new _Code(code);
}
exports._ = _;
const plus = new _Code("+");
function str(strs, ...args) {
const expr = [safeStringify(strs[0])];
let i = 0;
while (i < args.length) {
expr.push(plus);
addCodeArg(expr, args[i]);
expr.push(plus, safeStringify(strs[++i]));
}
optimize(expr);
return new _Code(expr);
}
exports.str = str;
function addCodeArg(code, arg) {
if (arg instanceof _Code)
code.push(...arg._items);
else if (arg instanceof Name)
code.push(arg);
else
code.push(interpolate(arg));
}
exports.addCodeArg = addCodeArg;
function optimize(expr) {
let i = 1;
while (i < expr.length - 1) {
if (expr[i] === plus) {
const res = mergeExprItems(expr[i - 1], expr[i + 1]);
if (res !== undefined) {
expr.splice(i - 1, 3, res);
continue;
}
expr[i++] = "+";
}
i++;
}
}
function mergeExprItems(a, b) {
if (b === '""')
return a;
if (a === '""')
return b;
if (typeof a == "string") {
if (b instanceof Name || a[a.length - 1] !== '"')
return;
if (typeof b != "string")
return `${a.slice(0, -1)}${b}"`;
if (b[0] === '"')
return a.slice(0, -1) + b.slice(1);
return;
}
if (typeof b == "string" && b[0] === '"' && !(a instanceof Name))
return `"${a}${b.slice(1)}`;
return;
}
function strConcat(c1, c2) {
return c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str `${c1}${c2}`;
}
exports.strConcat = strConcat;
// TODO do not allow arrays here
function interpolate(x) {
return typeof x == "number" || typeof x == "boolean" || x === null
? x
: safeStringify(Array.isArray(x) ? x.join(",") : x);
}
function stringify(x) {
return new _Code(safeStringify(x));
}
exports.stringify = stringify;
function safeStringify(x) {
return JSON.stringify(x)
.replace(/\u2028/g, "\\u2028")
.replace(/\u2029/g, "\\u2029");
}
exports.safeStringify = safeStringify;
function getProperty(key) {
return typeof key == "string" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _ `[${key}]`;
}
exports.getProperty = getProperty;
//Does best effort to format the name properly
function getEsmExportName(key) {
if (typeof key == "string" && exports.IDENTIFIER.test(key)) {
return new _Code(`${key}`);
}
throw new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);
}
exports.getEsmExportName = getEsmExportName;
function regexpCode(rx) {
return new _Code(rx.toString());
}
exports.regexpCode = regexpCode;
//# sourceMappingURL=code.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/elements/FolderView/DraggableWithClick/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAwB,MAAM,OAAO,CAAA;AAE5C,OAAO,cAAc,CAAA;AAIrB,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAA;IAC/B,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACnC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAA;IAC/C,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAA;IACrD,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAA;IAC9C,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAClC,CAAA;AAED,eAAO,MAAM,kBAAkB,qFAS5B,KAAK,sBAqEP,CAAA"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../src/preferences/operations/delete.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAS,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAMpD,wBAAsB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC,CA8BhF"}

View File

@@ -0,0 +1,17 @@
@import '../../../../scss/styles';
@layer payload-default {
.query-preset-columns-field {
.field-label {
margin-bottom: calc(var(--base) / 2);
}
.value-wrapper {
background-color: var(--theme-elevation-50);
padding: var(--base);
display: flex;
flex-wrap: wrap;
gap: calc(var(--base) / 2);
}
}
}

View File

@@ -0,0 +1,225 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import { DndContext } from '@dnd-kit/core';
import React, { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react';
import { usePopupWindow } from '../../hooks/usePopupWindow.js';
import { useDocumentInfo } from '../../providers/DocumentInfo/index.js';
import { usePreferences } from '../../providers/Preferences/index.js';
import { formatAbsoluteURL } from '../../utilities/formatAbsoluteURL.js';
import { customCollisionDetection } from './collisionDetection.js';
import { LivePreviewContext } from './context.js';
import { sizeReducer } from './sizeReducer.js';
export const LivePreviewProvider = ({
breakpoints: incomingBreakpoints,
children,
isLivePreviewEnabled,
isLivePreviewing: incomingIsLivePreviewing,
isPreviewEnabled,
previewURL: previewURLFromProps,
typeofLivePreviewURL,
url: urlFromProps
}) => {
const [previewWindowType, setPreviewWindowType] = useState('iframe');
const [isLivePreviewing, setIsLivePreviewing] = useState(incomingIsLivePreviewing);
const breakpoints = useMemo(() => [...(incomingBreakpoints || []), {
name: 'responsive',
height: '100%',
label: 'Responsive',
width: '100%'
}], [incomingBreakpoints]);
const [url, setURL] = useState('');
const [previewURL, setPreviewURL] = useState(previewURLFromProps);
const {
isPopupOpen,
openPopupWindow,
popupRef
} = usePopupWindow({
eventType: 'payload-live-preview',
url
});
const [appIsReady, setAppIsReady] = useState(false);
const [listeningForMessages, setListeningForMessages] = useState(false);
const {
collectionSlug,
globalSlug
} = useDocumentInfo();
const isFirstRender = useRef(true);
const {
setPreference
} = usePreferences();
const iframeRef = React.useRef(null);
const [loadedURL, setLoadedURL] = useState();
const [zoom, setZoom] = useState(1);
const [position, setPosition] = useState({
x: 0,
y: 0
});
const [size, setSize] = React.useReducer(sizeReducer, {
height: 0,
width: 0
});
const [measuredDeviceSize, setMeasuredDeviceSize] = useState({
height: 0,
width: 0
});
const [breakpoint, setBreakpoint] = React.useState('responsive');
/**
* A "middleware" callback fn that does some additional work before `setURL`.
* This is what we provide through context, bc it:
* - ensures the URL is absolute
* - resets `appIsReady` to `false` while the new URL is loading
*/
const setLivePreviewURL = useCallback(_incomingURL => {
let incomingURL;
if (typeof _incomingURL === 'string') {
incomingURL = formatAbsoluteURL(_incomingURL);
}
if (!incomingURL) {
setIsLivePreviewing(false);
}
if (incomingURL !== url) {
setAppIsReady(false);
setURL(incomingURL);
}
}, [url]);
/**
* `url` needs to be relative to the window, which cannot be done on initial render.
*/
useEffect(() => {
if (typeof urlFromProps === 'string') {
setURL(formatAbsoluteURL(urlFromProps));
}
}, [urlFromProps]);
// The toolbar needs to freely drag and drop around the page
const handleDragEnd = ev => {
// only update position if the toolbar is completely within the preview area
// otherwise reset it back to the previous position
// TODO: reset to the nearest edge of the preview area
if (ev.over && ev.over.id === 'live-preview-area') {
const newPos = {
x: position.x + ev.delta.x,
y: position.y + ev.delta.y
};
setPosition(newPos);
} else {
// reset
}
};
const setWidth = useCallback(width => {
setSize({
type: 'width',
value: width
});
}, [setSize]);
const setHeight = useCallback(height => {
setSize({
type: 'height',
value: height
});
}, [setSize]);
// explicitly set new width and height when as new breakpoints are selected
// exclude `custom` breakpoint as it is handled by the `setWidth` and `setHeight` directly
useEffect(() => {
const foundBreakpoint = breakpoints?.find(bp => bp.name === breakpoint);
if (foundBreakpoint && breakpoint !== 'responsive' && breakpoint !== 'custom' && typeof foundBreakpoint?.width === 'number' && typeof foundBreakpoint?.height === 'number') {
setSize({
type: 'reset',
value: {
height: foundBreakpoint.height,
width: foundBreakpoint.width
}
});
}
}, [breakpoint, breakpoints]);
/**
* Receive the `ready` message from the popup window
* This indicates that the app is ready to receive `window.postMessage` events
* This is also the only cross-origin way of detecting when a popup window has loaded
* Unlike iframe elements which have an `onLoad` handler, there is no way to access `window.open` on popups
*/
useEffect(() => {
const handleMessage = event => {
if (url?.startsWith(event.origin) && event.data && typeof event.data === 'object' && event.data.type === 'payload-live-preview') {
if (event.data.ready) {
setAppIsReady(true);
}
}
};
window.addEventListener('message', handleMessage);
setListeningForMessages(true);
return () => {
window.removeEventListener('message', handleMessage);
};
}, [url, listeningForMessages]);
const handleWindowChange = useCallback(type => {
setAppIsReady(false);
setPreviewWindowType(type);
if (type === 'popup') {
openPopupWindow();
}
}, [openPopupWindow]);
// when the user closes the popup window, switch back to the iframe
// the `usePopupWindow` reports the `isPopupOpen` state for us to use here
useEffect(() => {
const newPreviewWindowType = isPopupOpen ? 'popup' : 'iframe';
if (newPreviewWindowType !== previewWindowType) {
handleWindowChange('iframe');
}
}, [previewWindowType, isPopupOpen, handleWindowChange]);
useEffect(() => {
if (isFirstRender.current) {
isFirstRender.current = false;
return;
}
void setPreference(collectionSlug ? `collection-${collectionSlug}` : `global-${globalSlug}`, {
editViewType: isLivePreviewing ? 'live-preview' : 'default'
}, true);
}, [isLivePreviewing, setPreference, collectionSlug, globalSlug]);
const dndContextID = useId();
return /*#__PURE__*/_jsx(LivePreviewContext, {
value: {
appIsReady,
breakpoint,
breakpoints,
iframeRef,
isLivePreviewEnabled,
isLivePreviewing,
isPopupOpen,
isPreviewEnabled,
listeningForMessages,
loadedURL,
measuredDeviceSize,
openPopupWindow,
popupRef,
previewURL,
previewWindowType,
setAppIsReady,
setBreakpoint,
setHeight,
setIsLivePreviewing,
setLoadedURL,
setMeasuredDeviceSize,
setPreviewURL,
setPreviewWindowType: handleWindowChange,
setSize,
setToolbarPosition: setPosition,
setURL: setLivePreviewURL,
setWidth,
setZoom,
size,
toolbarPosition: position,
typeofLivePreviewURL,
url,
zoom
},
children: /*#__PURE__*/_jsx(DndContext, {
collisionDetection: customCollisionDetection,
// Provide stable ID to fix hydration issues: https://github.com/clauderic/dnd-kit/issues/926
id: dndContextID,
onDragEnd: handleDragEnd,
children: children
})
});
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,38 @@
import { toDate } from "./toDate.js";
/**
* The {@link lastDayOfDecade} function options.
*/
/**
* @name lastDayOfDecade
* @category Decade Helpers
* @summary Return the last day of a decade for the given date.
*
* @description
* Return the last day of a decade for the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows using extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The result `Date` type; inferred from arguments or specified by context.
*
* @param date - The original date
* @param options - The options
*
* @returns The last day of a decade
*
* @example
* // The last day of a decade for 21 December 2012 21:12:00:
* const result = lastDayOfDecade(new Date(2012, 11, 21, 21, 12, 00))
* //=> Wed Dec 31 2019 00:00:00
*/
export function lastDayOfDecade(date, options) {
const _date = toDate(date, options?.in);
const year = _date.getFullYear();
const decade = 9 + Math.floor(year / 10) * 10;
_date.setFullYear(decade + 1, 0, 0);
_date.setHours(0, 0, 0, 0);
return toDate(_date, options?.in);
}
// Fallback for modularized imports:
export default lastDayOfDecade;

View File

@@ -0,0 +1,126 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var driver_exports = {};
__export(driver_exports, {
AwsDataApiPgDatabase: () => AwsDataApiPgDatabase,
AwsPgDialect: () => AwsPgDialect,
drizzle: () => drizzle
});
module.exports = __toCommonJS(driver_exports);
var import_client_rds_data = require("@aws-sdk/client-rds-data");
var import_entity = require("../../entity.cjs");
var import_logger = require("../../logger.cjs");
var import_db = require("../../pg-core/db.cjs");
var import_dialect = require("../../pg-core/dialect.cjs");
var import_pg_core = require("../../pg-core/index.cjs");
var import_relations = require("../../relations.cjs");
var import_sql = require("../../sql/sql.cjs");
var import_table = require("../../table.cjs");
var import_session = require("./session.cjs");
class AwsDataApiPgDatabase extends import_db.PgDatabase {
static [import_entity.entityKind] = "AwsDataApiPgDatabase";
execute(query) {
return super.execute(query);
}
}
class AwsPgDialect extends import_dialect.PgDialect {
static [import_entity.entityKind] = "AwsPgDialect";
escapeParam(num) {
return `:${num + 1}`;
}
buildInsertQuery({ table, values, onConflict, returning, select, withList }) {
const columns = table[import_table.Table.Symbol.Columns];
if (!select) {
for (const value of values) {
for (const fieldName of Object.keys(columns)) {
const colValue = value[fieldName];
if ((0, import_entity.is)(colValue, import_sql.Param) && colValue.value !== void 0 && (0, import_entity.is)(colValue.encoder, import_pg_core.PgArray) && Array.isArray(colValue.value)) {
value[fieldName] = import_sql.sql`cast(${colValue} as ${import_sql.sql.raw(colValue.encoder.getSQLType())})`;
}
}
}
}
return super.buildInsertQuery({ table, values, onConflict, returning, withList });
}
buildUpdateSet(table, set) {
const columns = table[import_table.Table.Symbol.Columns];
for (const [colName, colValue] of Object.entries(set)) {
const currentColumn = columns[colName];
if (currentColumn && (0, import_entity.is)(colValue, import_sql.Param) && colValue.value !== void 0 && (0, import_entity.is)(colValue.encoder, import_pg_core.PgArray) && Array.isArray(colValue.value)) {
set[colName] = import_sql.sql`cast(${colValue} as ${import_sql.sql.raw(colValue.encoder.getSQLType())})`;
}
}
return super.buildUpdateSet(table, set);
}
}
function construct(client, config) {
const dialect = new AwsPgDialect({ casing: config.casing });
let logger;
if (config.logger === true) {
logger = new import_logger.DefaultLogger();
} else if (config.logger !== false) {
logger = config.logger;
}
let schema;
if (config.schema) {
const tablesConfig = (0, import_relations.extractTablesRelationalConfig)(
config.schema,
import_relations.createTableRelationsHelpers
);
schema = {
fullSchema: config.schema,
schema: tablesConfig.tables,
tableNamesMap: tablesConfig.tableNamesMap
};
}
const session = new import_session.AwsDataApiSession(client, dialect, schema, { ...config, logger, cache: config.cache }, void 0);
const db = new AwsDataApiPgDatabase(dialect, session, schema);
db.$client = client;
db.$cache = config.cache;
if (db.$cache) {
db.$cache["invalidate"] = config.cache?.onMutate;
}
return db;
}
function drizzle(...params) {
if (params[0] instanceof import_client_rds_data.RDSDataClient || params[0].constructor.name !== "Object") {
return construct(params[0], params[1]);
}
if (params[0].client) {
const { client, ...drizzleConfig2 } = params[0];
return construct(client, drizzleConfig2);
}
const { connection, ...drizzleConfig } = params[0];
const { resourceArn, database, secretArn, ...rdsConfig } = connection;
const instance = new import_client_rds_data.RDSDataClient(rdsConfig);
return construct(instance, { resourceArn, database, secretArn, ...drizzleConfig });
}
((drizzle2) => {
function mock(config) {
return construct({}, config);
}
drizzle2.mock = mock;
})(drizzle || (drizzle = {}));
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
AwsDataApiPgDatabase,
AwsPgDialect,
drizzle
});
//# sourceMappingURL=driver.cjs.map

View File

@@ -0,0 +1,145 @@
"use strict";
exports.match = void 0;
var _index = require("../../_lib/buildMatchPatternFn.js");
var _index2 = require("../../_lib/buildMatchFn.js");
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(ق|ب)/i,
abbreviated: /^(ق\.?\s?م\.?|ق\.?\s?م\.?\s?|a\.?\s?d\.?|c\.?\s?)/i,
wide: /^(قبل الميلاد|قبل الميلاد|بعد الميلاد|بعد الميلاد)/i,
};
const parseEraPatterns = {
any: [/^قبل/i, /^بعد/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^ر[1234]/i,
wide: /^الربع [1234]/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^[جفمأسند]/i,
abbreviated: /^(جان|فيف|مار|أفر|ماي|جوا|جوي|أوت|سبت|أكت|نوف|ديس)/i,
wide: /^(جانفي|فيفري|مارس|أفريل|ماي|جوان|جويلية|أوت|سبتمبر|أكتوبر|نوفمبر|ديسمبر)/i,
};
const parseMonthPatterns = {
narrow: [
/^ج/i,
/^ف/i,
/^م/i,
/^أ/i,
/^م/i,
/^ج/i,
/^ج/i,
/^أ/i,
/^س/i,
/^أ/i,
/^ن/i,
/^د/i,
],
any: [
/^جان/i,
/^فيف/i,
/^مار/i,
/^أفر/i,
/^ماي/i,
/^جوا/i,
/^جوي/i,
/^أوت/i,
/^سبت/i,
/^أكت/i,
/^نوف/i,
/^ديس/i,
],
};
const matchDayPatterns = {
narrow: /^[حنثرخجس]/i,
short: /^(أحد|اثنين|ثلاثاء|أربعاء|خميس|جمعة|سبت)/i,
abbreviated: /^(أحد|اثن|ثلا|أرب|خمي|جمعة|سبت)/i,
wide: /^(الأحد|الاثنين|الثلاثاء|الأربعاء|الخميس|الجمعة|السبت)/i,
};
const parseDayPatterns = {
narrow: [/^ح/i, /^ن/i, /^ث/i, /^ر/i, /^خ/i, /^ج/i, /^س/i],
wide: [
/^الأحد/i,
/^الاثنين/i,
/^الثلاثاء/i,
/^الأربعاء/i,
/^الخميس/i,
/^الجمعة/i,
/^السبت/i,
],
any: [/^أح/i, /^اث/i, /^ث/i, /^أر/i, /^خ/i, /^ج/i, /^س/i],
};
const matchDayPeriodPatterns = {
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^a/i,
pm: /^p/i,
midnight: /^mi/i,
noon: /^no/i,
morning: /morning/i,
afternoon: /afternoon/i,
evening: /evening/i,
night: /night/i,
},
};
const match = (exports.match = {
ordinalNumber: (0, _index.buildMatchPatternFn)({
matchPattern: matchOrdinalNumberPattern,
parsePattern: parseOrdinalNumberPattern,
valueCallback: (value) => parseInt(value, 10),
}),
era: (0, _index2.buildMatchFn)({
matchPatterns: matchEraPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseEraPatterns,
defaultParseWidth: "any",
}),
quarter: (0, _index2.buildMatchFn)({
matchPatterns: matchQuarterPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseQuarterPatterns,
defaultParseWidth: "any",
valueCallback: (index) => Number(index) + 1,
}),
month: (0, _index2.buildMatchFn)({
matchPatterns: matchMonthPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseMonthPatterns,
defaultParseWidth: "any",
}),
day: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPatterns,
defaultMatchWidth: "wide",
parsePatterns: parseDayPatterns,
defaultParseWidth: "any",
}),
dayPeriod: (0, _index2.buildMatchFn)({
matchPatterns: matchDayPeriodPatterns,
defaultMatchWidth: "any",
parsePatterns: parseDayPeriodPatterns,
defaultParseWidth: "any",
}),
});

View File

@@ -0,0 +1,90 @@
import { defaultAccess } from '../auth/defaultAccess.js';
const operations = [
'delete',
'read',
'update',
'create'
];
const defaultCollectionAccess = {
create: defaultAccess,
delete: defaultAccess,
read: defaultAccess,
unlock: defaultAccess,
update: defaultAccess
};
export const getAccess = (config)=>operations.reduce((acc, operation)=>{
acc[operation] = async (args)=>{
const { req } = args;
const collectionAccess = config?.queryPresets?.access?.[operation] ? await config.queryPresets.access[operation](args) : defaultCollectionAccess?.[operation] ? defaultCollectionAccess[operation](args) : true;
// If collection-level access control is `false`, no need to continue to document-level access
if (collectionAccess === false) {
return false;
}
// The `create` operation does not affect the document-level access control
if (operation === 'create') {
return collectionAccess;
}
return {
and: [
{
or: [
// Default access control ensures a user exists, but custom access control may not
...req?.user ? [
{
and: [
{
[`access.${operation}.users`]: {
in: [
req.user.id
]
}
},
{
[`access.${operation}.constraint`]: {
in: [
'onlyMe',
'specificUsers'
]
}
}
]
}
] : [],
{
[`access.${operation}.constraint`]: {
equals: 'everyone'
}
},
...await Promise.all((config?.queryPresets?.constraints?.[operation] || []).map(async (constraint)=>{
const constraintAccess = constraint.access ? await constraint.access(args) : undefined;
return {
and: [
...typeof constraintAccess === 'object' ? [
constraintAccess
] : constraintAccess === false ? [
{
id: {
equals: null
}
}
] : [],
{
[`access.${operation}.constraint`]: {
equals: constraint.value
}
}
]
};
}))
]
},
...typeof collectionAccess === 'object' ? [
collectionAccess
] : []
]
};
};
return acc;
}, {});
//# sourceMappingURL=access.js.map

View File

@@ -0,0 +1,5 @@
import type { WidgetServerProps } from 'payload';
import React from 'react';
import './index.scss';
export declare function CollectionCards(props: WidgetServerProps): Promise<React.JSX.Element>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,57 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var text_exports = {};
__export(text_exports, {
PgText: () => PgText,
PgTextBuilder: () => PgTextBuilder,
text: () => text
});
module.exports = __toCommonJS(text_exports);
var import_entity = require("../../entity.cjs");
var import_utils = require("../../utils.cjs");
var import_common = require("./common.cjs");
class PgTextBuilder extends import_common.PgColumnBuilder {
static [import_entity.entityKind] = "PgTextBuilder";
constructor(name, config) {
super(name, "string", "PgText");
this.config.enumValues = config.enum;
}
/** @internal */
build(table) {
return new PgText(table, this.config);
}
}
class PgText extends import_common.PgColumn {
static [import_entity.entityKind] = "PgText";
enumValues = this.config.enumValues;
getSQLType() {
return "text";
}
}
function text(a, b = {}) {
const { name, config } = (0, import_utils.getColumnNameAndConfig)(a, b);
return new PgTextBuilder(name, config);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
PgText,
PgTextBuilder,
text
});
//# sourceMappingURL=text.cjs.map

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = toSequenceExpression;
var _gatherSequenceExpressions = require("./gatherSequenceExpressions.js");
function toSequenceExpression(nodes, scope) {
if (!(nodes != null && nodes.length)) return;
const declars = [];
const result = (0, _gatherSequenceExpressions.default)(nodes, declars);
if (!result) return;
for (const declar of declars) {
scope.push(declar);
}
return result;
}
//# sourceMappingURL=toSequenceExpression.js.map

View File

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

View File

@@ -0,0 +1,46 @@
var baseFindIndex = require('./_baseFindIndex'),
baseIsNaN = require('./_baseIsNaN'),
strictLastIndexOf = require('./_strictLastIndexOf'),
toInteger = require('./toInteger');
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* This method is like `_.indexOf` except that it iterates over elements of
* `array` from right to left.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.lastIndexOf([1, 2, 1, 2], 2);
* // => 3
*
* // Search from the `fromIndex`.
* _.lastIndexOf([1, 2, 1, 2], 2, 2);
* // => 1
*/
function lastIndexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return value === value
? strictLastIndexOf(array, value, index)
: baseFindIndex(array, baseIsNaN, index, true);
}
module.exports = lastIndexOf;

View File

@@ -0,0 +1,36 @@
"use strict";
exports.Hour0to23Parser = void 0;
var _constants = require("../constants.cjs");
var _Parser = require("../Parser.cjs");
var _utils = require("../utils.cjs");
class Hour0to23Parser extends _Parser.Parser {
priority = 70;
parse(dateString, token, match) {
switch (token) {
case "H":
return (0, _utils.parseNumericPattern)(
_constants.numericPatterns.hour23h,
dateString,
);
case "Ho":
return match.ordinalNumber(dateString, { unit: "hour" });
default:
return (0, _utils.parseNDigits)(token.length, dateString);
}
}
validate(_date, value) {
return value >= 0 && value <= 23;
}
set(date, _flags, value) {
date.setHours(value, 0, 0, 0);
return date;
}
incompatibleTokens = ["a", "b", "h", "K", "k", "t", "T"];
}
exports.Hour0to23Parser = Hour0to23Parser;

View File

@@ -0,0 +1 @@
{"version":3,"file":"scissors-line-dashed.js","sources":["../../../src/icons/scissors-line-dashed.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScissorsLineDashed\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNS40MiA5LjQyIDggMTIiIC8+CiAgPGNpcmNsZSBjeD0iNCIgY3k9IjgiIHI9IjIiIC8+CiAgPHBhdGggZD0ibTE0IDYtOC41OCA4LjU4IiAvPgogIDxjaXJjbGUgY3g9IjQiIGN5PSIxNiIgcj0iMiIgLz4KICA8cGF0aCBkPSJNMTAuOCAxNC44IDE0IDE4IiAvPgogIDxwYXRoIGQ9Ik0xNiAxMmgtMiIgLz4KICA8cGF0aCBkPSJNMjIgMTJoLTIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/scissors-line-dashed\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 ScissorsLineDashed = createLucideIcon('ScissorsLineDashed', [\n ['path', { d: 'M5.42 9.42 8 12', key: '12pkuq' }],\n ['circle', { cx: '4', cy: '8', r: '2', key: '107mxr' }],\n ['path', { d: 'm14 6-8.58 8.58', key: 'gvzu5l' }],\n ['circle', { cx: '4', cy: '16', r: '2', key: '1ehqvc' }],\n ['path', { d: 'M10.8 14.8 14 18', key: 'ax7m9r' }],\n ['path', { d: 'M16 12h-2', key: '10asgb' }],\n ['path', { d: 'M22 12h-2', key: '14jgyd' }],\n]);\n\nexport default ScissorsLineDashed;\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,CAAqB,iBAAiB,oBAAsB,CAAA,CAAA,CAAA;AAAA,CAAA,CAChE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,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,CAChD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAmB,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,CAChD,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","names":["c","_c","getTranslation","PeopleIcon","XIcon","useConfig","useTranslation","Pill","baseClass","QueryPresetToggler","t0","$","activePreset","openPresetListDrawer","resetPreset","i18n","t","getEntityConfig","t1","presetsConfig","collectionSlug","t2","t3","filter","Boolean","t4","_jsx","className","join","id","onClick","pillStyle","size","children","_jsxs","isShared","title","label","labels","singular","e","stopPropagation","onKeyDown","e_0","key","role","tabIndex"],"sources":["../../../../src/elements/QueryPresets/QueryPresetToggler/index.tsx"],"sourcesContent":["'use client'\nimport type { QueryPreset } from 'payload'\n\nimport { getTranslation } from '@payloadcms/translations'\n\nimport { PeopleIcon } from '../../../icons/People/index.js'\nimport { XIcon } from '../../../icons/X/index.js'\nimport { useConfig } from '../../../providers/Config/index.js'\nimport { useTranslation } from '../../../providers/Translation/index.js'\nimport { Pill } from '../../Pill/index.js'\nimport './index.scss'\n\nconst baseClass = 'active-query-preset'\n\nexport function QueryPresetToggler({\n activePreset,\n openPresetListDrawer,\n resetPreset,\n}: {\n activePreset: QueryPreset\n openPresetListDrawer: () => void\n resetPreset: () => Promise<void>\n}) {\n const { i18n, t } = useTranslation()\n const { getEntityConfig } = useConfig()\n\n const presetsConfig = getEntityConfig({\n collectionSlug: 'payload-query-presets',\n })\n\n return (\n <Pill\n className={[baseClass, activePreset && `${baseClass}--active`].filter(Boolean).join(' ')}\n id=\"select-preset\"\n onClick={() => {\n openPresetListDrawer()\n }}\n pillStyle=\"light\"\n size=\"small\"\n >\n <div className={`${baseClass}__label`}>\n {activePreset?.isShared && <PeopleIcon className={`${baseClass}__shared`} />}\n <div className={`${baseClass}__label-text-max-width`}>\n <div className={`${baseClass}__label-text`}>\n {activePreset?.title ||\n t('general:selectLabel', {\n label: getTranslation(presetsConfig.labels.singular, i18n),\n })}\n </div>\n </div>\n {activePreset ? (\n <div\n className={`${baseClass}__clear`}\n id=\"clear-preset\"\n onClick={async (e) => {\n e.stopPropagation()\n await resetPreset()\n }}\n onKeyDown={async (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.stopPropagation()\n await resetPreset()\n }\n }}\n role=\"button\"\n tabIndex={0}\n >\n <XIcon />\n </div>\n ) : null}\n </div>\n </Pill>\n )\n}\n"],"mappings":"AAAA;;AAAA,SAAAA,CAAA,IAAAC,EAAA;;AAGA,SAASC,cAAc,QAAQ;AAE/B,SAASC,UAAU,QAAQ;AAC3B,SAASC,KAAK,QAAQ;AACtB,SAASC,SAAS,QAAQ;AAC1B,SAASC,cAAc,QAAQ;AAC/B,SAASC,IAAI,QAAQ;AACrB,OAAO;AAEP,MAAMC,SAAA,GAAY;AAElB,OAAO,SAAAC,mBAAAC,EAAA;EAAA,MAAAC,CAAA,GAAAV,EAAA;EAA4B;IAAAW,YAAA;IAAAC,oBAAA;IAAAC;EAAA,IAAAJ,EAQlC;EACC;IAAAK,IAAA;IAAAC;EAAA,IAAoBV,cAAA;EACpB;IAAAW;EAAA,IAA4BZ,SAAA;EAAA,IAAAa,EAAA;EAAA,IAAAP,CAAA,QAAAC,YAAA,IAAAD,CAAA,QAAAM,eAAA,IAAAN,CAAA,QAAAI,IAAA,IAAAJ,CAAA,QAAAE,oBAAA,IAAAF,CAAA,QAAAG,WAAA,IAAAH,CAAA,QAAAK,CAAA;IAE5B,MAAAG,aAAA,GAAsBF,eAAA;MAAAG,cAAA,EACJ;IAAA,CAClB;IAI2B,MAAAC,EAAA,GAAAT,YAAA,IAAgB,GAAAJ,SAAA,UAAsB;IAAA,IAAAc,EAAA;IAAA,IAAAX,CAAA,QAAAU,EAAA;MAAlDC,EAAA,IAAAd,SAAA,EAAYa,EAAsC,EAAAE,MAAA,CAAAC,OAAS;MAAAb,CAAA,MAAAU,EAAA;MAAAV,CAAA,MAAAW,EAAA;IAAA;MAAAA,EAAA,GAAAX,CAAA;IAAA;IAAA,IAAAc,EAAA;IAAA,IAAAd,CAAA,QAAAE,oBAAA;MAE7DY,EAAA,GAAAA,CAAA;QACPZ,oBAAA;MAAA;MACFF,CAAA,MAAAE,oBAAA;MAAAF,CAAA,OAAAc,EAAA;IAAA;MAAAA,EAAA,GAAAd,CAAA;IAAA;IALFO,EAAA,GAAAQ,IAAA,CAAAnB,IAAA;MAAAoB,SAAA,EACaL,EAA2D,CAAAM,IAAA,CAAc;MAAAC,EAAA,EACjF;MAAAC,OAAA,EACML,EAET;MAAAM,SAAA,EACU;MAAAC,IAAA,EACL;MAAAC,QAAA,EAELC,KAAA,CAAC;QAAAP,SAAA,EAAe,GAAAnB,SAAA,SAAqB;QAAAyB,QAAA,GAClCrB,YAAA,EAAAuB,QAAA,IAA0BT,IAAA,CAAAvB,UAAA;UAAAwB,SAAA,EAAuB,GAAAnB,SAAA;QAAsB,C,GACxEkB,IAAA,CAAC;UAAAC,SAAA,EAAe,GAAAnB,SAAA,wBAAoC;UAAAyB,QAAA,EAClDP,IAAA,CAAC;YAAAC,SAAA,EAAe,GAAAnB,SAAA,cAA0B;YAAAyB,QAAA,EACvCrB,YAAA,EAAAwB,KAAA,IACCpB,CAAA,CAAE;cAAAqB,KAAA,EACOnC,cAAA,CAAeiB,aAAA,CAAAmB,MAAA,CAAAC,QAAA,EAA+BxB,IAAA;YAAA,CACvD;UAAA,C;YAGLH,YAAA,GACCc,IAAA,CAAC;UAAAC,SAAA,EACY,GAAAnB,SAAA,SAAqB;UAAAqB,EAAA,EAC7B;UAAAC,OAAA,QAAAU,CAAA;YAEDA,CAAA,CAAAC,eAAA,CAAiB;YAAA,MACX3B,WAAA;UAAA;UAAA4B,SAAA,QAAAC,GAAA;YAAA,IAGFH,GAAA,CAAAI,GAAA,KAAU,WAAWJ,GAAA,CAAAI,GAAA,KAAU;cACjCJ,GAAA,CAAAC,eAAA,CAAiB;cAAA,MACX3B,WAAA;YAAA;UAAA;UAAA+B,IAAA,EAGL;UAAAC,QAAA;UAAAb,QAAA,EAGLP,IAAA,CAAAtB,KAAA,IAAC;QAAA,C,QAED;MAAA,C;;;;;;;;;;;;SAtCRc,E","ignoreList":[]}

View File

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

View File

@@ -0,0 +1,80 @@
'use strict'
const { test } = require('tap')
const { join } = require('path')
const { MessageChannel } = require('worker_threads')
const { once } = require('events')
const ThreadStream = require('..')
const isYarnPnp = process.versions.pnp !== undefined
test('yarn module resolution', { skip: !isYarnPnp }, t => {
t.plan(6)
const modulePath = require.resolve('pino-elasticsearch')
t.match(modulePath, /.*\.zip.*/)
const stream = new ThreadStream({
filename: modulePath,
workerData: { node: null },
sync: true
})
t.same(stream.writableErrored, null)
stream.on('error', (err) => {
t.same(stream.writableErrored, err)
t.pass('error emitted')
})
t.ok(stream.write('hello world\n'))
t.ok(stream.writable)
stream.end()
})
test('yarn module resolution for directories with special characters', { skip: !isYarnPnp }, async t => {
t.plan(3)
const { port1, port2 } = new MessageChannel()
const stream = new ThreadStream({
filename: join(__dirname, 'dir with spaces', 'test-package.zip', 'worker.js'),
workerData: { port: port1 },
workerOpts: {
transferList: [port1]
},
sync: false
})
t.teardown(() => {
stream.end()
})
t.ok(stream.write('hello world\n'))
t.ok(stream.write('something else\n'))
const [strings] = await once(port2, 'message')
t.equal(strings, 'hello world\nsomething else\n')
})
test('yarn module resolution for typescript commonjs modules', { skip: !isYarnPnp }, async t => {
t.plan(3)
const { port1, port2 } = new MessageChannel()
const stream = new ThreadStream({
filename: join(__dirname, 'ts-commonjs-default-export.zip', 'worker.js'),
workerData: { port: port1 },
workerOpts: {
transferList: [port1]
},
sync: false
})
t.teardown(() => {
stream.end()
})
t.ok(stream.write('hello world\n'))
t.ok(stream.write('something else\n'))
const [strings] = await once(port2, 'message')
t.equal(strings, 'hello world\nsomething else\n')
})

View File

@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('omit', require('../omit'));
func.placeholder = require('./placeholder');
module.exports = func;

View File

@@ -0,0 +1,6 @@
import { GraphQLScalarType } from 'graphql';
import { GraphQLUUIDConfig } from './UUID.js';
export const GraphQLGUIDConfig = /*#__PURE__*/ Object.assign({}, GraphQLUUIDConfig, {
name: 'GUID',
});
export const GraphQLGUID = /*#__PURE__*/ new GraphQLScalarType(GraphQLGUIDConfig);

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","names":[],"sources":["../../../src/elements/ListControls/types.ts"],"sourcesContent":["import type {\n ClientCollectionConfig,\n QueryPreset,\n ResolvedFilterOptions,\n SanitizedCollectionPermission,\n Where,\n} from 'payload'\n\nexport type ListControlsProps = {\n readonly beforeActions?: React.ReactNode[]\n readonly collectionConfig: ClientCollectionConfig\n readonly collectionSlug: string\n /**\n * @deprecated\n * These are now handled by the `ListSelection` component\n */\n readonly disableBulkDelete?: boolean\n /**\n * @deprecated\n * These are now handled by the `ListSelection` component\n */\n readonly disableBulkEdit?: boolean\n readonly disableQueryPresets?: boolean\n readonly enableColumns?: boolean\n readonly enableFilters?: boolean\n readonly enableSort?: boolean\n readonly handleSearchChange?: (search: string) => void\n readonly handleSortChange?: (sort: string) => void\n readonly handleWhereChange?: (where: Where) => void\n readonly listMenuItems?: React.ReactNode[]\n readonly queryPreset?: QueryPreset\n readonly queryPresetPermissions?: SanitizedCollectionPermission\n readonly renderedFilters?: Map<string, React.ReactNode>\n readonly resolvedFilterOptions?: Map<string, ResolvedFilterOptions>\n}\n"],"mappings":"AAQA","ignoreList":[]}

View File

@@ -0,0 +1,82 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var utils_exports = {};
__export(utils_exports, {
extractUsedTable: () => extractUsedTable,
getTableConfig: () => getTableConfig
});
module.exports = __toCommonJS(utils_exports);
var import_entity = require("../entity.cjs");
var import_sql = require("../sql/sql.cjs");
var import_subquery = require("../subquery.cjs");
var import_table = require("../table.cjs");
var import_indexes = require("./indexes.cjs");
var import_primary_keys = require("./primary-keys.cjs");
var import_table2 = require("./table.cjs");
var import_unique_constraint = require("./unique-constraint.cjs");
function extractUsedTable(table) {
if ((0, import_entity.is)(table, import_table2.SingleStoreTable)) {
return [`${table[import_table.Table.Symbol.BaseName]}`];
}
if ((0, import_entity.is)(table, import_subquery.Subquery)) {
return table._.usedTables ?? [];
}
if ((0, import_entity.is)(table, import_sql.SQL)) {
return table.usedTables ?? [];
}
return [];
}
function getTableConfig(table) {
const columns = Object.values(table[import_table2.SingleStoreTable.Symbol.Columns]);
const indexes = [];
const primaryKeys = [];
const uniqueConstraints = [];
const name = table[import_table.Table.Symbol.Name];
const schema = table[import_table.Table.Symbol.Schema];
const baseName = table[import_table.Table.Symbol.BaseName];
const extraConfigBuilder = table[import_table2.SingleStoreTable.Symbol.ExtraConfigBuilder];
if (extraConfigBuilder !== void 0) {
const extraConfig = extraConfigBuilder(table[import_table2.SingleStoreTable.Symbol.Columns]);
const extraValues = Array.isArray(extraConfig) ? extraConfig.flat(1) : Object.values(extraConfig);
for (const builder of Object.values(extraValues)) {
if ((0, import_entity.is)(builder, import_indexes.IndexBuilder)) {
indexes.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_unique_constraint.UniqueConstraintBuilder)) {
uniqueConstraints.push(builder.build(table));
} else if ((0, import_entity.is)(builder, import_primary_keys.PrimaryKeyBuilder)) {
primaryKeys.push(builder.build(table));
}
}
}
return {
columns,
indexes,
primaryKeys,
uniqueConstraints,
name,
schema,
baseName
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
extractUsedTable,
getTableConfig
});
//# sourceMappingURL=utils.cjs.map

View File

@@ -0,0 +1,104 @@
import { JWTClaimValidationFailed, JWTExpired, JWTInvalid } from '../util/errors.js';
import { decoder } from './buffer_utils.js';
import epoch from './epoch.js';
import secs from './secs.js';
import isObject from './is_object.js';
const normalizeTyp = (value) => value.toLowerCase().replace(/^application\//, '');
const checkAudiencePresence = (audPayload, audOption) => {
if (typeof audPayload === 'string') {
return audOption.includes(audPayload);
}
if (Array.isArray(audPayload)) {
return audOption.some(Set.prototype.has.bind(new Set(audPayload)));
}
return false;
};
export default (protectedHeader, encodedPayload, options = {}) => {
let payload;
try {
payload = JSON.parse(decoder.decode(encodedPayload));
}
catch {
}
if (!isObject(payload)) {
throw new JWTInvalid('JWT Claims Set must be a top-level JSON object');
}
const { typ } = options;
if (typ &&
(typeof protectedHeader.typ !== 'string' ||
normalizeTyp(protectedHeader.typ) !== normalizeTyp(typ))) {
throw new JWTClaimValidationFailed('unexpected "typ" JWT header value', payload, 'typ', 'check_failed');
}
const { requiredClaims = [], issuer, subject, audience, maxTokenAge } = options;
const presenceCheck = [...requiredClaims];
if (maxTokenAge !== undefined)
presenceCheck.push('iat');
if (audience !== undefined)
presenceCheck.push('aud');
if (subject !== undefined)
presenceCheck.push('sub');
if (issuer !== undefined)
presenceCheck.push('iss');
for (const claim of new Set(presenceCheck.reverse())) {
if (!(claim in payload)) {
throw new JWTClaimValidationFailed(`missing required "${claim}" claim`, payload, claim, 'missing');
}
}
if (issuer &&
!(Array.isArray(issuer) ? issuer : [issuer]).includes(payload.iss)) {
throw new JWTClaimValidationFailed('unexpected "iss" claim value', payload, 'iss', 'check_failed');
}
if (subject && payload.sub !== subject) {
throw new JWTClaimValidationFailed('unexpected "sub" claim value', payload, 'sub', 'check_failed');
}
if (audience &&
!checkAudiencePresence(payload.aud, typeof audience === 'string' ? [audience] : audience)) {
throw new JWTClaimValidationFailed('unexpected "aud" claim value', payload, 'aud', 'check_failed');
}
let tolerance;
switch (typeof options.clockTolerance) {
case 'string':
tolerance = secs(options.clockTolerance);
break;
case 'number':
tolerance = options.clockTolerance;
break;
case 'undefined':
tolerance = 0;
break;
default:
throw new TypeError('Invalid clockTolerance option type');
}
const { currentDate } = options;
const now = epoch(currentDate || new Date());
if ((payload.iat !== undefined || maxTokenAge) && typeof payload.iat !== 'number') {
throw new JWTClaimValidationFailed('"iat" claim must be a number', payload, 'iat', 'invalid');
}
if (payload.nbf !== undefined) {
if (typeof payload.nbf !== 'number') {
throw new JWTClaimValidationFailed('"nbf" claim must be a number', payload, 'nbf', 'invalid');
}
if (payload.nbf > now + tolerance) {
throw new JWTClaimValidationFailed('"nbf" claim timestamp check failed', payload, 'nbf', 'check_failed');
}
}
if (payload.exp !== undefined) {
if (typeof payload.exp !== 'number') {
throw new JWTClaimValidationFailed('"exp" claim must be a number', payload, 'exp', 'invalid');
}
if (payload.exp <= now - tolerance) {
throw new JWTExpired('"exp" claim timestamp check failed', payload, 'exp', 'check_failed');
}
}
if (maxTokenAge) {
const age = now - payload.iat;
const max = typeof maxTokenAge === 'number' ? maxTokenAge : secs(maxTokenAge);
if (age - tolerance > max) {
throw new JWTExpired('"iat" claim timestamp check failed (too far in the past)', payload, 'iat', 'check_failed');
}
if (age < 0 - tolerance) {
throw new JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)', payload, 'iat', 'check_failed');
}
}
return payload;
};

View File

@@ -0,0 +1,20 @@
import { alias } from 'drizzle-orm/pg-core';
import { alias as aliasSQLite } from 'drizzle-orm/sqlite-core/alias';
import toSnakeCase from 'to-snake-case';
import { v4 as uuid } from 'uuid';
export const getTableAlias = ({ adapter, tableName })=>{
const newAliasTableName = toSnakeCase(uuid());
let newAliasTable;
if (adapter.name === 'postgres') {
newAliasTable = alias(adapter.tables[tableName], newAliasTableName);
}
if (adapter.name === 'sqlite') {
newAliasTable = aliasSQLite(adapter.tables[tableName], newAliasTableName);
}
return {
newAliasTable,
newAliasTableName
};
};
//# sourceMappingURL=getTableAlias.js.map

View File

@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const codegen_1 = require("../../compile/codegen");
const ops = codegen_1.operators;
const KWDs = {
maximum: { okStr: "<=", ok: ops.LTE, fail: ops.GT },
minimum: { okStr: ">=", ok: ops.GTE, fail: ops.LT },
exclusiveMaximum: { okStr: "<", ok: ops.LT, fail: ops.GTE },
exclusiveMinimum: { okStr: ">", ok: ops.GT, fail: ops.LTE },
};
const error = {
message: ({ keyword, schemaCode }) => (0, codegen_1.str) `must be ${KWDs[keyword].okStr} ${schemaCode}`,
params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,
};
const def = {
keyword: Object.keys(KWDs),
type: "number",
schemaType: "number",
$data: true,
error,
code(cxt) {
const { keyword, data, schemaCode } = cxt;
cxt.fail$data((0, codegen_1._) `${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);
},
};
exports.default = def;
//# sourceMappingURL=limitNumber.js.map

View File

@@ -0,0 +1,51 @@
/**
* xss
*
* @author Zongmin Lei<leizongmin@gmail.com>
*/
var DEFAULT = require("./default");
var parser = require("./parser");
var FilterXSS = require("./xss");
/**
* filter xss function
*
* @param {String} html
* @param {Object} options { whiteList, onTag, onTagAttr, onIgnoreTag, onIgnoreTagAttr, safeAttrValue, escapeHtml }
* @return {String}
*/
function filterXSS(html, options) {
var xss = new FilterXSS(options);
return xss.process(html);
}
exports = module.exports = filterXSS;
exports.filterXSS = filterXSS;
exports.FilterXSS = FilterXSS;
(function () {
for (var i in DEFAULT) {
exports[i] = DEFAULT[i];
}
for (var j in parser) {
exports[j] = parser[j];
}
})();
// using `xss` on the browser, output `filterXSS` to the globals
if (typeof window !== "undefined") {
window.filterXSS = module.exports;
}
// using `xss` on the WebWorker, output `filterXSS` to the globals
function isWorkerEnv() {
return (
typeof self !== "undefined" &&
typeof DedicatedWorkerGlobalScope !== "undefined" &&
self instanceof DedicatedWorkerGlobalScope
);
}
if (isWorkerEnv()) {
self.filterXSS = module.exports;
}

View File

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

View File

@@ -0,0 +1,7 @@
import type {Plugin} from "ajv"
import getDef from "../definitions/anyRequired"
const anyRequired: Plugin<undefined> = (ajv) => ajv.addKeyword(getDef())
export default anyRequired
module.exports = anyRequired

View File

@@ -0,0 +1,2 @@
export declare function getMachineId(): Promise<string | undefined>;
//# sourceMappingURL=getMachineId-win.d.ts.map

View File

@@ -0,0 +1,387 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseFileAsJSONSchema = exports.isSchemaLike = exports.appendToDescription = exports.maybeStripDefault = exports.pathTransform = exports.escapeBlockComment = exports.log = exports.error = exports.generateName = exports.toSafeString = exports.stripExtension = exports.justName = exports.traverse = exports.Try = void 0;
const lodash_1 = require("lodash");
const path_1 = require("path");
const JSONSchema_1 = require("./types/JSONSchema");
const js_yaml_1 = __importDefault(require("js-yaml"));
// TODO: pull out into a separate package
function Try(fn, err) {
try {
return fn();
}
catch (e) {
return err(e);
}
}
exports.Try = Try;
// keys that shouldn't be traversed by the catchall step
const BLACKLISTED_KEYS = new Set([
'id',
'$defs',
'$id',
'$schema',
'title',
'description',
'default',
'multipleOf',
'maximum',
'exclusiveMaximum',
'minimum',
'exclusiveMinimum',
'maxLength',
'minLength',
'pattern',
'additionalItems',
'items',
'maxItems',
'minItems',
'uniqueItems',
'maxProperties',
'minProperties',
'required',
'additionalProperties',
'definitions',
'properties',
'patternProperties',
'dependencies',
'enum',
'type',
'allOf',
'anyOf',
'oneOf',
'not',
]);
function traverseObjectKeys(obj, callback, processed) {
Object.keys(obj).forEach(k => {
if (obj[k] && typeof obj[k] === 'object' && !Array.isArray(obj[k])) {
traverse(obj[k], callback, processed, k);
}
});
}
function traverseArray(arr, callback, processed) {
arr.forEach((s, k) => traverse(s, callback, processed, k.toString()));
}
function traverseIntersection(schema, callback, processed) {
if (typeof schema !== 'object' || !schema) {
return;
}
const r = schema;
const intersection = r[JSONSchema_1.Intersection];
if (!intersection) {
return;
}
if (Array.isArray(intersection.allOf)) {
traverseArray(intersection.allOf, callback, processed);
}
}
function traverse(schema, callback, processed = new Set(), key) {
// Handle recursive schemas
if (processed.has(schema)) {
return;
}
processed.add(schema);
callback(schema, key !== null && key !== void 0 ? key : null);
if (schema.anyOf) {
traverseArray(schema.anyOf, callback, processed);
}
if (schema.allOf) {
traverseArray(schema.allOf, callback, processed);
}
if (schema.oneOf) {
traverseArray(schema.oneOf, callback, processed);
}
if (schema.properties) {
traverseObjectKeys(schema.properties, callback, processed);
}
if (schema.patternProperties) {
traverseObjectKeys(schema.patternProperties, callback, processed);
}
if (schema.additionalProperties && typeof schema.additionalProperties === 'object') {
traverse(schema.additionalProperties, callback, processed);
}
if (schema.items) {
const { items } = schema;
if (Array.isArray(items)) {
traverseArray(items, callback, processed);
}
else {
traverse(items, callback, processed);
}
}
if (schema.additionalItems && typeof schema.additionalItems === 'object') {
traverse(schema.additionalItems, callback, processed);
}
if (schema.dependencies) {
if (Array.isArray(schema.dependencies)) {
traverseArray(schema.dependencies, callback, processed);
}
else {
traverseObjectKeys(schema.dependencies, callback, processed);
}
}
if (schema.definitions) {
traverseObjectKeys(schema.definitions, callback, processed);
}
if (schema.$defs) {
traverseObjectKeys(schema.$defs, callback, processed);
}
if (schema.not) {
traverse(schema.not, callback, processed);
}
traverseIntersection(schema, callback, processed);
// technically you can put definitions on any key
Object.keys(schema)
.filter(key => !BLACKLISTED_KEYS.has(key))
.forEach(key => {
const child = schema[key];
if (child && typeof child === 'object') {
traverseObjectKeys(child, callback, processed);
}
});
}
exports.traverse = traverse;
/**
* Eg. `foo/bar/baz.json` => `baz`
*/
function justName(filename = '') {
return stripExtension((0, path_1.basename)(filename));
}
exports.justName = justName;
/**
* Avoid appending "js" to top-level unnamed schemas
*/
function stripExtension(filename) {
return filename.replace((0, path_1.extname)(filename), '');
}
exports.stripExtension = stripExtension;
/**
* Convert a string that might contain spaces or special characters to one that
* can safely be used as a TypeScript interface or enum name.
*/
function toSafeString(string) {
// identifiers in javaScript/ts:
// First character: a-zA-Z | _ | $
// Rest: a-zA-Z | _ | $ | 0-9
return (0, lodash_1.upperFirst)(
// remove accents, umlauts, ... by their basic latin letters
(0, lodash_1.deburr)(string)
// replace chars which are not valid for typescript identifiers with whitespace
.replace(/(^\s*[^a-zA-Z_$])|([^a-zA-Z_$\d])/g, ' ')
// uppercase leading underscores followed by lowercase
.replace(/^_[a-z]/g, match => match.toUpperCase())
// remove non-leading underscores followed by lowercase (convert snake_case)
.replace(/_[a-z]/g, match => match.substr(1, match.length).toUpperCase())
// uppercase letters after digits, dollars
.replace(/([\d$]+[a-zA-Z])/g, match => match.toUpperCase())
// uppercase first letter after whitespace
.replace(/\s+([a-zA-Z])/g, match => (0, lodash_1.trim)(match.toUpperCase()))
// remove remaining whitespace
.replace(/\s/g, ''));
}
exports.toSafeString = toSafeString;
function generateName(from, usedNames) {
let name = toSafeString(from);
if (!name) {
name = 'NoName';
}
// increment counter until we find a free name
if (usedNames.has(name)) {
let counter = 1;
let nameWithCounter = `${name}${counter}`;
while (usedNames.has(nameWithCounter)) {
nameWithCounter = `${name}${counter}`;
counter++;
}
name = nameWithCounter;
}
usedNames.add(name);
return name;
}
exports.generateName = generateName;
function error(...messages) {
var _a;
if (!process.env.VERBOSE) {
return console.error(messages);
}
console.error((_a = getStyledTextForLogging('red')) === null || _a === void 0 ? void 0 : _a('error'), ...messages);
}
exports.error = error;
function log(style, title, ...messages) {
var _a, _b;
if (!process.env.VERBOSE) {
return;
}
let lastMessage = null;
if (messages.length > 1 && typeof messages[messages.length - 1] !== 'string') {
lastMessage = messages.splice(messages.length - 1, 1);
}
console.info((_a = color()) === null || _a === void 0 ? void 0 : _a.whiteBright.bgCyan('debug'), (_b = getStyledTextForLogging(style)) === null || _b === void 0 ? void 0 : _b(title), ...messages);
if (lastMessage) {
console.dir(lastMessage, { depth: 6, maxArrayLength: 6 });
}
}
exports.log = log;
function getStyledTextForLogging(style) {
var _a, _b, _c, _d, _e, _f, _g;
if (!process.env.VERBOSE) {
return;
}
switch (style) {
case 'blue':
return (_a = color()) === null || _a === void 0 ? void 0 : _a.whiteBright.bgBlue;
case 'cyan':
return (_b = color()) === null || _b === void 0 ? void 0 : _b.whiteBright.bgCyan;
case 'green':
return (_c = color()) === null || _c === void 0 ? void 0 : _c.whiteBright.bgGreen;
case 'magenta':
return (_d = color()) === null || _d === void 0 ? void 0 : _d.whiteBright.bgMagenta;
case 'red':
return (_e = color()) === null || _e === void 0 ? void 0 : _e.whiteBright.bgRedBright;
case 'white':
return (_f = color()) === null || _f === void 0 ? void 0 : _f.black.bgWhite;
case 'yellow':
return (_g = color()) === null || _g === void 0 ? void 0 : _g.whiteBright.bgYellow;
}
}
/**
* escape block comments in schema descriptions so that they don't unexpectedly close JSDoc comments in generated typescript interfaces
*/
function escapeBlockComment(schema) {
const replacer = '* /';
if (schema === null || typeof schema !== 'object') {
return;
}
for (const key of Object.keys(schema)) {
if (key === 'description' && typeof schema[key] === 'string') {
schema[key] = schema[key].replace(/\*\//g, replacer);
}
}
}
exports.escapeBlockComment = escapeBlockComment;
/*
the following logic determines the out path by comparing the in path to the users specified out path.
For example, if input directory MultiSchema looks like:
MultiSchema/foo/a.json
MultiSchema/bar/fuzz/c.json
MultiSchema/bar/d.json
And the user wants the outputs to be in MultiSchema/Out, then this code will be able to map the inner directories foo, bar, and fuzz into the intended Out directory like so:
MultiSchema/Out/foo/a.json
MultiSchema/Out/bar/fuzz/c.json
MultiSchema/Out/bar/d.json
*/
function pathTransform(outputPath, inputPath, filePath) {
const inPathList = (0, path_1.normalize)(inputPath).split(path_1.sep);
const filePathList = (0, path_1.dirname)((0, path_1.normalize)(filePath)).split(path_1.sep);
const filePathRel = filePathList.filter((f, i) => f !== inPathList[i]);
return path_1.posix.join(path_1.posix.normalize(outputPath), ...filePathRel);
}
exports.pathTransform = pathTransform;
/**
* Removes the schema's `default` property if it doesn't match the schema's `type` property.
* Useful when parsing unions.
*
* Mutates `schema`.
*/
function maybeStripDefault(schema) {
if (!('default' in schema)) {
return schema;
}
switch (schema.type) {
case 'array':
if (Array.isArray(schema.default)) {
return schema;
}
break;
case 'boolean':
if (typeof schema.default === 'boolean') {
return schema;
}
break;
case 'integer':
case 'number':
if (typeof schema.default === 'number') {
return schema;
}
break;
case 'string':
if (typeof schema.default === 'string') {
return schema;
}
break;
case 'null':
if (schema.default === null) {
return schema;
}
break;
case 'object':
if ((0, lodash_1.isPlainObject)(schema.default)) {
return schema;
}
break;
}
delete schema.default;
return schema;
}
exports.maybeStripDefault = maybeStripDefault;
function appendToDescription(existingDescription, ...values) {
if (existingDescription) {
return `${existingDescription}\n\n${values.join('\n')}`;
}
return values.join('\n');
}
exports.appendToDescription = appendToDescription;
function isSchemaLike(schema) {
if (!(0, lodash_1.isPlainObject)(schema)) {
return false;
}
// top-level schema
const parent = schema[JSONSchema_1.Parent];
if (parent === null) {
return true;
}
const JSON_SCHEMA_KEYWORDS = [
'$defs',
'allOf',
'anyOf',
'definitions',
'dependencies',
'enum',
'not',
'oneOf',
'patternProperties',
'properties',
'required',
];
if (JSON_SCHEMA_KEYWORDS.some(_ => parent[_] === schema)) {
return false;
}
return true;
}
exports.isSchemaLike = isSchemaLike;
function parseFileAsJSONSchema(filename, contents) {
if (filename != null && isYaml(filename)) {
return Try(() => js_yaml_1.default.load(contents.toString()), () => {
throw new TypeError(`Error parsing YML in file "${filename}"`);
});
}
return Try(() => JSON.parse(contents.toString()), () => {
throw new TypeError(`Error parsing JSON in file "${filename}"`);
});
}
exports.parseFileAsJSONSchema = parseFileAsJSONSchema;
function isYaml(filename) {
return filename.endsWith('.yaml') || filename.endsWith('.yml');
}
function color() {
let cliColor;
try {
cliColor = require('cli-color');
}
catch (_a) { }
return cliColor;
}
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/elements/DrawerActionHeader/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,cAAc,CAAA;AAIrB,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;CACzC,CAAA;AACD,eAAO,MAAM,kBAAkB,oEAO5B,sBAAsB,sBAoBxB,CAAA"}

View File

@@ -0,0 +1,8 @@
import { Attachment } from '../attachment';
export type FeedbackFormData = {
name: string;
email: string;
message: string;
attachments: Attachment[] | undefined;
};
//# sourceMappingURL=form.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sigma.js","sources":["../../../src/icons/sigma.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Sigma\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTggN1Y1YTEgMSAwIDAgMC0xLTFINi41YS41LjUgMCAwIDAtLjQuOGw0LjUgNmEyIDIgMCAwIDEgMCAyLjRsLTQuNSA2YS41LjUgMCAwIDAgLjQuOEgxN2ExIDEgMCAwIDAgMS0xdi0yIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/sigma\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 Sigma = createLucideIcon('Sigma', [\n [\n 'path',\n {\n d: 'M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2',\n key: 'wuwx1p',\n },\n ],\n]);\n\nexport default Sigma;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,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;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,34 @@
import { entityKind } from "../../entity.js";
import { GelColumn } from "./common.js";
import { GelLocalDateColumnBaseBuilder } from "./date.common.js";
class GelTimestampTzBuilder extends GelLocalDateColumnBaseBuilder {
static [entityKind] = "GelTimestampTzBuilder";
constructor(name) {
super(name, "date", "GelTimestampTz");
}
/** @internal */
build(table) {
return new GelTimestampTz(
table,
this.config
);
}
}
class GelTimestampTz extends GelColumn {
static [entityKind] = "GelTimestampTz";
constructor(table, config) {
super(table, config);
}
getSQLType() {
return "datetime";
}
}
function timestamptz(name) {
return new GelTimestampTzBuilder(name ?? "");
}
export {
GelTimestampTz,
GelTimestampTzBuilder,
timestamptz
};
//# sourceMappingURL=timestamptz.js.map

View File

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

View File

@@ -0,0 +1,64 @@
{
"name": "@emotion/use-insertion-effect-with-fallbacks",
"version": "1.2.0",
"description": "A wrapper package that uses `useInsertionEffect` or a fallback for it",
"main": "dist/emotion-use-insertion-effect-with-fallbacks.cjs.js",
"module": "dist/emotion-use-insertion-effect-with-fallbacks.esm.js",
"types": "dist/emotion-use-insertion-effect-with-fallbacks.cjs.d.ts",
"license": "MIT",
"repository": "https://github.com/emotion-js/emotion/tree/main/packages/use-insertion-effect-with-fallbacks",
"publishConfig": {
"access": "public"
},
"files": [
"src",
"dist"
],
"peerDependencies": {
"react": ">=16.8.0"
},
"devDependencies": {
"react": "16.14.0"
},
"exports": {
".": {
"types": {
"import": "./dist/emotion-use-insertion-effect-with-fallbacks.cjs.mjs",
"default": "./dist/emotion-use-insertion-effect-with-fallbacks.cjs.js"
},
"edge-light": {
"module": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.esm.js",
"import": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.cjs.mjs",
"default": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.cjs.js"
},
"worker": {
"module": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.esm.js",
"import": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.cjs.mjs",
"default": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.cjs.js"
},
"workerd": {
"module": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.esm.js",
"import": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.cjs.mjs",
"default": "./dist/emotion-use-insertion-effect-with-fallbacks.edge-light.cjs.js"
},
"browser": {
"module": "./dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js",
"import": "./dist/emotion-use-insertion-effect-with-fallbacks.browser.cjs.mjs",
"default": "./dist/emotion-use-insertion-effect-with-fallbacks.browser.cjs.js"
},
"module": "./dist/emotion-use-insertion-effect-with-fallbacks.esm.js",
"import": "./dist/emotion-use-insertion-effect-with-fallbacks.cjs.mjs",
"default": "./dist/emotion-use-insertion-effect-with-fallbacks.cjs.js"
},
"./package.json": "./package.json"
},
"imports": {
"#is-browser": {
"edge-light": "./src/conditions/false.ts",
"workerd": "./src/conditions/false.ts",
"worker": "./src/conditions/false.ts",
"browser": "./src/conditions/true.ts",
"default": "./src/conditions/is-browser.ts"
}
}
}

View File

@@ -0,0 +1,65 @@
import { addQuarters } from "./addQuarters.mjs";
import { startOfQuarter } from "./startOfQuarter.mjs";
import { toDate } from "./toDate.mjs";
/**
* The {@link eachQuarterOfInterval} function options.
*/
/**
* @name eachQuarterOfInterval
* @category Interval Helpers
* @summary Return the array of quarters within the specified time interval.
*
* @description
* Return the array of quarters within the specified time interval.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param interval - The interval
*
* @returns The array with starts of quarters from the quarter of the interval start to the quarter of the interval end
*
* @example
* // Each quarter within interval 6 February 2014 - 10 August 2014:
* const result = eachQuarterOfInterval({
* start: new Date(2014, 1, 6),
* end: new Date(2014, 7, 10)
* })
* //=> [
* // Wed Jan 01 2014 00:00:00,
* // Tue Apr 01 2014 00:00:00,
* // Tue Jul 01 2014 00:00:00,
* // ]
*/
export function eachQuarterOfInterval(interval, options) {
const startDate = toDate(interval.start);
const endDate = toDate(interval.end);
let reversed = +startDate > +endDate;
const endTime = reversed
? +startOfQuarter(startDate)
: +startOfQuarter(endDate);
let currentDate = reversed
? startOfQuarter(endDate)
: startOfQuarter(startDate);
let step = options?.step ?? 1;
if (!step) return [];
if (step < 0) {
step = -step;
reversed = !reversed;
}
const dates = [];
while (+currentDate <= endTime) {
dates.push(toDate(currentDate));
currentDate = addQuarters(currentDate, step);
}
return reversed ? dates.reverse() : dates;
}
// Fallback for modularized imports:
export default eachQuarterOfInterval;

View File

@@ -0,0 +1 @@
{"version":3,"file":"handleBackToDashboard.d.ts","sourceRoot":"","sources":["../../src/utilities/handleBackToDashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2DAA2D,CAAA;AAIlG,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,iBAAiB,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,qBAAqB,sCAAuC,oBAAoB,SAO5F,CAAA"}

View File

@@ -0,0 +1,29 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const integration = require('../integration.js');
const aggregateErrors = require('../utils/aggregate-errors.js');
const eventbuilder = require('../utils/eventbuilder.js');
const DEFAULT_KEY = 'cause';
const DEFAULT_LIMIT = 5;
const INTEGRATION_NAME = 'LinkedErrors';
const _linkedErrorsIntegration = ((options = {}) => {
const limit = options.limit || DEFAULT_LIMIT;
const key = options.key || DEFAULT_KEY;
return {
name: INTEGRATION_NAME,
preprocessEvent(event, hint, client) {
const options = client.getOptions();
aggregateErrors.applyAggregateErrorsToEvent(eventbuilder.exceptionFromError, options.stackParser, key, limit, event, hint);
},
};
}) ;
const linkedErrorsIntegration = integration.defineIntegration(_linkedErrorsIntegration);
exports.linkedErrorsIntegration = linkedErrorsIntegration;
//# sourceMappingURL=linkederrors.js.map

View File

@@ -0,0 +1,2 @@
export * from "./declarations/src/index.js";
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW1vdGlvbi11dGlscy5janMuZC5tdHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9

View File

@@ -0,0 +1,40 @@
import { getISOWeek } from "./getISOWeek.js";
import { toDate } from "./toDate.js";
/**
* The {@link setISOWeek} function options.
*/
/**
* @name setISOWeek
* @category ISO Week Helpers
* @summary Set the ISO week to the given date.
*
* @description
* Set the ISO week to the given date, saving the weekday number.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
* @typeParam ResultDate - The `Date` type of the context function.
*
* @param date - The date to be changed
* @param week - The ISO week of the new date
* @param options - An object with options
*
* @returns The new date with the ISO week set
*
* @example
* // Set the 53rd ISO week to 7 August 2004:
* const result = setISOWeek(new Date(2004, 7, 7), 53)
* //=> Sat Jan 01 2005 00:00:00
*/
export function setISOWeek(date, week, options) {
const _date = toDate(date, options?.in);
const diff = getISOWeek(_date, options) - week;
_date.setDate(_date.getDate() - diff * 7);
return _date;
}
// Fallback for modularized imports:
export default setISOWeek;

View File

@@ -0,0 +1,73 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
/** @typedef {import("../Module").BuildMeta} BuildMeta */
/** @typedef {import("../javascript/JavascriptParser").JavascriptParserState} JavascriptParserState */
/** @type {WeakMap<JavascriptParserState, boolean>} */
const parserStateExportsState = new WeakMap();
/**
* @param {JavascriptParserState} parserState parser state
* @returns {void}
*/
module.exports.bailout = (parserState) => {
const value = parserStateExportsState.get(parserState);
parserStateExportsState.set(parserState, false);
if (value === true) {
const buildMeta = /** @type {BuildMeta} */ (parserState.module.buildMeta);
buildMeta.exportsType = undefined;
buildMeta.defaultObject = false;
}
};
/**
* @param {JavascriptParserState} parserState parser state
* @returns {void}
*/
module.exports.enable = (parserState) => {
const value = parserStateExportsState.get(parserState);
if (value === false) return;
parserStateExportsState.set(parserState, true);
if (value !== true) {
const buildMeta = /** @type {BuildMeta} */ (parserState.module.buildMeta);
buildMeta.exportsType = "default";
buildMeta.defaultObject = "redirect";
}
};
/**
* @param {JavascriptParserState} parserState parser state
* @returns {boolean} true, when enabled
*/
module.exports.isEnabled = (parserState) => {
const value = parserStateExportsState.get(parserState);
return value === true;
};
/**
* @param {JavascriptParserState} parserState parser state
* @returns {void}
*/
module.exports.setDynamic = (parserState) => {
const value = parserStateExportsState.get(parserState);
if (value !== true) return;
/** @type {BuildMeta} */
(parserState.module.buildMeta).exportsType = "dynamic";
};
/**
* @param {JavascriptParserState} parserState parser state
* @returns {void}
*/
module.exports.setFlagged = (parserState) => {
const value = parserStateExportsState.get(parserState);
if (value !== true) return;
const buildMeta = /** @type {BuildMeta} */ (parserState.module.buildMeta);
if (buildMeta.exportsType === "dynamic") return;
buildMeta.exportsType = "flagged";
};

View File

@@ -0,0 +1 @@
{"version":3,"file":"debug-build.js","sources":["../../../src/common/debug-build.ts"],"sourcesContent":["declare const __DEBUG_BUILD__: boolean;\n\n/**\n * This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.\n *\n * ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.\n */\nexport const DEBUG_BUILD = __DEBUG_BUILD__;\n"],"names":[],"mappings":";;AAEA;AACA;AACA;AACA;AACA;AACO,MAAM,WAAA,IAAc,OAAA,gBAAA,KAAA,WAAA,IAAA,gBAAA;;;;"}

View File

@@ -0,0 +1,8 @@
import React from 'react';
import './index.scss';
export declare const DocumentTakeOver: React.FC<{
handleBackToDashboard: () => void;
isActive: boolean;
onReadOnly: () => void;
}>;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,33 @@
import { toDate } from "./toDate.mjs";
/**
* @name startOfQuarter
* @category Quarter Helpers
* @summary Return the start of a year quarter for the given date.
*
* @description
* Return the start of a year quarter for the given date.
* The result will be in the local timezone.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The original date
*
* @returns The start of a quarter
*
* @example
* // The start of a quarter for 2 September 2014 11:55:00:
* const result = startOfQuarter(new Date(2014, 8, 2, 11, 55, 0))
* //=> Tue Jul 01 2014 00:00:00
*/
export function startOfQuarter(date) {
const _date = toDate(date);
const currentMonth = _date.getMonth();
const month = currentMonth - (currentMonth % 3);
_date.setMonth(month, 1);
_date.setHours(0, 0, 0, 0);
return _date;
}
// Fallback for modularized imports:
export default startOfQuarter;

View File

@@ -0,0 +1,28 @@
import { formatDistance } from "./et/_lib/formatDistance.mjs";
import { formatLong } from "./et/_lib/formatLong.mjs";
import { formatRelative } from "./et/_lib/formatRelative.mjs";
import { localize } from "./et/_lib/localize.mjs";
import { match } from "./et/_lib/match.mjs";
/**
* @category Locales
* @summary Estonian locale.
* @language Estonian
* @iso-639-2 est
* @author Priit Hansen [@HansenPriit](https://github.com/priithansen)
*/
export const et = {
code: "et",
formatDistance: formatDistance,
formatLong: formatLong,
formatRelative: formatRelative,
localize: localize,
match: match,
options: {
weekStartsOn: 1 /* Monday */,
firstWeekContainsDate: 4,
},
};
// Fallback for modularized imports:
export default et;

View File

@@ -0,0 +1,115 @@
import { buildMatchFn } from "../../_lib/buildMatchFn.mjs";
import { buildMatchPatternFn } from "../../_lib/buildMatchPatternFn.mjs";
const matchOrdinalNumberPattern = /^(\d+)(일|번째)?/i;
const parseOrdinalNumberPattern = /\d+/i;
const matchEraPatterns = {
narrow: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
wide: /^(기원전|서기)/i,
};
const parseEraPatterns = {
any: [/^(bc|기원전)/i, /^(ad|서기)/i],
};
const matchQuarterPatterns = {
narrow: /^[1234]/i,
abbreviated: /^q[1234]/i,
wide: /^[1234]사?분기/i,
};
const parseQuarterPatterns = {
any: [/1/i, /2/i, /3/i, /4/i],
};
const matchMonthPatterns = {
narrow: /^(1[012]|[123456789])/,
abbreviated: /^(1[012]|[123456789])월/i,
wide: /^(1[012]|[123456789])월/i,
};
const parseMonthPatterns = {
any: [
/^1월?$/,
/^2/,
/^3/,
/^4/,
/^5/,
/^6/,
/^7/,
/^8/,
/^9/,
/^10/,
/^11/,
/^12/,
],
};
const matchDayPatterns = {
narrow: /^[일월화수목금토]/,
short: /^[일월화수목금토]/,
abbreviated: /^[일월화수목금토]/,
wide: /^[일월화수목금토]요일/,
};
const parseDayPatterns = {
any: [/^일/, /^월/, /^화/, /^수/, /^목/, /^금/, /^토/],
};
const matchDayPeriodPatterns = {
any: /^(am|pm|오전|오후|자정|정오|아침|저녁|밤)/i,
};
const parseDayPeriodPatterns = {
any: {
am: /^(am|오전)/i,
pm: /^(pm|오후)/i,
midnight: /^자정/i,
noon: /^정오/i,
morning: /^아침/i,
afternoon: /^오후/i,
evening: /^저녁/i,
night: /^밤/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 @@
{"version":3,"file":"trace_state.js","sourceRoot":"","sources":["../../../src/trace/trace_state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface TraceState {\n /**\n * Create a new TraceState which inherits from this TraceState and has the\n * given key set.\n * The new entry will always be added in the front of the list of states.\n *\n * @param key key of the TraceState entry.\n * @param value value of the TraceState entry.\n */\n set(key: string, value: string): TraceState;\n\n /**\n * Return a new TraceState which inherits from this TraceState but does not\n * contain the given key.\n *\n * @param key the key for the TraceState entry to be removed.\n */\n unset(key: string): TraceState;\n\n /**\n * Returns the value to which the specified key is mapped, or `undefined` if\n * this map contains no mapping for the key.\n *\n * @param key with which the specified value is to be associated.\n * @returns the value to which the specified key is mapped, or `undefined` if\n * this map contains no mapping for the key.\n */\n get(key: string): string | undefined;\n\n // TODO: Consider to add support for merging an object as well by also\n // accepting a single internalTraceState argument similar to the constructor.\n\n /**\n * Serializes the TraceState to a `list` as defined below. The `list` is a\n * series of `list-members` separated by commas `,`, and a list-member is a\n * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs\n * surrounding `list-members` are ignored. There can be a maximum of 32\n * `list-members` in a `list`.\n *\n * @returns the serialized string.\n */\n serialize(): string;\n}\n"]}

View File

@@ -0,0 +1,24 @@
import type { Field } from 'payload';
import { GraphQLInputObjectType } from 'graphql';
type Args = {
fields: Field[];
name: string;
parentName: string;
};
/** This does as the function name suggests. It builds a where GraphQL input type
* for all the fields which are passed to the function.
* Each field has different operators which may be valid for a where input type.
* For example, a text field may have a "contains" operator, but a number field
* may not.
*
* buildWhereInputType is similar to buildObjectType and operates
* on a field basis with a few distinct differences.
*
* 1. Everything needs to be a GraphQLInputObjectType or scalar / enum
* 2. Relationships, groups, repeaters and flex content are not
* directly searchable. Instead, we need to build a chained pathname
* using dot notation so MongoDB can properly search nested paths.
*/
export declare const buildWhereInputType: ({ name, fields, parentName }: Args) => GraphQLInputObjectType;
export {};
//# sourceMappingURL=buildWhereInputType.d.ts.map

View File

@@ -0,0 +1,426 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const { SyncWaterfallHook } = require("tapable");
const Compilation = require("../Compilation");
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
const {
generateJavascriptHMR
} = require("../hmr/JavascriptHotModuleReplacementHelper");
const {
chunkHasJs,
getChunkFilenameTemplate
} = require("../javascript/JavascriptModulesPlugin");
const { getInitialChunkIds } = require("../javascript/StartupHelpers");
const compileBooleanMatcher = require("../util/compileBooleanMatcher");
const { getUndoPath } = require("../util/identifier");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
/**
* @typedef {object} JsonpCompilationPluginHooks
* @property {SyncWaterfallHook<[string, Chunk]>} linkPreload
* @property {SyncWaterfallHook<[string, Chunk]>} linkPrefetch
*/
/** @type {WeakMap<Compilation, JsonpCompilationPluginHooks>} */
const compilationHooksMap = new WeakMap();
class ModuleChunkLoadingRuntimeModule extends RuntimeModule {
/**
* @param {Compilation} compilation the compilation
* @returns {JsonpCompilationPluginHooks} hooks
*/
static getCompilationHooks(compilation) {
if (!(compilation instanceof Compilation)) {
throw new TypeError(
"The 'compilation' argument must be an instance of Compilation"
);
}
let hooks = compilationHooksMap.get(compilation);
if (hooks === undefined) {
hooks = {
linkPreload: new SyncWaterfallHook(["source", "chunk"]),
linkPrefetch: new SyncWaterfallHook(["source", "chunk"])
};
compilationHooksMap.set(compilation, hooks);
}
return hooks;
}
/**
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
*/
constructor(runtimeRequirements) {
super("import chunk loading", RuntimeModule.STAGE_ATTACH);
/** @type {ReadOnlyRuntimeRequirements} */
this._runtimeRequirements = runtimeRequirements;
}
/**
* @private
* @param {Chunk} chunk chunk
* @param {string} rootOutputDir root output directory
* @returns {string} generated code
*/
_generateBaseUri(chunk, rootOutputDir) {
const options = chunk.getEntryOptions();
if (options && options.baseUri) {
return `${RuntimeGlobals.baseURI} = ${JSON.stringify(options.baseUri)};`;
}
const compilation = /** @type {Compilation} */ (this.compilation);
const {
outputOptions: { importMetaName }
} = compilation;
return `${RuntimeGlobals.baseURI} = new URL(${JSON.stringify(
rootOutputDir
)}, ${importMetaName}.url);`;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const compilation = /** @type {Compilation} */ (this.compilation);
const chunkGraph = /** @type {ChunkGraph} */ (this.chunkGraph);
const chunk = /** @type {Chunk} */ (this.chunk);
const environment = compilation.outputOptions.environment;
const {
runtimeTemplate,
outputOptions: { importFunctionName, crossOriginLoading, charset }
} = compilation;
const fn = RuntimeGlobals.ensureChunkHandlers;
const withBaseURI = this._runtimeRequirements.has(RuntimeGlobals.baseURI);
const withExternalInstallChunk = this._runtimeRequirements.has(
RuntimeGlobals.externalInstallChunk
);
const withLoading = this._runtimeRequirements.has(
RuntimeGlobals.ensureChunkHandlers
);
const withOnChunkLoad = this._runtimeRequirements.has(
RuntimeGlobals.onChunksLoaded
);
const withHmr = this._runtimeRequirements.has(
RuntimeGlobals.hmrDownloadUpdateHandlers
);
const withHmrManifest = this._runtimeRequirements.has(
RuntimeGlobals.hmrDownloadManifest
);
const { linkPreload, linkPrefetch } =
ModuleChunkLoadingRuntimeModule.getCompilationHooks(compilation);
const isNeutralPlatform = runtimeTemplate.isNeutralPlatform();
const withPrefetch =
(environment.document || isNeutralPlatform) &&
this._runtimeRequirements.has(RuntimeGlobals.prefetchChunkHandlers) &&
chunk.hasChildByOrder(chunkGraph, "prefetch", true, chunkHasJs);
const withPreload =
(environment.document || isNeutralPlatform) &&
this._runtimeRequirements.has(RuntimeGlobals.preloadChunkHandlers) &&
chunk.hasChildByOrder(chunkGraph, "preload", true, chunkHasJs);
const conditionMap = chunkGraph.getChunkConditionMap(chunk, chunkHasJs);
const hasJsMatcher = compileBooleanMatcher(conditionMap);
const initialChunkIds = getInitialChunkIds(chunk, chunkGraph, chunkHasJs);
const outputName = compilation.getPath(
getChunkFilenameTemplate(chunk, compilation.outputOptions),
{
chunk,
contentHashType: "javascript"
}
);
const rootOutputDir = getUndoPath(
outputName,
compilation.outputOptions.path,
true
);
const stateExpression = withHmr
? `${RuntimeGlobals.hmrRuntimeStatePrefix}_module`
: undefined;
return Template.asString([
withBaseURI
? this._generateBaseUri(chunk, rootOutputDir)
: "// no baseURI",
"",
"// object to store loaded and loading chunks",
"// undefined = chunk not loaded, null = chunk preloaded/prefetched",
"// [resolve, Promise] = chunk loading, 0 = chunk loaded",
`var installedChunks = ${
stateExpression ? `${stateExpression} = ${stateExpression} || ` : ""
}{`,
Template.indent(
Array.from(initialChunkIds, (id) => `${JSON.stringify(id)}: 0`).join(
",\n"
)
),
"};",
"",
withLoading || withExternalInstallChunk
? `var installChunk = ${runtimeTemplate.basicFunction("data", [
runtimeTemplate.destructureObject(
[
RuntimeGlobals.esmIds,
RuntimeGlobals.esmModules,
RuntimeGlobals.esmRuntime
],
"data"
),
'// add "modules" to the modules object,',
'// then flag all "ids" as loaded and fire callback',
"var moduleId, chunkId, i = 0;",
`for(moduleId in ${RuntimeGlobals.esmModules}) {`,
Template.indent([
`if(${RuntimeGlobals.hasOwnProperty}(${RuntimeGlobals.esmModules}, moduleId)) {`,
Template.indent(
`${RuntimeGlobals.moduleFactories}[moduleId] = ${RuntimeGlobals.esmModules}[moduleId];`
),
"}"
]),
"}",
`if(${RuntimeGlobals.esmRuntime}) ${RuntimeGlobals.esmRuntime}(${RuntimeGlobals.require});`,
`for(;i < ${RuntimeGlobals.esmIds}.length; i++) {`,
Template.indent([
`chunkId = ${RuntimeGlobals.esmIds}[i];`,
`if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) && installedChunks[chunkId]) {`,
Template.indent("installedChunks[chunkId][0]();"),
"}",
`installedChunks[${RuntimeGlobals.esmIds}[i]] = 0;`
]),
"}",
withOnChunkLoad ? `${RuntimeGlobals.onChunksLoaded}();` : ""
])}`
: "// no install chunk",
"",
withLoading
? Template.asString([
`${fn}.j = ${runtimeTemplate.basicFunction(
"chunkId, promises",
hasJsMatcher !== false
? Template.indent([
"// import() chunk loading for javascript",
`var installedChunkData = ${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`,
'if(installedChunkData !== 0) { // 0 means "already installed".',
Template.indent([
"",
'// a Promise means "currently loading".',
"if(installedChunkData) {",
Template.indent([
"promises.push(installedChunkData[1]);"
]),
"} else {",
Template.indent([
hasJsMatcher === true
? "if(true) { // all chunks have JS"
: `if(${hasJsMatcher("chunkId")}) {`,
Template.indent([
"// setup Promise in chunk cache",
`var promise = ${importFunctionName}(${
compilation.outputOptions.publicPath === "auto"
? JSON.stringify(rootOutputDir)
: RuntimeGlobals.publicPath
} + ${
RuntimeGlobals.getChunkScriptFilename
}(chunkId)).then(installChunk, ${runtimeTemplate.basicFunction(
"e",
[
"if(installedChunks[chunkId] !== 0) installedChunks[chunkId] = undefined;",
"throw e;"
]
)});`,
`var promise = Promise.race([promise, new Promise(${runtimeTemplate.expressionFunction(
"installedChunkData = installedChunks[chunkId] = [resolve]",
"resolve"
)})])`,
"promises.push(installedChunkData[1] = promise);"
]),
hasJsMatcher === true
? "}"
: "} else installedChunks[chunkId] = 0;"
]),
"}"
]),
"}"
])
: Template.indent(["installedChunks[chunkId] = 0;"])
)};`
])
: "// no chunk on demand loading",
"",
withPrefetch && hasJsMatcher !== false
? `${
RuntimeGlobals.prefetchChunkHandlers
}.j = ${runtimeTemplate.basicFunction("chunkId", [
isNeutralPlatform
? "if (typeof document === 'undefined') return;"
: "",
`if((!${
RuntimeGlobals.hasOwnProperty
}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${
hasJsMatcher === true ? "true" : hasJsMatcher("chunkId")
}) {`,
Template.indent([
"installedChunks[chunkId] = null;",
linkPrefetch.call(
Template.asString([
"var link = document.createElement('link');",
charset ? "link.charset = 'utf-8';" : "",
crossOriginLoading
? `link.crossOrigin = ${JSON.stringify(
crossOriginLoading
)};`
: "",
`if (${RuntimeGlobals.scriptNonce}) {`,
Template.indent(
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
),
"}",
'link.rel = "prefetch";',
'link.as = "script";',
`link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`
]),
chunk
),
"document.head.appendChild(link);"
]),
"}"
])};`
: "// no prefetching",
"",
withPreload && hasJsMatcher !== false
? `${
RuntimeGlobals.preloadChunkHandlers
}.j = ${runtimeTemplate.basicFunction("chunkId", [
isNeutralPlatform
? "if (typeof document === 'undefined') return;"
: "",
`if((!${
RuntimeGlobals.hasOwnProperty
}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${
hasJsMatcher === true ? "true" : hasJsMatcher("chunkId")
}) {`,
Template.indent([
"installedChunks[chunkId] = null;",
linkPreload.call(
Template.asString([
"var link = document.createElement('link');",
charset ? "link.charset = 'utf-8';" : "",
`if (${RuntimeGlobals.scriptNonce}) {`,
Template.indent(
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
),
"}",
'link.rel = "modulepreload";',
`link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkScriptFilename}(chunkId);`,
crossOriginLoading
? crossOriginLoading === "use-credentials"
? 'link.crossOrigin = "use-credentials";'
: Template.asString([
"if (link.href.indexOf(window.location.origin + '/') !== 0) {",
Template.indent(
`link.crossOrigin = ${JSON.stringify(
crossOriginLoading
)};`
),
"}"
])
: ""
]),
chunk
),
"document.head.appendChild(link);"
]),
"}"
])};`
: "// no preloaded",
"",
withExternalInstallChunk
? Template.asString([
`${RuntimeGlobals.externalInstallChunk} = installChunk;`
])
: "// no external install chunk",
"",
withOnChunkLoad
? `${
RuntimeGlobals.onChunksLoaded
}.j = ${runtimeTemplate.returningFunction(
"installedChunks[chunkId] === 0",
"chunkId"
)};`
: "// no on chunks loaded",
withHmr
? Template.asString([
generateJavascriptHMR("module"),
"",
"function loadUpdateChunk(chunkId, updatedModulesList) {",
Template.indent([
`return new Promise(${runtimeTemplate.basicFunction(
"resolve, reject",
[
"// start update chunk loading",
`var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkUpdateScriptFilename}(chunkId);`,
`var onResolve = ${runtimeTemplate.basicFunction("obj", [
`var updatedModules = obj.${RuntimeGlobals.esmModules};`,
`var updatedRuntime = obj.${RuntimeGlobals.esmRuntime};`,
"if(updatedRuntime) currentUpdateRuntime.push(updatedRuntime);",
"for(var moduleId in updatedModules) {",
Template.indent([
`if(${RuntimeGlobals.hasOwnProperty}(updatedModules, moduleId)) {`,
Template.indent([
"currentUpdate[moduleId] = updatedModules[moduleId];",
"if(updatedModulesList) updatedModulesList.push(moduleId);"
]),
"}"
]),
"}",
"resolve(obj);"
])};`,
`var onReject = ${runtimeTemplate.basicFunction("error", [
"var errorMsg = error.message || 'unknown reason';",
"error.message = 'Loading hot update chunk ' + chunkId + ' failed.\\n(' + errorMsg + ')';",
"error.name = 'ChunkLoadError';",
"reject(error);"
])}`,
`var loadScript = ${runtimeTemplate.basicFunction(
"url, onResolve, onReject",
[
`return ${importFunctionName}(/* webpackIgnore: true */ url).then(onResolve).catch(onReject)`
]
)}`,
"loadScript(url, onResolve, onReject);"
]
)});`
]),
"}",
""
])
: "// no HMR",
"",
withHmrManifest
? Template.asString([
`${
RuntimeGlobals.hmrDownloadManifest
} = ${runtimeTemplate.basicFunction("", [
`return ${importFunctionName}(/* webpackIgnore: true */ ${RuntimeGlobals.publicPath} + ${
RuntimeGlobals.getUpdateManifestFilename
}()).then(${runtimeTemplate.basicFunction("obj", [
"return obj.default;"
])}, ${runtimeTemplate.basicFunction("error", [
"if(['MODULE_NOT_FOUND', 'ENOENT'].includes(error.code)) return;",
"throw error;"
])});`
])};`
])
: "// no HMR manifest"
]);
}
}
module.exports = ModuleChunkLoadingRuntimeModule;

View File

@@ -0,0 +1,5 @@
export declare const getVisibilityWatcher: () => {
readonly firstHiddenTime: number;
onHidden(cb: () => void): void;
};
//# sourceMappingURL=getVisibilityWatcher.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"clock-11.js","sources":["../../../src/icons/clock-11.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Clock11\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cG9seWxpbmUgcG9pbnRzPSIxMiA2IDEyIDEyIDkuNSA4IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/clock-11\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 Clock11 = createLucideIcon('Clock11', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['polyline', { points: '12 6 12 12 9.5 8', key: 'l5bg6f' }],\n]);\n\nexport default Clock11;\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,CAC1C,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC5D,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,112 @@
'use strict'
module.exports = prettifyObject
const {
LOGGER_KEYS
} = require('../constants')
const stringifySafe = require('fast-safe-stringify')
const joinLinesWithIndentation = require('./join-lines-with-indentation')
const prettifyError = require('./prettify-error')
/**
* @typedef {object} PrettifyObjectParams
* @property {object} log The object to prettify.
* @property {boolean} [excludeLoggerKeys] Indicates if known logger specific
* keys should be excluded from prettification. Default: `true`.
* @property {string[]} [skipKeys] A set of object keys to exclude from the
* * prettified result. Default: `[]`.
* @property {PrettyContext} context The context object built from parsing
* the options.
*/
/**
* Prettifies a standard object. Special care is taken when processing the object
* to handle child objects that are attached to keys known to contain error
* objects.
*
* @param {PrettifyObjectParams} input
*
* @returns {string} The prettified string. This can be as little as `''` if
* there was nothing to prettify.
*/
function prettifyObject ({
log,
excludeLoggerKeys = true,
skipKeys = [],
context
}) {
const {
EOL: eol,
IDENT: ident,
customPrettifiers,
errorLikeObjectKeys: errorLikeKeys,
objectColorizer,
singleLine,
colorizer
} = context
const keysToIgnore = [].concat(skipKeys)
/* istanbul ignore else */
if (excludeLoggerKeys === true) Array.prototype.push.apply(keysToIgnore, LOGGER_KEYS)
let result = ''
// Split object keys into two categories: error and non-error
const { plain, errors } = Object.entries(log).reduce(({ plain, errors }, [k, v]) => {
if (keysToIgnore.includes(k) === false) {
// Pre-apply custom prettifiers, because all 3 cases below will need this
const pretty = typeof customPrettifiers[k] === 'function'
? customPrettifiers[k](v, k, log, { colors: colorizer.colors })
: v
if (errorLikeKeys.includes(k)) {
errors[k] = pretty
} else {
plain[k] = pretty
}
}
return { plain, errors }
}, { plain: {}, errors: {} })
if (singleLine) {
// Stringify the entire object as a single JSON line
/* istanbul ignore else */
if (Object.keys(plain).length > 0) {
result += objectColorizer.greyMessage(stringifySafe(plain))
}
result += eol
// Avoid printing the escape character on escaped backslashes.
result = result.replace(/\\\\/gi, '\\')
} else {
// Put each object entry on its own line
Object.entries(plain).forEach(([keyName, keyValue]) => {
// custom prettifiers are already applied above, so we can skip it now
let lines = typeof customPrettifiers[keyName] === 'function'
? keyValue
: stringifySafe(keyValue, null, 2)
if (lines === undefined) return
// Avoid printing the escape character on escaped backslashes.
lines = lines.replace(/\\\\/gi, '\\')
const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol })
result += `${ident}${objectColorizer.property(keyName)}:${joinedLines.startsWith(eol) ? '' : ' '}${joinedLines}${eol}`
})
}
// Errors
Object.entries(errors).forEach(([keyName, keyValue]) => {
// custom prettifiers are already applied above, so we can skip it now
const lines = typeof customPrettifiers[keyName] === 'function'
? keyValue
: stringifySafe(keyValue, null, 2)
if (lines === undefined) return
result += prettifyError({ keyName, lines, eol, ident })
})
return result
}

View File

@@ -0,0 +1,6 @@
import { normalizeDates } from "./normalizeDates.js";
export function normalizeInterval(context, interval) {
const [start, end] = normalizeDates(context, interval.start, interval.end);
return { start, end };
}

View File

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

View File

@@ -0,0 +1,151 @@
import type {
JSONSchema4,
JSONSchema4Object,
JSONSchema6,
JSONSchema6Object,
JSONSchema7,
JSONSchema7Object,
} from "json-schema";
import type $Refs from "../refs.js";
import type { ParserOptions } from "../options";
export type JSONSchema = JSONSchema4 | JSONSchema6 | JSONSchema7;
export type JSONSchemaObject = JSONSchema4Object | JSONSchema6Object | JSONSchema7Object;
export type SchemaCallback<S extends object = JSONSchema> = (err: Error | null, schema?: S | object | null) => any;
export type $RefsCallback<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>> = (
err: Error | null,
$refs?: $Refs<S, O>,
) => any;
/**
* See https://apitools.dev/json-schema-ref-parser/docs/options.html
*/
export interface HTTPResolverOptions<S extends object = JSONSchema> extends Partial<ResolverOptions<S>> {
/**
* You can specify any HTTP headers that should be sent when downloading files. For example, some servers may require you to set the `Accept` or `Referrer` header.
*/
headers?: RequestInit["headers"] | null;
/**
* The amount of time (in milliseconds) to wait for a response from the server when downloading files. The default is 5 seconds.
*/
timeout?: number;
/**
* The maximum number of HTTP redirects to follow per file. The default is 5. To disable automatic following of redirects, set this to zero.
*/
redirects?: number;
/**
* Set this to `true` if you're downloading files from a CORS-enabled server that requires authentication
*/
withCredentials?: boolean;
}
/**
* JSON Schema `$Ref` Parser comes with built-in resolvers for HTTP and HTTPS URLs, as well as local filesystem paths (when running in Node.js). You can add your own custom resolvers to support additional protocols, or even replace any of the built-in resolvers with your own custom implementation.
*
* See https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html
*/
export interface ResolverOptions<S extends object = JSONSchema> {
name?: string;
/**
* All resolvers have an order property, even the built-in resolvers. If you don't specify an order property, then your resolver will run last. Specifying `order: 1`, like we did in this example, will make your resolver run first. Or you can squeeze your resolver in-between some of the built-in resolvers. For example, `order: 101` would make it run after the file resolver, but before the HTTP resolver. You can see the order of all the built-in resolvers by looking at their source code.
*
* The order property and canRead property are related to each other. For each file that JSON Schema $Ref Parser needs to resolve, it first determines which resolvers can read that file by checking their canRead property. If only one resolver matches a file, then only that one resolver is called, regardless of its order. If multiple resolvers match a file, then those resolvers are tried in order until one of them successfully reads the file. Once a resolver successfully reads the file, the rest of the resolvers are skipped.
*/
order?: number;
/**
* The `canRead` property tells JSON Schema `$Ref` Parser what kind of files your resolver can read. In this example, we've simply specified a regular expression that matches "mogodb://" URLs, but we could have used a simple boolean, or even a function with custom logic to determine which files to resolve. Here are examples of each approach:
*/
canRead: boolean | RegExp | string | string[] | ((file: FileInfo) => boolean);
/**
* This is where the real work of a resolver happens. The `read` method accepts the same file info object as the `canRead` function, but rather than returning a boolean value, the `read` method should return the contents of the file. The file contents should be returned in as raw a form as possible, such as a string or a byte array. Any further parsing or processing should be done by parsers.
*
* Unlike the `canRead` function, the `read` method can also be asynchronous. This might be important if your resolver needs to read data from a database or some other external source. You can return your asynchronous value using either an ES6 Promise or a Node.js-style error-first callback. Of course, if your resolver has the ability to return its data synchronously, then that's fine too. Here are examples of all three approaches:
*/
read:
| string
| object
| ((
file: FileInfo,
callback?: (error: Error | null, data: string | null) => any,
) => string | Buffer | S | Promise<string | Buffer | S>);
}
export interface Plugin {
name?: string;
/**
* Parsers run in a specific order, relative to other parsers. For example, a parser with `order: 5` will run before a parser with `order: 10`. If a parser is unable to successfully parse a file, then the next parser is tried, until one succeeds or they all fail.
*
* You can change the order in which parsers run, which is useful if you know that most of your referenced files will be a certain type, or if you add your own custom parser that you want to run first.
*/
order?: number;
/**
* All of the built-in parsers allow empty files by default. The JSON and YAML parsers will parse empty files as `undefined`. The text parser will parse empty files as an empty string. The binary parser will parse empty files as an empty byte array.
*
* You can set `allowEmpty: false` on any parser, which will cause an error to be thrown if a file empty.
*/
allowEmpty?: boolean;
/**
* Specifies whether a Byte Order Mark (BOM) is allowed or not. Only applies to JSON parsing
*
* @type {boolean} @default true
*/
allowBOM?: boolean;
/**
* The encoding that the text is expected to be in.
*/
encoding?: BufferEncoding;
/**
* Determines which parsers will be used for which files.
*
* A regular expression can be used to match files by their full path. A string (or array of strings) can be used to match files by their file extension. Or a function can be used to perform more complex matching logic. See the custom parser docs for details.
*/
canParse?: boolean | RegExp | string | string[] | ((file: FileInfo) => boolean);
/**
* This is where the real work of a parser happens. The `parse` method accepts the same file info object as the `canParse` function, but rather than returning a boolean value, the `parse` method should return a JavaScript representation of the file contents. For our CSV parser, that is a two-dimensional array of lines and values. For your parser, it might be an object, a string, a custom class, or anything else.
*
* Unlike the `canParse` function, the `parse` method can also be asynchronous. This might be important if your parser needs to retrieve data from a database or if it relies on an external HTTP service to return the parsed value. You can return your asynchronous value via a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) or a Node.js-style error-first callback. Here are examples of both approaches:
*/
parse:
| ((file: FileInfo, callback?: (error: Error | null, data: string | null) => any) => unknown | Promise<unknown>)
| number
| string;
}
/**
* JSON Schema `$Ref` Parser supports plug-ins, such as resolvers and parsers. These plug-ins can have methods such as `canRead()`, `read()`, `canParse()`, and `parse()`. All of these methods accept the same object as their parameter: an object containing information about the file being read or parsed.
*
* The file info object currently only consists of a few properties, but it may grow in the future if plug-ins end up needing more information.
*
* See https://apitools.dev/json-schema-ref-parser/docs/plugins/file-info-object.html
*/
export interface FileInfo {
/**
* The full URL of the file. This could be any type of URL, including "http://", "https://", "file://", "ftp://", "mongodb://", or even a local filesystem path (when running in Node.js).
*/
url: string;
/**
* The hash (URL fragment) of the file URL, including the # symbol. If the URL doesn't have a hash, then this will be an empty string.
*/
hash: string;
/**
* The lowercase file extension, such as ".json", ".yaml", ".txt", etc.
*/
extension: string;
/**
* The raw file contents, in whatever form they were returned by the resolver that read the file.
*/
data: string | Buffer;
}

View File

@@ -0,0 +1,121 @@
import { importJWK } from '../key/import.js';
import { JWKSInvalid, JOSENotSupported, JWKSNoMatchingKey, JWKSMultipleMatchingKeys, } from '../util/errors.js';
import isObject from '../lib/is_object.js';
function getKtyFromAlg(alg) {
switch (typeof alg === 'string' && alg.slice(0, 2)) {
case 'RS':
case 'PS':
return 'RSA';
case 'ES':
return 'EC';
case 'Ed':
return 'OKP';
default:
throw new JOSENotSupported('Unsupported "alg" value for a JSON Web Key Set');
}
}
function isJWKSLike(jwks) {
return (jwks &&
typeof jwks === 'object' &&
Array.isArray(jwks.keys) &&
jwks.keys.every(isJWKLike));
}
function isJWKLike(key) {
return isObject(key);
}
function clone(obj) {
if (typeof structuredClone === 'function') {
return structuredClone(obj);
}
return JSON.parse(JSON.stringify(obj));
}
class LocalJWKSet {
constructor(jwks) {
this._cached = new WeakMap();
if (!isJWKSLike(jwks)) {
throw new JWKSInvalid('JSON Web Key Set malformed');
}
this._jwks = clone(jwks);
}
async getKey(protectedHeader, token) {
const { alg, kid } = { ...protectedHeader, ...token?.header };
const kty = getKtyFromAlg(alg);
const candidates = this._jwks.keys.filter((jwk) => {
let candidate = kty === jwk.kty;
if (candidate && typeof kid === 'string') {
candidate = kid === jwk.kid;
}
if (candidate && typeof jwk.alg === 'string') {
candidate = alg === jwk.alg;
}
if (candidate && typeof jwk.use === 'string') {
candidate = jwk.use === 'sig';
}
if (candidate && Array.isArray(jwk.key_ops)) {
candidate = jwk.key_ops.includes('verify');
}
if (candidate && alg === 'EdDSA') {
candidate = jwk.crv === 'Ed25519' || jwk.crv === 'Ed448';
}
if (candidate) {
switch (alg) {
case 'ES256':
candidate = jwk.crv === 'P-256';
break;
case 'ES256K':
candidate = jwk.crv === 'secp256k1';
break;
case 'ES384':
candidate = jwk.crv === 'P-384';
break;
case 'ES512':
candidate = jwk.crv === 'P-521';
break;
}
}
return candidate;
});
const { 0: jwk, length } = candidates;
if (length === 0) {
throw new JWKSNoMatchingKey();
}
if (length !== 1) {
const error = new JWKSMultipleMatchingKeys();
const { _cached } = this;
error[Symbol.asyncIterator] = async function* () {
for (const jwk of candidates) {
try {
yield await importWithAlgCache(_cached, jwk, alg);
}
catch { }
}
};
throw error;
}
return importWithAlgCache(this._cached, jwk, alg);
}
}
async function importWithAlgCache(cache, jwk, alg) {
const cached = cache.get(jwk) || cache.set(jwk, {}).get(jwk);
if (cached[alg] === undefined) {
const key = await importJWK({ ...jwk, ext: true }, alg);
if (key instanceof Uint8Array || key.type !== 'public') {
throw new JWKSInvalid('JSON Web Key Set members must be public keys');
}
cached[alg] = key;
}
return cached[alg];
}
export function createLocalJWKSet(jwks) {
const set = new LocalJWKSet(jwks);
const localJWKSet = async (protectedHeader, token) => set.getKey(protectedHeader, token);
Object.defineProperties(localJWKSet, {
jwks: {
value: () => clone(set._jwks),
enumerable: true,
configurable: false,
writable: false,
},
});
return localJWKSet;
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"deepMerge.d.ts","sourceRoot":"","sources":["../../src/utilities/deepMerge.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAA;AAIjC,OAAO,EAAE,SAAS,EAAE,CAAA;AACpB;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,EAC1D,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,SAAS,CAAC,OAAY,GAC9B,CAAC,CAkBH;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAEzF;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,CAI5F"}

View File

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

View File

@@ -0,0 +1,59 @@
"use strict";
exports.setDay = setDay;
var _index = require("./addDays.js");
var _index2 = require("./toDate.js");
var _index3 = require("./_lib/defaultOptions.js");
/**
* The {@link setDay} function options.
*/
/**
* @name setDay
* @category Weekday Helpers
* @summary Set the day of the week to the given date.
*
* @description
* Set the day of the week to the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The date to be changed
* @param day - The day of the week of the new date
* @param options - An object with options.
*
* @returns The new date with the day of the week set
*
* @example
* // Set week day to Sunday, with the default weekStartsOn of Sunday:
* const result = setDay(new Date(2014, 8, 1), 0)
* //=> Sun Aug 31 2014 00:00:00
*
* @example
* // Set week day to Sunday, with a weekStartsOn of Monday:
* const result = setDay(new Date(2014, 8, 1), 0, { weekStartsOn: 1 })
* //=> Sun Sep 07 2014 00:00:00
*/
function setDay(date, day, options) {
const defaultOptions = (0, _index3.getDefaultOptions)();
const weekStartsOn =
options?.weekStartsOn ??
options?.locale?.options?.weekStartsOn ??
defaultOptions.weekStartsOn ??
defaultOptions.locale?.options?.weekStartsOn ??
0;
const _date = (0, _index2.toDate)(date);
const currentDay = _date.getDay();
const remainder = day % 7;
const dayIndex = (remainder + 7) % 7;
const delta = 7 - weekStartsOn;
const diff =
day < 0 || day > 6
? day - ((currentDay + delta) % 7)
: ((dayIndex + delta) % 7) - ((currentDay + delta) % 7);
return (0, _index.addDays)(_date, diff);
}

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