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,51 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { useLivePreviewContext } from '../../../providers/LivePreview/context.js';
import './index.scss';
const baseClass = 'live-preview-iframe';
export const IFrame = () => {
const $ = _c(8);
const {
iframeRef,
setLoadedURL,
url,
zoom
} = useLivePreviewContext();
let t0;
if ($[0] !== setLoadedURL || $[1] !== url) {
t0 = () => {
setLoadedURL(url);
};
$[0] = setLoadedURL;
$[1] = url;
$[2] = t0;
} else {
t0 = $[2];
}
const t1 = typeof zoom === "number" ? `scale(${zoom}) ` : undefined;
let t2;
if ($[3] !== iframeRef || $[4] !== t0 || $[5] !== t1 || $[6] !== url) {
t2 = _jsx("iframe", {
className: baseClass,
onLoad: t0,
ref: iframeRef,
src: url,
style: {
transform: t1
},
title: url
}, url);
$[3] = iframeRef;
$[4] = t0;
$[5] = t1;
$[6] = url;
$[7] = t2;
} else {
t2 = $[7];
}
return t2;
};
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,3 @@
import type { PayloadHandler } from '../../config/types.js';
export declare const findByIDHandler: PayloadHandler;
//# sourceMappingURL=findByID.d.ts.map

View File

@@ -0,0 +1,99 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const types = require('../../types.js');
const bindReporter = require('./lib/bindReporter.js');
const getVisibilityWatcher = require('./lib/getVisibilityWatcher.js');
const initMetric = require('./lib/initMetric.js');
const initUnique = require('./lib/initUnique.js');
const LayoutShiftManager = require('./lib/LayoutShiftManager.js');
const observe = require('./lib/observe.js');
const runOnce = require('./lib/runOnce.js');
const onFCP = require('./onFCP.js');
/*
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/** Thresholds for CLS. See https://web.dev/articles/cls#what_is_a_good_cls_score */
const CLSThresholds = [0.1, 0.25];
/**
* Calculates the [CLS](https://web.dev/articles/cls) value for the current page and
* calls the `callback` function once the value is ready to be reported, along
* with all `layout-shift` performance entries that were used in the metric
* value calculation. The reported value is a `double` (corresponding to a
* [layout shift score](https://web.dev/articles/cls#layout_shift_score)).
*
* If the `reportAllChanges` configuration option is set to `true`, the
* `callback` function will be called as soon as the value is initially
* determined as well as any time the value changes throughout the page
* lifespan.
*
* _**Important:** CLS should be continually monitored for changes throughout
* the entire lifespan of a page—including if the user returns to the page after
* it's been hidden/backgrounded. However, since browsers often [will not fire
* additional callbacks once the user has backgrounded a
* page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),
* `callback` is always called when the page's visibility state changes to
* hidden. As a result, the `callback` function might be called multiple times
* during the same page load._
*/
const onCLS = (onReport, opts = {}) => {
// Start monitoring FCP so we can only report CLS if FCP is also reported.
// Note: this is done to match the current behavior of CrUX.
onFCP.onFCP(
runOnce.runOnce(() => {
const metric = initMetric.initMetric('CLS', 0);
let report;
const visibilityWatcher = getVisibilityWatcher.getVisibilityWatcher();
const layoutShiftManager = initUnique.initUnique(opts, LayoutShiftManager.LayoutShiftManager);
const handleEntries = (entries) => {
for (const entry of entries) {
layoutShiftManager._processEntry(entry);
}
// If the current session value is larger than the current CLS value,
// update CLS and the entries contributing to it.
if (layoutShiftManager._sessionValue > metric.value) {
metric.value = layoutShiftManager._sessionValue;
metric.entries = layoutShiftManager._sessionEntries;
report();
}
};
const po = observe.observe('layout-shift', handleEntries);
if (po) {
report = bindReporter.bindReporter(onReport, metric, CLSThresholds, opts.reportAllChanges);
visibilityWatcher.onHidden(() => {
handleEntries(po.takeRecords() );
report(true);
});
// Queue a task to report (if nothing else triggers a report first).
// This allows CLS to be reported as soon as FCP fires when
// `reportAllChanges` is true.
types.WINDOW?.setTimeout?.(report);
}
}),
);
};
exports.CLSThresholds = CLSThresholds;
exports.onCLS = onCLS;
//# sourceMappingURL=getCLS.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"flip-horizontal.js","sources":["../../../src/icons/flip-horizontal.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FlipHorizontal\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAzSDVhMiAyIDAgMCAwLTIgMnYxNGMwIDEuMS45IDIgMiAyaDMiIC8+CiAgPHBhdGggZD0iTTE2IDNoM2EyIDIgMCAwIDEgMiAydjE0YTIgMiAwIDAgMS0yIDJoLTMiIC8+CiAgPHBhdGggZD0iTTEyIDIwdjIiIC8+CiAgPHBhdGggZD0iTTEyIDE0djIiIC8+CiAgPHBhdGggZD0iTTEyIDh2MiIgLz4KICA8cGF0aCBkPSJNMTIgMnYyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/flip-horizontal\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 FlipHorizontal = createLucideIcon('FlipHorizontal', [\n ['path', { d: 'M8 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h3', key: '1i73f7' }],\n ['path', { d: 'M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3', key: 'saxlbk' }],\n ['path', { d: 'M12 20v2', key: '1lh1kg' }],\n ['path', { d: 'M12 14v2', key: '8jcxud' }],\n ['path', { d: 'M12 8v2', key: '1woqiv' }],\n ['path', { d: 'M12 2v2', key: 'tus03m' }],\n]);\n\nexport default FlipHorizontal;\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,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}

View File

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

View File

@@ -0,0 +1,5 @@
import React from 'react';
import type { TextAreaInputProps } from './types.js';
import './index.scss';
export declare const TextareaInput: React.FC<TextAreaInputProps>;
//# sourceMappingURL=Input.d.ts.map

View File

@@ -0,0 +1,66 @@
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var common = require('./common');
var test = require('tape');
var assert = require('assert');
var EventEmitter = require('../').EventEmitter;
var util = require('util');
util.inherits(MyEE, EventEmitter);
function MyEE(cb) {
this.once(1, cb);
this.emit(1);
this.removeAllListeners();
EventEmitter.call(this);
}
var myee = new MyEE(common.mustCall());
util.inherits(ErrorEE, EventEmitter);
function ErrorEE() {
this.emit('error', new Error('blerg'));
}
assert.throws(function() {
new ErrorEE();
}, /blerg/);
test.onFinish(function() {
assert.ok(!(myee._events instanceof Object));
assert.strictEqual(Object.keys(myee._events).length, 0);
});
function MyEE2() {
EventEmitter.call(this);
}
MyEE2.prototype = new EventEmitter();
var ee1 = new MyEE2();
var ee2 = new MyEE2();
ee1.on('x', function() {});
assert.strictEqual(ee2.listenerCount('x'), 0);

View File

@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const UserCheck = createLucideIcon("UserCheck", [
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
["polyline", { points: "16 11 18 13 22 9", key: "1pwet4" }]
]);
export { UserCheck as default };
//# sourceMappingURL=user-check.js.map

View File

@@ -0,0 +1,44 @@
"use strict";
exports.formatRelative = void 0;
const formatRelativeLocale = {
lastWeek: (date) => {
switch (date.getDay()) {
case 0:
return "'prošlu nedjelju u' p";
case 3:
return "'prošlu srijedu u' p";
case 6:
return "'prošlu subotu u' p";
default:
return "'prošli' EEEE 'u' p";
}
},
yesterday: "'jučer u' p",
today: "'danas u' p",
tomorrow: "'sutra u' p",
nextWeek: (date) => {
switch (date.getDay()) {
case 0:
return "'iduću nedjelju u' p";
case 3:
return "'iduću srijedu u' p";
case 6:
return "'iduću subotu u' p";
default:
return "'prošli' EEEE 'u' p";
}
},
other: "P",
};
const formatRelative = (token, date, _baseDate, _options) => {
const format = formatRelativeLocale[token];
if (typeof format === "function") {
return format(date);
}
return format;
};
exports.formatRelative = formatRelative;

View File

@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleSlash2 = createLucideIcon("CircleSlash2", [
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
["path", { d: "M22 2 2 22", key: "y4kqgn" }]
]);
export { CircleSlash2 as default };
//# sourceMappingURL=circle-slash-2.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/Textarea/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgC,uBAAuB,EAAE,MAAM,SAAS,CAAA;AAGpF,OAAO,KAA+B,MAAM,OAAO,CAAA;AAEnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAQpD,OAAO,cAAc,CAAA;AAErB,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE1C,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,CAAA;AAmF5C,eAAO,MAAM,aAAa;wBAjFA,MAAO,GAAG;yBAC9B,MACF,oBACQ;;;;;+EA8EsD,CAAA"}

View File

