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

This commit is contained in:
2026-02-24 16:04:21 +01:00
parent 915eb61613
commit 5397309103
43805 changed files with 4324295 additions and 3 deletions
@@ -0,0 +1,9 @@
import type { HandlerDataUnhandledRejection } from '../types-hoist/instrument';
/**
* Add an instrumentation handler for when an unhandled promise rejection is captured.
*
* Use at your own risk, this might break without changelog notice, only used internally.
* @hidden
*/
export declare function addGlobalUnhandledRejectionInstrumentationHandler(handler: (data: HandlerDataUnhandledRejection) => void): void;
//# sourceMappingURL=globalUnhandledRejection.d.ts.map
@@ -0,0 +1,101 @@
#ifndef PROMISE_RUNNER_H
#define PROMISE_RUNNER_H
#include <node_api.h>
#include "wasm/include.h"
#include <napi.h>
using namespace Napi;
class PromiseRunner {
public:
const Env env;
Promise::Deferred deferred;
PromiseRunner(Env env) : env(env), deferred(Promise::Deferred::New(env)) {
napi_status status = napi_create_async_work(env, nullptr, env.Undefined(),
onExecute, onWorkComplete, this, &work);
if (status != napi_ok) {
work = nullptr;
const napi_extended_error_info *error_info = 0;
napi_get_last_error_info(env, &error_info);
if (error_info->error_message) {
Error::New(env, error_info->error_message).ThrowAsJavaScriptException();
} else {
Error::New(env).ThrowAsJavaScriptException();
}
}
}
virtual ~PromiseRunner() {}
Value queue() {
if (work) {
napi_status status = napi_queue_async_work(env, work);
if (status != napi_ok) {
onError(Error::New(env));
}
}
return deferred.Promise();
}
private:
napi_async_work work;
std::string error;
static void onExecute(napi_env env, void *this_pointer) {
PromiseRunner* self = (PromiseRunner*) this_pointer;
try {
self->execute();
} catch (std::exception &err) {
self->error = err.what();
}
}
static void onWorkComplete(napi_env env, napi_status status, void *this_pointer) {
PromiseRunner* self = (PromiseRunner*) this_pointer;
if (status != napi_cancelled) {
HandleScope scope(self->env);
if (status == napi_ok) {
status = napi_delete_async_work(self->env, self->work);
if (status == napi_ok) {
if (self->error.size() == 0) {
self->onOK();
} else {
self->onError(Error::New(self->env, self->error));
}
delete self;
return;
}
}
}
// fallthrough for error handling
const napi_extended_error_info *error_info = 0;
napi_get_last_error_info(env, &error_info);
if (error_info->error_message){
self->onError(Error::New(env, error_info->error_message));
} else {
self->onError(Error::New(env));
}
delete self;
}
virtual void execute() {}
virtual Value getResult() {
return env.Null();
}
void onOK() {
HandleScope scope(env);
Value result = getResult();
deferred.Resolve(result);
}
void onError(const Error &e) {
deferred.Reject(e.Value());
}
};
#endif
@@ -0,0 +1 @@
{"version":3,"file":"crop.js","sources":["../../../src/icons/crop.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Crop\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNiAydjE0YTIgMiAwIDAgMCAyIDJoMTQiIC8+CiAgPHBhdGggZD0iTTE4IDIyVjhhMiAyIDAgMCAwLTItMkgyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/crop\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 Crop = createLucideIcon('Crop', [\n ['path', { d: 'M6 2v14a2 2 0 0 0 2 2h14', key: 'ron5a4' }],\n ['path', { d: 'M18 22V8a2 2 0 0 0-2-2H2', key: '7s9ehn' }],\n]);\n\nexport default Crop;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,iBAAiB,MAAQ,CAAA,CAAA,CAAA;AAAA,CAAA,CACpC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/fields/JSON/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAaxE,OAAO,cAAc,CAAA;AA4KrB,eAAO,MAAM,SAAS;;;;;+EAAoC,CAAA"}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015 Javier Blanco
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,35 @@
'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React, { createContext, use } from 'react';
const Context = /*#__PURE__*/createContext({
isCollapsed: undefined,
isVisible: undefined,
isWithinCollapsible: undefined,
toggle: () => {}
});
export const CollapsibleProvider = ({
children,
isCollapsed,
isWithinCollapsible = true,
toggle
}) => {
const {
isCollapsed: parentIsCollapsed,
isVisible
} = useCollapsible();
const contextValue = React.useMemo(() => {
return {
isCollapsed,
isVisible: isVisible && !parentIsCollapsed,
isWithinCollapsible,
toggle
};
}, [isCollapsed, isWithinCollapsible, toggle, parentIsCollapsed, isVisible]);
return /*#__PURE__*/_jsx(Context, {
value: contextValue,
children: children
});
};
export const useCollapsible = () => use(Context);
//# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D zC","132":"E F A B"},B:{"1":"0 1 2 3 4 5 6 7 8 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","132":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 6 7 8 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 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","132":"9 0C VC 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 4C 5C"},D:{"1":"0 1 2 3 4 5 6 7 8 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","132":"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 wB xB yB zB 0B 1B 2B 3B 4B 5B WC 6B"},E:{"1":"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","2":"J bB 6C bC","132":"K D E F A B C L M G 7C 8C 9C AD cC PC QC BD CD DD dC eC RC ED"},F:{"1":"0 1 2 3 4 5 6 7 8 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","2":"F JD KD LD MD","16":"B PC xC","132":"9 C 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 ND QC"},G:{"1":"SC fC gC hC iC jC jD TC kC lC mC nC oC kD UC pC qC rC sC lD tC uC vC wC","16":"bC OD yC","132":"E PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD eD fD gD hD dC eC RC iD"},H:{"2":"mD"},I:{"1":"I","16":"nD oD","132":"VC J pD qD yC rD sD"},J:{"132":"D A"},K:{"1":"H","132":"A B C PC xC QC"},L:{"1":"I"},M:{"1":"OC"},N:{"132":"A B"},O:{"1":"RC"},P:{"1":"9 AB BB CB DB EB FB GB HB IB wD xD cC yD zD 0D 1D 2D SC TC UC 3D","132":"J tD uD vD"},Q:{"1":"4D"},R:{"1":"5D"},S:{"1":"6D 7D"}},B:5,C:"scrollIntoView",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"shares.js","names":[],"sources":["../../../../src/rest/commands/update/shares.ts"],"sourcesContent":["import type { DirectusShare } from '../../../schema/share.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type UpdateShareOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusShare<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Update multiple existing shares.\n * @param keys\n * @param item\n * @param query\n * @returns Returns the share objects for the updated shares.\n * @throws Will throw if keys is empty\n */\nexport const updateShares =\n\t<Schema, const TQuery extends Query<Schema, DirectusShare<Schema>>>(\n\t\tkeys: DirectusShare<Schema>['id'][],\n\t\titem: NestedPartial<DirectusShare<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateShareOutput<Schema, TQuery>[], Schema> =>\n\t() => {\n\t\tthrowIfEmpty(keys, 'Keys cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/shares`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify({ keys, data: item }),\n\t\t\tmethod: 'PATCH',\n\t\t};\n\t};\n\n/**\n * Update multiple shares as batch.\n * @param items\n * @param query\n * @returns Returns the share objects for the updated shares.\n */\nexport const updateSharesBatch =\n\t<Schema, const TQuery extends Query<Schema, DirectusShare<Schema>>>(\n\t\titems: NestedPartial<DirectusShare<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateShareOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/shares`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'PATCH',\n\t});\n\n/**\n * Update an existing share.\n * @param key\n * @param item\n * @param query\n * @returns Returns the share object for the updated share.\n * @throws Will throw if key is empty\n */\nexport const updateShare =\n\t<Schema, const TQuery extends Query<Schema, DirectusShare<Schema>>>(\n\t\tkey: DirectusShare<Schema>['id'],\n\t\titem: NestedPartial<DirectusShare<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<UpdateShareOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(key, 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/shares/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tbody: JSON.stringify(item),\n\t\t\tmethod: 'PATCH',\n\t\t};\n\t};\n"],"mappings":"6DAmBA,MAAa,GAEX,EACA,EACA,SAGA,EAAa,EAAM,uBAAuB,CAEnC,CACN,KAAM,UACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,CAAE,OAAM,KAAM,EAAM,CAAC,CAC1C,OAAQ,QACR,EASU,GAEX,EACA,SAEM,CACN,KAAM,UACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,QACR,EAUW,GAEX,EACA,EACA,SAGA,EAAa,EAAK,sBAAsB,CAEjC,CACN,KAAM,WAAW,IACjB,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,QACR"}
@@ -0,0 +1,10 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const _range_1 = __importDefault(require("./_range"));
const getDef = (0, _range_1.default)("exclusiveRange");
exports.default = getDef;
module.exports = getDef;
//# sourceMappingURL=exclusiveRange.js.map
@@ -0,0 +1 @@
module.exports={C:{"48":0.0029,"56":0.0029,"60":0.0029,"72":0.0029,"102":0.0029,"111":0.0087,"115":0.11604,"127":0.0087,"128":0.0116,"135":0.0029,"140":0.02031,"141":0.01451,"142":0.01741,"143":0.0029,"144":0.0058,"145":0.2785,"146":0.42355,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 57 58 59 61 62 63 64 65 66 67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 103 104 105 106 107 108 109 110 112 113 114 116 117 118 119 120 121 122 123 124 125 126 129 130 131 132 133 134 136 137 138 139 147 148 149 3.5 3.6"},D:{"37":0.04642,"43":0.0029,"50":0.0029,"55":0.0029,"57":0.0029,"61":0.0029,"63":0.0029,"67":0.0029,"68":0.0058,"70":0.01451,"71":0.0116,"78":0.02901,"79":0.0116,"83":0.0029,"84":0.0029,"85":0.0029,"86":0.0029,"87":0.0029,"88":0.0029,"90":0.0058,"91":0.01451,"92":0.0087,"99":0.01741,"103":0.0029,"104":0.0029,"106":0.0029,"108":0.0058,"109":0.09863,"110":0.0029,"111":0.0058,"114":0.0087,"116":0.0116,"118":0.0029,"119":0.0029,"120":0.0029,"122":0.0087,"123":0.0116,"124":0.0029,"125":0.0029,"126":0.02611,"127":0.01741,"128":0.0029,"129":0.0029,"130":0.0058,"131":0.02611,"132":0.0029,"133":0.0058,"134":0.0058,"135":0.0058,"136":0.02321,"137":0.02031,"138":0.03771,"139":0.02611,"140":0.03771,"141":0.06382,"142":0.88771,"143":0.96603,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 39 40 41 42 44 45 46 47 48 49 51 52 53 54 56 58 59 60 62 64 65 66 69 72 73 74 75 76 77 80 81 89 93 94 95 96 97 98 100 101 102 105 107 112 113 115 117 121 144 145 146"},F:{"79":0.0058,"83":0.0029,"86":0.0058,"88":0.0029,"89":0.01741,"90":0.02031,"91":0.02901,"92":0.12764,"93":0.8616,"94":0.02031,"95":0.0058,"122":0.0029,"124":0.06092,"125":0.05802,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 84 85 87 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 123 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"14":0.0029,"18":0.0087,"84":0.0029,"89":0.0029,"90":0.0029,"92":0.03191,"100":0.0029,"109":0.0029,"112":0.0029,"122":0.0029,"125":0.0029,"129":0.0029,"132":0.0087,"133":0.0087,"137":0.0029,"138":0.0029,"139":0.0029,"140":0.02901,"141":0.0116,"142":0.19147,"143":0.53378,_:"12 13 15 16 17 79 80 81 83 85 86 87 88 91 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 113 114 115 116 117 118 119 120 121 123 124 126 127 128 130 131 134 135 136"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 16.6 17.0 17.2 17.3 17.4 18.0 18.1 18.2 18.3 18.4 18.5-18.6","5.1":0.01451,"15.6":0.03191,"17.1":0.0029,"17.5":0.0029,"17.6":0.0029,"26.0":0.0029,"26.1":0.0087,"26.2":0.0058,"26.3":0.0029},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00028,"5.0-5.1":0,"6.0-6.1":0.00056,"7.0-7.1":0.00042,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00112,"10.0-10.2":0.00014,"10.3":0.00196,"11.0-11.2":0.02405,"11.3-11.4":0.0007,"12.0-12.1":0.00056,"12.2-12.5":0.00629,"13.0-13.1":0.00014,"13.2":0.00098,"13.3":0.00028,"13.4-13.7":0.00098,"14.0-14.4":0.00196,"14.5-14.8":0.0021,"15.0-15.1":0.00224,"15.2-15.3":0.00168,"15.4":0.00182,"15.5":0.00196,"15.6-15.8":0.03035,"16.0":0.0035,"16.1":0.00671,"16.2":0.0035,"16.3":0.00629,"16.4":0.00154,"16.5":0.00266,"16.6-16.7":0.03944,"17.0":0.00224,"17.1":0.00364,"17.2":0.00266,"17.3":0.00406,"17.4":0.00685,"17.5":0.01343,"17.6-17.7":0.03105,"18.0":0.00699,"18.1":0.01454,"18.2":0.00769,"18.3":0.02503,"18.4":0.01287,"18.5-18.7":0.92385,"26.0":0.01804,"26.1":0.15006,"26.2":0.02853,"26.3":0.00126},P:{"4":0.18125,"20":0.02014,"21":0.07049,"22":0.06042,"23":0.03021,"24":0.1007,"25":0.26181,"26":0.22153,"27":0.34237,"28":0.57397,"29":1.05731,_:"5.0-5.4 8.2 9.2 10.1 12.0 15.0","6.2-6.4":0.02014,"7.2-7.4":0.16111,"11.1-11.2":0.02014,"13.0":0.02014,"14.0":0.02014,"16.0":0.07049,"17.0":0.01007,"18.0":0.01007,"19.0":0.02014},I:{"0":0.28351,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00006,"4.4":0,"4.4.3-4.4.4":0.00023},A:{"11":0.03771,_:"6 7 8 9 10 5.5"},K:{"0":4.96265,_:"10 11 12 11.1 11.5 12.1"},N:{_:"10 11"},S:{"2.5":0.0071,_:"3.0-3.1"},J:{_:"7 10"},Q:{_:"14.9"},O:{"0":0.25556},H:{"0":0.39},L:{"0":83.07424},R:{_:"0"},M:{"0":0.27686}};
@@ -0,0 +1,12 @@
import { type NumberFormatInternal, type NumberFormatLocaleInternalData, type NumberFormatOptions } from "../types/number.js";
/**
* https://tc39.es/ecma402/#sec-initializenumberformat
*/
export declare function InitializeNumberFormat(nf: Intl.NumberFormat, locales: string | ReadonlyArray<string> | undefined, opts: NumberFormatOptions | undefined, { getInternalSlots, localeData, availableLocales, numberingSystemNames, getDefaultLocale, currencyDigitsData }: {
getInternalSlots(nf: Intl.NumberFormat): NumberFormatInternal;
localeData: Record<string, NumberFormatLocaleInternalData | undefined>;
availableLocales: Set<string>;
numberingSystemNames: ReadonlyArray<string>;
getDefaultLocale(): string;
currencyDigitsData: Record<string, number>;
}): Intl.NumberFormat;
@@ -0,0 +1,23 @@
Prism.languages.birb = Prism.languages.extend('clike', {
'string': {
pattern: /r?("|')(?:\\.|(?!\1)[^\\])*\1/,
greedy: true
},
'class-name': [
/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,
// matches variable and function return types (parameters as well).
/\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/
],
'keyword': /\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,
'operator': /\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,
'variable': /\b[a-z_]\w*\b/,
});
Prism.languages.insertBefore('birb', 'function', {
'metadata': {
pattern: /<\w+>/,
greedy: true,
alias: 'symbol'
}
});
@@ -0,0 +1,44 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.js";
// Source: https://www.unicode.org/cldr/charts/32/summary/te.html
// CLDR #1807 - #1811
const dateFormats = {
full: "d, MMMM y, EEEE",
long: "d MMMM, y",
medium: "d MMM, y",
short: "dd-MM-yy",
};
// CLDR #1807 - #1811
const timeFormats = {
full: "h:mm:ss a zzzz",
long: "h:mm:ss a z",
medium: "h:mm:ss a",
short: "h:mm a",
};
// CLDR #1815 - #1818
const dateTimeFormats = {
full: "{{date}} {{time}}'కి'",
long: "{{date}} {{time}}'కి'",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};
@@ -0,0 +1,76 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const instrumentation = require('@opentelemetry/instrumentation');
const core = require('@sentry/core');
const supportedVersions = ['>=0.0.0 <2.0.0'];
/**
* Sentry LangGraph instrumentation using OpenTelemetry.
*/
class SentryLangGraphInstrumentation extends instrumentation.InstrumentationBase {
constructor(config = {}) {
super('@sentry/instrumentation-langgraph', core.SDK_VERSION, config);
}
/**
* Initializes the instrumentation by defining the modules to be patched.
*/
init() {
const module = new instrumentation.InstrumentationNodeModuleDefinition(
'@langchain/langgraph',
supportedVersions,
this._patch.bind(this),
exports$1 => exports$1,
[
new instrumentation.InstrumentationNodeModuleFile(
/**
* In CJS, LangGraph packages re-export from dist/index.cjs files.
* Patching only the root module sometimes misses the real implementation or
* gets overwritten when that file is loaded. We add a file-level patch so that
* _patch runs again on the concrete implementation
*/
'@langchain/langgraph/dist/index.cjs',
supportedVersions,
this._patch.bind(this),
exports$1 => exports$1,
),
],
);
return module;
}
/**
* Core patch logic applying instrumentation to the LangGraph module.
*/
_patch(exports$1) {
const client = core.getClient();
const defaultPii = Boolean(client?.getOptions().sendDefaultPii);
const config = this.getConfig();
const recordInputs = config.recordInputs ?? defaultPii;
const recordOutputs = config.recordOutputs ?? defaultPii;
const options = {
recordInputs,
recordOutputs,
};
// Patch StateGraph.compile to instrument both compile() and invoke()
if (exports$1.StateGraph && typeof exports$1.StateGraph === 'function') {
const StateGraph = exports$1.StateGraph
;
StateGraph.prototype.compile = core.instrumentStateGraphCompile(
StateGraph.prototype.compile ,
options,
);
}
return exports$1;
}
}
exports.SentryLangGraphInstrumentation = SentryLangGraphInstrumentation;
//# sourceMappingURL=instrumentation.js.map
@@ -0,0 +1,104 @@
'use strict'
const vendors = require('./vendors.json')
const env = process.env
// Used for testing only
Object.defineProperty(exports, '_vendors', {
value: vendors.map(function (v) {
return v.constant
})
})
exports.name = null
exports.isPR = null
exports.id = null
if (env.CI !== 'false') {
vendors.forEach(function (vendor) {
const envs = Array.isArray(vendor.env) ? vendor.env : [vendor.env]
const isCI = envs.every(function (obj) {
return checkEnv(obj)
})
exports[vendor.constant] = isCI
if (!isCI) {
return
}
exports.name = vendor.name
exports.isPR = checkPR(vendor)
exports.id = vendor.constant
})
}
exports.isCI = !!(
env.CI !== 'false' && // Bypass all checks if CI env is explicitly set to 'false'
(env.BUILD_ID || // Jenkins, Cloudbees
env.BUILD_NUMBER || // Jenkins, TeamCity
env.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari, Cloudflare Pages/Workers
env.CI_APP_ID || // Appflow
env.CI_BUILD_ID || // Appflow
env.CI_BUILD_NUMBER || // Appflow
env.CI_NAME || // Codeship and others
env.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
env.RUN_ID || // TaskCluster, dsari
exports.name ||
false)
)
function checkEnv (obj) {
// "env": "CIRRUS"
if (typeof obj === 'string') return !!env[obj]
// "env": { "env": "NODE", "includes": "/app/.heroku/node/bin/node" }
if ('env' in obj) {
// Currently there are no other types, uncomment when there are
// if ('includes' in obj) {
return env[obj.env] && env[obj.env].includes(obj.includes)
// }
}
if ('any' in obj) {
return obj.any.some(function (k) {
return !!env[k]
})
}
return Object.keys(obj).every(function (k) {
return env[k] === obj[k]
})
}
function checkPR (vendor) {
switch (typeof vendor.pr) {
case 'string':
// "pr": "CIRRUS_PR"
return !!env[vendor.pr]
case 'object':
if ('env' in vendor.pr) {
if ('any' in vendor.pr) {
// "pr": { "env": "CODEBUILD_WEBHOOK_EVENT", "any": ["PULL_REQUEST_CREATED", "PULL_REQUEST_UPDATED"] }
return vendor.pr.any.some(function (key) {
return env[vendor.pr.env] === key
})
} else {
// "pr": { "env": "BUILDKITE_PULL_REQUEST", "ne": "false" }
return vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne
}
} else if ('any' in vendor.pr) {
// "pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
return vendor.pr.any.some(function (key) {
return !!env[key]
})
} else {
// "pr": { "DRONE_BUILD_EVENT": "pull_request" }
return checkEnv(vendor.pr)
}
default:
// PR detection not supported for this vendor
return null
}
}
@@ -0,0 +1,17 @@
import { Context, TracerProvider } from '@opentelemetry/api';
import type { EngineSpan, ExtendedSpanOptions, SpanCallback, TracingHelper } from '@prisma/instrumentation-contract';
type Options = {
tracerProvider: TracerProvider;
ignoreSpanTypes: (string | RegExp)[];
};
export declare class ActiveTracingHelper implements TracingHelper {
private tracerProvider;
private ignoreSpanTypes;
constructor({ tracerProvider, ignoreSpanTypes }: Options);
isEnabled(): boolean;
getTraceParent(context?: Context | undefined): string;
dispatchEngineSpans(spans: EngineSpan[]): void;
getActiveContext(): Context | undefined;
runInChildSpan<R>(options: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
}
export {};
@@ -0,0 +1 @@
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../src/core/integration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,wBAAwB,EAExB,WAAW,EACX,aAAa,EACd,MAAM,cAAc,CAAC;AA0BtB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIzD,OAAO,KAAK,EAAiC,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAE5F,KAAK,WAAW,GAAG,MAAM,IAAI,CAAC;AAE9B;;GAEG;AAEH,KAAK,cAAc,GACf;IACE,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,mBAAmB,EAAE,MAAM,aAAa,CAAC;IACzC,wBAAwB,EAAE,MAAM,aAAa,CAAC;CAC/C,GACD;IAGE,mBAAmB,EAAE,CACnB,IAAI,EAAE,0BAA0B,GAAG,+BAA+B,EAClE,WAAW,CAAC,EAAE,MAAM,KACjB,OAAO,CAAC,aAAa,CAAC,CAAC;IAC5B,mBAAmB,CAAC,EAAE,KAAK,CAAC;IAC5B,wBAAwB,CAAC,EAAE,KAAK,CAAC;CAClC,CAAC;AAEN,eAAO,MAAM,wBAAwB,GAAI,yEAItC,cAAc,KAAG,aAAa,CAC/B,WAAW,GAAG;IACZ,QAAQ,CAAC,EAAE,EAAE,OAAO,GAAG,MAAM,EAAE,eAAe,CAAC,EAAE,6BAA6B,GAAG,WAAW,CAAC;IAC7F,UAAU,CACR,eAAe,CAAC,EAAE,6BAA6B,GAC9C,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;IACjE,YAAY,CAAC,eAAe,CAAC,EAAE,6BAA6B,GAAG,cAAc,CAAC;IAC9E,MAAM,IAAI,IAAI,CAAC;CAChB,CAmSF,CAAC"}
@@ -0,0 +1,27 @@
import { hex } from './hex.mjs';
import { hsla } from './hsla.mjs';
import { rgba } from './rgba.mjs';
const color = {
test: (v) => rgba.test(v) || hex.test(v) || hsla.test(v),
parse: (v) => {
if (rgba.test(v)) {
return rgba.parse(v);
}
else if (hsla.test(v)) {
return hsla.parse(v);
}
else {
return hex.parse(v);
}
},
transform: (v) => {
return typeof v === "string"
? v
: v.hasOwnProperty("red")
? rgba.transform(v)
: hsla.transform(v);
},
};
export { color };
@@ -0,0 +1,13 @@
import { JOSENotSupported } from '../util/errors.js';
export default function hmacDigest(alg) {
switch (alg) {
case 'HS256':
return 'sha256';
case 'HS384':
return 'sha384';
case 'HS512':
return 'sha512';
default:
throw new JOSENotSupported(`alg ${alg} is not supported either by JOSE or your javascript runtime`);
}
}
@@ -0,0 +1,10 @@
const { Writable } = require('node:stream')
module.exports = () => {
return new Writable({
autoDestroy: true,
write (chunk, enc, cb) {
cb()
}
})
}
@@ -0,0 +1,13 @@
type GeneratedColumn = number;
type SourcesIndex = number;
type SourceLine = number;
type SourceColumn = number;
type NamesIndex = number;
export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
export declare const COLUMN = 0;
export declare const SOURCES_INDEX = 1;
export declare const SOURCE_LINE = 2;
export declare const SOURCE_COLUMN = 3;
export declare const NAMES_INDEX = 4;
export {};
//# sourceMappingURL=sourcemap-segment.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"comments.js","names":[],"sources":["../../../../src/rest/commands/create/comments.ts"],"sourcesContent":["import type { DirectusComment } from '../../../schema/comment.js';\nimport type { ApplyQueryFields, NestedPartial, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\n\nexport type CreateCommentOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusComment<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * Create multiple new comments.\n *\n * @param items The comments to create\n * @param query Optional return data query\n *\n * @returns Returns the comment object for the created comment.\n */\nexport const createComments =\n\t<Schema, const TQuery extends Query<Schema, DirectusComment<Schema>>>(\n\t\titems: NestedPartial<DirectusComment<Schema>>[],\n\t\tquery?: TQuery,\n\t): RestCommand<CreateCommentOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/comments`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(items),\n\t\tmethod: 'POST',\n\t});\n\n/**\n * Create a new comment.\n *\n * @param item The comment to create\n * @param query Optional return data query\n *\n * @returns Returns the comment object for the created comment.\n */\nexport const createComment =\n\t<Schema, const TQuery extends Query<Schema, DirectusComment<Schema>>>(\n\t\titem: NestedPartial<DirectusComment<Schema>>,\n\t\tquery?: TQuery,\n\t): RestCommand<CreateCommentOutput<Schema, TQuery>, Schema> =>\n\t() => ({\n\t\tpath: `/comments`,\n\t\tparams: query ?? {},\n\t\tbody: JSON.stringify(item),\n\t\tmethod: 'POST',\n\t});\n"],"mappings":"AAkBA,MAAa,GAEX,EACA,SAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAM,CAC3B,OAAQ,OACR,EAUW,GAEX,EACA,SAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,KAAM,KAAK,UAAU,EAAK,CAC1B,OAAQ,OACR"}
@@ -0,0 +1,14 @@
import { IPropertyListDescriptor } from '../IPropertyDescriptor';
import { Color } from '../types/color';
import { Length } from '../types/length';
export declare type BoxShadow = BoxShadowItem[];
interface BoxShadowItem {
inset: boolean;
color: Color;
offsetX: Length;
offsetY: Length;
blur: Length;
spread: Length;
}
export declare const boxShadow: IPropertyListDescriptor<BoxShadow>;
export {};
@@ -0,0 +1,205 @@
Prism.languages.rest = {
'table': [
{
pattern: /(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,
lookbehind: true,
inside: {
'punctuation': /\||(?:\+[=-]+)+\+/
}
},
{
pattern: /(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,
lookbehind: true,
inside: {
'punctuation': /[=-]+/
}
}
],
// Directive-like patterns
'substitution-def': {
pattern: /(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,
lookbehind: true,
inside: {
'substitution': {
pattern: /^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,
alias: 'attr-value',
inside: {
'punctuation': /^\||\|$/
}
},
'directive': {
pattern: /( )(?! )[^:]+::/,
lookbehind: true,
alias: 'function',
inside: {
'punctuation': /::$/
}
}
}
},
'link-target': [
{
pattern: /(^[\t ]*\.\. )\[[^\]]+\]/m,
lookbehind: true,
alias: 'string',
inside: {
'punctuation': /^\[|\]$/
}
},
{
pattern: /(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,
lookbehind: true,
alias: 'string',
inside: {
'punctuation': /^_|:$/
}
}
],
'directive': {
pattern: /(^[\t ]*\.\. )[^:]+::/m,
lookbehind: true,
alias: 'function',
inside: {
'punctuation': /::$/
}
},
'comment': {
// The two alternatives try to prevent highlighting of blank comments
pattern: /(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,
lookbehind: true
},
'title': [
// Overlined and underlined
{
pattern: /^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,
inside: {
'punctuation': /^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,
'important': /.+/
}
},
// Underlined only
{
pattern: /(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,
lookbehind: true,
inside: {
'punctuation': /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,
'important': /.+/
}
}
],
'hr': {
pattern: /((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,
lookbehind: true,
alias: 'punctuation'
},
'field': {
pattern: /(^[\t ]*):[^:\r\n]+:(?= )/m,
lookbehind: true,
alias: 'attr-name'
},
'command-line-option': {
pattern: /(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,
lookbehind: true,
alias: 'symbol'
},
'literal-block': {
pattern: /::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,
inside: {
'literal-block-punctuation': {
pattern: /^::/,
alias: 'punctuation'
}
}
},
'quoted-literal-block': {
pattern: /::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,
inside: {
'literal-block-punctuation': {
pattern: /^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,
alias: 'punctuation'
}
}
},
'list-bullet': {
pattern: /(^[\t ]*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,
lookbehind: true,
alias: 'punctuation'
},
'doctest-block': {
pattern: /(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,
lookbehind: true,
inside: {
'punctuation': /^>>>/
}
},
'inline': [
{
pattern: /(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,
lookbehind: true,
inside: {
'bold': {
pattern: /(^\*\*).+(?=\*\*$)/,
lookbehind: true
},
'italic': {
pattern: /(^\*).+(?=\*$)/,
lookbehind: true
},
'inline-literal': {
pattern: /(^``).+(?=``$)/,
lookbehind: true,
alias: 'symbol'
},
'role': {
pattern: /^:[^:]+:|:[^:]+:$/,
alias: 'function',
inside: {
'punctuation': /^:|:$/
}
},
'interpreted-text': {
pattern: /(^`).+(?=`$)/,
lookbehind: true,
alias: 'attr-value'
},
'substitution': {
pattern: /(^\|).+(?=\|$)/,
lookbehind: true,
alias: 'attr-value'
},
'punctuation': /\*\*?|``?|\|/
}
}
],
'link': [
{
pattern: /\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,
alias: 'string',
inside: {
'punctuation': /^\[|\]_$/
}
},
{
pattern: /(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,
alias: 'string',
inside: {
'punctuation': /^_?`|`$|`?_?_$/
}
}
],
// Line block start,
// quote attribution,
// explicit markup start,
// and anonymous hyperlink target shortcut (__)
'punctuation': {
pattern: /(^[\t ]*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,
lookbehind: true
}
};
@@ -0,0 +1,19 @@
var arrayMap = require('./_arrayMap');
/**
* The base implementation of `_.values` and `_.valuesIn` which creates an
* array of `object` property values corresponding to the property names
* of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the array of property values.
*/
function baseValues(object, props) {
return arrayMap(props, function(key) {
return object[key];
});
}
module.exports = baseValues;
@@ -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 LogIn = createLucideIcon("LogIn", [
["path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4", key: "u53s6r" }],
["polyline", { points: "10 17 15 12 10 7", key: "1ail0h" }],
["line", { x1: "15", x2: "3", y1: "12", y2: "12", key: "v6grx8" }]
]);
export { LogIn as default };
//# sourceMappingURL=log-in.js.map
@@ -0,0 +1 @@
export declare function useInterval(): readonly [(listener: Function, duration: number) => void, () => void];
@@ -0,0 +1,60 @@
"use strict";
exports.buildMatchFn = buildMatchFn;
function buildMatchFn(args) {
return (string, options = {}) => {
const width = options.width;
const matchPattern =
(width && args.matchPatterns[width]) ||
args.matchPatterns[args.defaultMatchWidth];
const matchResult = string.match(matchPattern);
if (!matchResult) {
return null;
}
const matchedString = matchResult[0];
const parsePatterns =
(width && args.parsePatterns[width]) ||
args.parsePatterns[args.defaultParseWidth];
const key = Array.isArray(parsePatterns)
? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))
: // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
findKey(parsePatterns, (pattern) => pattern.test(matchedString));
let value;
value = args.valueCallback ? args.valueCallback(key) : key;
value = options.valueCallback
? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type
options.valueCallback(value)
: value;
const rest = string.slice(matchedString.length);
return { value, rest };
};
}
function findKey(object, predicate) {
for (const key in object) {
if (
Object.prototype.hasOwnProperty.call(object, key) &&
predicate(object[key])
) {
return key;
}
}
return undefined;
}
function findIndex(array, predicate) {
for (let key = 0; key < array.length; key++) {
if (predicate(array[key])) {
return key;
}
}
return undefined;
}
@@ -0,0 +1,9 @@
// This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
import { lastDayOfISOWeekYear as fn } from "../lastDayOfISOWeekYear.js";
import { convertToFP } from "./_lib/convertToFP.js";
export const lastDayOfISOWeekYear = convertToFP(fn, 1);
// Fallback for modularized imports:
export default lastDayOfISOWeekYear;
@@ -0,0 +1 @@
{"version":3,"file":"resetReplayIdOnDynamicSamplingContext.d.ts","sourceRoot":"","sources":["../../../../src/util/resetReplayIdOnDynamicSamplingContext.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAa5D"}
@@ -0,0 +1 @@
{"version":3,"names":["_temporalUndefined","require","_tdz","_temporalRef","val","name","undef","err"],"sources":["../../src/helpers/temporalRef.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport undef from \"./temporalUndefined.ts\";\nimport err from \"./tdz.ts\";\n\nexport default function _temporalRef<T>(val: T, name: string) {\n return val === undef ? err(name) : val;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,kBAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AAEe,SAASE,YAAYA,CAAIC,GAAM,EAAEC,IAAY,EAAE;EAC5D,OAAOD,GAAG,KAAKE,0BAAK,GAAG,IAAAC,YAAG,EAACF,IAAI,CAAC,GAAGD,GAAG;AACxC","ignoreList":[]}
@@ -0,0 +1,21 @@
import type { ExtractorMessage } from '../types.js';
type StrictExtractedMessage = ExtractorMessage & {
references: NonNullable<ExtractorMessage['references']>;
};
export default class MessageExtractor {
private isDevelopment;
private projectRoot;
private sourceMap;
private compileCache;
constructor(opts: {
isDevelopment?: boolean;
projectRoot?: string;
sourceMap?: boolean;
});
extract(absoluteFilePath: string, source: string): Promise<{
messages: Array<StrictExtractedMessage>;
code: string;
map?: string;
}>;
}
export {};
@@ -0,0 +1,48 @@
import { getRoundingMethod } from "./_lib/getRoundingMethod.mjs";
import { millisecondsInMinute } from "./constants.mjs";
import { differenceInMilliseconds } from "./differenceInMilliseconds.mjs";
/**
* The {@link differenceInMinutes} function options.
*/
/**
* @name differenceInMinutes
* @category Minute Helpers
* @summary Get the number of minutes between the given dates.
*
* @description
* Get the signed number of full (rounded towards 0) minutes between the given dates.
*
* @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 dateLeft - The later date
* @param dateRight - The earlier date
* @param options - An object with options.
*
* @returns The number of minutes
*
* @example
* // How many minutes are between 2 July 2014 12:07:59 and 2 July 2014 12:20:00?
* const result = differenceInMinutes(
* new Date(2014, 6, 2, 12, 20, 0),
* new Date(2014, 6, 2, 12, 7, 59)
* )
* //=> 12
*
* @example
* // How many minutes are between 10:01:59 and 10:00:00
* const result = differenceInMinutes(
* new Date(2000, 0, 1, 10, 0, 0),
* new Date(2000, 0, 1, 10, 1, 59)
* )
* //=> -1
*/
export function differenceInMinutes(dateLeft, dateRight, options) {
const diff =
differenceInMilliseconds(dateLeft, dateRight) / millisecondsInMinute;
return getRoundingMethod(options?.roundingMethod)(diff);
}
// Fallback for modularized imports:
export default differenceInMinutes;
@@ -0,0 +1,10 @@
function _regeneratorKeys(e) {
var n = Object(e),
r = [];
for (var t in n) r.unshift(t);
return function e() {
for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e;
return e.done = !0, e;
};
}
module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,83 @@
import { entityKind } from "../../entity.cjs";
import type { MySqlDialect } from "../dialect.cjs";
import type { AnyMySqlQueryResultHKT, MySqlPreparedQueryConfig, MySqlQueryResultHKT, MySqlQueryResultKind, MySqlSession, PreparedQueryHKTBase, PreparedQueryKind } from "../session.cjs";
import type { MySqlTable } from "../table.cjs";
import { QueryPromise } from "../../query-promise.cjs";
import type { Placeholder, Query, SQL, SQLWrapper } from "../../sql/sql.cjs";
import type { Subquery } from "../../subquery.cjs";
import type { ValueOrArray } from "../../utils.cjs";
import type { MySqlColumn } from "../columns/common.cjs";
import type { SelectedFieldsOrdered } from "./select.types.cjs";
export type MySqlDeleteWithout<T extends AnyMySqlDeleteBase, TDynamic extends boolean, K extends keyof T & string> = TDynamic extends true ? T : Omit<MySqlDeleteBase<T['_']['table'], T['_']['queryResult'], T['_']['preparedQueryHKT'], TDynamic, T['_']['excludedMethods'] | K>, T['_']['excludedMethods'] | K>;
export type MySqlDelete<TTable extends MySqlTable = MySqlTable, TQueryResult extends MySqlQueryResultHKT = AnyMySqlQueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase = PreparedQueryHKTBase> = MySqlDeleteBase<TTable, TQueryResult, TPreparedQueryHKT, true, never>;
export interface MySqlDeleteConfig {
where?: SQL | undefined;
limit?: number | Placeholder;
orderBy?: (MySqlColumn | SQL | SQL.Aliased)[];
table: MySqlTable;
returning?: SelectedFieldsOrdered;
withList?: Subquery[];
}
export type MySqlDeletePrepare<T extends AnyMySqlDeleteBase> = PreparedQueryKind<T['_']['preparedQueryHKT'], MySqlPreparedQueryConfig & {
execute: MySqlQueryResultKind<T['_']['queryResult'], never>;
iterator: never;
}, true>;
type MySqlDeleteDynamic<T extends AnyMySqlDeleteBase> = MySqlDelete<T['_']['table'], T['_']['queryResult'], T['_']['preparedQueryHKT']>;
type AnyMySqlDeleteBase = MySqlDeleteBase<any, any, any, any, any>;
export interface MySqlDeleteBase<TTable extends MySqlTable, TQueryResult extends MySqlQueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase, TDynamic extends boolean = false, TExcludedMethods extends string = never> extends QueryPromise<MySqlQueryResultKind<TQueryResult, never>> {
readonly _: {
readonly table: TTable;
readonly queryResult: TQueryResult;
readonly preparedQueryHKT: TPreparedQueryHKT;
readonly dynamic: TDynamic;
readonly excludedMethods: TExcludedMethods;
};
}
export declare class MySqlDeleteBase<TTable extends MySqlTable, TQueryResult extends MySqlQueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase, TDynamic extends boolean = false, TExcludedMethods extends string = never> extends QueryPromise<MySqlQueryResultKind<TQueryResult, never>> implements SQLWrapper {
private table;
private session;
private dialect;
static readonly [entityKind]: string;
private config;
constructor(table: TTable, session: MySqlSession, dialect: MySqlDialect, withList?: Subquery[]);
/**
* Adds a `where` clause to the query.
*
* Calling this method will delete only those rows that fulfill a specified condition.
*
* See docs: {@link https://orm.drizzle.team/docs/delete}
*
* @param where the `where` clause.
*
* @example
* You can use conditional operators and `sql function` to filter the rows to be deleted.
*
* ```ts
* // Delete all cars with green color
* db.delete(cars).where(eq(cars.color, 'green'));
* // or
* db.delete(cars).where(sql`${cars.color} = 'green'`)
* ```
*
* You can logically combine conditional operators with `and()` and `or()` operators:
*
* ```ts
* // Delete all BMW cars with a green color
* db.delete(cars).where(and(eq(cars.color, 'green'), eq(cars.brand, 'BMW')));
*
* // Delete all cars with the green or blue color
* db.delete(cars).where(or(eq(cars.color, 'green'), eq(cars.color, 'blue')));
* ```
*/
where(where: SQL | undefined): MySqlDeleteWithout<this, TDynamic, 'where'>;
orderBy(builder: (deleteTable: TTable) => ValueOrArray<MySqlColumn | SQL | SQL.Aliased>): MySqlDeleteWithout<this, TDynamic, 'orderBy'>;
orderBy(...columns: (MySqlColumn | SQL | SQL.Aliased)[]): MySqlDeleteWithout<this, TDynamic, 'orderBy'>;
limit(limit: number | Placeholder): MySqlDeleteWithout<this, TDynamic, 'limit'>;
toSQL(): Query;
prepare(): MySqlDeletePrepare<this>;
execute: ReturnType<this['prepare']>['execute'];
private createIterator;
iterator: ReturnType<this["prepare"]>["iterator"];
$dynamic(): MySqlDeleteDynamic<this>;
}
export {};
@@ -0,0 +1,5 @@
import type { CollisionDetection } from './types';
/**
* Returns the rectangles that the pointer is hovering over
*/
export declare const pointerWithin: CollisionDetection;
@@ -0,0 +1 @@
{"version":3,"file":"getFileTypeFallback.d.ts","sourceRoot":"","sources":["../../src/uploads/getFileTypeFallback.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAiBD,eAAO,MAAM,mBAAmB,SAAU,MAAM,KAAG,UAOlD,CAAA"}
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Calendar = createLucideIcon("Calendar", [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
["path", { d: "M3 10h18", key: "8toen8" }]
]);
export { Calendar as default };
//# sourceMappingURL=calendar.js.map
@@ -0,0 +1,34 @@
'use client';
export const defaultLoadingOverlayState = {
isLoading: false,
loaders: [],
loadingText: '',
overlayType: null
};
export const reducer = (state, action) => {
const loadersCopy = [...state.loaders];
const {
type = 'fullscreen',
key = 'user',
loadingText
} = action.payload;
if (action.type === 'add') {
loadersCopy.push({
type,
key,
loadingText
});
} else if (action.type === 'remove') {
const index = loadersCopy.findIndex(item => item.key === key && item.type === type);
loadersCopy.splice(index, 1);
}
const nextLoader = loadersCopy?.length > 0 ? loadersCopy[loadersCopy.length - 1] : null;
return {
isLoading: Boolean(nextLoader),
loaders: loadersCopy,
loadingText: nextLoader?.loadingText || state?.loadingText,
overlayType: nextLoader?.type || state?.overlayType
};
};
//# sourceMappingURL=reducer.js.map
@@ -0,0 +1 @@
Prism.languages.solidity=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),Prism.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),Prism.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),Prism.languages.sol=Prism.languages.solidity;
@@ -0,0 +1,24 @@
(The MIT License)
Copyright (c) 2012-2014 Federico Romero
Copyright (c) 2012-2014 Isaac Z. Schlueter
Copyright (c) 2014-2015 Douglas Christopher Wilson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,30 @@
.no-results {
padding-top: calc(var(--base) / 2);
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
border-radius: var(--style-radius-m);
h3 {
margin: 0;
}
p {
margin: calc(var(--base) / 2) 0 0 0;
&:first-child {
margin-top: 0;
}
}
&__actions {
display: flex;
gap: calc(var(--base) / 2);
margin-top: var(--base);
.btn {
margin: 0;
}
}
}
@@ -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 SquareActivity = createLucideIcon("SquareActivity", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M17 12h-2l-2 5-2-10-2 5H7", key: "15hlnc" }]
]);
export { SquareActivity as default };
//# sourceMappingURL=square-activity.js.map
@@ -0,0 +1,5 @@
{
"main": "dist/react-select-creatable.cjs.js",
"module": "dist/react-select-creatable.esm.js",
"types": "dist/react-select-creatable.cjs.d.ts"
}
@@ -0,0 +1,129 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const UnsupportedFeatureWarning = require("../UnsupportedFeatureWarning");
const ConstDependency = require("../dependencies/ConstDependency");
const BasicEvaluatedExpression = require("./BasicEvaluatedExpression");
/** @typedef {import("estree").Expression} Expression */
/** @typedef {import("estree").SourceLocation} SourceLocation */
/** @typedef {import("./JavascriptParser")} JavascriptParser */
/** @typedef {import("./JavascriptParser").Range} Range */
/** @typedef {import("./BasicEvaluatedExpression").GetMembers} GetMembers */
module.exports.approve = () => true;
/**
* @param {boolean} value the boolean value
* @returns {(expression: Expression) => BasicEvaluatedExpression} plugin function
*/
module.exports.evaluateToBoolean = (value) =>
function booleanExpression(expr) {
return new BasicEvaluatedExpression()
.setBoolean(value)
.setRange(/** @type {Range} */ (expr.range));
};
/**
* @param {string} identifier identifier
* @param {string} rootInfo rootInfo
* @param {GetMembers} getMembers getMembers
* @param {boolean | null=} truthy is truthy, null if nullish
* @returns {(expression: Expression) => BasicEvaluatedExpression} callback
*/
module.exports.evaluateToIdentifier = (
identifier,
rootInfo,
getMembers,
truthy
) =>
function identifierExpression(expr) {
const evaluatedExpression = new BasicEvaluatedExpression()
.setIdentifier(identifier, rootInfo, getMembers)
.setSideEffects(false)
.setRange(/** @type {Range} */ (expr.range));
switch (truthy) {
case true:
evaluatedExpression.setTruthy();
break;
case null:
evaluatedExpression.setNullish(true);
break;
case false:
evaluatedExpression.setFalsy();
break;
}
return evaluatedExpression;
};
/**
* @param {number} value the number value
* @returns {(expression: Expression) => BasicEvaluatedExpression} plugin function
*/
module.exports.evaluateToNumber = (value) =>
function stringExpression(expr) {
return new BasicEvaluatedExpression()
.setNumber(value)
.setRange(/** @type {Range} */ (expr.range));
};
/**
* @param {string} value the string value
* @returns {(expression: Expression) => BasicEvaluatedExpression} plugin function
*/
module.exports.evaluateToString = (value) =>
function stringExpression(expr) {
return new BasicEvaluatedExpression()
.setString(value)
.setRange(/** @type {Range} */ (expr.range));
};
/**
* @param {JavascriptParser} parser the parser
* @param {string} message the message
* @returns {(expression: Expression) => boolean | undefined} callback to handle unsupported expression
*/
module.exports.expressionIsUnsupported = (parser, message) =>
function unsupportedExpression(expr) {
const dep = new ConstDependency(
"(void 0)",
/** @type {Range} */ (expr.range),
null
);
dep.loc = /** @type {SourceLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
if (!parser.state.module) return;
parser.state.module.addWarning(
new UnsupportedFeatureWarning(
message,
/** @type {SourceLocation} */ (expr.loc)
)
);
return true;
};
module.exports.skipTraversal = () => true;
/**
* @param {JavascriptParser} parser the parser
* @param {string} value the const value
* @param {(string[] | null)=} runtimeRequirements runtime requirements
* @returns {(expression: Expression) => true} plugin function
*/
module.exports.toConstantDependency = (parser, value, runtimeRequirements) =>
function constDependency(expr) {
const dep = new ConstDependency(
value,
/** @type {Range} */
(expr.range),
runtimeRequirements
);
dep.loc = /** @type {SourceLocation} */ (expr.loc);
parser.state.module.addPresentationalDependency(dep);
return true;
};
@@ -0,0 +1,36 @@
import { constructFrom } from "./constructFrom.js";
import { constructNow } from "./constructNow.js";
import { isSameQuarter } from "./isSameQuarter.js";
/**
* The {@link isThisQuarter} function options.
*/
/**
* @name isThisQuarter
* @category Quarter Helpers
* @summary Is the given date in the same quarter as the current date?
* @pure false
*
* @description
* Is the given date in the same quarter as the current date?
*
* @param date - The date to check
* @param options - An object with options
*
* @returns The date is in this quarter
*
* @example
* // If today is 25 September 2014, is 2 July 2014 in this quarter?
* const result = isThisQuarter(new Date(2014, 6, 2))
* //=> true
*/
export function isThisQuarter(date, options) {
return isSameQuarter(
constructFrom(options?.in || date, date),
constructNow(options?.in || date),
);
}
// Fallback for modularized imports:
export default isThisQuarter;
@@ -0,0 +1,22 @@
/**
* @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 FolderOpenDot = createLucideIcon("FolderOpenDot", [
[
"path",
{
d: "m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2",
key: "1nmvlm"
}
],
["circle", { cx: "14", cy: "15", r: "1", key: "1gm4qj" }]
]);
export { FolderOpenDot as default };
//# sourceMappingURL=folder-open-dot.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/neon-http/migrator.ts"],"sourcesContent":["import type { MigrationConfig } from '~/migrator.ts';\nimport { readMigrationFiles } from '~/migrator.ts';\nimport { type SQL, sql } from '~/sql/sql.ts';\nimport type { NeonHttpDatabase } from './driver.ts';\n\n/**\n * This function reads migrationFolder and execute each unapplied migration and mark it as executed in database\n *\n * NOTE: The Neon HTTP driver does not support transactions. This means that if any part of a migration fails,\n * no rollback will be executed. Currently, you will need to handle unsuccessful migration yourself.\n * @param db - drizzle db instance\n * @param config - path to migration folder generated by drizzle-kit\n */\nexport async function migrate<TSchema extends Record<string, unknown>>(\n\tdb: NeonHttpDatabase<TSchema>,\n\tconfig: MigrationConfig,\n) {\n\tconst migrations = readMigrationFiles(config);\n\tconst migrationsTable = config.migrationsTable ?? '__drizzle_migrations';\n\tconst migrationsSchema = config.migrationsSchema ?? 'drizzle';\n\tconst migrationTableCreate = sql`\n\t\tCREATE TABLE IF NOT EXISTS ${sql.identifier(migrationsSchema)}.${sql.identifier(migrationsTable)} (\n\t\t\tid SERIAL PRIMARY KEY,\n\t\t\thash text NOT NULL,\n\t\t\tcreated_at bigint\n\t\t)\n\t`;\n\tawait db.session.execute(sql`CREATE SCHEMA IF NOT EXISTS ${sql.identifier(migrationsSchema)}`);\n\tawait db.session.execute(migrationTableCreate);\n\n\tconst dbMigrations = await db.session.all<{ id: number; hash: string; created_at: string }>(\n\t\tsql`select id, hash, created_at from ${sql.identifier(migrationsSchema)}.${\n\t\t\tsql.identifier(migrationsTable)\n\t\t} order by created_at desc limit 1`,\n\t);\n\n\tconst lastDbMigration = dbMigrations[0];\n\tconst rowsToInsert: SQL[] = [];\n\tfor await (const migration of migrations) {\n\t\tif (\n\t\t\t!lastDbMigration\n\t\t\t|| Number(lastDbMigration.created_at) < migration.folderMillis\n\t\t) {\n\t\t\tfor (const stmt of migration.sql) {\n\t\t\t\tawait db.session.execute(sql.raw(stmt));\n\t\t\t}\n\n\t\t\trowsToInsert.push(\n\t\t\t\tsql`insert into ${sql.identifier(migrationsSchema)}.${\n\t\t\t\t\tsql.identifier(migrationsTable)\n\t\t\t\t} (\"hash\", \"created_at\") values(${migration.hash}, ${migration.folderMillis})`,\n\t\t\t);\n\t\t}\n\t}\n\n\tfor await (const rowToInsert of rowsToInsert) {\n\t\tawait db.session.execute(rowToInsert);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAmC;AACnC,iBAA8B;AAW9B,eAAsB,QACrB,IACA,QACC;AACD,QAAM,iBAAa,oCAAmB,MAAM;AAC5C,QAAM,kBAAkB,OAAO,mBAAmB;AAClD,QAAM,mBAAmB,OAAO,oBAAoB;AACpD,QAAM,uBAAuB;AAAA,+BACC,eAAI,WAAW,gBAAgB,CAAC,IAAI,eAAI,WAAW,eAAe,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAMjG,QAAM,GAAG,QAAQ,QAAQ,6CAAkC,eAAI,WAAW,gBAAgB,CAAC,EAAE;AAC7F,QAAM,GAAG,QAAQ,QAAQ,oBAAoB;AAE7C,QAAM,eAAe,MAAM,GAAG,QAAQ;AAAA,IACrC,kDAAuC,eAAI,WAAW,gBAAgB,CAAC,IACtE,eAAI,WAAW,eAAe,CAC/B;AAAA,EACD;AAEA,QAAM,kBAAkB,aAAa,CAAC;AACtC,QAAM,eAAsB,CAAC;AAC7B,mBAAiB,aAAa,YAAY;AACzC,QACC,CAAC,mBACE,OAAO,gBAAgB,UAAU,IAAI,UAAU,cACjD;AACD,iBAAW,QAAQ,UAAU,KAAK;AACjC,cAAM,GAAG,QAAQ,QAAQ,eAAI,IAAI,IAAI,CAAC;AAAA,MACvC;AAEA,mBAAa;AAAA,QACZ,6BAAkB,eAAI,WAAW,gBAAgB,CAAC,IACjD,eAAI,WAAW,eAAe,CAC/B,kCAAkC,UAAU,IAAI,KAAK,UAAU,YAAY;AAAA,MAC5E;AAAA,IACD;AAAA,EACD;AAEA,mBAAiB,eAAe,cAAc;AAC7C,UAAM,GAAG,QAAQ,QAAQ,WAAW;AAAA,EACrC;AACD;","names":[]}
@@ -0,0 +1,40 @@
'use client';
import { c as _c } from "react/compiler-runtime";
import { jsx as _jsx } from "react/jsx-runtime";
import { useTranslation } from '../../../providers/Translation/index.js';
import { useListDrawerContext } from '../../ListDrawer/Provider.js';
import { Pill } from '../../Pill/index.js';
const baseClass = 'list-header';
export function ListDrawerCreateNewDocButton(t0) {
const $ = _c(3);
const {
hasCreatePermission
} = t0;
const {
DocumentDrawerToggler
} = useListDrawerContext();
const {
t
} = useTranslation();
if (!hasCreatePermission) {
return null;
}
let t1;
if ($[0] !== DocumentDrawerToggler || $[1] !== t) {
t1 = _jsx(DocumentDrawerToggler, {
className: `${baseClass}__create-new-button`,
children: _jsx(Pill, {
size: "small",
children: t("general:createNew")
})
}, "create-new-button-toggler");
$[0] = DocumentDrawerToggler;
$[1] = t;
$[2] = t1;
} else {
t1 = $[2];
}
return t1;
}
//# sourceMappingURL=ListDrawerCreateNewDocButton.js.map
@@ -0,0 +1,77 @@
import { IfAny, UnpackList } from "./utils.cjs";
import { ItemType } from "./schema.cjs";
import { HasNestedFields, QueryFields } from "./fields.cjs";
import { QueryDeep } from "./deep.cjs";
import { QueryFilter } from "./filters.cjs";
import { AggregationTypes, GroupByFields } from "./aggregate.cjs";
//#region src/types/query.d.ts
/**
* All query options available
*/
interface Query<Schema, Item> {
readonly fields?: IfAny<Schema, (string | Record<string, any>)[], QueryFields<Schema, Item>> | undefined;
filter?: IfAny<Schema, Record<string, any>, QueryFilter<Schema, Item>> | undefined;
search?: string | undefined;
sort?: IfAny<Schema, string | string[], QuerySort<Schema, Item> | QuerySort<Schema, Item>[]> | undefined;
limit?: number | undefined;
offset?: number | undefined;
page?: number | undefined;
deep?: IfAny<Schema, Record<string, any>, QueryDeep<Schema, Item>> | undefined;
backlink?: boolean | undefined;
readonly alias?: IfAny<Schema, Record<string, string>, QueryAlias<Schema, Item>> | undefined;
}
/**
* All query options with an additional version query option for readItem and readSingleton
*/
interface QueryItem<Schema, Item> extends Query<Schema, Item> {
readonly version?: string | undefined;
readonly versionRaw?: boolean | undefined;
}
/**
* All query options with additional aggregate, version, and custom property options
*/
type ExtendedQuery<Schema, Item> = Query<Schema, Item> & {
aggregate?: Partial<Record<keyof AggregationTypes, string>>;
groupBy?: (string | GroupByFields<Schema, Item>)[];
version?: string | undefined;
versionRaw?: boolean | undefined;
} & Record<string, unknown>;
/**
* All query options with an additional concurrentIndexCreation query option for updating fields with indexes
*/
interface FieldQuery<Schema, Item> extends Query<Schema, Item> {
readonly concurrentIndexCreation?: boolean;
}
/**
* Returns Item types that are available in the root Schema
*/
type ExtractItem<Schema, Item> = Extract<UnpackList<Item>, ItemType<Schema>>;
/**
* Returns the relation type from the current item by key
*/
type ExtractRelation<Schema, Item extends object, Key$1> = Key$1 extends keyof Item ? ExtractItem<Schema, Item[Key$1]> : never;
/**
* Merge union of optional objects
*/
type MergeRelationalFields<FieldList> = Exclude<UnpackList<FieldList>, string> extends infer RelatedFields ? { [Key in RelatedFields extends any ? keyof RelatedFields : never]-?: Exclude<RelatedFields[Key], undefined> } : never;
/**
* Merge separate relational objects together
*/
type MergeFields<FieldList> = HasNestedFields<FieldList> extends never ? Extract<UnpackList<FieldList>, string> : Extract<UnpackList<FieldList>, string> | MergeRelationalFields<FieldList>;
/**
* Query sort
* TODO expand to relational sorting (same object notation as fields i guess)
*/
type QuerySort<_Schema, Item> = UnpackList<Item> extends infer FlatItem ? { [Field in keyof FlatItem]: Field | `-${Field & string}` }[keyof FlatItem] : never;
type MergeObjects<A, B> = object extends A ? (object extends B ? A & B : A) : object extends B ? B : never;
/**
* Alias object
*
* TODO somehow include these aliases in the Field Types!!
*/
type QueryAlias<_Schema, Item> = Record<string, keyof Item>;
//#endregion
export { ExtendedQuery, ExtractItem, ExtractRelation, FieldQuery, MergeFields, MergeObjects, MergeRelationalFields, Query, QueryAlias, QueryItem, QuerySort };
//# sourceMappingURL=query.d.cts.map
@@ -0,0 +1 @@
{"version":3,"file":"shouldSampleForBufferEvent.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/shouldSampleForBufferEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAGnD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAiBzF"}
@@ -0,0 +1,74 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const isBuild = require('../utils/isBuild.js');
const wrapperUtils = require('../utils/wrapperUtils.js');
/**
* Create a wrapped version of the user's exported `getInitialProps` function in
* a custom app ("_app.js").
*
* @param origAppGetInitialProps The user's `getInitialProps` function
* @param parameterizedRoute The page's parameterized route
* @returns A wrapped version of the function
*/
function wrapAppGetInitialPropsWithSentry(origAppGetInitialProps) {
return new Proxy(origAppGetInitialProps, {
apply: async (wrappingTarget, thisArg, args) => {
if (isBuild.isBuild()) {
return wrappingTarget.apply(thisArg, args);
}
const [context] = args;
const { req, res } = context.ctx;
const errorWrappedAppGetInitialProps = wrapperUtils.withErrorInstrumentation(wrappingTarget);
// Generally we can assume that `req` and `res` are always defined on the server:
// https://nextjs.org/docs/api-reference/data-fetching/get-initial-props#context-object
// This does not seem to be the case in dev mode. Because we have no clean way of associating the the data fetcher
// span with each other when there are no req or res objects, we simply do not trace them at all here.
if (req && res) {
const tracedGetInitialProps = wrapperUtils.withTracedServerSideDataFetcher(errorWrappedAppGetInitialProps, req, res, {
dataFetcherRouteName: '/_app',
requestedRouteName: context.ctx.pathname,
dataFetchingMethodName: 'getInitialProps',
});
const {
data: appGetInitialProps,
sentryTrace,
baggage,
}
= await tracedGetInitialProps.apply(thisArg, args);
if (typeof appGetInitialProps === 'object' && appGetInitialProps !== null) {
// Per definition, `pageProps` is not optional, however an increased amount of users doesn't seem to call
// `App.getInitialProps(appContext)` in their custom `_app` pages which is required as per
// https://nextjs.org/docs/advanced-features/custom-app - resulting in missing `pageProps`.
// For this reason, we just handle the case where `pageProps` doesn't exist explicitly.
if (!(appGetInitialProps ).pageProps) {
(appGetInitialProps ).pageProps = {};
}
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (sentryTrace) {
(appGetInitialProps ).pageProps._sentryTraceData = sentryTrace;
}
// The Next.js serializer throws on undefined values so we need to guard for it (#12102)
if (baggage) {
(appGetInitialProps ).pageProps._sentryBaggage = baggage;
}
}
return appGetInitialProps;
} else {
return errorWrappedAppGetInitialProps.apply(thisArg, args);
}
},
});
}
exports.wrapAppGetInitialPropsWithSentry = wrapAppGetInitialPropsWithSentry;
//# sourceMappingURL=wrapAppGetInitialPropsWithSentry.js.map
@@ -0,0 +1,53 @@
@import '../../scss/styles.scss';
@layer payload-default {
.thumbnail {
&:not(.thumbnail--size-none) {
min-height: 100%;
flex-shrink: 0;
align-self: stretch;
overflow: hidden;
img,
svg {
width: 100%;
height: 100%;
object-fit: cover;
}
}
&--size-expand {
max-height: 100%;
width: 100%;
padding-top: 100%;
position: relative;
img,
svg {
position: absolute;
top: 0;
}
}
&--size-large {
max-height: base(9);
width: base(9);
}
&--size-medium {
max-height: base(7);
width: base(7);
}
&--size-small {
max-height: base(5);
width: base(5);
}
@include large-break {
.thumbnail {
width: base(5);
}
}
}
}
@@ -0,0 +1,23 @@
'use strict';
var path = require('path')
, fs = require('fs')
, helper = require('./helper.js')
;
module.exports = function(connInfo, cb) {
var file = helper.getFileName();
fs.stat(file, function(err, stat){
if (err || !helper.usePgPass(stat, file)) {
return cb(undefined);
}
var st = fs.createReadStream(file);
helper.getPassword(connInfo, st, cb);
});
};
module.exports.warnTo = helper.warnTo;
@@ -0,0 +1,71 @@
import type { Attachment } from '../attachment';
import type { Integration } from '../integration';
import type { FeedbackCallbacks, FeedbackGeneralConfiguration, FeedbackTextConfiguration, FeedbackThemeConfiguration } from './config';
import type { FeedbackEvent, SendFeedback, SendFeedbackParams, UserFeedback } from './sendFeedback';
export type { FeedbackFormData } from './form';
export type { FeedbackEvent, UserFeedback, SendFeedback, SendFeedbackParams };
/**
* The integration's internal `options` member where every value should be set
*/
export interface FeedbackInternalOptions extends FeedbackGeneralConfiguration, FeedbackThemeConfiguration, FeedbackTextConfiguration, FeedbackCallbacks {
}
type Hooks = unknown;
type HTMLElement = unknown;
type HType = unknown;
type ShadowRoot = unknown;
type VNode = unknown;
type FeedbackDialog = {
/**
* The HTMLElement that is containing all the form content
*/
el: HTMLElement;
/**
* Insert the Dialog into the Shadow DOM.
*
* The Dialog starts in the `closed` state where no inner HTML is rendered.
*/
appendToDom: () => void;
/**
* Remove the dialog from the Shadow DOM
*/
removeFromDom: () => void;
/**
* Open/Show the dialog & form inside it
*/
open: () => void;
/**
* Close/Hide the dialog & form inside it
*/
close: () => void;
};
interface FeedbackScreenshotInput {
/**
* The preact component
*/
input: (props: {
onError: (error: Error) => void;
}) => VNode;
/**
* The image/screenshot bytes
*/
value: () => Promise<Attachment | undefined>;
}
interface CreateDialogProps {
options: FeedbackInternalOptions;
screenshotIntegration: FeedbackScreenshotIntegration | undefined;
sendFeedback: SendFeedback;
shadow: ShadowRoot;
}
export interface FeedbackModalIntegration extends Integration {
createDialog: (props: CreateDialogProps) => FeedbackDialog;
}
interface CreateInputProps {
h: HType;
hooks: Hooks;
dialog: FeedbackDialog;
options: FeedbackInternalOptions;
}
export interface FeedbackScreenshotIntegration extends Integration {
createInput: (props: CreateInputProps) => FeedbackScreenshotInput;
}
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"message-circle-more.js","sources":["../../../src/icons/message-circle-more.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MessageCircleMore\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNy45IDIwQTkgOSAwIDEgMCA0IDE2LjFMMiAyMloiIC8+CiAgPHBhdGggZD0iTTggMTJoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xMiAxMmguMDEiIC8+CiAgPHBhdGggZD0iTTE2IDEyaC4wMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/message-circle-more\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 MessageCircleMore = createLucideIcon('MessageCircleMore', [\n ['path', { d: 'M7.9 20A9 9 0 1 0 4 16.1L2 22Z', key: 'vv11sd' }],\n ['path', { d: 'M8 12h.01', key: 'czm47f' }],\n ['path', { d: 'M12 12h.01', key: '1mp3jc' }],\n ['path', { d: 'M16 12h.01', key: '1l6xoz' }],\n]);\n\nexport default MessageCircleMore;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,iBAAiB,mBAAqB,CAAA,CAAA,CAAA;AAAA,CAAA,CAC9D,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,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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;;"}
@@ -0,0 +1 @@
{"version":3,"file":"enum.js","sourceRoot":"","sources":["../../src/enum.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,wCAAe,CAAA;IACf,8CAAqB,CAAA;IACrB,sDAA6B,CAAA;AAC/B,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAIhC;AAED,IAAY,SAuBX;AAvBD,WAAY,SAAS;IACnB,0BAAa,CAAA;IACb,0BAAa,CAAA;IACb,uBAAU,CAAA;IACV,yBAAY,CAAA;IACZ,sBAAS,CAAA;IACT,0BAAa,CAAA;IACb,0BAAa,CAAA;IACb,2BAAc,CAAA;IACd,wBAAW,CAAA;IACX,yBAAY,CAAA;IACZ,qBAAQ,CAAA;IACR,4BAAe,CAAA;IACf,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,uBAAU,CAAA;IACV,0BAAa,CAAA;IACb,0BAAa,CAAA;IACb,wBAAW,CAAA;IACX,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,yCAA4B,CAAA;IAC5B,gCAAmB,CAAA;AACrB,CAAC,EAvBW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAuBpB;AAED,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,oCAAuB,CAAA;IACvB,wCAA2B,CAAA;IAC3B,0CAA6B,CAAA;IAC7B,uDAA0C,CAAA;IAC1C,iDAAoC,CAAA;AACtC,CAAC,EAPW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAOpB","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 enum AllowedOperationTypes {\n QUERY = 'query',\n MUTATION = 'mutation',\n SUBSCRIPTION = 'subscription',\n}\n\nexport enum TokenKind {\n SOF = '<SOF>',\n EOF = '<EOF>',\n BANG = '!',\n DOLLAR = '$',\n AMP = '&',\n PAREN_L = '(',\n PAREN_R = ')',\n SPREAD = '...',\n COLON = ':',\n EQUALS = '=',\n AT = '@',\n BRACKET_L = '[',\n BRACKET_R = ']',\n BRACE_L = '{',\n PIPE = '|',\n BRACE_R = '}',\n NAME = 'Name',\n INT = 'Int',\n FLOAT = 'Float',\n STRING = 'String',\n BLOCK_STRING = 'BlockString',\n COMMENT = 'Comment',\n}\n\nexport enum SpanNames {\n EXECUTE = 'graphql.execute',\n PARSE = 'graphql.parse',\n RESOLVE = 'graphql.resolve',\n VALIDATE = 'graphql.validate',\n SCHEMA_VALIDATE = 'graphql.validateSchema',\n SCHEMA_PARSE = 'graphql.parseSchema',\n}\n"]}
@@ -0,0 +1,51 @@
/*
* 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.
*/
/**
* Takes a performance entry type and a callback function, and creates a
* `PerformanceObserver` instance that will observe the specified entry type
* with buffering enabled and call the callback _for each entry_.
*
* This function also feature-detects entry support and wraps the logic in a
* try/catch to avoid errors in unsupporting browsers.
*/
const observe = (
type,
callback,
opts = {},
) => {
try {
if (PerformanceObserver.supportedEntryTypes.includes(type)) {
const po = new PerformanceObserver(list => {
// Delay by a microtask to workaround a bug in Safari where the
// callback is invoked immediately, rather than in a separate task.
// See: https://github.com/GoogleChrome/web-vitals/issues/277
// eslint-disable-next-line @typescript-eslint/no-floating-promises
Promise.resolve().then(() => {
callback(list.getEntries() );
});
});
po.observe({ type, buffered: true, ...opts });
return po;
}
} catch {
// Do nothing.
}
return;
};
export { observe };
//# sourceMappingURL=observe.js.map
@@ -0,0 +1,54 @@
'use strict'
let Declaration = require('./declaration')
let PreviousMap = require('./previous-map')
let Comment = require('./comment')
let AtRule = require('./at-rule')
let Input = require('./input')
let Root = require('./root')
let Rule = require('./rule')
function fromJSON(json, inputs) {
if (Array.isArray(json)) return json.map(n => fromJSON(n))
let { inputs: ownInputs, ...defaults } = json
if (ownInputs) {
inputs = []
for (let input of ownInputs) {
let inputHydrated = { ...input, __proto__: Input.prototype }
if (inputHydrated.map) {
inputHydrated.map = {
...inputHydrated.map,
__proto__: PreviousMap.prototype
}
}
inputs.push(inputHydrated)
}
}
if (defaults.nodes) {
defaults.nodes = json.nodes.map(n => fromJSON(n, inputs))
}
if (defaults.source) {
let { inputId, ...source } = defaults.source
defaults.source = source
if (inputId != null) {
defaults.source.input = inputs[inputId]
}
}
if (defaults.type === 'root') {
return new Root(defaults)
} else if (defaults.type === 'decl') {
return new Declaration(defaults)
} else if (defaults.type === 'rule') {
return new Rule(defaults)
} else if (defaults.type === 'comment') {
return new Comment(defaults)
} else if (defaults.type === 'atrule') {
return new AtRule(defaults)
} else {
throw new Error('Unknown node type: ' + json.type)
}
}
module.exports = fromJSON
fromJSON.default = fromJSON
@@ -0,0 +1,8 @@
"use strict";
exports.startOfDecadeWithOptions = void 0;
var _index = require("../startOfDecade.cjs");
var _index2 = require("./_lib/convertToFP.cjs"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const startOfDecadeWithOptions = (exports.startOfDecadeWithOptions = (0,
_index2.convertToFP)(_index.startOfDecade, 2));
@@ -0,0 +1,23 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const BellDot = createLucideIcon("BellDot", [
[
"path",
{
d: "M19.4 14.9C20.2 16.4 21 17 21 17H3s3-2 3-9c0-3.3 2.7-6 6-6 .7 0 1.3.1 1.9.3",
key: "xcehk"
}
],
["path", { d: "M10.3 21a1.94 1.94 0 0 0 3.4 0", key: "qgo35s" }],
["circle", { cx: "18", cy: "8", r: "3", key: "1g0gzu" }]
]);
export { BellDot as default };
//# sourceMappingURL=bell-dot.js.map
@@ -0,0 +1 @@
{"version":3,"file":"miniChalk.d.ts","sourceRoot":"","sources":["../../src/utilities/miniChalk.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,SAAS;gBACR,MAAM;gBACN,MAAM;gBACN,MAAM;eACP,MAAM;iBACJ,MAAM;mBACJ,MAAM;eACV,MAAM;qBACA,MAAM;iBACV,MAAM;kBACL,MAAM;mBAGL,MAAM;sBACH,MAAM;CACzB,CAAA"}
@@ -0,0 +1,304 @@
# magic-string
<a href="https://github.com/Rich-Harris/magic-string/actions/workflows/test.yml">
<img src="https://img.shields.io/github/actions/workflow/status/Rich-Harris/magic-string/test.yml"
alt="build status">
</a>
<a href="https://npmjs.org/package/magic-string">
<img src="https://img.shields.io/npm/v/magic-string.svg"
alt="npm version">
</a>
<a href="https://github.com/Rich-Harris/magic-string/blob/master/LICENSE.md">
<img src="https://img.shields.io/npm/l/magic-string.svg"
alt="license">
</a>
Suppose you have some source code. You want to make some light modifications to it - replacing a few characters here and there, wrapping it with a header and footer, etc - and ideally you'd like to generate a [source map](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/) at the end of it. You've thought about using something like [recast](https://github.com/benjamn/recast) (which allows you to generate an AST from some JavaScript, manipulate it, and reprint it with a sourcemap without losing your comments and formatting), but it seems like overkill for your needs (or maybe the source code isn't JavaScript).
Your requirements are, frankly, rather niche. But they're requirements that I also have, and for which I made magic-string. It's a small, fast utility for manipulating strings and generating sourcemaps.
## Installation
magic-string works in both node.js and browser environments. For node, install with npm:
```bash
npm i magic-string
```
To use in browser, grab the [magic-string.umd.js](https://unpkg.com/magic-string/dist/magic-string.umd.js) file and add it to your page:
```html
<script src='magic-string.umd.js'></script>
```
(It also works with various module systems, if you prefer that sort of thing - it has a dependency on [vlq](https://github.com/Rich-Harris/vlq).)
## Usage
These examples assume you're in node.js, or something similar:
```js
import MagicString from 'magic-string';
import fs from 'fs'
const s = new MagicString('problems = 99');
s.update(0, 8, 'answer');
s.toString(); // 'answer = 99'
s.update(11, 13, '42'); // character indices always refer to the original string
s.toString(); // 'answer = 42'
s.prepend('var ').append(';'); // most methods are chainable
s.toString(); // 'var answer = 42;'
const map = s.generateMap({
source: 'source.js',
file: 'converted.js.map',
includeContent: true
}); // generates a v3 sourcemap
fs.writeFileSync('converted.js', s.toString());
fs.writeFileSync('converted.js.map', map.toString());
```
You can pass an options argument:
```js
const s = new MagicString(someCode, {
// these options will be used if you later call `bundle.addSource( s )` - see below
filename: 'foo.js',
indentExclusionRanges: [/*...*/],
// market source as ignore in DevTools, see below #Bundling
ignoreList: false
});
```
## Methods
### s.addSourcemapLocation( index )
Adds the specified character index (with respect to the original string) to sourcemap mappings, if `hires` is `false` (see below).
### s.append( content )
Appends the specified content to the end of the string. Returns `this`.
### s.appendLeft( index, content )
Appends the specified `content` at the `index` in the original string. If a range *ending* with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependLeft(...)`.
### s.appendRight( index, content )
Appends the specified `content` at the `index` in the original string. If a range *starting* with `index` is subsequently moved, the insert will be moved with it. Returns `this`. See also `s.prependRight(...)`.
### s.clone()
Does what you'd expect.
### s.generateDecodedMap( options )
Generates a sourcemap object with raw mappings in array form, rather than encoded as a string. See `generateMap` documentation below for options details. Useful if you need to manipulate the sourcemap further, but most of the time you will use `generateMap` instead.
### s.generateMap( options )
Generates a [version 3 sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit). All options are, well, optional:
* `file` - the filename where you plan to write the sourcemap
* `source` - the filename of the file containing the original source
* `includeContent` - whether to include the original content in the map's `sourcesContent` array
* `hires` - whether the mapping should be high-resolution. Hi-res mappings map every single character, meaning (for example) your devtools will always be able to pinpoint the exact location of function calls and so on. With lo-res mappings, devtools may only be able to identify the correct line - but they're quicker to generate and less bulky. You can also set `"boundary"` to generate a semi-hi-res mappings segmented per word boundary instead of per character, suitable for string semantics that are separated by words. If sourcemap locations have been specified with `s.addSourcemapLocation()`, they will be used here.
The returned sourcemap has two (non-enumerable) methods attached for convenience:
* `toString` - returns the equivalent of `JSON.stringify(map)`
* `toUrl` - returns a DataURI containing the sourcemap. Useful for doing this sort of thing:
```js
code += '\n//# sourceMappingURL=' + map.toUrl();
```
### s.hasChanged()
Indicates if the string has been changed.
### s.indent( prefix[, options] )
Prefixes each line of the string with `prefix`. If `prefix` is not supplied, the indentation will be guessed from the original content, falling back to a single tab character. Returns `this`.
The `options` argument can have an `exclude` property, which is an array of `[start, end]` character ranges. These ranges will be excluded from the indentation - useful for (e.g.) multiline strings.
### s.insertLeft( index, content )
**DEPRECATED** since 0.17 – use `s.appendLeft(...)` instead
### s.insertRight( index, content )
**DEPRECATED** since 0.17 – use `s.prependRight(...)` instead
### s.isEmpty()
Returns true if the resulting source is empty (disregarding white space).
### s.locate( index )
**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30)
### s.locateOrigin( index )
**DEPRECATED** since 0.10 – see [#30](https://github.com/Rich-Harris/magic-string/pull/30)
### s.move( start, end, index )
Moves the characters from `start` and `end` to `index`. Returns `this`.
### s.overwrite( start, end, content[, options] )
Replaces the characters from `start` to `end` with `content`, along with the appended/prepended content in that range. The same restrictions as `s.remove()` apply. Returns `this`.
The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and a `contentOnly` property which determines whether only the content is overwritten, or anything that was appended/prepended to the range as well.
It may be preferred to use `s.update(...)` instead if you wish to avoid overwriting the appended/prepended content.
### s.prepend( content )
Prepends the string with the specified content. Returns `this`.
### s.prependLeft ( index, content )
Same as `s.appendLeft(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
### s.prependRight ( index, content )
Same as `s.appendRight(...)`, except that the inserted content will go *before* any previous appends or prepends at `index`
### s.replace( regexpOrString, substitution )
String replacement with RegExp or string. When using a RegExp, replacer function is also supported. Returns `this`.
```ts
import MagicString from 'magic-string'
const s = new MagicString(source)
s.replace('foo', 'bar')
s.replace(/foo/g, 'bar')
s.replace(/(\w)(\d+)/g, (_, $1, $2) => $1.toUpperCase() + $2)
```
The differences from [`String.replace`]((https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)):
- It will always match against the **original string**
- It mutates the magic string state (use `.clone()` to be immutable)
### s.replaceAll( regexpOrString, substitution )
Same as `s.replace`, but replace all matched strings instead of just one.
If `substitution` is a regex, then it must have the global (`g`) flag set, or a `TypeError` is thrown. Matches the behavior of the bultin [`String.property.replaceAll`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replaceAll).
### s.remove( start, end )
Removes the characters from `start` to `end` (of the original string, **not** the generated string). Removing the same content twice, or making removals that partially overlap, will cause an error. Returns `this`.
### s.reset( start, end )
Resets the characters from `start` to `end` (of the original string, **not** the generated string).
It can be used to restore previously removed characters and discard unwanted changes.
### s.slice( start, end )
Returns the content of the generated string that corresponds to the slice between `start` and `end` of the original string. Throws error if the indices are for characters that were already removed.
### s.snip( start, end )
Returns a clone of `s`, with all content before the `start` and `end` characters of the original string removed.
### s.toString()
Returns the generated string.
### s.trim([ charType ])
Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start and end. Returns `this`.
### s.trimStart([ charType ])
Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the start. Returns `this`.
### s.trimEnd([ charType ])
Trims content matching `charType` (defaults to `\s`, i.e. whitespace) from the end. Returns `this`.
### s.trimLines()
Removes empty lines from the start and end. Returns `this`.
### s.update( start, end, content[, options] )
Replaces the characters from `start` to `end` with `content`. The same restrictions as `s.remove()` apply. Returns `this`.
The fourth argument is optional. It can have a `storeName` property — if `true`, the original name will be stored for later inclusion in a sourcemap's `names` array — and an `overwrite` property which defaults to `false` and determines whether anything that was appended/prepended to the range will be overwritten along with the original content.
`s.update(start, end, content)` is equivalent to `s.overwrite(start, end, content, { contentOnly: true })`.
## Bundling
To concatenate several sources, use `MagicString.Bundle`:
```js
const bundle = new MagicString.Bundle();
bundle.addSource({
filename: 'foo.js',
content: new MagicString('var answer = 42;')
});
bundle.addSource({
filename: 'bar.js',
content: new MagicString('console.log( answer )')
});
// Sources can be marked as ignore-listed, which provides a hint to debuggers
// to not step into this code and also don't show the source files depending
// on user preferences.
bundle.addSource({
filename: 'some-3rdparty-library.js',
content: new MagicString('function myLib(){}'),
ignoreList: false // <--
})
// Advanced: a source can include an `indentExclusionRanges` property
// alongside `filename` and `content`. This will be passed to `s.indent()`
// - see documentation above
bundle.indent() // optionally, pass an indent string, otherwise it will be guessed
.prepend('(function () {\n')
.append('}());');
bundle.toString();
// (function () {
// var answer = 42;
// console.log( answer );
// }());
// options are as per `s.generateMap()` above
const map = bundle.generateMap({
file: 'bundle.js',
includeContent: true,
hires: true
});
```
As an alternative syntax, if you a) don't have `filename` or `indentExclusionRanges` options, or b) passed those in when you used `new MagicString(...)`, you can simply pass the `MagicString` instance itself:
```js
const bundle = new MagicString.Bundle();
const source = new MagicString(someCode, {
filename: 'foo.js'
});
bundle.addSource(source);
```
## License
MIT
@@ -0,0 +1,13 @@
import type { Collection, PayloadRequest, Where } from 'payload';
export type Resolver = (_: unknown, args: {
data: Record<string, unknown>;
locale?: string;
trash?: boolean;
where?: Where;
}, context: {
req: PayloadRequest;
}) => Promise<{
totalDocs: number;
}>;
export declare function countResolver(collection: Collection): Resolver;
//# sourceMappingURL=count.d.ts.map
@@ -0,0 +1,5 @@
export declare const differenceInWeeks: import("./types.js").FPFn2<
number,
string | number | Date,
string | number | Date
>;
@@ -0,0 +1 @@
{"version":3,"file":"auth.js","names":["login","logout","refresh"],"sources":["../../src/exports/auth.ts"],"sourcesContent":["export { login } from '../auth/login.js'\nexport { logout } from '../auth/logout.js'\nexport { refresh } from '../auth/refresh.js'\n"],"mappings":"AAAA,SAASA,KAAK,QAAQ;AACtB,SAASC,MAAM,QAAQ;AACvB,SAASC,OAAO,QAAQ","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"music-2.js","sources":["../../../src/icons/music-2.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Music2\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSI4IiBjeT0iMTgiIHI9IjQiIC8+CiAgPHBhdGggZD0iTTEyIDE4VjJsNyA0IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/music-2\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 Music2 = createLucideIcon('Music2', [\n ['circle', { cx: '8', cy: '18', r: '4', key: '1fc0mg' }],\n ['path', { d: 'M12 18V2l7 4', key: 'g04rme' }],\n]);\n\nexport default Music2;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,13 @@
const focusableElements = new Set([
"BUTTON",
"INPUT",
"SELECT",
"TEXTAREA",
"A",
]);
function isElementKeyboardAccessible(element) {
return (focusableElements.has(element.tagName) ||
element.tabIndex !== -1);
}
export { isElementKeyboardAccessible };
@@ -0,0 +1,26 @@
import React from 'react';
import { ClientRect, UniqueIdentifier } from '@dnd-kit/core';
import type { Disabled, SortingStrategy } from '../types';
export interface Props {
children: React.ReactNode;
items: (UniqueIdentifier | {
id: UniqueIdentifier;
})[];
strategy?: SortingStrategy;
id?: string;
disabled?: boolean | Disabled;
}
interface ContextDescriptor {
activeIndex: number;
containerId: string;
disabled: Disabled;
disableTransforms: boolean;
items: UniqueIdentifier[];
overIndex: number;
useDragOverlay: boolean;
sortedRects: ClientRect[];
strategy: SortingStrategy;
}
export declare const Context: React.Context<ContextDescriptor>;
export declare function SortableContext({ children, id, items: userDefinedItems, strategy, disabled: disabledProp, }: Props): JSX.Element;
export {};
@@ -0,0 +1,33 @@
import { toDate } from "./toDate.mjs";
/**
* @name getDecade
* @category Decade Helpers
* @summary Get the decade of the given date.
*
* @description
* Get the decade of the given date.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param date - The given date
*
* @returns The year of decade
*
* @example
* // Which decade belongs 27 November 1942?
* const result = getDecade(new Date(1942, 10, 27))
* //=> 1940
*/
export function getDecade(date) {
// TODO: Switch to more technical definition in of decades that start with 1
// end with 0. I.e. 2001-2010 instead of current 2000-2009. It's a breaking
// change, so it can only be done in 4.0.
const _date = toDate(date);
const year = _date.getFullYear();
const decade = Math.floor(year / 10) * 10;
return decade;
}
// Fallback for modularized imports:
export default getDecade;
@@ -0,0 +1,23 @@
declare function stringify(
value: any,
replacer?: (key: string, value: any) => any,
space?: string | number,
options?: { depthLimit: number | undefined; edgesLimit: number | undefined }
): string;
declare namespace stringify {
export function stable(
value: any,
replacer?: (key: string, value: any) => any,
space?: string | number,
options?: { depthLimit: number | undefined; edgesLimit: number | undefined }
): string;
export function stableStringify(
value: any,
replacer?: (key: string, value: any) => any,
space?: string | number,
options?: { depthLimit: number | undefined; edgesLimit: number | undefined }
): string;
}
export default stringify;
@@ -0,0 +1,350 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _decorate;
var _toArray = require("toArray");
var _toPropertyKey = require("toPropertyKey");
function _decorate(decorators, factory, superClass, mixins) {
var api = _getDecoratorsApi();
if (mixins) {
for (var i = 0; i < mixins.length; i++) {
api = mixins[i](api);
}
}
var r = factory(function initialize(O) {
api.initializeInstanceElements(O, decorated.elements);
}, superClass);
var decorated = api.decorateClass(_coalesceClassElements(r.d.map(_createElementDescriptor)), decorators);
api.initializeClassElements(r.F, decorated.elements);
return api.runClassFinishers(r.F, decorated.finishers);
}
function _getDecoratorsApi() {
_getDecoratorsApi = function () {
return api;
};
var api = {
elementsDefinitionOrder: [["method"], ["field"]],
initializeInstanceElements: function (O, elements) {
["method", "field"].forEach(function (kind) {
elements.forEach(function (element) {
if (element.kind === kind && element.placement === "own") {
this.defineClassElement(O, element);
}
}, this);
}, this);
},
initializeClassElements: function (F, elements) {
var proto = F.prototype;
["method", "field"].forEach(function (kind) {
elements.forEach(function (element) {
var placement = element.placement;
if (element.kind === kind && (placement === "static" || placement === "prototype")) {
var receiver = placement === "static" ? F : proto;
this.defineClassElement(receiver, element);
}
}, this);
}, this);
},
defineClassElement: function (receiver, element) {
var descriptor = element.descriptor;
if (element.kind === "field") {
var initializer = element.initializer;
descriptor = {
enumerable: descriptor.enumerable,
writable: descriptor.writable,
configurable: descriptor.configurable,
value: initializer === void 0 ? void 0 : initializer.call(receiver)
};
}
Object.defineProperty(receiver, element.key, descriptor);
},
decorateClass: function (elements, decorators) {
var newElements = [];
var finishers = [];
var placements = {
static: [],
prototype: [],
own: []
};
elements.forEach(function (element) {
this.addElementPlacement(element, placements);
}, this);
elements.forEach(function (element) {
if (!_hasDecorators(element)) return newElements.push(element);
var elementFinishersExtras = this.decorateElement(element, placements);
newElements.push(elementFinishersExtras.element);
newElements.push.apply(newElements, elementFinishersExtras.extras);
finishers.push.apply(finishers, elementFinishersExtras.finishers);
}, this);
if (!decorators) {
return {
elements: newElements,
finishers: finishers
};
}
var result = this.decorateConstructor(newElements, decorators);
finishers.push.apply(finishers, result.finishers);
result.finishers = finishers;
return result;
},
addElementPlacement: function (element, placements, silent) {
var keys = placements[element.placement];
if (!silent && keys.indexOf(element.key) !== -1) {
throw new TypeError("Duplicated element (" + element.key + ")");
}
keys.push(element.key);
},
decorateElement: function (element, placements) {
var extras = [];
var finishers = [];
for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {
var keys = placements[element.placement];
keys.splice(keys.indexOf(element.key), 1);
var elementObject = this.fromElementDescriptor(element);
var elementFinisherExtras = this.toElementFinisherExtras((0, decorators[i])(elementObject) || elementObject);
element = elementFinisherExtras.element;
this.addElementPlacement(element, placements);
if (elementFinisherExtras.finisher) {
finishers.push(elementFinisherExtras.finisher);
}
var newExtras = elementFinisherExtras.extras;
if (newExtras) {
for (var j = 0; j < newExtras.length; j++) {
this.addElementPlacement(newExtras[j], placements);
}
extras.push.apply(extras, newExtras);
}
}
return {
element: element,
finishers: finishers,
extras: extras
};
},
decorateConstructor: function (elements, decorators) {
var finishers = [];
for (var i = decorators.length - 1; i >= 0; i--) {
var obj = this.fromClassDescriptor(elements);
var elementsAndFinisher = this.toClassDescriptor((0, decorators[i])(obj) || obj);
if (elementsAndFinisher.finisher !== undefined) {
finishers.push(elementsAndFinisher.finisher);
}
if (elementsAndFinisher.elements !== undefined) {
elements = elementsAndFinisher.elements;
for (var j = 0; j < elements.length - 1; j++) {
for (var k = j + 1; k < elements.length; k++) {
if (elements[j].key === elements[k].key && elements[j].placement === elements[k].placement) {
throw new TypeError("Duplicated element (" + elements[j].key + ")");
}
}
}
}
}
return {
elements: elements,
finishers: finishers
};
},
fromElementDescriptor: function (element) {
var obj = {
kind: element.kind,
key: element.key,
placement: element.placement,
descriptor: element.descriptor
};
var desc = {
value: "Descriptor",
configurable: true
};
Object.defineProperty(obj, Symbol.toStringTag, desc);
if (element.kind === "field") obj.initializer = element.initializer;
return obj;
},
toElementDescriptors: function (elementObjects) {
if (elementObjects === undefined) return;
return _toArray(elementObjects).map(function (elementObject) {
var element = this.toElementDescriptor(elementObject);
this.disallowProperty(elementObject, "finisher", "An element descriptor");
this.disallowProperty(elementObject, "extras", "An element descriptor");
return element;
}, this);
},
toElementDescriptor: function (elementObject) {
var kind = String(elementObject.kind);
if (kind !== "method" && kind !== "field") {
throw new TypeError('An element descriptor\'s .kind property must be either "method" or' + ' "field", but a decorator created an element descriptor with' + ' .kind "' + kind + '"');
}
var key = _toPropertyKey(elementObject.key);
var placement = String(elementObject.placement);
if (placement !== "static" && placement !== "prototype" && placement !== "own") {
throw new TypeError('An element descriptor\'s .placement property must be one of "static",' + ' "prototype" or "own", but a decorator created an element descriptor' + ' with .placement "' + placement + '"');
}
var descriptor = elementObject.descriptor;
this.disallowProperty(elementObject, "elements", "An element descriptor");
var element = {
kind: kind,
key: key,
placement: placement,
descriptor: Object.assign({}, descriptor)
};
if (kind !== "field") {
this.disallowProperty(elementObject, "initializer", "A method descriptor");
} else {
this.disallowProperty(descriptor, "get", "The property descriptor of a field descriptor");
this.disallowProperty(descriptor, "set", "The property descriptor of a field descriptor");
this.disallowProperty(descriptor, "value", "The property descriptor of a field descriptor");
element.initializer = elementObject.initializer;
}
return element;
},
toElementFinisherExtras: function (elementObject) {
var element = this.toElementDescriptor(elementObject);
var finisher = _optionalCallableProperty(elementObject, "finisher");
var extras = this.toElementDescriptors(elementObject.extras);
return {
element: element,
finisher: finisher,
extras: extras
};
},
fromClassDescriptor: function (elements) {
var obj = {
kind: "class",
elements: elements.map(this.fromElementDescriptor, this)
};
var desc = {
value: "Descriptor",
configurable: true
};
Object.defineProperty(obj, Symbol.toStringTag, desc);
return obj;
},
toClassDescriptor: function (obj) {
var kind = String(obj.kind);
if (kind !== "class") {
throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator' + ' created a class descriptor with .kind "' + kind + '"');
}
this.disallowProperty(obj, "key", "A class descriptor");
this.disallowProperty(obj, "placement", "A class descriptor");
this.disallowProperty(obj, "descriptor", "A class descriptor");
this.disallowProperty(obj, "initializer", "A class descriptor");
this.disallowProperty(obj, "extras", "A class descriptor");
var finisher = _optionalCallableProperty(obj, "finisher");
var elements = this.toElementDescriptors(obj.elements);
return {
elements: elements,
finisher: finisher
};
},
runClassFinishers: function (constructor, finishers) {
for (var i = 0; i < finishers.length; i++) {
var newConstructor = (0, finishers[i])(constructor);
if (newConstructor !== undefined) {
if (typeof newConstructor !== "function") {
throw new TypeError("Finishers must return a constructor.");
}
constructor = newConstructor;
}
}
return constructor;
},
disallowProperty: function (obj, name, objectType) {
if (obj[name] !== undefined) {
throw new TypeError(objectType + " can't have a ." + name + " property.");
}
}
};
return api;
}
function _createElementDescriptor(def) {
var key = _toPropertyKey(def.key);
var descriptor;
if (def.kind === "method") {
descriptor = {
value: def.value,
writable: true,
configurable: true,
enumerable: false
};
} else if (def.kind === "get") {
descriptor = {
get: def.value,
configurable: true,
enumerable: false
};
} else if (def.kind === "set") {
descriptor = {
set: def.value,
configurable: true,
enumerable: false
};
} else if (def.kind === "field") {
descriptor = {
configurable: true,
writable: true,
enumerable: true
};
}
var element = {
kind: def.kind === "field" ? "field" : "method",
key: key,
placement: def.static ? "static" : def.kind === "field" ? "own" : "prototype",
descriptor: descriptor
};
if (def.decorators) element.decorators = def.decorators;
if (def.kind === "field") element.initializer = def.value;
return element;
}
function _coalesceGetterSetter(element, other) {
if (element.descriptor.get !== undefined) {
other.descriptor.get = element.descriptor.get;
} else {
other.descriptor.set = element.descriptor.set;
}
}
function _coalesceClassElements(elements) {
var newElements = [];
var isSameElement = function (other) {
return other.kind === "method" && other.key === element.key && other.placement === element.placement;
};
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var other;
if (element.kind === "method" && (other = newElements.find(isSameElement))) {
if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {
if (_hasDecorators(element) || _hasDecorators(other)) {
throw new ReferenceError("Duplicated methods (" + element.key + ") can't be decorated.");
}
other.descriptor = element.descriptor;
} else {
if (_hasDecorators(element)) {
if (_hasDecorators(other)) {
throw new ReferenceError("Decorators can't be placed on different accessors with for " + "the same property (" + element.key + ").");
}
other.decorators = element.decorators;
}
_coalesceGetterSetter(element, other);
}
} else {
newElements.push(element);
}
}
return newElements;
}
function _hasDecorators(element) {
return element.decorators && element.decorators.length;
}
function _isDataDescriptor(desc) {
return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);
}
function _optionalCallableProperty(obj, name) {
var value = obj[name];
if (value !== undefined && typeof value !== "function") {
throw new TypeError("Expected '" + name + "' to be a function");
}
return value;
}
//# sourceMappingURL=decorate.js.map
@@ -0,0 +1,513 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const { SyncWaterfallHook } = require("tapable");
const Compilation = require("../Compilation");
const { CSS_TYPE } = require("../ModuleSourceTypeConstants");
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
const Template = require("../Template");
const compileBooleanMatcher = require("../util/compileBooleanMatcher");
const { chunkHasCss } = require("./CssModulesPlugin");
/** @typedef {import("../Chunk")} Chunk */
/** @typedef {import("../Chunk").ChunkId} ChunkId */
/** @typedef {import("../ChunkGraph")} ChunkGraph */
/** @typedef {import("../Module").ReadOnlyRuntimeRequirements} ReadOnlyRuntimeRequirements */
/**
* @typedef {object} CssLoadingRuntimeModulePluginHooks
* @property {SyncWaterfallHook<[string, Chunk]>} createStylesheet
* @property {SyncWaterfallHook<[string, Chunk]>} linkPreload
* @property {SyncWaterfallHook<[string, Chunk]>} linkPrefetch
*/
/** @type {WeakMap<Compilation, CssLoadingRuntimeModulePluginHooks>} */
const compilationHooksMap = new WeakMap();
class CssLoadingRuntimeModule extends RuntimeModule {
/**
* @param {Compilation} compilation the compilation
* @returns {CssLoadingRuntimeModulePluginHooks} hooks
*/
static getCompilationHooks(compilation) {
if (!(compilation instanceof Compilation)) {
throw new TypeError(
"The 'compilation' argument must be an instance of Compilation"
);
}
let hooks = compilationHooksMap.get(compilation);
if (hooks === undefined) {
hooks = {
createStylesheet: new SyncWaterfallHook(["source", "chunk"]),
linkPreload: new SyncWaterfallHook(["source", "chunk"]),
linkPrefetch: new SyncWaterfallHook(["source", "chunk"])
};
compilationHooksMap.set(compilation, hooks);
}
return hooks;
}
/**
* @param {ReadOnlyRuntimeRequirements} runtimeRequirements runtime requirements
*/
constructor(runtimeRequirements) {
super("css loading", 10);
this._runtimeRequirements = runtimeRequirements;
}
/**
* @returns {string | null} runtime code
*/
generate() {
const { _runtimeRequirements } = this;
const compilation = /** @type {Compilation} */ (this.compilation);
const chunk = /** @type {Chunk} */ (this.chunk);
const {
chunkGraph,
runtimeTemplate,
outputOptions: {
crossOriginLoading,
uniqueName,
chunkLoadTimeout: loadTimeout,
charset
}
} = compilation;
const fn = RuntimeGlobals.ensureChunkHandlers;
const conditionMap = chunkGraph.getChunkConditionMap(
chunk,
/**
* @param {Chunk} chunk the chunk
* @param {ChunkGraph} chunkGraph the chunk graph
* @returns {boolean} true, if the chunk has css
*/
(chunk, chunkGraph) =>
Boolean(chunkGraph.getChunkModulesIterableBySourceType(chunk, CSS_TYPE))
);
const hasCssMatcher = compileBooleanMatcher(conditionMap);
const withLoading =
_runtimeRequirements.has(RuntimeGlobals.ensureChunkHandlers) &&
hasCssMatcher !== false;
/** @type {boolean} */
const withHmr = _runtimeRequirements.has(
RuntimeGlobals.hmrDownloadUpdateHandlers
);
/** @type {Set<ChunkId>} */
const initialChunkIds = new Set();
for (const c of chunk.getAllInitialChunks()) {
if (chunkHasCss(c, chunkGraph)) {
initialChunkIds.add(/** @type {ChunkId} */ (c.id));
}
}
if (!withLoading && !withHmr) {
return null;
}
const environment = compilation.outputOptions.environment;
const isNeutralPlatform = runtimeTemplate.isNeutralPlatform();
const withPrefetch =
this._runtimeRequirements.has(RuntimeGlobals.prefetchChunkHandlers) &&
(environment.document || isNeutralPlatform) &&
chunk.hasChildByOrder(chunkGraph, "prefetch", true, chunkHasCss);
const withPreload =
this._runtimeRequirements.has(RuntimeGlobals.preloadChunkHandlers) &&
(environment.document || isNeutralPlatform) &&
chunk.hasChildByOrder(chunkGraph, "preload", true, chunkHasCss);
const { linkPreload, linkPrefetch } =
CssLoadingRuntimeModule.getCompilationHooks(compilation);
const withFetchPriority = _runtimeRequirements.has(
RuntimeGlobals.hasFetchPriority
);
const { createStylesheet } =
CssLoadingRuntimeModule.getCompilationHooks(compilation);
const stateExpression = withHmr
? `${RuntimeGlobals.hmrRuntimeStatePrefix}_css`
: undefined;
const code = Template.asString([
"link = document.createElement('link');",
charset ? "link.charset = 'utf-8';" : "",
`if (${RuntimeGlobals.scriptNonce}) {`,
Template.indent(
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
),
"}",
uniqueName
? 'link.setAttribute("data-webpack", uniqueName + ":" + key);'
: "",
withFetchPriority
? Template.asString([
"if(fetchPriority) {",
Template.indent(
'link.setAttribute("fetchpriority", fetchPriority);'
),
"}"
])
: "",
"link.setAttribute(loadingAttribute, 1);",
'link.rel = "stylesheet";',
"link.href = url;",
crossOriginLoading
? crossOriginLoading === "use-credentials"
? 'link.crossOrigin = "use-credentials";'
: Template.asString([
"if (link.href.indexOf(window.location.origin + '/') !== 0) {",
Template.indent(
`link.crossOrigin = ${JSON.stringify(crossOriginLoading)};`
),
"}"
])
: ""
]);
return Template.asString([
"// object to store loaded and loading chunks",
"// undefined = chunk not loaded, null = chunk preloaded/prefetched",
"// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded",
`var installedChunks = ${
stateExpression ? `${stateExpression} = ${stateExpression} || ` : ""
}{`,
Template.indent(
Array.from(initialChunkIds, (id) => `${JSON.stringify(id)}: 0`).join(
",\n"
)
),
"};",
"",
uniqueName
? `var uniqueName = ${JSON.stringify(
runtimeTemplate.outputOptions.uniqueName
)};`
: "// data-webpack is not used as build has no uniqueName",
withLoading || withHmr
? Template.asString([
'var loadingAttribute = "data-webpack-loading";',
`var loadStylesheet = ${runtimeTemplate.basicFunction(
`chunkId, url, done${
withFetchPriority ? ", fetchPriority" : ""
}${withHmr ? ", hmr" : ""}`,
[
'var link, needAttach, key = "chunk-" + chunkId;',
withHmr ? "if(!hmr) {" : "",
'var links = document.getElementsByTagName("link");',
"for(var i = 0; i < links.length; i++) {",
Template.indent([
"var l = links[i];",
`if(l.rel == "stylesheet" && (${
withHmr
? 'l.href.startsWith(url) || l.getAttribute("href").startsWith(url)'
: 'l.href == url || l.getAttribute("href") == url'
}${
uniqueName
? ' || l.getAttribute("data-webpack") == uniqueName + ":" + key'
: ""
})) { link = l; break; }`
]),
"}",
"if(!done) return link;",
withHmr ? "}" : "",
"if(!link) {",
Template.indent([
"needAttach = true;",
createStylesheet.call(code, /** @type {Chunk} */ (this.chunk))
]),
"}",
`var onLinkComplete = ${runtimeTemplate.basicFunction(
"prev, event",
Template.asString([
"link.onerror = link.onload = null;",
"link.removeAttribute(loadingAttribute);",
"clearTimeout(timeout);",
'if(event && event.type != "load") link.parentNode.removeChild(link)',
"done(event);",
"if(prev) return prev(event);"
])
)};`,
"if(link.getAttribute(loadingAttribute)) {",
Template.indent([
`var timeout = setTimeout(onLinkComplete.bind(null, undefined, { type: 'timeout', target: link }), ${loadTimeout});`,
"link.onerror = onLinkComplete.bind(null, link.onerror);",
"link.onload = onLinkComplete.bind(null, link.onload);"
]),
"} else onLinkComplete(undefined, { type: 'load', target: link });", // We assume any existing stylesheet is render blocking
withHmr && withFetchPriority
? 'if (hmr && hmr.getAttribute("fetchpriority")) link.setAttribute("fetchpriority", hmr.getAttribute("fetchpriority"));'
: "",
withHmr ? "hmr ? document.head.insertBefore(link, hmr) :" : "",
"needAttach && document.head.appendChild(link);",
"return link;"
]
)};`
])
: "",
withLoading
? Template.asString([
`${fn}.css = ${runtimeTemplate.basicFunction(
`chunkId, promises${withFetchPriority ? " , fetchPriority" : ""}`,
[
"// css chunk loading",
`var installedChunkData = ${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;`,
'if(installedChunkData !== 0) { // 0 means "already installed".',
Template.indent([
"",
'// a Promise means "currently loading".',
"if(installedChunkData) {",
Template.indent(["promises.push(installedChunkData[2]);"]),
"} else {",
Template.indent([
hasCssMatcher === true
? "if(true) { // all chunks have CSS"
: `if(${hasCssMatcher("chunkId")}) {`,
Template.indent([
"// setup Promise in chunk cache",
`var promise = new Promise(${runtimeTemplate.expressionFunction(
"installedChunkData = installedChunks[chunkId] = [resolve, reject]",
"resolve, reject"
)});`,
"promises.push(installedChunkData[2] = promise);",
"",
"// start chunk loading",
`var url = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkCssFilename}(chunkId);`,
"// create error before stack unwound to get useful stacktrace later",
"var error = new Error();",
`var loadingEnded = ${runtimeTemplate.basicFunction(
"event",
[
`if(${RuntimeGlobals.hasOwnProperty}(installedChunks, chunkId)) {`,
Template.indent([
"installedChunkData = installedChunks[chunkId];",
"if(installedChunkData !== 0) installedChunks[chunkId] = undefined;",
"if(installedChunkData) {",
Template.indent([
'if(event.type !== "load") {',
Template.indent([
"var errorType = event && event.type;",
"var realHref = event && event.target && event.target.href;",
"error.message = 'Loading css chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realHref + ')';",
"error.name = 'ChunkLoadError';",
"error.type = errorType;",
"error.request = realHref;",
"installedChunkData[1](error);"
]),
"} else {",
Template.indent([
"installedChunks[chunkId] = 0;",
"installedChunkData[0]();"
]),
"}"
]),
"}"
]),
"}"
]
)};`,
isNeutralPlatform
? "if (typeof document !== 'undefined') {"
: "",
Template.indent([
`loadStylesheet(chunkId, url, loadingEnded${
withFetchPriority ? ", fetchPriority" : ""
});`
]),
isNeutralPlatform
? "} else { loadingEnded({ type: 'load' }); }"
: ""
]),
"} else installedChunks[chunkId] = 0;"
]),
"}"
]),
"}"
]
)};`
])
: "// no chunk loading",
"",
withPrefetch && hasCssMatcher !== false
? `${
RuntimeGlobals.prefetchChunkHandlers
}.s = ${runtimeTemplate.basicFunction("chunkId", [
`if((!${
RuntimeGlobals.hasOwnProperty
}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${
hasCssMatcher === true ? "true" : hasCssMatcher("chunkId")
}) {`,
Template.indent([
"installedChunks[chunkId] = null;",
isNeutralPlatform
? "if (typeof document === 'undefined') return;"
: "",
linkPrefetch.call(
Template.asString([
"var link = document.createElement('link');",
charset ? "link.charset = 'utf-8';" : "",
crossOriginLoading
? `link.crossOrigin = ${JSON.stringify(
crossOriginLoading
)};`
: "",
`if (${RuntimeGlobals.scriptNonce}) {`,
Template.indent(
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
),
"}",
'link.rel = "prefetch";',
'link.as = "style";',
`link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkCssFilename}(chunkId);`
]),
chunk
),
"document.head.appendChild(link);"
]),
"}"
])};`
: "// no prefetching",
"",
withPreload && hasCssMatcher !== false
? `${
RuntimeGlobals.preloadChunkHandlers
}.s = ${runtimeTemplate.basicFunction("chunkId", [
`if((!${
RuntimeGlobals.hasOwnProperty
}(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && ${
hasCssMatcher === true ? "true" : hasCssMatcher("chunkId")
}) {`,
Template.indent([
"installedChunks[chunkId] = null;",
isNeutralPlatform
? "if (typeof document === 'undefined') return;"
: "",
linkPreload.call(
Template.asString([
"var link = document.createElement('link');",
charset ? "link.charset = 'utf-8';" : "",
`if (${RuntimeGlobals.scriptNonce}) {`,
Template.indent(
`link.setAttribute("nonce", ${RuntimeGlobals.scriptNonce});`
),
"}",
'link.rel = "preload";',
'link.as = "style";',
`link.href = ${RuntimeGlobals.publicPath} + ${RuntimeGlobals.getChunkCssFilename}(chunkId);`,
crossOriginLoading
? crossOriginLoading === "use-credentials"
? 'link.crossOrigin = "use-credentials";'
: Template.asString([
"if (link.href.indexOf(window.location.origin + '/') !== 0) {",
Template.indent(
`link.crossOrigin = ${JSON.stringify(
crossOriginLoading
)};`
),
"}"
])
: ""
]),
chunk
),
"document.head.appendChild(link);"
]),
"}"
])};`
: "// no preloaded",
withHmr
? Template.asString([
"var oldTags = [];",
"var newTags = [];",
`var applyHandler = ${runtimeTemplate.basicFunction("options", [
`return { dispose: ${runtimeTemplate.basicFunction("", [
"while(oldTags.length) {",
Template.indent([
"var oldTag = oldTags.pop();",
"if(oldTag && oldTag.parentNode) oldTag.parentNode.removeChild(oldTag);"
]),
"}"
])}, apply: ${runtimeTemplate.basicFunction("", [
"while(newTags.length) {",
Template.indent([
"var newTag = newTags.pop();",
"newTag.sheet.disabled = false"
]),
"}"
])} };`
])}`,
`var cssTextKey = ${runtimeTemplate.returningFunction(
`Array.from(link.sheet.cssRules, ${runtimeTemplate.returningFunction(
"r.cssText",
"r"
)}).join()`,
"link"
)};`,
`${
RuntimeGlobals.hmrDownloadUpdateHandlers
}.css = ${runtimeTemplate.basicFunction(
"chunkIds, removedChunks, removedModules, promises, applyHandlers, updatedModulesList, css",
[
isNeutralPlatform
? "if (typeof document === 'undefined') return;"
: "",
"applyHandlers.push(applyHandler);",
"// Read CSS removed chunks from update manifest",
"var cssRemovedChunks = css && css.r;",
`chunkIds.forEach(${runtimeTemplate.basicFunction("chunkId", [
`var filename = ${RuntimeGlobals.getChunkCssFilename}(chunkId);`,
`var url = ${RuntimeGlobals.publicPath} + filename;`,
"var oldTag = loadStylesheet(chunkId, url);",
`if(!oldTag && !${withHmr} ) return;`,
"// Skip if CSS was removed",
"if(cssRemovedChunks && cssRemovedChunks.indexOf(chunkId) >= 0) {",
Template.indent(["oldTags.push(oldTag);", "return;"]),
"}",
"",
"// create error before stack unwound to get useful stacktrace later",
"var error = new Error();",
`promises.push(new Promise(${runtimeTemplate.basicFunction(
"resolve, reject",
[
`var link = loadStylesheet(chunkId, url + (url.indexOf("?") < 0 ? "?" : "&") + "hmr=" + Date.now(), ${runtimeTemplate.basicFunction(
"event",
[
'if(event.type !== "load") {',
Template.indent([
"var errorType = event && event.type;",
"var realHref = event && event.target && event.target.href;",
"error.message = 'Loading css hot update chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realHref + ')';",
"error.name = 'ChunkLoadError';",
"error.type = errorType;",
"error.request = realHref;",
"reject(error);"
]),
"} else {",
Template.indent([
"try { if(cssTextKey(oldTag) == cssTextKey(link)) { if(link.parentNode) link.parentNode.removeChild(link); return resolve(); } } catch(e) {}",
"link.sheet.disabled = true;",
"oldTags.push(oldTag);",
"newTags.push(link);",
"resolve();"
]),
"}"
]
)}, ${withFetchPriority ? "undefined," : ""} oldTag);`
]
)}));`
])});`
]
)}`
])
: "// no hmr"
]);
}
}
module.exports = CssLoadingRuntimeModule;
@@ -0,0 +1,209 @@
import { buildLocalizeFn } from "../../_lib/buildLocalizeFn.js";
const eraValues = {
narrow: ["לפנה״ס", "לספירה"],
abbreviated: ["לפנה״ס", "לספירה"],
wide: ["לפני הספירה", "לספירה"],
};
const quarterValues = {
narrow: ["1", "2", "3", "4"],
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
wide: ["רבעון 1", "רבעון 2", "רבעון 3", "רבעון 4"],
};
const monthValues = {
narrow: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
abbreviated: [
"ינו׳",
"פבר׳",
"מרץ",
"אפר׳",
"מאי",
"יוני",
"יולי",
"אוג׳",
"ספט׳",
"אוק׳",
"נוב׳",
"דצמ׳",
],
wide: [
"ינואר",
"פברואר",
"מרץ",
"אפריל",
"מאי",
"יוני",
"יולי",
"אוגוסט",
"ספטמבר",
"אוקטובר",
"נובמבר",
"דצמבר",
],
};
const dayValues = {
narrow: ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"],
short: ["א׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"],
abbreviated: [
"יום א׳",
"יום ב׳",
"יום ג׳",
"יום ד׳",
"יום ה׳",
"יום ו׳",
"שבת",
],
wide: [
"יום ראשון",
"יום שני",
"יום שלישי",
"יום רביעי",
"יום חמישי",
"יום שישי",
"יום שבת",
],
};
const dayPeriodValues = {
narrow: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בוקר",
afternoon: "אחר הצהריים",
evening: "ערב",
night: "לילה",
},
abbreviated: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בוקר",
afternoon: "אחר הצהריים",
evening: "ערב",
night: "לילה",
},
wide: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בוקר",
afternoon: "אחר הצהריים",
evening: "ערב",
night: "לילה",
},
};
const formattingDayPeriodValues = {
narrow: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בבוקר",
afternoon: "בצהריים",
evening: "בערב",
night: "בלילה",
},
abbreviated: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בבוקר",
afternoon: "אחר הצהריים",
evening: "בערב",
night: "בלילה",
},
wide: {
am: "לפנה״צ",
pm: "אחה״צ",
midnight: "חצות",
noon: "צהריים",
morning: "בבוקר",
afternoon: "אחר הצהריים",
evening: "בערב",
night: "בלילה",
},
};
const ordinalNumber = (dirtyNumber, options) => {
const number = Number(dirtyNumber);
// We only show words till 10
if (number <= 0 || number > 10) return String(number);
const unit = String(options?.unit);
const isFemale = ["year", "hour", "minute", "second"].indexOf(unit) >= 0;
const male = [
"ראשון",
"שני",
"שלישי",
"רביעי",
"חמישי",
"שישי",
"שביעי",
"שמיני",
"תשיעי",
"עשירי",
];
const female = [
"ראשונה",
"שנייה",
"שלישית",
"רביעית",
"חמישית",
"שישית",
"שביעית",
"שמינית",
"תשיעית",
"עשירית",
];
const index = number - 1;
return isFemale ? female[index] : male[index];
};
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",
formattingValues: formattingDayPeriodValues,
defaultFormattingWidth: "wide",
}),
};
@@ -0,0 +1 @@
{"version":3,"file":"heading-5.js","sources":["../../../src/icons/heading-5.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Heading5\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNNCAxMmg4IiAvPgogIDxwYXRoIGQ9Ik00IDE4VjYiIC8+CiAgPHBhdGggZD0iTTEyIDE4VjYiIC8+CiAgPHBhdGggZD0iTTE3IDEzdi0zaDQiIC8+CiAgPHBhdGggZD0iTTE3IDE3LjdjLjQuMi44LjMgMS4zLjMgMS41IDAgMi43LTEuMSAyLjctMi41UzE5LjggMTMgMTguMyAxM0gxNyIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/heading-5\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 Heading5 = createLucideIcon('Heading5', [\n ['path', { d: 'M4 12h8', key: '17cfdx' }],\n ['path', { d: 'M4 18V6', key: '1rz3zl' }],\n ['path', { d: 'M12 18V6', key: 'zqpxq5' }],\n ['path', { d: 'M17 13v-3h4', key: '1nvgqp' }],\n [\n 'path',\n { d: 'M17 17.7c.4.2.8.3 1.3.3 1.5 0 2.7-1.1 2.7-2.5S19.8 13 18.3 13H17', key: '2nebdn' },\n ],\n]);\n\nexport default Heading5;\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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC5C,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,CAAoE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CACzF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_private_field_init.cjs",
"module": "../../esm/_class_private_field_init.js"
}
@@ -0,0 +1,9 @@
'use strict'
const SemVer = require('../classes/semver')
const compareBuild = (a, b, loose) => {
const versionA = new SemVer(a, loose)
const versionB = new SemVer(b, loose)
return versionA.compare(versionB) || versionA.compareBuild(versionB)
}
module.exports = compareBuild
@@ -0,0 +1,39 @@
import { buildFormatLongFn } from "../../_lib/buildFormatLongFn.mjs";
const dateFormats = {
full: "EEEE d MMMM y",
long: "d MMMM y",
medium: "d MMM y",
short: "dd.MM.y",
};
const timeFormats = {
full: "HH:mm:ss zzzz",
long: "HH:mm:ss z",
medium: "HH:mm:ss",
short: "HH:mm",
};
const dateTimeFormats = {
full: "{{date}} {{time}}",
long: "{{date}} {{time}}",
medium: "{{date}} {{time}}",
short: "{{date}} {{time}}",
};
export const formatLong = {
date: buildFormatLongFn({
formats: dateFormats,
defaultWidth: "full",
}),
time: buildFormatLongFn({
formats: timeFormats,
defaultWidth: "full",
}),
dateTime: buildFormatLongFn({
formats: dateTimeFormats,
defaultWidth: "full",
}),
};
@@ -0,0 +1,29 @@
import type { ColumnBuilderBaseConfig } from "../../column-builder.cjs";
import type { ColumnBaseConfig } from "../../column.cjs";
import { entityKind } from "../../entity.cjs";
import { MySqlColumnBuilderWithAutoIncrement, MySqlColumnWithAutoIncrement } from "./common.cjs";
export type MySqlRealBuilderInitial<TName extends string> = MySqlRealBuilder<{
name: TName;
dataType: 'number';
columnType: 'MySqlReal';
data: number;
driverParam: number | string;
enumValues: undefined;
}>;
export declare class MySqlRealBuilder<T extends ColumnBuilderBaseConfig<'number', 'MySqlReal'>> extends MySqlColumnBuilderWithAutoIncrement<T, MySqlRealConfig> {
static readonly [entityKind]: string;
constructor(name: T['name'], config: MySqlRealConfig | undefined);
}
export declare class MySqlReal<T extends ColumnBaseConfig<'number', 'MySqlReal'>> extends MySqlColumnWithAutoIncrement<T, MySqlRealConfig> {
static readonly [entityKind]: string;
precision: number | undefined;
scale: number | undefined;
getSQLType(): string;
}
export interface MySqlRealConfig {
precision?: number;
scale?: number;
}
export declare function real(): MySqlRealBuilderInitial<''>;
export declare function real(config?: MySqlRealConfig): MySqlRealBuilderInitial<''>;
export declare function real<TName extends string>(name: TName, config?: MySqlRealConfig): MySqlRealBuilderInitial<TName>;
@@ -0,0 +1,10 @@
"use strict";
exports.addSeconds = void 0;
var _index = require("../addSeconds.js");
var _index2 = require("./_lib/convertToFP.js"); // This file is generated automatically by `scripts/build/fp.ts`. Please, don't change it.
const addSeconds = (exports.addSeconds = (0, _index2.convertToFP)(
_index.addSeconds,
2,
));
@@ -0,0 +1,9 @@
/**
* @license lucide-react v0.441.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
export { default } from './user-round.js';
//# sourceMappingURL=user-2.js.map
@@ -0,0 +1,152 @@
import {JSONSchema4, JSONSchema4Type, JSONSchema4TypeName} from 'json-schema'
import {isPlainObject, memoize} from 'lodash'
export type SchemaType =
| 'ALL_OF'
| 'UNNAMED_SCHEMA'
| 'ANY'
| 'ANY_OF'
| 'BOOLEAN'
| 'NAMED_ENUM'
| 'NAMED_SCHEMA'
| 'NEVER'
| 'NULL'
| 'NUMBER'
| 'STRING'
| 'OBJECT'
| 'ONE_OF'
| 'TYPED_ARRAY'
| 'REFERENCE'
| 'UNION'
| 'UNNAMED_ENUM'
| 'UNTYPED_ARRAY'
| 'CUSTOM_TYPE'
export type JSONSchemaTypeName = JSONSchema4TypeName
export type JSONSchemaType = JSONSchema4Type
export interface JSONSchema extends JSONSchema4 {
/**
* schema extension to support numeric enums
*/
tsEnumNames?: string[]
/**
* schema extension to support custom types
*/
tsType?: string
/**
* property exists at least in https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.3
*/
deprecated?: boolean
}
export const Parent = Symbol('Parent')
export interface LinkedJSONSchema extends JSONSchema {
/**
* A reference to this schema's parent node, for convenience.
* `null` when this is the root schema.
*/
[Parent]: LinkedJSONSchema | null
additionalItems?: boolean | LinkedJSONSchema
additionalProperties?: boolean | LinkedJSONSchema
items?: LinkedJSONSchema | LinkedJSONSchema[]
definitions?: {
[k: string]: LinkedJSONSchema
}
properties?: {
[k: string]: LinkedJSONSchema
}
patternProperties?: {
[k: string]: LinkedJSONSchema
}
dependencies?: {
[k: string]: LinkedJSONSchema | string[]
}
allOf?: LinkedJSONSchema[]
anyOf?: LinkedJSONSchema[]
oneOf?: LinkedJSONSchema[]
not?: LinkedJSONSchema
}
export const Types = Symbol('Types')
export const Intersection = Symbol('Intersection')
/**
* Normalized JSON schema.
*
* Note: `definitions` and `id` are removed by the normalizer. Use `$defs` and `$id` instead.
*/
export interface NormalizedJSONSchema extends Omit<LinkedJSONSchema, 'definitions' | 'id'> {
[Intersection]?: NormalizedJSONSchema
[Parent]: NormalizedJSONSchema | null
[Types]: ReadonlySet<SchemaType>
additionalItems?: boolean | NormalizedJSONSchema
additionalProperties: boolean | NormalizedJSONSchema
extends?: string[]
items?: NormalizedJSONSchema | NormalizedJSONSchema[]
$defs?: {
[k: string]: NormalizedJSONSchema
}
properties?: {
[k: string]: NormalizedJSONSchema
}
patternProperties?: {
[k: string]: NormalizedJSONSchema
}
dependencies?: {
[k: string]: NormalizedJSONSchema | string[]
}
allOf?: NormalizedJSONSchema[]
anyOf?: NormalizedJSONSchema[]
oneOf?: NormalizedJSONSchema[]
not?: NormalizedJSONSchema
required: string[]
}
export interface EnumJSONSchema extends NormalizedJSONSchema {
enum: JSONSchema4Type[]
}
export interface NamedEnumJSONSchema extends NormalizedJSONSchema {
tsEnumNames: string[]
}
export interface SchemaSchema extends NormalizedJSONSchema {
properties: {
[k: string]: NormalizedJSONSchema
}
required: string[]
}
export interface JSONSchemaWithDefinitions extends NormalizedJSONSchema {
$defs: {
[k: string]: NormalizedJSONSchema
}
}
export interface CustomTypeJSONSchema extends NormalizedJSONSchema {
tsType: string
}
export const getRootSchema = memoize((schema: NormalizedJSONSchema): NormalizedJSONSchema => {
const parent = schema[Parent]
if (!parent) {
return schema
}
return getRootSchema(parent)
})
export function isBoolean(schema: LinkedJSONSchema | JSONSchemaType): schema is boolean {
return schema === true || schema === false
}
export function isPrimitive(schema: LinkedJSONSchema | JSONSchemaType): schema is JSONSchemaType {
return !isPlainObject(schema)
}
export function isCompound(schema: JSONSchema): boolean {
return Array.isArray(schema.type) || 'anyOf' in schema || 'oneOf' in schema
}
@@ -0,0 +1,17 @@
var copyObject = require('./_copyObject'),
keysIn = require('./keysIn');
/**
* The base implementation of `_.assignIn` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssignIn(object, source) {
return object && copyObject(source, keysIn(source), object);
}
module.exports = baseAssignIn;
@@ -0,0 +1 @@
{"version":3,"file":"getCustomDocumentViewByKey.d.ts","sourceRoot":"","sources":["../../../src/views/Document/getCustomDocumentViewByKey.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAElG,eAAO,MAAM,0BAA0B,UAEjC,yBAAyB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,GACzD,qBAAqB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,iBAC1C,MAAM,KACpB,iBAKF,CAAA"}
@@ -0,0 +1,653 @@
'use strict'
/**
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-date-time-formats
*
* @param {string} date
* @returns {Date | undefined}
*/
function parseHttpDate (date) {
// Sun, 06 Nov 1994 08:49:37 GMT ; IMF-fixdate
// Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
// Sunday, 06-Nov-94 08:49:37 GMT ; obsolete RFC 850 format
switch (date[3]) {
case ',': return parseImfDate(date)
case ' ': return parseAscTimeDate(date)
default: return parseRfc850Date(date)
}
}
/**
* @see https://httpwg.org/specs/rfc9110.html#preferred.date.format
*
* @param {string} date
* @returns {Date | undefined}
*/
function parseImfDate (date) {
if (
date.length !== 29 ||
date[4] !== ' ' ||
date[7] !== ' ' ||
date[11] !== ' ' ||
date[16] !== ' ' ||
date[19] !== ':' ||
date[22] !== ':' ||
date[25] !== ' ' ||
date[26] !== 'G' ||
date[27] !== 'M' ||
date[28] !== 'T'
) {
return undefined
}
let weekday = -1
if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday
weekday = 0
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday
weekday = 1
} else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday
weekday = 2
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday
weekday = 3
} else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday
weekday = 4
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday
weekday = 5
} else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday
weekday = 6
} else {
return undefined // Not a valid day of the week
}
let day = 0
if (date[5] === '0') {
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
const code = date.charCodeAt(6)
if (code < 49 || code > 57) {
return undefined // Not a digit
}
day = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(5)
if (code1 < 49 || code1 > 51) {
return undefined // Not a digit between 1 and 3
}
const code2 = date.charCodeAt(6)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let monthIdx = -1
if (
(date[8] === 'J' && date[9] === 'a' && date[10] === 'n')
) {
monthIdx = 0 // Jan
} else if (
(date[8] === 'F' && date[9] === 'e' && date[10] === 'b')
) {
monthIdx = 1 // Feb
} else if (
(date[8] === 'M' && date[9] === 'a')
) {
if (date[10] === 'r') {
monthIdx = 2 // Mar
} else if (date[10] === 'y') {
monthIdx = 4 // May
} else {
return undefined // Invalid month
}
} else if (
(date[8] === 'J')
) {
if (date[9] === 'a' && date[10] === 'n') {
monthIdx = 0 // Jan
} else if (date[9] === 'u') {
if (date[10] === 'n') {
monthIdx = 5 // Jun
} else if (date[10] === 'l') {
monthIdx = 6 // Jul
} else {
return undefined // Invalid month
}
} else {
return undefined // Invalid month
}
} else if (
(date[8] === 'A')
) {
if (date[9] === 'p' && date[10] === 'r') {
monthIdx = 3 // Apr
} else if (date[9] === 'u' && date[10] === 'g') {
monthIdx = 7 // Aug
} else {
return undefined // Invalid month
}
} else if (
(date[8] === 'S' && date[9] === 'e' && date[10] === 'p')
) {
monthIdx = 8 // Sep
} else if (
(date[8] === 'O' && date[9] === 'c' && date[10] === 't')
) {
monthIdx = 9 // Oct
} else if (
(date[8] === 'N' && date[9] === 'o' && date[10] === 'v')
) {
monthIdx = 10 // Nov
} else if (
(date[8] === 'D' && date[9] === 'e' && date[10] === 'c')
) {
monthIdx = 11 // Dec
} else {
// Not a valid month
return undefined
}
const yearDigit1 = date.charCodeAt(12)
if (yearDigit1 < 48 || yearDigit1 > 57) {
return undefined // Not a digit
}
const yearDigit2 = date.charCodeAt(13)
if (yearDigit2 < 48 || yearDigit2 > 57) {
return undefined // Not a digit
}
const yearDigit3 = date.charCodeAt(14)
if (yearDigit3 < 48 || yearDigit3 > 57) {
return undefined // Not a digit
}
const yearDigit4 = date.charCodeAt(15)
if (yearDigit4 < 48 || yearDigit4 > 57) {
return undefined // Not a digit
}
const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)
let hour = 0
if (date[17] === '0') {
const code = date.charCodeAt(18)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
hour = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(17)
if (code1 < 48 || code1 > 50) {
return undefined // Not a digit between 0 and 2
}
const code2 = date.charCodeAt(18)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
if (code1 === 50 && code2 > 51) {
return undefined // Hour cannot be greater than 23
}
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let minute = 0
if (date[20] === '0') {
const code = date.charCodeAt(21)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
minute = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(20)
if (code1 < 48 || code1 > 53) {
return undefined // Not a digit between 0 and 5
}
const code2 = date.charCodeAt(21)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let second = 0
if (date[23] === '0') {
const code = date.charCodeAt(24)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
second = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(23)
if (code1 < 48 || code1 > 53) {
return undefined // Not a digit between 0 and 5
}
const code2 = date.charCodeAt(24)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
return result.getUTCDay() === weekday ? result : undefined
}
/**
* @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats
*
* @param {string} date
* @returns {Date | undefined}
*/
function parseAscTimeDate (date) {
// This is assumed to be in UTC
if (
date.length !== 24 ||
date[7] !== ' ' ||
date[10] !== ' ' ||
date[19] !== ' '
) {
return undefined
}
let weekday = -1
if (date[0] === 'S' && date[1] === 'u' && date[2] === 'n') { // Sunday
weekday = 0
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n') { // Monday
weekday = 1
} else if (date[0] === 'T' && date[1] === 'u' && date[2] === 'e') { // Tuesday
weekday = 2
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd') { // Wednesday
weekday = 3
} else if (date[0] === 'T' && date[1] === 'h' && date[2] === 'u') { // Thursday
weekday = 4
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i') { // Friday
weekday = 5
} else if (date[0] === 'S' && date[1] === 'a' && date[2] === 't') { // Saturday
weekday = 6
} else {
return undefined // Not a valid day of the week
}
let monthIdx = -1
if (
(date[4] === 'J' && date[5] === 'a' && date[6] === 'n')
) {
monthIdx = 0 // Jan
} else if (
(date[4] === 'F' && date[5] === 'e' && date[6] === 'b')
) {
monthIdx = 1 // Feb
} else if (
(date[4] === 'M' && date[5] === 'a')
) {
if (date[6] === 'r') {
monthIdx = 2 // Mar
} else if (date[6] === 'y') {
monthIdx = 4 // May
} else {
return undefined // Invalid month
}
} else if (
(date[4] === 'J')
) {
if (date[5] === 'a' && date[6] === 'n') {
monthIdx = 0 // Jan
} else if (date[5] === 'u') {
if (date[6] === 'n') {
monthIdx = 5 // Jun
} else if (date[6] === 'l') {
monthIdx = 6 // Jul
} else {
return undefined // Invalid month
}
} else {
return undefined // Invalid month
}
} else if (
(date[4] === 'A')
) {
if (date[5] === 'p' && date[6] === 'r') {
monthIdx = 3 // Apr
} else if (date[5] === 'u' && date[6] === 'g') {
monthIdx = 7 // Aug
} else {
return undefined // Invalid month
}
} else if (
(date[4] === 'S' && date[5] === 'e' && date[6] === 'p')
) {
monthIdx = 8 // Sep
} else if (
(date[4] === 'O' && date[5] === 'c' && date[6] === 't')
) {
monthIdx = 9 // Oct
} else if (
(date[4] === 'N' && date[5] === 'o' && date[6] === 'v')
) {
monthIdx = 10 // Nov
} else if (
(date[4] === 'D' && date[5] === 'e' && date[6] === 'c')
) {
monthIdx = 11 // Dec
} else {
// Not a valid month
return undefined
}
let day = 0
if (date[8] === ' ') {
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
const code = date.charCodeAt(9)
if (code < 49 || code > 57) {
return undefined // Not a digit
}
day = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(8)
if (code1 < 49 || code1 > 51) {
return undefined // Not a digit between 1 and 3
}
const code2 = date.charCodeAt(9)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let hour = 0
if (date[11] === '0') {
const code = date.charCodeAt(12)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
hour = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(11)
if (code1 < 48 || code1 > 50) {
return undefined // Not a digit between 0 and 2
}
const code2 = date.charCodeAt(12)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
if (code1 === 50 && code2 > 51) {
return undefined // Hour cannot be greater than 23
}
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let minute = 0
if (date[14] === '0') {
const code = date.charCodeAt(15)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
minute = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(14)
if (code1 < 48 || code1 > 53) {
return undefined // Not a digit between 0 and 5
}
const code2 = date.charCodeAt(15)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let second = 0
if (date[17] === '0') {
const code = date.charCodeAt(18)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
second = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(17)
if (code1 < 48 || code1 > 53) {
return undefined // Not a digit between 0 and 5
}
const code2 = date.charCodeAt(18)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
const yearDigit1 = date.charCodeAt(20)
if (yearDigit1 < 48 || yearDigit1 > 57) {
return undefined // Not a digit
}
const yearDigit2 = date.charCodeAt(21)
if (yearDigit2 < 48 || yearDigit2 > 57) {
return undefined // Not a digit
}
const yearDigit3 = date.charCodeAt(22)
if (yearDigit3 < 48 || yearDigit3 > 57) {
return undefined // Not a digit
}
const yearDigit4 = date.charCodeAt(23)
if (yearDigit4 < 48 || yearDigit4 > 57) {
return undefined // Not a digit
}
const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
return result.getUTCDay() === weekday ? result : undefined
}
/**
* @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats
*
* @param {string} date
* @returns {Date | undefined}
*/
function parseRfc850Date (date) {
let commaIndex = -1
let weekday = -1
if (date[0] === 'S') {
if (date[1] === 'u' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
weekday = 0 // Sunday
commaIndex = 6
} else if (date[1] === 'a' && date[2] === 't' && date[3] === 'u' && date[4] === 'r' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {
weekday = 6 // Saturday
commaIndex = 8
}
} else if (date[0] === 'M' && date[1] === 'o' && date[2] === 'n' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
weekday = 1 // Monday
commaIndex = 6
} else if (date[0] === 'T') {
if (date[1] === 'u' && date[2] === 'e' && date[3] === 's' && date[4] === 'd' && date[5] === 'a' && date[6] === 'y') {
weekday = 2 // Tuesday
commaIndex = 7
} else if (date[1] === 'h' && date[2] === 'u' && date[3] === 'r' && date[4] === 's' && date[5] === 'd' && date[6] === 'a' && date[7] === 'y') {
weekday = 4 // Thursday
commaIndex = 8
}
} else if (date[0] === 'W' && date[1] === 'e' && date[2] === 'd' && date[3] === 'n' && date[4] === 'e' && date[5] === 's' && date[6] === 'd' && date[7] === 'a' && date[8] === 'y') {
weekday = 3 // Wednesday
commaIndex = 9
} else if (date[0] === 'F' && date[1] === 'r' && date[2] === 'i' && date[3] === 'd' && date[4] === 'a' && date[5] === 'y') {
weekday = 5 // Friday
commaIndex = 6
} else {
// Not a valid day name
return undefined
}
if (
date[commaIndex] !== ',' ||
(date.length - commaIndex - 1) !== 23 ||
date[commaIndex + 1] !== ' ' ||
date[commaIndex + 4] !== '-' ||
date[commaIndex + 8] !== '-' ||
date[commaIndex + 11] !== ' ' ||
date[commaIndex + 14] !== ':' ||
date[commaIndex + 17] !== ':' ||
date[commaIndex + 20] !== ' ' ||
date[commaIndex + 21] !== 'G' ||
date[commaIndex + 22] !== 'M' ||
date[commaIndex + 23] !== 'T'
) {
return undefined
}
let day = 0
if (date[commaIndex + 2] === '0') {
// Single digit day, e.g. "Sun Nov 6 08:49:37 1994"
const code = date.charCodeAt(commaIndex + 3)
if (code < 49 || code > 57) {
return undefined // Not a digit
}
day = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(commaIndex + 2)
if (code1 < 49 || code1 > 51) {
return undefined // Not a digit between 1 and 3
}
const code2 = date.charCodeAt(commaIndex + 3)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
day = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let monthIdx = -1
if (
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'n')
) {
monthIdx = 0 // Jan
} else if (
(date[commaIndex + 5] === 'F' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'b')
) {
monthIdx = 1 // Feb
} else if (
(date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'r')
) {
monthIdx = 2 // Mar
} else if (
(date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'p' && date[commaIndex + 7] === 'r')
) {
monthIdx = 3 // Apr
} else if (
(date[commaIndex + 5] === 'M' && date[commaIndex + 6] === 'a' && date[commaIndex + 7] === 'y')
) {
monthIdx = 4 // May
} else if (
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'n')
) {
monthIdx = 5 // Jun
} else if (
(date[commaIndex + 5] === 'J' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'l')
) {
monthIdx = 6 // Jul
} else if (
(date[commaIndex + 5] === 'A' && date[commaIndex + 6] === 'u' && date[commaIndex + 7] === 'g')
) {
monthIdx = 7 // Aug
} else if (
(date[commaIndex + 5] === 'S' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'p')
) {
monthIdx = 8 // Sep
} else if (
(date[commaIndex + 5] === 'O' && date[commaIndex + 6] === 'c' && date[commaIndex + 7] === 't')
) {
monthIdx = 9 // Oct
} else if (
(date[commaIndex + 5] === 'N' && date[commaIndex + 6] === 'o' && date[commaIndex + 7] === 'v')
) {
monthIdx = 10 // Nov
} else if (
(date[commaIndex + 5] === 'D' && date[commaIndex + 6] === 'e' && date[commaIndex + 7] === 'c')
) {
monthIdx = 11 // Dec
} else {
// Not a valid month
return undefined
}
const yearDigit1 = date.charCodeAt(commaIndex + 9)
if (yearDigit1 < 48 || yearDigit1 > 57) {
return undefined // Not a digit
}
const yearDigit2 = date.charCodeAt(commaIndex + 10)
if (yearDigit2 < 48 || yearDigit2 > 57) {
return undefined // Not a digit
}
let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48) // Convert ASCII codes to number
// RFC 6265 states that the year is in the range 1970-2069.
// @see https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1
//
// 3. If the year-value is greater than or equal to 70 and less than or
// equal to 99, increment the year-value by 1900.
// 4. If the year-value is greater than or equal to 0 and less than or
// equal to 69, increment the year-value by 2000.
year += year < 70 ? 2000 : 1900
let hour = 0
if (date[commaIndex + 12] === '0') {
const code = date.charCodeAt(commaIndex + 13)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
hour = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(commaIndex + 12)
if (code1 < 48 || code1 > 50) {
return undefined // Not a digit between 0 and 2
}
const code2 = date.charCodeAt(commaIndex + 13)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
if (code1 === 50 && code2 > 51) {
return undefined // Hour cannot be greater than 23
}
hour = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let minute = 0
if (date[commaIndex + 15] === '0') {
const code = date.charCodeAt(commaIndex + 16)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
minute = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(commaIndex + 15)
if (code1 < 48 || code1 > 53) {
return undefined // Not a digit between 0 and 5
}
const code2 = date.charCodeAt(commaIndex + 16)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
minute = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
let second = 0
if (date[commaIndex + 18] === '0') {
const code = date.charCodeAt(commaIndex + 19)
if (code < 48 || code > 57) {
return undefined // Not a digit
}
second = code - 48 // Convert ASCII code to number
} else {
const code1 = date.charCodeAt(commaIndex + 18)
if (code1 < 48 || code1 > 53) {
return undefined // Not a digit between 0 and 5
}
const code2 = date.charCodeAt(commaIndex + 19)
if (code2 < 48 || code2 > 57) {
return undefined // Not a digit
}
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
}
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
return result.getUTCDay() === weekday ? result : undefined
}
module.exports = {
parseHttpDate
}
@@ -0,0 +1,22 @@
var baseRest = require('./_baseRest'),
unzip = require('./unzip');
/**
* Creates an array of grouped elements, the first of which contains the
* first elements of the given arrays, the second of which contains the
* second elements of the given arrays, and so on.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to process.
* @returns {Array} Returns the new array of grouped elements.
* @example
*
* _.zip(['a', 'b'], [1, 2], [true, false]);
* // => [['a', 1, true], ['b', 2, false]]
*/
var zip = baseRest(unzip);
module.exports = zip;
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('after', require('../after'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,4 @@
import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.cts';
export type Source = ReverseSegment[][];
export = function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[];
//# sourceMappingURL=by-source.d.ts.map
@@ -0,0 +1,2 @@
const e=require(`../../utils/throw-if-empty.cjs`),t=e=>()=>({path:`/panels`,params:e??{},method:`GET`}),n=(t,n)=>()=>(e.throwIfEmpty(String(t),`Key cannot be empty`),{path:`/panels/${t}`,params:n??{},method:`GET`});exports.readPanel=n,exports.readPanels=t;
//# sourceMappingURL=panels.cjs.map
@@ -0,0 +1,2 @@
export type SeverityLevel = 'fatal' | 'error' | 'warning' | 'log' | 'info' | 'debug';
//# sourceMappingURL=severity.d.ts.map
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/auth/index.ts"],"sourcesContent":["export * from './cookies.js'\n\nexport { extractJWT } from './extractJWT.js'\nexport * from './types.js'\n"],"names":["extractJWT"],"mappings":"AAAA,cAAc,eAAc;AAE5B,SAASA,UAAU,QAAQ,kBAAiB;AAC5C,cAAc,aAAY"}

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