docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Type Check & Test (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:25:58 +08:00
1 parent f954252a34
commit e311ca3275
35554 files changed
+6229626 -4

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"buildEmptyArrayMetadata.js","sourceRoot":"","sources":["../../../../src/reflectMetadata/utils/buildEmptyArrayMetadata.ts"],"names":[],"mappings":";;AAAA,0DAEC;AAFD,SAAgB,uBAAuB;IACrC,OAAO,EAAE,CAAC;AACZ,CAAC"}
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2012-2018 various contributors (see AUTHORS)
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,38 @@
{
"name": "nan",
"version": "2.24.0",
"description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 25 compatibility",
"main": "include_dirs.js",
"repository": {
"type": "git",
"url": "git://github.com/nodejs/nan.git"
},
"scripts": {
"test": "tap --gc --stderr test/js/*-test.js",
"test:worker": "node --experimental-worker test/tap-as-worker.js --gc --stderr test/js/*-test.js",
"rebuild-tests-2015": "node-gyp rebuild --msvs_version=2015 --directory test",
"rebuild-tests": "node-gyp rebuild --directory test",
"docs": "doc/.build.sh"
},
"contributors": [
"Rod Vagg <r@va.gg> (https://github.com/rvagg)",
"Benjamin Byholm <bbyholm@abo.fi> (https://github.com/kkoopa/)",
"Trevor Norris <trev.norris@gmail.com> (https://github.com/trevnorris)",
"Nathan Rajlich <nathan@tootallnate.net> (https://github.com/TooTallNate)",
"Brett Lawson <brett19@gmail.com> (https://github.com/brett19)",
"Ben Noordhuis <info@bnoordhuis.nl> (https://github.com/bnoordhuis)",
"David Siegel <david@artcom.de> (https://github.com/agnat)",
"Michael Ira Krufky <mkrufky@gmail.com> (https://github.com/mkrufky)"
],
"devDependencies": {
"bindings": "~1.2.1",
"commander": "^2.8.1",
"glob": "^5.0.14",
"request": "=2.81.0",
"node-gyp": "~v10.3.1",
"readable-stream": "^2.1.4",
"tap": "~0.7.1",
"xtend": "~4.0.0"
},
"license": "MIT"
}
@@ -0,0 +1,6 @@
import { type TSchema, SchemaOptions } from '../schema/index';
import { type TConstructor } from '../constructor/index';
import { type TNever } from '../never/index';
export type TInstanceType<Type extends TSchema, Result extends TSchema = Type extends TConstructor<infer _Parameters extends TSchema[], infer InstanceType extends TSchema> ? InstanceType : TNever> = Result;
/** `[JavaScript]` Extracts the InstanceType from the given Constructor type */
export declare function InstanceType<Type extends TSchema>(schema: Type, options?: SchemaOptions): TInstanceType<Type>;
@@ -0,0 +1,32 @@
// Copyright (c) 2015 Ryan Prichard
//
// 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.
#ifndef AGENT_DEBUG_SHOW_INPUT_H
#define AGENT_DEBUG_SHOW_INPUT_H
#include <windows.h>
#include <string>
std::string controlKeyStatePrefix(DWORD controlKeyState);
std::string mouseEventToString(const MOUSE_EVENT_RECORD &mer);
void debugShowInput(bool enableMouse, bool escapeInput);
#endif // AGENT_DEBUG_SHOW_INPUT_H
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"2":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","578":"a b c d e f g h i j k l m n o p q r s"},C:{"2":"6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB 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 UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y 0C 1C","2370":"0 1 2 3 4 5 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 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB 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 UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","194":"a b c d e f g h i j k l m n o p q r s"},E:{"2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD","3076":"RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED"},F:{"2":"0 1 2 3 4 5 6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC f g h i j k l m n o p q r s t u v w x y z FD GD HD ID NC uC JD OC","194":"KC LC Q H R WC S T U V W X Y Z a b c d e"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD","3076":"RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"2":"TC J I iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"2":"A B C H NC uC OC"},L:{"2":"I"},M:{"2":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"2":"6 7 8 9 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"2":"zD"},R:{"2":"0D"},S:{"2":"1D 2D"}},B:6,C:"JPEG XL image format",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"isAnyAncestorBindingConstraintsWithName.d.ts","sourceRoot":"","sources":["../../../../src/binding/calculations/isAnyAncestorBindingConstraintsWithName.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKrE,wBAAgB,uCAAuC,CACrD,IAAI,EAAE,YAAY,GACjB,CAAC,WAAW,EAAE,kBAAkB,KAAK,OAAO,CAE9C"}
@@ -0,0 +1,403 @@
"use client";
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/menu-section.tsx
var menu_section_exports = {};
__export(menu_section_exports, {
default: () => menu_section_default
});
module.exports = __toCommonJS(menu_section_exports);
var import_theme2 = require("@heroui/theme");
var import_menu2 = require("@react-aria/menu");
var import_react3 = require("react");
var import_system2 = require("@heroui/system");
var import_utils2 = require("@react-aria/utils");
var import_shared_utils2 = require("@heroui/shared-utils");
var import_divider = require("@heroui/divider");
// src/menu-item.tsx
var import_react2 = require("react");
// src/use-menu-item.ts
var import_react = require("react");
var import_theme = require("@heroui/theme");
var import_system = require("@heroui/system");
var import_focus = require("@react-aria/focus");
var import_shared_utils = require("@heroui/shared-utils");
var import_menu = require("@react-aria/menu");
var import_interactions = require("@react-aria/interactions");
var import_utils = require("@react-aria/utils");
var import_use_is_mobile = require("@heroui/use-is-mobile");
var import_react_utils = require("@heroui/react-utils");
function useMenuItem(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.menuItem.variantKeys);
const {
as,
item,
state,
shortcut,
description,
startContent,
endContent,
isVirtualized,
selectedIcon,
className,
classNames,
onAction,
autoFocus,
onPress,
onPressStart,
onPressUp,
onPressEnd,
onPressChange,
onHoverStart: hoverStartProp,
onHoverChange,
onHoverEnd,
hideSelectedIcon = false,
isReadOnly = false,
closeOnSelect,
onClose,
onClick: deprecatedOnClick,
...otherProps
} = props;
const disableAnimation = (_b = (_a = originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const domRef = (0, import_react.useRef)(null);
const Component = as || ((otherProps == null ? void 0 : otherProps.href) ? "a" : "li");
const shouldFilterDOMProps = typeof Component === "string";
const { rendered, key } = item;
const isDisabledProp = state.disabledKeys.has(key) || originalProps.isDisabled;
const isSelectable = state.selectionManager.selectionMode !== "none";
const isMobile = (0, import_use_is_mobile.useIsMobile)();
const { isFocusVisible, focusProps } = (0, import_focus.useFocusRing)({
autoFocus
});
if (deprecatedOnClick && typeof deprecatedOnClick === "function") {
(0, import_shared_utils.warn)(
"onClick is deprecated, please use onPress instead. See: https://github.com/heroui-inc/heroui/issues/4292",
"MenuItem"
);
}
const handlePress = (0, import_react.useCallback)(
(e) => {
deprecatedOnClick == null ? void 0 : deprecatedOnClick(e);
onPress == null ? void 0 : onPress(e);
},
[deprecatedOnClick, onPress]
);
const {
isPressed,
isFocused,
isSelected,
isDisabled,
menuItemProps,
labelProps,
descriptionProps,
keyboardShortcutProps
} = (0, import_menu.useMenuItem)(
{
key,
onClose,
isDisabled: isDisabledProp,
onPress: handlePress,
onPressStart,
onPressUp,
onPressEnd,
onPressChange,
"aria-label": props["aria-label"],
closeOnSelect,
isVirtualized,
onAction
},
state,
domRef
);
let { hoverProps, isHovered } = (0, import_interactions.useHover)({
isDisabled,
onHoverStart(e) {
if (!(0, import_interactions.isFocusVisible)()) {
state.selectionManager.setFocused(true);
state.selectionManager.setFocusedKey(key);
}
hoverStartProp == null ? void 0 : hoverStartProp(e);
},
onHoverChange,
onHoverEnd
});
let itemProps = menuItemProps;
const slots = (0, import_react.useMemo)(
() => (0, import_theme.menuItem)({
...variantProps,
isDisabled,
disableAnimation,
hasTitleTextChild: typeof rendered === "string",
hasDescriptionTextChild: typeof description === "string"
}),
[(0, import_shared_utils.objectToDeps)(variantProps), isDisabled, disableAnimation, rendered, description]
);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
if (isReadOnly) {
itemProps = (0, import_shared_utils.removeEvents)(itemProps);
}
const getItemProps = (props2 = {}) => ({
ref: domRef,
...(0, import_utils.mergeProps)(
isReadOnly ? {} : focusProps,
(0, import_react_utils.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
}),
itemProps,
hoverProps,
props2
),
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-selectable": (0, import_shared_utils.dataAttr)(isSelectable),
"data-hover": (0, import_shared_utils.dataAttr)(isMobile ? isHovered || isPressed : isHovered),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-selected": (0, import_shared_utils.dataAttr)(isSelected),
"data-pressed": (0, import_shared_utils.dataAttr)(isPressed),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
className: slots.base({ class: (0, import_shared_utils.clsx)(baseStyles, props2.className) })
});
const getLabelProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(labelProps, props2),
className: slots.title({ class: classNames == null ? void 0 : classNames.title })
});
const getDescriptionProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(descriptionProps, props2),
className: slots.description({ class: classNames == null ? void 0 : classNames.description })
});
const getKeyboardShortcutProps = (props2 = {}) => ({
...(0, import_utils.mergeProps)(keyboardShortcutProps, props2),
className: slots.shortcut({ class: classNames == null ? void 0 : classNames.shortcut })
});
const getSelectedIconProps = (0, import_react.useCallback)(
(props2 = {}) => {
return {
"aria-hidden": (0, import_shared_utils.dataAttr)(true),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
className: slots.selectedIcon({ class: classNames == null ? void 0 : classNames.selectedIcon }),
...props2
};
},
[isDisabled, slots, classNames]
);
return {
Component,
domRef,
slots,
classNames,
isSelectable,
isSelected,
isDisabled,
rendered,
shortcut,
description,
startContent,
endContent,
selectedIcon,
disableAnimation,
getItemProps,
getLabelProps,
hideSelectedIcon,
getDescriptionProps,
getKeyboardShortcutProps,
getSelectedIconProps
};
}
// src/menu-selected-icon.tsx
var import_jsx_runtime = require("react/jsx-runtime");
function MenuSelectedIcon(props) {
const { isSelected, disableAnimation, ...otherProps } = props;
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"svg",
{
"aria-hidden": "true",
"data-selected": isSelected,
role: "presentation",
viewBox: "0 0 17 18",
...otherProps,
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"polyline",
{
fill: "none",
points: "1 9 7 14 15 4",
stroke: "currentColor",
strokeDasharray: 22,
strokeDashoffset: isSelected ? 44 : 66,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeWidth: 1.5,
style: !disableAnimation ? {
transition: "stroke-dashoffset 200ms ease"
} : {}
}
)
}
);
}
// src/menu-item.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var MenuItem = (props) => {
const {
Component,
slots,
classNames,
rendered,
shortcut,
description,
isSelectable,
isSelected,
isDisabled,
selectedIcon,
startContent,
endContent,
disableAnimation,
hideSelectedIcon,
getItemProps,
getLabelProps,
getDescriptionProps,
getKeyboardShortcutProps,
getSelectedIconProps
} = useMenuItem(props);
const selectedContent = (0, import_react2.useMemo)(() => {
const defaultIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MenuSelectedIcon, { disableAnimation, isSelected });
if (typeof selectedIcon === "function") {
return selectedIcon({ icon: defaultIcon, isSelected, isDisabled });
}
if (selectedIcon)
return selectedIcon;
return defaultIcon;
}, [selectedIcon, isSelected, isDisabled, disableAnimation]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Component, { ...getItemProps(), children: [
startContent,
description ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getLabelProps(), children: rendered }),
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getDescriptionProps(), children: description })
] }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getLabelProps(), children: rendered }),
shortcut && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("kbd", { ...getKeyboardShortcutProps(), children: shortcut }),
isSelectable && !hideSelectedIcon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getSelectedIconProps(), children: selectedContent }),
endContent
] });
};
MenuItem.displayName = "HeroUI.MenuItem";
var menu_item_default = MenuItem;
// src/menu-section.tsx
var import_jsx_runtime3 = require("react/jsx-runtime");
var MenuSection = (0, import_system2.forwardRef)(
({
item,
state,
as,
variant,
color,
disableAnimation,
onAction,
closeOnSelect,
className,
classNames,
showDivider = false,
hideSelectedIcon,
dividerProps = {},
itemClasses,
title,
...otherProps
}, _) => {
const Component = as || "li";
const slots = (0, import_react3.useMemo)(() => (0, import_theme2.menuSection)(), []);
const baseStyles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.base, className);
const dividerStyles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.divider, dividerProps == null ? void 0 : dividerProps.className);
const { itemProps, headingProps, groupProps } = (0, import_menu2.useMenuSection)({
heading: item.rendered,
"aria-label": item["aria-label"]
});
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
Component,
{
"data-slot": "base",
...(0, import_utils2.mergeProps)(itemProps, otherProps),
className: slots.base({ class: baseStyles }),
children: [
item.rendered && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"span",
{
...headingProps,
className: slots.heading({ class: classNames == null ? void 0 : classNames.heading }),
"data-slot": "heading",
children: item.rendered
}
),
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
"ul",
{
...groupProps,
className: slots.group({ class: classNames == null ? void 0 : classNames.group }),
"data-has-title": !!item.rendered,
"data-slot": "group",
children: [
[...item.childNodes].map((node) => {
const { key: nodeKey, props: nodeProps } = node;
let menuItem2 = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
menu_item_default,
{
classNames: itemClasses,
closeOnSelect,
color,
disableAnimation,
hideSelectedIcon,
item: node,
state,
variant,
onAction,
...nodeProps
},
nodeKey
);
if (node.wrapper) {
menuItem2 = node.wrapper(menuItem2);
}
return menuItem2;
}),
showDivider && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
import_divider.Divider,
{
as: "li",
className: slots.divider({
class: dividerStyles
}),
...dividerProps
}
)
]
}
)
]
}
);
}
);
MenuSection.displayName = "HeroUI.MenuSection";
var menu_section_default = MenuSection;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
@@ -0,0 +1 @@
{"v0.8":{"start":"2012-06-25","end":"2014-07-31"},"v0.10":{"start":"2013-03-11","end":"2016-10-31"},"v0.12":{"start":"2015-02-06","end":"2016-12-31"},"v4":{"start":"2015-09-08","lts":"2015-10-12","maintenance":"2017-04-01","end":"2018-04-30","codename":"Argon"},"v5":{"start":"2015-10-29","maintenance":"2016-04-30","end":"2016-06-30"},"v6":{"start":"2016-04-26","lts":"2016-10-18","maintenance":"2018-04-30","end":"2019-04-30","codename":"Boron"},"v7":{"start":"2016-10-25","maintenance":"2017-04-30","end":"2017-06-30"},"v8":{"start":"2017-05-30","lts":"2017-10-31","maintenance":"2019-01-01","end":"2019-12-31","codename":"Carbon"},"v9":{"start":"2017-10-01","maintenance":"2018-04-01","end":"2018-06-30"},"v10":{"start":"2018-04-24","lts":"2018-10-30","maintenance":"2020-05-19","end":"2021-04-30","codename":"Dubnium"},"v11":{"start":"2018-10-23","maintenance":"2019-04-22","end":"2019-06-01"},"v12":{"start":"2019-04-23","lts":"2019-10-21","maintenance":"2020-11-30","end":"2022-04-30","codename":"Erbium"},"v13":{"start":"2019-10-22","maintenance":"2020-04-01","end":"2020-06-01"},"v14":{"start":"2020-04-21","lts":"2020-10-27","maintenance":"2021-10-19","end":"2023-04-30","codename":"Fermium"},"v15":{"start":"2020-10-20","maintenance":"2021-04-01","end":"2021-06-01"},"v16":{"start":"2021-04-20","lts":"2021-10-26","maintenance":"2022-10-18","end":"2023-09-11","codename":"Gallium"},"v17":{"start":"2021-10-19","maintenance":"2022-04-01","end":"2022-06-01"},"v18":{"start":"2022-04-19","lts":"2022-10-25","maintenance":"2023-10-18","end":"2025-04-30","codename":"Hydrogen"},"v19":{"start":"2022-10-18","maintenance":"2023-04-01","end":"2023-06-01"},"v20":{"start":"2023-04-18","lts":"2023-10-24","maintenance":"2024-10-22","end":"2026-04-30","codename":"Iron"},"v21":{"start":"2023-10-17","maintenance":"2024-04-01","end":"2024-06-01"},"v22":{"start":"2024-04-24","lts":"2024-10-29","maintenance":"2025-10-21","end":"2027-04-30","codename":"Jod"},"v23":{"start":"2024-10-16","maintenance":"2025-04-01","end":"2025-06-01"},"v24":{"start":"2025-05-06","lts":"2025-10-28","maintenance":"2026-10-20","end":"2028-04-30","codename":"Krypton"},"v25":{"start":"2025-10-15","maintenance":"2026-04-01","end":"2026-06-01"},"v26":{"start":"2026-04-22","lts":"2026-10-28","maintenance":"2027-10-20","end":"2029-04-30","codename":""}}
@@ -0,0 +1,16 @@
import * as _heroui_system from '@heroui/system';
import { UseCheckboxGroupProps } from './use-checkbox-group.mjs';
import 'react';
import '@heroui/theme';
import '@react-types/checkbox';
import '@react-types/shared';
import '@heroui/react-utils';
import '@react-stately/checkbox';
import './checkbox.mjs';
import './use-checkbox.mjs';
interface CheckboxGroupProps extends UseCheckboxGroupProps {
}
declare const CheckboxGroup: _heroui_system.InternalForwardRefRenderFunction<"div", CheckboxGroupProps, never>;
export { type CheckboxGroupProps, CheckboxGroup as default };
@@ -0,0 +1,44 @@
import { PluginFunc, UnitType, ConfigType } from 'dayjs/esm'
declare const plugin: PluginFunc
export = plugin
declare module 'dayjs/esm' {
interface Dayjs {
years(): number
years(value: number): Dayjs
months(): number
months(value: number): Dayjs
dates(): number
dates(value: number): Dayjs
weeks(): number
weeks(value: number): Dayjs
days(): number
days(value: number): Dayjs
hours(): number
hours(value: number): Dayjs
minutes(): number
minutes(value: number): Dayjs
seconds(): number
seconds(value: number): Dayjs
milliseconds(): number
milliseconds(value: number): Dayjs
}
}
@@ -0,0 +1,64 @@
/** The Standard Schema interface. */
export interface StandardSchemaV1<Input = unknown, Output = Input> {
/** The Standard Schema properties. */
readonly "~standard": StandardSchemaV1.Props<Input, Output>;
}
export declare namespace StandardSchemaV1 {
/** The Standard Schema properties interface. */
export interface Props<Input = unknown, Output = Input> {
/** The version number of the standard. */
readonly version: 1;
/** The vendor name of the schema library. */
readonly vendor: string;
/** Validates unknown input values. */
readonly validate: (value: unknown) => Result<Output> | Promise<Result<Output>>;
/** Inferred types associated with the schema. */
readonly types?: Types<Input, Output> | undefined;
}
/** The result interface of the validate function. */
export type Result<Output> = SuccessResult<Output> | FailureResult;
/** The result interface if validation succeeds. */
export interface SuccessResult<Output> {
/** The typed output value. */
readonly value: Output;
/** The non-existent issues. */
readonly issues?: undefined;
}
/** The result interface if validation fails. */
export interface FailureResult {
/** The issues of failed validation. */
readonly issues: ReadonlyArray<Issue>;
}
/** The issue interface of the failure output. */
export interface Issue {
/** The error message of the issue. */
readonly message: string;
/** The path of the issue, if any. */
readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
}
/** The path segment interface of the issue. */
export interface PathSegment {
/** The key representing a path segment. */
readonly key: PropertyKey;
}
/** The Standard Schema types interface. */
export interface Types<Input = unknown, Output = Input> {
/** The input type of the schema. */
readonly input: Input;
/** The output type of the schema. */
readonly output: Output;
}
/** Infers the input type of a Standard Schema. */
export type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["input"];
/** Infers the output type of a Standard Schema. */
export type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema["~standard"]["types"]>["output"];
}
@@ -0,0 +1,2 @@
function t(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var C=typeof Symbol=="function"&&Symbol.observable||"@@observable",A=C;var M=()=>Math.random().toString(36).substring(7).split("").join("."),I={INIT:`@@redux/INIT${M()}`,REPLACE:`@@redux/REPLACE${M()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${M()}`},y=I;function x(e){if(typeof e!="object"||e===null)return!1;let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r||Object.getPrototypeOf(e)===null}function O(e,r,o){if(typeof e!="function")throw new Error(t(2));if(typeof r=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(t(0));if(typeof r=="function"&&typeof o>"u"&&(o=r,r=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(t(1));return o(O)(e,r)}let i=e,c=r,d=new Map,a=d,u=0,s=!1;function f(){a===d&&(a=new Map,d.forEach((n,p)=>{a.set(p,n)}))}function h(){if(s)throw new Error(t(3));return c}function l(n){if(typeof n!="function")throw new Error(t(4));if(s)throw new Error(t(5));let p=!0;f();let E=u++;return a.set(E,n),function(){if(p){if(s)throw new Error(t(6));p=!1,f(),a.delete(E),d=null}}}function m(n){if(!x(n))throw new Error(t(7));if(typeof n.type>"u")throw new Error(t(8));if(typeof n.type!="string")throw new Error(t(17));if(s)throw new Error(t(9));try{s=!0,c=i(c,n)}finally{s=!1}return(d=a).forEach(E=>{E()}),n}function g(n){if(typeof n!="function")throw new Error(t(10));i=n,m({type:y.REPLACE})}function S(){let n=l;return{subscribe(p){if(typeof p!="object"||p===null)throw new Error(t(11));function E(){let P=p;P.next&&P.next(h())}return E(),{unsubscribe:n(E)}},[A](){return this}}}return m({type:y.INIT}),{dispatch:m,subscribe:l,getState:h,replaceReducer:g,[A]:S}}function T(e,r,o){return O(e,r,o)}function D(e){Object.keys(e).forEach(r=>{let o=e[r];if(typeof o(void 0,{type:y.INIT})>"u")throw new Error(t(12));if(typeof o(void 0,{type:y.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(t(13))})}function N(e){let r=Object.keys(e),o={};for(let a=0;a<r.length;a++){let u=r[a];typeof e[u]=="function"&&(o[u]=e[u])}let i=Object.keys(o),c,d;try{D(o)}catch(a){d=a}return function(u={},s){if(d)throw d;let f=!1,h={};for(let l=0;l<i.length;l++){let m=i[l],g=o[m],S=u[m],w=g(S,s);if(typeof w>"u"){let n=s&&s.type;throw new Error(t(14))}h[m]=w,f=f||w!==S}return f=f||i.length!==Object.keys(u).length,f?h:u}}function R(e,r){return function(...o){return r(e.apply(this,o))}}function k(e,r){if(typeof e=="function")return R(e,r);if(typeof e!="object"||e===null)throw new Error(t(16));let o={};for(let i in e){let c=e[i];typeof c=="function"&&(o[i]=R(c,r))}return o}function b(...e){return e.length===0?r=>r:e.length===1?e[0]:e.reduce((r,o)=>(...i)=>r(o(...i)))}function v(...e){return r=>(o,i)=>{let c=r(o,i),d=()=>{throw new Error(t(15))},a={getState:c.getState,dispatch:(s,...f)=>d(s,...f)},u=e.map(s=>s(a));return d=b(...u)(c.dispatch),{...c,dispatch:d}}}function _(e){return x(e)&&"type"in e&&typeof e.type=="string"}export{y as __DO_NOT_USE__ActionTypes,v as applyMiddleware,k as bindActionCreators,N as combineReducers,b as compose,O as createStore,_ as isAction,x as isPlainObject,T as legacy_createStore};
//# sourceMappingURL=redux.browser.mjs.map
@@ -0,0 +1,3 @@
import CryptoJS = require("./index");
export = CryptoJS.pad.Iso10126;
@@ -0,0 +1 @@
{"name":"remove-trailing-separator","version":"1.1.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532123168,"integrity":"sha512-buh94VT8+qH6CLLdLJ/fTYda2qy5TdtK24IeehM5n2Ou4vZd6k15IFXIiHgkVdKB4ug7DF/vqSqoSKlFDtLRVw==","mode":438,"size":847},"index.js":{"checkedAt":1794532123168,"integrity":"sha512-KQc6yqRufW7aYLJuM1S0cs3m5vDRiJAy6X2715VWkM5kZiJS0eRYXVnucIx2ABOPGISoCWzSsc1GLy/pmZ6kyQ==","mode":438,"size":322},"history.md":{"checkedAt":1794532123168,"integrity":"sha512-wGVLxIAe67s/xuu/wFXEVqmHG8ph015dHxqGq5xQBLh0KULz1DZObG6MaVxjlO6M8f4uPSEs6fOLefiOBtC3ow==","mode":438,"size":570},"license":{"checkedAt":1794532123168,"integrity":"sha512-Wz2a8ijV2Bo6S5gIo2cRpD3Y7cXMC0uRuJMKQIQ6f80zR9l5vlgYt1PjAFhPHGyJHYjzMOflhiZTy04U3+E4aQ==","mode":438,"size":696},"readme.md":{"checkedAt":1794532123168,"integrity":"sha512-fPEnt+MJWlfq24oyCiz0sIqNGPZeJxCCsLTogIs2vUVEKbTOS/7wUdPbbi2L8LNyBRVW7xCeciF987uQN9RI0Q==","mode":438,"size":1811}}}
@@ -0,0 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=MaybeManagedClassElementMetadata.js.map
@@ -0,0 +1,33 @@
function _apply_decorated_descriptor(target, property, decorators, descriptor, context) {
var desc = {};
Object["ke" + "ys"](descriptor).forEach(function(key) {
desc[key] = descriptor[key];
});
desc.enumerable = !!desc.enumerable;
desc.configurable = !!desc.configurable;
if ("value" in desc || desc.initializer) desc.writable = true;
desc = decorators.slice().reverse().reduce(function(desc, decorator) {
return decorator ? decorator(target, property, desc) || desc : desc;
}, desc);
var hasAccessor = Object.prototype.hasOwnProperty.call(desc, "get") || Object.prototype.hasOwnProperty.call(desc, "set");
if (context && desc.initializer !== void 0 && !hasAccessor) {
desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
desc.initializer = undefined;
}
if (hasAccessor) {
delete desc.writable;
delete desc.initializer;
delete desc.value;
}
if (desc.initializer === void 0) {
Object["define" + "Property"](target, property, desc);
desc = null;
}
return desc;
}
export { _apply_decorated_descriptor as _ };
@@ -0,0 +1,104 @@
[![Prettier Banner](https://unpkg.com/prettier-logo@1.0.3/images/prettier-banner-light.svg)](https://prettier.io)
<h2 align="center">Opinionated Code Formatter</h2>
<p align="center">
<em>
JavaScript
· TypeScript
· Flow
· JSX
· JSON
</em>
<br />
<em>
CSS
· SCSS
· Less
</em>
<br />
<em>
HTML
· Vue
· Angular
</em>
<br />
<em>
GraphQL
· Markdown
· YAML
</em>
<br />
<em>
<a href="https://prettier.io/docs/plugins">
Your favorite language?
</a>
</em>
</p>
<p align="center">
<a href="https://github.com/prettier/prettier/actions?query=branch%3Amain">
<img alt="CI Status" src="https://img.shields.io/github/check-runs/prettier/prettier/main?style=flat-square&label=CI"></a>
<a href="https://codecov.io/gh/prettier/prettier">
<img alt="Coverage Status" src="https://img.shields.io/codecov/c/github/prettier/prettier.svg?style=flat-square"></a>
<a href="https://x.com/acdlite/status/974390255393505280">
<img alt="Blazing Fast" src="https://img.shields.io/badge/speed-blazing%20%F0%9F%94%A5-brightgreen.svg?style=flat-square"></a>
<br/>
<a href="https://www.npmjs.com/package/prettier">
<img alt="npm version" src="https://img.shields.io/npm/v/prettier.svg?style=flat-square"></a>
<a href="https://www.npmjs.com/package/prettier">
<img alt="weekly downloads from npm" src="https://img.shields.io/npm/dw/prettier.svg?style=flat-square"></a>
<a href="https://github.com/prettier/prettier#badge">
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"></a>
<a href="https://x.com/intent/follow?screen_name=PrettierCode">
<img alt="Follow Prettier on X" src="https://img.shields.io/badge/%40PrettierCode-9f9f9f?style=flat-square&logo=x&labelColor=555"></a>
</p>
## Intro
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.
### Input
<!-- prettier-ignore -->
```js
foo(reallyLongArg(), omgSoManyParameters(), IShouldRefactorThis(), isThereSeriouslyAnotherOne());
```
### Output
```js
foo(
reallyLongArg(),
omgSoManyParameters(),
IShouldRefactorThis(),
isThereSeriouslyAnotherOne(),
);
```
Prettier can be run [in your editor](https://prettier.io/docs/editors) on-save, in a [pre-commit hook](https://prettier.io/docs/precommit), or in [CI environments](https://prettier.io/docs/cli#list-different) to ensure your codebase has a consistent style without devs ever having to post a nit-picky comment on a code review ever again!
---
**[Documentation](https://prettier.io/docs/)**
[Install](https://prettier.io/docs/install) ·
[Options](https://prettier.io/docs/options) ·
[CLI](https://prettier.io/docs/cli) ·
[API](https://prettier.io/docs/api)
**[Playground](https://prettier.io/playground/)**
---
## Badge
Show the world you're using _Prettier_ → [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
```md
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
```
## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md).
@@ -0,0 +1,11 @@
A JSON with color names and its values. Based on http://dev.w3.org/csswg/css-color/#named-colors.
[![NPM](https://nodei.co/npm/color-name.png?mini=true)](https://nodei.co/npm/color-name/)
```js
var colors = require('color-name');
colors.red //[255,0,0]
```
<a href="LICENSE"><img src="https://upload.wikimedia.org/wikipedia/commons/0/0c/MIT_logo.svg" width="120"/></a>
@@ -0,0 +1,36 @@
'use strict'
var util = require('util')
var stream = require('readable-stream')
var delegate = require('delegates')
var Tracker = require('./tracker.js')
var TrackerStream = module.exports = function (name, size, options) {
stream.Transform.call(this, options)
this.tracker = new Tracker(name, size)
this.name = name
this.id = this.tracker.id
this.tracker.on('change', delegateChange(this))
}
util.inherits(TrackerStream, stream.Transform)
function delegateChange (trackerStream) {
return function (name, completion, tracker) {
trackerStream.emit('change', name, completion, trackerStream)
}
}
TrackerStream.prototype._transform = function (data, encoding, cb) {
this.tracker.completeWork(data.length ? data.length : 1)
this.push(data)
cb()
}
TrackerStream.prototype._flush = function (cb) {
this.tracker.finish()
cb()
}
delegate(TrackerStream.prototype, 'tracker')
.method('completed')
.method('addWork')
.method('finish')
@@ -0,0 +1,54 @@
export namespace handlers {
export { blockquote };
export { hardBreak as break };
export { code };
export { strikethrough as delete };
export { emphasis };
export { footnoteReference };
export { heading };
export { html };
export { imageReference };
export { image };
export { inlineCode };
export { linkReference };
export { link };
export { listItem };
export { list };
export { paragraph };
export { root };
export { strong };
export { table };
export { tableCell };
export { tableRow };
export { text };
export { thematicBreak };
export { ignore as toml };
export { ignore as yaml };
export { ignore as definition };
export { ignore as footnoteDefinition };
}
import { blockquote } from './blockquote.js';
import { hardBreak } from './break.js';
import { code } from './code.js';
import { strikethrough } from './delete.js';
import { emphasis } from './emphasis.js';
import { footnoteReference } from './footnote-reference.js';
import { heading } from './heading.js';
import { html } from './html.js';
import { imageReference } from './image-reference.js';
import { image } from './image.js';
import { inlineCode } from './inline-code.js';
import { linkReference } from './link-reference.js';
import { link } from './link.js';
import { listItem } from './list-item.js';
import { list } from './list.js';
import { paragraph } from './paragraph.js';
import { root } from './root.js';
import { strong } from './strong.js';
import { table } from './table.js';
import { tableCell } from './table-cell.js';
import { tableRow } from './table-row.js';
import { text } from './text.js';
import { thematicBreak } from './thematic-break.js';
declare function ignore(): undefined;
export {};
@@ -0,0 +1,17 @@
import { MAP, SCALAR, SEQ } from '../nodes/identity';
import type { Pair } from '../nodes/Pair';
import type { SchemaOptions, ToStringOptions } from '../options';
import type { CollectionTag, ScalarTag } from './types';
export declare class Schema {
compat: Array<CollectionTag | ScalarTag> | null;
knownTags: Record<string, CollectionTag | ScalarTag>;
name: string;
sortMapEntries: ((a: Pair, b: Pair) => number) | null;
tags: Array<CollectionTag | ScalarTag>;
toStringOptions: Readonly<ToStringOptions> | null;
readonly [MAP]: CollectionTag;
readonly [SCALAR]: ScalarTag;
readonly [SEQ]: CollectionTag;
constructor({ compat, customTags, merge, resolveKnownTags, schema, sortMapEntries, toStringDefaults }: SchemaOptions);
clone(): Schema;
}
@@ -0,0 +1,304 @@
'use strict'
// parse a 512-byte header block to a data object, or vice-versa
// encode returns `true` if a pax extended header is needed, because
// the data could not be faithfully encoded in a simple header.
// (Also, check header.needPax to see if it needs a pax header.)
const types = require('./types.js')
const pathModule = require('path').posix
const large = require('./large-numbers.js')
const SLURP = Symbol('slurp')
const TYPE = Symbol('type')
class Header {
constructor (data, off, ex, gex) {
this.cksumValid = false
this.needPax = false
this.nullBlock = false
this.block = null
this.path = null
this.mode = null
this.uid = null
this.gid = null
this.size = null
this.mtime = null
this.cksum = null
this[TYPE] = '0'
this.linkpath = null
this.uname = null
this.gname = null
this.devmaj = 0
this.devmin = 0
this.atime = null
this.ctime = null
if (Buffer.isBuffer(data)) {
this.decode(data, off || 0, ex, gex)
} else if (data) {
this.set(data)
}
}
decode (buf, off, ex, gex) {
if (!off) {
off = 0
}
if (!buf || !(buf.length >= off + 512)) {
throw new Error('need 512 bytes for header')
}
this.path = decString(buf, off, 100)
this.mode = decNumber(buf, off + 100, 8)
this.uid = decNumber(buf, off + 108, 8)
this.gid = decNumber(buf, off + 116, 8)
this.size = decNumber(buf, off + 124, 12)
this.mtime = decDate(buf, off + 136, 12)
this.cksum = decNumber(buf, off + 148, 12)
// if we have extended or global extended headers, apply them now
// See https://github.com/npm/node-tar/pull/187
this[SLURP](ex)
this[SLURP](gex, true)
// old tar versions marked dirs as a file with a trailing /
this[TYPE] = decString(buf, off + 156, 1)
if (this[TYPE] === '') {
this[TYPE] = '0'
}
if (this[TYPE] === '0' && this.path.slice(-1) === '/') {
this[TYPE] = '5'
}
// tar implementations sometimes incorrectly put the stat(dir).size
// as the size in the tarball, even though Directory entries are
// not able to have any body at all. In the very rare chance that
// it actually DOES have a body, we weren't going to do anything with
// it anyway, and it'll just be a warning about an invalid header.
if (this[TYPE] === '5') {
this.size = 0
}
this.linkpath = decString(buf, off + 157, 100)
if (buf.slice(off + 257, off + 265).toString() === 'ustar\u000000') {
this.uname = decString(buf, off + 265, 32)
this.gname = decString(buf, off + 297, 32)
this.devmaj = decNumber(buf, off + 329, 8)
this.devmin = decNumber(buf, off + 337, 8)
if (buf[off + 475] !== 0) {
// definitely a prefix, definitely >130 chars.
const prefix = decString(buf, off + 345, 155)
this.path = prefix + '/' + this.path
} else {
const prefix = decString(buf, off + 345, 130)
if (prefix) {
this.path = prefix + '/' + this.path
}
this.atime = decDate(buf, off + 476, 12)
this.ctime = decDate(buf, off + 488, 12)
}
}
let sum = 8 * 0x20
for (let i = off; i < off + 148; i++) {
sum += buf[i]
}
for (let i = off + 156; i < off + 512; i++) {
sum += buf[i]
}
this.cksumValid = sum === this.cksum
if (this.cksum === null && sum === 8 * 0x20) {
this.nullBlock = true
}
}
[SLURP] (ex, global) {
for (const k in ex) {
// we slurp in everything except for the path attribute in
// a global extended header, because that's weird.
if (ex[k] !== null && ex[k] !== undefined &&
!(global && k === 'path')) {
this[k] = ex[k]
}
}
}
encode (buf, off) {
if (!buf) {
buf = this.block = Buffer.alloc(512)
off = 0
}
if (!off) {
off = 0
}
if (!(buf.length >= off + 512)) {
throw new Error('need 512 bytes for header')
}
const prefixSize = this.ctime || this.atime ? 130 : 155
const split = splitPrefix(this.path || '', prefixSize)
const path = split[0]
const prefix = split[1]
this.needPax = split[2]
this.needPax = encString(buf, off, 100, path) || this.needPax
this.needPax = encNumber(buf, off + 100, 8, this.mode) || this.needPax
this.needPax = encNumber(buf, off + 108, 8, this.uid) || this.needPax
this.needPax = encNumber(buf, off + 116, 8, this.gid) || this.needPax
this.needPax = encNumber(buf, off + 124, 12, this.size) || this.needPax
this.needPax = encDate(buf, off + 136, 12, this.mtime) || this.needPax
buf[off + 156] = this[TYPE].charCodeAt(0)
this.needPax = encString(buf, off + 157, 100, this.linkpath) || this.needPax
buf.write('ustar\u000000', off + 257, 8)
this.needPax = encString(buf, off + 265, 32, this.uname) || this.needPax
this.needPax = encString(buf, off + 297, 32, this.gname) || this.needPax
this.needPax = encNumber(buf, off + 329, 8, this.devmaj) || this.needPax
this.needPax = encNumber(buf, off + 337, 8, this.devmin) || this.needPax
this.needPax = encString(buf, off + 345, prefixSize, prefix) || this.needPax
if (buf[off + 475] !== 0) {
this.needPax = encString(buf, off + 345, 155, prefix) || this.needPax
} else {
this.needPax = encString(buf, off + 345, 130, prefix) || this.needPax
this.needPax = encDate(buf, off + 476, 12, this.atime) || this.needPax
this.needPax = encDate(buf, off + 488, 12, this.ctime) || this.needPax
}
let sum = 8 * 0x20
for (let i = off; i < off + 148; i++) {
sum += buf[i]
}
for (let i = off + 156; i < off + 512; i++) {
sum += buf[i]
}
this.cksum = sum
encNumber(buf, off + 148, 8, this.cksum)
this.cksumValid = true
return this.needPax
}
set (data) {
for (const i in data) {
if (data[i] !== null && data[i] !== undefined) {
this[i] = data[i]
}
}
}
get type () {
return types.name.get(this[TYPE]) || this[TYPE]
}
get typeKey () {
return this[TYPE]
}
set type (type) {
if (types.code.has(type)) {
this[TYPE] = types.code.get(type)
} else {
this[TYPE] = type
}
}
}
const splitPrefix = (p, prefixSize) => {
const pathSize = 100
let pp = p
let prefix = ''
let ret
const root = pathModule.parse(p).root || '.'
if (Buffer.byteLength(pp) < pathSize) {
ret = [pp, prefix, false]
} else {
// first set prefix to the dir, and path to the base
prefix = pathModule.dirname(pp)
pp = pathModule.basename(pp)
do {
if (Buffer.byteLength(pp) <= pathSize &&
Buffer.byteLength(prefix) <= prefixSize) {
// both fit!
ret = [pp, prefix, false]
} else if (Buffer.byteLength(pp) > pathSize &&
Buffer.byteLength(prefix) <= prefixSize) {
// prefix fits in prefix, but path doesn't fit in path
ret = [pp.slice(0, pathSize - 1), prefix, true]
} else {
// make path take a bit from prefix
pp = pathModule.join(pathModule.basename(prefix), pp)
prefix = pathModule.dirname(prefix)
}
} while (prefix !== root && !ret)
// at this point, found no resolution, just truncate
if (!ret) {
ret = [p.slice(0, pathSize - 1), '', true]
}
}
return ret
}
const decString = (buf, off, size) =>
buf.slice(off, off + size).toString('utf8').replace(/\0.*/, '')
const decDate = (buf, off, size) =>
numToDate(decNumber(buf, off, size))
const numToDate = num => num === null ? null : new Date(num * 1000)
const decNumber = (buf, off, size) =>
buf[off] & 0x80 ? large.parse(buf.slice(off, off + size))
: decSmallNumber(buf, off, size)
const nanNull = value => isNaN(value) ? null : value
const decSmallNumber = (buf, off, size) =>
nanNull(parseInt(
buf.slice(off, off + size)
.toString('utf8').replace(/\0.*$/, '').trim(), 8))
// the maximum encodable as a null-terminated octal, by field size
const MAXNUM = {
12: 0o77777777777,
8: 0o7777777,
}
const encNumber = (buf, off, size, number) =>
number === null ? false :
number > MAXNUM[size] || number < 0
? (large.encode(number, buf.slice(off, off + size)), true)
: (encSmallNumber(buf, off, size, number), false)
const encSmallNumber = (buf, off, size, number) =>
buf.write(octalString(number, size), off, size, 'ascii')
const octalString = (number, size) =>
padOctal(Math.floor(number).toString(8), size)
const padOctal = (string, size) =>
(string.length === size - 1 ? string
: new Array(size - string.length - 1).join('0') + string + ' ') + '\0'
const encDate = (buf, off, size, date) =>
date === null ? false :
encNumber(buf, off, size, date.getTime() / 1000)
// enough to fill the longest string we've got
const NULLS = new Array(156).join('\0')
// pad with nulls, return true if it's longer or non-ascii
const encString = (buf, off, size, string) =>
string === null ? false :
(buf.write(string + NULLS, off, size, 'utf8'),
string.length !== Buffer.byteLength(string) || string.length > size)
module.exports = Header
@@ -0,0 +1,18 @@
var baseGetTag = require('./_baseGetTag'),
isObjectLike = require('./isObjectLike');
/** `Object#toString` result references. */
var dateTag = '[object Date]';
/**
* The base implementation of `_.isDate` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
*/
function baseIsDate(value) {
return isObjectLike(value) && baseGetTag(value) == dateTag;
}
module.exports = baseIsDate;
@@ -0,0 +1,8 @@
"use client";
import {
link_default
} from "./chunk-OPTZHMJX.mjs";
import "./chunk-3GGKNGCF.mjs";
export {
link_default as default
};
@@ -0,0 +1 @@
{"name":"jiti","version":"1.21.7","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532095856,"integrity":"sha512-ZUOz4mMEav3Dj+n3ZhgAmeZ5pM/9oYtnAll8fJqq6C8n6eBNpNUv3con8e42dckvhnjRUWcTW8p5juElOx3RRA==","mode":420,"size":1078},"dist/babel.js":{"checkedAt":1794532095860,"integrity":"sha512-ftlPPWtldj+xiuW7qp8L/43F+baNF11vPZsMh3hj/hZylnaijg/Sj0TG7QtdUvpWNI7jjhQl5pYcIlgq/hwwiQ==","mode":420,"size":1736792},"lib/index.js":{"checkedAt":1794532095860,"integrity":"sha512-FVe3lSEGnVTd3iJszJDxsQzLgumh+zbwBDt72KaM29Gdkd5oUyX9L9GJqIdqt8MfIS08D5eC3AGx7fC7VQq/TA==","mode":420,"size":305},"bin/jiti.js":{"checkedAt":1794532095860,"integrity":"sha512-Qm9QZbnSLfknrQp6IWo6l7E69EAx/DzR4bh5XUfOCyo7ryUBDh2NFyWK7JRR52SvghlDZ/mhUZVIhyfiAtB5uA==","mode":493,"size":354},"dist/jiti.js":{"checkedAt":1794532095861,"integrity":"sha512-XEtrcoCuZoghsvWw9lR/XPUbpnZCapZkfKAhksNmS6g3lENF6yxR66Dwl1NdKi6jW2HGrUzMAsztWOB9AYY5IQ==","mode":420,"size":255009},"register.js":{"checkedAt":1794532095861,"integrity":"sha512-Oz315gv+uvu4ltR1t23sA3ApVuOW+P8N0JxXaANVfDMp00Ht9WYi6eHUowjjqm//uPmthwnOBkmRPrkVvpdTtQ==","mode":420,"size":47},"package.json":{"checkedAt":1794532095861,"integrity":"sha512-YmS6axlAkKNTy78IyKgn1Ly6NeVvUIhjXr3jN+JxJfkql71lg0LeW5UOch4EO33vI5Jtj+xk66Y8RL+E/hSLsw==","mode":420,"size":2805},"README.md":{"checkedAt":1794532095862,"integrity":"sha512-QwKEvXNEgzT0HCOpobkUI4OmUzk4hi05aVn52grWJR9tInpiaM/5xvX+UAUXtXo4lWuDTc6jjooSz+rIuSBYJw==","mode":420,"size":3845},"dist/plugins/babel-plugin-transform-import-meta.d.ts":{"checkedAt":1794532095862,"integrity":"sha512-GVdtlxBro3m9Y2h56gI69kmuWBgub3jfILE1wm6EI+BLDBSilBGqiUFIRRUMedItmHF+KugweRe0QvsYUNuv+A==","mode":420,"size":153},"dist/babel.d.ts":{"checkedAt":1794532095862,"integrity":"sha512-RaqT3N8kthZUKXBy2JNzGe/tAzkFgoqypG+wVzfmW8FHSipaGIRWSN4OWYQB3KKv+O6++rR9AKL6qJRPOVFUFg==","mode":420,"size":139},"dist/plugins/import-meta-env.d.ts":{"checkedAt":1794532095862,"integrity":"sha512-Uo2DeNTsLfsxkJt8PFpQC8Q2dcNMukgFLa913bAHNKTLDaaot7gv4/CLXrkHiGxYggfCOJ5rf1mHgYi06O11QQ==","mode":420,"size":269},"dist/jiti.d.ts":{"checkedAt":1794532095862,"integrity":"sha512-wzIA4JArIpw17w0YlSR2jjE87x1sgR0F5mTRv/Cxcf1A8HB+CVDqCckUz1ZZU3/uEaESDgHE4y41rMTz753V1w==","mode":420,"size":888},"dist/types.d.ts":{"checkedAt":1794532095862,"integrity":"sha512-bNKFBBSfHh/Q8EY23r/xKL5KkZwT4ck2BQaS0sJLYXKCKHnotHOJmW0YFcHbukX+2MsmCZb6h1th+L8n9Mz4GA==","mode":420,"size":913},"dist/utils.d.ts":{"checkedAt":1794532095862,"integrity":"sha512-6wxbj9J1DAQqOyPXV5QJPmGXk5wndmfPJ448g4PFt9RAbuKIIjJvLPbCSEt1u966iXWI/rvUZsIgdZmO5CSZnA==","mode":420,"size":505}}}
@@ -0,0 +1,371 @@
import type { PatchCollection, Recipe } from '@internal/query/core/buildThunks'
import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit'
import type {
FetchBaseQueryError,
FetchBaseQueryMeta,
RootState,
TypedMutationOnQueryStarted,
TypedQueryOnQueryStarted,
} from '@reduxjs/toolkit/query'
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query'
const api = createApi({
baseQuery: fetchBaseQuery({ baseUrl: 'https://example.com' }),
endpoints: () => ({}),
})
describe('type tests', () => {
test(`mutation: onStart and onSuccess`, async () => {
const extended = api.injectEndpoints({
overrideExisting: true,
endpoints: (build) => ({
injected: build.mutation<number, string>({
query: () => '/success',
async onQueryStarted(arg, { queryFulfilled }) {
// awaiting without catching like this would result in an `unhandledRejection` exception if there was an error
// unfortunately we cannot test for that in jest.
const result = await queryFulfilled
expectTypeOf(result).toMatchTypeOf<{
data: number
meta?: FetchBaseQueryMeta
}>()
},
}),
}),
})
})
test('query types', () => {
const extended = api.injectEndpoints({
overrideExisting: true,
endpoints: (build) => ({
injected: build.query<number, string>({
query: () => '/success',
async onQueryStarted(arg, { queryFulfilled }) {
queryFulfilled.then(
(result) => {
expectTypeOf(result).toMatchTypeOf<{
data: number
meta?: FetchBaseQueryMeta
}>()
},
(reason) => {
if (reason.isUnhandledError) {
expectTypeOf(reason).toEqualTypeOf<{
error: unknown
meta?: undefined
isUnhandledError: true
}>()
} else {
expectTypeOf(reason).toEqualTypeOf<{
error: FetchBaseQueryError
isUnhandledError: false
meta: FetchBaseQueryMeta | undefined
}>()
}
},
)
queryFulfilled.catch((reason) => {
if (reason.isUnhandledError) {
expectTypeOf(reason).toEqualTypeOf<{
error: unknown
meta?: undefined
isUnhandledError: true
}>()
} else {
expectTypeOf(reason).toEqualTypeOf<{
error: FetchBaseQueryError
isUnhandledError: false
meta: FetchBaseQueryMeta | undefined
}>()
}
})
const result = await queryFulfilled
expectTypeOf(result).toMatchTypeOf<{
data: number
meta?: FetchBaseQueryMeta
}>()
},
}),
}),
})
})
test('mutation types', () => {
const extended = api.injectEndpoints({
overrideExisting: true,
endpoints: (build) => ({
injected: build.query<number, string>({
query: () => '/success',
async onQueryStarted(arg, { queryFulfilled }) {
queryFulfilled.then(
(result) => {
expectTypeOf(result).toMatchTypeOf<{
data: number
meta?: FetchBaseQueryMeta
}>()
},
(reason) => {
if (reason.isUnhandledError) {
expectTypeOf(reason).toEqualTypeOf<{
error: unknown
meta?: undefined
isUnhandledError: true
}>()
} else {
expectTypeOf(reason).toEqualTypeOf<{
error: FetchBaseQueryError
isUnhandledError: false
meta: FetchBaseQueryMeta | undefined
}>()
}
},
)
queryFulfilled.catch((reason) => {
if (reason.isUnhandledError) {
expectTypeOf(reason).toEqualTypeOf<{
error: unknown
meta?: undefined
isUnhandledError: true
}>()
} else {
expectTypeOf(reason).toEqualTypeOf<{
error: FetchBaseQueryError
isUnhandledError: false
meta: FetchBaseQueryMeta | undefined
}>()
}
})
const result = await queryFulfilled
expectTypeOf(result).toMatchTypeOf<{
data: number
meta?: FetchBaseQueryMeta
}>()
},
}),
}),
})
})
describe('typed `onQueryStarted` function', () => {
test('TypedQueryOnQueryStarted creates a pre-typed version of onQueryStarted', () => {
type Post = {
id: number
title: string
userId: number
}
type PostsApiResponse = {
posts: Post[]
total: number
skip: number
limit: number
}
type QueryArgument = number | undefined
type BaseQueryFunction = ReturnType<typeof fetchBaseQuery>
const baseApiSlice = createApi({
baseQuery: fetchBaseQuery({ baseUrl: 'https://dummyjson.com' }),
reducerPath: 'postsApi',
tagTypes: ['Posts'],
endpoints: (builder) => ({
getPosts: builder.query<PostsApiResponse, void>({
query: () => `/posts`,
}),
getPostById: builder.query<Post, QueryArgument>({
query: (postId) => `/posts/${postId}`,
}),
}),
})
const updatePostOnFulfilled: TypedQueryOnQueryStarted<
PostsApiResponse,
QueryArgument,
BaseQueryFunction,
'postsApi'
> = async (queryArgument, queryLifeCycleApi) => {
const {
dispatch,
extra,
getCacheEntry,
getState,
queryFulfilled,
requestId,
updateCachedData,
} = queryLifeCycleApi
expectTypeOf(queryArgument).toEqualTypeOf<QueryArgument>()
expectTypeOf(dispatch).toEqualTypeOf<
ThunkDispatch<any, any, UnknownAction>
>()
expectTypeOf(extra).toBeUnknown()
expectTypeOf(getState).toEqualTypeOf<
() => RootState<any, any, 'postsApi'>
>()
expectTypeOf(requestId).toBeString()
expectTypeOf(getCacheEntry).toBeFunction()
expectTypeOf(updateCachedData).toEqualTypeOf<
(updateRecipe: Recipe<PostsApiResponse>) => PatchCollection
>()
expectTypeOf(queryFulfilled).resolves.toEqualTypeOf<{
data: PostsApiResponse
meta: FetchBaseQueryMeta | undefined
}>()
const result = await queryFulfilled
const { posts } = result.data
dispatch(
baseApiSlice.util.upsertQueryEntries(
posts.map((post) => ({
// Without `as const` this will result in a TS error in TS 4.7.
endpointName: 'getPostById' as const,
arg: post.id,
value: post,
})),
),
)
}
const extendedApiSlice = baseApiSlice.injectEndpoints({
endpoints: (builder) => ({
getPostsByUserId: builder.query<PostsApiResponse, QueryArgument>({
query: (userId) => `/posts/user/${userId}`,
onQueryStarted: updatePostOnFulfilled,
}),
}),
})
})
test('TypedMutationOnQueryStarted creates a pre-typed version of onQueryStarted', () => {
type Post = {
id: number
title: string
userId: number
}
type PostsApiResponse = {
posts: Post[]
total: number
skip: number
limit: number
}
type QueryArgument = Pick<Post, 'id'> & Partial<Post>
type BaseQueryFunction = ReturnType<typeof fetchBaseQuery>
const baseApiSlice = createApi({
baseQuery: fetchBaseQuery({ baseUrl: 'https://dummyjson.com' }),
reducerPath: 'postsApi',
tagTypes: ['Posts'],
endpoints: (builder) => ({
getPosts: builder.query<PostsApiResponse, void>({
query: () => `/posts`,
}),
getPostById: builder.query<Post, number>({
query: (postId) => `/posts/${postId}`,
}),
}),
})
const updatePostOnFulfilled: TypedMutationOnQueryStarted<
Post,
QueryArgument,
BaseQueryFunction,
'postsApi'
> = async (queryArgument, mutationLifeCycleApi) => {
const { id, ...patch } = queryArgument
const {
dispatch,
extra,
getCacheEntry,
getState,
queryFulfilled,
requestId,
} = mutationLifeCycleApi
const patchCollection = dispatch(
baseApiSlice.util.updateQueryData('getPostById', id, (draftPost) => {
Object.assign(draftPost, patch)
}),
)
expectTypeOf(queryFulfilled).resolves.toEqualTypeOf<{
data: Post
meta: FetchBaseQueryMeta | undefined
}>()
expectTypeOf(queryArgument).toEqualTypeOf<QueryArgument>()
expectTypeOf(dispatch).toEqualTypeOf<
ThunkDispatch<any, any, UnknownAction>
>()
expectTypeOf(extra).toBeUnknown()
expectTypeOf(getState).toEqualTypeOf<
() => RootState<any, any, 'postsApi'>
>()
expectTypeOf(requestId).toBeString()
expectTypeOf(getCacheEntry).toBeFunction()
expectTypeOf(mutationLifeCycleApi).not.toHaveProperty(
'updateCachedData',
)
try {
await queryFulfilled
} catch {
patchCollection.undo()
}
}
const extendedApiSlice = baseApiSlice.injectEndpoints({
endpoints: (builder) => ({
addPost: builder.mutation<Post, Omit<QueryArgument, 'id'>>({
query: (body) => ({
url: `posts/add`,
method: 'POST',
body,
}),
onQueryStarted: updatePostOnFulfilled,
}),
updatePost: builder.mutation<Post, QueryArgument>({
query: ({ id, ...patch }) => ({
url: `post/${id}`,
method: 'PATCH',
body: patch,
}),
onQueryStarted: updatePostOnFulfilled,
}),
}),
})
})
})
})
@@ -0,0 +1,62 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'prefer-enum-initializers',
meta: {
type: 'suggestion',
docs: {
description: 'Require each enum member value to be explicitly initialized',
},
hasSuggestions: true,
messages: {
defineInitializer: "The value of the member '{{ name }}' should be explicitly defined.",
defineInitializerSuggestion: 'Can be fixed to {{ name }} = {{ suggested }}',
},
schema: [],
},
defaultOptions: [],
create(context) {
function TSEnumDeclaration(node) {
const { members } = node.body;
members.forEach((member, index) => {
if (member.initializer == null) {
const name = context.sourceCode.getText(member);
context.report({
node: member,
messageId: 'defineInitializer',
data: {
name,
},
suggest: [
{
messageId: 'defineInitializerSuggestion',
data: { name, suggested: index },
fix: (fixer) => {
return fixer.replaceText(member, `${name} = ${index}`);
},
},
{
messageId: 'defineInitializerSuggestion',
data: { name, suggested: index + 1 },
fix: (fixer) => {
return fixer.replaceText(member, `${name} = ${index + 1}`);
},
},
{
messageId: 'defineInitializerSuggestion',
data: { name, suggested: `'${name}'` },
fix: (fixer) => {
return fixer.replaceText(member, `${name} = '${name}'`);
},
},
],
});
}
});
}
return {
TSEnumDeclaration,
};
},
});
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P","66":"Q H R"},C:{"1":"OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"0 1 2 3 4 5 6 7 8 9 xC TC J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB 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 UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC 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 GB HB IB JB KB LB MB NB 0C 1C"},D:{"1":"0 1 2 3 4 5 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 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB 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 UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC","66":"HC IC JC KC LC Q H"},E:{"1":"dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C L M G 2C ZC 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC"},F:{"1":"0 1 2 3 4 5 BC CC DC EC FC GC HC IC JC KC LC Q H R WC 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":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B FD GD HD ID NC uC JD OC","66":"9B AC"},G:{"1":"dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"2":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB vD wD xD QC RC SC yD","2":"J oD pD qD rD sD aC tD uD"},Q:{"2":"zD"},R:{"1":"0D"},S:{"2":"1D 2D"}},B:7,C:"URL Scroll-To-Text Fragment",D:true};
@@ -0,0 +1,66 @@
import { CreateType } from '../create/type.mjs';
import { Discard } from '../discard/discard.mjs';
import { Computed } from '../computed/index.mjs';
import { Intersect } from '../intersect/index.mjs';
import { Literal } from '../literal/index.mjs';
import { Object } from '../object/index.mjs';
import { Union } from '../union/index.mjs';
import { IndexPropertyKeys } from '../indexed/index.mjs';
import { TransformKind } from '../symbols/symbols.mjs';
// ------------------------------------------------------------------
// Guards
// ------------------------------------------------------------------
import { IsMappedKey, IsMappedResult, IsIntersect, IsUnion, IsObject, IsSchema, IsLiteralValue, IsRef } from '../guard/kind.mjs';
import { IsArray as IsArrayValue } from '../guard/value.mjs';
// ------------------------------------------------------------------
// Infrastructure
// ------------------------------------------------------------------
import { PickFromMappedKey } from './pick-from-mapped-key.mjs';
import { PickFromMappedResult } from './pick-from-mapped-result.mjs';
function FromIntersect(types, propertyKeys) {
return types.map((type) => PickResolve(type, propertyKeys));
}
// prettier-ignore
function FromUnion(types, propertyKeys) {
return types.map((type) => PickResolve(type, propertyKeys));
}
// prettier-ignore
function FromProperties(properties, propertyKeys) {
const result = {};
for (const K2 of propertyKeys)
if (K2 in properties)
result[K2] = properties[K2];
return result;
}
// prettier-ignore
function FromObject(T, K) {
const options = Discard(T, [TransformKind, '$id', 'required', 'properties']);
const properties = FromProperties(T['properties'], K);
return Object(properties, options);
}
// prettier-ignore
function UnionFromPropertyKeys(propertyKeys) {
const result = propertyKeys.reduce((result, key) => IsLiteralValue(key) ? [...result, Literal(key)] : result, []);
return Union(result);
}
// prettier-ignore
function PickResolve(properties, propertyKeys) {
return (IsIntersect(properties) ? Intersect(FromIntersect(properties.allOf, propertyKeys)) :
IsUnion(properties) ? Union(FromUnion(properties.anyOf, propertyKeys)) :
IsObject(properties) ? FromObject(properties, propertyKeys) :
Object({}));
}
/** `[Json]` Constructs a type whose keys are picked from the given type */
// prettier-ignore
export function Pick(type, key, options) {
const typeKey = IsArrayValue(key) ? UnionFromPropertyKeys(key) : key;
const propertyKeys = IsSchema(key) ? IndexPropertyKeys(key) : key;
const isTypeRef = IsRef(type);
const isKeyRef = IsRef(key);
return (IsMappedResult(type) ? PickFromMappedResult(type, propertyKeys, options) :
IsMappedKey(key) ? PickFromMappedKey(type, key, options) :
(isTypeRef && isKeyRef) ? Computed('Pick', [type, typeKey], options) :
(!isTypeRef && isKeyRef) ? Computed('Pick', [type, typeKey], options) :
(isTypeRef && !isKeyRef) ? Computed('Pick', [type, typeKey], options) :
CreateType({ ...PickResolve(type, propertyKeys), ...options }));
}
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class ResolutionContext {
constructor() {
this.scopedResolutions = new Map();
}
}
exports.default = ResolutionContext;
@@ -0,0 +1,21 @@
import {useListState as $e72dd72e1c76a225$export$2f645645f7bca764} from "./useListState.mjs";
import {useSingleSelectListState as $a0d645289fe9b86b$export$e7f05e985daf4b5f} from "./useSingleSelectListState.mjs";
import {ListCollection as $a02d57049d202695$export$d085fb9e920b5ca7} from "./ListCollection.mjs";
/*
* Copyright 2020 Adobe. All rights reserved.
* This file is licensed to you 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 http://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 REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
export {$e72dd72e1c76a225$export$2f645645f7bca764 as useListState, $a0d645289fe9b86b$export$e7f05e985daf4b5f as useSingleSelectListState, $a02d57049d202695$export$d085fb9e920b5ca7 as ListCollection};
//# sourceMappingURL=module.js.map
@@ -0,0 +1,9 @@
function _defaults(e, r) {
for (var t = Object.getOwnPropertyNames(r), o = 0; o < t.length; o++) {
var n = t[o],
a = Object.getOwnPropertyDescriptor(r, n);
a && a.configurable && void 0 === e[n] && Object.defineProperty(e, n, a);
}
return e;
}
export { _defaults as default };
@@ -0,0 +1 @@
{"version":3,"file":"getValidationModes.d.ts","sourceRoot":"","sources":["../../src/logic/getValidationModes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;yBAE1C,OAAO,IAAI,KAAG,mBAAmB;AAAjD,wBAMG"}
@@ -0,0 +1 @@
{"version":3,"file":"glob.d.ts","sourceRoot":"","sources":["../../src/glob.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAoB,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAEnC,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EAIX,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAGtC,MAAM,MAAM,QAAQ,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;AACvC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC,CAAA;AAalE;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B;;;;;;;;;;;;OAYG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAE5B;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAA;IAEb;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IAEvC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAA;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;IAEnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;IAEpB;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAE9B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;;OAGG;IACH,EAAE,CAAC,EAAE,QAAQ,CAAA;IAEb;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;IAEf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA0CG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B;AAED,MAAM,MAAM,4BAA4B,GAAG,WAAW,GAAG;IACvD,aAAa,EAAE,IAAI,CAAA;IAEnB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG;IACxD,aAAa,CAAC,EAAE,KAAK,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,WAAW,GAAG;IACxD,aAAa,CAAC,EAAE,SAAS,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,IAAI,IACrB,IAAI,SAAS,4BAA4B,GAAG,IAAI,GAC9C,IAAI,SAAS,6BAA6B,GAAG,MAAM,GACnD,IAAI,SAAS,6BAA6B,GAAG,MAAM,GACnD,MAAM,GAAG,IAAI,CAAA;AACjB,MAAM,MAAM,OAAO,CAAC,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAA;AAE1C,MAAM,MAAM,SAAS,CAAC,IAAI,IACxB,IAAI,SAAS,4BAA4B,GAAG,IAAI,GAC9C,IAAI,SAAS,6BAA6B,GAAG,KAAK,GAClD,IAAI,SAAS,6BAA6B,GAAG,KAAK,GAClD,OAAO,CAAA;AAEX;;GAEG;AACH,qBAAa,IAAI,CAAC,IAAI,SAAS,WAAW,CAAE,YAAW,WAAW;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,OAAO,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,UAAU,CAAA;IACvC,aAAa,EAAE,OAAO,CAAA;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,SAAS,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,KAAK,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,OAAO,CAAA;IACd,UAAU,EAAE,OAAO,CAAA;IACnB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,oBAAoB,EAAE,OAAO,CAAA;IAC7B,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,CAAA;IAC9B,mBAAmB,EAAE,OAAO,CAAA;IAE5B;;OAEG;IACH,IAAI,EAAE,IAAI,CAAA;IAEV;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAA;IAEnB;;;;;;;;;;;OAWG;gBACS,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI;IA2HlD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAoBpC;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBzB;;OAEG;IACH,MAAM,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAc9C;;OAEG;IACH,UAAU,IAAI,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAclD;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGlD,CAAC,MAAM,CAAC,QAAQ,CAAC;IAIjB;;;OAGG;IACH,OAAO,IAAI,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;IAGnD,CAAC,MAAM,CAAC,aAAa,CAAC;CAGvB"}
@@ -0,0 +1,121 @@
import type { $ZodStringFormats } from "../core/checks.js";
import type * as errors from "../core/errors.js";
import * as util from "../core/util.js";
export const parsedType = (data: any): string => {
const t = typeof data;
switch (t) {
case "number": {
return Number.isNaN(data) ? "NaN" : "number";
}
case "object": {
if (Array.isArray(data)) {
return "array";
}
if (data === null) {
return "null";
}
if (Object.getPrototypeOf(data) !== Object.prototype && data.constructor) {
return data.constructor.name;
}
}
}
return t;
};
const error: () => errors.$ZodErrorMap = () => {
const Sizable: Record<string, { unit: string; verb: string }> = {
string: { unit: "karakter", verb: "olmalı" },
file: { unit: "bayt", verb: "olmalı" },
array: { unit: "öğe", verb: "olmalı" },
set: { unit: "öğe", verb: "olmalı" },
};
function getSizing(origin: string): { unit: string; verb: string } | null {
return Sizable[origin] ?? null;
}
const Nouns: {
[k in $ZodStringFormats | (string & {})]?: string;
} = {
regex: "girdi",
email: "e-posta adresi",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO tarih ve saat",
date: "ISO tarih",
time: "ISO saat",
duration: "ISO süre",
ipv4: "IPv4 adresi",
ipv6: "IPv6 adresi",
cidrv4: "IPv4 aralığı",
cidrv6: "IPv6 aralığı",
base64: "base64 ile şifrelenmiş metin",
base64url: "base64url ile şifrelenmiş metin",
json_string: "JSON dizesi",
e164: "E.164 sayısı",
jwt: "JWT",
template_literal: "Şablon dizesi",
};
return (issue) => {
switch (issue.code) {
case "invalid_type":
return `Geçersiz değer: beklenen ${issue.expected}, alınan ${parsedType(issue.input)}`;
case "invalid_value":
if (issue.values.length === 1) return `Geçersiz değer: beklenen ${util.stringifyPrimitive(issue.values[0])}`;
return `Geçersiz seçenek: aşağıdakilerden biri olmalı: ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Çok büyük: beklenen ${issue.origin ?? "değer"} ${adj}${issue.maximum.toString()} ${sizing.unit ?? "öğe"}`;
return `Çok büyük: beklenen ${issue.origin ?? "değer"} ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) return `Çok küçük: beklenen ${issue.origin} ${adj}${issue.minimum.toString()} ${sizing.unit}`;
return `Çok küçük: beklenen ${issue.origin} ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue as errors.$ZodStringFormatIssues;
if (_issue.format === "starts_with") return `Geçersiz metin: "${_issue.prefix}" ile başlamalı`;
if (_issue.format === "ends_with") return `Geçersiz metin: "${_issue.suffix}" ile bitmeli`;
if (_issue.format === "includes") return `Geçersiz metin: "${_issue.includes}" içermeli`;
if (_issue.format === "regex") return `Geçersiz metin: ${_issue.pattern} desenine uymalı`;
return `Geçersiz ${Nouns[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Geçersiz sayı: ${issue.divisor} ile tam bölünebilmeli`;
case "unrecognized_keys":
return `Tanınmayan anahtar${issue.keys.length > 1 ? "lar" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `${issue.origin} içinde geçersiz anahtar`;
case "invalid_union":
return "Geçersiz değer";
case "invalid_element":
return `${issue.origin} içinde geçersiz değer`;
default:
return `Geçersiz değer`;
}
};
};
export default function (): { localeError: errors.$ZodErrorMap } {
return {
localeError: error(),
};
}
@@ -0,0 +1,11 @@
{
"root": true,
"extends": "@ljharb",
"rules": {
"max-statements-per-line": [2, { "max": 2 }],
"no-magic-numbers": 0,
"multiline-comment-style": 0,
}
}
@@ -0,0 +1,35 @@
import type * as core from "./core.cjs";
import type { $ZodType } from "./schemas.cjs";
export declare const $output: unique symbol;
export type $output = typeof $output;
export declare const $input: unique symbol;
export type $input = typeof $input;
export type $replace<Meta, S extends $ZodType> = Meta extends $output ? core.output<S> : Meta extends $input ? core.input<S> : Meta extends (infer M)[] ? $replace<M, S>[] : Meta extends (...args: infer P) => infer R ? (...args: {
[K in keyof P]: $replace<P[K], S>;
}) => $replace<R, S> : Meta extends object ? {
[K in keyof Meta]: $replace<Meta[K], S>;
} : Meta;
type MetadataType = Record<string, unknown> | undefined;
export declare class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
_meta: Meta;
_schema: Schema;
_map: Map<Schema, $replace<Meta, Schema>>;
_idmap: Map<string, Schema>;
add<S extends Schema>(schema: S, ..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]): this;
clear(): this;
remove(schema: Schema): this;
get<S extends Schema>(schema: S): $replace<Meta, S> | undefined;
has(schema: Schema): boolean;
}
export interface JSONSchemaMeta {
id?: string | undefined;
title?: string | undefined;
description?: string | undefined;
deprecated?: boolean | undefined;
[k: string]: unknown;
}
export interface GlobalMeta extends JSONSchemaMeta {
}
export declare function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S>;
export declare const globalRegistry: $ZodRegistry<GlobalMeta>;
export {};
@@ -0,0 +1,13 @@
import { Binding } from '../../binding/models/Binding';
import { PlanServiceNodeBindingAddedResult } from '../../metadata/models/PlanServiceNodeBindingAddedResult';
import { PlanParams } from '../models/PlanParams';
import { PlanServiceNode } from '../models/PlanServiceNode';
/**
* Attach a binding to the root service node if the binding is context-free.
* @param params The plan parameters.
* @param serviceNode The service node to attach the binding to.
* @param binding The binding to attach.
* @returns True if the binding requires ancestor metadata, false otherwise.
*/
export declare function addRootServiceNodeBindingIfContextFree(params: PlanParams, serviceNode: PlanServiceNode, binding: Binding<unknown>): PlanServiceNodeBindingAddedResult;
//# sourceMappingURL=addRootServiceNodeBindingIfContextFree.d.ts.map
@@ -0,0 +1,9 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
interface MenuSelectedIconProps {
isSelected: boolean;
disableAnimation?: boolean;
}
declare function ListboxSelectedIcon(props: MenuSelectedIconProps): react_jsx_runtime.JSX.Element;
export { ListboxSelectedIcon, MenuSelectedIconProps };
@@ -0,0 +1,54 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
const fsStat = require("@nodelib/fs.stat");
const constants_1 = require("../constants");
const utils = require("../utils");
const common = require("./common");
function read(directory, settings) {
if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
return readdirWithFileTypes(directory, settings);
}
return readdir(directory, settings);
}
exports.read = read;
function readdirWithFileTypes(directory, settings) {
const dirents = settings.fs.readdirSync(directory, { withFileTypes: true });
return dirents.map((dirent) => {
const entry = {
dirent,
name: dirent.name,
path: common.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator)
};
if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) {
try {
const stats = settings.fs.statSync(entry.path);
entry.dirent = utils.fs.createDirentFromStats(entry.name, stats);
}
catch (error) {
if (settings.throwErrorOnBrokenSymbolicLink) {
throw error;
}
}
}
return entry;
});
}
exports.readdirWithFileTypes = readdirWithFileTypes;
function readdir(directory, settings) {
const names = settings.fs.readdirSync(directory);
return names.map((name) => {
const entryPath = common.joinPathSegments(directory, name, settings.pathSegmentSeparator);
const stats = fsStat.statSync(entryPath, settings.fsStatSettings);
const entry = {
name,
path: entryPath,
dirent: utils.fs.createDirentFromStats(name, stats)
};
if (settings.stats) {
entry.stats = stats;
}
return entry;
});
}
exports.readdir = readdir;
@@ -0,0 +1,3 @@
import { KeyboardCoordinateGetter, KeyboardCodes } from './types';
export declare const defaultKeyboardCodes: KeyboardCodes;
export declare const defaultKeyboardCoordinateGetter: KeyboardCoordinateGetter;
@@ -0,0 +1,151 @@
# winpty
[![Build Status](https://tea-ci.org/api/badges/rprichard/winpty/status.svg)](https://tea-ci.org/rprichard/winpty)
winpty is a Windows software package providing an interface similar to a Unix
pty-master for communicating with Windows console programs. The package
consists of a library (libwinpty) and a tool for Cygwin and MSYS for running
Windows console programs in a Cygwin/MSYS pty.
The software works by starting the `winpty-agent.exe` process with a new,
hidden console window, which bridges between the console API and terminal
input/output escape codes. It polls the hidden console's screen buffer for
changes and generates a corresponding stream of output.
The Unix adapter allows running Windows console programs (e.g. CMD, PowerShell,
IronPython, etc.) under `mintty` or Cygwin's `sshd` with
properly-functioning input (e.g. arrow and function keys) and output (e.g. line
buffering). The library could be also useful for writing a non-Cygwin SSH
server.
## Supported Windows versions
winpty runs on Windows XP through Windows 10, including server versions. It
can be compiled into either 32-bit or 64-bit binaries.
## Cygwin/MSYS adapter (`winpty.exe`)
### Prerequisites
You need the following to build winpty:
* A Cygwin or MSYS installation
* GNU make
* A MinGW g++ toolchain capable of compiling C++11 code to build `winpty.dll`
and `winpty-agent.exe`
* A g++ toolchain targeting Cygwin or MSYS to build `winpty.exe`
Winpty requires two g++ toolchains as it is split into two parts. The
`winpty.dll` and `winpty-agent.exe` binaries interface with the native
Windows command prompt window so they are compiled with the native MinGW
toolchain. The `winpty.exe` binary interfaces with the MSYS/Cygwin terminal so
it is compiled with the MSYS/Cygwin toolchain.
MinGW appears to be split into two distributions -- MinGW (creates 32-bit
binaries) and MinGW-w64 (creates both 32-bit and 64-bit binaries). Either
one is generally acceptable.
#### Cygwin packages
The default g++ compiler for Cygwin targets Cygwin itself, but Cygwin also
packages MinGW-w64 compilers. As of this writing, the necessary packages are:
* Either `mingw64-i686-gcc-g++` or `mingw64-x86_64-gcc-g++`. Select the
appropriate compiler for your CPU architecture.
* `gcc-g++`
* `make`
As of this writing (2016-01-23), only the MinGW-w64 compiler is acceptable.
The MinGW compiler (e.g. from the `mingw-gcc-g++` package) is no longer
maintained and is too buggy.
#### MSYS packages
For the original MSYS, use the `mingw-get` tool (MinGW Installation Manager),
and select at least these components:
* `mingw-developer-toolkit`
* `mingw32-base`
* `mingw32-gcc-g++`
* `msys-base`
* `msys-system-builder`
When running `./configure`, make sure that `mingw32-g++` is in your
`PATH`. It will be in the `C:\MinGW\bin` directory.
#### MSYS2 packages
For MSYS2, use `pacman` and install at least these packages:
* `msys/gcc`
* `mingw32/mingw-w64-i686-gcc` or `mingw64/mingw-w64-x86_64-gcc`. Select
the appropriate compiler for your CPU architecture.
* `make`
MSYS2 provides three start menu shortcuts for starting MSYS2:
* MinGW-w64 Win32 Shell
* MinGW-w64 Win64 Shell
* MSYS2 Shell
To build winpty, use the MinGW-w64 {Win32,Win64} shortcut of the architecture
matching MSYS2. These shortcuts will put the g++ compiler from the
`{mingw32,mingw64}/mingw-w64-{i686,x86_64}-gcc` packages into the `PATH`.
Alternatively, instead of installing `mingw32/mingw-w64-i686-gcc` or
`mingw64/mingw-w64-x86_64-gcc`, install the `mingw-w64-cross-gcc` and
`mingw-w64-cross-crt-git` packages. These packages install cross-compilers
into `/opt/bin`, and then any of the three shortcuts will work.
### Building the Unix adapter
In the project directory, run `./configure`, then `make`, then `make install`.
By default, winpty is installed into `/usr/local`. Pass `PREFIX=<path>` to
`make install` to override this default.
### Using the Unix adapter
To run a Windows console program in `mintty` or Cygwin `sshd`, prepend
`winpty` to the command-line:
$ winpty powershell
Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.
PS C:\rprichard\proj\winpty> 10 + 20
30
PS C:\rprichard\proj\winpty> exit
## Embedding winpty / MSVC compilation
See `src/include/winpty.h` for the prototypes of functions exported by
`winpty.dll`.
Only the `winpty.exe` binary uses Cygwin; all the other binaries work without
it and can be compiled with either MinGW or MSVC. To compile using MSVC,
download gyp and run `gyp -I configurations.gypi` in the `src` subdirectory.
This will generate a `winpty.sln` and associated project files. See the
`src/winpty.gyp` and `src/configurations.gypi` files for notes on dealing with
MSVC versions and different architectures.
Compiling winpty with MSVC currently requires MSVC 2013 or newer.
## Debugging winpty
winpty comes with a tool for collecting timestamped debugging output. To use
it:
1. Run `winpty-debugserver.exe` on the same computer as winpty.
2. Set the `WINPTY_DEBUG` environment variable to `trace` for the
`winpty.exe` process and/or the process using `libwinpty.dll`.
winpty also recognizes a `WINPTY_SHOW_CONSOLE` environment variable. Set it
to 1 to prevent winpty from hiding the console window.
## Copyright
This project is distributed under the MIT license (see the `LICENSE` file in
the project root).
By submitting a pull request for this project, you agree to license your
contribution under the MIT license to this project.
@@ -0,0 +1,104 @@
const arbitraryValueRegex = /^\[(?:([a-z-]+):)?(.+)\]$/i
const fractionRegex = /^\d+\/\d+$/
const stringLengths = new Set(['px', 'full', 'screen'])
const tshirtUnitRegex = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/
const lengthUnitRegex =
/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/
// Shadow always begins with x and y offset separated by underscore
const shadowRegex = /^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/
export function isLength(value: string) {
return (
isNumber(value) ||
stringLengths.has(value) ||
fractionRegex.test(value) ||
isArbitraryLength(value)
)
}
export function isArbitraryLength(value: string) {
return getIsArbitraryValue(value, 'length', isLengthOnly)
}
export function isArbitrarySize(value: string) {
return getIsArbitraryValue(value, 'size', isNever)
}
export function isArbitraryPosition(value: string) {
return getIsArbitraryValue(value, 'position', isNever)
}
export function isArbitraryUrl(value: string) {
return getIsArbitraryValue(value, 'url', isUrl)
}
export function isArbitraryNumber(value: string) {
return getIsArbitraryValue(value, 'number', isNumber)
}
/**
* @deprecated Will be removed in next major version. Use `isArbitraryNumber` instead.
*/
export const isArbitraryWeight = isArbitraryNumber
export function isNumber(value: string) {
return !Number.isNaN(Number(value))
}
export function isPercent(value: string) {
return value.endsWith('%') && isNumber(value.slice(0, -1))
}
export function isInteger(value: string) {
return isIntegerOnly(value) || getIsArbitraryValue(value, 'number', isIntegerOnly)
}
export function isArbitraryValue(value: string) {
return arbitraryValueRegex.test(value)
}
export function isAny() {
return true
}
export function isTshirtSize(value: string) {
return tshirtUnitRegex.test(value)
}
export function isArbitraryShadow(value: string) {
return getIsArbitraryValue(value, '', isShadow)
}
function getIsArbitraryValue(value: string, label: string, testValue: (value: string) => boolean) {
const result = arbitraryValueRegex.exec(value)
if (result) {
if (result[1]) {
return result[1] === label
}
return testValue(result[2]!)
}
return false
}
function isLengthOnly(value: string) {
return lengthUnitRegex.test(value)
}
function isNever() {
return false
}
function isUrl(value: string) {
return value.startsWith('url(')
}
function isIntegerOnly(value: string) {
return Number.isInteger(Number(value))
}
function isShadow(value: string) {
return shadowRegex.test(value)
}
@@ -0,0 +1,153 @@
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Visual Studio user preferences file writer."""
import os
import re
import socket # for gethostname
import gyp.easy_xml as easy_xml
# ------------------------------------------------------------------------------
def _FindCommandInPath(command):
"""If there are no slashes in the command given, this function
searches the PATH env to find the given command, and converts it
to an absolute path. We have to do this because MSVS is looking
for an actual file to launch a debugger on, not just a command
line. Note that this happens at GYP time, so anything needing to
be built needs to have a full path."""
if "/" in command or "\\" in command:
# If the command already has path elements (either relative or
# absolute), then assume it is constructed properly.
return command
else:
# Search through the path list and find an existing file that
# we can access.
paths = os.environ.get("PATH", "").split(os.pathsep)
for path in paths:
item = os.path.join(path, command)
if os.path.isfile(item) and os.access(item, os.X_OK):
return item
return command
def _QuoteWin32CommandLineArgs(args):
new_args = []
for arg in args:
# Replace all double-quotes with double-double-quotes to escape
# them for cmd shell, and then quote the whole thing if there
# are any.
if arg.find('"') != -1:
arg = '""'.join(arg.split('"'))
arg = '"%s"' % arg
# Otherwise, if there are any spaces, quote the whole arg.
elif re.search(r"[ \t\n]", arg):
arg = '"%s"' % arg
new_args.append(arg)
return new_args
class Writer:
"""Visual Studio XML user user file writer."""
def __init__(self, user_file_path, version, name):
"""Initializes the user file.
Args:
user_file_path: Path to the user file.
version: Version info.
name: Name of the user file.
"""
self.user_file_path = user_file_path
self.version = version
self.name = name
self.configurations = {}
def AddConfig(self, name):
"""Adds a configuration to the project.
Args:
name: Configuration name.
"""
self.configurations[name] = ["Configuration", {"Name": name}]
def AddDebugSettings(
self, config_name, command, environment={}, working_directory=""
):
"""Adds a DebugSettings node to the user file for a particular config.
Args:
command: command line to run. First element in the list is the
executable. All elements of the command will be quoted if
necessary.
working_directory: other files which may trigger the rule. (optional)
"""
command = _QuoteWin32CommandLineArgs(command)
abs_command = _FindCommandInPath(command[0])
if environment and isinstance(environment, dict):
env_list = [f'{key}="{val}"' for (key, val) in environment.items()]
environment = " ".join(env_list)
else:
environment = ""
n_cmd = [
"DebugSettings",
{
"Command": abs_command,
"WorkingDirectory": working_directory,
"CommandArguments": " ".join(command[1:]),
"RemoteMachine": socket.gethostname(),
"Environment": environment,
"EnvironmentMerge": "true",
# Currently these are all "dummy" values that we're just setting
# in the default manner that MSVS does it. We could use some of
# these to add additional capabilities, I suppose, but they might
# not have parity with other platforms then.
"Attach": "false",
"DebuggerType": "3", # 'auto' debugger
"Remote": "1",
"RemoteCommand": "",
"HttpUrl": "",
"PDBPath": "",
"SQLDebugging": "",
"DebuggerFlavor": "0",
"MPIRunCommand": "",
"MPIRunArguments": "",
"MPIRunWorkingDirectory": "",
"ApplicationCommand": "",
"ApplicationArguments": "",
"ShimCommand": "",
"MPIAcceptMode": "",
"MPIAcceptFilter": "",
},
]
# Find the config, and add it if it doesn't exist.
if config_name not in self.configurations:
self.AddConfig(config_name)
# Add the DebugSettings onto the appropriate config.
self.configurations[config_name].append(n_cmd)
def WriteIfChanged(self):
"""Writes the user file."""
configs = ["Configurations"]
for config, spec in sorted(self.configurations.items()):
configs.append(spec)
content = [
"VisualStudioUserFile",
{"Version": self.version.ProjectVersion(), "Name": self.name},
configs,
]
easy_xml.WriteXmlIfChanged(
content, self.user_file_path, encoding="Windows-1252"
)
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateMaybeClassMetadataPostConstructor = updateMaybeClassMetadataPostConstructor;
const InversifyCoreError_1 = require("../../error/models/InversifyCoreError");
const InversifyCoreErrorKind_1 = require("../../error/models/InversifyCoreErrorKind");
function updateMaybeClassMetadataPostConstructor(methodName) {
return (metadata) => {
if (metadata.lifecycle.postConstructMethodNames.has(methodName)) {
throw new InversifyCoreError_1.InversifyCoreError(InversifyCoreErrorKind_1.InversifyCoreErrorKind.injectionDecoratorConflict, `Unexpected duplicated postConstruct method ${methodName.toString()}`);
}
metadata.lifecycle.postConstructMethodNames.add(methodName);
return metadata;
};
}
//# sourceMappingURL=updateMaybeClassMetadataPostConstructor.js.map
@@ -0,0 +1,125 @@
let OldValue = require('./old-value')
let Prefixer = require('./prefixer')
let utils = require('./utils')
let vendor = require('./vendor')
class Value extends Prefixer {
/**
* Clone decl for each prefixed values
*/
static save(prefixes, decl) {
let prop = decl.prop
let result = []
for (let prefix in decl._autoprefixerValues) {
let value = decl._autoprefixerValues[prefix]
if (value === decl.value) {
continue
}
let item
let propPrefix = vendor.prefix(prop)
if (propPrefix === '-pie-') {
continue
}
if (propPrefix === prefix) {
item = decl.value = value
result.push(item)
continue
}
let prefixed = prefixes.prefixed(prop, prefix)
let rule = decl.parent
if (!rule.every(i => i.prop !== prefixed)) {
result.push(item)
continue
}
let trimmed = value.replace(/\s+/, ' ')
let already = rule.some(
i => i.prop === decl.prop && i.value.replace(/\s+/, ' ') === trimmed
)
if (already) {
result.push(item)
continue
}
let cloned = this.clone(decl, { value })
item = decl.parent.insertBefore(decl, cloned)
result.push(item)
}
return result
}
/**
* Save values with next prefixed token
*/
add(decl, prefix) {
if (!decl._autoprefixerValues) {
decl._autoprefixerValues = {}
}
let value = decl._autoprefixerValues[prefix] || this.value(decl)
let before
do {
before = value
value = this.replace(value, prefix)
if (value === false) return
} while (value !== before)
decl._autoprefixerValues[prefix] = value
}
/**
* Is declaration need to be prefixed
*/
check(decl) {
let value = decl.value
if (!value.includes(this.name)) {
return false
}
return !!value.match(this.regexp())
}
/**
* Return function to fast find prefixed value
*/
old(prefix) {
return new OldValue(this.name, prefix + this.name)
}
/**
* Lazy regexp loading
*/
regexp() {
return this.regexpCache || (this.regexpCache = utils.regexp(this.name))
}
/**
* Add prefix to values in string
*/
replace(string, prefix) {
return string.replace(this.regexp(), `$1${prefix}$2`)
}
/**
* Get value with comments if it was not changed
*/
value(decl) {
if (decl.raws.value && decl.raws.value.value === decl.value) {
return decl.raws.value.raw
} else {
return decl.value
}
}
}
module.exports = Value
@@ -0,0 +1,22 @@
import { ILayout, Level, ConsoleAppender, LogEvent } from 'base-log-factory';
export interface ColorfulAppenderOptions {
layout?: ILayout;
colors?: Record<Level, string>;
}
/**
* Console appender (控制台输出)
*/
export declare class ColorfulAppender extends ConsoleAppender {
name: string;
colors: Record<Level, string>;
/**
* Constructor (构造函数)
*/
constructor(opts?: ColorfulAppenderOptions);
/**
* Write log (写入日志)
* @param event Log event (日志事件)
*/
write(event: LogEvent): void;
protected color(str: string, event: LogEvent): string;
}
@@ -0,0 +1,24 @@
import isSymbol from './isSymbol.js';
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/**
* The base implementation of `_.toNumber` which doesn't ensure correct
* conversions of binary, hexadecimal, or octal string values.
*
* @private
* @param {*} value The value to process.
* @returns {number} Returns the number.
*/
function baseToNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
return +value;
}
export default baseToNumber;
@@ -0,0 +1,81 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.3](https://github.com/inspect-js/is-set/compare/v2.0.2...v2.0.3) - 2024-03-08
### Commits
- [actions] reuse common workflows [`9d26ac6`](https://github.com/inspect-js/is-set/commit/9d26ac673752d89ba855a50616d36f09d49d6113)
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`3c91325`](https://github.com/inspect-js/is-set/commit/3c91325782b9dac5a602e150cd007e51029930f9)
- add types [`8fcc646`](https://github.com/inspect-js/is-set/commit/8fcc646ba3befa5448f987c7c12e0863443c9533)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`91caa24`](https://github.com/inspect-js/is-set/commit/91caa24511234e8f105f4534b681abdb2139b650)
- [readme] update URLs [`130e57b`](https://github.com/inspect-js/is-set/commit/130e57bc4d6386bd500d6886b9f094dd201cb88b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es5-shim`, `object-inspect`, `tape` [`4d75ee2`](https://github.com/inspect-js/is-set/commit/4d75ee27c0351999ba3093d519c12dc8bc0ff0ee)
- [actions] remove redundant finisher [`052fdce`](https://github.com/inspect-js/is-set/commit/052fdce2ee22fe49186c4d848063600f0c3f968d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `auto-changelog`, `core-js`, `es5-shim`, `object-inspect`, `safe-publish-latest`, `tape` [`eb31797`](https://github.com/inspect-js/is-set/commit/eb317975ea6240cc2dc043db9e4a837b00f82ffc)
- [actions] update rebase action to use reusable workflow [`8c478ba`](https://github.com/inspect-js/is-set/commit/8c478ba28881beb9f07650e409f6ef7df4a92455)
- [actions] update codecov uploader [`a0dac6b`](https://github.com/inspect-js/is-set/commit/a0dac6b9abb0c5a3eff6849cca4ba7f1c0c8dc17)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `es6-shim`, `object-inspect`, `tape` [`28d75a3`](https://github.com/inspect-js/is-set/commit/28d75a3ecb22235593b43e32505b90578da0dfab)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`7b2a4a7`](https://github.com/inspect-js/is-set/commit/7b2a4a75bae0f1a9163a83ac8760f10cfbcdb001)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `es5-shim`, `tape` [`20ce047`](https://github.com/inspect-js/is-set/commit/20ce04714d7be5fbee40c757e2ba7194e248c1a2)
- [readme] add actions and codecov badges [`e6e1796`](https://github.com/inspect-js/is-set/commit/e6e1796da1700594a3988466762405462f082cda)
- [meta] add missing `engines.node` [`9ed19af`](https://github.com/inspect-js/is-set/commit/9ed19afb98ad26e29378c2a7f1c82359d5c5a809)
- [meta] use `prepublishOnly` script for npm 7+ [`618f861`](https://github.com/inspect-js/is-set/commit/618f86128277814075fe56f7a69a272c31a48f85)
- [readme] remove dead badges [`76e890e`](https://github.com/inspect-js/is-set/commit/76e890ea165c6cb9088604ea010968d5e3e877c6)
- [meta] add `sideEffects` flag [`e21859b`](https://github.com/inspect-js/is-set/commit/e21859bb58bd5aafb907fe53045ec3bc14d07449)
## [v2.0.2](https://github.com/inspect-js/is-set/compare/v2.0.1...v2.0.2) - 2020-12-13
### Commits
- [Tests] migrate tests to Github Actions [`10a1a86`](https://github.com/inspect-js/is-set/commit/10a1a869d5f76921eed5bb7f1503be6f03eea8a2)
- [meta] do not publish github action workflow files [`9611423`](https://github.com/inspect-js/is-set/commit/9611423c4a6baa08a38f46ddafcca3ed4ea0ad97)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `es6-shim`, `object-inspect`, `tape` [`7d4d9b3`](https://github.com/inspect-js/is-set/commit/7d4d9b3ce8434a96c238cef62a7ce9ce79bd6079)
- [Tests] run `nyc` on all tests [`dff5fb6`](https://github.com/inspect-js/is-set/commit/dff5fb6cec206e51c6a7311fdb866bb0a0783b1a)
- [actions] add "Allow Edits" workflow [`6bed76a`](https://github.com/inspect-js/is-set/commit/6bed76af3119e489e622b3ea30807484dbb7fca9)
- [readme] remove travis badge [`ee9e740`](https://github.com/inspect-js/is-set/commit/ee9e74012ba35e86a4e92d7165548341d4323755)
- [Tests] add `core-js` tests [`9ef1b4e`](https://github.com/inspect-js/is-set/commit/9ef1b4ed0e55cec4154189247b6d7f6ad570e2f1)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`5661354`](https://github.com/inspect-js/is-set/commit/5661354f7a9861998257fdacfa9975feae9415b8)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`2cea69e`](https://github.com/inspect-js/is-set/commit/2cea69e16f64d7e706945010e03401a0a66507a3)
- [Dev Deps] update `es5-shim`, `tape` [`9e24b51`](https://github.com/inspect-js/is-set/commit/9e24b5158a0490c6b94deb31e76b06337eaafce6)
- [Dev Deps] update `auto-changelog`; add `aud` [`69ae556`](https://github.com/inspect-js/is-set/commit/69ae5561fe2408f301479dfa65dac0255e16952e)
- Fix typo in README.md, Map -&gt; Set [`5fe826a`](https://github.com/inspect-js/is-set/commit/5fe826a1e11bf810b7174e2dfaf893a5682511d4)
- [Tests] only audit prod deps [`c7c67f6`](https://github.com/inspect-js/is-set/commit/c7c67f6b1a32b2b24709d733a6681cbe1ec67640)
- [meta] normalize line endings [`6ef4ebd`](https://github.com/inspect-js/is-set/commit/6ef4ebdf090bdf1f42eb912b6af2cf31df4abaef)
## [v2.0.1](https://github.com/inspect-js/is-set/compare/v2.0.0...v2.0.1) - 2019-12-17
### Fixed
- [Refactor] avoid top-level return, because babel and webpack are broken [`#5`](https://github.com/inspect-js/is-set/issues/5) [`#4`](https://github.com/inspect-js/is-set/issues/4) [`#3`](https://github.com/inspect-js/is-set/issues/3) [`#78`](https://github.com/inspect-js/node-deep-equal/issues/78) [`#7`](https://github.com/es-shims/Promise.allSettled/issues/7) [`#12`](https://github.com/airbnb/js-shims/issues/12)
### Commits
- [actions] add automatic rebasing / merge commit blocking [`db358ba`](https://github.com/inspect-js/is-set/commit/db358ba503aa86fe2d375e188dcdfa7174a070c8)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`13e5083`](https://github.com/inspect-js/is-set/commit/13e50834eacb1c1830feb598da70ca6d0c53d2f7)
## [v2.0.0](https://github.com/inspect-js/is-set/compare/v1.0.0...v2.0.0) - 2019-11-12
### Commits
- Initial commit [`0299bc8`](https://github.com/inspect-js/is-set/commit/0299bc8fce41dce4586ac2f79c73802ad6a72c3d)
- Tests [`dec24eb`](https://github.com/inspect-js/is-set/commit/dec24eb0b9f57f14be8eedd0e572f94f81572e82)
- readme [`9b16e7f`](https://github.com/inspect-js/is-set/commit/9b16e7ff417b5c7be9829f22e32249d737bb8f6e)
- implementation [`3da6156`](https://github.com/inspect-js/is-set/commit/3da6156dae02e71d541bc8a0d3b751734b98e06d)
- npm init [`89fdc8b`](https://github.com/inspect-js/is-set/commit/89fdc8b3d980f6ca414f71dff2af38ed102321a1)
- [meta] add `funding` field; create `FUNDING.yml` [`77f2be9`](https://github.com/inspect-js/is-set/commit/77f2be9f281439472f81a0378632bc5eeb25a79b)
- [meta] add `safe-publish-latest`, `auto-changelog` [`cef1b4c`](https://github.com/inspect-js/is-set/commit/cef1b4cef15c565e76e3d46e66087821c4c437ae)
- [Tests] add `npm run lint` [`2a8284c`](https://github.com/inspect-js/is-set/commit/2a8284c6d2265ecd5c98bd4a008a82f0b519cd0a)
- [Tests] use shared travis-ci configs [`d2e342f`](https://github.com/inspect-js/is-set/commit/d2e342f3b8477cc74bcab44297d20d10fcf3718b)
- Only apps should have lockfiles [`624072b`](https://github.com/inspect-js/is-set/commit/624072b92774aaa6d851837c882181995d88ece8)
- [Tests] add `npx aud` in `posttest` [`214247c`](https://github.com/inspect-js/is-set/commit/214247c3fcd61b164c18b56524cdc183fc485450)
## v1.0.0 - 2015-02-18
### Commits
- init [`2f11646`](https://github.com/inspect-js/is-set/commit/2f1164617bee9c05c0f7ffae8fca2feed13bade7)
@@ -0,0 +1,239 @@
import { updateTask } from '@vitest/runner';
import { createDefer } from '@vitest/utils/helpers';
import { getSafeTimers } from '@vitest/utils/timers';
import { a as getBenchOptions, g as getBenchFn } from './benchmark.B3N2zMcH.js';
import { g as getWorkerState } from './utils.DvEY5TfP.js';
import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
import { getTests, getNames, getTestName } from '@vitest/runner/utils';
import { processError } from '@vitest/utils/error';
import { normalize } from 'pathe';
import { a as getSnapshotClient, i as inject, c as createExpect, v as vi } from './vi.CyIUVSoU.js';
import { r as rpc } from './rpc.BytlcPfC.js';
function createBenchmarkResult(name) {
return {
name,
rank: 0,
rme: 0,
samples: []
};
}
const benchmarkTasks = /* @__PURE__ */ new WeakMap();
async function runBenchmarkSuite(suite, runner) {
const { Task, Bench } = await runner.importTinybench();
const start = performance.now();
const benchmarkGroup = [];
const benchmarkSuiteGroup = [];
for (const task of suite.tasks) {
if (task.mode !== "run" && task.mode !== "queued") continue;
if (task.meta?.benchmark) benchmarkGroup.push(task);
else if (task.type === "suite") benchmarkSuiteGroup.push(task);
}
// run sub suites sequentially
for (const subSuite of benchmarkSuiteGroup) await runBenchmarkSuite(subSuite, runner);
if (benchmarkGroup.length) {
const defer = createDefer();
suite.result = {
state: "run",
startTime: start,
benchmark: createBenchmarkResult(suite.name)
};
updateTask$1("suite-prepare", suite);
const addBenchTaskListener = (task, benchmark) => {
task.addEventListener("complete", (e) => {
const taskRes = e.task.result;
const result = benchmark.result.benchmark;
benchmark.result.state = "pass";
Object.assign(result, taskRes);
// compute extra stats and free raw samples as early as possible
const samples = result.samples;
result.sampleCount = samples.length;
result.median = samples.length % 2 ? samples[Math.floor(samples.length / 2)] : (samples[samples.length / 2] + samples[samples.length / 2 - 1]) / 2;
if (!runner.config.benchmark?.includeSamples) result.samples.length = 0;
updateTask$1("test-finished", benchmark);
}, { once: true });
task.addEventListener("error", (e) => {
const task = e.task;
defer.reject(benchmark ? task.result.error : e);
}, { once: true });
};
benchmarkGroup.forEach((benchmark) => {
const benchmarkInstance = new Bench(getBenchOptions(benchmark));
const benchmarkFn = getBenchFn(benchmark);
benchmark.result = {
state: "run",
startTime: start,
benchmark: createBenchmarkResult(benchmark.name)
};
const task = new Task(benchmarkInstance, benchmark.name, benchmarkFn);
benchmarkTasks.set(benchmark, task);
addBenchTaskListener(task, benchmark);
});
const { setTimeout } = getSafeTimers();
const tasks = [];
for (const benchmark of benchmarkGroup) {
const task = benchmarkTasks.get(benchmark);
updateTask$1("test-prepare", benchmark);
await task.warmup();
tasks.push([await new Promise((resolve) => setTimeout(async () => {
resolve(await task.run());
})), benchmark]);
}
suite.result.duration = performance.now() - start;
suite.result.state = "pass";
updateTask$1("suite-finished", suite);
defer.resolve(null);
await defer;
}
function updateTask$1(event, task) {
updateTask(event, task, runner);
}
}
class NodeBenchmarkRunner {
moduleRunner;
constructor(config) {
this.config = config;
}
async importTinybench() {
return await import('tinybench');
}
importFile(filepath, source) {
if (source === "setup") {
const moduleNode = getWorkerState().evaluatedModules.getModuleById(filepath);
if (moduleNode) getWorkerState().evaluatedModules.invalidateModule(moduleNode);
}
return this.moduleRunner.import(filepath);
}
async runSuite(suite) {
await runBenchmarkSuite(suite, this);
}
async runTask() {
throw new Error("`test()` and `it()` is only available in test mode.");
}
}
// worker context is shared between all tests
const workerContext = Object.create(null);
class VitestTestRunner {
snapshotClient = getSnapshotClient();
workerState = getWorkerState();
moduleRunner;
cancelRun = false;
assertionsErrors = /* @__PURE__ */ new WeakMap();
pool = this.workerState.ctx.pool;
constructor(config) {
this.config = config;
}
importFile(filepath, source) {
if (source === "setup") {
const moduleNode = this.workerState.evaluatedModules.getModuleById(filepath);
if (moduleNode) this.workerState.evaluatedModules.invalidateModule(moduleNode);
}
return this.moduleRunner.import(filepath);
}
onCollectStart(file) {
this.workerState.current = file;
}
onCleanupWorkerContext(listener) {
this.workerState.onCleanup(listener);
}
onAfterRunFiles() {
this.snapshotClient.clear();
this.workerState.current = void 0;
}
getWorkerContext() {
return workerContext;
}
async onAfterRunSuite(suite) {
if (this.config.logHeapUsage && typeof process !== "undefined") suite.result.heap = process.memoryUsage().heapUsed;
if (suite.mode !== "skip" && "filepath" in suite) {
// mark snapshots in skipped tests as not obsolete
for (const test of getTests(suite)) if (test.mode === "skip") {
const name = getNames(test).slice(1).join(" > ");
this.snapshotClient.skipTest(suite.file.filepath, name);
}
const result = await this.snapshotClient.finish(suite.file.filepath);
if (this.workerState.config.snapshotOptions.updateSnapshot === "none" && result.unchecked) {
let message = `Obsolete snapshots found when no snapshot update is expected.\n`;
for (const key of result.uncheckedKeys) message += `· ${key}\n`;
suite.result.errors ??= [];
suite.result.errors.push(processError(new Error(message)));
suite.result.state = "fail";
}
await rpc().snapshotSaved(result);
}
this.workerState.current = suite.suite || suite.file;
}
onAfterRunTask(test) {
if (this.config.logHeapUsage && typeof process !== "undefined") test.result.heap = process.memoryUsage().heapUsed;
this.workerState.current = test.suite || test.file;
}
cancel(_reason) {
this.cancelRun = true;
}
injectValue(key) {
// inject has a very limiting type controlled by ProvidedContext
// some tests override it which causes the build to fail
return inject(key);
}
async onBeforeRunTask(test) {
if (this.cancelRun) test.mode = "skip";
if (test.mode !== "run" && test.mode !== "queued") return;
this.workerState.current = test;
}
async onBeforeRunSuite(suite) {
if (this.cancelRun) suite.mode = "skip";
// initialize snapshot state before running file suite
if (suite.mode !== "skip" && "filepath" in suite) await this.snapshotClient.setup(suite.file.filepath, this.workerState.config.snapshotOptions);
this.workerState.current = suite;
}
onBeforeTryTask(test) {
clearModuleMocks(this.config);
this.snapshotClient.clearTest(test.file.filepath, test.id);
setState({
assertionCalls: 0,
isExpectingAssertions: false,
isExpectingAssertionsError: null,
expectedAssertionsNumber: null,
expectedAssertionsNumberErrorGen: null,
currentTestName: getTestName(test),
snapshotState: this.snapshotClient.getSnapshotState(test.file.filepath)
}, globalThis[GLOBAL_EXPECT]);
}
onAfterTryTask(test) {
const { assertionCalls, expectedAssertionsNumber, expectedAssertionsNumberErrorGen, isExpectingAssertions, isExpectingAssertionsError } = test.context._local ? test.context.expect.getState() : getState(globalThis[GLOBAL_EXPECT]);
if (expectedAssertionsNumber !== null && assertionCalls !== expectedAssertionsNumber) throw expectedAssertionsNumberErrorGen();
if (isExpectingAssertions === true && assertionCalls === 0) throw isExpectingAssertionsError;
if (this.config.expect.requireAssertions && assertionCalls === 0) throw this.assertionsErrors.get(test);
}
extendTaskContext(context) {
// create error during the test initialization so we have a nice stack trace
if (this.config.expect.requireAssertions) this.assertionsErrors.set(context.task, /* @__PURE__ */ new Error("expected any number of assertion, but got none"));
let _expect;
Object.defineProperty(context, "expect", { get() {
if (!_expect) _expect = createExpect(context.task);
return _expect;
} });
Object.defineProperty(context, "_local", { get() {
return _expect != null;
} });
return context;
}
getImportDurations() {
const entries = [...this.workerState.moduleExecutionInfo?.entries() ?? []];
return Object.fromEntries(entries.map(([filepath, { duration, selfTime }]) => [normalize(filepath), {
selfTime,
totalTime: duration
}]));
}
}
function clearModuleMocks(config) {
const { clearMocks, mockReset, restoreMocks, unstubEnvs, unstubGlobals } = config;
if (restoreMocks) vi.restoreAllMocks();
if (mockReset) vi.resetAllMocks();
if (clearMocks) vi.clearAllMocks();
if (unstubEnvs) vi.unstubAllEnvs();
if (unstubGlobals) vi.unstubAllGlobals();
}
export { NodeBenchmarkRunner as N, VitestTestRunner as V };
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2015_collection: LibDefinition;
@@ -0,0 +1,18 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./argument"), exports);
@@ -0,0 +1,47 @@
# buffer-crc32
[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32)
crc32 that works with binary data and fancy character sets, outputs
buffer, signed or unsigned data and has tests.
Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix
# install
```
npm install buffer-crc32
```
# example
```js
var crc32 = require('buffer-crc32');
// works with buffers
var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00])
crc32(buf) // -> <Buffer 94 5a ab 4a>
// has convenience methods for getting signed or unsigned ints
crc32.signed(buf) // -> -1805997238
crc32.unsigned(buf) // -> 2488970058
// will cast to buffer if given a string, so you can
// directly use foreign characters safely
crc32('自動販売機') // -> <Buffer cb 03 1a c5>
// and works in append mode too
var partialCrc = crc32('hey');
var partialCrc = crc32(' ', partialCrc);
var partialCrc = crc32('sup', partialCrc);
var partialCrc = crc32(' ', partialCrc);
var finalCrc = crc32('bros', partialCrc); // -> <Buffer 47 fa 55 70>
```
# tests
This was tested against the output of zlib's crc32 method. You can run
the tests with`npm test` (requires tap)
# see also
https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also
supports buffer inputs and return unsigned ints (thanks @tjholowaychuk).
# license
MIT/X11
@@ -0,0 +1 @@
{"version":3,"file":"use-websocket.js","sourceRoot":"","sources":["../../src/lib/use-websocket.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA0E;AAC1E,uCAAsC;AACtC,yCAA0G;AAC1G,mDAAsD;AACtD,qCAAmC;AACnC,kDAAuC;AAUvC,+BAA2C;AAEpC,IAAM,YAAY,GAAG,UAC1B,GAAqD,EACrD,OAAkC,EAClC,OAAuB;IADvB,wBAAA,EAAA,UAAmB,2BAAe;IAClC,wBAAA,EAAA,cAAuB;IAEjB,IAAA,KAAgC,IAAA,gBAAQ,EAAsC,IAAI,CAAC,EAAlF,WAAW,QAAA,EAAE,cAAc,QAAuD,CAAC;IACpF,IAAA,KAA8B,IAAA,gBAAQ,EAAkB,EAAE,CAAC,EAA1D,UAAU,QAAA,EAAE,aAAa,QAAiC,CAAC;IAClE,IAAM,eAAe,GAAM,IAAA,eAAO,EAAC;QACjC,IAAI,CAAC,OAAO,CAAC,WAAW,IAAI,WAAW,EAAE,CAAC;YACxC,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACtC,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,kCAAsB,CAAC;YAChC,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;IACvC,IAAM,YAAY,GAAG,IAAA,cAAM,EAAgB,IAAI,CAAC,CAAC;IACjD,IAAM,YAAY,GAAG,IAAA,cAAM,EAAuB,IAAI,CAAC,CAAC;IACxD,IAAM,QAAQ,GAAG,IAAA,cAAM,EAAa,cAAM,OAAA,KAAK,CAAC,EAAN,CAAM,CAAC,CAAC;IAClD,IAAM,cAAc,GAAG,IAAA,cAAM,EAAS,CAAC,CAAC,CAAC;IACzC,IAAM,eAAe,GAAG,IAAA,cAAM,EAAS,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IACnD,IAAM,YAAY,GAAG,IAAA,cAAM,EAAqB,EAAE,CAAC,CAAC;IACpD,IAAM,cAAc,GAAG,IAAA,cAAM,EAAuB,IAAI,CAAC,CAAC;IAC1D,IAAM,YAAY,GAAG,IAAA,cAAM,EAAU,OAAO,CAAC,CAAC;IAC9C,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IAE/B,IAAM,iBAAiB,GACrB,YAAY,CAAC,OAAO,IAAI,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC;QACtE,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC;QAClC,GAAG,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC;YAChC,sBAAU,CAAC,UAAU,CAAC,CAAC;YACvB,sBAAU,CAAC,cAAc,CAAC;IAEhC,IAAM,sBAAsB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAEhG,IAAM,WAAW,GAAgB,IAAA,mBAAW,EAAC,UAAC,OAAO,EAAE,IAAW;;QAAX,qBAAA,EAAA,WAAW;QAChE,IAAI,kCAAsB,IAAI,YAAY,CAAC,OAAO,YAAY,WAAW,EAAE,CAAC;YAC1E,OAAO,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;YAC7D,OAAO;QACT,CAAC;QAED,IAAI,CAAA,MAAA,YAAY,CAAC,OAAO,0CAAE,UAAU,MAAK,sBAAU,CAAC,IAAI,EAAE,CAAC;YACzD,IAAA,wBAAiB,EAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YACzE,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;aAAM,IAAI,IAAI,EAAE,CAAC;YAChB,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAM,eAAe,GAAoB,IAAA,mBAAW,EAAC,UAAC,OAAO,EAAE,IAAW;QAAX,qBAAA,EAAA,WAAW;QACxE,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC;IAC7C,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,IAAM,YAAY,GAAG,IAAA,mBAAW,EAAC;QAC/B,IAAI,YAAY,CAAC,OAAO,CAAC,KAAK,KAAK,IAAI,IAAI,CAAC,kCAAsB,IAAI,YAAY,CAAC,OAAO,YAAY,WAAW,CAAC,EAAE,CAAC;YACnH,OAAO,YAAY,CAAC,OAAO,CAAC;QAC9B,CAAC;QAED,IAAI,cAAc,CAAC,OAAO,KAAK,IAAI,IAAI,YAAY,CAAC,OAAO,EAAE,CAAC;YAC5D,IAAA,wBAAiB,EAAC,YAAY,CAAC,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YACzE,cAAc,CAAC,OAAO,GAAG,IAAA,eAAgB,EAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAC5E,CAAC;QAED,OAAO,cAAc,CAAC,OAAO,CAAC;IAChC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAA,iBAAS,EAAC;QACR,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YACrC,IAAI,iBAA2B,CAAC;YAChC,IAAI,aAAW,GAAG,KAAK,CAAC;YACxB,IAAI,cAAY,GAAG,IAAI,CAAC;YAExB,IAAM,OAAK,GAAG;;;;;4BACZ,KAAA,YAAY,CAAA;4BAAW,qBAAM,IAAA,gBAAM,EAAC,GAAG,EAAE,YAAY,CAAC,EAAA;;4BAAtD,GAAa,OAAO,GAAG,SAA+B,CAAC;4BAEvD,IAAI,YAAY,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;gCAClC,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;gCAC1E,YAAY,CAAC,OAAO,GAAG,SAAS,CAAC;gCACjC,IAAA,qBAAS,EAAC,cAAM,OAAA,aAAa,CAAC,UAAA,IAAI,IAAI,OAAA,uBACjC,IAAI,KACP,OAAO,EAAE,sBAAU,CAAC,MAAM,IAC1B,EAHoC,CAGpC,CAAC,EAHa,CAGb,CAAC,CAAC;gCAEL,sBAAO;4BACT,CAAC;4BAEK,uBAAuB,GAAG,UAAC,OAAqC;gCACpE,IAAI,CAAC,aAAW,EAAE,CAAC;oCACjB,IAAA,qBAAS,EAAC,cAAM,OAAA,cAAc,CAAC,OAAO,CAAC,EAAvB,CAAuB,CAAC,CAAC;gCAC3C,CAAC;4BACH,CAAC,CAAC;4BAEI,sBAAsB,GAAG,UAAC,KAAiB;gCAC/C,IAAI,CAAC,aAAW,EAAE,CAAC;oCACjB,IAAA,qBAAS,EAAC,cAAM,OAAA,aAAa,CAAC,UAAA,IAAI;;wCAAI,OAAA,uBACjC,IAAI,GACJ,CAAC,YAAY,CAAC,OAAO,cAAM,GAAC,YAAY,CAAC,OAAO,IAAG,KAAK,KAAE,CAAC,EAC9D;oCAHoC,CAGpC,CAAC,EAHa,CAGb,CAAC,CAAC;gCACP,CAAC;4BACH,CAAC,CAAC;4BAEF,IAAI,cAAY,EAAE,CAAC;gCACjB,iBAAe,GAAG,IAAA,mCAAkB,EAClC,YAAY,EACZ,YAAY,CAAC,OAAO,EACpB,sBAAsB,EACtB,YAAY,EACZ,uBAAuB,EACvB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,WAAW,CACZ,CAAC;4BACJ,CAAC;;;;iBACF,CAAC;YAEF,QAAQ,CAAC,OAAO,GAAG;gBACjB,IAAI,CAAC,aAAW,EAAE,CAAC;oBACjB,IAAI,cAAc,CAAC,OAAO;wBAAE,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC;oBAC1D,iBAAe,aAAf,iBAAe,uBAAf,iBAAe,EAAI,CAAC;oBACpB,OAAK,EAAE,CAAC;gBACV,CAAC;YACH,CAAC,CAAC;YAEF,OAAK,EAAE,CAAC;YACR,OAAO;gBACL,aAAW,GAAG,IAAI,CAAC;gBACnB,cAAY,GAAG,KAAK,CAAC;gBACrB,IAAI,cAAc,CAAC,OAAO;oBAAE,cAAc,CAAC,OAAO,GAAG,IAAI,CAAC;gBAC1D,iBAAe,aAAf,iBAAe,uBAAf,iBAAe,EAAI,CAAC;gBACpB,cAAc,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC,CAAC;QACJ,CAAC;aAAM,IAAI,GAAG,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,EAAE,CAAC;YAC7C,cAAc,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,8BAA8B;YAC1D,aAAa,CAAC,UAAA,IAAI;;gBAAI,OAAA,uBACjB,IAAI,GACJ,CAAC,YAAY,CAAC,OAAO,cAAM,GAAC,YAAY,CAAC,OAAO,IAAG,sBAAU,CAAC,MAAM,KAAE,CAAC,EAC1E;YAHoB,CAGpB,CAAC,CAAC;QACN,CAAC;IACH,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,CAAC,CAAC,CAAC;IAExD,IAAA,iBAAS,EAAC;QACR,IAAI,iBAAiB,KAAKLine truncated
@@ -0,0 +1,17 @@
"use strict";
exports.__esModule = true;
exports["default"] = ensureObject;
function ensureObject(obj) {
for (var _len = arguments.length, props = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
props[_key - 1] = arguments[_key];
}
while (props.length > 0) {
var prop = props.shift();
if (!obj[prop]) {
obj[prop] = {};
}
obj = obj[prop];
}
}
module.exports = exports.default;
@@ -0,0 +1,307 @@
{
"142": 9034,
"143": 9035,
"145": 9036,
"150": 9037,
"151": 9038,
"154": 9039,
"155": 9040,
"202": 9041,
"419": 9042,
"aa": 8738,
"ac": 8739,
"ad": 8740,
"ae": 8741,
"af": 8742,
"ag": 8743,
"ai": 8744,
"al": 8745,
"am": 8746,
"an": 8747,
"ao": 8748,
"aq": 8749,
"ar": 8750,
"as": 8751,
"at": 8752,
"au": 8753,
"aw": 8754,
"ax": 8755,
"az": 8756,
"ba": 8757,
"bb": 8758,
"bd": 8759,
"be": 8760,
"bf": 8761,
"bg": 8762,
"bh": 8763,
"bi": 8764,
"bj": 8765,
"bl": 8766,
"bm": 8767,
"bn": 8768,
"bo": 8769,
"bq": 8770,
"br": 8771,
"bs": 8772,
"bt": 8773,
"bu": 8774,
"bv": 8775,
"bw": 8776,
"by": 8777,
"bz": 8778,
"ca": 8779,
"cc": 8780,
"cd": 8781,
"cf": 8782,
"cg": 8783,
"ch": 8784,
"ci": 8785,
"ck": 8786,
"cl": 8787,
"cm": 8788,
"cn": 8789,
"co": 8790,
"cp": 8791,
"cq": 8792,
"cr": 8793,
"cs": 8794,
"cu": 8795,
"cv": 8796,
"cw": 8797,
"cx": 8798,
"cy": 8799,
"cz": 8800,
"dd": 8801,
"de": 8802,
"dg": 8803,
"dj": 8804,
"dk": 8805,
"dm": 8806,
"do": 8807,
"dz": 8808,
"ea": 8809,
"ec": 8810,
"ee": 8811,
"eg": 8812,
"eh": 8813,
"er": 8814,
"es": 8815,
"et": 8816,
"eu": 8817,
"ez": 8818,
"fi": 8819,
"fj": 8820,
"fk": 8821,
"fm": 8822,
"fo": 8823,
"fr": 8824,
"fx": 8825,
"ga": 8826,
"gb": 8827,
"gd": 8828,
"ge": 8829,
"gf": 8830,
"gg": 8831,
"gh": 8832,
"gi": 8833,
"gl": 8834,
"gm": 8835,
"gn": 8836,
"gp": 8837,
"gq": 8838,
"gr": 8839,
"gs": 8840,
"gt": 8841,
"gu": 8842,
"gw": 8843,
"gy": 8844,
"hk": 8845,
"hm": 8846,
"hn": 8847,
"hr": 8848,
"ht": 8849,
"hu": 8850,
"ic": 8851,
"id": 8852,
"ie": 8853,
"il": 8854,
"im": 8855,
"in": 8856,
"io": 8857,
"iq": 8858,
"ir": 8859,
"is": 8860,
"it": 8861,
"je": 8862,
"jm": 8863,
"jo": 8864,
"jp": 8865,
"ke": 8866,
"kg": 8867,
"kh": 8868,
"ki": 8869,
"km": 8870,
"kn": 8871,
"kp": 8872,
"kr": 8873,
"kw": 8874,
"ky": 8875,
"kz": 8876,
"la": 8877,
"lb": 8878,
"lc": 8879,
"li": 8880,
"lk": 8881,
"lr": 8882,
"ls": 8883,
"lt": 8884,
"lu": 8885,
"lv": 8886,
"ly": 8887,
"ma": 8888,
"mc": 8889,
"md": 8890,
"me": 8891,
"mf": 8892,
"mg": 8893,
"mh": 8894,
"mk": 8895,
"ml": 8896,
"mm": 8897,
"mn": 8898,
"mo": 8899,
"mp": 8900,
"mq": 8901,
"mr": 8902,
"ms": 8903,
"mt": 8904,
"mu": 8905,
"mv": 8906,
"mw": 8907,
"mx": 8908,
"my": 8909,
"mz": 8910,
"na": 8911,
"nc": 8912,
"ne": 8913,
"nf": 8914,
"ng": 8915,
"ni": 8916,
"nl": 8917,
"no": 8918,
"np": 8919,
"nr": 8920,
"nt": 8921,
"nu": 8922,
"nz": 8923,
"om": 8924,
"pa": 8925,
"pe": 8926,
"pf": 8927,
"pg": 8928,
"ph": 8929,
"pk": 8930,
"pl": 8931,
"pm": 8932,
"pn": 8933,
"pr": 8934,
"ps": 8935,
"pt": 8936,
"pw": 8937,
"py": 8938,
"qa": 8939,
"qm..qz": 8940,
"re": 8941,
"ro": 8942,
"rs": 8943,
"ru": 8944,
"rw": 8945,
"sa": 8946,
"sb": 8947,
"sc": 8948,
"sd": 8949,
"se": 8950,
"sg": 8951,
"sh": 8952,
"si": 8953,
"sj": 8954,
"sk": 8955,
"sl": 8956,
"sm": 8957,
"sn": 8958,
"so": 8959,
"sr": 8960,
"ss": 8961,
"st": 8962,
"su": 8963,
"sv": 8964,
"sx": 8965,
"sy": 8966,
"sz": 8967,
"ta": 8968,
"tc": 8969,
"td": 8970,
"tf": 8971,
"tg": 8972,
"th": 8973,
"tj": 8974,
"tk": 8975,
"tl": 8976,
"tm": 8977,
"tn": 8978,
"to": 8979,
"tp": 8980,
"tr": 8981,
"tt": 8982,
"tv": 8983,
"tw": 8984,
"tz": 8985,
"ua": 8986,
"ug": 8987,
"um": 8988,
"un": 8989,
"us": 8990,
"uy": 8991,
"uz": 8992,
"va": 8993,
"vc": 8994,
"ve": 8995,
"vg": 8996,
"vi": 8997,
"vn": 8998,
"vu": 8999,
"wf": 9000,
"ws": 9001,
"xa..xz": 9002,
"yd": 9003,
"ye": 9004,
"yt": 9005,
"yu": 9006,
"za": 9007,
"zm": 9008,
"zr": 9009,
"zw": 9010,
"zz": 9011,
"001": 9012,
"002": 9013,
"003": 9014,
"005": 9015,
"009": 9016,
"011": 9017,
"013": 9018,
"014": 9019,
"015": 9020,
"017": 9021,
"018": 9022,
"019": 9023,
"021": 9024,
"029": 9025,
"030": 9026,
"034": 9027,
"035": 9028,
"039": 9029,
"053": 9030,
"054": 9031,
"057": 9032,
"061": 9033
}
@@ -0,0 +1,34 @@
// src/anchor.tsx
import { jsx, jsxs } from "react/jsx-runtime";
var AnchorIcon = (props) => /* @__PURE__ */ jsxs(
"svg",
{
"aria-hidden": "true",
focusable: "false",
height: "1em",
role: "presentation",
viewBox: "0 0 24 24",
width: "1em",
...props,
children: [
/* @__PURE__ */ jsx(
"path",
{
d: "M8.465,11.293c1.133-1.133,3.109-1.133,4.242,0L13.414,12l1.414-1.414l-0.707-0.707c-0.943-0.944-2.199-1.465-3.535-1.465 S7.994,8.935,7.051,9.879L4.929,12c-1.948,1.949-1.948,5.122,0,7.071c0.975,0.975,2.255,1.462,3.535,1.462 c1.281,0,2.562-0.487,3.536-1.462l0.707-0.707l-1.414-1.414l-0.707,0.707c-1.17,1.167-3.073,1.169-4.243,0 c-1.169-1.17-1.169-3.073,0-4.243L8.465,11.293z",
fill: "currentColor"
}
),
/* @__PURE__ */ jsx(
"path",
{
d: "M12,4.929l-0.707,0.707l1.414,1.414l0.707-0.707c1.169-1.167,3.072-1.169,4.243,0c1.169,1.17,1.169,3.073,0,4.243 l-2.122,2.121c-1.133,1.133-3.109,1.133-4.242,0L10.586,12l-1.414,1.414l0.707,0.707c0.943,0.944,2.199,1.465,3.535,1.465 s2.592-0.521,3.535-1.465L19.071,12c1.948-1.949,1.948-5.122,0-7.071C17.121,2.979,13.948,2.98,12,4.929z",
fill: "currentColor"
}
)
]
}
);
export {
AnchorIcon
};
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2024_promise: LibDefinition;
@@ -0,0 +1,17 @@
export interface OneTest {
readonly name: string;
readonly only?: boolean;
readonly skip?: boolean;
readonly absoluteBaseUrl: string;
readonly paths: {
[key: string]: Array<string>;
};
readonly mainFields?: string[];
readonly addMatchAll?: boolean;
readonly existingFiles: ReadonlyArray<string>;
readonly requestedModule: string;
readonly extensions: ReadonlyArray<string>;
readonly packageJson?: {};
readonly expectedPath: string | undefined;
}
export declare const tests: ReadonlyArray<OneTest>;
@@ -0,0 +1 @@
{"name":"through2","version":"2.0.5","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532122829,"integrity":"sha512-qgHKH8bdMcdr4LEVmk4Gfd5OsTY7sZNyoQs92ABQ+yFElwVowDdun26Fo2JlWCqZKwHs0fNZgaZxi60YeVZP+g==","mode":420,"size":745},"LICENSE.md":{"checkedAt":1794532122829,"integrity":"sha512-kbNbAqmGVG7FAI/fPNGZAjDn6F47V6OeMgr+NTz2HfXzA6Vu+uHzZFNF9WV3+5yE+shYb0O6TpE4a+tHrIiuTQ==","mode":420,"size":1128},"README.md":{"checkedAt":1794532122829,"integrity":"sha512-AV5UYNIERbiw5KG3x/6kzwq/wgFqZQlYkOG2mfTzZaXfvOf6DTZbqytbyl8LPH+kzhhj1ZDtZTa33/+74HCrAA==","mode":420,"size":5636},"through2.js":{"checkedAt":1794532122829,"integrity":"sha512-F2vLtM7Mw/LyDhNpfI35ZJN9SryVR3HohvCY9ZhC5HitmBHTygjqtDd2G3LfDzRAafrvhKxtURSg4L2e9KOOOA==","mode":420,"size":2140}}}
@@ -0,0 +1,25 @@
// src/use-separator.ts
import { filterDOMProps } from "@heroui/react-rsc-utils";
function useSeparator(props) {
let domProps = filterDOMProps(props, {
enabled: typeof props.elementType === "string"
});
let ariaOrientation;
if (props.orientation === "vertical") {
ariaOrientation = "vertical";
}
if (props.elementType !== "hr") {
return {
separatorProps: {
...domProps,
role: "separator",
"aria-orientation": ariaOrientation
}
};
}
return { separatorProps: domProps };
}
export {
useSeparator
};
@@ -0,0 +1,90 @@
"use client";
import { jsx } from 'react/jsx-runtime';
import { isHTMLElement } from 'motion-dom';
import * as React from 'react';
import { useId, useRef, useContext, useInsertionEffect } from 'react';
import { MotionConfigContext } from '../../context/MotionConfigContext.mjs';
import { useComposedRefs } from '../../utils/use-composed-ref.mjs';
/**
* Measurement functionality has to be within a separate component
* to leverage snapshot lifecycle.
*/
class PopChildMeasure extends React.Component {
getSnapshotBeforeUpdate(prevProps) {
const element = this.props.childRef.current;
if (element && prevProps.isPresent && !this.props.isPresent) {
const parent = element.offsetParent;
const parentWidth = isHTMLElement(parent)
? parent.offsetWidth || 0
: 0;
const size = this.props.sizeRef.current;
size.height = element.offsetHeight || 0;
size.width = element.offsetWidth || 0;
size.top = element.offsetTop;
size.left = element.offsetLeft;
size.right = parentWidth - size.width - size.left;
}
return null;
}
/**
* Required with getSnapshotBeforeUpdate to stop React complaining.
*/
componentDidUpdate() { }
render() {
return this.props.children;
}
}
function PopChild({ children, isPresent, anchorX, root }) {
const id = useId();
const ref = useRef(null);
const size = useRef({
width: 0,
height: 0,
top: 0,
left: 0,
right: 0,
});
const { nonce } = useContext(MotionConfigContext);
const composedRef = useComposedRefs(ref, children?.ref);
/**
* We create and inject a style block so we can apply this explicit
* sizing in a non-destructive manner by just deleting the style block.
*
* We can't apply size via render as the measurement happens
* in getSnapshotBeforeUpdate (post-render), likewise if we apply the
* styles directly on the DOM node, we might be overwriting
* styles set via the style prop.
*/
useInsertionEffect(() => {
const { width, height, top, left, right } = size.current;
if (isPresent || !ref.current || !width || !height)
return;
const x = anchorX === "left" ? `left: ${left}` : `right: ${right}`;
ref.current.dataset.motionPopId = id;
const style = document.createElement("style");
if (nonce)
style.nonce = nonce;
const parent = root ?? document.head;
parent.appendChild(style);
if (style.sheet) {
style.sheet.insertRule(`
[data-motion-pop-id="${id}"] {
position: absolute !important;
width: ${width}px !important;
height: ${height}px !important;
${x}px !important;
top: ${top}px !important;
}
`);
}
return () => {
if (parent.contains(style)) {
parent.removeChild(style);
}
};
}, [isPresent]);
return (jsx(PopChildMeasure, { isPresent: isPresent, childRef: ref, sizeRef: size, children: React.cloneElement(children, { ref: composedRef }) }));
}
export { PopChild };
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"K D E F A B wC"},B:{"1":"0 1 2 3 4 5 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 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I","2":"C L M G N O P"},C:{"1":"0 1 2 3 4 5 e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC","2":"xC TC J ZB K D E F A B C L M G N 0C 1C","4":"6 O P aB","194":"7 8 9 AB BB CB DB EB FB bB cB 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 UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d"},D:{"1":"0 1 2 3 4 5 9B AC BC CC DC EC FC GC HC IC JC KC LC 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 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC","2":"6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B","66":"1B 2B 3B UC 4B VC 5B 6B 7B 8B"},E:{"1":"L M G OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","2":"J ZB K D E F A B C 2C ZC 3C 4C 5C 6C aC NC"},F:{"1":"0 1 2 3 4 5 yB zB 0B 1B 2B 3B 4B 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC 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":"6 7 8 9 F B C G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB FD GD HD ID NC uC JD OC","66":"oB pB qB rB sB tB uB vB wB xB"},G:{"1":"WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","2":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD"},H:{"2":"hD"},I:{"1":"I","2":"TC J iD jD kD lD vC mD nD"},J:{"2":"D A"},K:{"1":"H","2":"A B C NC uC OC"},L:{"1":"I"},M:{"1":"MC"},N:{"2":"A B"},O:{"1":"PC"},P:{"1":"6 7 8 9 AB BB CB DB EB FB sD aC tD uD vD wD xD QC RC SC yD","2":"J oD pD qD rD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"194":"1D 2D"}},B:1,C:"inputmode attribute",D:true};
@@ -0,0 +1 @@
export { _ as default } from "../esm/_array_with_holes.js";
@@ -0,0 +1 @@
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAYM,SAAS,0CAAiC,CAAQ;IACvD,qFAAqF;IACrF,gEAAgE;IAChE,OAAO,CAAA,GAAA,oBAAY,MAAM,EAAE,MAAM,GAAG,EAAE,OAAO;AAC/C;AAEO,SAAS,0CAAe,aAA4C,EAAE,GAAQ;QAElE,wBAIV;IALP,IAAI,WAAW,CAAC,WAAW,EAAE,IAAI,MAAM,CAAC,OAAO,MAAM,EAAE,CAAC;IACxD,IAAI,cAAa,yBAAA,cAAc,OAAO,cAArB,6CAAA,uBAAuB,OAAO,CAAC,UAAU;IAC1D,IAAI,YACF,WAAW,CAAC,kBAAkB,EAAE,IAAI,MAAM,CAAC,YAAY,EAAE,EAAE,UAAU;IAEvE,QAAO,0BAAA,cAAc,OAAO,cAArB,8CAAA,wBAAuB,aAAa,CAAC;AAC9C;AAEA,MAAM,sCAAgB,IAAI;AACnB,SAAS,0CAAgB,UAA2B;IACzD,IAAI,KAAK,CAAA,GAAA,YAAI;IACb,oCAAc,GAAG,CAAC,YAAY;IAC9B,OAAO;AACT;AAEO,SAAS,0CAAgB,UAA2B;IACzD,OAAO,oCAAc,GAAG,CAAC;AAC3B","sources":["packages/@react-aria/selection/src/utils.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Collection, Key} from '@react-types/shared';\nimport {isAppleDevice, useId} from '@react-aria/utils';\nimport {RefObject} from 'react';\n\ninterface Event {\n altKey: boolean,\n ctrlKey: boolean,\n metaKey: boolean\n}\n\nexport function isNonContiguousSelectionModifier(e: Event): boolean {\n // Ctrl + Arrow Up/Arrow Down has a system wide meaning on macOS, so use Alt instead.\n // On Windows and Ubuntu, Alt + Space has a system wide meaning.\n return isAppleDevice() ? e.altKey : e.ctrlKey;\n}\n\nexport function getItemElement(collectionRef: RefObject<HTMLElement | null>, key: Key): Element | null | undefined {\n let selector = `[data-key=\"${CSS.escape(String(key))}\"]`;\n let collection = collectionRef.current?.dataset.collection;\n if (collection) {\n selector = `[data-collection=\"${CSS.escape(collection)}\"]${selector}`;\n }\n return collectionRef.current?.querySelector(selector);\n}\n\nconst collectionMap = new WeakMap<Collection<any>, string>();\nexport function useCollectionId(collection: Collection<any>): string {\n let id = useId();\n collectionMap.set(collection, id);\n return id;\n}\n\nexport function getCollectionId(collection: Collection<any>): string {\n return collectionMap.get(collection)!;\n}\n"],"names":[],"version":3,"file":"utils.module.js.map"}
@@ -0,0 +1,727 @@
import { plugins, format as format$1 } from '@vitest/pretty-format';
const ansiColors = {
bold: ['1', '22'],
dim: ['2', '22'],
italic: ['3', '23'],
underline: ['4', '24'],
// 5 & 6 are blinking
inverse: ['7', '27'],
hidden: ['8', '28'],
strike: ['9', '29'],
// 10-20 are fonts
// 21-29 are resets for 1-9
black: ['30', '39'],
red: ['31', '39'],
green: ['32', '39'],
yellow: ['33', '39'],
blue: ['34', '39'],
magenta: ['35', '39'],
cyan: ['36', '39'],
white: ['37', '39'],
brightblack: ['30;1', '39'],
brightred: ['31;1', '39'],
brightgreen: ['32;1', '39'],
brightyellow: ['33;1', '39'],
brightblue: ['34;1', '39'],
brightmagenta: ['35;1', '39'],
brightcyan: ['36;1', '39'],
brightwhite: ['37;1', '39'],
grey: ['90', '39'],
};
const styles = {
special: 'cyan',
number: 'yellow',
bigint: 'yellow',
boolean: 'yellow',
undefined: 'grey',
null: 'bold',
string: 'green',
symbol: 'green',
date: 'magenta',
regexp: 'red',
};
const truncator = '…';
function colorise(value, styleType) {
const color = ansiColors[styles[styleType]] || ansiColors[styleType] || '';
if (!color) {
return String(value);
}
return `\u001b[${color[0]}m${String(value)}\u001b[${color[1]}m`;
}
function normaliseOptions({ showHidden = false, depth = 2, colors = false, customInspect = true, showProxy = false, maxArrayLength = Infinity, breakLength = Infinity, seen = [],
// eslint-disable-next-line no-shadow
truncate = Infinity, stylize = String, } = {}, inspect) {
const options = {
showHidden: Boolean(showHidden),
depth: Number(depth),
colors: Boolean(colors),
customInspect: Boolean(customInspect),
showProxy: Boolean(showProxy),
maxArrayLength: Number(maxArrayLength),
breakLength: Number(breakLength),
truncate: Number(truncate),
seen,
inspect,
stylize,
};
if (options.colors) {
options.stylize = colorise;
}
return options;
}
function isHighSurrogate(char) {
return char >= '\ud800' && char <= '\udbff';
}
function truncate(string, length, tail = truncator) {
string = String(string);
const tailLength = tail.length;
const stringLength = string.length;
if (tailLength > length && stringLength > tailLength) {
return tail;
}
if (stringLength > length && stringLength > tailLength) {
let end = length - tailLength;
if (end > 0 && isHighSurrogate(string[end - 1])) {
end = end - 1;
}
return `${string.slice(0, end)}${tail}`;
}
return string;
}
// eslint-disable-next-line complexity
function inspectList(list, options, inspectItem, separator = ', ') {
inspectItem = inspectItem || options.inspect;
const size = list.length;
if (size === 0)
return '';
const originalLength = options.truncate;
let output = '';
let peek = '';
let truncated = '';
for (let i = 0; i < size; i += 1) {
const last = i + 1 === list.length;
const secondToLast = i + 2 === list.length;
truncated = `${truncator}(${list.length - i})`;
const value = list[i];
// If there is more than one remaining we need to account for a separator of `, `
options.truncate = originalLength - output.length - (last ? 0 : separator.length);
const string = peek || inspectItem(value, options) + (last ? '' : separator);
const nextLength = output.length + string.length;
const truncatedLength = nextLength + truncated.length;
// If this is the last element, and adding it would
// take us over length, but adding the truncator wouldn't - then break now
if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) {
break;
}
// If this isn't the last or second to last element to scan,
// but the string is already over length then break here
if (!last && !secondToLast && truncatedLength > originalLength) {
break;
}
// Peek at the next string to determine if we should
// break early before adding this item to the output
peek = last ? '' : inspectItem(list[i + 1], options) + (secondToLast ? '' : separator);
// If we have one element left, but this element and
// the next takes over length, the break early
if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {
break;
}
output += string;
// If the next element takes us to length -
// but there are more after that, then we should truncate now
if (!last && !secondToLast && nextLength + peek.length >= originalLength) {
truncated = `${truncator}(${list.length - i - 1})`;
break;
}
truncated = '';
}
return `${output}${truncated}`;
}
function quoteComplexKey(key) {
if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) {
return key;
}
return JSON.stringify(key)
.replace(/'/g, "\\'")
.replace(/\\"/g, '"')
.replace(/(^"|"$)/g, "'");
}
function inspectProperty([key, value], options) {
options.truncate -= 2;
if (typeof key === 'string') {
key = quoteComplexKey(key);
}
else if (typeof key !== 'number') {
key = `[${options.inspect(key, options)}]`;
}
options.truncate -= key.length;
value = options.inspect(value, options);
return `${key}: ${value}`;
}
function inspectArray(array, options) {
// Object.keys will always output the Array indices first, so we can slice by
// `array.length` to get non-index properties
const nonIndexProperties = Object.keys(array).slice(array.length);
if (!array.length && !nonIndexProperties.length)
return '[]';
options.truncate -= 4;
const listContents = inspectList(array, options);
options.truncate -= listContents.length;
let propertyContents = '';
if (nonIndexProperties.length) {
propertyContents = inspectList(nonIndexProperties.map(key => [key, array[key]]), options, inspectProperty);
}
return `[ ${listContents}${propertyContents ? `, ${propertyContents}` : ''} ]`;
}
const getArrayName = (array) => {
// We need to special case Node.js' Buffers, which report to be Uint8Array
// @ts-ignore
if (typeof Buffer === 'function' && array instanceof Buffer) {
return 'Buffer';
}
if (array[Symbol.toStringTag]) {
return array[Symbol.toStringTag];
}
return array.constructor.name;
};
function inspectTypedArray(array, options) {
const name = getArrayName(array);
options.truncate -= name.length + 4;
// Object.keys will always output the Array indices first, so we can slice by
// `array.length` to get non-index properties
const nonIndexProperties = Object.keys(array).slice(array.length);
if (!array.length && !nonIndexProperties.length)
return `${name}[]`;
// As we know TypedArrays only contain Unsigned Integers, we can skip inspecting each one and simply
// stylise the toString() value of them
let output = '';
for (let i = 0; i < array.length; i++) {
const string = `${options.stylize(truncate(array[i], options.truncate), 'number')}${i === array.length - 1 ? '' : ', '}`;
options.truncate -= string.length;
if (array[i] !== array.length && options.truncate <= 3) {
output += `${truncator}(${array.length - array[i] + 1})`;
break;
}
output += string;
}
let propertyContents = '';
if (nonIndexProperties.length) {
propertyContents = inspectList(nonIndexProperties.map(key => [key, array[key]]), options, inspectProperty);
}
return `${name}[ ${output}${propertyContents ? `, ${propertyContents}` : ''} ]`;
}
function inspectDate(dateObject, options) {
const stringRepresentation = dateObject.toJSON();
if (stringRepresentation === null) {
return 'Invalid Date';
}
const split = stringRepresentation.split('T');
const date = split[0];
// If we need to - truncate the time portion, but never the date
return options.stylize(`${date}T${truncate(split[1], options.truncate - date.length - 1)}`, 'date');
}
function inspectFunction(func, options) {
const functionType = func[Symbol.toStringTag] || 'Function';
const name = func.name;
if (!name) {
return options.stylize(`[${functionType}]`, 'special');
}
return options.stylize(`[${functionType} ${truncate(name, options.truncate - 11)}]`, 'special');
}
function inspectMapEntry([key, value], options) {
options.truncate -= 4;
key = options.inspect(key, options);
options.truncate -= key.length;
value = options.inspect(value, options);
return `${key} => ${value}`;
}
// IE11 doesn't support `map.entries()`
function mapToEntries(map) {
const entries = [];
map.forEach((value, key) => {
entries.push([key, value]);
});
return entries;
}
function inspectMap(map, options) {
if (map.size === 0)
return 'Map{}';
options.truncate -= 7;
return `Map{ ${inspectList(mapToEntries(map), options, inspectMapEntry)} }`;
}
const isNaN = Number.isNaN || (i => i !== i); // eslint-disable-line no-self-compare
function inspectNumber(number, options) {
if (isNaN(number)) {
return options.stylize('NaN', 'number');
}
if (number === Infinity) {
return options.stylize('Infinity', 'number');
}
if (number === -Infinity) {
return options.stylize('-Infinity', 'number');
}
if (number === 0) {
return options.stylize(1 / number === Infinity ? '+0' : '-0', 'number');
}
return options.stylize(truncate(String(number), options.truncate), 'number');
}
function inspectBigInt(number, options) {
let nums = truncate(number.toString(), options.truncate - 1);
if (nums !== truncator)
nums += 'n';
return options.stylize(nums, 'bigint');
}
function inspectRegExp(value, options) {
const flags = value.toString().split('/')[2];
const sourceLength = options.truncate - (2 + flags.length);
const source = value.source;
return options.stylize(`/${truncate(source, sourceLength)}/${flags}`, 'regexp');
}
// IE11 doesn't support `Array.from(set)`
function arrayFromSet(set) {
const values = [];
set.forEach(value => {
values.push(value);
});
return values;
}
function inspectSet(set, options) {
if (set.size === 0)
return 'Set{}';
options.truncate -= 7;
return `Set{ ${inspectList(arrayFromSet(set), options)} }`;
}
const stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5" +
'\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]', 'g');
const escapeCharacters = {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
"'": "\\'",
'\\': '\\\\',
};
const hex = 16;
function escape(char) {
return (escapeCharacters[char] ||
`\\u${`0000${char.charCodeAt(0).toString(hex)}`.slice(-4)}`);
}
function inspectString(string, options) {
if (stringEscapeChars.test(string)) {
string = string.replace(stringEscapeChars, escape);
}
return options.stylize(`'${truncate(string, options.truncate - 2)}'`, 'string');
}
function inspectSymbol(value) {
if ('description' in Symbol.prototype) {
return value.description ? `Symbol(${value.description})` : 'Symbol()';
}
return value.toString();
}
const getPromiseValue = () => 'Promise{…}';
function inspectObject$1(object, options) {
const properties = Object.getOwnPropertyNames(object);
const symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
if (properties.length === 0 && symbols.length === 0) {
return '{}';
}
options.truncate -= 4;
options.seen = options.seen || [];
if (options.seen.includes(object)) {
return '[Circular]';
}
options.seen.push(object);
const propertyContents = inspectList(properties.map(key => [key, object[key]]), options, inspectProperty);
const symbolContents = inspectList(symbols.map(key => [key, object[key]]), options, inspectProperty);
options.seen.pop();
let sep = '';
if (propertyContents && symbolContents) {
sep = ', ';
}
return `{ ${propertyContents}${sep}${symbolContents} }`;
}
const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false;
function inspectClass(value, options) {
let name = '';
if (toStringTag && toStringTag in value) {
name = value[toStringTag];
}
name = name || value.constructor.name;
// Babel transforms anonymous classes to the name `_class`
if (!name || name === '_class') {
name = '<Anonymous Class>';
}
options.truncate -= name.length;
return `${name}${inspectObject$1(value, options)}`;
}
function inspectArguments(args, options) {
if (args.length === 0)
return 'Arguments[]';
options.truncate -= 13;
return `Arguments[ ${inspectList(args, options)} ]`;
}
const errorKeys = [
'stack',
'line',
'column',
'name',
'message',
'fileName',
'lineNumber',
'columnNumber',
'number',
'description',
'cause',
];
function inspectObject(error, options) {
const properties = Object.getOwnPropertyNames(error).filter(key => errorKeys.indexOf(key) === -1);
const name = error.name;
options.truncate -= name.length;
let message = '';
if (typeof error.message === 'string') {
message = truncate(error.message, options.truncate);
}
else {
properties.unshift('message');
}
message = message ? `: ${message}` : '';
options.truncate -= message.length + 5;
options.seen = options.seen || [];
if (options.seen.includes(error)) {
return '[Circular]';
}
options.seen.push(error);
const propertyContents = inspectList(properties.map(key => [key, error[key]]), options, inspectProperty);
return `${name}${message}${propertyContents ? ` { ${propertyContents} }` : ''}`;
}
function inspectAttribute([key, value], options) {
options.truncate -= 3;
if (!value) {
return `${options.stylize(String(key), 'yellow')}`;
}
return `${options.stylize(String(key), 'yellow')}=${options.stylize(`"${value}"`, 'string')}`;
}
function inspectNodeCollection(collection, options) {
return inspectList(collection, options, inspectNode, '\n');
}
function inspectNode(node, options) {
switch (node.nodeType) {
case 1:
return inspectHTML(node, options);
case 3:
return options.inspect(node.data, options);
default:
return options.inspect(node, options);
}
}
// @ts-ignore (Deno doesn't have Element)
function inspectHTML(element, options) {
const properties = element.getAttributeNames();
const name = element.tagName.toLowerCase();
const head = options.stylize(`<${name}`, 'special');
const headClose = options.stylize(`>`, 'special');
const tail = options.stylize(`</${name}>`, 'special');
options.truncate -= name.length * 2 + 5;
let propertyContents = '';
if (properties.length > 0) {
propertyContents += ' ';
propertyContents += inspectList(properties.map((key) => [key, element.getAttribute(key)]), options, inspectAttribute, ' ');
}
options.truncate -= propertyContents.length;
const truncate = options.truncate;
let children = inspectNodeCollection(element.children, options);
if (children && children.length > truncate) {
children = `${truncator}(${element.children.length})`;
}
return `${head}${propertyContents}${headClose}${children}${tail}`;
}
/* !
* loupe
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
const symbolsSupported = typeof Symbol === 'function' && typeof Symbol.for === 'function';
const chaiInspect = symbolsSupported ? Symbol.for('chai/inspect') : '@@chai/inspect';
const nodeInspect = Symbol.for('nodejs.util.inspect.custom');
const constructorMap = new WeakMap();
const stringTagMap = {};
const baseTypesMap = {
undefined: (value, options) => options.stylize('undefined', 'undefined'),
null: (value, options) => options.stylize('null', 'null'),
boolean: (value, options) => options.stylize(String(value), 'boolean'),
Boolean: (value, options) => options.stylize(String(value), 'boolean'),
number: inspectNumber,
Number: inspectNumber,
bigint: inspectBigInt,
BigInt: inspectBigInt,
string: inspectString,
String: inspectString,
function: inspectFunction,
Function: inspectFunction,
symbol: inspectSymbol,
// A Symbol polyfill will return `Symbol` not `symbol` from typedetect
Symbol: inspectSymbol,
Array: inspectArray,
Date: inspectDate,
Map: inspectMap,
Set: inspectSet,
RegExp: inspectRegExp,
Promise: getPromiseValue,
// WeakSet, WeakMap are totally opaque to us
WeakSet: (value, options) => options.stylize('WeakSet{…}', 'special'),
WeakMap: (value, options) => options.stylize('WeakMap{…}', 'special'),
Arguments: inspectArguments,
Int8Array: inspectTypedArray,
Uint8Array: inspectTypedArray,
Uint8ClampedArray: inspectTypedArray,
Int16Array: inspectTypedArray,
Uint16Array: inspectTypedArray,
Int32Array: inspectTypedArray,
Uint32Array: inspectTypedArray,
Float32Array: inspectTypedArray,
Float64Array: inspectTypedArray,
Generator: () => '',
DataView: () => '',
ArrayBuffer: () => '',
Error: inspectObject,
HTMLCollection: inspectNodeCollection,
NodeList: inspectNodeCollection,
};
// eslint-disable-next-line complexity
const inspectCustom = (value, options, type, inspectFn) => {
if (chaiInspect in value && typeof value[chaiInspect] === 'function') {
return value[chaiInspect](options);
}
if (nodeInspect in value && typeof value[nodeInspect] === 'function') {
return value[nodeInspect](options.depth, options, inspectFn);
}
if ('inspect' in value && typeof value.inspect === 'function') {
return value.inspect(options.depth, options);
}
if ('constructor' in value && constructorMap.has(value.constructor)) {
return constructorMap.get(value.constructor)(value, options);
}
if (stringTagMap[type]) {
return stringTagMap[type](value, options);
}
return '';
};
const toString = Object.prototype.toString;
// eslint-disable-next-line complexity
function inspect$1(value, opts = {}) {
const options = normaliseOptions(opts, inspect$1);
const { customInspect } = options;
let type = value === null ? 'null' : typeof value;
if (type === 'object') {
type = toString.call(value).slice(8, -1);
}
// If it is a base value that we already support, then use Loupe's inspector
if (type in baseTypesMap) {
return baseTypesMap[type](value, options);
}
// If `options.customInspect` is set to true then try to use the custom inspector
if (customInspect && value) {
const output = inspectCustom(value, options, type, inspect$1);
if (output) {
if (typeof output === 'string')
return output;
return inspect$1(output, options);
}
}
const proto = value ? Object.getPrototypeOf(value) : false;
// If it's a plain Object then use Loupe's inspector
if (proto === Object.prototype || proto === null) {
return inspectObject$1(value, options);
}
// Specifically account for HTMLElements
// @ts-ignore
if (value && typeof HTMLElement === 'function' && value instanceof HTMLElement) {
return inspectHTML(value, options);
}
if ('constructor' in value) {
// If it is a class, inspect it like an object but add the constructor name
if (value.constructor !== Object) {
return inspectClass(value, options);
}
// If it is an object with an anonymous prototype, display it as an object.
return inspectObject$1(value, options);
}
// last chance to check if it's an object
if (value === Object(value)) {
return inspectObject$1(value, options);
}
// We have run out of options! Just stringify the value
return options.stylize(String(value), type);
}
const { AsymmetricMatcher, DOMCollection, DOMElement, Immutable, ReactElement, ReactTestComponent } = plugins;
const PLUGINS = [
ReactTestComponent,
ReactElement,
DOMElement,
DOMCollection,
Immutable,
AsymmetricMatcher
];
function stringify(object, maxDepth = 10, { maxLength,...options } = {}) {
const MAX_LENGTH = maxLength ?? 1e4;
let result;
try {
result = format$1(object, {
maxDepth,
escapeString: false,
plugins: PLUGINS,
...options
});
} catch {
result = format$1(object, {
callToJSON: false,
maxDepth,
escapeString: false,
plugins: PLUGINS,
...options
});
}
// Prevents infinite loop https://github.com/vitest-dev/vitest/issues/7249
return result.length >= MAX_LENGTH && maxDepth > 1 ? stringify(object, Math.floor(Math.min(maxDepth, Number.MAX_SAFE_INTEGER) / 2), {
maxLength,
...options
}) : result;
}
const formatRegExp = /%[sdjifoOc%]/g;
function format(...args) {
if (typeof args[0] !== "string") {
const objects = [];
for (let i = 0; i < args.length; i++) {
objects.push(inspect(args[i], {
depth: 0,
colors: false
}));
}
return objects.join(" ");
}
const len = args.length;
let i = 1;
const template = args[0];
let str = String(template).replace(formatRegExp, (x) => {
if (x === "%%") {
return "%";
}
if (i >= len) {
return x;
}
switch (x) {
case "%s": {
const value = args[i++];
if (typeof value === "bigint") {
return `${value.toString()}n`;
}
if (typeof value === "number" && value === 0 && 1 / value < 0) {
return "-0";
}
if (typeof value === "object" && value !== null) {
if (typeof value.toString === "function" && value.toString !== Object.prototype.toString) {
return value.toString();
}
return inspect(value, {
depth: 0,
colors: false
});
}
return String(value);
}
case "%d": {
const value = args[i++];
if (typeof value === "bigint") {
return `${value.toString()}n`;
}
return Number(value).toString();
}
case "%i": {
const value = args[i++];
if (typeof value === "bigint") {
return `${value.toString()}n`;
}
return Number.parseInt(String(value)).toString();
}
case "%f": return Number.parseFloat(String(args[i++])).toString();
case "%o": return inspect(args[i++], {
showHidden: true,
showProxy: true
});
case "%O": return inspect(args[i++]);
case "%c": {
i++;
return "";
}
case "%j": try {
return JSON.stringify(args[i++]);
} catch (err) {
const m = err.message;
if (m.includes("circular structure") || m.includes("cyclic structures") || m.includes("cyclic object")) {
return "[Circular]";
}
throw err;
}
default: return x;
}
});
for (let x = args[i]; i < len; x = args[++i]) {
if (x === null || typeof x !== "object") {
str += ` ${x}`;
} else {
str += ` ${inspect(x)}`;
}
}
return str;
}
function inspect(obj, options = {}) {
if (options.truncate === 0) {
options.truncate = Number.POSITIVE_INFINITY;
}
return inspect$1(obj, options);
}
function objDisplay(obj, options = {}) {
if (typeof options.truncate === "undefined") {
options.truncate = 40;
}
const str = inspect(obj, options);
const type = Object.prototype.toString.call(obj);
if (options.truncate && str.length >= options.truncate) {
if (type === "[object Function]") {
const fn = obj;
return !fn.name ? "[Function]" : `[Function: ${fn.name}]`;
} else if (type === "[object Array]") {
return `[ Array(${obj.length}) ]`;
} else if (type === "[object Object]") {
const keys = Object.keys(obj);
const kstr = keys.length > 2 ? `${keys.splice(0, 2).join(", ")}, ...` : keys.join(", ");
return `{ Object (${kstr}) }`;
} else {
return str;
}
}
return str;
}
export { format, formatRegExp, inspect, objDisplay, stringify };
@@ -0,0 +1,38 @@
import baseGetTag from './_baseGetTag.js';
import isObjectLike from './isObjectLike.js';
/** `Object#toString` result references. */
var numberTag = '[object Number]';
/**
* Checks if `value` is classified as a `Number` primitive or object.
*
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
* classified as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
* @example
*
* _.isNumber(3);
* // => true
*
* _.isNumber(Number.MIN_VALUE);
* // => true
*
* _.isNumber(Infinity);
* // => true
*
* _.isNumber('3');
* // => false
*/
function isNumber(value) {
return typeof value == 'number' ||
(isObjectLike(value) && baseGetTag(value) == numberTag);
}
export default isNumber;
@@ -0,0 +1,4 @@
import { MaybeClassElementMetadata } from '../models/MaybeClassElementMetadata';
export declare function injectBase(updateMetadata: (metadata: MaybeClassElementMetadata | undefined) => MaybeClassElementMetadata, updatePendingClassMetadataCount: (target: object) => (metadata: MaybeClassElementMetadata | undefined) => void): MethodDecorator & ParameterDecorator & PropertyDecorator;
export declare function injectBase(updateMetadata: (metadata: MaybeClassElementMetadata | undefined) => MaybeClassElementMetadata, updatePendingClassMetadataCount: (target: object) => (metadata: MaybeClassElementMetadata | undefined) => void): <T>(target: object, propertyKey: string | symbol | undefined, parameterIndex?: number | TypedPropertyDescriptor<T>) => void;
//# sourceMappingURL=injectBase.d.ts.map
@@ -0,0 +1,895 @@
import IdGenerator = require("./id-generator")
export = CodePathState;
/**
* A class which manages state to analyze code paths.
*/
declare class CodePathState {
/**
* Creates a new instance.
* @param {IdGenerator} idGenerator An id generator to generate id for code
* path segments.
* @param {Function} onLooped A callback function to notify looping.
*/
constructor(idGenerator: IdGenerator, onLooped: Function);
/**
* The ID generator to use when creating new segments.
* @type {IdGenerator}
*/
idGenerator: IdGenerator;
/**
* A callback function to call when there is a loop.
* @type {Function}
*/
notifyLooped: Function;
/**
* The root fork context for this state.
* @type {ForkContext}
*/
forkContext: ForkContext;
/**
* Context for logical expressions, conditional expressions, `if` statements,
* and loops.
* @type {ChoiceContext}
*/
choiceContext: ChoiceContext;
/**
* Context for `switch` statements.
* @type {SwitchContext}
*/
switchContext: SwitchContext;
/**
* Context for `try` statements.
* @type {TryContext}
*/
tryContext: TryContext;
/**
* Context for loop statements.
* @type {LoopContext}
*/
loopContext: LoopContext;
/**
* Context for `break` statements.
* @type {BreakContext}
*/
breakContext: BreakContext;
/**
* Context for `ChainExpression` nodes.
* @type {ChainContext}
*/
chainContext: ChainContext;
/**
* An array that tracks the current segments in the state. The array
* starts empty and segments are added with each `onCodePathSegmentStart`
* event and removed with each `onCodePathSegmentEnd` event. Effectively,
* this is tracking the code path segment traversal as the state is
* modified.
* @type {Array<CodePathSegment>}
*/
currentSegments: Array<CodePathSegment>;
/**
* Tracks the starting segment for this path. This value never changes.
* @type {CodePathSegment}
*/
initialSegment: CodePathSegment;
/**
* The final segments of the code path which are either `return` or `throw`.
* This is a union of the segments in `returnedForkContext` and `thrownForkContext`.
* @type {Array<CodePathSegment>}
*/
finalSegments: Array<CodePathSegment>;
/**
* The final segments of the code path which are `return`. These
* segments are also contained in `finalSegments`.
* @type {Array<CodePathSegment>}
*/
returnedForkContext: Array<CodePathSegment>;
/**
* The final segments of the code path which are `throw`. These
* segments are also contained in `finalSegments`.
* @type {Array<CodePathSegment>}
*/
thrownForkContext: Array<CodePathSegment>;
/**
* A passthrough property exposing the current pointer as part of the API.
* @type {CodePathSegment[]}
*/
get headSegments(): CodePathSegment[];
/**
* The parent forking context.
* This is used for the root of new forks.
* @type {ForkContext}
*/
get parentForkContext(): ForkContext;
/**
* Creates and stacks new forking context.
* @param {boolean} forkLeavingPath A flag which shows being in a
* "finally" block.
* @returns {ForkContext} The created context.
*/
pushForkContext(forkLeavingPath: boolean): ForkContext;
/**
* Pops and merges the last forking context.
* @returns {ForkContext} The last context.
*/
popForkContext(): ForkContext;
/**
* Creates a new path.
* @returns {void}
*/
forkPath(): void;
/**
* Creates a bypass path.
* This is used for such as IfStatement which does not have "else" chunk.
* @returns {void}
*/
forkBypassPath(): void;
/**
* Creates a context for ConditionalExpression, LogicalExpression, AssignmentExpression (logical assignments only),
* IfStatement, WhileStatement, DoWhileStatement, or ForStatement.
*
* LogicalExpressions have cases that it goes different paths between the
* `true` case and the `false` case.
*
* For Example:
*
* if (a || b) {
* foo();
* } else {
* bar();
* }
*
* In this case, `b` is evaluated always in the code path of the `else`
* block, but it's not so in the code path of the `if` block.
* So there are 3 paths.
*
* a -> foo();
* a -> b -> foo();
* a -> b -> bar();
* @param {string} kind A kind string.
* If the new context is LogicalExpression's or AssignmentExpression's, this is `"&&"` or `"||"` or `"??"`.
* If it's IfStatement's or ConditionalExpression's, this is `"test"`.
* Otherwise, this is `"loop"`.
* @param {boolean} isForkingAsResult Indicates if the result of the choice
* creates a fork.
* @returns {void}
*/
pushChoiceContext(kind: string, isForkingAsResult: boolean): void;
/**
* Pops the last choice context and finalizes it.
* This is called upon leaving a node that represents a choice.
* @throws {Error} (Unreachable.)
* @returns {ChoiceContext} The popped context.
*/
popChoiceContext(): ChoiceContext;
/**
* Creates a code path segment to represent right-hand operand of a logical
* expression.
* This is called in the preprocessing phase when entering a node.
* @throws {Error} (Unreachable.)
* @returns {void}
*/
makeLogicalRight(): void;
/**
* Makes a code path segment of the `if` block.
* @returns {void}
*/
makeIfConsequent(): void;
/**
* Makes a code path segment of the `else` block.
* @returns {void}
*/
makeIfAlternate(): void;
/**
* Pushes a new `ChainExpression` context to the stack. This method is
* called when entering a `ChainExpression` node. A chain context is used to
* count forking in the optional chain then merge them on the exiting from the
* `ChainExpression` node.
* @returns {void}
*/
pushChainContext(): void;
/**
* Pop a `ChainExpression` context from the stack. This method is called on
* exiting from each `ChainExpression` node. This merges all forks of the
* last optional chaining.
* @returns {void}
*/
popChainContext(): void;
/**
* Create a choice context for optional access.
* This method is called on entering to each `(Call|Member)Expression[optional=true]` node.
* This creates a choice context as similar to `LogicalExpression[operator="??"]` node.
* @returns {void}
*/
makeOptionalNode(): void;
/**
* Create a fork.
* This method is called on entering to the `arguments|property` property of each `(Call|Member)Expression` node.
* @returns {void}
*/
makeOptionalRight(): void;
/**
* Creates a context object of SwitchStatement and stacks it.
* @param {boolean} hasCase `true` if the switch statement has one or more
* case parts.
* @param {string|null} label The label text.
* @returns {void}
*/
pushSwitchContext(hasCase: boolean, label: string | null): void;
/**
* Pops the last context of SwitchStatement and finalizes it.
*
* - Disposes all forking stack for `case` and `default`.
* - Creates the next code path segment from `context.brokenForkContext`.
* - If the last `SwitchCase` node is not a `default` part, creates a path
* to the `default` body.
* @returns {void}
*/
popSwitchContext(): void;
/**
* Makes a code path segment for a `SwitchCase` node.
* @param {boolean} isCaseBodyEmpty `true` if the body is empty.
* @param {boolean} isDefaultCase `true` if the body is the default case.
* @returns {void}
*/
makeSwitchCaseBody(isCaseBodyEmpty: boolean, isDefaultCase: boolean): void;
/**
* Creates a context object of TryStatement and stacks it.
* @param {boolean} hasFinalizer `true` if the try statement has a
* `finally` block.
* @returns {void}
*/
pushTryContext(hasFinalizer: boolean): void;
/**
* Pops the last context of TryStatement and finalizes it.
* @returns {void}
*/
popTryContext(): void;
/**
* Makes a code path segment for a `catch` block.
* @returns {void}
*/
makeCatchBlock(): void;
/**
* Makes a code path segment for a `finally` block.
*
* In the `finally` block, parallel paths are created. The parallel paths
* are used as leaving-paths. The leaving-paths are paths from `return`
* statements and `throw` statements in a `try` block or a `catch` block.
* @returns {void}
*/
makeFinallyBlock(): void;
/**
* Makes a code path segment from the first throwable node to the `catch`
* block or the `finally` block.
* @returns {void}
*/
makeFirstThrowablePathInTryBlock(): void;
/**
* Creates a context object of a loop statement and stacks it.
* @param {string} type The type of the node which was triggered. One of
* `WhileStatement`, `DoWhileStatement`, `ForStatement`, `ForInStatement`,
* and `ForStatement`.
* @param {string|null} label A label of the node which was triggered.
* @throws {Error} (Unreachable - unknown type.)
* @returns {void}
*/
pushLoopContext(type: string, label: string | null): void;
/**
* Pops the last context of a loop statement and finalizes it.
* @throws {Error} (Unreachable - unknown type.)
* @returns {void}
*/
popLoopContext(): void;
/**
* Makes a code path segment for the test part of a WhileStatement.
* @param {boolean|undefined} test The test value (only when constant).
* @returns {void}
*/
makeWhileTest(test: boolean | undefined): void;
/**
* Makes a code path segment for the body part of a WhileStatement.
* @returns {void}
*/
makeWhileBody(): void;
/**
* Makes a code path segment for the body part of a DoWhileStatement.
* @returns {void}
*/
makeDoWhileBody(): void;
/**
* Makes a code path segment for the test part of a DoWhileStatement.
* @param {boolean|undefined} test The test value (only when constant).
* @returns {void}
*/
makeDoWhileTest(test: boolean | undefined): void;
/**
* Makes a code path segment for the test part of a ForStatement.
* @param {boolean|undefined} test The test value (only when constant).
* @returns {void}
*/
makeForTest(test: boolean | undefined): void;
/**
* Makes a code path segment for the update part of a ForStatement.
* @returns {void}
*/
makeForUpdate(): void;
/**
* Makes a code path segment for the body part of a ForStatement.
* @returns {void}
*/
makeForBody(): void;
/**
* Makes a code path segment for the left part of a ForInStatement and a
* ForOfStatement.
* @returns {void}
*/
makeForInOfLeft(): void;
/**
* Makes a code path segment for the right part of a ForInStatement and a
* ForOfStatement.
* @returns {void}
*/
makeForInOfRight(): void;
/**
* Makes a code path segment for the body part of a ForInStatement and a
* ForOfStatement.
* @returns {void}
*/
makeForInOfBody(): void;
/**
* Creates new context in which a `break` statement can be used. This occurs inside of a loop,
* labeled statement, or switch statement.
* @param {boolean} breakable Indicates if we are inside a statement where
* `break` without a label will exit the statement.
* @param {string|null} label The label associated with the statement.
* @returns {BreakContext} The new context.
*/
pushBreakContext(breakable: boolean, label: string | null): BreakContext;
/**
* Removes the top item of the break context stack.
* @returns {Object} The removed context.
*/
popBreakContext(): any;
/**
* Makes a path for a `break` statement.
*
* It registers the head segment to a context of `break`.
* It makes new unreachable segment, then it set the head with the segment.
* @param {string|null} label A label of the break statement.
* @returns {void}
*/
makeBreak(label: string | null): void;
/**
* Makes a path for a `continue` statement.
*
* It makes a looping path.
* It makes new unreachable segment, then it set the head with the segment.
* @param {string|null} label A label of the continue statement.
* @returns {void}
*/
makeContinue(label: string | null): void;
/**
* Makes a path for a `return` statement.
*
* It registers the head segment to a context of `return`.
* It makes new unreachable segment, then it set the head with the segment.
* @returns {void}
*/
makeReturn(): void;
/**
* Makes a path for a `throw` statement.
*
* It registers the head segment to a context of `throw`.
* It makes new unreachable segment, then it set the head with the segment.
* @returns {void}
*/
makeThrow(): void;
/**
* Makes the final path.
* @returns {void}
*/
makeFinal(): void;
}
declare namespace CodePathState {
export { LoopContext };
}
import ForkContext = require("./fork-context");
/**
* Represents a choice in the code path.
*
* Choices are created by logical operators such as `&&`, loops, conditionals,
* and `if` statements. This is the point at which the code path has a choice of
* which direction to go.
*
* The result of a choice might be in the left (test) expression of another choice,
* and in that case, may create a new fork. For example, `a || b` is a choice
* but does not create a new fork because the result of the expression is
* not used as the test expression in another expression. In this case,
* `isForkingAsResult` is false. In the expression `a || b || c`, the `a || b`
* expression appears as the test expression for `|| c`, so the
* result of `a || b` creates a fork because execution may or may not
* continue to `|| c`. `isForkingAsResult` for `a || b` in this case is true
* while `isForkingAsResult` for `|| c` is false. (`isForkingAsResult` is always
* false for `if` statements, conditional expressions, and loops.)
*
* All of the choices except one (`??`) operate on a true/false fork, meaning if
* true go one way and if false go the other (tracked by `trueForkContext` and
* `falseForkContext`). The `??` operator doesn't operate on true/false because
* the left expression is evaluated to be nullish or not, so only if nullish do
* we fork to the right expression (tracked by `nullishForkContext`).
*/
declare class ChoiceContext {
/**
* Creates a new instance.
* @param {ChoiceContext} upperContext The previous `ChoiceContext`.
* @param {string} kind The kind of choice. If it's a logical or assignment expression, this
* is `"&&"` or `"||"` or `"??"`; if it's an `if` statement or
* conditional expression, this is `"test"`; otherwise, this is `"loop"`.
* @param {boolean} isForkingAsResult Indicates if the result of the choice
* creates a fork.
* @param {ForkContext} forkContext The containing `ForkContext`.
*/
constructor(upperContext: ChoiceContext, kind: string, isForkingAsResult: boolean, forkContext: ForkContext);
/**
* The previous `ChoiceContext`
* @type {ChoiceContext}
*/
upper: ChoiceContext;
/**
* The kind of choice. If it's a logical or assignment expression, this
* is `"&&"` or `"||"` or `"??"`; if it's an `if` statement or
* conditional expression, this is `"test"`; otherwise, this is `"loop"`.
* @type {string}
*/
kind: string;
/**
* Indicates if the result of the choice forks the code path.
* @type {boolean}
*/
isForkingAsResult: boolean;
/**
* The fork context for the `true` path of the choice.
* @type {ForkContext}
*/
trueForkContext: ForkContext;
/**
* The fork context for the `false` path of the choice.
* @type {ForkContext}
*/
falseForkContext: ForkContext;
/**
* The fork context for when the choice result is `null` or `undefined`.
* @type {ForkContext}
*/
nullishForkContext: ForkContext;
/**
* Indicates if any of `trueForkContext`, `falseForkContext`, or
* `nullishForkContext` have been updated with segments from a child context.
* @type {boolean}
*/
processed: boolean;
}
/**
* Represents the context for any loop.
* @typedef {WhileLoopContext|DoWhileLoopContext|ForLoopContext|ForInLoopContext|ForOfLoopContext} LoopContext
*/
/**
* Represents the context for a `switch` statement.
*/
declare class SwitchContext {
/**
* Creates a new instance.
* @param {SwitchContext} upperContext The previous context.
* @param {boolean} hasCase Indicates if there is at least one `case` statement.
* `default` doesn't count.
*/
constructor(upperContext: SwitchContext, hasCase: boolean);
/**
* The previous context.
* @type {SwitchContext}
*/
upper: SwitchContext;
/**
* Indicates if there is at least one `case` statement. `default` doesn't count.
* @type {boolean}
*/
hasCase: boolean;
/**
* The `default` keyword.
* @type {Array<CodePathSegment>|null}
*/
defaultSegments: Array<CodePathSegment> | null;
/**
* The default case body starting segments.
* @type {Array<CodePathSegment>|null}
*/
defaultBodySegments: Array<CodePathSegment> | null;
/**
* Indicates if a `default` case and is empty exists.
* @type {boolean}
*/
foundEmptyDefault: boolean;
/**
* Indicates that a `default` exists and is the last case.
* @type {boolean}
*/
lastIsDefault: boolean;
/**
* The number of fork contexts created. This is equivalent to the
* number of `case` statements plus a `default` statement (if present).
* @type {number}
*/
forkCount: number;
}
/**
* Represents the context for a `try` statement.
*/
declare class TryContext {
/**
* Creates a new instance.
* @param {TryContext} upperContext The previous context.
* @param {boolean} hasFinalizer Indicates if the `try` statement has a
* `finally` block.
* @param {ForkContext} forkContext The enclosing fork context.
*/
constructor(upperContext: TryContext, hasFinalizer: boolean, forkContext: ForkContext);
/**
* The previous context.
* @type {TryContext}
*/
upper: TryContext;
/**
* Indicates if the `try` statement has a `finally` block.
* @type {boolean}
*/
hasFinalizer: boolean;
/**
* Tracks the traversal position inside of the `try` statement. This is
* used to help determine the context necessary to create paths because
* a `try` statement may or may not have `catch` or `finally` blocks,
* and code paths behave differently in those blocks.
* @type {"try"|"catch"|"finally"}
*/
position: "try" | "catch" | "finally";
/**
* If the `try` statement has a `finally` block, this affects how a
* `return` statement behaves in the `try` block. Without `finally`,
* `return` behaves as usual and doesn't require a fork; with `finally`,
* `return` forks into the `finally` block, so we need a fork context
* to track it.
* @type {ForkContext|null}
*/
returnedForkContext: ForkContext | null;
/**
* When a `throw` occurs inside of a `try` block, the code path forks
* into the `catch` or `finally` blocks, and this fork context tracks
* that path.
* @type {ForkContext}
*/
thrownForkContext: ForkContext;
/**
* Indicates if the last segment in the `try` block is reachable.
* @type {boolean}
*/
lastOfTryIsReachable: boolean;
/**
* Indicates if the last segment in the `catch` block is reachable.
* @type {boolean}
*/
lastOfCatchIsReachable: boolean;
}
/**
* Represents the context for any loop.
*/
type LoopContext = WhileLoopContext | DoWhileLoopContext | ForLoopContext | ForInLoopContext | ForOfLoopContext;
/**
* Represents the context in which a `break` statement can be used.
*
* A `break` statement without a label is only valid in a few places in
* JavaScript: any type of loop or a `switch` statement. Otherwise, `break`
* without a label causes a syntax error. For these contexts, `breakable` is
* set to `true` to indicate that a `break` without a label is valid.
*
* However, a `break` statement with a label is also valid inside of a labeled
* statement. For example, this is valid:
*
* a : {
* break a;
* }
*
* The `breakable` property is set false for labeled statements to indicate
* that `break` without a label is invalid.
*/
declare class BreakContext {
/**
* Creates a new instance.
* @param {BreakContext} upperContext The previous `BreakContext`.
* @param {boolean} breakable Indicates if we are inside a statement where
* `break` without a label will exit the statement.
* @param {string|null} label The label for the statement.
* @param {ForkContext} forkContext The current fork context.
*/
constructor(upperContext: BreakContext, breakable: boolean, label: string | null, forkContext: ForkContext);
/**
* The previous `BreakContext`
* @type {BreakContext}
*/
upper: BreakContext;
/**
* Indicates if we are inside a statement where `break` without a label
* will exit the statement.
* @type {boolean}
*/
breakable: boolean;
/**
* The label associated with the statement.
* @type {string|null}
*/
label: string | null;
/**
* The fork context for the `break`.
* @type {ForkContext}
*/
brokenForkContext: ForkContext;
}
/**
* Represents the context for `ChainExpression` nodes.
*/
declare class ChainContext {
/**
* Creates a new instance.
* @param {ChainContext} upperContext The previous `ChainContext`.
*/
constructor(upperContext: ChainContext);
/**
* The previous `ChainContext`
* @type {ChainContext}
*/
upper: ChainContext;
/**
* The number of choice contexts inside of the `ChainContext`.
* @type {number}
*/
choiceContextCount: number;
}
import CodePathSegment = require("./code-path-segment");
/**
* Represents the context for a `while` loop.
*/
declare class WhileLoopContext extends LoopContextBase {
/**
* Creates a new instance.
* @param {LoopContext|null} upperContext The previous `LoopContext`.
* @param {string|null} label The label for the loop from an enclosing `LabeledStatement`.
* @param {BreakContext} breakContext The context for breaking the loop.
*/
constructor(upperContext: LoopContext | null, label: string | null, breakContext: BreakContext);
/**
* The segments representing the test condition where `continue` will
* jump to. The test condition will typically have just one segment but
* it's possible for there to be more than one.
* @type {Array<CodePathSegment>|null}
*/
continueDestSegments: Array<CodePathSegment> | null;
}
/**
* Represents the context for a `do-while` loop.
*/
declare class DoWhileLoopContext extends LoopContextBase {
/**
* Creates a new instance.
* @param {LoopContext|null} upperContext The previous `LoopContext`.
* @param {string|null} label The label for the loop from an enclosing `LabeledStatement`.
* @param {BreakContext} breakContext The context for breaking the loop.
* @param {ForkContext} forkContext The enclosing fork context.
*/
constructor(upperContext: LoopContext | null, label: string | null, breakContext: BreakContext, forkContext: ForkContext);
/**
* The segments at the start of the loop body. This is the only loop
* where the test comes at the end, so the first iteration always
* happens and we need a reference to the first statements.
* @type {Array<CodePathSegment>|null}
*/
entrySegments: Array<CodePathSegment> | null;
/**
* The fork context to follow when a `continue` is found.
* @type {ForkContext}
*/
continueForkContext: ForkContext;
}
/**
* Represents the context for a `for` loop.
*/
declare class ForLoopContext extends LoopContextBase {
/**
* Creates a new instance.
* @param {LoopContext|null} upperContext The previous `LoopContext`.
* @param {string|null} label The label for the loop from an enclosing `LabeledStatement`.
* @param {BreakContext} breakContext The context for breaking the loop.
*/
constructor(upperContext: LoopContext | null, label: string | null, breakContext: BreakContext);
/**
* The end of the init expression. This may change during the lifetime
* of the instance as we traverse the loop because some loops don't have
* an init expression.
* @type {Array<CodePathSegment>|null}
*/
endOfInitSegments: Array<CodePathSegment> | null;
/**
* The start of the test expression. This may change during the lifetime
* of the instance as we traverse the loop because some loops don't have
* a test expression.
* @type {Array<CodePathSegment>|null}
*/
testSegments: Array<CodePathSegment> | null;
/**
* The end of the test expression. This may change during the lifetime
* of the instance as we traverse the loop because some loops don't have
* a test expression.
* @type {Array<CodePathSegment>|null}
*/
endOfTestSegments: Array<CodePathSegment> | null;
/**
* The start of the update expression. This may change during the lifetime
* of the instance as we traverse the loop because some loops don't have
* an update expression.
* @type {Array<CodePathSegment>|null}
*/
updateSegments: Array<CodePathSegment> | null;
/**
* The end of the update expresion. This may change during the lifetime
* of the instance as we traverse the loop because some loops don't have
* an update expression.
* @type {Array<CodePathSegment>|null}
*/
endOfUpdateSegments: Array<CodePathSegment> | null;
/**
* The segments representing the test condition where `continue` will
* jump to. The test condition will typically have just one segment but
* it's possible for there to be more than one. This may change during the
* lifetime of the instance as we traverse the loop because some loops
* don't have an update expression. When there is an update expression, this
* will end up pointing to that expression; otherwise it will end up pointing
* to the test expression.
* @type {Array<CodePathSegment>|null}
*/
continueDestSegments: Array<CodePathSegment> | null;
}
/**
* Represents the context for a `for-in` loop.
*
* Terminology:
* - "left" means the part of the loop to the left of the `in` keyword. For
* example, in `for (var x in y)`, the left is `var x`.
* - "right" means the part of the loop to the right of the `in` keyword. For
* example, in `for (var x in y)`, the right is `y`.
*/
declare class ForInLoopContext extends LoopContextBase {
/**
* Creates a new instance.
* @param {LoopContext|null} upperContext The previous `LoopContext`.
* @param {string|null} label The label for the loop from an enclosing `LabeledStatement`.
* @param {BreakContext} breakContext The context for breaking the loop.
*/
constructor(upperContext: LoopContext | null, label: string | null, breakContext: BreakContext);
/**
* The segments that came immediately before the start of the loop.
* This allows you to traverse backwards out of the loop into the
* surrounding code. This is necessary to evaluate the right expression
* correctly, as it must be evaluated in the same way as the left
* expression, but the pointer to these segments would otherwise be
* lost if not stored on the instance. Once the right expression has
* been evaluated, this property is no longer used.
* @type {Array<CodePathSegment>|null}
*/
prevSegments: Array<CodePathSegment> | null;
/**
* Segments representing the start of everything to the left of the
* `in` keyword. This can be used to move forward towards
* `endOfLeftSegments`. `leftSegments` and `endOfLeftSegments` are
* effectively the head and tail of a doubly-linked list.
* @type {Array<CodePathSegment>|null}
*/
leftSegments: Array<CodePathSegment> | null;
/**
* Segments representing the end of everything to the left of the
* `in` keyword. This can be used to move backward towards `leftSegments`.
* `leftSegments` and `endOfLeftSegments` are effectively the head
* and tail of a doubly-linked list.
* @type {Array<CodePathSegment>|null}
*/
endOfLeftSegments: Array<CodePathSegment> | null;
/**
* The segments representing the left expression where `continue` will
* jump to. In `for-in` loops, `continue` must always re-execute the
* left expression each time through the loop. This contains the same
* segments as `leftSegments`, but is duplicated here so each loop
* context has the same property pointing to where `continue` should
* end up.
* @type {Array<CodePathSegment>|null}
*/
continueDestSegments: Array<CodePathSegment> | null;
}
/**
* Represents the context for a `for-of` loop.
*/
declare class ForOfLoopContext extends LoopContextBase {
/**
* Creates a new instance.
* @param {LoopContext|null} upperContext The previous `LoopContext`.
* @param {string|null} label The label for the loop from an enclosing `LabeledStatement`.
* @param {BreakContext} breakContext The context for breaking the loop.
*/
constructor(upperContext: LoopContext | null, label: string | null, breakContext: BreakContext);
/**
* The segments that came immediately before the start of the loop.
* This allows you to traverse backwards out of the loop into the
* surrounding code. This is necessary to evaluate the right expression
* correctly, as it must be evaluated in the same way as the left
* expression, but the pointer to these segments would otherwise be
* lost if not stored on the instance. Once the right expression has
* been evaluated, this property is no longer used.
* @type {Array<CodePathSegment>|null}
*/
prevSegments: Array<CodePathSegment> | null;
/**
* Segments representing the start of everything to the left of the
* `of` keyword. This can be used to move forward towards
* `endOfLeftSegments`. `leftSegments` and `endOfLeftSegments` are
* effectively the head and tail of a doubly-linked list.
* @type {Array<CodePathSegment>|null}
*/
leftSegments: Array<CodePathSegment> | null;
/**
* Segments representing the end of everything to the left of the
* `of` keyword. This can be used to move backward towards `leftSegments`.
* `leftSegments` and `endOfLeftSegments` are effectively the head
* and tail of a doubly-linked list.
* @type {Array<CodePathSegment>|null}
*/
endOfLeftSegments: Array<CodePathSegment> | null;
/**
* The segments representing the left expression where `continue` will
* jump to. In `for-in` loops, `continue` must always re-execute the
* left expression each time through the loop. This contains the same
* segments as `leftSegments`, but is duplicated here so each loop
* context has the same property pointing to where `continue` should
* end up.
* @type {Array<CodePathSegment>|null}
*/
continueDestSegments: Array<CodePathSegment> | null;
}
/**
* Base class for all loop contexts.
*/
declare class LoopContextBase {
/**
* Creates a new instance.
* @param {LoopContext|null} upperContext The previous `LoopContext`.
* @param {string} type The AST node's `type` for the loop.
* @param {string|null} label The label for the loop from an enclosing `LabeledStatement`.
* @param {BreakContext} breakContext The context for breaking the loop.
*/
constructor(upperContext: LoopContext | null, type: string, label: string | null, breakContext: BreakContext);
/**
* The previous `LoopContext`.
* @type {LoopContext}
*/
upper: LoopContext;
/**
* The AST node's `type` for the loop.
* @type {string}
*/
type: string;
/**
* The label for the loop from an enclosing `LabeledStatement`.
* @type {string|null}
*/
label: string | null;
/**
* The fork context for when `break` is encountered.
* @type {ForkContext}
*/
brokenForkContext: ForkContext;
}
@@ -0,0 +1,33 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EncapsulatedContentInfo = exports.EncapsulatedContent = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
let EncapsulatedContent = class EncapsulatedContent {
constructor(params = {}) {
Object.assign(this, params);
}
};
exports.EncapsulatedContent = EncapsulatedContent;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.OctetString })
], EncapsulatedContent.prototype, "single", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Any })
], EncapsulatedContent.prototype, "any", void 0);
exports.EncapsulatedContent = EncapsulatedContent = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Choice })
], EncapsulatedContent);
class EncapsulatedContentInfo {
constructor(params = {}) {
this.eContentType = "";
Object.assign(this, params);
}
}
exports.EncapsulatedContentInfo = EncapsulatedContentInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], EncapsulatedContentInfo.prototype, "eContentType", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: EncapsulatedContent, context: 0, optional: true })
], EncapsulatedContentInfo.prototype, "eContent", void 0);
@@ -0,0 +1 @@
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAmCM,MAAM,0DACX,CAAA,GAAA,YAAI,EAAE,aAAa,CAAuF;AAMrG,SAAS,0CAAQ,KAAmB;IACzC,IAAI,QAAQ,CAAA,GAAA,eAAO;IACnB,IAAI,mBAAC,kBAAkB,QAAQ,OAAO,SAAS,IAAI,aAAE,SAAS,EAAC,GAAG;IAClE,IAAI,CAAC,SAAS,WAAW,GAAG,CAAA,GAAA,eAAO,EAAE;IACrC,IAAI,eAAe,CAAA,GAAA,cAAM,EAAE,IAAO,CAAA;qBAAC;wBAAS;QAAU,CAAA,GAAI;QAAC;QAAS;KAAW;IAE/E,IAAI,gBAAC,YAAY,EAAC,GAAG,CAAA,GAAA,yCAAsB;IAC3C,IAAI,CAAC,MAAM,eAAe,IAAI,cAC5B,kBAAkB;IAGpB,IAAI,CAAC,iBACH,OAAO;IAGT,IAAI,WAAW,MAAM,QAAQ;IAC7B,IAAI,CAAC,MAAM,sBAAsB,EAC/B,yBACE,gCAAC,CAAA,GAAA,iBAAS;QAAE,cAAA;QAAa,SAAS,AAAC,CAAA,MAAM,kBAAkB,IAAI,OAAM,KAAM,CAAC;OACzE;IAKP,yBACE,gCAAC,0CAAe,QAAQ;QAAC,OAAO;qBAC9B,gCAAC,CAAA,GAAA,0BAAkB,SAChB;IAKP,qBAAO,CAAA,GAAA,eAAO,EAAE,YAAY,CAAC,UAAU;AACzC;AAGO,SAAS;IACd,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,aAAa,gBAAA,0BAAA,IAAK,UAAU;IAChC,CAAA,GAAA,sBAAc,EAAE;QACd,uBAAA,iCAAA,WAAa;IACf,GAAG;QAAC;KAAW;AACjB","sources":["packages/@react-aria/overlays/src/Overlay.tsx"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ClearPressResponder} from '@react-aria/interactions';\nimport {FocusScope} from '@react-aria/focus';\nimport React, {ReactNode, useContext, useMemo, useState} from 'react';\nimport ReactDOM from 'react-dom';\nimport {useIsSSR} from '@react-aria/ssr';\nimport {useLayoutEffect} from '@react-aria/utils';\nimport {useUNSAFE_PortalContext} from './PortalProvider';\n\nexport interface OverlayProps {\n /**\n * The container element in which the overlay portal will be placed.\n * @default document.body\n */\n portalContainer?: Element,\n /** The overlay to render in the portal. */\n children: ReactNode,\n /**\n * Disables default focus management for the overlay, including containment and restoration.\n * This option should be used very carefully. When focus management is disabled, you must\n * implement focus containment and restoration to ensure the overlay is keyboard accessible.\n */\n disableFocusManagement?: boolean,\n /**\n * Whether to contain focus within the overlay.\n */\n shouldContainFocus?: boolean,\n /**\n * Whether the overlay is currently performing an exit animation. When true,\n * focus is allowed to move outside.\n */\n isExiting?: boolean\n}\n\nexport const OverlayContext: React.Context<{contain: boolean, setContain: React.Dispatch<React.SetStateAction<boolean>>} | null> =\n React.createContext<{contain: boolean, setContain: React.Dispatch<React.SetStateAction<boolean>>} | null>(null);\n\n/**\n * A container which renders an overlay such as a popover or modal in a portal,\n * and provides a focus scope for the child elements.\n */\nexport function Overlay(props: OverlayProps): React.ReactPortal | null {\n let isSSR = useIsSSR();\n let {portalContainer = isSSR ? null : document.body, isExiting} = props;\n let [contain, setContain] = useState(false);\n let contextValue = useMemo(() => ({contain, setContain}), [contain, setContain]);\n\n let {getContainer} = useUNSAFE_PortalContext();\n if (!props.portalContainer && getContainer) {\n portalContainer = getContainer();\n }\n\n if (!portalContainer) {\n return null;\n }\n\n let contents = props.children;\n if (!props.disableFocusManagement) {\n contents = (\n <FocusScope restoreFocus contain={(props.shouldContainFocus || contain) && !isExiting}>\n {contents}\n </FocusScope>\n );\n }\n\n contents = (\n <OverlayContext.Provider value={contextValue}>\n <ClearPressResponder>\n {contents}\n </ClearPressResponder>\n </OverlayContext.Provider>\n );\n\n return ReactDOM.createPortal(contents, portalContainer);\n}\n\n/** @private */\nexport function useOverlayFocusContain(): void {\n let ctx = useContext(OverlayContext);\n let setContain = ctx?.setContain;\n useLayoutEffect(() => {\n setContain?.(true);\n }, [setContain]);\n}\n"],"names":[],"version":3,"file":"Overlay.module.js.map"}
@@ -0,0 +1,43 @@
{
"name": "json-schema-traverse",
"version": "0.4.1",
"description": "Traverse JSON Schema passing each schema object to callback",
"main": "index.js",
"scripts": {
"eslint": "eslint index.js spec",
"test-spec": "mocha spec -R spec",
"test": "npm run eslint && nyc npm run test-spec"
},
"repository": {
"type": "git",
"url": "git+https://github.com/epoberezkin/json-schema-traverse.git"
},
"keywords": [
"JSON-Schema",
"traverse",
"iterate"
],
"author": "Evgeny Poberezkin",
"license": "MIT",
"bugs": {
"url": "https://github.com/epoberezkin/json-schema-traverse/issues"
},
"homepage": "https://github.com/epoberezkin/json-schema-traverse#readme",
"devDependencies": {
"coveralls": "^2.13.1",
"eslint": "^3.19.0",
"mocha": "^3.4.2",
"nyc": "^11.0.2",
"pre-commit": "^1.2.2"
},
"nyc": {
"exclude": [
"**/spec/**",
"node_modules"
],
"reporter": [
"lcov",
"text-summary"
]
}
}
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":"oBACa,OAAO,gBAAgB,EAAE,KAAK;mBAC9B,OAAO,gBAAgB,EAAE,IAAI;2BAC7B,OAAO,gBAAgB,EAAE,YAAY"}
@@ -0,0 +1,239 @@
# import/extensions
<!-- end auto-generated rule header -->
Some file resolve algorithms allow you to omit the file extension within the import source path. For example the `node` resolver (which does not yet support ESM/`import`) can resolve `./foo/bar` to the absolute path `/User/someone/foo/bar.js` because the `.js` extension is resolved automatically by default in CJS. Depending on the resolver you can configure more extensions to get resolved automatically.
In order to provide a consistent use of file extensions across your code base, this rule can enforce or disallow the use of certain file extensions.
## Rule Details
This rule either takes one string option, one object option, or a string and an object option. If it is the string `"never"` (the default value), then the rule forbids the use for any extension. If it is the string `"always"`, then the rule enforces the use of extensions for all import statements. If it is the string `"ignorePackages"`, then the rule enforces the use of extensions for all import statements except package imports.
```jsonc
"import/extensions": [<severity>, "never" | "always" | "ignorePackages"]
```
By providing an object you can configure each extension separately.
```jsonc
"import/extensions": [<severity>, {
<extension>: "never" | "always" | "ignorePackages"
}]
```
For example `{ "js": "always", "json": "never" }` would always enforce the use of the `.js` extension but never allow the use of the `.json` extension.
By providing both a string and an object, the string will set the default setting for all extensions, and the object can be used to set granular overrides for specific extensions.
```jsonc
"import/extensions": [
<severity>,
"never" | "always" | "ignorePackages",
{
<extension>: "never" | "always" | "ignorePackages"
}
]
```
For example, `["error", "never", { "svg": "always" }]` would require that all extensions are omitted, except for "svg".
`ignorePackages` can be set as a separate boolean option like this:
```jsonc
"import/extensions": [
<severity>,
"never" | "always" | "ignorePackages",
{
ignorePackages: true | false,
pattern: {
<extension>: "never" | "always" | "ignorePackages"
}
}
]
```
In that case, if you still want to specify extensions, you can do so inside the **pattern** property.
Default value of `ignorePackages` is `false`.
By default, `import type` and `export type` style imports/exports are ignored. If you want to check them as well, you can set the `checkTypeImports` option to `true`.
Unfortunately, in more advanced linting setups, such as when employing custom specifier aliases (e.g. you're using `eslint-import-resolver-alias`, `paths` in `tsconfig.json`, etc), this rule can be too coarse-grained when determining which imports to ignore and on which to enforce the config.
This is especially troublesome if you have import specifiers that [look like externals or builtins](./order.md#how-imports-are-grouped).
Set `pathGroupOverrides` to force this rule to always ignore certain imports and never ignore others.
`pathGroupOverrides` accepts an array of one or more [`PathGroupOverride`](#pathgroupoverride) objects.
For example:
```jsonc
"import/extensions": [
<severity>,
"never" | "always" | "ignorePackages",
{
ignorePackages: true | false,
pattern: {
<extension>: "never" | "always" | "ignorePackages"
},
pathGroupOverrides: [
{
pattern: "package-name-to-ignore",
action: "ignore",
},
{
pattern: "bespoke+alias:{*,*/**}",
action: "enforce",
}
]
}
]
```
> \[!NOTE]
>
> `pathGroupOverrides` is inspired by [`pathGroups` in `'import/order'`](./order.md#pathgroups) and shares a similar interface.
> If you're using `pathGroups` already, you may find `pathGroupOverrides` very useful.
### `PathGroupOverride`
| property | required | type | description |
| :--------------: | :------: | :---------------------: | --------------------------------------------------------------- |
| `pattern` | ☑️ | `string` | [Minimatch pattern][16] for specifier matching |
| `patternOptions` | | `object` | [Minimatch options][17]; default: `{nocomment: true}` |
| `action` | ☑️ | `"enforce" \| "ignore"` | What action to take on imports whose specifiers match `pattern` |
### Exception
When disallowing the use of certain extensions this rule makes an exception and allows the use of extension when the file would not be resolvable without extension.
For example, given the following folder structure:
```pt
├── foo
│   ├── bar.js
│   ├── bar.json
```
and this import statement:
```js
import bar from './foo/bar.json';
```
then the extension can’t be omitted because it would then resolve to `./foo/bar.js`.
### Examples
The following patterns are considered problems when configuration set to "never":
```js
import foo from './foo.js';
import bar from './bar.json';
import Component from './Component.jsx';
import express from 'express/index.js';
```
The following patterns are not considered problems when configuration set to "never":
```js
import foo from './foo';
import bar from './bar';
import Component from './Component';
import express from 'express/index';
import * as path from 'path';
```
The following patterns are considered problems when the configuration is set to "never" and the option "checkTypeImports" is set to `true`:
```js
import type { Foo } from './foo.ts';
export type { Foo } from './foo.ts';
```
The following patterns are considered problems when configuration set to "always":
```js
import foo from './foo';
import bar from './bar';
import Component from './Component';
import foo from '@/foo';
```
The following patterns are not considered problems when configuration set to "always":
```js
import foo from './foo.js';
import bar from './bar.json';
import Component from './Component.jsx';
import * as path from 'path';
import foo from '@/foo.js';
```
The following patterns are considered problems when configuration set to "ignorePackages":
```js
import foo from './foo';
import bar from './bar';
import Component from './Component';
```
The following patterns are not considered problems when configuration set to "ignorePackages":
```js
import foo from './foo.js';
import bar from './bar.json';
import Component from './Component.jsx';
import express from 'express';
import foo from '@/foo'
```
The following patterns are not considered problems when configuration set to `['error', 'always', {ignorePackages: true} ]`:
```js
import Component from './Component.jsx';
import baz from 'foo/baz.js';
import express from 'express';
import foo from '@/foo';
```
The following patterns are considered problems when the configuration is set to "always" and the option "checkTypeImports" is set to `true`:
```js
import type { Foo } from './foo';
export type { Foo } from './foo';
```
## When Not To Use It
If you are not concerned about a consistent usage of file extension.
In the future, when this rule supports native node ESM resolution, and the plugin is configured to use native rather than transpiled ESM (a config option that is not yet available) - setting this to `always` will have no effect.
[16]: https://www.npmjs.com/package/minimatch#features
[17]: https://www.npmjs.com/package/minimatch#options
@@ -0,0 +1,34 @@
/**
* @param baseConfig Config where other config will be merged into. This object will be mutated.
* @param configExtension Partial config to merge into the `baseConfig`.
*/
function mergeConfigs(baseConfig, configExtension) {
for (var key in configExtension) {
mergePropertyRecursively(baseConfig, key, configExtension[key]);
}
return baseConfig;
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
var overrideTypes = /*#__PURE__*/new Set(['string', 'number', 'boolean']);
function mergePropertyRecursively(baseObject, mergeKey, mergeValue) {
if (!hasOwnProperty.call(baseObject, mergeKey) || overrideTypes.has(typeof mergeValue) || mergeValue === null) {
baseObject[mergeKey] = mergeValue;
return;
}
if (Array.isArray(mergeValue) && Array.isArray(baseObject[mergeKey])) {
baseObject[mergeKey] = baseObject[mergeKey].concat(mergeValue);
return;
}
if (typeof mergeValue === 'object' && typeof baseObject[mergeKey] === 'object') {
if (baseObject[mergeKey] === null) {
baseObject[mergeKey] = mergeValue;
return;
}
for (var nextKey in mergeValue) {
mergePropertyRecursively(baseObject[mergeKey], nextKey, mergeValue[nextKey]);
}
}
}
export { mergeConfigs };
//# sourceMappingURL=merge-configs.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"addRootServiceNodeBindingIfContextFree.d.ts","sourceRoot":"","sources":["../../../../src/planning/actions/addRootServiceNodeBindingIfContextFree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAGvD,OAAO,EAAE,iCAAiC,EAAE,MAAM,yDAAyD,CAAC;AAG5G,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D;;;;;;GAMG;AACH,wBAAgB,sCAAsC,CACpD,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,eAAe,EAC5B,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GACxB,iCAAiC,CAqBnC"}
@@ -0,0 +1 @@
{"name":"@types/mime","version":"1.3.5","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532089978,"integrity":"sha512-HQaIQk9pwOcyKutyDk4o2a87WnotwYuLGYFW43emGm4FvIJFKPyg+OYaw5sTegKAKf+C5SKa1ACjzCLivbaHrQ==","mode":420,"size":1141},"Mime.d.ts":{"checkedAt":1794532101985,"integrity":"sha512-h76gsGWU4fuRy1Q5fndauibJ3GqvceHmy+bTvaADtTgOAgzDAjiRkFj11lsp+AbaH1/dXwTliboqRYND8JtqNA==","mode":420,"size":270},"README.md":{"checkedAt":1794532101985,"integrity":"sha512-9yVl/zuhygLDUzwaCl6J/bdrJROhIt742avWaYoiy+OPbllgPcWi+//YiuifWw5T7gmbVbiamBtY+lVtrir7AQ==","mode":420,"size":511},"index.d.ts":{"checkedAt":1794532101985,"integrity":"sha512-z8cEIxMK4I06bVgLFvKPe6lDElHCiUKcYvrj+C4z3K8/TDa9DruLk0ngzJiCwhCQrOs9BKe/WxsszYy1Mj9yXg==","mode":420,"size":812},"lite.d.ts":{"checkedAt":1794532101985,"integrity":"sha512-rQrhw2r1WTewqvvaGFnR65Wkn7GVLcmUku9AcPiihvuggTIC6YHeNhdSSucPHhGLz48824R5v9jPGMWI1uhU/g==","mode":420,"size":124},"package.json":{"checkedAt":1794532101985,"integrity":"sha512-TtR5o6dV6qEn6ZqcyLOvlxMY87AvJ5xwjyNHXhruYVx5+ZI/1yjFl3JGgd36J44l7di3kLQhm8UTswT2mvsxiA==","mode":420,"size":923}}}
@@ -0,0 +1,69 @@
var OverloadYield = require("./OverloadYield.js");
function _wrapAsyncGenerator(e) {
return function () {
return new AsyncGenerator(e.apply(this, arguments));
};
}
function AsyncGenerator(e) {
var r, t;
function resume(r, t) {
try {
var n = e[r](t),
o = n.value,
u = o instanceof OverloadYield;
Promise.resolve(u ? o.v : o).then(function (t) {
if (u) {
var i = "return" === r ? "return" : "next";
if (!o.k || t.done) return resume(i, t);
t = e[i](t).value;
}
settle(n.done ? "return" : "normal", t);
}, function (e) {
resume("throw", e);
});
} catch (e) {
settle("throw", e);
}
}
function settle(e, n) {
switch (e) {
case "return":
r.resolve({
value: n,
done: !0
});
break;
case "throw":
r.reject(n);
break;
default:
r.resolve({
value: n,
done: !1
});
}
(r = r.next) ? resume(r.key, r.arg) : t = null;
}
this._invoke = function (e, n) {
return new Promise(function (o, u) {
var i = {
key: e,
arg: n,
resolve: o,
reject: u,
next: null
};
t ? t = t.next = i : (r = t = i, resume(e, n));
});
}, "function" != typeof e["return"] && (this["return"] = void 0);
}
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
return this;
}, AsyncGenerator.prototype.next = function (e) {
return this._invoke("next", e);
}, AsyncGenerator.prototype["throw"] = function (e) {
return this._invoke("throw", e);
}, AsyncGenerator.prototype["return"] = function (e) {
return this._invoke("return", e);
};
module.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
@@ -0,0 +1,32 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = timesSeries;
var _timesLimit = require('./timesLimit.js');
var _timesLimit2 = _interopRequireDefault(_timesLimit);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* The same as [times]{@link module:ControlFlow.times} but runs only a single async operation at a time.
*
* @name timesSeries
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.times]{@link module:ControlFlow.times}
* @category Control Flow
* @param {number} n - The number of times to run the function.
* @param {AsyncFunction} iteratee - The async function to call `n` times.
* Invoked with the iteration index and a callback: (n, next).
* @param {Function} callback - see {@link module:Collections.map}.
* @returns {Promise} a promise, if no callback is provided
*/
function timesSeries(n, iteratee, callback) {
return (0, _timesLimit2.default)(n, 1, iteratee, callback);
}
module.exports = exports.default;
@@ -0,0 +1,46 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ } = require("@eslint-community/eslint-utils")
const checkForPreferGlobal = require("../../util/check-prefer-global")
const traceMap = {
globals: {
process: { [READ]: true },
},
modules: {
process: { [READ]: true },
"node:process": { [READ]: true },
},
}
/** @type {import('../rule-module').RuleModule} */
module.exports = {
meta: {
docs: {
description: 'enforce either `process` or `require("process")`',
recommended: false,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/prefer-global/process.md",
},
type: "suggestion",
fixable: null,
schema: [{ enum: ["always", "never"] }],
messages: {
preferGlobal:
"Unexpected use of 'require(\"process\")'. Use the global variable 'process' instead.",
preferModule:
"Unexpected use of the global variable 'process'. Use 'require(\"process\")' instead.",
},
},
create(context) {
return {
"Program:exit"() {
checkForPreferGlobal(context, traceMap)
},
}
},
}
@@ -0,0 +1,11 @@
import { InjectionToken } from "../providers";
import Transform from "../types/transform";
/**
* Parameter decorator factory that allows for interface information to be stored in the constructor's metadata with a transform token
* @param token The token of the object to be resolved
* @param transformer The token of the transform object
* @param args Arguments to be passed to the transform method on the transformer
* @returns The parameter decorator
*/
declare function injectWithTransform(token: InjectionToken<any>, transformer: InjectionToken<Transform<any, any>>, ...args: any[]): (target: any, propertyKey: string | symbol | undefined, parameterIndex: number) => any;
export default injectWithTransform;
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_define_property.cjs",
"module": "../../esm/_define_property.js"
}
@@ -0,0 +1,99 @@
// Type definitions for winston 3.0
// Project: https://github.com/winstonjs/winston
/// <reference types="node" />
declare namespace winston {
interface AbstractConfigSetLevels {
[key: string]: number;
}
interface AbstractConfigSetColors {
[key: string]: string | string[];
}
interface AbstractConfigSet {
levels: AbstractConfigSetLevels;
colors: AbstractConfigSetColors;
}
interface CliConfigSetLevels extends AbstractConfigSetLevels {
error: number;
warn: number;
help: number;
data: number;
info: number;
debug: number;
prompt: number;
verbose: number;
input: number;
silly: number;
}
interface CliConfigSetColors extends AbstractConfigSetColors {
error: string | string[];
warn: string | string[];
help: string | string[];
data: string | string[];
info: string | string[];
debug: string | string[];
prompt: string | string[];
verbose: string | string[];
input: string | string[];
silly: string | string[];
}
interface NpmConfigSetLevels extends AbstractConfigSetLevels {
error: number;
warn: number;
info: number;
http: number;
verbose: number;
debug: number;
silly: number;
}
interface NpmConfigSetColors extends AbstractConfigSetColors {
error: string | string[];
warn: string | string[];
info: string | string[];
http: string | string[];
verbose: string | string[];
debug: string | string[];
silly: string | string[];
}
interface SyslogConfigSetLevels extends AbstractConfigSetLevels {
emerg: number;
alert: number;
crit: number;
error: number;
warning: number;
notice: number;
info: number;
debug: number;
}
interface SyslogConfigSetColors extends AbstractConfigSetColors {
emerg: string | string[];
alert: string | string[];
crit: string | string[];
error: string | string[];
warning: string | string[];
notice: string | string[];
info: string | string[];
debug: string | string[];
}
interface Config {
allColors: AbstractConfigSetColors;
cli: { levels: CliConfigSetLevels, colors: CliConfigSetColors };
npm: { levels: NpmConfigSetLevels, colors: NpmConfigSetColors };
syslog: { levels: SyslogConfigSetLevels, colors: SyslogConfigSetColors };
addColors(colors: AbstractConfigSetColors): void;
}
}
declare const winston: winston.Config;
export = winston;
@@ -0,0 +1,213 @@
import { Direction, DisabledBehavior, Key, KeyboardDelegate, LayoutDelegate, Node, Rect, RefObject, Size, Collection, AriaLabelingProps, DOMAttributes, DOMProps, FocusableElement } from "@react-types/shared";
import { GridCollection, GridNode } from "@react-types/grid";
import { SelectionManager, MultipleSelectionManager } from "@react-stately/selection";
import { GridState } from "@react-stately/grid";
import { SelectableItemStates } from "@react-aria/selection";
import { AriaCheckboxProps } from "@react-types/checkbox";
export interface GridKeyboardDelegateOptions<C> {
collection: C;
disabledKeys: Set<Key>;
disabledBehavior?: DisabledBehavior;
ref?: RefObject<HTMLElement | null>;
direction: Direction;
collator?: Intl.Collator;
layoutDelegate?: LayoutDelegate;
/** @deprecated - Use layoutDelegate instead. */
layout?: DeprecatedLayout;
focusMode?: 'row' | 'cell';
}
export class GridKeyboardDelegate<T, C extends GridCollection<T>> implements KeyboardDelegate {
collection: C;
protected disabledKeys: Set<Key>;
protected disabledBehavior: DisabledBehavior;
protected direction: Direction;
protected collator: Intl.Collator | undefined;
protected layoutDelegate: LayoutDelegate;
protected focusMode: 'row' | 'cell';
constructor(options: GridKeyboardDelegateOptions<C>);
protected isCell(node: Node<T>): boolean;
protected isRow(node: Node<T>): boolean;
protected findPreviousKey(fromKey?: Key, pred?: (item: Node<T>) => boolean): Key | null;
protected findNextKey(fromKey?: Key, pred?: (item: Node<T>) => boolean): Key | null;
protected getKeyForItemInRowByIndex(key: Key, index?: number): Key | null;
getKeyBelow(fromKey: Key): Key | null;
getKeyAbove(fromKey: Key): Key | null;
getKeyRightOf(key: Key): Key | null;
getKeyLeftOf(key: Key): Key | null;
getFirstKey(fromKey?: Key, global?: boolean): Key | null;
getLastKey(fromKey?: Key, global?: boolean): Key | null;
getKeyPageAbove(fromKey: Key): Key | null;
getKeyPageBelow(fromKey: Key): Key | null;
getKeyForSearch(search: string, fromKey?: Key): Key | null;
}
interface DeprecatedLayout {
getLayoutInfo(key: Key): DeprecatedLayoutInfo;
getContentSize(): Size;
virtualizer: DeprecatedVirtualizer;
}
interface DeprecatedLayoutInfo {
rect: Rect;
}
interface DeprecatedVirtualizer {
visibleRect: Rect;
}
export interface GridSelectionAnnouncementProps {
/**
* A function that returns the text that should be announced by assistive technology when a row is added or removed from selection.
* @default (key) => state.collection.getItem(key)?.textValue
*/
getRowText?: (key: Key) => string;
}
interface GridSelectionState<T> {
/** A collection of items in the grid. */
collection: Collection<Node<T>>;
/** A set of items that are disabled. */
disabledKeys: Set<Key>;
/** A selection manager to read and update multiple selection state. */
selectionManager: SelectionManager;
}
export function useGridSelectionAnnouncement<T>(props: GridSelectionAnnouncementProps, state: GridSelectionState<T>): void;
export interface HighlightSelectionDescriptionProps {
selectionManager: MultipleSelectionManager;
hasItemActions?: boolean;
}
/**
* Computes the description for a grid selectable collection.
* @param props
*/
export function useHighlightSelectionDescription(props: HighlightSelectionDescriptionProps): AriaLabelingProps;
export interface GridProps extends DOMProps, AriaLabelingProps {
/** Whether the grid uses virtual scrolling. */
isVirtualized?: boolean;
/**
* Whether typeahead navigation is disabled.
* @default false
*/
disallowTypeAhead?: boolean;
/**
* An optional keyboard delegate implementation for type to select,
* to override the default.
*/
keyboardDelegate?: KeyboardDelegate;
/**
* Whether initial grid focus should be placed on the grid row or grid cell.
* @default 'row'
*/
focusMode?: 'row' | 'cell';
/**
* A function that returns the text that should be announced by assistive technology when a row is added or removed from selection.
* @default (key) => state.collection.getItem(key)?.textValue
*/
getRowText?: (key: Key) => string;
/**
* The ref attached to the scrollable body. Used to provided automatic scrolling on item focus for non-virtualized grids.
*/
scrollRef?: RefObject<HTMLElement | null>;
/** Handler that is called when a user performs an action on the row. */
onRowAction?: (key: Key) => void;
/** Handler that is called when a user performs an action on the cell. */
onCellAction?: (key: Key) => void;
/**
* Whether pressing the escape key should clear selection in the grid or not.
*
* Most experiences should not modify this option as it eliminates a keyboard user's ability to
* easily clear selection. Only use if the escape key is being handled externally or should not
* trigger selection clearing contextually.
* @default 'clearSelection'
*/
escapeKeyBehavior?: 'clearSelection' | 'none';
/** Whether selection should occur on press up instead of press down. */
shouldSelectOnPressUp?: boolean;
}
export interface GridAria {
/** Props for the grid element. */
gridProps: DOMAttributes;
}
/**
* Provides the behavior and accessibility implementation for a grid component.
* A grid displays data in one or more rows and columns and enables a user to navigate its contents via directional navigation keys.
* @param props - Props for the grid.
* @param state - State for the grid, as returned by `useGridState`.
* @param ref - The ref attached to the grid element.
*/
export function useGrid<T>(props: GridProps, state: GridState<T, GridCollection<T>>, ref: RefObject<HTMLElement | null>): GridAria;
export interface GridRowGroupAria {
/** Props for the row group element. */
rowGroupProps: DOMAttributes;
}
/**
* Provides the accessibility implementation for a row group in a grid.
*/
export function useGridRowGroup(): GridRowGroupAria;
export interface GridRowProps<T> {
/** An object representing the grid row. Contains all the relevant information that makes up the grid row. */
node: GridNode<T>;
/** Whether the grid row is contained in a virtual scroller. */
isVirtualized?: boolean;
/** Whether selection should occur on press up instead of press down. */
shouldSelectOnPressUp?: boolean;
/**
* Handler that is called when a user performs an action on the row.
* Please use onCellAction at the collection level instead.
* @deprecated
**/
onAction?: () => void;
}
export interface GridRowAria extends SelectableItemStates {
/** Props for the grid row element. */
rowProps: DOMAttributes;
/** Whether the row is currently in a pressed state. */
isPressed: boolean;
}
/**
* Provides the behavior and accessibility implementation for a row in a grid.
* @param props - Props for the row.
* @param state - State of the parent grid, as returned by `useGridState`.
*/
export function useGridRow<T, C extends GridCollection<T>, S extends GridState<T, C>>(props: GridRowProps<T>, state: S, ref: RefObject<FocusableElement | null>): GridRowAria;
export interface GridCellProps {
/** An object representing the grid cell. Contains all the relevant information that makes up the grid cell. */
node: GridNode<unknown>;
/** Whether the grid cell is contained in a virtual scroller. */
isVirtualized?: boolean;
/** Whether the cell or its first focusable child element should be focused when the grid cell is focused. */
focusMode?: 'child' | 'cell';
/** Whether selection should occur on press up instead of press down. */
shouldSelectOnPressUp?: boolean;
/** Indicates how many columns the data cell spans. */
colSpan?: number;
/**
* Handler that is called when a user performs an action on the cell.
* Please use onCellAction at the collection level instead.
* @deprecated
**/
onAction?: () => void;
}
export interface GridCellAria {
/** Props for the grid cell element. */
gridCellProps: DOMAttributes;
/** Whether the cell is currently in a pressed state. */
isPressed: boolean;
}
/**
* Provides the behavior and accessibility implementation for a cell in a grid.
* @param props - Props for the cell.
* @param state - State of the parent grid, as returned by `useGridState`.
*/
export function useGridCell<T, C extends GridCollection<T>>(props: GridCellProps, state: GridState<T, C>, ref: RefObject<FocusableElement | null>): GridCellAria;
export interface AriaGridSelectionCheckboxProps {
/** A unique key for the checkbox. */
key: Key;
}
export interface GridSelectionCheckboxAria {
/** Props for the row selection checkbox element. */
checkboxProps: AriaCheckboxProps;
}
/**
* Provides the behavior and accessibility implementation for a selection checkbox in a grid.
* @param props - Props for the selection checkbox.
* @param state - State of the grid, as returned by `useGridState`.
*/
export function useGridSelectionCheckbox<T, C extends GridCollection<T>>(props: AriaGridSelectionCheckboxProps, state: GridState<T, C>): GridSelectionCheckboxAria;
//# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,8 @@
/**
* Returns the best matching date time pattern if a date time skeleton
* pattern is provided with a locale. Follows the Unicode specification:
* https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns
* @param skeleton date time skeleton pattern that possibly includes j, J or C
* @param locale
*/
export declare function getBestPattern(skeleton: string, locale: Intl.Locale): string;
@@ -0,0 +1,26 @@
class WithPromise {
constructor() {
this.updateFinished();
}
get finished() {
return this._finished;
}
updateFinished() {
this._finished = new Promise((resolve) => {
this.resolve = resolve;
});
}
notifyFinished() {
this.resolve();
}
/**
* Allows the animation to be awaited.
*
* @deprecated Use `finished` instead.
*/
then(onResolve, onReject) {
return this.finished.then(onResolve, onReject);
}
}
export { WithPromise };
@@ -0,0 +1 @@
{"version":3,"file":"resolveScoped.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveScoped.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEb,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAI9C,wBAAgB,aAAa,CAC3B,UAAU,EACV,IAAI,EACJ,KAAK,SAAS,WAAW,EAEzB,QAAQ,SAAS,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,EAE/D,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,KAAK,QAAQ,EACnC,OAAO,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,IAAI,KAAK,QAAQ,CAAC,UAAU,CAAC,GACrE,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,EAAE,IAAI,KAAK,QAAQ,CAAC,UAAU,CAAC,CA6C/D"}
@@ -0,0 +1,29 @@
# ESLint Core
## Overview
This package is the future home of the rewritten, runtime-agnostic ESLint core.
Right now, it exports the core types necessary to implement language plugins.
## License
Apache 2.0
<!-- NOTE: This section is autogenerated. Do not manually edit.-->
<!--sponsorsstart-->
## Sponsors
The following companies, organizations, and individuals support ESLint's ongoing maintenance and development. [Become a Sponsor](https://eslint.org/donate)
to get your logo on our READMEs and [website](https://eslint.org/sponsors).
<h3>Platinum Sponsors</h3>
<p><a href="https://automattic.com"><img src="https://images.opencollective.com/automattic/d0ef3e1/logo.png" alt="Automattic" height="128"></a> <a href="https://www.airbnb.com/"><img src="https://images.opencollective.com/airbnb/d327d66/logo.png" alt="Airbnb" height="128"></a></p><h3>Gold Sponsors</h3>
<p><a href="https://qlty.sh/"><img src="https://images.opencollective.com/qltysh/33d157d/logo.png" alt="Qlty Software" height="96"></a> <a href="https://trunk.io/"><img src="https://images.opencollective.com/trunkio/fb92d60/avatar.png" alt="trunk.io" height="96"></a> <a href="https://shopify.engineering/"><img src="https://avatars.githubusercontent.com/u/8085" alt="Shopify" height="96"></a></p><h3>Silver Sponsors</h3>
<p><a href="https://vite.dev/"><img src="https://images.opencollective.com/vite/e6d15e1/logo.png" alt="Vite" height="64"></a> <a href="https://liftoff.io/"><img src="https://images.opencollective.com/liftoff/5c4fa84/logo.png" alt="Liftoff" height="64"></a> <a href="https://americanexpress.io"><img src="https://avatars.githubusercontent.com/u/3853301" alt="American Express" height="64"></a> <a href="https://stackblitz.com"><img src="https://avatars.githubusercontent.com/u/28635252" alt="StackBlitz" height="64"></a></p><h3>Bronze Sponsors</h3>
<p><a href="https://syntax.fm"><img src="https://github.com/syntaxfm.png" alt="Syntax" height="32"></a> <a href="https://cybozu.co.jp/"><img src="https://images.opencollective.com/cybozu/933e46d/logo.png" alt="Cybozu" height="32"></a> <a href="https://sentry.io"><img src="https://github.com/getsentry.png" alt="Sentry" height="32"></a> <a href="https://icons8.com/"><img src="https://images.opencollective.com/icons8/7fa1641/logo.png" alt="Icons8" height="32"></a> <a href="https://discord.com"><img src="https://images.opencollective.com/discordapp/f9645d9/logo.png" alt="Discord" height="32"></a> <a href="https://www.gitbook.com"><img src="https://avatars.githubusercontent.com/u/7111340" alt="GitBook" height="32"></a> <a href="https://nx.dev"><img src="https://avatars.githubusercontent.com/u/23692104" alt="Nx" height="32"></a> <a href="https://opensource.mercedes-benz.com/"><img src="https://avatars.githubusercontent.com/u/34240465" alt="Mercedes-Benz Group" height="32"></a> <a href="https://herocoders.com"><img src="https://avatars.githubusercontent.com/u/37549774" alt="HeroCoders" height="32"></a> <a href="https://www.lambdatest.com"><img src="https://avatars.githubusercontent.com/u/171592363" alt="LambdaTest" height="32"></a></p>
<h3>Technology Sponsors</h3>
Technology sponsors allow us to use their products and services for free as part of a contribution to the open source ecosystem and our work.
<p><a href="https://netlify.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/netlify-icon.svg" alt="Netlify" height="32"></a> <a href="https://algolia.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/algolia-icon.svg" alt="Algolia" height="32"></a> <a href="https://1password.com"><img src="https://raw.githubusercontent.com/eslint/eslint.org/main/src/assets/images/techsponsors/1password-icon.svg" alt="1Password" height="32"></a></p>
<!--sponsorsend-->
@@ -0,0 +1,10 @@
import type { TSESLint } from '@typescript-eslint/utils';
type AllowedSingleElementEquality = 'always' | 'never';
export type Options = [
{
allowSingleElementEquality?: AllowedSingleElementEquality;
}
];
export type MessageIds = 'preferEndsWith' | 'preferStartsWith';
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener>;
export default _default;
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more