@@ -0,0 +1,166 @@
var Stack = require('./_Stack'),
arrayEach = require('./_arrayEach'),
assignValue = require('./_assignValue'),
baseAssign = require('./_baseAssign'),
baseAssignIn = require('./_baseAssignIn'),
cloneBuffer = require('./_cloneBuffer'),
copyArray = require('./_copyArray'),
copySymbols = require('./_copySymbols'),
copySymbolsIn = require('./_copySymbolsIn'),
getAllKeys = require('./_getAllKeys'),
getAllKeysIn = require('./_getAllKeysIn'),
getTag = require('./_getTag'),
initCloneArray = require('./_initCloneArray'),
initCloneByTag = require('./_initCloneByTag'),
initCloneObject = require('./_initCloneObject'),
isArray = require('./isArray'),
isBuffer = require('./isBuffer'),
isMap = require('./isMap'),
isObject = require('./isObject'),
isSet = require('./isSet'),
keys = require('./keys'),
keysIn = require('./keysIn');
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1,
CLONE_FLAT_FLAG = 2,
CLONE_SYMBOLS_FLAG = 4;
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
weakMapTag = '[object WeakMap]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] =
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
cloneableTags[boolTag] = cloneableTags[dateTag] =
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
cloneableTags[int32Tag] = cloneableTags[mapTag] =
cloneableTags[numberTag] = cloneableTags[objectTag] =
cloneableTags[regexpTag] = cloneableTags[setTag] =
cloneableTags[stringTag] = cloneableTags[symbolTag] =
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[weakMapTag] = false;
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
*
* @private
* @param {*} value The value to clone.
* @param {boolean} bitmask The bitmask flags.
* 1 - Deep clone
* 2 - Flatten inherited properties
* 4 - Clone symbols
* @param {Function} [customizer] The function to customize cloning.
* @param {string} [key] The key of `value`.
* @param {Object} [object] The parent object of `value`.
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
* @returns {*} Returns the cloned value.
*/
function baseClone(value, bitmask, customizer, key, object, stack) {
var result,
isDeep = bitmask & CLONE_DEEP_FLAG,
isFlat = bitmask & CLONE_FLAT_FLAG,
isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result);
}
} else {
var tag = getTag(value),
isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
result = (isFlat || isFunc) ? {} : initCloneObject(value);
if (!isDeep) {
return isFlat
? copySymbolsIn(value, baseAssignIn(result, value))
: copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, isDeep);
}
}
// Check for circular references and return its corresponding clone.
stack || (stack = new Stack);
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
if (isSet(value)) {
value.forEach(function(subValue) {
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
});
} else if (isMap(value)) {
value.forEach(function(subValue, key) {
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
}
var keysFunc = isFull
? (isFlat ? getAllKeysIn : getAllKeys)
: (isFlat ? keysIn : keys);
var props = isArr ? undefined : keysFunc(value);
arrayEach(props || value, function(subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
// Recursively populate clone (susceptible to call stack limits).
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
return result;
}
module.exports = baseClone;

View File

@@ -0,0 +1,20 @@
var baseSetData = require('./_baseSetData'),
shortOut = require('./_shortOut');
/**
* Sets metadata for `func`.
*
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short
* period of time, it will trip its breaker and transition to an identity
* function to avoid garbage collection pauses in V8. See
* [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
* for more details.
*
* @private
* @param {Function} func The function to associate metadata with.
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var setData = shortOut(baseSetData);
module.exports = setData;

View File

@@ -0,0 +1 @@
export declare function isScrollable(element: HTMLElement, computedStyle?: CSSStyleDeclaration): boolean;

View File

@@ -0,0 +1,5 @@
'use strict'
const compare = require('./compare')
const gt = (a, b, loose) => compare(a, b, loose) > 0
module.exports = gt

View File

@@ -0,0 +1 @@
export { getFormat, getSource, load, resolve } from '@opentelemetry/instrumentation/hook.mjs';

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "resizeSectionByteSize", {
enumerable: true,
get: function get() {
return _resize.resizeSectionByteSize;
}
});
Object.defineProperty(exports, "resizeSectionVecSize", {
enumerable: true,
get: function get() {
return _resize.resizeSectionVecSize;
}
});
Object.defineProperty(exports, "createEmptySection", {
enumerable: true,
get: function get() {
return _create.createEmptySection;
}
});
Object.defineProperty(exports, "removeSections", {
enumerable: true,
get: function get() {
return _remove.removeSections;
}
});
var _resize = require("./resize");
var _create = require("./create");
var _remove = require("./remove");

View File

@@ -0,0 +1 @@
export type MarkOptional<Type, Keys extends keyof Type> = Type extends Type ? Omit<Type, Keys> & Partial<Pick<Type, Keys>> : never;

View File

@@ -0,0 +1,45 @@
'use strict'
const { test } = require('node:test')
const match = require('@jsumners/assert-match')
const handleCustomLevelsNamesOpts = require('./handle-custom-levels-names-opts')
test('returns a empty object `{}` for undefined parameter', t => {
const handledCustomLevelNames = handleCustomLevelsNamesOpts()
t.assert.deepStrictEqual(handledCustomLevelNames, {})
})
test('returns a empty object `{}` for unknown parameter', t => {
const handledCustomLevelNames = handleCustomLevelsNamesOpts(123)
t.assert.deepStrictEqual(handledCustomLevelNames, {})
})
test('returns a filled object for string parameter', t => {
const handledCustomLevelNames = handleCustomLevelsNamesOpts('ok:10,warn:20,error:35')
match(handledCustomLevelNames, {
ok: 10,
warn: 20,
error: 35
}, t)
})
test('returns a filled object for object parameter', t => {
const handledCustomLevelNames = handleCustomLevelsNamesOpts({
ok: 10,
warn: 20,
error: 35
})
match(handledCustomLevelNames, {
ok: 10,
warn: 20,
error: 35
}, t)
})
test('defaults missing level num to first index', t => {
const result = handleCustomLevelsNamesOpts('ok:10,info')
match(result, {
ok: 10,
info: 1
}, t)
})

View File

@@ -0,0 +1,21 @@
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
import { DataloaderInstrumentationConfig } from './types';
export declare class DataloaderInstrumentation extends InstrumentationBase<DataloaderInstrumentationConfig> {
constructor(config?: DataloaderInstrumentationConfig);
protected init(): InstrumentationNodeModuleDefinition[];
private shouldCreateSpans;
private getSpanName;
private _wrapBatchLoadFn;
private _getPatchedConstructor;
private _patchLoad;
private _getPatchedLoad;
private _patchLoadMany;
private _getPatchedLoadMany;
private _patchPrime;
private _getPatchedPrime;
private _patchClear;
private _getPatchedClear;
private _patchClearAll;
private _getPatchedClearAll;
}
//# sourceMappingURL=instrumentation.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"sdk-info.js","sourceRoot":"","sources":["../../../../src/platform/browser/sdk-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,kCAAkC,EAClC,0BAA0B,GAC3B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAE1D,0CAA0C;AAC1C,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,CAAC,uBAAuB,CAAC,EAAE,eAAe;IAC1C,CAAC,yBAAyB,CAAC,EAAE,SAAS;IACtC,CAAC,2BAA2B,CAAC,EAAE,kCAAkC;IACjE,CAAC,0BAA0B,CAAC,EAAE,OAAO;CACtC,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { VERSION } from '../../version';\nimport {\n ATTR_TELEMETRY_SDK_NAME,\n ATTR_TELEMETRY_SDK_LANGUAGE,\n TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS,\n ATTR_TELEMETRY_SDK_VERSION,\n} from '@opentelemetry/semantic-conventions';\nimport { ATTR_PROCESS_RUNTIME_NAME } from '../../semconv';\n\n/** Constants describing the SDK in use */\nexport const SDK_INFO = {\n [ATTR_TELEMETRY_SDK_NAME]: 'opentelemetry',\n [ATTR_PROCESS_RUNTIME_NAME]: 'browser',\n [ATTR_TELEMETRY_SDK_LANGUAGE]: TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS,\n [ATTR_TELEMETRY_SDK_VERSION]: VERSION,\n};\n"]}

View File

@@ -0,0 +1,277 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.access = access;
exports.assertArray = assertArray;
exports.assertAssumptions = assertAssumptions;
exports.assertBabelrcSearch = assertBabelrcSearch;
exports.assertBoolean = assertBoolean;
exports.assertCallerMetadata = assertCallerMetadata;
exports.assertCompact = assertCompact;
exports.assertConfigApplicableTest = assertConfigApplicableTest;
exports.assertConfigFileSearch = assertConfigFileSearch;
exports.assertFunction = assertFunction;
exports.assertIgnoreList = assertIgnoreList;
exports.assertInputSourceMap = assertInputSourceMap;
exports.assertObject = assertObject;
exports.assertPluginList = assertPluginList;
exports.assertRootMode = assertRootMode;
exports.assertSourceMaps = assertSourceMaps;
exports.assertSourceType = assertSourceType;
exports.assertString = assertString;
exports.assertTargets = assertTargets;
exports.msg = msg;
function _helperCompilationTargets() {
const data = require("@babel/helper-compilation-targets");
_helperCompilationTargets = function () {
return data;
};
return data;
}
var _options = require("./options.js");
function msg(loc) {
switch (loc.type) {
case "root":
return ``;
case "env":
return `${msg(loc.parent)}.env["${loc.name}"]`;
case "overrides":
return `${msg(loc.parent)}.overrides[${loc.index}]`;
case "option":
return `${msg(loc.parent)}.${loc.name}`;
case "access":
return `${msg(loc.parent)}[${JSON.stringify(loc.name)}]`;
default:
throw new Error(`Assertion failure: Unknown type ${loc.type}`);
}
}
function access(loc, name) {
return {
type: "access",
name,
parent: loc
};
}
function assertRootMode(loc, value) {
if (value !== undefined && value !== "root" && value !== "upward" && value !== "upward-optional") {
throw new Error(`${msg(loc)} must be a "root", "upward", "upward-optional" or undefined`);
}
return value;
}
function assertSourceMaps(loc, value) {
if (value !== undefined && typeof value !== "boolean" && value !== "inline" && value !== "both") {
throw new Error(`${msg(loc)} must be a boolean, "inline", "both", or undefined`);
}
return value;
}
function assertCompact(loc, value) {
if (value !== undefined && typeof value !== "boolean" && value !== "auto") {
throw new Error(`${msg(loc)} must be a boolean, "auto", or undefined`);
}
return value;
}
function assertSourceType(loc, value) {
if (value !== undefined && value !== "module" && value !== "commonjs" && value !== "script" && value !== "unambiguous") {
throw new Error(`${msg(loc)} must be "module", "commonjs", "script", "unambiguous", or undefined`);
}
return value;
}
function assertCallerMetadata(loc, value) {
const obj = assertObject(loc, value);
if (obj) {
if (typeof obj.name !== "string") {
throw new Error(`${msg(loc)} set but does not contain "name" property string`);
}
for (const prop of Object.keys(obj)) {
const propLoc = access(loc, prop);
const value = obj[prop];
if (value != null && typeof value !== "boolean" && typeof value !== "string" && typeof value !== "number") {
throw new Error(`${msg(propLoc)} must be null, undefined, a boolean, a string, or a number.`);
}
}
}
return value;
}
function assertInputSourceMap(loc, value) {
if (value !== undefined && typeof value !== "boolean" && (typeof value !== "object" || !value)) {
throw new Error(`${msg(loc)} must be a boolean, object, or undefined`);
}
return value;
}
function assertString(loc, value) {
if (value !== undefined && typeof value !== "string") {
throw new Error(`${msg(loc)} must be a string, or undefined`);
}
return value;
}
function assertFunction(loc, value) {
if (value !== undefined && typeof value !== "function") {
throw new Error(`${msg(loc)} must be a function, or undefined`);
}
return value;
}
function assertBoolean(loc, value) {
if (value !== undefined && typeof value !== "boolean") {
throw new Error(`${msg(loc)} must be a boolean, or undefined`);
}
return value;
}
function assertObject(loc, value) {
if (value !== undefined && (typeof value !== "object" || Array.isArray(value) || !value)) {
throw new Error(`${msg(loc)} must be an object, or undefined`);
}
return value;
}
function assertArray(loc, value) {
if (value != null && !Array.isArray(value)) {
throw new Error(`${msg(loc)} must be an array, or undefined`);
}
return value;
}
function assertIgnoreList(loc, value) {
const arr = assertArray(loc, value);
arr == null || arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item));
return arr;
}
function assertIgnoreItem(loc, value) {
if (typeof value !== "string" && typeof value !== "function" && !(value instanceof RegExp)) {
throw new Error(`${msg(loc)} must be an array of string/Function/RegExp values, or undefined`);
}
return value;
}
function assertConfigApplicableTest(loc, value) {
if (value === undefined) {
return value;
}
if (Array.isArray(value)) {
value.forEach((item, i) => {
if (!checkValidTest(item)) {
throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
}
});
} else if (!checkValidTest(value)) {
throw new Error(`${msg(loc)} must be a string/Function/RegExp, or an array of those`);
}
return value;
}
function checkValidTest(value) {
return typeof value === "string" || typeof value === "function" || value instanceof RegExp;
}
function assertConfigFileSearch(loc, value) {
if (value !== undefined && typeof value !== "boolean" && typeof value !== "string") {
throw new Error(`${msg(loc)} must be a undefined, a boolean, a string, ` + `got ${JSON.stringify(value)}`);
}
return value;
}
function assertBabelrcSearch(loc, value) {
if (value === undefined || typeof value === "boolean") {
return value;
}
if (Array.isArray(value)) {
value.forEach((item, i) => {
if (!checkValidTest(item)) {
throw new Error(`${msg(access(loc, i))} must be a string/Function/RegExp.`);
}
});
} else if (!checkValidTest(value)) {
throw new Error(`${msg(loc)} must be a undefined, a boolean, a string/Function/RegExp ` + `or an array of those, got ${JSON.stringify(value)}`);
}
return value;
}
function assertPluginList(loc, value) {
const arr = assertArray(loc, value);
if (arr) {
arr.forEach((item, i) => assertPluginItem(access(loc, i), item));
}
return arr;
}
function assertPluginItem(loc, value) {
if (Array.isArray(value)) {
if (value.length === 0) {
throw new Error(`${msg(loc)} must include an object`);
}
if (value.length > 3) {
throw new Error(`${msg(loc)} may only be a two-tuple or three-tuple`);
}
assertPluginTarget(access(loc, 0), value[0]);
if (value.length > 1) {
const opts = value[1];
if (opts !== undefined && opts !== false && (typeof opts !== "object" || Array.isArray(opts) || opts === null)) {
throw new Error(`${msg(access(loc, 1))} must be an object, false, or undefined`);
}
}
if (value.length === 3) {
const name = value[2];
if (name !== undefined && typeof name !== "string") {
throw new Error(`${msg(access(loc, 2))} must be a string, or undefined`);
}
}
} else {
assertPluginTarget(loc, value);
}
return value;
}
function assertPluginTarget(loc, value) {
if ((typeof value !== "object" || !value) && typeof value !== "string" && typeof value !== "function") {
throw new Error(`${msg(loc)} must be a string, object, function`);
}
return value;
}
function assertTargets(loc, value) {
if ((0, _helperCompilationTargets().isBrowsersQueryValid)(value)) return value;
if (typeof value !== "object" || !value || Array.isArray(value)) {
throw new Error(`${msg(loc)} must be a string, an array of strings or an object`);
}
const browsersLoc = access(loc, "browsers");
const esmodulesLoc = access(loc, "esmodules");
assertBrowsersList(browsersLoc, value.browsers);
assertBoolean(esmodulesLoc, value.esmodules);
for (const key of Object.keys(value)) {
const val = value[key];
const subLoc = access(loc, key);
if (key === "esmodules") assertBoolean(subLoc, val);else if (key === "browsers") assertBrowsersList(subLoc, val);else if (!hasOwnProperty.call(_helperCompilationTargets().TargetNames, key)) {
const validTargets = Object.keys(_helperCompilationTargets().TargetNames).join(", ");
throw new Error(`${msg(subLoc)} is not a valid target. Supported targets are ${validTargets}`);
} else assertBrowserVersion(subLoc, val);
}
return value;
}
function assertBrowsersList(loc, value) {
if (value !== undefined && !(0, _helperCompilationTargets().isBrowsersQueryValid)(value)) {
throw new Error(`${msg(loc)} must be undefined, a string or an array of strings`);
}
}
function assertBrowserVersion(loc, value) {
if (typeof value === "number" && Math.round(value) === value) return;
if (typeof value === "string") return;
throw new Error(`${msg(loc)} must be a string or an integer number`);
}
function assertAssumptions(loc, value) {
if (value === undefined) return;
if (typeof value !== "object" || value === null) {
throw new Error(`${msg(loc)} must be an object or undefined.`);
}
let root = loc;
do {
root = root.parent;
} while (root.type !== "root");
const inPreset = root.source === "preset";
for (const name of Object.keys(value)) {
const subLoc = access(loc, name);
if (!_options.assumptionsNames.has(name)) {
throw new Error(`${msg(subLoc)} is not a supported assumption.`);
}
if (typeof value[name] !== "boolean") {
throw new Error(`${msg(subLoc)} must be a boolean.`);
}
if (inPreset && value[name] === false) {
throw new Error(`${msg(subLoc)} cannot be set to 'false' inside presets.`);
}
}
return value;
}
0 && 0;
//# sourceMappingURL=option-assertions.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/context/types.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 Context {\n /**\n * Get a value from the context.\n *\n * @param key key which identifies a context value\n */\n getValue(key: symbol): unknown;\n\n /**\n * Create a new context which inherits from this context and has\n * the given key set to the given value.\n *\n * @param key context key for which to set the value\n * @param value value to set for the given key\n */\n setValue(key: symbol, value: unknown): Context;\n\n /**\n * Return a new context which inherits from this context but does\n * not contain a value for the given key.\n *\n * @param key context key for which to clear a value\n */\n deleteValue(key: symbol): Context;\n}\n\nexport interface ContextManager {\n /**\n * Get the current active context\n */\n active(): Context;\n\n /**\n * Run the fn callback with object set as the current active context\n * @param context Any object to set as the current active context\n * @param fn A callback to be immediately run within a specific context\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(\n context: Context,\n fn: F,\n thisArg?: ThisParameterType<F>,\n ...args: A\n ): ReturnType<F>;\n\n /**\n * Bind an object as the current context (or a specific one)\n * @param [context] Optionally specify the context which you want to assign\n * @param target Any object to which a context need to be set\n */\n bind<T>(context: Context, target: T): T;\n\n /**\n * Enable context management\n */\n enable(): this;\n\n /**\n * Disable context management\n */\n disable(): this;\n}\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"octagon-x.js","sources":["../../../src/icons/octagon-x.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name OctagonX\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtMTUgOS02IDYiIC8+CiAgPHBhdGggZD0iTTIuNTg2IDE2LjcyNkEyIDIgMCAwIDEgMiAxNS4zMTJWOC42ODhhMiAyIDAgMCAxIC41ODYtMS40MTRsNC42ODgtNC42ODhBMiAyIDAgMCAxIDguNjg4IDJoNi42MjRhMiAyIDAgMCAxIDEuNDE0LjU4Nmw0LjY4OCA0LjY4OEEyIDIgMCAwIDEgMjIgOC42ODh2Ni42MjRhMiAyIDAgMCAxLS41ODYgMS40MTRsLTQuNjg4IDQuNjg4YTIgMiAwIDAgMS0xLjQxNC41ODZIOC42ODhhMiAyIDAgMCAxLTEuNDE0LS41ODZ6IiAvPgogIDxwYXRoIGQ9Im05IDkgNiA2IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/octagon-x\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 OctagonX = createLucideIcon('OctagonX', [\n ['path', { d: 'm15 9-6 6', key: '1uzhvr' }],\n [\n 'path',\n {\n d: 'M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z',\n key: '2d38gg',\n },\n ],\n ['path', { d: 'm9 9 6 6', key: 'z0biqf' }],\n]);\n\nexport default OctagonX;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,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,CAC1C,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;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,CAAA;AAAA,CAAA,CACA,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,19 @@
Copyright (c) 2015 Luigi Pinca
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -0,0 +1,57 @@
import { isBuild } from '../utils/isBuild.js';
import { withTracedServerSideDataFetcher, withErrorInstrumentation } from '../utils/wrapperUtils.js';
/**
* Create a wrapped version of the user's exported `getServerSideProps` function
*
* @param origGetServerSideProps The user's `getServerSideProps` function
* @param parameterizedRoute The page's parameterized route
* @returns A wrapped version of the function
*/
function wrapGetServerSidePropsWithSentry(
origGetServerSideProps,
parameterizedRoute,
) {
return new Proxy(origGetServerSideProps, {
apply: async (wrappingTarget, thisArg, args) => {
if (isBuild()) {
return wrappingTarget.apply(thisArg, args);
}
const [context] = args;
const { req, res } = context;
const errorWrappedGetServerSideProps = withErrorInstrumentation(wrappingTarget);
const tracedGetServerSideProps = withTracedServerSideDataFetcher(errorWrappedGetServerSideProps, req, res, {
dataFetcherRouteName: parameterizedRoute,
requestedRouteName: parameterizedRoute,
dataFetchingMethodName: 'getServerSideProps',
});
const {
data: serverSideProps,
baggage,
sentryTrace,
}
= await (tracedGetServerSideProps.apply(thisArg, args) );
if (typeof serverSideProps === 'object' && serverSideProps !== null && 'props' in serverSideProps) {
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (sentryTrace) {
(serverSideProps.props )._sentryTraceData = sentryTrace;
}
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (baggage) {
(serverSideProps.props )._sentryBaggage = baggage;
}
}
return serverSideProps;
},
});
}
export { wrapGetServerSidePropsWithSentry };
//# sourceMappingURL=wrapGetServerSidePropsWithSentry.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"pointer-off.js","sources":["../../../src/icons/pointer-off.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PointerOff\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgNC41VjRhMiAyIDAgMCAwLTIuNDEtMS45NTciIC8+CiAgPHBhdGggZD0iTTEzLjkgOC40YTIgMiAwIDAgMC0xLjI2LTEuMjk1IiAvPgogIDxwYXRoIGQ9Ik0yMS43IDE2LjJBOCA4IDAgMCAwIDIyIDE0di0zYTIgMiAwIDEgMC00IDB2LTFhMiAyIDAgMCAwLTMuNjMtMS4xNTgiIC8+CiAgPHBhdGggZD0ibTcgMTUtMS44LTEuOGEyIDIgMCAwIDAtMi43OSAyLjg2TDYgMTkuN2E3Ljc0IDcuNzQgMCAwIDAgNiAyLjNoMmE4IDggMCAwIDAgNS42NTctMi4zNDMiIC8+CiAgPHBhdGggZD0iTTYgNnY4IiAvPgogIDxwYXRoIGQ9Im0yIDIgMjAgMjAiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/pointer-off\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst PointerOff = createLucideIcon('PointerOff', [\n ['path', { d: 'M10 4.5V4a2 2 0 0 0-2.41-1.957', key: 'jsi14n' }],\n ['path', { d: 'M13.9 8.4a2 2 0 0 0-1.26-1.295', key: 'hirc7f' }],\n [\n 'path',\n { d: 'M21.7 16.2A8 8 0 0 0 22 14v-3a2 2 0 1 0-4 0v-1a2 2 0 0 0-3.63-1.158', key: '1jxb2e' },\n ],\n [\n 'path',\n {\n d: 'm7 15-1.8-1.8a2 2 0 0 0-2.79 2.86L6 19.7a7.74 7.74 0 0 0 6 2.3h2a8 8 0 0 0 5.657-2.343',\n key: '10r7hm',\n },\n ],\n ['path', { d: 'M6 6v8', key: 'tv5xkp' }],\n ['path', { d: 'm2 2 20 20', key: '1ooewy' }],\n]);\n\nexport default PointerOff;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC/D,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC5F,CAAA,CAAA,CAAA;AAAA,CACA,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;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,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}

View File

@@ -0,0 +1,31 @@
var baseSortedIndex = require('./_baseSortedIndex'),
eq = require('./eq');
/**
* This method is like `_.lastIndexOf` except that it performs a binary
* search on a sorted `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
* // => 3
*/
function sortedLastIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value, true) - 1;
if (eq(array[index], value)) {
return index;
}
}
return -1;
}
module.exports = sortedLastIndexOf;

View File

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

View File

@@ -0,0 +1,334 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Position = require("acorn").Position;
const SourceLocation = require("acorn").SourceLocation;
const ValidationError = require("schema-utils").ValidationError;
const {
CachedSource,
ConcatSource,
OriginalSource,
PrefixSource,
RawSource,
ReplaceSource,
SourceMapSource
} = require("webpack-sources");
const { register } = require("./serialization");
/** @typedef {import("acorn").Position} Position */
/** @typedef {import("../Dependency").RealDependencyLocation} RealDependencyLocation */
/** @typedef {import("../Dependency").SourcePosition} SourcePosition */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectDeserializerContext} ObjectDeserializerContext */
/** @typedef {import("../serialization/ObjectMiddleware").ObjectSerializerContext} ObjectSerializerContext */
const CURRENT_MODULE = "webpack/lib/util/registerExternalSerializer";
register(
CachedSource,
CURRENT_MODULE,
"webpack-sources/CachedSource",
new (class CachedSourceSerializer {
/**
* @param {CachedSource} source the cached source to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(source, { write, writeLazy }) {
if (writeLazy) {
writeLazy(source.originalLazy());
} else {
write(source.original());
}
write(source.getCachedData());
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {CachedSource} cached source
*/
deserialize({ read }) {
const source = read();
const cachedData = read();
return new CachedSource(source, cachedData);
}
})()
);
register(
RawSource,
CURRENT_MODULE,
"webpack-sources/RawSource",
new (class RawSourceSerializer {
/**
* @param {RawSource} source the raw source to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(source, { write }) {
write(source.buffer());
write(!source.isBuffer());
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {RawSource} raw source
*/
deserialize({ read }) {
const source = read();
const convertToString = read();
return new RawSource(source, convertToString);
}
})()
);
register(
ConcatSource,
CURRENT_MODULE,
"webpack-sources/ConcatSource",
new (class ConcatSourceSerializer {
/**
* @param {ConcatSource} source the concat source to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(source, { write }) {
write(source.getChildren());
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {ConcatSource} concat source
*/
deserialize({ read }) {
const source = new ConcatSource();
source.addAllSkipOptimizing(read());
return source;
}
})()
);
register(
PrefixSource,
CURRENT_MODULE,
"webpack-sources/PrefixSource",
new (class PrefixSourceSerializer {
/**
* @param {PrefixSource} source the prefix source to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(source, { write }) {
write(source.getPrefix());
write(source.original());
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {PrefixSource} prefix source
*/
deserialize({ read }) {
return new PrefixSource(read(), read());
}
})()
);
register(
ReplaceSource,
CURRENT_MODULE,
"webpack-sources/ReplaceSource",
new (class ReplaceSourceSerializer {
/**
* @param {ReplaceSource} source the replace source to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(source, { write }) {
write(source.original());
write(source.getName());
const replacements = source.getReplacements();
write(replacements.length);
for (const repl of replacements) {
write(repl.start);
write(repl.end);
}
for (const repl of replacements) {
write(repl.content);
write(repl.name);
}
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {ReplaceSource} replace source
*/
deserialize({ read }) {
const source = new ReplaceSource(read(), read());
const len = read();
/** @type {number[]} */
const startEndBuffer = [];
for (let i = 0; i < len; i++) {
startEndBuffer.push(read(), read());
}
let j = 0;
for (let i = 0; i < len; i++) {
source.replace(
startEndBuffer[j++],
startEndBuffer[j++],
read(),
read()
);
}
return source;
}
})()
);
register(
OriginalSource,
CURRENT_MODULE,
"webpack-sources/OriginalSource",
new (class OriginalSourceSerializer {
/**
* @param {OriginalSource} source the original source to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(source, { write }) {
write(source.buffer());
write(source.getName());
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {OriginalSource} original source
*/
deserialize({ read }) {
const buffer = read();
const name = read();
return new OriginalSource(buffer, name);
}
})()
);
register(
SourceLocation,
CURRENT_MODULE,
"acorn/SourceLocation",
new (class SourceLocationSerializer {
/**
* @param {SourceLocation} loc the location to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(loc, { write }) {
write(loc.start.line);
write(loc.start.column);
write(loc.end.line);
write(loc.end.column);
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {RealDependencyLocation} location
*/
deserialize({ read }) {
return {
start: {
line: read(),
column: read()
},
end: {
line: read(),
column: read()
}
};
}
})()
);
register(
Position,
CURRENT_MODULE,
"acorn/Position",
new (class PositionSerializer {
/**
* @param {Position} pos the position to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(pos, { write }) {
write(pos.line);
write(pos.column);
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {SourcePosition} position
*/
deserialize({ read }) {
return {
line: read(),
column: read()
};
}
})()
);
register(
SourceMapSource,
CURRENT_MODULE,
"webpack-sources/SourceMapSource",
new (class SourceMapSourceSerializer {
/**
* @param {SourceMapSource} source the source map source to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(source, { write }) {
write(source.getArgsAsBuffers());
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {SourceMapSource} source source map source
*/
deserialize({ read }) {
// @ts-expect-error
return new SourceMapSource(...read());
}
})()
);
register(
ValidationError,
CURRENT_MODULE,
"schema-utils/ValidationError",
new (class ValidationErrorSerializer {
/**
* @param {ValidationError} error the source map source to be serialized
* @param {ObjectSerializerContext} context context
* @returns {void}
*/
serialize(error, { write }) {
write(error.errors);
write(error.schema);
write({
name: error.headerName,
baseDataPath: error.baseDataPath,
postFormatter: error.postFormatter
});
}
/**
* @param {ObjectDeserializerContext} context context
* @returns {ValidationError} error
*/
deserialize({ read }) {
return new ValidationError(read(), read(), read());
}
})()
);

View File

@@ -0,0 +1,4 @@
import type { TextFieldClientComponent } from 'payload';
import './index.scss';
export declare const QueryPresetsGroupByField: TextFieldClientComponent;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,15 @@
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
export const CodeBlockIcon = () => /*#__PURE__*/_jsx("svg", {
"aria-hidden": "true",
className: "graphic code-block-icon",
focusable: "false",
viewBox: "0 0 20 20",
xmlns: "http://www.w3.org/2000/svg",
children: /*#__PURE__*/_jsx("path", {
className: "stroke",
d: "M14 12.6667L16.6667 9.99999L14 7.33332M5.99999 7.33332L3.33333 9.99999L5.99999 12.6667M11.6667 4.66666L8.33333 15.3333",
strokeLinecap: "square"
})
});
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1,4 @@
import type { TextFieldDiffClientComponent } from 'payload';
import './index.scss';
export declare const Text: TextFieldDiffClientComponent;
//# sourceMappingURL=index.d.ts.map

View File

@@ -0,0 +1,2 @@
export { withSentryConfig } from './withSentryConfig/index.js';
//# sourceMappingURL=index.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"build-plugin-manager.d.ts","sourceRoot":"","sources":["../../src/build-plugin-manager.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,iBAAiB,EAAyC,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAgB,MAAM,EAAE,MAAM,UAAU,CAAC;AAMhD,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAWvD,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;IACrC;;;OAGG;IACH,uCAAuC,EAAE,mBAAmB,CAAC;IAC7D;;OAEG;IAEH,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAExC;;OAEG;IACH,SAAS,EAAE;QACT;;WAEG;QACH,gCAAgC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;KACnD,CAAC;IAEF;;;;;;;;OAQG;IACH,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B;;;;;;OAMG;IACH,cAAc,CAAC,kBAAkB,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5D;;OAEG;IACH,gBAAgB,CACd,kBAAkB,EAAE,MAAM,EAAE,EAC5B,IAAI,CAAC,EAAE;QAAE,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE,GACpC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjB;;OAEG;IACH,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjC,gCAAgC,EAAE,MAAM,MAAM,IAAI,CAAC;CACpD,CAAC;AAkBF;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,WAAW,EAAE,OAAO,EACpB,wBAAwB,EAAE;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,GACA,wBAAwB,CAgsB1B"}

View File

@@ -0,0 +1,26 @@
"use strict";
exports.nextTuesday = nextTuesday;
var _index = require("./nextDay.js");
/**
* @name nextTuesday
* @category Weekday Helpers
* @summary When is the next Tuesday?
*
* @description
* When is the next Tuesday?
*
* @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 start counting from
*
* @returns The next Tuesday
*
* @example
* // When is the next Tuesday after Mar, 22, 2020?
* const result = nextTuesday(new Date(2020, 2, 22))
* //=> Tue Mar 24 2020 00:00:00
*/
function nextTuesday(date) {
return (0, _index.nextDay)(date, 2);
}

View File

@@ -0,0 +1,4 @@
import { CSSValue } from '../../syntax/parser';
import { CSSLinearGradientImage, CSSRadialGradientImage } from '../image';
import { Context } from '../../../core/context';
export declare const webkitGradient: (context: Context, tokens: CSSValue[]) => CSSLinearGradientImage | CSSRadialGradientImage;

View File

@@ -0,0 +1,792 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const debugBuild = require('../debug-build.js');
const helpers = require('../helpers.js');
const MS_TO_NS = 1e6;
// Checking if we are in Main or Worker thread: `self` (not `window`) is the `globalThis` in Web Workers and `importScripts` are only available in Web Workers
const isMainThread = 'window' in core.GLOBAL_OBJ && core.GLOBAL_OBJ.window === core.GLOBAL_OBJ && typeof importScripts === 'undefined';
// Setting ID to 0 as we cannot get an ID from Web Workers
const PROFILER_THREAD_ID_STRING = String(0);
const PROFILER_THREAD_NAME = isMainThread ? 'main' : 'worker';
// We force make this optional to be on the safe side...
const navigator = helpers.WINDOW.navigator ;
// Machine properties (eval only once)
let OS_PLATFORM = '';
let OS_PLATFORM_VERSION = '';
let OS_ARCH = '';
let OS_BROWSER = navigator?.userAgent || '';
let OS_MODEL = '';
const OS_LOCALE = navigator?.language || navigator?.languages?.[0] || '';
function isUserAgentData(data) {
return typeof data === 'object' && data !== null && 'getHighEntropyValues' in data;
}
// @ts-expect-error userAgentData is not part of the navigator interface yet
const userAgentData = navigator?.userAgentData;
if (isUserAgentData(userAgentData)) {
userAgentData
.getHighEntropyValues(['architecture', 'model', 'platform', 'platformVersion', 'fullVersionList'])
.then((ua) => {
OS_PLATFORM = ua.platform || '';
OS_ARCH = ua.architecture || '';
OS_MODEL = ua.model || '';
OS_PLATFORM_VERSION = ua.platformVersion || '';
if (ua.fullVersionList?.length) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const firstUa = ua.fullVersionList[ua.fullVersionList.length - 1];
OS_BROWSER = `${firstUa.brand} ${firstUa.version}`;
}
})
.catch(e => void 0);
}
function isProcessedJSSelfProfile(profile) {
return !('thread_metadata' in profile);
}
// Enriches the profile with threadId of the current thread.
// This is done in node as we seem to not be able to get the info from C native code.
/**
*
*/
function enrichWithThreadInformation(profile) {
if (!isProcessedJSSelfProfile(profile)) {
return profile;
}
return convertJSSelfProfileToSampledFormat(profile);
}
// Profile is marked as optional because it is deleted from the metadata
// by the integration before the event is processed by other integrations.
function getTraceId(event) {
const traceId = event.contexts?.trace?.trace_id;
// Log a warning if the profile has an invalid traceId (should be uuidv4).
// All profiles and transactions are rejected if this is the case and we want to
// warn users that this is happening if they enable debug flag
if (typeof traceId === 'string' && traceId.length !== 32) {
if (debugBuild.DEBUG_BUILD) {
core.debug.log(`[Profiling] Invalid traceId: ${traceId} on profiled event`);
}
}
if (typeof traceId !== 'string') {
return '';
}
return traceId;
}
/**
* Creates a profiling event envelope from a Sentry event. If profile does not pass
* validation, returns null.
* @param event
* @param dsn
* @param metadata
* @param tunnel
* @returns {EventEnvelope | null}
*/
/**
* Creates a profiling event envelope from a Sentry event.
*/
function createProfilePayload(
profile_id,
start_timestamp,
processed_profile,
event,
) {
if (event.type !== 'transaction') {
// createProfilingEventEnvelope should only be called for transactions,
// we type guard this behavior with isProfiledTransactionEvent.
throw new TypeError('Profiling events may only be attached to transactions, this should never occur.');
}
if (processed_profile === undefined || processed_profile === null) {
throw new TypeError(
`Cannot construct profiling event envelope without a valid profile. Got ${processed_profile} instead.`,
);
}
const traceId = getTraceId(event);
const enrichedThreadProfile = enrichWithThreadInformation(processed_profile);
const transactionStartMs = start_timestamp
? start_timestamp
: typeof event.start_timestamp === 'number'
? event.start_timestamp * 1000
: core.timestampInSeconds() * 1000;
const transactionEndMs = typeof event.timestamp === 'number' ? event.timestamp * 1000 : core.timestampInSeconds() * 1000;
const profile = {
event_id: profile_id,
timestamp: new Date(transactionStartMs).toISOString(),
platform: 'javascript',
version: '1',
release: event.release || '',
environment: event.environment || core.DEFAULT_ENVIRONMENT,
runtime: {
name: 'javascript',
version: helpers.WINDOW.navigator.userAgent,
},
os: {
name: OS_PLATFORM,
version: OS_PLATFORM_VERSION,
build_number: OS_BROWSER,
},
device: {
locale: OS_LOCALE,
model: OS_MODEL,
manufacturer: OS_BROWSER,
architecture: OS_ARCH,
is_emulator: false,
},
debug_meta: {
images: applyDebugMetadata(processed_profile.resources),
},
profile: enrichedThreadProfile,
transactions: [
{
name: event.transaction || '',
id: event.event_id || core.uuid4(),
trace_id: traceId,
active_thread_id: PROFILER_THREAD_ID_STRING,
relative_start_ns: '0',
relative_end_ns: ((transactionEndMs - transactionStartMs) * 1e6).toFixed(0),
},
],
};
return profile;
}
/**
* Create a profile chunk envelope item
*/
function createProfileChunkPayload(
jsSelfProfile,
client,
profilerId,
) {
// only == to catch null and undefined
if (jsSelfProfile == null) {
throw new TypeError(
`Cannot construct profiling event envelope without a valid profile. Got ${jsSelfProfile} instead.`,
);
}
const continuousProfile = convertToContinuousProfile(jsSelfProfile);
const options = client.getOptions();
const sdk = client.getSdkMetadata?.()?.sdk;
return {
chunk_id: core.uuid4(),
client_sdk: {
name: sdk?.name ?? 'sentry.javascript.browser',
version: sdk?.version ?? '0.0.0',
},
profiler_id: profilerId || core.uuid4(),
platform: 'javascript',
version: '2',
release: options.release ?? '',
environment: options.environment ?? 'production',
debug_meta: {
// function name obfuscation
images: applyDebugMetadata(jsSelfProfile.resources),
},
profile: continuousProfile,
};
}
/**
* Validate a profile chunk against the Sample Format V2 requirements.
* https://develop.sentry.dev/sdk/telemetry/profiles/sample-format-v2/
* - Presence of samples, stacks, frames
* - Required metadata fields
*/
function validateProfileChunk(chunk) {
try {
// Required metadata
if (!chunk || typeof chunk !== 'object') {
return { reason: 'chunk is not an object' };
}
// profiler_id and chunk_id must be 32 lowercase hex chars
const isHex32 = (val) => typeof val === 'string' && /^[a-f0-9]{32}$/.test(val);
if (!isHex32(chunk.profiler_id)) {
return { reason: 'missing or invalid profiler_id' };
}
if (!isHex32(chunk.chunk_id)) {
return { reason: 'missing or invalid chunk_id' };
}
if (!chunk.client_sdk) {
return { reason: 'missing client_sdk metadata' };
}
// Profile data must have frames, stacks, samples
const profile = chunk.profile ;
if (!profile) {
return { reason: 'missing profile data' };
}
if (!Array.isArray(profile.frames) || !profile.frames.length) {
return { reason: 'profile has no frames' };
}
if (!Array.isArray(profile.stacks) || !profile.stacks.length) {
return { reason: 'profile has no stacks' };
}
if (!Array.isArray(profile.samples) || !profile.samples.length) {
return { reason: 'profile has no samples' };
}
return { valid: true };
} catch (e) {
return { reason: `unknown validation error: ${e}` };
}
}
/**
* Convert from JSSelfProfile format to ContinuousThreadCpuProfile format.
*/
function convertToContinuousProfile(input
) {
// Frames map 1:1 by index; fill only when present to avoid sparse writes
const frames = [];
for (let i = 0; i < input.frames.length; i++) {
const frame = input.frames[i];
if (!frame) {
continue;
}
frames[i] = {
function: frame.name,
abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,
lineno: frame.line,
colno: frame.column,
};
}
// Build stacks by following parent links, top->down order (root last)
const stacks = [];
for (let i = 0; i < input.stacks.length; i++) {
const stackHead = input.stacks[i];
if (!stackHead) {
continue;
}
const list = [];
let current = stackHead;
while (current) {
list.push(current.frameId);
current = current.parentId === undefined ? undefined : input.stacks[current.parentId];
}
stacks[i] = list;
}
// Align timestamps to SDK time origin to match span/event timelines
const perfOrigin = core.browserPerformanceTimeOrigin();
const origin = typeof performance.timeOrigin === 'number' ? performance.timeOrigin : perfOrigin || 0;
const adjustForOriginChange = origin - (perfOrigin || origin);
const samples = [];
for (let i = 0; i < input.samples.length; i++) {
const sample = input.samples[i];
if (!sample) {
continue;
}
// Convert ms to seconds epoch-based timestamp
const timestampSeconds = (origin + (sample.timestamp - adjustForOriginChange)) / 1000;
samples[i] = {
stack_id: sample.stackId ?? 0,
thread_id: PROFILER_THREAD_ID_STRING,
timestamp: timestampSeconds,
};
}
return {
frames,
stacks,
samples,
thread_metadata: { [PROFILER_THREAD_ID_STRING]: { name: PROFILER_THREAD_NAME } },
};
}
/*
See packages/browser-utils/src/browser/router.ts
*/
/**
*
*/
function isAutomatedPageLoadSpan(span) {
return core.spanToJSON(span).op === 'pageload';
}
/**
* Converts a JSSelfProfile to a our sampled format.
* Does not currently perform stack indexing.
*/
function convertJSSelfProfileToSampledFormat(input) {
let EMPTY_STACK_ID = undefined;
let STACK_ID = 0;
// Initialize the profile that we will fill with data
const profile = {
samples: [],
stacks: [],
frames: [],
thread_metadata: {
[PROFILER_THREAD_ID_STRING]: { name: PROFILER_THREAD_NAME },
},
};
const firstSample = input.samples[0];
if (!firstSample) {
return profile;
}
// We assert samples.length > 0 above and timestamp should always be present
const start = firstSample.timestamp;
// The JS SDK might change it's time origin based on some heuristic (see See packages/utils/src/time.ts)
// when that happens, we need to ensure we are correcting the profile timings so the two timelines stay in sync.
// Since JS self profiling time origin is always initialized to performance.timeOrigin, we need to adjust for
// the drift between the SDK selected value and our profile time origin.
const perfOrigin = core.browserPerformanceTimeOrigin();
const origin = typeof performance.timeOrigin === 'number' ? performance.timeOrigin : perfOrigin || 0;
const adjustForOriginChange = origin - (perfOrigin || origin);
input.samples.forEach((jsSample, i) => {
// If sample has no stack, add an empty sample
if (jsSample.stackId === undefined) {
if (EMPTY_STACK_ID === undefined) {
EMPTY_STACK_ID = STACK_ID;
profile.stacks[EMPTY_STACK_ID] = [];
STACK_ID++;
}
profile['samples'][i] = {
// convert ms timestamp to ns
elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start) * MS_TO_NS).toFixed(0),
stack_id: EMPTY_STACK_ID,
thread_id: PROFILER_THREAD_ID_STRING,
};
return;
}
let stackTop = input.stacks[jsSample.stackId];
// Functions in top->down order (root is last)
// We follow the stackTop.parentId trail and collect each visited frameId
const stack = [];
while (stackTop) {
stack.push(stackTop.frameId);
const frame = input.frames[stackTop.frameId];
// If our frame has not been indexed yet, index it
if (frame && profile.frames[stackTop.frameId] === undefined) {
profile.frames[stackTop.frameId] = {
function: frame.name,
abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,
lineno: frame.line,
colno: frame.column,
};
}
stackTop = stackTop.parentId === undefined ? undefined : input.stacks[stackTop.parentId];
}
const sample = {
// convert ms timestamp to ns
elapsed_since_start_ns: ((jsSample.timestamp + adjustForOriginChange - start) * MS_TO_NS).toFixed(0),
stack_id: STACK_ID,
thread_id: PROFILER_THREAD_ID_STRING,
};
profile['stacks'][STACK_ID] = stack;
profile['samples'][i] = sample;
STACK_ID++;
});
return profile;
}
/**
* Adds items to envelope if they are not already present - mutates the envelope.
* @param envelope
*/
function addProfilesToEnvelope(envelope, profiles) {
if (!profiles.length) {
return envelope;
}
for (const profile of profiles) {
envelope[1].push([{ type: 'profile' }, profile]);
}
return envelope;
}
/**
* Finds transactions with profile_id context in the envelope
* @param envelope
* @returns
*/
function findProfiledTransactionsFromEnvelope(envelope) {
const events = [];
core.forEachEnvelopeItem(envelope, (item, type) => {
if (type !== 'transaction') {
return;
}
for (let j = 1; j < item.length; j++) {
const event = item[j] ;
if (event?.contexts?.profile?.profile_id) {
events.push(item[j] );
}
}
});
return events;
}
/**
* Applies debug meta data to an event from a list of paths to resources (sourcemaps)
*/
function applyDebugMetadata(resource_paths) {
const client = core.getClient();
const options = client?.getOptions();
const stackParser = options?.stackParser;
if (!stackParser) {
return [];
}
return core.getDebugImagesForResources(stackParser, resource_paths);
}
/**
* Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).
*/
function isValidSampleRate(rate) {
// we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck
if ((typeof rate !== 'number' && typeof rate !== 'boolean') || (typeof rate === 'number' && isNaN(rate))) {
debugBuild.DEBUG_BUILD &&
core.debug.warn(
`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(
rate,
)} of type ${JSON.stringify(typeof rate)}.`,
);
return false;
}
// Boolean sample rates are always valid
if (rate === true || rate === false) {
return true;
}
// in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false
if (rate < 0 || rate > 1) {
debugBuild.DEBUG_BUILD && core.debug.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${rate}.`);
return false;
}
return true;
}
function isValidProfile(profile) {
if (profile.samples.length < 2) {
if (debugBuild.DEBUG_BUILD) {
// Log a warning if the profile has less than 2 samples so users can know why
// they are not seeing any profiling data and we cant avoid the back and forth
// of asking them to provide us with a dump of the profile data.
core.debug.log('[Profiling] Discarding profile because it contains less than 2 samples');
}
return false;
}
if (!profile.frames.length) {
if (debugBuild.DEBUG_BUILD) {
core.debug.log('[Profiling] Discarding profile because it contains no frames');
}
return false;
}
return true;
}
// Keep a flag value to avoid re-initializing the profiler constructor. If it fails
// once, it will always fail and this allows us to early return.
let PROFILING_CONSTRUCTOR_FAILED = false;
const MAX_PROFILE_DURATION_MS = 30000;
/**
* Check if profiler constructor is available.
* @param maybeProfiler
*/
function isJSProfilerSupported(maybeProfiler) {
return typeof maybeProfiler === 'function';
}
/**
* Starts the profiler and returns the profiler instance.
*/
function startJSSelfProfile() {
// Feature support check first
const JSProfilerConstructor = helpers.WINDOW.Profiler;
if (!isJSProfilerSupported(JSProfilerConstructor)) {
if (debugBuild.DEBUG_BUILD) {
core.debug.log('[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.');
}
return;
}
// From initial testing, it seems that the minimum value for sampleInterval is 10ms.
const samplingIntervalMS = 10;
// Start the profiler
const maxSamples = Math.floor(MAX_PROFILE_DURATION_MS / samplingIntervalMS);
// Attempt to initialize the profiler constructor, if it fails, we disable profiling for the current user session.
// This is likely due to a missing 'Document-Policy': 'js-profiling' header. We do not want to throw an error if this happens
// as we risk breaking the user's application, so just disable profiling and log an error.
try {
return new JSProfilerConstructor({ sampleInterval: samplingIntervalMS, maxBufferSize: maxSamples });
} catch (e) {
if (debugBuild.DEBUG_BUILD) {
core.debug.log(
"[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.",
);
core.debug.log('[Profiling] Disabling profiling for current user session.');
}
PROFILING_CONSTRUCTOR_FAILED = true;
}
return;
}
/**
* Determine if a profile should be profiled.
*/
function shouldProfileSpanLegacy(span) {
// If constructor failed once, it will always fail, so we can early return.
if (PROFILING_CONSTRUCTOR_FAILED) {
if (debugBuild.DEBUG_BUILD) {
core.debug.log('[Profiling] Profiling has been disabled for the duration of the current user session.');
}
return false;
}
if (!span.isRecording()) {
debugBuild.DEBUG_BUILD && core.debug.log('[Profiling] Discarding profile because root span was not sampled.');
return false;
}
const client = core.getClient();
const options = client?.getOptions();
if (!options) {
debugBuild.DEBUG_BUILD && core.debug.log('[Profiling] Profiling disabled, no options found.');
return false;
}
// eslint-disable-next-line deprecation/deprecation
const profilesSampleRate = (options ).profilesSampleRate
;
// Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The
// only valid values are booleans or numbers between 0 and 1.)
if (!isValidSampleRate(profilesSampleRate)) {
debugBuild.DEBUG_BUILD && core.debug.warn('[Profiling] Discarding profile because of invalid sample rate.');
return false;
}
// if the function returned 0 (or false), or if `profileSampleRate` is 0, it's a sign the profile should be dropped
if (!profilesSampleRate) {
debugBuild.DEBUG_BUILD &&
core.debug.log(
'[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0',
);
return false;
}
// Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is
// a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.
const sampled = profilesSampleRate === true ? true : Math.random() < profilesSampleRate;
// Check if we should sample this profile
if (!sampled) {
debugBuild.DEBUG_BUILD &&
core.debug.log(
`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(
profilesSampleRate,
)})`,
);
return false;
}
return true;
}
/**
* Determine if a profile should be created for the current session.
*/
function shouldProfileSession(options) {
// If constructor failed once, it will always fail, so we can early return.
if (PROFILING_CONSTRUCTOR_FAILED) {
if (debugBuild.DEBUG_BUILD) {
core.debug.log(
'[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started.',
);
}
return false;
}
if (options.profileLifecycle !== 'trace' && options.profileLifecycle !== 'manual') {
debugBuild.DEBUG_BUILD && core.debug.warn('[Profiling] Session not sampled. Invalid `profileLifecycle` option.');
return false;
}
// Session sampling: profileSessionSampleRate gates whether profiling is enabled for this session
const profileSessionSampleRate = options.profileSessionSampleRate;
if (!isValidSampleRate(profileSessionSampleRate)) {
debugBuild.DEBUG_BUILD && core.debug.warn('[Profiling] Discarding profile because of invalid profileSessionSampleRate.');
return false;
}
if (!profileSessionSampleRate) {
debugBuild.DEBUG_BUILD &&
core.debug.log('[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0');
return false;
}
return Math.random() <= profileSessionSampleRate;
}
/**
* Checks if legacy profiling is configured.
*/
function hasLegacyProfiling(options) {
// eslint-disable-next-line deprecation/deprecation
return typeof options.profilesSampleRate !== 'undefined';
}
/**
* Creates a profiling envelope item, if the profile does not pass validation, returns null.
* @param event
* @returns {Profile | null}
*/
function createProfilingEvent(
profile_id,
start_timestamp,
profile,
event,
) {
if (!isValidProfile(profile)) {
return null;
}
return createProfilePayload(profile_id, start_timestamp, profile, event);
}
// TODO (v8): We need to obtain profile ids in @sentry-internal/tracing,
// but we don't have access to this map because importing this map would
// cause a circular dependency. We need to resolve this in v8.
const PROFILE_MAP = new Map();
/**
*
*/
function getActiveProfilesCount() {
return PROFILE_MAP.size;
}
/**
* Retrieves profile from global cache and removes it.
*/
function takeProfileFromGlobalCache(profile_id) {
const profile = PROFILE_MAP.get(profile_id);
if (profile) {
PROFILE_MAP.delete(profile_id);
}
return profile;
}
/**
* Adds profile to global cache and evicts the oldest profile if the cache is full.
*/
function addProfileToGlobalCache(profile_id, profile) {
PROFILE_MAP.set(profile_id, profile);
if (PROFILE_MAP.size > 30) {
const last = PROFILE_MAP.keys().next().value;
if (last !== undefined) {
PROFILE_MAP.delete(last);
}
}
}
/**
* Attaches the profiled thread information to the event's trace context.
*/
function attachProfiledThreadToEvent(event) {
if (!event?.contexts?.profile) {
return event;
}
if (!event.contexts) {
return event;
}
// @ts-expect-error the trace fallback value is wrong, though it should never happen
// and in case it does, we dont want to override whatever was passed initially.
event.contexts.trace = {
...(event.contexts?.trace ?? {}),
data: {
...(event.contexts?.trace?.data ?? {}),
['thread.id']: PROFILER_THREAD_ID_STRING,
['thread.name']: PROFILER_THREAD_NAME,
},
};
// Attach thread info to individual spans so that spans can be associated with the profiled thread on the UI even if contexts are missing.
event.spans?.forEach(span => {
span.data = {
...(span.data || {}),
['thread.id']: PROFILER_THREAD_ID_STRING,
['thread.name']: PROFILER_THREAD_NAME,
};
});
return event;
}
exports.MAX_PROFILE_DURATION_MS = MAX_PROFILE_DURATION_MS;
exports.PROFILER_THREAD_ID_STRING = PROFILER_THREAD_ID_STRING;
exports.PROFILER_THREAD_NAME = PROFILER_THREAD_NAME;
exports.addProfileToGlobalCache = addProfileToGlobalCache;
exports.addProfilesToEnvelope = addProfilesToEnvelope;
exports.applyDebugMetadata = applyDebugMetadata;
exports.attachProfiledThreadToEvent = attachProfiledThreadToEvent;
exports.convertJSSelfProfileToSampledFormat = convertJSSelfProfileToSampledFormat;
exports.createProfileChunkPayload = createProfileChunkPayload;
exports.createProfilePayload = createProfilePayload;
exports.createProfilingEvent = createProfilingEvent;
exports.enrichWithThreadInformation = enrichWithThreadInformation;
exports.findProfiledTransactionsFromEnvelope = findProfiledTransactionsFromEnvelope;
exports.getActiveProfilesCount = getActiveProfilesCount;
exports.hasLegacyProfiling = hasLegacyProfiling;
exports.isAutomatedPageLoadSpan = isAutomatedPageLoadSpan;
exports.isValidSampleRate = isValidSampleRate;
exports.shouldProfileSession = shouldProfileSession;
exports.shouldProfileSpanLegacy = shouldProfileSpanLegacy;
exports.startJSSelfProfile = startJSSelfProfile;
exports.takeProfileFromGlobalCache = takeProfileFromGlobalCache;
exports.validateProfileChunk = validateProfileChunk;
//# sourceMappingURL=utils.js.map

View File

@@ -0,0 +1,10 @@
import type { SQLiteDatabase, SQLiteRunResult } from 'expo-sqlite';
import { entityKind } from "../entity.js";
import { BaseSQLiteDatabase } from "../sqlite-core/db.js";
import type { DrizzleConfig } from "../utils.js";
export declare class ExpoSQLiteDatabase<TSchema extends Record<string, unknown> = Record<string, never>> extends BaseSQLiteDatabase<'sync', SQLiteRunResult, TSchema> {
static readonly [entityKind]: string;
}
export declare function drizzle<TSchema extends Record<string, unknown> = Record<string, never>>(client: SQLiteDatabase, config?: DrizzleConfig<TSchema>): ExpoSQLiteDatabase<TSchema> & {
$client: SQLiteDatabase;
};

View File

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

View File

@@ -0,0 +1,2 @@
import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";import{throwIfCoreCollection as t}from"../../utils/throw-core-collection.js";const n=(n,r)=>()=>(e(String(n),`Collection cannot be empty`),t(n,`Cannot use readItems for core collections`),{path:`/items/${n}`,params:r??{},method:`GET`}),r=(n,r,i)=>()=>(e(String(n),`Collection cannot be empty`),t(n,`Cannot use readItem for core collections`),e(String(r),`Key cannot be empty`),{path:`/items/${n}/${r}`,params:i??{},method:`GET`});export{r as readItem,n as readItems};
//# sourceMappingURL=items.js.map

View File

@@ -0,0 +1,102 @@
import { getLabelFromPath } from './label'
import { getTargetClassName } from './get-target-class-name'
import createNodeEnvConditional from './create-node-env-conditional'
const getKnownProperties = (t, node) =>
new Set(
node.properties
.filter(n => t.isObjectProperty(n) && !n.computed)
.map(n => (t.isIdentifier(n.key) ? n.key.name : n.key.value))
)
const createObjectSpreadLike = (t, file, ...objs) =>
t.callExpression(file.addHelper('extends'), [t.objectExpression([]), ...objs])
export let getStyledOptions = (t, path, state) => {
const autoLabel = state.opts.autoLabel || 'dev-only'
let args = path.node.arguments
let optionsArgument = args.length >= 2 ? args[1] : null
let prodProperties = []
let devProperties = null
let knownProperties =
optionsArgument && t.isObjectExpression(optionsArgument)
? getKnownProperties(t, optionsArgument)
: new Set()
if (!knownProperties.has('target')) {
prodProperties.push(
t.objectProperty(
t.identifier('target'),
t.stringLiteral(getTargetClassName(state, t))
)
)
}
let label =
autoLabel !== 'never' && !knownProperties.has('label')
? getLabelFromPath(path, state, t)
: null
if (label) {
const labelNode = t.objectProperty(
t.identifier('label'),
t.stringLiteral(label)
)
switch (autoLabel) {
case 'always':
prodProperties.push(labelNode)
break
case 'dev-only':
devProperties = [labelNode]
break
}
}
if (optionsArgument) {
// for some reason `.withComponent` transformer gets requeued
// so check if this has been already transpiled to avoid double wrapping
if (
t.isConditionalExpression(optionsArgument) &&
t.isBinaryExpression(optionsArgument.test) &&
t.buildMatchMemberExpression('process.env.NODE_ENV')(
optionsArgument.test.left
)
) {
return optionsArgument
}
if (!t.isObjectExpression(optionsArgument)) {
const prodNode = createObjectSpreadLike(
t,
state.file,
t.objectExpression(prodProperties),
optionsArgument
)
return devProperties
? createNodeEnvConditional(
t,
prodNode,
t.cloneNode(
createObjectSpreadLike(
t,
state.file,
t.objectExpression(prodProperties.concat(devProperties)),
optionsArgument
)
)
)
: prodNode
}
prodProperties.unshift(...optionsArgument.properties)
}
return devProperties
? createNodeEnvConditional(
t,
t.objectExpression(prodProperties),
t.cloneNode(t.objectExpression(prodProperties.concat(devProperties)))
)
: t.objectExpression(prodProperties)
}

View File

@@ -0,0 +1 @@
{"version":3,"file":"Attributes.js","sourceRoot":"","sources":["../../../src/common/Attributes.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\n/**\n * Attributes is a map from string to attribute values.\n *\n * Note: only the own enumerable keys are counted as valid attribute keys.\n */\nexport interface Attributes {\n [attributeKey: string]: AttributeValue | undefined;\n}\n\n/**\n * Attribute values may be any non-nullish primitive value except an object.\n *\n * null or undefined attribute values are invalid and will result in undefined behavior.\n */\nexport type AttributeValue =\n | string\n | number\n | boolean\n | Array<null | undefined | string>\n | Array<null | undefined | number>\n | Array<null | undefined | boolean>;\n"]}

View File

@@ -0,0 +1 @@
{"version":3,"file":"prohibited.js","sourceRoot":"","sources":["../../src/keywords/prohibited.ts"],"names":[],"mappings":";;;;;AACA,2EAA8C;AAE9C,MAAM,UAAU,GAAsB,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,IAAA,oBAAM,GAAE,CAAC,CAAA;AAEvE,kBAAe,UAAU,CAAA;AACzB,MAAM,CAAC,OAAO,GAAG,UAAU,CAAA"}

View File

@@ -0,0 +1,22 @@
Copyright JS Foundation and other contributors, https://js.foundation
Copyright (C) 2012-2013 Yusuke Suzuki (twitter: @Constellation) and other contributors.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,4 @@
export declare const endOfMinute: import("./types.js").FPFn1<
Date,
import("../fp.js").DateArg<Date>
>;

View File

@@ -0,0 +1,35 @@
export interface FeedbackTheme {
/**
* Foreground color (i.e. text color)
*/
foreground?: string;
/**
* Background color for surfaces
*/
background?: string;
/**
* Foreground color for accented elements
*/
accentForeground?: string;
/**
* Background color for accented elements
*/
accentBackground?: string;
/**
* Success color
*/
successColor?: string;
/**
* Error color
*/
errorColor?: string;
/**
* Box shadow for floating elements
*/
boxShadow?: string;
/**
* Styles for focused interactive components
*/
outline?: string;
}
//# sourceMappingURL=theme.d.ts.map

View File

@@ -0,0 +1,21 @@
/**
* @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 Wine = createLucideIcon("Wine", [
["path", { d: "M8 22h8", key: "rmew8v" }],
["path", { d: "M7 10h10", key: "1101jm" }],
["path", { d: "M12 15v7", key: "t2xh3l" }],
[
"path",
{ d: "M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z", key: "10ffi3" }
]
]);
export { Wine as default };
//# sourceMappingURL=wine.js.map

View File

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

View File

@@ -0,0 +1,221 @@
var t = require('tap')
var fs = require('fs')
var path = require('path')
var fixture = path.resolve(__dirname, 'fixtures')
var meow = fixture + '/meow.cat'
var mine = fixture + '/mine.cat'
var ours = fixture + '/ours.cat'
var fail = fixture + '/fail.false'
var noent = fixture + '/enoent.exe'
var mkdirp = require('mkdirp')
var rimraf = require('rimraf')
var isWindows = process.platform === 'win32'
var hasAccess = typeof fs.access === 'function'
var winSkip = isWindows && 'windows'
var accessSkip = !hasAccess && 'no fs.access function'
var hasPromise = typeof Promise === 'function'
var promiseSkip = !hasPromise && 'no global Promise'
function reset () {
delete require.cache[require.resolve('../')]
return require('../')
}
t.test('setup fixtures', function (t) {
rimraf.sync(fixture)
mkdirp.sync(fixture)
fs.writeFileSync(meow, '#!/usr/bin/env cat\nmeow\n')
fs.chmodSync(meow, parseInt('0755', 8))
fs.writeFileSync(fail, '#!/usr/bin/env false\n')
fs.chmodSync(fail, parseInt('0644', 8))
fs.writeFileSync(mine, '#!/usr/bin/env cat\nmine\n')
fs.chmodSync(mine, parseInt('0744', 8))
fs.writeFileSync(ours, '#!/usr/bin/env cat\nours\n')
fs.chmodSync(ours, parseInt('0754', 8))
t.end()
})
t.test('promise', { skip: promiseSkip }, function (t) {
var isexe = reset()
t.test('meow async', function (t) {
isexe(meow).then(function (is) {
t.ok(is)
t.end()
})
})
t.test('fail async', function (t) {
isexe(fail).then(function (is) {
t.notOk(is)
t.end()
})
})
t.test('noent async', function (t) {
isexe(noent).catch(function (er) {
t.ok(er)
t.end()
})
})
t.test('noent ignore async', function (t) {
isexe(noent, { ignoreErrors: true }).then(function (is) {
t.notOk(is)
t.end()
})
})
t.end()
})
t.test('no promise', function (t) {
global.Promise = null
var isexe = reset()
t.throws('try to meow a promise', function () {
isexe(meow)
})
t.end()
})
t.test('access', { skip: accessSkip || winSkip }, function (t) {
runTest(t)
})
t.test('mode', { skip: winSkip }, function (t) {
delete fs.access
delete fs.accessSync
var isexe = reset()
t.ok(isexe.sync(ours, { uid: 0, gid: 0 }))
t.ok(isexe.sync(mine, { uid: 0, gid: 0 }))
runTest(t)
})
t.test('windows', function (t) {
global.TESTING_WINDOWS = true
var pathExt = '.EXE;.CAT;.CMD;.COM'
t.test('pathExt option', function (t) {
runTest(t, { pathExt: '.EXE;.CAT;.CMD;.COM' })
})
t.test('pathExt env', function (t) {
process.env.PATHEXT = pathExt
runTest(t)
})
t.test('no pathExt', function (t) {
// with a pathExt of '', any filename is fine.
// so the "fail" one would still pass.
runTest(t, { pathExt: '', skipFail: true })
})
t.test('pathext with empty entry', function (t) {
// with a pathExt of '', any filename is fine.
// so the "fail" one would still pass.
runTest(t, { pathExt: ';' + pathExt, skipFail: true })
})
t.end()
})
t.test('cleanup', function (t) {
rimraf.sync(fixture)
t.end()
})
function runTest (t, options) {
var isexe = reset()
var optionsIgnore = Object.create(options || {})
optionsIgnore.ignoreErrors = true
if (!options || !options.skipFail) {
t.notOk(isexe.sync(fail, options))
}
t.notOk(isexe.sync(noent, optionsIgnore))
if (!options) {
t.ok(isexe.sync(meow))
} else {
t.ok(isexe.sync(meow, options))
}
t.ok(isexe.sync(mine, options))
t.ok(isexe.sync(ours, options))
t.throws(function () {
isexe.sync(noent, options)
})
t.test('meow async', function (t) {
if (!options) {
isexe(meow, function (er, is) {
if (er) {
throw er
}
t.ok(is)
t.end()
})
} else {
isexe(meow, options, function (er, is) {
if (er) {
throw er
}
t.ok(is)
t.end()
})
}
})
t.test('mine async', function (t) {
isexe(mine, options, function (er, is) {
if (er) {
throw er
}
t.ok(is)
t.end()
})
})
t.test('ours async', function (t) {
isexe(ours, options, function (er, is) {
if (er) {
throw er
}
t.ok(is)
t.end()
})
})
if (!options || !options.skipFail) {
t.test('fail async', function (t) {
isexe(fail, options, function (er, is) {
if (er) {
throw er
}
t.notOk(is)
t.end()
})
})
}
t.test('noent async', function (t) {
isexe(noent, options, function (er, is) {
t.ok(er)
t.notOk(is)
t.end()
})
})
t.test('noent ignore async', function (t) {
isexe(noent, optionsIgnore, function (er, is) {
if (er) {
throw er
}
t.notOk(is)
t.end()
})
})
t.test('directory is not executable', function (t) {
isexe(__dirname, options, function (er, is) {
if (er) {
throw er
}
t.notOk(is)
t.end()
})
})
t.end()
}

View File

@@ -0,0 +1,18 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const LANGCHAIN_INTEGRATION_NAME = 'LangChain';
const LANGCHAIN_ORIGIN = 'auto.ai.langchain';
const ROLE_MAP = {
human: 'user',
ai: 'assistant',
assistant: 'assistant',
system: 'system',
function: 'function',
tool: 'tool',
};
exports.LANGCHAIN_INTEGRATION_NAME = LANGCHAIN_INTEGRATION_NAME;
exports.LANGCHAIN_ORIGIN = LANGCHAIN_ORIGIN;
exports.ROLE_MAP = ROLE_MAP;
//# sourceMappingURL=constants.js.map

View File

@@ -0,0 +1,52 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports.request = exports.cancel = void 0;
var _canUseDOM = _interopRequireDefault(require("./canUseDOM"));
/* https://github.com/component/raf */
var prev = new Date().getTime();
function fallback(fn) {
var curr = new Date().getTime();
var ms = Math.max(0, 16 - (curr - prev));
var handle = setTimeout(fn, ms);
prev = curr;
return handle;
}
var vendors = ['', 'webkit', 'moz', 'o', 'ms'];
var cancelMethod = 'clearTimeout';
var rafImpl = fallback; // eslint-disable-next-line import/no-mutable-exports
var getKey = function getKey(vendor, k) {
return vendor + (!vendor ? k : k[0].toUpperCase() + k.substr(1)) + "AnimationFrame";
};
if (_canUseDOM.default) {
vendors.some(function (vendor) {
var rafMethod = getKey(vendor, 'request');
if (rafMethod in window) {
cancelMethod = getKey(vendor, 'cancel'); // @ts-ignore
rafImpl = function rafImpl(cb) {
return window[rafMethod](cb);
};
}
return !!rafImpl;
});
}
var cancel = function cancel(id) {
// @ts-ignore
if (typeof window[cancelMethod] === 'function') window[cancelMethod](id);
};
exports.cancel = cancel;
var request = rafImpl;
exports.request = request;

View File

@@ -0,0 +1,5 @@
/**
* Removes everything after the last "/", but leaves the slash.
*/
export = function stripFilename(path: string | undefined | null): string;
//# sourceMappingURL=strip-filename.d.ts.map

View File

@@ -0,0 +1,2 @@
export declare const mergeHeaders: (sourceHeaders: Headers, destinationHeaders: Headers) => Headers;
//# sourceMappingURL=mergeHeaders.d.ts.map

View File

@@ -0,0 +1,129 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["v.C.", "n.C."],
abbreviated: ["v.Chr.", "n.Chr."],
wide: ["voor Christus", "na Christus"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["K1", "K2", "K3", "K4"],
wide: ["1e kwartaal", "2e kwartaal", "3e kwartaal", "4e kwartaal"],
};
const monthValues = {
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
abbreviated: [
"jan.",
"feb.",
"mrt.",
"apr.",
"mei",
"jun.",
"jul.",
"aug.",
"sep.",
"okt.",
"nov.",
"dec.",
],
wide: [
"januari",
"februari",
"maart",
"april",
"mei",
"juni",
"juli",
"augustus",
"september",
"oktober",
"november",
"december",
],
};
const dayValues = {
narrow: ["Z", "M", "D", "W", "D", "V", "Z"],
short: ["zo", "ma", "di", "wo", "do", "vr", "za"],
abbreviated: ["zon", "maa", "din", "woe", "don", "vri", "zat"],
wide: [
"zondag",
"maandag",
"dinsdag",
"woensdag",
"donderdag",
"vrijdag",
"zaterdag",
],
};
const dayPeriodValues = {
narrow: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middag",
morning: "'s ochtends",
afternoon: "'s namiddags",
evening: "'s avonds",
night: "'s nachts",
},
abbreviated: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middag",
morning: "'s ochtends",
afternoon: "'s namiddags",
evening: "'s avonds",
night: "'s nachts",
},
wide: {
am: "AM",
pm: "PM",
midnight: "middernacht",
noon: "het middag",
morning: "'s ochtends",
afternoon: "'s namiddags",
evening: "'s avonds",
night: "'s nachts",
},
};
const ordinalNumber = (dirtyNumber, _options) => {
const number = Number(dirtyNumber);
return number + "e";
};
export const localize = {
ordinalNumber,
era: buildLocalizeFn({
values: eraValues,
defaultWidth: "wide",
}),
quarter: buildLocalizeFn({
values: quarterValues,
defaultWidth: "wide",
argumentCallback: (quarter) => quarter - 1,
}),
month: buildLocalizeFn({
values: monthValues,
defaultWidth: "wide",
}),
day: buildLocalizeFn({
values: dayValues,
defaultWidth: "wide",
}),
dayPeriod: buildLocalizeFn({
values: dayPeriodValues,
defaultWidth: "wide",
}),
};

View File

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

View File

@@ -0,0 +1,17 @@
import type { Event, Primitive } from '@sentry/core';
type GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';
type GlobalHandlersIntegrations = Record<GlobalHandlersIntegrationsOptionKeys, boolean>;
export declare const globalHandlersIntegration: (options?: Partial<GlobalHandlersIntegrations> | undefined) => import("@sentry/core").Integration;
/**
*
*/
export declare function _getUnhandledRejectionError(error: unknown): unknown;
/**
* Create an event from a promise rejection where the `reason` is a primitive.
*
* @param reason: The `reason` property of the promise rejection
* @returns An Event object with an appropriate `exception` value
*/
export declare function _eventFromRejectionWithPrimitive(reason: Primitive): Event;
export {};
//# sourceMappingURL=globalhandlers.d.ts.map

View File

@@ -0,0 +1,54 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.UniqueDirectiveNamesRule = UniqueDirectiveNamesRule;
var _GraphQLError = require('../../error/GraphQLError.js');
/**
* Unique directive names
*
* A GraphQL document is only valid if all defined directives have unique names.
*/
function UniqueDirectiveNamesRule(context) {
const knownDirectiveNames = Object.create(null);
const schema = context.getSchema();
return {
DirectiveDefinition(node) {
const directiveName = node.name.value;
if (
schema !== null &&
schema !== void 0 &&
schema.getDirective(directiveName)
) {
context.reportError(
new _GraphQLError.GraphQLError(
`Directive "@${directiveName}" already exists in the schema. It cannot be redefined.`,
{
nodes: node.name,
},
),
);
return;
}
if (knownDirectiveNames[directiveName]) {
context.reportError(
new _GraphQLError.GraphQLError(
`There can be only one directive named "@${directiveName}".`,
{
nodes: [knownDirectiveNames[directiveName], node.name],
},
),
);
} else {
knownDirectiveNames[directiveName] = node.name;
}
return false;
},
};
}

View File

@@ -0,0 +1,27 @@
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
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 __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var expo_sqlite_exports = {};
module.exports = __toCommonJS(expo_sqlite_exports);
__reExport(expo_sqlite_exports, require("./driver.cjs"), module.exports);
__reExport(expo_sqlite_exports, require("./query.cjs"), module.exports);
__reExport(expo_sqlite_exports, require("./session.cjs"), module.exports);
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
...require("./driver.cjs"),
...require("./query.cjs"),
...require("./session.cjs")
});
//# sourceMappingURL=index.cjs.map

View File

@@ -0,0 +1,19 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const FileType = createLucideIcon("FileType", [
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "M9 13v-1h6v1", key: "1bb014" }],
["path", { d: "M12 12v6", key: "3ahymv" }],
["path", { d: "M11 18h2", key: "12mj7e" }]
]);
export { FileType as default };
//# sourceMappingURL=file-type.js.map

View File

@@ -0,0 +1,53 @@
import type { QueryParams } from './request';
/**
* Data extracted from an incoming request to a node server
*/
export interface ExtractedNodeRequestData {
[key: string]: any;
/** Specific headers from the request */
headers?: {
[key: string]: string;
};
/** The request's method */
method?: string;
/** The request's URL, including query string */
url?: string;
/** String representing the cookies sent along with the request */
cookies?: {
[key: string]: string;
};
/** The request's query params */
query_string?: QueryParams;
/** Any data sent in the request's body, as a JSON string */
data?: string;
}
/**
* Location object on a service worker's `self` object.
*
* See https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation.
*/
export interface WorkerLocation {
/** The protocol scheme of the URL of the script executed in the Worker, including the final ':'. */
readonly protocol: string;
/** The host, that is the hostname, a ':', and the port of the URL of the script executed in the Worker. */
readonly host: string;
/** The domain of the URL of the script executed in the Worker. */
readonly hostname: string;
/** The canonical form of the origin of the specific location. */
readonly origin: string;
/** The port number of the URL of the script executed in the Worker. */
readonly port: string;
/** The path of the URL of the script executed in the Worker, beginning with a '/'. */
readonly pathname: string;
/** The parameters (query string) of the URL of the script executed in the Worker, beginning with a '?'. */
readonly search: string;
/** The fragment identifier of the URL of the script executed in the Worker, beginning with a '#'. */
readonly hash: string;
/** Stringifier that returns the whole URL of the script executed in the Worker. */
readonly href: string;
/** Synonym for `href` attribute */
toString(): string;
}
export type Primitive = number | string | boolean | bigint | symbol | null | undefined;
export type HttpHeaderValue = string | string[] | number | null;
//# sourceMappingURL=misc.d.ts.map

View File

@@ -0,0 +1,150 @@
"use strict";
exports.__esModule = true;
exports.getChildMapping = getChildMapping;
exports.mergeChildMappings = mergeChildMappings;
exports.getInitialChildMapping = getInitialChildMapping;
exports.getNextChildMapping = getNextChildMapping;
var _react = require("react");
/**
* Given `this.props.children`, return an object mapping key to child.
*
* @param {*} children `this.props.children`
* @return {object} Mapping of key to child
*/
function getChildMapping(children, mapFn) {
var mapper = function mapper(child) {
return mapFn && (0, _react.isValidElement)(child) ? mapFn(child) : child;
};
var result = Object.create(null);
if (children) _react.Children.map(children, function (c) {
return c;
}).forEach(function (child) {
// run the map function here instead so that the key is the computed one
result[child.key] = mapper(child);
});
return result;
}
/**
* When you're adding or removing children some may be added or removed in the
* same render pass. We want to show *both* since we want to simultaneously
* animate elements in and out. This function takes a previous set of keys
* and a new set of keys and merges them with its best guess of the correct
* ordering. In the future we may expose some of the utilities in
* ReactMultiChild to make this easy, but for now React itself does not
* directly have this concept of the union of prevChildren and nextChildren
* so we implement it here.
*
* @param {object} prev prev children as returned from
* `ReactTransitionChildMapping.getChildMapping()`.
* @param {object} next next children as returned from
* `ReactTransitionChildMapping.getChildMapping()`.
* @return {object} a key set that contains all keys in `prev` and all keys
* in `next` in a reasonable order.
*/
function mergeChildMappings(prev, next) {
prev = prev || {};
next = next || {};
function getValueForKey(key) {
return key in next ? next[key] : prev[key];
} // For each key of `next`, the list of keys to insert before that key in
// the combined list
var nextKeysPending = Object.create(null);
var pendingKeys = [];
for (var prevKey in prev) {
if (prevKey in next) {
if (pendingKeys.length) {
nextKeysPending[prevKey] = pendingKeys;
pendingKeys = [];
}
} else {
pendingKeys.push(prevKey);
}
}
var i;
var childMapping = {};
for (var nextKey in next) {
if (nextKeysPending[nextKey]) {
for (i = 0; i < nextKeysPending[nextKey].length; i++) {
var pendingNextKey = nextKeysPending[nextKey][i];
childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
}
}
childMapping[nextKey] = getValueForKey(nextKey);
} // Finally, add the keys which didn't appear before any key in `next`
for (i = 0; i < pendingKeys.length; i++) {
childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
}
return childMapping;
}
function getProp(child, prop, props) {
return props[prop] != null ? props[prop] : child.props[prop];
}
function getInitialChildMapping(props, onExited) {
return getChildMapping(props.children, function (child) {
return (0, _react.cloneElement)(child, {
onExited: onExited.bind(null, child),
in: true,
appear: getProp(child, 'appear', props),
enter: getProp(child, 'enter', props),
exit: getProp(child, 'exit', props)
});
});
}
function getNextChildMapping(nextProps, prevChildMapping, onExited) {
var nextChildMapping = getChildMapping(nextProps.children);
var children = mergeChildMappings(prevChildMapping, nextChildMapping);
Object.keys(children).forEach(function (key) {
var child = children[key];
if (!(0, _react.isValidElement)(child)) return;
var hasPrev = (key in prevChildMapping);
var hasNext = (key in nextChildMapping);
var prevChild = prevChildMapping[key];
var isLeaving = (0, _react.isValidElement)(prevChild) && !prevChild.props.in; // item is new (entering)
if (hasNext && (!hasPrev || isLeaving)) {
// console.log('entering', key)
children[key] = (0, _react.cloneElement)(child, {
onExited: onExited.bind(null, child),
in: true,
exit: getProp(child, 'exit', nextProps),
enter: getProp(child, 'enter', nextProps)
});
} else if (!hasNext && hasPrev && !isLeaving) {
// item is old (exiting)
// console.log('leaving', key)
children[key] = (0, _react.cloneElement)(child, {
in: false
});
} else if (hasNext && hasPrev && (0, _react.isValidElement)(prevChild)) {
// item hasn't changed transition states
// copy over the last transition props;
// console.log('unchanged', key)
children[key] = (0, _react.cloneElement)(child, {
onExited: onExited.bind(null, child),
in: prevChild.props.in,
exit: getProp(child, 'exit', nextProps),
enter: getProp(child, 'enter', nextProps)
});
}
});
return children;
}

View File

@@ -0,0 +1,814 @@
/// <reference types="node" />
import events = require("events");
import { SecureContextOptions } from "tls";
export interface ColumnType {
/**
* The column's type, such as VarChar, Int or Binary.
*/
name: string;
}
export interface ColumnMetaData {
/**
* The column's name
*/
colName: string;
/**
* The column type.
*/
type: ColumnType;
/**
* The precision. Only applicable to numeric and decimal.
*/
precision?: number | undefined;
/**
* The scale. Only applicable to numeric, decimal, time, datetime2 and datetimeoffset.
*/
scale?: number | undefined;
/**
* The length, for char, varchar, nvarchar and varbinary.
*/
dataLength?: number | undefined;
}
export interface DebugOptions {
/**
* A boolean, controlling whether debug events will be emitted with text describing packet details (default: false).
*/
packet?: boolean | undefined;
/**
* A boolean, controlling whether debug events will be emitted with text describing packet data details (default: false).
*/
data?: boolean | undefined;
/**
* A boolean, controlling whether debug events will be emitted with text describing packet payload details (default: false).
*/
payload?: boolean | undefined;
/**
* A boolean, controlling whether debug events will be emitted with text describing token stream tokens (default: false).
*/
token?: boolean | undefined;
}
export declare enum ISOLATION_LEVEL {
NO_CHANGE = 0x00,
READ_UNCOMMITTED = 0x01,
READ_COMMITTED = 0x02,
REPEATABLE_READ = 0x03,
SERIALIZABLE = 0x04,
SNAPSHOT = 0x05,
}
/**
* Unfortunately these aren't valid JavaScript identifiers
* so I cannot list the values here as enum values
7_1 = 0x71000001,
7_2 = 0x72090002,
7_3_A = 0x730A0003,
7_3_B = 0x730B0003,
7_4 = 0x74000004
*/
export declare var TDS_VERSION: { [index: string]: number };
export interface TediousType {
type: string;
name: string;
}
export interface TediousTypes {
BigInt: TediousType;
Binary: TediousType;
Bit: TediousType;
Char: TediousType;
Date: TediousType;
DateTime2: TediousType;
DateTime: TediousType;
DateTimeOffset: TediousType;
Decimal: TediousType;
Float: TediousType;
Image: TediousType;
Int: TediousType;
Money: TediousType;
NChar: TediousType;
NText: TediousType;
NVarChar: TediousType;
Null: TediousType;
Numeric: TediousType;
Real: TediousType;
SmallDateTime: TediousType;
SmallInt: TediousType;
SmallMoney: TediousType;
TVP: TediousType;
Text: TediousType;
Time: TediousType;
TinyInt: TediousType;
UDT: TediousType;
UniqueIdentifier: TediousType;
VarBinary: TediousType;
VarChar: TediousType;
Variant: TediousType;
Xml: TediousType;
}
export declare var TYPES: TediousTypes;
export interface ConnectionOptions {
/**
* Port to connect to (default: 1433). Mutually exclusive with options.instanceName.
*/
port?: number | undefined;
/**
* The instance name to connect to. The SQL Server Browser service must be running on the database server,
* and UDP port 1444 on the database server must be reachable. (no default) Mutually exclusive with options.port.
*/
instanceName?: string | undefined;
/**
* Database to connect to (default: dependent on server configuration).
*/
database?: string | undefined;
/**
* By default, if the database requested by options.database cannot be accessed,
* the connection will fail with an error. However, if options.fallbackToDefaultDb is set to true,
* then the user's default database will be * used instead (Default: false).
*/
fallbackToDefaultDb?: boolean | undefined;
/**
* The number of milliseconds before the attempt to connect is considered failed (default: 15000).
*/
connectTimeout?: number | undefined;
/**
* The number of milliseconds before a request is considered failed, or 0 for no timeout (default: 15000).
*/
requestTimeout?: number | undefined;
/**
* The number of milliseconds before the cancel (abort) of a request is considered failed (default: 5000).
*/
cancelTimeout?: number | undefined;
/**
* The size of TDS packets (subject to negotiation with the server). Should be a power of 2. (default: 4096).
*/
packetSize?: number | undefined;
/**
* A boolean determining whether to pass time values in UTC or local time. (default: true).
*/
useUTC?: boolean | undefined;
/**
* A boolean determining whether to rollback a transaction automatically if any error is encountered
* during the given transaction's execution. This sets the value for SET XACT_ABORT during the initial
* SQL phase of a connection (documentation).
*/
abortTransactionOnError?: boolean | undefined;
/**
* A string indicating which network interface (ip address) to use when connecting to SQL Server.
*/
localAddress?: string | undefined;
/**
* A boolean determining whether to return rows as arrays or key-value collections. (default: false).
*/
useColumnNames?: boolean | undefined;
/**
* A boolean, controlling whether the column names returned will have the first letter converted
* to lower case (true) or not. This value is ignored if you provide a columnNameReplacer. (default: false).
*/
camelCaseColumns?: boolean | undefined;
/**
* A function with parameters (columnName, index, columnMetaData) and returning a string. If provided,
* this will be called once per column per result-set. The returned value will be used instead of the
* SQL-provided column name on row and meta data objects. This allows you to dynamically convert between
* naming conventions. (default: null).
*/
columnNameReplacer?: ((columnName: string, index: number, columnMetaData: ColumnMetaData) => string) | undefined;
/**
* Debug options
*/
debug?: DebugOptions | undefined;
/**
* The default isolation level that transactions will be run with. (default: READ_COMMITTED).
*/
isolationLevel?: ISOLATION_LEVEL | undefined;
/**
* The default isolation level for new connections. All out-of-transaction queries are executed with this setting. (default: READ_COMMITED)
*/
connectionIsolationLevel?: ISOLATION_LEVEL | undefined;
/**
* A boolean, determining whether the connection will request read only access from a SQL Server Availability Group. For more information, see here. (default: false).
*/
readOnlyIntent?: boolean | undefined;
/**
* A boolean determining whether or not the connection will be encrypted. Set to true if you're on Windows Azure. (default: false).
*/
encrypt?: boolean | undefined;
/**
* When encryption is used, an object may be supplied that will be used for the first argument when calling tls.createSecurePair (default: {}).
*/
cryptoCredentialsDetails?: SecureContextOptions | undefined;
/**
* A boolean, that when true will expose received rows in Requests' done* events. See done, doneInProc and doneProc. (default: false)
* Caution: If many row are received, enabling this option could result in excessive memory usage.
*/
rowCollectionOnDone?: boolean | undefined;
/**
* A boolean, that when true will expose received rows in Requests' completion callback. See new Request. (default: false)
* Caution: If many row are received, enabling this option could result in excessive memory usage.
*/
rowCollectionOnRequestCompletion?: boolean | undefined;
/**
* The version of TDS to use. If server doesn't support specified version, negotiated version is used instead. (default: 7_4).
* Take this from tedious.TDS_VERSION.7_4 .
*/
tdsVersion?: string | undefined;
/**
* Application name used for identifying a specific application in profiling, logging or tracing tools of SQL Server. (default: Tedious)
*/
appName?: string | undefined;
/**
* Number of milliseconds before retrying to establish connection, in case of transient failure. (default: 500)
*/
connectionRetryInterval?: number | undefined;
/**
* Number that sets to the first day of the week, it can be a number from 1 through 7.(default: 7, i.e, first day of the week is Sunday)
*/
datefirst?: number | undefined;
/**
* A string representing position of month, day and year in temporal datatypes. (default: mdy)
*/
dateFormat?: string | undefined;
/**
* A boolean, controls the way null values should be used during comparison operation. (default: true)
*/
enableAnsiNull?: boolean | undefined;
/**
* If true, SET ANSI_NULL_DFLT_ON ON will be set in the initial sql. This means new columns will be nullable by default. See the T-SQL documentation for more details. (Default: true).
*/
enableAnsiNullDefault?: boolean | undefined;
/**
* A boolean, controls if padding should be applied for values shorter than the size of defined column. (default: true)
*/
enableAnsiPadding?: boolean | undefined;
/**
* If true, SQL Server will follow ISO standard behavior during various error conditions. For details, see documentation. (default: true)
*/
enableAnsiWarnings?: boolean | undefined;
/**
* A boolean, determines if query execution should be terminated during overflow or divide-by-zero error. (default: false)
*/
enableArithAbort?: boolean | undefined;
/**
* A boolean, determines if concatenation with NULL should result in NULL or empty string value, more details in documentation. (default: true)
*/
enableConcatNullYieldsNull?: boolean | undefined;
/**
* A boolean, controls whether cursor should be closed, if the transaction opening it gets committed or rolled back. (default: false)
*/
enableCursorCloseOnCommit?: boolean | undefined;
/**
* A boolean, sets the connection to either implicit or autocommit transaction mode. (default: false)
*/
enableImplicitTransactions?: boolean | undefined;
/**
* If false, error is not generated during loss of precession. (default: false)
*/
enableNumericRoundabort?: boolean | undefined;
/**
* If true, characters enclosed in single quotes are treated as literals and those enclosed double quotes are treated as identifiers. (default: true)
*/
enableQuotedIdentifier?: boolean | undefined;
/**
* A string, sets the language of the session (default: us_english)
*/
language?: string | undefined;
/**
* Number of retries on transient error (default: 3)
*/
maxRetriesOnTransientErrors?: number | undefined;
/**
* Sets the MultiSubnetFailover = True parameter, which can help minimize the client recovery latency when failovers occur.
* (default: `false`).
*/
multiSubnetFailover?: boolean | undefined;
/**
* Size of data to be returned by SELECT statement for varchar(max), nvarchar(max), varbinary(max), text, ntext, and image type. (default: 2147483647)
*/
textsize?: number | undefined;
/**
* A boolean, that verifies whether server's identity matches it's certificate's names (default: true)
*/
trustServerCertificate?: boolean | undefined;
}
export interface ConnectionAuthenticationOptions {
/**
* Once you set domain, driver will connect to SQL Server using domain login.
*/
domain?: string | undefined;
/**
* User name to use for authentication.
*/
userName?: string | undefined;
/**
* Password to use for authentication.
*/
password?: string | undefined;
/**
* Authentication token used when type is 'azure-active-directory-access-token'
*/
token?: string | undefined;
/**
* Optional application (client) ID from your registered Azure application
*/
clientId?: string | undefined;
/**
* Optional parameter for specific Azure tenant ID
*/
tenantId?: string | undefined;
}
export interface ConnectionAuthentication {
/**
* Authentication Type. Default value is 'default'.
*/
type?: string | undefined;
/**
* Authentication Options
*/
options: ConnectionAuthenticationOptions;
}
export interface ConnectionConfig {
/**
* Hostname to connect to.
*/
server?: string | undefined;
/**
* Once you set domain, driver will connect to SQL Server using domain login.
*/
domain?: string | undefined;
/**
* Further options
*/
options?: ConnectionOptions | undefined;
/**
* Authentication Options
*/
authentication?: ConnectionAuthentication | undefined;
}
export interface ParameterOptions {
// for VarChar, NVarChar, VarBinary
length?: number | "max" | undefined;
// precision for Numeric, Decimal
precision?: number | undefined;
// scale for Numeric, Decimal, Time, DateTime2, DateTimeOffset
scale?: number | undefined;
}
/**
* Type of each column in the Request#row event
*/
export interface ColumnValue {
metadata: ColumnMetaData;
value: any;
}
export interface Request {
/**
* This event, describing result set columns, will be emitted before row events are emitted. This event may be emited multiple times when more than one recordset is produced by the statement.
*/
on(event: "columnMetadata", listener: (columns: ColumnMetaData[]) => void): this;
/**
* The request has been prepared and can be used in subsequent calls to execute and unprepare.
*/
on(event: "prepared", listener: () => void): this;
/**
* The request encountered an error and has not been prepared.
*/
on(event: "error", listener: (err: Error) => void): this;
/**
* This is the final event emitted by a request. This is emitted after the callback passed in a request is called.
*/
on(event: "requestCompleted", listener: () => void): this;
/**
* A row resulting from execution of the SQL statement with `config.options.useColumnNames` set to `false` (default).
*/
on(event: "row", listener: (columns: ColumnValue[]) => void): this;
/**
* A row resulting from execution of the SQL statement with `config.options.useColumnNames` set to `true`.
*/
on(event: "row", listener: (columns: Record<string, ColumnValue>) => void): this;
/**
* All rows from a result set have been provided (through row events). This token is used to indicate the completion of a SQL statement. As multiple SQL statements can be sent to the server in a single SQL batch, multiple done events can be generated. An done event is emited for each SQL statement in the SQL batch except variable declarations. For execution of SQL statements within stored procedures, doneProc and doneInProc events are used in place of done events.
*/
on(event: "done", listener: (rowCount: number, more: boolean, rows: any[]) => void): this;
/**
* Indicates the completion status of a SQL statement within a stored procedure. All rows from a statement in a stored procedure have been provided (through row events).
*/
on(event: "doneInProc", listener: (rowCount: number, more: boolean, rows: any[]) => void): this;
/**
* Indicates the completion status of a stored procedure. This is also generated for stored procedures executed through SQL statements.
*/
on(event: "doneProc", listener: (rowCount: number, more: boolean, returnStatus: any, rows: any[]) => void): this;
/**
* A value for an output parameter (that was added to the request with addOutputParameter(...)). See also Using Parameters.
*/
on(event: "returnValue", listener: (parameterName: string, value: any, metadata: ColumnMetaData) => void): this;
}
/**
* A Request instance represents a request that can be executed on a connection
* @event 'columnMetadata' This event, describing result set columns, will be emitted before row events are emitted. This event may be emited multiple times when more than one recordset is produced by the statement.
* @event 'prepared' The request has been prepared and can be used in subsequent calls to execute and unprepare.
* @event 'error' The request encountered an error and has not been prepared.
* @event 'requestCompleted' This is the final event emitted by a request. This is emitted after the callback passed in a request is called.
* @event 'row' A row resulting from execution of the SQL statement
* @event 'done' All rows from a result set have been provided (through row events). This token is used to indicate the completion of a SQL statement. As multiple SQL statements can be sent to the server in a single SQL batch, multiple done events can be generated. An done event is emited for each SQL statement in the SQL batch except variable declarations. For execution of SQL statements within stored procedures, doneProc and doneInProc events are used in place of done events.
* @event 'doneInProc' Indicates the completion status of a SQL statement within a stored procedure. All rows from a statement in a stored procedure have been provided (through row events).
* @event 'doneProc' Indicates the completion status of a stored procedure. This is also generated for stored procedures executed through SQL statements.
* @event 'returnValue' A value for an output parameter (that was added to the request with addOutputParameter(...)). See also Using Parameters.
*/
export class Request extends events.EventEmitter {
/**
* Constructor
* @param sql The SQL statement to be executed (or a procedure name, if the request is to be used with connection.callProcedure).
* @param callback The callback is called when the request has completed, either successfully or with an error. If an error occurs during execution of the statement(s), then err will describe the error.
* As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called.
* rowCount: The number of rows emitted as result of executing the SQL statement.
* rows: Rows as a result of executing the SQL statement. Will only be avaiable if Connection's config.options.rowCollectionOnRequestCompletion is true.
*/
constructor(sql: string, callback: (error: Error, rowCount: number, rows: any[]) => void);
/**
* Add an input parameter to the request.
* @param name The parameter name. This should correspond to a parameter in the SQL, or a parameter that a called procedure expects. The name should not start with '@'.
* @param type One of the supported data types.
* @param value The value that the parameter is to be given. The Javascript type of the argument should match that documented for data types.
* @param options Additional type options. Optional.
*/
addParameter(name: string, type: TediousType, value: any, options?: ParameterOptions): void;
/**
* Add an output parameter to the request. The parameter's value will be provide by an emitted returnValue event.
* @param name The parameter name. This should correspond to a parameter in the SQL, or a parameter that a called procedure expects.
* @param type One of the supported data types.
* @param value The value that the parameter is to be given. The Javascript type of the argument should match that documented for data types. Optional.
* @param options Additional type options. Optional.
*/
addOutputParameter(name: string, type: TediousType, value?: any, options?: ParameterOptions): void;
/**
* Temporarily suspends the flow of data from the database. No more 'row' events will be emitted until request.resume() is called.
*/
pause(): void;
/**
* Resumes the flow of data from the database.
*/
resume(): void;
/**
* Sets a timeout for this request. Default is 1500ms
* @param timeout time in ms
*/
setTimeout(timeout: number): void;
}
export interface BulkLoadColumnOpts extends ParameterOptions {
// Indicates whether the column accepts NULL values.
nullable: boolean;
// If the name of the column is different from the name of the property found on rowObj arguments passed to , then you can use this option to specify the property name.
objName?: string | undefined;
}
export interface BulkLoad {
/**
* Adds a column to the bulk load. The column definitions should match the table you are trying to insert into. Attempting to call addColumn after the first row has been added will throw an exception.
* @param name The name of the column.
* @param type One of the supported data types.
* @param options Additional column type information. At a minimum, nullable must be set to true or false.
*/
addColumn(name: string, type: TediousType, options: BulkLoadColumnOpts): void;
/**
* Adds a row to the bulk insert. This method accepts arguments in three different formats:
* @param rowObj An object of key/value pairs representing column name (or objName) and value.
*/
addRow(row: Object): void;
/**
* Adds a row to the bulk insert. This method accepts arguments in three different formats:
* @param columnArray An array representing the values of each column in the same order which they were added to the bulkLoad object.
*/
addRow(columnArray: any[]): void;
/**
* Adds a row to the bulk insert. This method accepts arguments in three different formats:
* @param args If there are at least two columns, values can be passed as multiple arguments instead of an array. They must be in the same order the columns were added in.
*/
addRow(...args: any[]): void;
/**
* This is simply a helper utility function which returns a CREATE TABLE SQL statement based on the columns added to the bulkLoad object. This may be particularly handy when you want to insert into a temporary table (a table which starts with #). A side note on bulk inserting into temporary tables: if you want to access a local temporary table after executing the bulk load, you'll need to use the same connection and execute your requests using connection.execSqlBatch instead of .execSql.
*/
getTableCreationSql(): string;
}
/**
* message interface used by the infoMessage and errorMessage events of Connection
*/
export interface InfoObject {
/**
* Error number
*/
number: number;
/**
* The error state, used as a modifier to the error number.
*/
state: any;
/**
* The class (severity) of the error. A class of less than 10 indicates an informational message.
*/
class: number;
/**
* The message text.
*/
message: string;
/**
* The stored procedure name (if a stored procedure generated the message).
*/
procName: string;
/**
* The line number in the SQL batch or stored procedure that caused the error. Line numbers begin at 1; therefore, if the line number is not applicable to the message, the value of LineNumber will be 0.
*/
lineNumber: number;
}
export interface Connection {
/**
* The attempt to connect and validate has completed.
*/
on(event: "connect", listener: (err: Error) => void): this;
/**
* The connection has ended. This may be as a result of the client calling close(), the server closing the connection, or a network error.
*/
on(event: "end", listener: () => void): this;
/**
* Internal error occurs.
*/
on(event: "error", listener: (err: Error) => void): this;
/**
* A debug message is available. It may be logged or ignored.
*/
on(event: "debug", listener: (messageText: string) => void): this;
/**
* The server has issued an information message.
*/
on(event: "infoMessage", listener: (info: InfoObject) => void): this;
/**
* The server has issued an error message.
*/
on(event: "errorMessage", listener: (err: Error) => void): this;
/**
* The server has reported that the active database has changed. This may be as a result of a successful login, or a use statement.
*/
on(event: "databaseChange", listener: (databaseName: string) => void): this;
/**
* The server has reported that the language has changed.
*/
on(event: "languageChange", listener: (languageName: string) => void): this;
/**
* The server has reported that the charset has changed.
*/
on(event: "charsetChange", listener: (charset: string) => void): this;
}
/**
* Connection
* @event 'connect' The attempt to connect and validate has completed.
* @event 'end' The connection has ended. This may be as a result of the client calling close(), the server closing the connection, or a network error.
* @event 'error' Internal error occurs.
* @event 'debug' A debug message is available. It may be logged or ignored.
* @event 'infoMessage' The server has issued an information message.
* @event 'errorMessage' The server has issued an error message.
* @event 'databaseChange' The server has reported that the active database has changed. This may be as a result of a sucessful login, or a use statement.
* @event 'languageChange' The server has reported that the language has changed.
* @event 'charsetChange' The server has reported that the charset has changed.
* @event 'secure' A secure connection has been established.
*/
export class Connection extends events.EventEmitter {
constructor(config: ConnectionConfig);
/**
* Establish a connection to the server.
* @param callback The callback is called when the connection was established or an error occured. If an error occured then err will describe the error.
*/
connect(callback?: (err?: Error) => void): void;
/**
* Start a transaction. As only one request at a time may be executed on
* a connection, another request should not be initiated until this callback is called.
* @param callback The callback is called when the request to start the transaction has completed, either successfully or with an error. If an error occured then err will describe the error.
* @param name A string representing a name to associate with the transaction. Optional, and defaults to an empty string. Required when isolationLevel is present.
* @param isolationLevel The isolation level that the transaction is to be run with.
*/
beginTransaction(callback: (error?: Error) => void, name?: string, isolationLevel?: ISOLATION_LEVEL): void;
/**
* Commit a transaction.
* There should be an active transaction. That is, beginTransaction should have been previously called.
* @param callback The callback is called when the request to commit the transaction has completed, either successfully or with an error. If an error occured then err will describe the error.
* As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called.
*/
commitTransaction(callback: (error: Error) => void): void;
/**
* Rollback a transaction. There should be an active transaction. That is, beginTransaction should have been previously called.
* @param callback The callback is called when the request to rollback the transaction has completed, either successfully or with an error. If an error occured then err will describe the error.
* As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called.
*/
rollbackTransaction(callback: (error: Error) => void): void;
/**
* Set a savepoint within a transaction. There should be an active transaction. That is, beginTransaction should have been previously called.
* @param callback The callback is called when the request to set a savepoint within the transaction has completed, either successfully or with an error. If an error occured then err will describe the error.
* As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called.
*/
saveTransaction(callback: (error: Error) => void): void;
/**
* Run the given callback after starting a transaction, and commit or rollback the transaction afterwards.
* This is a helper that employs beginTransaction, commitTransaction, rollbackTransaction and saveTransaction to greatly simplify the use of database transactions and automatically handle transaction nesting.
* @param callback The callback is called when the request to start a transaction (or create a savepoint, in the case of a nested transaction) has completed, either successfully or with an error.
* If an error occured, then err will describe the error. If no error occured, the callback should perform its work and eventually call done with an error or null
* (to trigger a transaction rollback or a transaction commit) and an additional completion callback that will be called when the request to rollback or commit the current transaction
* has completed, either successfully or with an error. Additional arguments given to done will be passed through to this callback.
* As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called.
* @param name A string representing a name to associate with the transaction. Optional, and defaults to an empty string. In case of a nested transaction, naming the transaction name has no effect.
* @param isolationLevel The isolation level that the transaction is to be run with.
*/
transaction(
callback: (
error: Error,
done: (error?: Error, doneCallback?: (error?: Error, ...args: any[]) => void, ...args: any[]) => void,
) => void,
name?: string,
isolationLevel?: ISOLATION_LEVEL,
): void;
/**
* Prepare the SQL represented by the request. The request can then be used in subsequent calls to execute and unprepare
* @param request A Request object representing the request. Parameters only require a name and type. Parameter values are ignored.
*/
prepare(request: Request): void;
/**
* Release the SQL Server resources associated with a previously prepared request.
*/
unprepare(request: Request): void;
/**
* Call a stored procedure represented by request.
*/
callProcedure(request: Request): void;
/**
* Execute the SQL represented by request.
* As sp_executesql is used to execute the SQL, if the same SQL is executed multiples times using this function, the SQL Server query optimizer is likely to reuse the execution plan it generates for the first execution.
* Beware of the way that scoping rules apply, and how they may affect local temp tables. If you're running in to scoping issues, then execSqlBatch may be a better choice. See also issue #24.
*/
execSql(request: Request): void;
/**
* Execute the SQL batch represented by request. There is no param support, and unlike execSql, it is not likely that SQL Server will reuse the execution plan it generates for the SQL.
* In almost all cases, execSql will be a better choice.
*/
execSqlBatch(request: Request): void;
/**
* Execute previously prepared SQL, using the supplied parameters.
* @param request A previously prepared Request.
* @param parameters An object whose names correspond to the names of parameters that were added to the request before it was prepared. The object's values are passed as the parameters' values when the request is executed.
*/
execute(request: Request, parameters: {}): void;
/**
* Creates a new BulkLoad instance.
* @param tableName The name of the table to bulk-insert into.
* @param callback A function which will be called after the BulkLoad finishes executing. rowCount will equal the number of rows inserted.
*/
newBulkLoad(tableName: string, callback: (error: Error, rowCount: number) => void): BulkLoad;
/**
* Executes a BulkLoad.
*/
execBulkLoad(bulkLoad: BulkLoad): void;
/**
* Reset the connection to its initial state. Can be useful for connection pool implementations.
* @param callback The callback is called when the connection reset has completed, either successfully or with an error. If an error occured then err will describe the error.
* As only one request at a time may be executed on a connection, another request should not be initiated until this callback is called.
*/
reset(callback: (error: Error) => void): void;
/**
* Cancel currently executed request.
*/
cancel(): void;
/**
* Closes the connection to the database. The end will be emmited once the connection has been closed.
*/
close(): void;
}
/**
* Error emitted by Connection class 'error' event
*/
export declare class ConnectionError extends Error {
constructor(message?: string, code?: string);
public message: string;
public code: string;
}
/**
* Error emitted by Request class
*/
export declare class RequestError extends Error {
constructor(message?: string, code?: string);
public message: string;
public code: string;
}

View File

@@ -0,0 +1,24 @@
import { addMilliseconds } from "./addMilliseconds.js";
/**
* The {@link subMilliseconds} function options.
*/
/**
* Subtract the specified number of milliseconds from 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).
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
*
* @param date - The date to be changed
* @param amount - The amount of milliseconds to be subtracted.
* @param options - An object with options
*
* @returns The new date with the milliseconds subtracted
*/
export function subMilliseconds(date, amount, options) {
return addMilliseconds(date, -amount, options);
}
// Fallback for modularized imports:
export default subMilliseconds;

View File

@@ -0,0 +1,64 @@
import type { Client, Connection, ExecutedQuery, Transaction } from '@planetscale/database';
import { type Cache } from "../cache/core/index.cjs";
import type { WithCacheConfig } from "../cache/core/types.cjs";
import { entityKind } from "../entity.cjs";
import type { Logger } from "../logger.cjs";
import type { MySqlDialect } from "../mysql-core/dialect.cjs";
import type { SelectedFieldsOrdered } from "../mysql-core/query-builders/select.types.cjs";
import { MySqlPreparedQuery, type MySqlPreparedQueryConfig, type MySqlPreparedQueryHKT, type MySqlQueryResultHKT, MySqlSession, MySqlTransaction } from "../mysql-core/session.cjs";
import type { RelationalSchemaConfig, TablesRelationalConfig } from "../relations.cjs";
import { type Query, type SQL } from "../sql/sql.cjs";
import { type Assume } from "../utils.cjs";
export declare class PlanetScalePreparedQuery<T extends MySqlPreparedQueryConfig> extends MySqlPreparedQuery<T> {
private client;
private queryString;
private params;
private logger;
private fields;
private customResultMapper?;
private generatedIds?;
private returningIds?;
static readonly [entityKind]: string;
private rawQuery;
private query;
constructor(client: Client | Transaction | Connection, queryString: string, params: unknown[], logger: Logger, cache: Cache, queryMetadata: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
} | undefined, cacheConfig: WithCacheConfig | undefined, fields: SelectedFieldsOrdered | undefined, customResultMapper?: ((rows: unknown[][]) => T["execute"]) | undefined, generatedIds?: Record<string, unknown>[] | undefined, returningIds?: SelectedFieldsOrdered | undefined);
execute(placeholderValues?: Record<string, unknown> | undefined): Promise<T['execute']>;
iterator(_placeholderValues?: Record<string, unknown>): AsyncGenerator<T['iterator']>;
}
export interface PlanetscaleSessionOptions {
logger?: Logger;
cache?: Cache;
}
export declare class PlanetscaleSession<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends MySqlSession<MySqlQueryResultHKT, PlanetScalePreparedQueryHKT, TFullSchema, TSchema> {
private baseClient;
private schema;
private options;
static readonly [entityKind]: string;
private logger;
private client;
private cache;
constructor(baseClient: Client | Connection, dialect: MySqlDialect, tx: Transaction | undefined, schema: RelationalSchemaConfig<TSchema> | undefined, options?: PlanetscaleSessionOptions);
prepareQuery<T extends MySqlPreparedQueryConfig = MySqlPreparedQueryConfig>(query: Query, fields: SelectedFieldsOrdered | undefined, customResultMapper?: (rows: unknown[][]) => T['execute'], generatedIds?: Record<string, unknown>[], returningIds?: SelectedFieldsOrdered, queryMetadata?: {
type: 'select' | 'update' | 'delete' | 'insert';
tables: string[];
}, cacheConfig?: WithCacheConfig): MySqlPreparedQuery<T>;
query(query: string, params: unknown[]): Promise<ExecutedQuery>;
queryObjects(query: string, params: unknown[]): Promise<ExecutedQuery>;
all<T = unknown>(query: SQL): Promise<T[]>;
count(sql: SQL): Promise<number>;
transaction<T>(transaction: (tx: PlanetScaleTransaction<TFullSchema, TSchema>) => Promise<T>): Promise<T>;
}
export declare class PlanetScaleTransaction<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends MySqlTransaction<PlanetscaleQueryResultHKT, PlanetScalePreparedQueryHKT, TFullSchema, TSchema> {
static readonly [entityKind]: string;
constructor(dialect: MySqlDialect, session: MySqlSession, schema: RelationalSchemaConfig<TSchema> | undefined, nestedIndex?: number);
transaction<T>(transaction: (tx: PlanetScaleTransaction<TFullSchema, TSchema>) => Promise<T>): Promise<T>;
}
export interface PlanetscaleQueryResultHKT extends MySqlQueryResultHKT {
type: ExecutedQuery;
}
export interface PlanetScalePreparedQueryHKT extends MySqlPreparedQueryHKT {
type: PlanetScalePreparedQuery<Assume<this['config'], MySqlPreparedQueryConfig>>;
}

View File

@@ -0,0 +1,9 @@
import { EventHint } from './types-hoist/event';
import { SendFeedbackParams } from './types-hoist/feedback';
/**
* Send user feedback to Sentry.
*/
export declare function captureFeedback(params: SendFeedbackParams, hint?: EventHint & {
includeReplay?: boolean;
}, scope?: import("./scope").Scope): string;
//# sourceMappingURL=feedback.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"sources":["../../../src/auth/baseFields/auth.ts"],"sourcesContent":["import type { Field } from '../../fields/config/types.js'\n\nexport const baseAuthFields: Field[] = [\n {\n name: 'resetPasswordToken',\n type: 'text',\n hidden: true,\n },\n {\n name: 'resetPasswordExpiration',\n type: 'date',\n hidden: true,\n },\n {\n name: 'salt',\n type: 'text',\n hidden: true,\n },\n {\n name: 'hash',\n type: 'text',\n hidden: true,\n },\n]\n"],"names":["baseAuthFields","name","type","hidden"],"mappings":"AAEA,OAAO,MAAMA,iBAA0B;IACrC;QACEC,MAAM;QACNC,MAAM;QACNC,QAAQ;IACV;IACA;QACEF,MAAM;QACNC,MAAM;QACNC,QAAQ;IACV;IACA;QACEF,MAAM;QACNC,MAAM;QACNC,QAAQ;IACV;IACA;QACEF,MAAM;QACNC,MAAM;QACNC,QAAQ;IACV;CACD,CAAA"}

View File

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

View File

@@ -0,0 +1,7 @@
{
"name": "dom-helpers/transitionEnd",
"private": true,
"main": "../cjs/transitionEnd.js",
"module": "../esm/transitionEnd.js",
"types": "../esm/transitionEnd.d.ts"
}

View File

@@ -0,0 +1,7 @@
import { Integration } from '@sentry/core';
import { browserTracingIntegration as originalBrowserTracingIntegration } from '@sentry/react';
/**
* A custom browser tracing integration for Next.js.
*/
export declare function browserTracingIntegration(options?: Parameters<typeof originalBrowserTracingIntegration>[0]): Integration;
//# sourceMappingURL=browserTracingIntegration.d.ts.map

View File

@@ -0,0 +1,28 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { MySqlColumn, MySqlColumnBuilder } from "./common.cjs";
export type MySqlBinaryBuilderInitial<TName extends string> = MySqlBinaryBuilder<{
name: TName;
dataType: 'string';
columnType: 'MySqlBinary';
data: string;
driverParam: string;
enumValues: undefined;
}>;
export declare class MySqlBinaryBuilder<T extends ColumnBuilderBaseConfig<'string', 'MySqlBinary'>> extends MySqlColumnBuilder<T, MySqlBinaryConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], length: number | undefined);
}
export declare class MySqlBinary<T extends ColumnBaseConfig<'string', 'MySqlBinary'>> extends MySqlColumn<T, MySqlBinaryConfig> {
static readonly [entityKind]: string;
length: number | undefined;
mapFromDriverValue(value: string | Buffer | Uint8Array): string;
getSQLType(): string;
}
export interface MySqlBinaryConfig {
length?: number;
}
export declare function binary(): MySqlBinaryBuilderInitial<''>;
export declare function binary(config?: MySqlBinaryConfig): MySqlBinaryBuilderInitial<''>;
export declare function binary<TName extends string>(name: TName, config?: MySqlBinaryConfig): MySqlBinaryBuilderInitial<TName>;

View File

@@ -0,0 +1 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e.clsx=n()}(this,(function(){function e(n){var t,f,o="";if("string"==typeof n||"number"==typeof n)o+=n;else if("object"==typeof n)if(Array.isArray(n)){var r=n.length;for(t=0;t<r;t++)n[t]&&(f=e(n[t]))&&(o&&(o+=" "),o+=f)}else for(f in n)n[f]&&(o&&(o+=" "),o+=f);return o}function n(){for(var n,t,f=0,o="",r=arguments.length;f<r;f++)(n=arguments[f])&&(t=e(n))&&(o&&(o+=" "),o+=t);return o}return n.clsx=n,n}));

View File

@@ -0,0 +1,2 @@
import { Exact } from "../../exact";
export declare const isExact: <ExpectedShape>() => <ActualShape>(x: Exact<ActualShape, ExpectedShape>) => ExpectedShape;

View File

@@ -0,0 +1,10 @@
/**
* Modules exported here are not part of the public API and are subject to change without notice and without a major version bump.
*/
export { getExternalFile } from '../uploads/getExternalFile.js';
export { getRangeRequestInfo } from '../uploads/getRangeRequestInfo.js';
export { getSafeFileName } from '../uploads/getSafeFilename.js';
export { parseRangeHeader } from '../uploads/parseRangeHeader.js';
export { getEntityPermissions } from '../utilities/getEntityPermissions/getEntityPermissions.js';
export { sanitizePermissions } from '../utilities/sanitizePermissions.js';
//# sourceMappingURL=internal.d.ts.map

View File

@@ -0,0 +1,24 @@
/**
* @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 ShowerHead = createLucideIcon("ShowerHead", [
["path", { d: "m4 4 2.5 2.5", key: "uv2vmf" }],
["path", { d: "M13.5 6.5a4.95 4.95 0 0 0-7 7", key: "frdkwv" }],
["path", { d: "M15 5 5 15", key: "1ag8rq" }],
["path", { d: "M14 17v.01", key: "eokfpp" }],
["path", { d: "M10 16v.01", key: "14uyyl" }],
["path", { d: "M13 13v.01", key: "1v1k97" }],
["path", { d: "M16 10v.01", key: "5169yg" }],
["path", { d: "M11 20v.01", key: "cj92p8" }],
["path", { d: "M17 14v.01", key: "11cswd" }],
["path", { d: "M20 11v.01", key: "19e0od" }]
]);
export { ShowerHead as default };
//# sourceMappingURL=shower-head.js.map

View File

@@ -0,0 +1,183 @@
import type * as checks from "./checks.js";
import type { $ZodConfig } from "./core.js";
import type * as errors from "./errors.js";
import type * as schemas from "./schemas.js";
export type JSONType = string | number | boolean | null | JSONType[] | {
[key: string]: JSONType;
};
export type JWTAlgorithm = "HS256" | "HS384" | "HS512" | "RS256" | "RS384" | "RS512" | "ES256" | "ES384" | "ES512" | "PS256" | "PS384" | "PS512" | "EdDSA" | (string & {});
export type IPVersion = "v4" | "v6";
export type MimeTypes = "application/json" | "application/xml" | "application/x-www-form-urlencoded" | "application/javascript" | "application/pdf" | "application/zip" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-powerpoint" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/octet-stream" | "application/graphql" | "text/html" | "text/plain" | "text/css" | "text/javascript" | "text/csv" | "image/png" | "image/jpeg" | "image/gif" | "image/svg+xml" | "image/webp" | "audio/mpeg" | "audio/ogg" | "audio/wav" | "audio/webm" | "video/mp4" | "video/webm" | "video/ogg" | "font/woff" | "font/woff2" | "font/ttf" | "font/otf" | "multipart/form-data" | (string & {});
export type ParsedTypes = "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "object" | "function" | "file" | "date" | "array" | "map" | "set" | "nan" | "null" | "promise";
export type AssertEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? true : false;
export type AssertNotEqual<T, U> = (<V>() => V extends T ? 1 : 2) extends <V>() => V extends U ? 1 : 2 ? false : true;
export type AssertExtends<T, U> = T extends U ? T : never;
export type IsAny<T> = 0 extends 1 & T ? true : false;
export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
export type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
export type MakePartial<T, K extends keyof T> = Omit<T, K> & InexactPartial<Pick<T, K>>;
export type MakeRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
export type Exactly<T, X> = T & Record<Exclude<keyof X, keyof T>, never>;
export type NoUndefined<T> = T extends undefined ? never : T;
export type Whatever = {} | undefined | null;
export type LoosePartial<T extends object> = InexactPartial<T> & {
[k: string]: unknown;
};
export type Mask<Keys extends PropertyKey> = {
[K in Keys]?: true;
};
export type Writeable<T> = {
-readonly [P in keyof T]: T[P];
} & {};
export type InexactPartial<T> = {
[P in keyof T]?: T[P] | undefined;
};
export type EmptyObject = Record<string, never>;
export type BuiltIn = (((...args: any[]) => any) | (new (...args: any[]) => any)) | {
readonly [Symbol.toStringTag]: string;
} | Date | Error | Generator | Promise<unknown> | RegExp;
export type MakeReadonly<T> = T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends Set<infer V> ? ReadonlySet<V> : T extends [infer Head, ...infer Tail] ? readonly [Head, ...Tail] : T extends Array<infer V> ? ReadonlyArray<V> : T extends BuiltIn ? T : Readonly<T>;
export type SomeObject = Record<PropertyKey, any>;
export type Identity<T> = T;
export type Flatten<T> = Identity<{
[k in keyof T]: T[k];
}>;
export type Mapped<T> = {
[k in keyof T]: T[k];
};
export type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
export type NoNeverKeys<T> = {
[k in keyof T]: [T[k]] extends [never] ? never : k;
}[keyof T];
export type NoNever<T> = Identity<{
[k in NoNeverKeys<T>]: k extends keyof T ? T[k] : never;
}>;
export type Extend<A extends SomeObject, B extends SomeObject> = Flatten<keyof A & keyof B extends never ? A & B : {
[K in keyof A as K extends keyof B ? never : K]: A[K];
} & {
[K in keyof B]: B[K];
}>;
export type TupleItems = ReadonlyArray<schemas.SomeType>;
export type AnyFunc = (...args: any[]) => any;
export type IsProp<T, K extends keyof T> = T[K] extends AnyFunc ? never : K;
export type MaybeAsync<T> = T | Promise<T>;
export type KeyOf<T> = keyof OmitIndexSignature<T>;
export type OmitIndexSignature<T> = {
[K in keyof T as string extends K ? never : K extends string ? K : never]: T[K];
};
export type ExtractIndexSignature<T> = {
[K in keyof T as string extends K ? K : K extends string ? never : K]: T[K];
};
export type Keys<T extends object> = keyof OmitIndexSignature<T>;
export type SchemaClass<T extends schemas.SomeType> = {
new (def: T["_zod"]["def"]): T;
};
export type EnumValue = string | number;
export type EnumLike = Readonly<Record<string, EnumValue>>;
export type ToEnum<T extends EnumValue> = Flatten<{
[k in T]: k;
}>;
export type KeysEnum<T extends object> = ToEnum<Exclude<keyof T, symbol>>;
export type KeysArray<T extends object> = Flatten<(keyof T & string)[]>;
export type Literal = string | number | bigint | boolean | null | undefined;
export type LiteralArray = Array<Literal>;
export type Primitive = string | number | symbol | bigint | boolean | null | undefined;
export type PrimitiveArray = Array<Primitive>;
export type HasSize = {
size: number;
};
export type HasLength = {
length: number;
};
export type Numeric = number | bigint | Date;
export type SafeParseResult<T> = SafeParseSuccess<T> | SafeParseError<T>;
export type SafeParseSuccess<T> = {
success: true;
data: T;
error?: never;
};
export type SafeParseError<T> = {
success: false;
data?: never;
error: errors.$ZodError<T>;
};
export type PropValues = Record<string, Set<Primitive>>;
export type PrimitiveSet = Set<Primitive>;
export declare function assertEqual<A, B>(val: AssertEqual<A, B>): AssertEqual<A, B>;
export declare function assertNotEqual<A, B>(val: AssertNotEqual<A, B>): AssertNotEqual<A, B>;
export declare function assertIs<T>(_arg: T): void;
export declare function assertNever(_x: never): never;
export declare function assert<T>(_: any): asserts _ is T;
export declare function getEnumValues(entries: EnumLike): EnumValue[];
export declare function joinValues<T extends Primitive[]>(array: T, separator?: string): string;
export declare function jsonStringifyReplacer(_: string, value: any): any;
export declare function cached<T>(getter: () => T): {
value: T;
};
export declare function nullish(input: any): boolean;
export declare function cleanRegex(source: string): string;
export declare function floatSafeRemainder(val: number, step: number): number;
export declare function defineLazy<T, K extends keyof T>(object: T, key: K, getter: () => T[K]): void;
export declare function assignProp<T extends object, K extends PropertyKey>(target: T, prop: K, value: K extends keyof T ? T[K] : any): void;
export declare function getElementAtPath(obj: any, path: (string | number)[] | null | undefined): any;
export declare function promiseAllObject<T extends object>(promisesObj: T): Promise<{
[k in keyof T]: Awaited<T[k]>;
}>;
export declare function randomString(length?: number): string;
export declare function esc(str: string): string;
export declare const captureStackTrace: (targetObject: object, constructorOpt?: Function) => void;
export declare function isObject(data: any): data is Record<PropertyKey, unknown>;
export declare const allowsEval: {
value: boolean;
};
export declare function isPlainObject(o: any): o is Record<PropertyKey, unknown>;
export declare function numKeys(data: any): number;
export declare const getParsedType: (data: any) => ParsedTypes;
export declare const propertyKeyTypes: Set<string>;
export declare const primitiveTypes: Set<string>;
export declare function escapeRegex(str: string): string;
export declare function clone<T extends schemas.$ZodType>(inst: T, def?: T["_zod"]["def"], params?: {
parent: boolean;
}): T;
export type EmptyToNever<T> = keyof T extends never ? never : T;
export type Normalize<T> = T extends undefined ? never : T extends Record<any, any> ? Flatten<{
[k in keyof Omit<T, "error" | "message">]: T[k];
} & ("error" extends keyof T ? {
error?: Exclude<T["error"], string>;
} : unknown)> : never;
export declare function normalizeParams<T>(_params: T): Normalize<T>;
export declare function createTransparentProxy<T extends object>(getter: () => T): T;
export declare function stringifyPrimitive(value: any): string;
export declare function optionalKeys(shape: schemas.$ZodShape): string[];
export type CleanKey<T extends PropertyKey> = T extends `?${infer K}` ? K : T extends `${infer K}?` ? K : T;
export type ToCleanMap<T extends schemas.$ZodLooseShape> = {
[k in keyof T]: k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k;
};
export type FromCleanMap<T extends schemas.$ZodLooseShape> = {
[k in keyof T as k extends `?${infer K}` ? K : k extends `${infer K}?` ? K : k]: k;
};
export declare const NUMBER_FORMAT_RANGES: Record<checks.$ZodNumberFormats, [number, number]>;
export declare const BIGINT_FORMAT_RANGES: Record<checks.$ZodBigIntFormats, [bigint, bigint]>;
export declare function pick(schema: schemas.$ZodObject, mask: Record<string, unknown>): any;
export declare function omit(schema: schemas.$ZodObject, mask: object): any;
export declare function extend(schema: schemas.$ZodObject, shape: schemas.$ZodShape): any;
export declare function merge(a: schemas.$ZodObject, b: schemas.$ZodObject): any;
export declare function partial(Class: SchemaClass<schemas.$ZodOptional> | null, schema: schemas.$ZodObject, mask: object | undefined): any;
export declare function required(Class: SchemaClass<schemas.$ZodNonOptional>, schema: schemas.$ZodObject, mask: object | undefined): any;
export type Constructor<T, Def extends any[] = any[]> = new (...args: Def) => T;
export declare function aborted(x: schemas.ParsePayload, startIndex?: number): boolean;
export declare function prefixIssues(path: PropertyKey, issues: errors.$ZodRawIssue[]): errors.$ZodRawIssue[];
export declare function unwrapMessage(message: string | {
message: string;
} | undefined | null): string | undefined;
export declare function finalizeIssue(iss: errors.$ZodRawIssue, ctx: schemas.ParseContextInternal | undefined, config: $ZodConfig): errors.$ZodIssue;
export declare function getSizableOrigin(input: any): "set" | "map" | "file" | "unknown";
export declare function getLengthableOrigin(input: any): "array" | "string" | "unknown";
export declare function issue(_iss: string, input: any, inst: any): errors.$ZodRawIssue;
export declare function issue(_iss: errors.$ZodRawIssue): errors.$ZodRawIssue;
export declare function cleanEnum(obj: Record<string, EnumValue>): EnumValue[];
export declare abstract class Class {
constructor(..._args: any[]);
}

View File

@@ -0,0 +1,244 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true,
});
exports.createSourceEventStream = createSourceEventStream;
exports.subscribe = subscribe;
var _devAssert = require('../jsutils/devAssert.js');
var _inspect = require('../jsutils/inspect.js');
var _isAsyncIterable = require('../jsutils/isAsyncIterable.js');
var _Path = require('../jsutils/Path.js');
var _GraphQLError = require('../error/GraphQLError.js');
var _locatedError = require('../error/locatedError.js');
var _collectFields = require('./collectFields.js');
var _execute = require('./execute.js');
var _mapAsyncIterator = require('./mapAsyncIterator.js');
var _values = require('./values.js');
/**
* Implements the "Subscribe" algorithm described in the GraphQL specification.
*
* Returns a Promise which resolves to either an AsyncIterator (if successful)
* or an ExecutionResult (error). The promise will be rejected if the schema or
* other arguments to this function are invalid, or if the resolved event stream
* is not an async iterable.
*
* If the client-provided arguments to this function do not result in a
* compliant subscription, a GraphQL Response (ExecutionResult) with
* descriptive errors and no data will be returned.
*
* If the source stream could not be created due to faulty subscription
* resolver logic or underlying systems, the promise will resolve to a single
* ExecutionResult containing `errors` and no `data`.
*
* If the operation succeeded, the promise resolves to an AsyncIterator, which
* yields a stream of ExecutionResults representing the response stream.
*
* Accepts either an object with named arguments, or individual arguments.
*/
async function subscribe(args) {
// Temporary for v15 to v16 migration. Remove in v17
arguments.length < 2 ||
(0, _devAssert.devAssert)(
false,
'graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.',
);
const resultOrStream = await createSourceEventStream(args);
if (!(0, _isAsyncIterable.isAsyncIterable)(resultOrStream)) {
return resultOrStream;
} // For each payload yielded from a subscription, map it over the normal
// GraphQL `execute` function, with `payload` as the rootValue.
// This implements the "MapSourceToResponseEvent" algorithm described in
// the GraphQL specification. The `execute` function provides the
// "ExecuteSubscriptionEvent" algorithm, as it is nearly identical to the
// "ExecuteQuery" algorithm, for which `execute` is also used.
const mapSourceToResponse = (payload) =>
(0, _execute.execute)({ ...args, rootValue: payload }); // Map every source value to a ExecutionResult value as described above.
return (0, _mapAsyncIterator.mapAsyncIterator)(
resultOrStream,
mapSourceToResponse,
);
}
function toNormalizedArgs(args) {
const firstArg = args[0];
if (firstArg && 'document' in firstArg) {
return firstArg;
}
return {
schema: firstArg,
// FIXME: when underlying TS bug fixed, see https://github.com/microsoft/TypeScript/issues/31613
document: args[1],
rootValue: args[2],
contextValue: args[3],
variableValues: args[4],
operationName: args[5],
subscribeFieldResolver: args[6],
};
}
/**
* Implements the "CreateSourceEventStream" algorithm described in the
* GraphQL specification, resolving the subscription source event stream.
*
* Returns a Promise which resolves to either an AsyncIterable (if successful)
* or an ExecutionResult (error). The promise will be rejected if the schema or
* other arguments to this function are invalid, or if the resolved event stream
* is not an async iterable.
*
* If the client-provided arguments to this function do not result in a
* compliant subscription, a GraphQL Response (ExecutionResult) with
* descriptive errors and no data will be returned.
*
* If the the source stream could not be created due to faulty subscription
* resolver logic or underlying systems, the promise will resolve to a single
* ExecutionResult containing `errors` and no `data`.
*
* If the operation succeeded, the promise resolves to the AsyncIterable for the
* event stream returned by the resolver.
*
* A Source Event Stream represents a sequence of events, each of which triggers
* a GraphQL execution for that event.
*
* This may be useful when hosting the stateful subscription service in a
* different process or machine than the stateless GraphQL execution engine,
* or otherwise separating these two steps. For more on this, see the
* "Supporting Subscriptions at Scale" information in the GraphQL specification.
*/
async function createSourceEventStream(...rawArgs) {
const args = toNormalizedArgs(rawArgs);
const { schema, document, variableValues } = args; // If arguments are missing or incorrectly typed, this is an internal
// developer mistake which should throw an early error.
(0, _execute.assertValidExecutionArguments)(schema, document, variableValues); // If a valid execution context cannot be created due to incorrect arguments,
// a "Response" with only errors is returned.
const exeContext = (0, _execute.buildExecutionContext)(args); // Return early errors if execution context failed.
if (!('schema' in exeContext)) {
return {
errors: exeContext,
};
}
try {
const eventStream = await executeSubscription(exeContext); // Assert field returned an event stream, otherwise yield an error.
if (!(0, _isAsyncIterable.isAsyncIterable)(eventStream)) {
throw new Error(
'Subscription field must return Async Iterable. ' +
`Received: ${(0, _inspect.inspect)(eventStream)}.`,
);
}
return eventStream;
} catch (error) {
// If it GraphQLError, report it as an ExecutionResult, containing only errors and no data.
// Otherwise treat the error as a system-class error and re-throw it.
if (error instanceof _GraphQLError.GraphQLError) {
return {
errors: [error],
};
}
throw error;
}
}
async function executeSubscription(exeContext) {
const { schema, fragments, operation, variableValues, rootValue } =
exeContext;
const rootType = schema.getSubscriptionType();
if (rootType == null) {
throw new _GraphQLError.GraphQLError(
'Schema is not configured to execute subscription operation.',
{
nodes: operation,
},
);
}
const rootFields = (0, _collectFields.collectFields)(
schema,
fragments,
variableValues,
rootType,
operation.selectionSet,
);
const [responseName, fieldNodes] = [...rootFields.entries()][0];
const fieldDef = (0, _execute.getFieldDef)(schema, rootType, fieldNodes[0]);
if (!fieldDef) {
const fieldName = fieldNodes[0].name.value;
throw new _GraphQLError.GraphQLError(
`The subscription field "${fieldName}" is not defined.`,
{
nodes: fieldNodes,
},
);
}
const path = (0, _Path.addPath)(undefined, responseName, rootType.name);
const info = (0, _execute.buildResolveInfo)(
exeContext,
fieldDef,
fieldNodes,
rootType,
path,
);
try {
var _fieldDef$subscribe;
// Implements the "ResolveFieldEventStream" algorithm from GraphQL specification.
// It differs from "ResolveFieldValue" due to providing a different `resolveFn`.
// Build a JS object of arguments from the field.arguments AST, using the
// variables scope to fulfill any variable references.
const args = (0, _values.getArgumentValues)(
fieldDef,
fieldNodes[0],
variableValues,
); // The resolve function's optional third argument is a context value that
// is provided to every resolve function within an execution. It is commonly
// used to represent an authenticated user, or request-specific caches.
const contextValue = exeContext.contextValue; // Call the `subscribe()` resolver or the default resolver to produce an
// AsyncIterable yielding raw payloads.
const resolveFn =
(_fieldDef$subscribe = fieldDef.subscribe) !== null &&
_fieldDef$subscribe !== void 0
? _fieldDef$subscribe
: exeContext.subscribeFieldResolver;
const eventStream = await resolveFn(rootValue, args, contextValue, info);
if (eventStream instanceof Error) {
throw eventStream;
}
return eventStream;
} catch (error) {
throw (0, _locatedError.locatedError)(
error,
fieldNodes,
(0, _Path.pathToArray)(path),
);
}
}

View File

@@ -0,0 +1,2 @@
export declare const SDK_VERSION: string;
//# sourceMappingURL=version.d.ts.map

View File

@@ -0,0 +1,12 @@
const isNotNull = (value) => value !== null;
function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe) {
const resolvedKeyframes = keyframes.filter(isNotNull);
const index = repeat && repeatType !== "loop" && repeat % 2 === 1
? 0
: resolvedKeyframes.length - 1;
return !index || finalKeyframe === undefined
? resolvedKeyframes[index]
: finalKeyframe;
}
export { getFinalKeyframe };

View File

@@ -0,0 +1,11 @@
/**
* 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.
*
*/
'use strict'
const LexicalRichTextPlugin = process.env.NODE_ENV !== 'production' ? require('./LexicalRichTextPlugin.dev.js') : require('./LexicalRichTextPlugin.prod.js');
module.exports = LexicalRichTextPlugin;

View File

@@ -0,0 +1,219 @@
/**
* prism.js Coy theme for JavaScript, CoffeeScript, CSS and HTML
* Based on https://github.com/tshedor/workshop-wp-theme (Example: http://workshop.kansan.com/category/sessions/basics or http://workshop.timshedor.com/category/sessions/basics);
* @author Tim Shedor
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
position: relative;
margin: .5em 0;
overflow: visible;
padding: 1px;
}
pre[class*="language-"] > code {
position: relative;
z-index: 1;
border-left: 10px solid #358ccb;
box-shadow: -1px 0px 0px 0px #358ccb, 0px 0px 0px 1px #dfdfdf;
background-color: #fdfdfd;
background-image: linear-gradient(transparent 50%, rgba(69, 142, 209, 0.04) 50%);
background-size: 3em 3em;
background-origin: content-box;
background-attachment: local;
}
code[class*="language-"] {
max-height: inherit;
height: inherit;
padding: 0 1em;
display: block;
overflow: auto;
}
/* Margin bottom to accommodate shadow */
:not(pre) > code[class*="language-"],
pre[class*="language-"] {
background-color: #fdfdfd;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
margin-bottom: 1em;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
position: relative;
padding: .2em;
border-radius: 0.3em;
color: #c92c2c;
border: 1px solid rgba(0, 0, 0, 0.1);
display: inline;
white-space: normal;
}
pre[class*="language-"]:before,
pre[class*="language-"]:after {
content: '';
display: block;
position: absolute;
bottom: 0.75em;
left: 0.18em;
width: 40%;
height: 20%;
max-height: 13em;
box-shadow: 0px 13px 8px #979797;
-webkit-transform: rotate(-2deg);
-moz-transform: rotate(-2deg);
-ms-transform: rotate(-2deg);
-o-transform: rotate(-2deg);
transform: rotate(-2deg);
}
pre[class*="language-"]:after {
right: 0.75em;
left: auto;
-webkit-transform: rotate(2deg);
-moz-transform: rotate(2deg);
-ms-transform: rotate(2deg);
-o-transform: rotate(2deg);
transform: rotate(2deg);
}
.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #7D8B99;
}
.token.punctuation {
color: #5F6364;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.function-name,
.token.constant,
.token.symbol,
.token.deleted {
color: #c92c2c;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.function,
.token.builtin,
.token.inserted {
color: #2f9c0a;
}
.token.operator,
.token.entity,
.token.url,
.token.variable {
color: #a67f59;
background: rgba(255, 255, 255, 0.5);
}
.token.atrule,
.token.attr-value,
.token.keyword,
.token.class-name {
color: #1990b8;
}
.token.regex,
.token.important {
color: #e90;
}
.language-css .token.string,
.style .token.string {
color: #a67f59;
background: rgba(255, 255, 255, 0.5);
}
.token.important {
font-weight: normal;
}
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
.token.namespace {
opacity: .7;
}
@media screen and (max-width: 767px) {
pre[class*="language-"]:before,
pre[class*="language-"]:after {
bottom: 14px;
box-shadow: none;
}
}
/* Plugin styles: Line Numbers */
pre[class*="language-"].line-numbers.line-numbers {
padding-left: 0;
}
pre[class*="language-"].line-numbers.line-numbers code {
padding-left: 3.8em;
}
pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows {
left: 0;
}
/* Plugin styles: Line Highlight */
pre[class*="language-"][data-line] {
padding-top: 0;
padding-bottom: 0;
padding-left: 0;
}
pre[data-line] code {
position: relative;
padding-left: 4em;
}
pre .line-highlight {
margin-top: 0;
}

View File

@@ -0,0 +1,74 @@
{
"name": "@sentry-internal/feedback",
"version": "10.39.0",
"description": "Sentry SDK integration for user feedback",
"repository": "git://github.com/getsentry/sentry-javascript.git",
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/feedback",
"author": "Sentry",
"license": "MIT",
"engines": {
"node": ">=18"
},
"files": [
"/build/npm"
],
"main": "build/npm/cjs/index.js",
"module": "build/npm/esm/index.js",
"types": "build/npm/types/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"import": {
"types": "./build/npm/types/index.d.ts",
"default": "./build/npm/esm/index.js"
},
"require": {
"types": "./build/npm/types/index.d.ts",
"default": "./build/npm/cjs/index.js"
}
}
},
"typesVersions": {
"<5.0": {
"build/npm/types/index.d.ts": [
"build/npm/types-ts3.8/index.d.ts"
]
}
},
"publishConfig": {
"access": "public"
},
"dependencies": {
"@sentry/core": "10.39.0"
},
"devDependencies": {
"preact": "^10.19.4"
},
"scripts": {
"build": "run-p build:transpile build:types build:bundle",
"build:transpile": "rollup -c rollup.npm.config.mjs",
"build:bundle": "rollup -c rollup.bundle.config.mjs",
"build:dev": "run-p build:transpile build:types",
"build:types": "run-s build:types:core build:types:downlevel",
"build:types:core": "tsc -p tsconfig.types.json",
"build:types:downlevel": "yarn downlevel-dts build/npm/types build/npm/types-ts3.8 --to ts3.8 && yarn node ./scripts/shim-preact-export.js",
"build:watch": "run-p build:transpile:watch build:bundle:watch build:types:watch",
"build:dev:watch": "run-p build:transpile:watch build:types:watch",
"build:transpile:watch": "yarn build:transpile --watch",
"build:bundle:watch": "yarn build:bundle --watch",
"build:types:watch": "tsc -p tsconfig.types.json --watch",
"build:tarball": "npm pack",
"circularDepCheck": "madge --circular src/index.ts",
"clean": "rimraf build sentry-internal-feedback-*.tgz",
"fix": "eslint . --format stylish --fix",
"lint": "eslint . --format stylish",
"lint:es-compatibility": "es-check es2020 ./build/{bundles,npm/cjs}/*.js && es-check es2020 ./build/npm/esm/*.js --module",
"test": "vitest run",
"test:watch": "vitest --watch",
"yalc:publish": "yalc publish --push --sig"
},
"volta": {
"extends": "../../package.json"
},
"sideEffects": false
}

View File

@@ -0,0 +1,5 @@
export declare const isSameWeek: import("./types.js").FPFn2<
boolean,
string | number | Date,
string | number | Date
>;

View File

@@ -0,0 +1,83 @@
# 🌐 use-intl
> Internationalization (i18n) for React
## Features
Internationalization (i18n) is an essential part of the user experience, therefore `use-intl` gives you all the parts you need to get language nuances right.
- 🌟 **ICU message syntax**: Localize your messages with interpolation, cardinal & ordinal plurals, enum-based label selection and rich text.
- 📅 **Dates, times & numbers**: Apply appropriate formatting without worrying about server/client differences like time zones.
- ✅ **Type-safe**: Speed up development with autocompletion for message keys and catch typos early with compile-time checks.
- 💡 **Hooks-based API**: Learn a single API that can be used across your code base to turn translations into plain strings or rich text.
- 🛠️ **Standards-based**: Use the best parts of built-in JavaScript APIs and supplemental lower-level APIs from Format.JS.
## What does it look like?
```jsx
// UserProfile.tsx
import {useTranslations} from 'use-intl';
export default function UserProfile({user}) {
const t = useTranslations('UserProfile');
return (
<section>
<h1>{t('title', {firstName: user.firstName})}</h1>
<p>{t('membership', {memberSince: user.memberSince})}</p>
<p>{t('followers', {count: user.numFollowers})}</p>
</section>
);
}
```
```js
// en.json
{
"UserProfile": {
"title": "{firstName}'s profile",
"membership": "Member since {memberSince, date, short}",
"followers": "{count, plural, ↵
=0 {No followers yet} ↵
=1 {One follower} ↵
other {# followers} ↵
}"
}
}
```
## Installation
1. `npm install use-intl`
2. Add the provider
3. Use internationalization in components
```jsx
import {IntlProvider, useTranslations} from 'use-intl';
// You can get the messages from anywhere you like. You can also
// fetch them from within a component and then render the provider
// along with your app once you have the messages.
const messages = {
App: {
hello: 'Hello {firstName}!'
}
};
function Root() {
return (
<IntlProvider messages={messages} locale="en">
<App user={{firstName: 'Jane'}} />
</IntlProvider>
);
}
function App({user}) {
const t = useTranslations('App');
return <h1>{t('hello', {firstName: user.firstName})}</h1>;
}
```
Have a look at [the minimal setup example](https://github.com/amannn/next-intl/tree/main/examples/example-use-intl) to explore a working app.
### [→ Read the docs](https://next-intl.dev/docs/environments/core-library)

View File

@@ -0,0 +1 @@
{"version":3,"file":"relations.cjs","names":[],"sources":["../../../../src/rest/commands/create/relations.ts"],"sourcesContent":["import type { DirectusRelation } from '../../../schema/relation.js';\nimport type { ApplyQueryFields, NestedPartial } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateRelationOutput<Schema, Item extends object = DirectusRelation<Schema>> = ApplyQueryFields<\n\tSchema,\n\tItem,\n\t'*'\n>;\n\n/**\n * Create a new relation.\n *\n * @param item The relation to create\n * @param query Optional return data query\n *\n * @returns Returns the relation object for the created relation.\n */\nexport const createRelation =\n\t<Schema>(item: NestedPartial<DirectusRelation<Schema>>): RestCommand<CreateRelationOutput<Schema>, Schema> =>\n\t() => ({\n\t\tpath: `/relations`,\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAkBA,MAAa,EACH,QACF,CACN,KAAM,aACN,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}

View File

@@ -0,0 +1,4 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.unprotected = void 0;
exports.unprotected = Symbol();

View File

@@ -0,0 +1,143 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "caracteres", verb: "tener" },
file: { unit: "bytes", verb: "tener" },
array: { unit: "elementos", verb: "tener" },
set: { unit: "elementos", verb: "tener" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const parsedType = (data) => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "número";
}
case "object": {
if (Array.isArray(data)) {
return "arreglo";
}
if (data === null) {
return "nulo";
}
if (Object.getPrototypeOf(data) !== Object.prototype) {
return data.constructor.name;
}
}
}
return t;
};
const Nouns = {
regex: "entrada",
email: "dirección de correo electrónico",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "fecha y hora ISO",
date: "fecha ISO",
time: "hora ISO",
duration: "duración ISO",
ipv4: "dirección IPv4",
ipv6: "dirección IPv6",
cidrv4: "rango IPv4",
cidrv6: "rango IPv6",
base64: "cadena codificada en base64",
base64url: "URL codificada en base64",
json_string: "cadena JSON",
e164: "número E.164",
jwt: "JWT",
template_literal: "entrada",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Entrada inválida: se esperaba ${issue.expected}, recibido ${parsedType(issue.input)}`;
// return `Entrada inválida: se esperaba ${issue.expected}, recibido ${util.getParsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1)
return `Entrada inválida: se esperaba ${util.stringifyPrimitive(issue.values[0])}`;
return `Opción inválida: se esperaba una de ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Demasiado grande: se esperaba que ${issue.origin ?? "valor"} tuviera ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elementos"}`;
return `Demasiado grande: se esperaba que ${issue.origin ?? "valor"} fuera ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Demasiado pequeño: se esperaba que ${issue.origin} tuviera ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Demasiado pequeño: se esperaba que ${issue.origin} fuera ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with")
return `Cadena inválida: debe comenzar con "${_issue.prefix}"`;
if (_issue.format === "ends_with")
return `Cadena inválida: debe terminar en "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Cadena inválida: debe incluir "${_issue.includes}"`;
if (_issue.format === "regex")
return `Cadena inválida: debe coincidir con el patrón ${_issue.pattern}`;
return `Inválido ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Número inválido: debe ser múltiplo de ${issue.divisor}`;
case "unrecognized_keys":
return `Llave${issue.keys.length > 1 ? "s" : ""} desconocida${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Llave inválida en ${issue.origin}`;
case "invalid_union":
return "Entrada inválida";
case "invalid_element":
return `Valor inválido en ${issue.origin}`;
default:
return `Entrada inválida`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}

View File

@@ -0,0 +1,35 @@
import type { ContextOptions, DateArg } from "./types.js";
/**
* The {@link differenceInCalendarISOWeeks} function options.
*/
export interface DifferenceInCalendarISOWeeksOptions
extends ContextOptions<Date> {}
/**
* @name differenceInCalendarISOWeeks
* @category ISO Week Helpers
* @summary Get the number of calendar ISO weeks between the given dates.
*
* @description
* Get the number of calendar ISO weeks between the given dates.
*
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
*
* @param laterDate - The later date
* @param earlierDate - The earlier date
* @param options - An object with options
*
* @returns The number of calendar ISO weeks
*
* @example
* // How many calendar ISO weeks are between 6 July 2014 and 21 July 2014?
* const result = differenceInCalendarISOWeeks(
* new Date(2014, 6, 21),
* new Date(2014, 6, 6),
* );
* //=> 3
*/
export declare function differenceInCalendarISOWeeks(
laterDate: DateArg<Date> & {},
earlierDate: DateArg<Date> & {},
options?: DifferenceInCalendarISOWeeksOptions | undefined,
): number;

View File

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

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