docs: 仓库链接指向本镜像仓库
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s

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,9 @@
import { V as Vitest, T as TestProject, a as TestProjectConfiguration } from './reporters.d.BQ0wpUaj.js';
interface VitestPluginContext {
vitest: Vitest;
project: TestProject;
injectTestProjects: (config: TestProjectConfiguration | TestProjectConfiguration[]) => Promise<TestProject[]>;
}
export type { VitestPluginContext as V };
@@ -0,0 +1,174 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=no-access-state-in-setstate.d.ts.map
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2022 Andrey Sitnik <andrey@sitnik.ru> and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.String = String;
const type_1 = require("../create/type");
const index_1 = require("../symbols/index");
/** `[Json]` Creates a String type */
function String(options) {
return (0, type_1.CreateType)({ [index_1.Kind]: 'String', type: 'string' }, options);
}
@@ -0,0 +1,217 @@
import { Directives } from '../doc/directives.js';
import { Document } from '../doc/Document.js';
import { YAMLWarning, YAMLParseError } from '../errors.js';
import { isCollection, isPair } from '../nodes/identity.js';
import { composeDoc } from './compose-doc.js';
import { resolveEnd } from './resolve-end.js';
function getErrorPos(src) {
if (typeof src === 'number')
return [src, src + 1];
if (Array.isArray(src))
return src.length === 2 ? src : [src[0], src[1]];
const { offset, source } = src;
return [offset, offset + (typeof source === 'string' ? source.length : 1)];
}
function parsePrelude(prelude) {
let comment = '';
let atComment = false;
let afterEmptyLine = false;
for (let i = 0; i < prelude.length; ++i) {
const source = prelude[i];
switch (source[0]) {
case '#':
comment +=
(comment === '' ? '' : afterEmptyLine ? '\n\n' : '\n') +
(source.substring(1) || ' ');
atComment = true;
afterEmptyLine = false;
break;
case '%':
if (prelude[i + 1]?.[0] !== '#')
i += 1;
atComment = false;
break;
default:
// This may be wrong after doc-end, but in that case it doesn't matter
if (!atComment)
afterEmptyLine = true;
atComment = false;
}
}
return { comment, afterEmptyLine };
}
/**
* Compose a stream of CST nodes into a stream of YAML Documents.
*
* ```ts
* import { Composer, Parser } from 'yaml'
*
* const src: string = ...
* const tokens = new Parser().parse(src)
* const docs = new Composer().compose(tokens)
* ```
*/
class Composer {
constructor(options = {}) {
this.doc = null;
this.atDirectives = false;
this.prelude = [];
this.errors = [];
this.warnings = [];
this.onError = (source, code, message, warning) => {
const pos = getErrorPos(source);
if (warning)
this.warnings.push(new YAMLWarning(pos, code, message));
else
this.errors.push(new YAMLParseError(pos, code, message));
};
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
this.directives = new Directives({ version: options.version || '1.2' });
this.options = options;
}
decorate(doc, afterDoc) {
const { comment, afterEmptyLine } = parsePrelude(this.prelude);
//console.log({ dc: doc.comment, prelude, comment })
if (comment) {
const dc = doc.contents;
if (afterDoc) {
doc.comment = doc.comment ? `${doc.comment}\n${comment}` : comment;
}
else if (afterEmptyLine || doc.directives.docStart || !dc) {
doc.commentBefore = comment;
}
else if (isCollection(dc) && !dc.flow && dc.items.length > 0) {
let it = dc.items[0];
if (isPair(it))
it = it.key;
const cb = it.commentBefore;
it.commentBefore = cb ? `${comment}\n${cb}` : comment;
}
else {
const cb = dc.commentBefore;
dc.commentBefore = cb ? `${comment}\n${cb}` : comment;
}
}
if (afterDoc) {
Array.prototype.push.apply(doc.errors, this.errors);
Array.prototype.push.apply(doc.warnings, this.warnings);
}
else {
doc.errors = this.errors;
doc.warnings = this.warnings;
}
this.prelude = [];
this.errors = [];
this.warnings = [];
}
/**
* Current stream status information.
*
* Mostly useful at the end of input for an empty stream.
*/
streamInfo() {
return {
comment: parsePrelude(this.prelude).comment,
directives: this.directives,
errors: this.errors,
warnings: this.warnings
};
}
/**
* Compose tokens into documents.
*
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
*/
*compose(tokens, forceDoc = false, endOffset = -1) {
for (const token of tokens)
yield* this.next(token);
yield* this.end(forceDoc, endOffset);
}
/** Advance the composer by one CST token. */
*next(token) {
switch (token.type) {
case 'directive':
this.directives.add(token.source, (offset, message, warning) => {
const pos = getErrorPos(token);
pos[0] += offset;
this.onError(pos, 'BAD_DIRECTIVE', message, warning);
});
this.prelude.push(token.source);
this.atDirectives = true;
break;
case 'document': {
const doc = composeDoc(this.options, this.directives, token, this.onError);
if (this.atDirectives && !doc.directives.docStart)
this.onError(token, 'MISSING_CHAR', 'Missing directives-end/doc-start indicator line');
this.decorate(doc, false);
if (this.doc)
yield this.doc;
this.doc = doc;
this.atDirectives = false;
break;
}
case 'byte-order-mark':
case 'space':
break;
case 'comment':
case 'newline':
this.prelude.push(token.source);
break;
case 'error': {
const msg = token.source
? `${token.message}: ${JSON.stringify(token.source)}`
: token.message;
const error = new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg);
if (this.atDirectives || !this.doc)
this.errors.push(error);
else
this.doc.errors.push(error);
break;
}
case 'doc-end': {
if (!this.doc) {
const msg = 'Unexpected doc-end without preceding document';
this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', msg));
break;
}
this.doc.directives.docEnd = true;
const end = resolveEnd(token.end, token.offset + token.source.length, this.doc.options.strict, this.onError);
this.decorate(this.doc, true);
if (end.comment) {
const dc = this.doc.comment;
this.doc.comment = dc ? `${dc}\n${end.comment}` : end.comment;
}
this.doc.range[2] = end.offset;
break;
}
default:
this.errors.push(new YAMLParseError(getErrorPos(token), 'UNEXPECTED_TOKEN', `Unsupported token ${token.type}`));
}
}
/**
* Call at end of input to yield any remaining document.
*
* @param forceDoc - If the stream contains no document, still emit a final document including any comments and directives that would be applied to a subsequent document.
* @param endOffset - Should be set if `forceDoc` is also set, to set the document range end and to indicate errors correctly.
*/
*end(forceDoc = false, endOffset = -1) {
if (this.doc) {
this.decorate(this.doc, true);
yield this.doc;
this.doc = null;
}
else if (forceDoc) {
const opts = Object.assign({ _directives: this.directives }, this.options);
const doc = new Document(undefined, opts);
if (this.atDirectives)
this.onError(endOffset, 'MISSING_CHAR', 'Missing directives-end indicator line');
doc.range = [0, endOffset, endOffset];
this.decorate(doc, false);
yield doc;
}
}
}
export { Composer };
@@ -0,0 +1,21 @@
/**
* https://tc39.es/ecma402/#sec-bestavailablelocale
* @param availableLocales
* @param locale
*/
export function BestAvailableLocale(availableLocales, locale) {
var candidate = locale;
while (true) {
if (availableLocales.indexOf(candidate) > -1) {
return candidate;
}
var pos = candidate.lastIndexOf('-');
if (!~pos) {
return undefined;
}
if (pos >= 2 && candidate[pos - 2] === '-') {
pos -= 2;
}
candidate = candidate.slice(0, pos);
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_importDeferProxy","init","ns","constValue","v","proxy","run","_target","p","receiver","Proxy","defineProperty","deleteProperty","get","Reflect","getOwnPropertyDescriptor","getPrototypeOf","isExtensible","has","ownKeys","preventExtensions","set","setPrototypeOf"],"sources":["../../src/helpers/importDeferProxy.ts"],"sourcesContent":["/* @minVersion 7.23.0 */\n\nexport default function _importDeferProxy<T extends object>(\n init: () => T,\n): ProxyHandler<T> {\n var ns: T | null = null;\n\n var constValue = function <V extends boolean | null>(v: V) {\n return function (): V {\n return v;\n };\n };\n\n var proxy = function (run: Function) {\n return function (_target: T, p?: string | symbol, receiver?: any) {\n if (ns === null) ns = init();\n return run(ns, p, receiver);\n };\n };\n\n return new Proxy(\n {},\n {\n defineProperty: constValue(false),\n deleteProperty: constValue(false),\n get: proxy(Reflect.get),\n getOwnPropertyDescriptor: proxy(Reflect.getOwnPropertyDescriptor),\n getPrototypeOf: constValue(null),\n isExtensible: constValue(false),\n has: proxy(Reflect.has),\n ownKeys: proxy(Reflect.ownKeys),\n preventExtensions: constValue(true),\n set: constValue(false),\n setPrototypeOf: constValue(false),\n },\n );\n}\n"],"mappings":";;;;;;AAEe,SAASA,iBAAiBA,CACvCC,IAAa,EACI;EACjB,IAAIC,EAAY,GAAG,IAAI;EAEvB,IAAIC,UAAU,GAAG,SAAAA,CAAoCC,CAAI,EAAE;IACzD,OAAO,YAAe;MACpB,OAAOA,CAAC;IACV,CAAC;EACH,CAAC;EAED,IAAIC,KAAK,GAAG,SAAAA,CAAUC,GAAa,EAAE;IACnC,OAAO,UAAUC,OAAU,EAAEC,CAAmB,EAAEC,QAAc,EAAE;MAChE,IAAIP,EAAE,KAAK,IAAI,EAAEA,EAAE,GAAGD,IAAI,CAAC,CAAC;MAC5B,OAAOK,GAAG,CAACJ,EAAE,EAAEM,CAAC,EAAEC,QAAQ,CAAC;IAC7B,CAAC;EACH,CAAC;EAED,OAAO,IAAIC,KAAK,CACd,CAAC,CAAC,EACF;IACEC,cAAc,EAAER,UAAU,CAAC,KAAK,CAAC;IACjCS,cAAc,EAAET,UAAU,CAAC,KAAK,CAAC;IACjCU,GAAG,EAAER,KAAK,CAACS,OAAO,CAACD,GAAG,CAAC;IACvBE,wBAAwB,EAAEV,KAAK,CAACS,OAAO,CAACC,wBAAwB,CAAC;IACjEC,cAAc,EAAEb,UAAU,CAAC,IAAI,CAAC;IAChCc,YAAY,EAAEd,UAAU,CAAC,KAAK,CAAC;IAC/Be,GAAG,EAAEb,KAAK,CAACS,OAAO,CAACI,GAAG,CAAC;IACvBC,OAAO,EAAEd,KAAK,CAACS,OAAO,CAACK,OAAO,CAAC;IAC/BC,iBAAiB,EAAEjB,UAAU,CAAC,IAAI,CAAC;IACnCkB,GAAG,EAAElB,UAAU,CAAC,KAAK,CAAC;IACtBmB,cAAc,EAAEnB,UAAU,CAAC,KAAK;EAClC,CACF,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,53 @@
{
"name": "object-hash",
"version": "3.0.0",
"description": "Generate hashes from javascript objects in node and the browser.",
"homepage": "https://github.com/puleos/object-hash",
"repository": {
"type": "git",
"url": "https://github.com/puleos/object-hash"
},
"keywords": [
"object",
"hash",
"sha1",
"md5"
],
"bugs": {
"url": "https://github.com/puleos/object-hash/issues"
},
"scripts": {
"test": "node ./node_modules/.bin/mocha test",
"prepublish": "gulp dist"
},
"author": "Scott Puleo <puleos@gmail.com>",
"files": [
"index.js",
"dist/object_hash.js"
],
"license": "MIT",
"devDependencies": {
"browserify": "^16.2.3",
"gulp": "^4.0.0",
"gulp-browserify": "^0.5.1",
"gulp-coveralls": "^0.1.4",
"gulp-exec": "^3.0.1",
"gulp-istanbul": "^1.1.3",
"gulp-jshint": "^2.0.0",
"gulp-mocha": "^5.0.0",
"gulp-rename": "^1.2.0",
"gulp-replace": "^1.0.0",
"gulp-uglify": "^3.0.0",
"jshint": "^2.8.0",
"jshint-stylish": "^2.1.0",
"karma": "^4.2.0",
"karma-chrome-launcher": "^2.2.0",
"karma-mocha": "^1.3.0",
"mocha": "^6.2.0"
},
"engines": {
"node": ">= 6"
},
"main": "./index.js",
"browser": "./dist/object_hash.js"
}
@@ -0,0 +1,6 @@
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./rtk-query-react.production.min.cjs')
} else {
module.exports = require('./rtk-query-react.development.cjs')
}
@@ -0,0 +1,120 @@
/*
* Copyright 2022 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.
*/
import {ariaHideOutside} from './ariaHideOutside';
import {AriaPositionProps, useOverlayPosition} from './useOverlayPosition';
import {DOMAttributes, RefObject} from '@react-types/shared';
import {mergeProps, useLayoutEffect} from '@react-aria/utils';
import {OverlayTriggerState} from '@react-stately/overlays';
import {PlacementAxis} from '@react-types/overlays';
import {useOverlay} from './useOverlay';
import {usePreventScroll} from './usePreventScroll';
export interface AriaPopoverProps extends Omit<AriaPositionProps, 'isOpen' | 'onClose' | 'targetRef' | 'overlayRef'> {
/**
* The ref for the element which the popover positions itself with respect to.
*/
triggerRef: RefObject<Element | null>,
/**
* The ref for the popover element.
*/
popoverRef: RefObject<Element | null>,
/**
* Whether the popover is non-modal, i.e. elements outside the popover may be
* interacted with by assistive technologies.
*
* Most popovers should not use this option as it may negatively impact the screen
* reader experience. Only use with components such as combobox, which are designed
* to handle this situation carefully.
*/
isNonModal?: boolean,
/**
* Whether pressing the escape key to close the popover should be disabled.
*
* Most popovers should not use this option. When set to true, an alternative
* way to close the popover with a keyboard must be provided.
*
* @default false
*/
isKeyboardDismissDisabled?: boolean,
/**
* When user interacts with the argument element outside of the popover ref,
* return true if onClose should be called. This gives you a chance to filter
* out interaction with elements that should not dismiss the popover.
* By default, onClose will always be called on interaction outside the popover ref.
*/
shouldCloseOnInteractOutside?: (element: Element) => boolean
}
export interface PopoverAria {
/** Props for the popover element. */
popoverProps: DOMAttributes,
/** Props for the popover tip arrow if any. */
arrowProps: DOMAttributes,
/** Props to apply to the underlay element, if any. */
underlayProps: DOMAttributes,
/** Placement of the popover with respect to the trigger. */
placement: PlacementAxis | null
}
/**
* Provides the behavior and accessibility implementation for a popover component.
* A popover is an overlay element positioned relative to a trigger.
*/
export function usePopover(props: AriaPopoverProps, state: OverlayTriggerState): PopoverAria {
let {
triggerRef,
popoverRef,
isNonModal,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside,
...otherProps
} = props;
let {overlayProps, underlayProps} = useOverlay(
{
// If popover is in the top layer, it should not prevent other popovers from being dismissed.
isOpen: state.isOpen && !otherProps['data-react-aria-top-layer'],
onClose: state.close,
shouldCloseOnBlur: true,
isDismissable: !isNonModal,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside
},
popoverRef
);
let {overlayProps: positionProps, arrowProps, placement} = useOverlayPosition({
...otherProps,
targetRef: triggerRef,
overlayRef: popoverRef,
isOpen: state.isOpen,
onClose: isNonModal ? state.close : undefined
});
usePreventScroll({
isDisabled: isNonModal || !state.isOpen
});
useLayoutEffect(() => {
if (state.isOpen && !isNonModal && popoverRef.current) {
return ariaHideOutside([popoverRef.current]);
}
}, [isNonModal, state.isOpen, popoverRef]);
return {
popoverProps: mergeProps(overlayProps, positionProps),
arrowProps,
underlayProps,
placement
};
}
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/immer.ts","../../src/utils/env.ts","../../src/utils/errors.ts","../../src/utils/common.ts","../../src/utils/plugins.ts","../../src/core/scope.ts","../../src/core/finalize.ts","../../src/core/proxy.ts","../../src/core/immerClass.ts","../../src/core/current.ts","../../src/plugins/patches.ts","../../src/plugins/mapset.ts"],"sourcesContent":["import {\n\tIProduce,\n\tIProduceWithPatches,\n\tImmer,\n\tDraft,\n\tImmutable\n} from \"./internal\"\n\nexport {\n\tDraft,\n\tWritableDraft,\n\tImmutable,\n\tPatch,\n\tPatchListener,\n\tProducer,\n\toriginal,\n\tcurrent,\n\tisDraft,\n\tisDraftable,\n\tNOTHING as nothing,\n\tDRAFTABLE as immerable,\n\tfreeze,\n\tObjectish,\n\tStrictMode\n} from \"./internal\"\n\nconst immer = new Immer()\n\n/**\n * The `produce` function takes a value and a \"recipe function\" (whose\n * return value often depends on the base state). The recipe function is\n * free to mutate its first argument however it wants. All mutations are\n * only ever applied to a __copy__ of the base state.\n *\n * Pass only a function to create a \"curried producer\" which relieves you\n * from passing the recipe function every time.\n *\n * Only plain objects and arrays are made mutable. All other objects are\n * considered uncopyable.\n *\n * Note: This function is __bound__ to its `Immer` instance.\n *\n * @param {any} base - the initial state\n * @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified\n * @param {Function} patchListener - optional function that will be called with all the patches produced here\n * @returns {any} a new state, or the initial state if nothing was modified\n */\nexport const produce: IProduce = /* @__PURE__ */ immer.produce\n\n/**\n * Like `produce`, but `produceWithPatches` always returns a tuple\n * [nextState, patches, inversePatches] (instead of just the next state)\n */\nexport const produceWithPatches: IProduceWithPatches = /* @__PURE__ */ immer.produceWithPatches.bind(\n\timmer\n)\n\n/**\n * Pass true to automatically freeze all copies created by Immer.\n *\n * Always freeze by default, even in production mode\n */\nexport const setAutoFreeze = /* @__PURE__ */ immer.setAutoFreeze.bind(immer)\n\n/**\n * Pass true to enable strict shallow copy.\n *\n * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.\n */\nexport const setUseStrictShallowCopy = /* @__PURE__ */ immer.setUseStrictShallowCopy.bind(\n\timmer\n)\n\n/**\n * Pass false to use loose iteration that only processes enumerable string properties.\n * This skips symbols and non-enumerable properties for maximum performance.\n *\n * By default, strict iteration is enabled (includes all own properties).\n */\nexport const setUseStrictIteration = /* @__PURE__ */ immer.setUseStrictIteration.bind(\n\timmer\n)\n\n/**\n * Apply an array of Immer patches to the first argument.\n *\n * This function is a producer, which means copy-on-write is in effect.\n */\nexport const applyPatches = /* @__PURE__ */ immer.applyPatches.bind(immer)\n\n/**\n * Create an Immer draft from the given base state, which may be a draft itself.\n * The draft can be modified until you finalize it with the `finishDraft` function.\n */\nexport const createDraft = /* @__PURE__ */ immer.createDraft.bind(immer)\n\n/**\n * Finalize an Immer draft from a `createDraft` call, returning the base state\n * (if no changes were made) or a modified copy. The draft must *not* be\n * mutated afterwards.\n *\n * Pass a function as the 2nd argument to generate Immer patches based on the\n * changes that were made.\n */\nexport const finishDraft = /* @__PURE__ */ immer.finishDraft.bind(immer)\n\n/**\n * This function is actually a no-op, but can be used to cast an immutable type\n * to an draft type and make TypeScript happy\n *\n * @param value\n */\nexport function castDraft<T>(value: T): Draft<T> {\n\treturn value as any\n}\n\n/**\n * This function is actually a no-op, but can be used to cast a mutable type\n * to an immutable type and make TypeScript happy\n * @param value\n */\nexport function castImmutable<T>(value: T): Immutable<T> {\n\treturn value as any\n}\n\nexport {Immer}\n\nexport {enablePatches} from \"./plugins/patches\"\nexport {enableMapSet} from \"./plugins/mapset\"\n","// Should be no imports here!\n\n/**\n * The sentinel value returned by producers to replace the draft with undefined.\n */\nexport const NOTHING: unique symbol = Symbol.for(\"immer-nothing\")\n\n/**\n * To let Immer treat your class instances as plain immutable objects\n * (albeit with a custom prototype), you must define either an instance property\n * or a static property on each of your custom classes.\n *\n * Otherwise, your class instance will never be drafted, which means it won't be\n * safe to mutate in a produce callback.\n */\nexport const DRAFTABLE: unique symbol = Symbol.for(\"immer-draftable\")\n\nexport const DRLine truncated
@@ -0,0 +1,728 @@
export default `flf2a$ 7 5 16 -1 12
Fender by Scooter 8/94 (jkratten@law.georgetown.edu)
Explanation of first line:
flf2 - "magic number" for file identification
a - should always be \`a', for now
$ - the "hardblank" -- prints as a blank, but can't be smushed
7 - height of a character
5 - height of a character, not including descenders
10 - max line length (excluding comment lines) + a fudge factor
-1 - default smushmode for this font (like "-m 15" on command line)
12 - number of comment lines
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@
$$$@@
|| @
|| @
|| @
@
|| @
@
@@
'' '' @
@
@
@
@
@
@@
| | @
''''' @
| | @
''''' @
| | @
@
@@
| | @
.'|'|' @
| | | @
\`|'|, @
| | | @
'|'|' @
| | @@
\` || @
|| @
|| @
|| @
|| , @
@
@@
.'', @
| | @
.\`', ,@
| | | @
\`,,|' @
@
@@
'' @
@
@
@
@
@
@@
|' @
|' @
| @
|, @
|. @
@
@@
\`| @
\`| @
| @
,| @
.| @
@
@@
@
, | , @
,|, @
--|-- @
'|' @
' | ' @
@@
@
| @
-|- @
| @
@
@
@@
@
@
@
@
,, @
, @
@@
@
@
--- @
@
@
@
@@
@
@
@
@
.. @
@
@@
''@
'' @
'' @
'' @
'' @
@
@@
.''', @
| | @
| | @
| | @
\`,,,' @
@
@@
|| @
'|| @
|| @
|| @
.||. @
@
@@
''|, @
' || @
.|' @
// @
((... @
@
@@
,'''|, @
|| @
'''|| @
|| @
'...|' @
@
@@
/|| @
// || @
//..||.. @
|| @
|| @
@
@@
||'''' @
|| @
\`'''|| @
|| @
....|' @
@
@@
,,,, @
|| ' @
||''|, @
|| || @
\`|..|' @
@
@@
'''''/ @
// @
// @
// @
// @
@
@@
.|'''|, @
|| || @
))-(( @
|| || @
\`|...|' @
@
@@
.|'''|, @
|| || @
\`|...|| @
'' @
'' @
'' @
@@
@
|| @
@
|| @
@
@
@@
@
|| @
@
|| @
' @
@
@@
,, @
,, @
,, @
,, @
,, @
@
@@
@
,,, @
@
''' @
@
@
@@
,, @
,, @
,, @
,, @
,, @
@
@@
.|'''|, @
|| || @
//' @
|| @
.. @
@
@@
.''', @
| . | @
| |,' @
| @
\`... @
@
@@
/.\\ @
// \\\\ @
//...\\\\ @
// \\\\ @
.// \\\\. @
@
@@
'||'''|, @
|| || @
||;;;; @
|| || @
.||...|' @
@
@@
.|'''', @
|| @
|| @
|| @
\`|....' @
@
@@
'||'''|. @
|| || @
|| || @
|| || @
.||...|' @
@
@@
'||''''| @
|| . @
||'''| @
|| @
.||....| @
@
@@
'||''''| @
|| . @
||''| @
|| @
.||. @
@
@@
.|'''''| @
|| . @
|| |''|| @
|| || @
\`|....|' @
@
@@
'|| ||\` @
|| || @
||''|| @
|| || @
.|| ||. @
@
@@
|''||''| @
|| @
|| @
|| @
|..||..| @
@
@@
|''||''| @
|| @
|| @
|| @
'..|' @
@
@@
'|| //' @
|| // @
||<< @
|| \\\\ @
.|| \\\\. @
@
@@
'|| @
|| @
|| @
|| @
.||...| @
@
@@
'||\\ /||\` @
||\\\\.//|| @
|| || @
|| || @
.|| ||. @
@
@@
'||\\ ||\` @
||\\\\ || @
|| \\\\ || @
|| \\\\|| @
.|| \\||. @
@
@@
.|''''|, @
|| || @
|| || @
|| || @
\`|....|' @
@
@@
'||'''|, @
|| || @
||...|' @
|| @
.|| @
@
@@
.|''''|, @
|| || @
|| || @
|| \\\\|| @
\`|....|\\\\ @
@
@@
'||'''|, @
|| || @
||...|' @
|| \\\\ @
.|| \\\\. @
@
@@
.|'''| @
|| @
\`|'''|, @
. || @
|...|' @
@
@@
|''||''| @
|| @
|| @
|| @
.||. @
@
@@
'|| ||\` @
|| || @
|| || @
|| || @
\`|...|' @
@
@@
\\\\ // @
\\\\ // @
\\\\ // @
\\\\// @
\\/ @
@
@@
'|| ||\` @
|| || @
|| /\\ || @
\\\\//\\\\// @
\\/ \\/ @
@
@@
'\\\\ //\` @
\\\\// @
>< @
//\\\\ @
.// \\\\. @
@
@@
'\\\\ //\` @
\\\\// @
|| @
|| @
.||. @
@
@@
|'''''/ @
// @
// @
// @
/.....| @
@
@@
||''' @
|| @
|| @
|| @
||... @
@
@@
\\\\ @
\\\\ @
\\\\ @
\\\\ @
\\\\ @
@
@@
'''|| @
|| @
|| @
|| @
...|| @
@
@@
. @
.| |, @
| | @
@
@
@
@@
@
@
@
@
@
....@
@@
\`\` @
@
@
@
@
@
@@
@
@
'''|. @
.|''|| @
\`|..||. @
@
@@
'|| @
|| @
||''|, @
|| || @
.||..|' @
@
@@
@
@
.|'', @
|| @
\`|..' @
@
@@
||\` @
|| @
.|''|| @
|| || @
\`|..||. @
@
@@
@
@
.|''|, @
||..|| @
\`|... @
@
@@
.|'; @
|| @
'||' @
|| @
.||. @
@
@@
@
@
.|''|, @
|| || @
\`|..|| @
|| @
\`..|' @@
'|| @
|| @
||''|, @
|| || @
.|| || @
@
@@
@
'' @
|| @
|| @
.||. @
@
@@
@
'' @
|| @
|| @
|| @
|| @
\`..|' @@
'|| @
|| @
|| //\` @
||<< @
.|| \\\\. @
@
@@
'||\` @
|| @
|| @
|| @
.||. @
@
@@
@
@
'||),,(|, @
|| || || @
.|| ||. @
@
@@
@
@
\`||''|, @
|| || @
.|| ||. @
@
@@
@
@
.|''|, @
|| || @
\`|..|' @
@
@@
@
@
'||''|, @
|| || @
||..|' @
|| @
.|| @@
@
@
.|''||\` @
|| || @
\`|..|| @
|| , @
||\` @@
@
@
'||''| @
|| @
.||. @
@
@@
@
@
('''' @
\`'') @
\`...' @
@
@@
|| @
|| @
''||'' @
|| @
\`|..' @
@
@@
@
@
'|| ||\` @
|| || @
\`|..'|. @
@
@@
@
@
\\\\ // @
\\\\// @
\\/ @
@
@@
@
@
'\\\\ //\` @
\\\\/\\// @
\\/\\/ @
@
@@
@
@
\\\\ // @
>< @
// \\\\ @
@
@@
@
@
'|| ||\` @
\`|..|| @
|| @
, |' @
'' @@
@
@
'''/ @
// @
/... @
@
@@
{{ @
{{ @
{{ @
{{ @
{{ @
@
@@
||@
||@
||@
||@
||@
||@
@@
}} @
}} @
}} @
}} @
}} @
@
@@
@
% % @
% % @
@
@
@
@@
,, ,, @
/.\\ @
// \\\\ @
//...\\\\ @
.// \\\\. @
@
@@
'' '' @
.|'''|, @
|| || @
|| || @
\`|...|' @
@
@@
'' '' @
|| || @
|| || @
|| || @
\`|...|' @
@
@@
,, ,, @
@
'''|. @
.|''|| @
\`|..||. @
@
@@
,, ,, @
@
.|''|, @
|| || @
\`|..|' @
@
@@
,, ,, @
@
|| || @
|| || @
\`|..||. @
@
@@
.|'''|, @
|| || @
||;;;; @
|| || @
||...|' @
|| @
@@
`
@@ -0,0 +1 @@
{"name":"autoprefixer","version":"10.4.22","requiresBuild":false,"files":{"bin/autoprefixer":{"checkedAt":1794532117861,"integrity":"sha512-/CY3+CuV4KAiRyXSLsrW6G9mDcqQO1wYAjlr1OLnbiVFxW6mbNl+8QXKHi/0E2mtPcsvd8bRNX3iT498OGb+IA==","mode":493,"size":554},"LICENSE":{"checkedAt":1794532117861,"integrity":"sha512-83RJJ95IfQlH9xuw1X7jpvJKJXpEdtzfI32q4Gf1M1tDLrfK+i1kN+kQXvSKUCvYckqG2gDnAtk/kO9IrzxfqA==","mode":420,"size":1095},"lib/hacks/align-content.js":{"checkedAt":1794532117861,"integrity":"sha512-rq+rQ/h992Q5VZPdv5TF8aqk7DxGkgUBj89T2zFUf9Oh26AhAWV42D8N9oPOLtm5amt1dGOnOOnJQlzfqharaw==","mode":420,"size":1058},"lib/hacks/align-items.js":{"checkedAt":1794532117862,"integrity":"sha512-HCAYAlJJZRdS0sb0/dbCD8qDHX957YCGAikzc6S76V3wVvTfOjIRQdVl1gTTaYPEOQ5kVPbPNrrOoll1PtHNKA==","mode":420,"size":968},"lib/hacks/align-self.js":{"checkedAt":1794532117862,"integrity":"sha512-J2Rx8azlks6HqfsP63NTqU6zR7AiBB09Eo3iuE9pPLvILEsn3RVm8ldbwL0SKeeJsFlZqkb7STKxQECla5GFMw==","mode":420,"size":1131},"lib/hacks/animation.js":{"checkedAt":1794532117862,"integrity":"sha512-TE9mPIubYhUw9pUx/sZMs/qdxSrq6g4n3mJfrtzuevQcY5PW1DMYLruLwIjlMg9y6FnGp2Zm+SXgJCvWH3jr3g==","mode":420,"size":401},"lib/hacks/appearance.js":{"checkedAt":1794532117862,"integrity":"sha512-+Tlcq0ep6Z76D14FF53dVrsziqdaPF3joSq34nMp4qIIuP3cPMPAMNRHIP+mz/xkwRx+/X4cZ3/BoUu+XyWnXA==","mode":420,"size":463},"lib/at-rule.js":{"checkedAt":1794532117862,"integrity":"sha512-1gSzkdlOIi4g33Bs+45r2KJ8IZWJSN4lBb5oZMP/3kRlAoBpKLpi0viUUtM5ip4FMwcxxqEzNcs4ukawSx832Q==","mode":420,"size":702},"lib/hacks/autofill.js":{"checkedAt":1794532117862,"integrity":"sha512-t/R+oO8MB0+UDlUGYhLKxPL2y6L7qopXm9TjR+b3TRBSa1/3Evd1mPKDbIbwhIFMlaoYi67s5/xLkJQWSqFlPg==","mode":420,"size":531},"lib/autoprefixer.js":{"checkedAt":1794532117863,"integrity":"sha512-k6EKw+vEkACldrdUAJArsavxDpJTwQhhX61WNLsjhzGd7pzxQk0XcZOQ/pHCyCGBqIoklSSxFutkkeVVo6fHrQ==","mode":420,"size":4182},"lib/hacks/backdrop-filter.js":{"checkedAt":1794532117863,"integrity":"sha512-tHBJDuTPdu4d0HmesorRezce9nUZe9phfmVV0SecCHtfS+R76tQ13mvdRaI7U+0dfmiiHpfgJFL2OuJn9BoVsQ==","mode":420,"size":436},"lib/hacks/background-clip.js":{"checkedAt":1794532117863,"integrity":"sha512-tzYwH0AdjLl3TK79ksUIjNye3sU3dxAnFNu19xY1oLn76rXCLmnusJhXklhcEwE0Gbk3/XsguS1PCyxSGjR2JQ==","mode":420,"size":504},"lib/hacks/background-size.js":{"checkedAt":1794532117863,"integrity":"sha512-Vbxs66bdhTwHyC7UzeB5XiMyXgYt0Xqnkuz+SJxdi7/cdDDHEb7lyz/zIbMt4u2QpyhcjWH3kZE7Qf1DV8hLWw==","mode":420,"size":516},"lib/hacks/block-logical.js":{"checkedAt":1794532117863,"integrity":"sha512-AwZfFLvbMe2l55HKRATh2DusbP2szewjvSt+31nczPG/BZIEB9ssqEf7TS14lBi29/sbW+O2SPjYZFuIKfMVHg==","mode":420,"size":857},"lib/hacks/border-image.js":{"checkedAt":1794532117863,"integrity":"sha512-7ZdLVjr3Qiu5Tg4ob6UZsMMRN45IfBHxdznXXsBOksu8izIzleSwsut7AuDXBKD0iganOZsmRZNbpT50aoIsJQ==","mode":420,"size":338},"lib/hacks/border-radius.js":{"checkedAt":1794532117863,"integrity":"sha512-kL9hmZWpu+8RlkYogEYShfbZfI+DTjiFJOdgbD7Mvrw2oJXhEzrfLodPh/CZWXXN556l5gmrE20MqZe3SdlPBQ==","mode":420,"size":907},"lib/brackets.js":{"checkedAt":1794532117864,"integrity":"sha512-9kx7nwGFT8oURCVJgfSH5PIt4e+IRb5cNzAp1tPrKRh2Q1RrGsSrOgMLqdLvzXVFgfdeKlYah8VRxN5DS8nQeA==","mode":420,"size":849},"lib/hacks/break-props.js":{"checkedAt":1794532117864,"integrity":"sha512-+sPURYhbwenfYh4ThnQ47s46NkUegwLdKG3W85N/uCZ1+XpwtdoAJDdBILxNOmwhlWYejIs3cVXmSRMmnFlkuA==","mode":420,"size":1313},"lib/browsers.js":{"checkedAt":1794532117864,"integrity":"sha512-vXKVeK+JLEP0vOle3eap2Ypt2CuHVrLWlfxJWnWrk1aanFkqnBr57A/2HosGjmvPmnjZalEZeRpM7cKaYzfCvQ==","mode":420,"size":1769},"lib/hacks/cross-fade.js":{"checkedAt":1794532117864,"integrity":"sha512-jVQSE5VUeMUcVaSe/mm5iwhGrUokEgTM4U7l6Oaz5agq+Z7nr492DECrHL+E/BPY8HXHjUz0b74xs0L+h2oolA==","mode":420,"size":863},"lib/declaration.js":{"checkedAt":1794532117864,"integrity":"sha512-R1/nXIEH2DQ/PS9u3/QGMFi9Vm9jvsyCtK/tCszhiyqwWrXCkW9185zr8uafZEfpXfgDdw2AI8UNdmAsYHlqkw==","mode":420,"size":4068},"lib/hacks/display-flex.js":{"checkedAt":1794532117864,"integrity":"sha512-pKR6lnZ2xpxeKQz6JP/rkjhMezF6ZtwR/giEzGGcmGGnLSbLyAK9PHgiM1z1klv9RBhptlLzQSEsslPCeuCxFA==","mode":420,"size":1303},"lib/hacks/display-grid.js":{"checkedAt":1794532117865,"integrity":"sha512-7L4FjuQhgGGApwa47nFYVoPN1eb6X5QeoCk4tHaqDcqSDnwsbxiFVAOuBYPOvul8Nn+Yvfg4SKCffOsl30Pv7A==","mode":420,"size":409},"lib/hacks/file-selector-button.js":{"checkedAt":1794532117865,"integrity":"sha512-Yi3Me6s0eCxqs+K6ppYNlnIqwY/IPbSvCTeiPedqgMBqERV6Kcj++0ZkrnSOuaJUg2RrkuOjaVuX2EncVYpogA==","mode":420,"size":598},"lib/hacks/filter-value.js":{"checkedAt":1794532117865,"integrity":"sha512-yxg9iVmHjxsFE3H5+PVmMZqeFRRXEC1exBhr6/BeuN/ySQX6/PWEAhtmEJSQYxktvOH0b5CNCwwfEzB2GYxBXw==","mode":420,"size":283},"lib/hacks/filter.js":{"checkedAt":1794532117865,"integrity":"sha512-UuI7Q+kCwMfEIfkzCoB8vG4WPp6NBAvJrjrhWjjpN2cX62IrtuqRk+0Fug2DMjBlz9NPc5n727Ywh6LW1q5ZIQ==","mode":420,"size":386},"lib/hacks/flex-basis.js":{"checkedAt":1794532117865,"integrity":"sha512-T7zFGgttEDF+qh3zK5N0+8uaBg7jLine truncated
@@ -0,0 +1,353 @@
"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/index.ts
var src_exports = {};
__export(src_exports, {
BreadcrumbItem: () => breadcrumb_item_default,
Breadcrumbs: () => breadcrumbs_default,
useBreadcrumbItem: () => useBreadcrumbItem,
useBreadcrumbs: () => useBreadcrumbs
});
module.exports = __toCommonJS(src_exports);
// src/breadcrumbs.tsx
var import_react4 = require("react");
var import_system4 = require("@heroui/system");
var import_shared_icons = require("@heroui/shared-icons");
var import_shared_utils3 = require("@heroui/shared-utils");
var import_utils3 = require("@react-aria/utils");
// src/use-breadcrumbs.ts
var import_react2 = require("react");
var import_system3 = require("@heroui/system");
var import_theme2 = require("@heroui/theme");
var import_react_utils2 = require("@heroui/react-utils");
var import_utils2 = require("@react-aria/utils");
var import_breadcrumbs2 = require("@react-aria/breadcrumbs");
var import_react3 = require("react");
var import_shared_utils2 = require("@heroui/shared-utils");
// src/breadcrumb-item.tsx
var import_system2 = require("@heroui/system");
// src/use-breadcrumb-item.ts
var import_system = require("@heroui/system");
var import_focus = require("@react-aria/focus");
var import_theme = require("@heroui/theme");
var import_react_utils = require("@heroui/react-utils");
var import_breadcrumbs = require("@react-aria/breadcrumbs");
var import_shared_utils = require("@heroui/shared-utils");
var import_react = require("react");
var import_utils = require("@react-aria/utils");
function useBreadcrumbItem(originalProps) {
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.breadcrumbItem.variantKeys);
const {
ref,
as,
className,
children,
isLast,
separator,
startContent,
endContent,
classNames,
hideSeparator = false,
...otherProps
} = props;
const WrapperComponent = as || "li";
const isCurrent = !!(originalProps == null ? void 0 : originalProps.isCurrent);
const isDisabled = originalProps == null ? void 0 : originalProps.isDisabled;
const Component = (originalProps == null ? void 0 : originalProps.href) && !isCurrent ? "a" : "span";
const shouldFilterDOMProps = typeof Component === "string";
const domRef = (0, import_react_utils.useDOMRef)(ref);
const { itemProps } = (0, import_breadcrumbs.useBreadcrumbItem)(
{ ...originalProps, isCurrent, elementType: Component },
domRef
);
const { isFocusVisible, isFocused, focusProps } = (0, import_focus.useFocusRing)();
const slots = (0, import_react.useMemo)(
() => (0, import_theme.breadcrumbItem)({
...variantProps,
isCurrent,
underline: (originalProps == null ? void 0 : originalProps.underline) !== void 0 && !isCurrent ? originalProps == null ? void 0 : originalProps.underline : "none",
className
}),
[(0, import_shared_utils.objectToDeps)(variantProps), isCurrent, className]
);
const baseStyles = (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.base, className);
const getBaseProps = () => ({
ref: domRef,
"data-slot": "base",
className: slots.base({ class: baseStyles }),
...(0, import_react_utils.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
})
});
const getItemProps = () => ({
href: !isCurrent ? originalProps == null ? void 0 : originalProps.href : void 0,
"data-slot": "item",
"data-focus": (0, import_shared_utils.dataAttr)(isFocused),
"data-focus-visible": (0, import_shared_utils.dataAttr)(isFocusVisible),
"data-disabled": originalProps == null ? void 0 : originalProps.isDisabled,
"data-current": originalProps == null ? void 0 : originalProps.isCurrent,
className: slots.item({ class: classNames == null ? void 0 : classNames.item }),
...(0, import_utils.mergeProps)(itemProps, isDisabled ? {} : focusProps)
});
const getSeparatorProps = () => ({
"data-slot": "separator",
"aria-hidden": (0, import_shared_utils.dataAttr)(true),
className: slots.separator({ class: classNames == null ? void 0 : classNames.separator })
});
return {
Component,
WrapperComponent,
children,
separator,
startContent,
endContent,
isDisabled,
isCurrent,
isLast,
hideSeparator,
getBaseProps,
getItemProps,
getSeparatorProps
};
}
// src/breadcrumb-item.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var Breadcrumbs = (0, import_system2.forwardRef)((props, ref) => {
const {
Component,
WrapperComponent,
children,
isLast,
separator,
startContent,
endContent,
hideSeparator,
getBaseProps,
getItemProps,
getSeparatorProps
} = useBreadcrumbItem({
...props,
ref
});
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(WrapperComponent, { ...getBaseProps(), children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Component, { ...getItemProps(), children: [
startContent,
children,
endContent
] }),
!isLast && !hideSeparator && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { ...getSeparatorProps(), children: separator })
] });
});
Breadcrumbs.displayName = "HeroUI.Breadcrumbs";
var breadcrumb_item_default = Breadcrumbs;
// src/use-breadcrumbs.ts
function useBreadcrumbs(originalProps) {
var _a, _b;
const globalContext = (0, import_system3.useProviderContext)();
const disableAnimation = (_b = (_a = originalProps == null ? void 0 : originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const [props, variantProps] = (0, import_system3.mapPropsVariants)(originalProps, import_theme2.breadcrumbs.variantKeys);
const {
ref,
as,
color,
underline,
isDisabled,
separator,
children: childrenProp,
itemsBeforeCollapse = 1,
itemsAfterCollapse = 2,
maxItems = 8,
hideSeparator,
renderEllipsis,
className,
classNames,
itemClasses,
onAction,
...otherProps
} = props;
const Component = as || "nav";
const shouldFilterDOMProps = typeof Component === "string";
const { navProps } = (0, import_breadcrumbs2.useBreadcrumbs)(originalProps);
const [, children] = (0, import_react_utils2.pickChildren)(childrenProp, breadcrumb_item_default);
const childCount = import_react2.Children.count(children);
const domRef = (0, import_react_utils2.useDOMRef)(ref);
const slots = (0, import_react3.useMemo)(
() => (0, import_theme2.breadcrumbs)({
...variantProps,
className
}),
[(0, import_shared_utils2.objectToDeps)(variantProps), className]
);
const baseStyles = (0, import_shared_utils2.clsx)(classNames == null ? void 0 : classNames.base, className);
const itemProps = {
color,
underline,
disableAnimation,
hideSeparator,
size: originalProps == null ? void 0 : originalProps.size,
classNames: itemClasses
};
const getBaseProps = () => ({
ref: domRef,
"data-slot": "base",
className: slots.base({ class: baseStyles }),
...(0, import_utils2.mergeProps)(
navProps,
(0, import_react_utils2.filterDOMProps)(otherProps, {
enabled: shouldFilterDOMProps
})
)
});
const getListProps = () => ({
"data-slot": "list",
className: slots.list({ class: classNames == null ? void 0 : classNames.list })
});
const getEllipsisProps = () => ({
"data-slot": "ellipsis",
className: slots.ellipsis({ class: classNames == null ? void 0 : classNames.ellipsis })
});
const getSeparatorProps = () => ({
"data-slot": "separator",
"aria-hidden": (0, import_shared_utils2.dataAttr)(true),
className: slots.separator({ class: classNames == null ? void 0 : classNames.separator })
});
return {
Component,
children,
slots,
separator,
childCount,
itemsAfterCollapse,
itemsBeforeCollapse,
maxItems,
classNames,
isDisabled,
itemProps,
renderEllipsis,
getBaseProps,
getListProps,
getEllipsisProps,
getSeparatorProps,
onAction
};
}
// src/breadcrumbs.tsx
var import_jsx_runtime2 = require("react/jsx-runtime");
var Breadcrumbs2 = (0, import_system4.forwardRef)((props, ref) => {
const {
Component,
children,
childCount,
itemProps,
separator = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_shared_icons.ChevronRightIcon, {}),
maxItems,
itemsBeforeCollapse,
itemsAfterCollapse,
isDisabled,
renderEllipsis,
getBaseProps,
getListProps,
getEllipsisProps,
getSeparatorProps,
onAction
} = useBreadcrumbs({
...props,
ref
});
const content = (0, import_react4.useMemo)(() => {
let items = children == null ? void 0 : children.map((child, i) => {
var _a;
const isLast = i === childCount - 1;
const itemKey = (child == null ? void 0 : child.key) || i;
return (0, import_react4.cloneElement)(child, {
...itemProps,
isLast,
separator,
isDisabled: isDisabled && !isLast,
isCurrent: isLast || child.props.isCurrent,
...child.props,
key: itemKey,
onPress: (0, import_utils3.chain)((_a = child.props) == null ? void 0 : _a.onPress, () => onAction == null ? void 0 : onAction(itemKey))
});
});
if (!items)
return null;
if (childCount < maxItems) {
return items;
}
if (itemsBeforeCollapse + itemsAfterCollapse >= childCount) {
(0, import_shared_utils3.warn)(
`You have provided an invalid combination of props to the Breadcrumbs. itemsAfterCollapse={${itemsAfterCollapse}} + itemsBeforeCollapse={${itemsBeforeCollapse}} >= itemsCount={${childCount}}`,
"Breadcrumbs"
);
return items;
}
const itemsInEllipsis = items.slice(itemsBeforeCollapse, items.length - itemsAfterCollapse);
if (itemsInEllipsis.length < 1) {
return items;
}
const ellipsisIcon = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_shared_icons.EllipsisIcon, { ...getEllipsisProps() });
const collapsedItem = (0, import_react4.cloneElement)(itemsInEllipsis[0], {
...itemsInEllipsis[0].props,
key: "ellipsis",
children: ellipsisIcon
});
const ellipsisItem = typeof renderEllipsis === "function" ? renderEllipsis({
collapsedItem,
items: itemsInEllipsis.map((item) => item.props),
maxItems,
ellipsisIcon,
itemsBeforeCollapse,
itemsAfterCollapse,
separator: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { ...getSeparatorProps(), children: separator })
}) : collapsedItem;
return [
...items.slice(0, itemsBeforeCollapse),
ellipsisItem,
...items.slice(items.length - itemsAfterCollapse, items.length)
];
}, [
children,
childCount,
separator,
itemProps,
itemsBeforeCollapse,
itemsAfterCollapse,
isDisabled
]);
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, { ...getBaseProps(), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ol", { ...getListProps(), children: content }) });
});
Breadcrumbs2.displayName = "HeroUI.Breadcrumbs";
var breadcrumbs_default = Breadcrumbs2;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
BreadcrumbItem,
Breadcrumbs,
useBreadcrumbItem,
useBreadcrumbs
});
@@ -0,0 +1,2 @@
import { LogEvent } from './typings';
export default function basicLogPrefix(event: LogEvent, dateFormat?: string): string;
@@ -0,0 +1,79 @@
# 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).
## [v1.1.0](https://github.com/ljharb/unbox-primitive/compare/v1.0.2...v1.1.0) - 2024-12-15
### Commits
- [meta] use `npmignore` to autogenerate an npmignore file [`348a5ad`](https://github.com/ljharb/unbox-primitive/commit/348a5ad5d353e7fcd6353934073ca3a982f40a4e)
- [New] add types [`a324230`](https://github.com/ljharb/unbox-primitive/commit/a32423092f81bfbf3c4dff77a5fa549ffae87daa)
- [Tests] use `es-value-fixtures` [`a321ae5`](https://github.com/ljharb/unbox-primitive/commit/a321ae56aaf30ea843c708bf6c6c13ee52eee205)
- [actions] split out node 10-20, and 20+ [`04a0e0d`](https://github.com/ljharb/unbox-primitive/commit/04a0e0d09907c2643e25ad69b49864c1c34e59d0)
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `npmignore`, `object-inspect`, `object-is`, `tape` [`7fff971`](https://github.com/ljharb/unbox-primitive/commit/7fff97161bf83ebe348290ef27992af630ca92e9)
- [actions] update rebase action [`91d6807`](https://github.com/ljharb/unbox-primitive/commit/91d6807c562a39ce876feda777b641eb0ee64ce9)
- [Deps] update `call-bind`, `has-symbols`, `which-boxed-primitive` [`f8b6597`](https://github.com/ljharb/unbox-primitive/commit/f8b6597e071d05f0792f6eef0e2fbc30ddfe43d4)
- [Dev Deps] update `aud`, `object-inspect`, `tape` [`b3362a1`](https://github.com/ljharb/unbox-primitive/commit/b3362a164fdbee9006be765d99d5d835d6493326)
- [Refactor] use `call-bound` directly [`e29ff5f`](https://github.com/ljharb/unbox-primitive/commit/e29ff5f4cbcc58d32e670bce11d5c3137eae0c44)
- [meta] add missing `engines.node` [`d3420bc`](https://github.com/ljharb/unbox-primitive/commit/d3420bc8cda471cf62119e08d9581b72962f74f6)
- [Tests] replace `aud` with `npm audit` [`5e6a6d0`](https://github.com/ljharb/unbox-primitive/commit/5e6a6d0459b6fa8a812d00362fe60854333f1b64)
- [Deps] update `which-boxed-primitive` [`0ff873d`](https://github.com/ljharb/unbox-primitive/commit/0ff873dadf31962c2f00e24d8d7d30cfa8c60ac6)
- [Dev Deps] update `aud` [`dd0e373`](https://github.com/ljharb/unbox-primitive/commit/dd0e3733bb9db65d254492d6c1d1b710005b932f)
- [Dev Deps] add missing peer dep [`4f79b24`](https://github.com/ljharb/unbox-primitive/commit/4f79b240212d847276dba9a0044f356506eaeaa6)
## [v1.0.2](https://github.com/ljharb/unbox-primitive/compare/v1.0.1...v1.0.2) - 2022-04-24
### Commits
- [actions] reuse common workflows [`e6420b9`](https://github.com/ljharb/unbox-primitive/commit/e6420b94eed3558ef3ecddbd3d85fe2f400d1db1)
- [actions] update codecov uploader [`b90aff2`](https://github.com/ljharb/unbox-primitive/commit/b90aff2b17b70c1a7200eb5faa3f9e64ebf055f9)
- [readme] add github actions/codecov badges; update URLs [`bcc39b9`](https://github.com/ljharb/unbox-primitive/commit/bcc39b9d6d101bad199c95604f94999f80d6da97)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `safe-publish-latest`, `tape` [`a704a32`](https://github.com/ljharb/unbox-primitive/commit/a704a32ec4af43cd0631317ae3a537012adc1610)
- [Refactor] use `call-bind` instead of `function-bind` [`0a609f1`](https://github.com/ljharb/unbox-primitive/commit/0a609f1be6269cbf501482aacd9a0a1bd8596108)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `safe-publish-latest`, `tape` [`6a45317`](https://github.com/ljharb/unbox-primitive/commit/6a4531757d74af97c9d0770b102f81ce6ff0a8dc)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `object-inspect`, `tape` [`795c76f`](https://github.com/ljharb/unbox-primitive/commit/795c76f14c4df3c7ae934f7b14a98c07951ea9c7)
- [Deps] update `has-bigints`, `has-symbols` [`257a065`](https://github.com/ljharb/unbox-primitive/commit/257a065496b4190c296d674bff342ea40cf8e176)
## [v1.0.1](https://github.com/ljharb/unbox-primitive/compare/v1.0.0...v1.0.1) - 2021-03-25
### Commits
- [Tests] use shared travis-ci configs [`f977e5f`](https://github.com/ljharb/unbox-primitive/commit/f977e5f8fa532dbc519bd78a48cf4b81c14720fe)
- [Tests] migrate tests to Github Actions [`b89def6`](https://github.com/ljharb/unbox-primitive/commit/b89def60908a236aa1b5c756426f7cc61cf458dd)
- [meta] do not publish github action workflow files [`325d1f1`](https://github.com/ljharb/unbox-primitive/commit/325d1f1836cecbe57ee148545de5aefcbe7a7dce)
- readme [`810cd70`](https://github.com/ljharb/unbox-primitive/commit/810cd70f7b3c670cd55eae64466c89595175ee2a)
- [Tests] run `nyc` on all tests; use `tape` runner [`2f5fb08`](https://github.com/ljharb/unbox-primitive/commit/2f5fb08930c8f8e5e069ac61891dc9bd76cb762b)
- [meta] add `auto-changelog` [`03ed375`](https://github.com/ljharb/unbox-primitive/commit/03ed3759284493f19323eb0500f726d0851fc085)
- [actions] add automatic rebasing / merge commit blocking [`6dec48d`](https://github.com/ljharb/unbox-primitive/commit/6dec48daa357fa79a5cac1add9ca33f7b56276cc)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `object-is`, `tape` [`528ed88`](https://github.com/ljharb/unbox-primitive/commit/528ed8826664b67f7eaf1fe7e2031c063b2d315f)
- [actions] check out the entire repo [`5095b29`](https://github.com/ljharb/unbox-primitive/commit/5095b2981f44a78b3f9bfaa1a526f17a6823e383)
- [actions] add "Allow Edits" workflow [`5aa26d7`](https://github.com/ljharb/unbox-primitive/commit/5aa26d7f0c32e0e78ba4bf3e5f9abb5478fd97fa)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `object-is`, `safe-publish-latest`, `tape` [`afc18c6`](https://github.com/ljharb/unbox-primitive/commit/afc18c6cb59cbb6b514e0d8004c6fd264e2a27eb)
- [readme] remove travis badge [`a025899`](https://github.com/ljharb/unbox-primitive/commit/a0258997a21604e1266840e6d167f0a870966e9b)
- [Dev Deps] update `auto-changelog` [`9219a32`](https://github.com/ljharb/unbox-primitive/commit/9219a32844b2ce3ed0a7ea12a5910a3e92424e4e)
- [readme] Fix missing paren in example [`73f5a33`](https://github.com/ljharb/unbox-primitive/commit/73f5a3340ca1ab6c227ed4632117d816d5e35317)
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`e450acc`](https://github.com/ljharb/unbox-primitive/commit/e450accb54ab452f240768a5f0a98e5887b0ba8c)
- [Deps] update `has-bigints`, `has-symbols`, `which-boxed-primitive` [`a4279b5`](https://github.com/ljharb/unbox-primitive/commit/a4279b504732002074e5dcb9c5509038d605f563)
- [Dev Deps] update `auto-changelog`, `in-publish`, `tape` [`b351548`](https://github.com/ljharb/unbox-primitive/commit/b351548d31789c0d0af4c3bce55c2bdefe51b40f)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`f600382`](https://github.com/ljharb/unbox-primitive/commit/f600382db83025270969354ac52a72aadb0a7ffa)
- [readme] fix travis links [`4d02fa9`](https://github.com/ljharb/unbox-primitive/commit/4d02fa9a4990812b048f8aefe6e46be80b68beef)
- [Dev Deps] update `auto-changelog`; add `aud` [`07e74a3`](https://github.com/ljharb/unbox-primitive/commit/07e74a3ca90688122593095849757e3c05c46db0)
- [meta] add `funding` field [`7ca4bd7`](https://github.com/ljharb/unbox-primitive/commit/7ca4bd71196e90a2fc9c7cb0ef4e30f949d5a853)
- [Tests] only audit prod deps [`47d8d5f`](https://github.com/ljharb/unbox-primitive/commit/47d8d5fbd58bf472e7e83f79ccef7e8379d06b35)
- [Deps] update `has-symbols` [`c70c15e`](https://github.com/ljharb/unbox-primitive/commit/c70c15e924191d11a271cff25bde657b0c3c3016)
## v1.0.0 - 2019-08-10
### Commits
- [Tests] add `.travis.yml` [`8c9a5ef`](https://github.com/ljharb/unbox-primitive/commit/8c9a5efdb54be4866e2884bf32cbe830788b2c2a)
- Initial commit [`feaff15`](https://github.com/ljharb/unbox-primitive/commit/feaff159eb999adc8763ff3e51d2d3d56d6164f8)
- [Tests] add tests [`3dd18d6`](https://github.com/ljharb/unbox-primitive/commit/3dd18d65748efb4af9b8ca66f8d8c5521d8f2dec)
- implementation [`472fb41`](https://github.com/ljharb/unbox-primitive/commit/472fb41d049ddee80ebf3219a5837e639a6e9341)
- npm init [`e9e426f`](https://github.com/ljharb/unbox-primitive/commit/e9e426fc90b9a3f07ffc48db75f78c414f77bc2b)
- [Tests] add linting [`139e74b`](https://github.com/ljharb/unbox-primitive/commit/139e74b94cdfd187b43b24de76c6d84af21ee467)
- [meta] create FUNDING.yml [`a9509e1`](https://github.com/ljharb/unbox-primitive/commit/a9509e122163e2b9d98af421e5c0575df36e2310)
- Only apps should have lockfiles [`b3d0834`](https://github.com/ljharb/unbox-primitive/commit/b3d0834d69dcbf4cbc1e61ccfaef05acf96cf630)
@@ -0,0 +1,44 @@
{
"name": "electron-to-chromium",
"version": "1.5.250",
"description": "Provides a list of electron-to-chromium version mappings",
"main": "index.js",
"files": [
"versions.js",
"full-versions.js",
"chromium-versions.js",
"full-chromium-versions.js",
"versions.json",
"full-versions.json",
"chromium-versions.json",
"full-chromium-versions.json",
"LICENSE"
],
"scripts": {
"build": "node build.mjs",
"update": "node automated-update.js",
"test": "nyc ava --verbose",
"report": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
},
"repository": {
"type": "git",
"url": "https://github.com/kilian/electron-to-chromium/"
},
"keywords": [
"electron",
"chrome",
"chromium",
"browserslist",
"browserlist"
],
"author": "Kilian Valkhof",
"license": "ISC",
"devDependencies": {
"ava": "^5.1.1",
"codecov": "^3.8.2",
"compare-versions": "^6.0.0-rc.1",
"node-fetch": "^3.3.0",
"nyc": "^15.1.0",
"shelljs": "^0.8.5"
}
}
@@ -0,0 +1 @@
{"version":3,"file":"isPromise.js","sourceRoot":"","sources":["../../../../src/common/calculations/isPromise.ts"],"names":[],"mappings":";;AAAA,8BAQC;AARD,SAAgB,SAAS,CAAI,MAAe;IAC1C,MAAM,kBAAkB,GACtB,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,CAAC;QAC/C,OAAO,MAAM,KAAK,UAAU,CAAC;IAE/B,OAAO,CACL,kBAAkB,IAAI,OAAQ,MAAyB,CAAC,IAAI,KAAK,UAAU,CAC5E,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
{"name":"convert-source-map","version":"1.9.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532124077,"integrity":"sha512-W9/VdX2WK3uLtY1MN6cDdNwADu25tQpfJDexNWtJIhzgqd/p/SImNDijwQCSxK/nG3W13TSUIWdJcIsWRIXDwQ==","mode":420,"size":1078},"index.js":{"checkedAt":1794532124077,"integrity":"sha512-E4QAjQTQmRmegqfliD63Z/69JCsCk3OmxeV4nqooNVlCMjYQdBiCEnjNfM5qatF8KwhUaaVVE8FDcL78O2jskA==","mode":420,"size":5261},"package.json":{"checkedAt":1794532124077,"integrity":"sha512-3OPg+a3wedkJ0ghoJZzvTRiC3iKbTXfLOX3BaWLvarsFntmvouHS8cM1OIzcfvOoTRIhqtDRZRzfkDgARZTnlQ==","mode":420,"size":842},"README.md":{"checkedAt":1794532124077,"integrity":"sha512-mV5mOMzgBvkuSiikrN6X4MRBawts7qgVdozMlyEb8PwQ5j6RvO0pqqm+Q5xxmnJ89taQDxxb++XdFU0q2qOY8w==","mode":420,"size":4253}}}
@@ -0,0 +1 @@
const s={chrome:{releases:[["1","2008-12-11","r","w","528"],["2","2009-05-21","r","w","530"],["3","2009-09-15","r","w","532"],["4","2010-01-25","r","w","532.5"],["5","2010-05-25","r","w","533"],["6","2010-09-02","r","w","534.3"],["7","2010-10-19","r","w","534.7"],["8","2010-12-02","r","w","534.10"],["9","2011-02-03","r","w","534.13"],["10","2011-03-08","r","w","534.16"],["11","2011-04-27","r","w","534.24"],["12","2011-06-07","r","w","534.30"],["13","2011-08-02","r","w","535.1"],["14","2011-09-16","r","w","535.1"],["15","2011-10-25","r","w","535.2"],["16","2011-12-13","r","w","535.7"],["17","2012-02-08","r","w","535.11"],["18","2012-03-28","r","w","535.19"],["19","2012-05-15","r","w","536.5"],["20","2012-06-26","r","w","536.10"],["21","2012-07-31","r","w","537.1"],["22","2012-09-25","r","w","537.4"],["23","2012-11-06","r","w","537.11"],["24","2013-01-10","r","w","537.17"],["25","2013-02-21","r","w","537.22"],["26","2013-03-26","r","w","537.31"],["27","2013-05-21","r","w","537.36"],["28","2013-07-09","r","b","28"],["29","2013-08-20","r","b","29"],["30","2013-10-01","r","b","30"],["31","2013-11-12","r","b","31"],["32","2014-01-14","r","b","32"],["33","2014-02-20","r","b","33"],["34","2014-04-08","r","b","34"],["35","2014-05-20","r","b","35"],["36","2014-07-16","r","b","36"],["37","2014-08-26","r","b","37"],["38","2014-10-07","r","b","38"],["39","2014-11-18","r","b","39"],["40","2015-01-21","r","b","40"],["41","2015-03-03","r","b","41"],["42","2015-04-14","r","b","42"],["43","2015-05-19","r","b","43"],["44","2015-07-21","r","b","44"],["45","2015-09-01","r","b","45"],["46","2015-10-13","r","b","46"],["47","2015-12-01","r","b","47"],["48","2016-01-20","r","b","48"],["49","2016-03-02","r","b","49"],["50","2016-04-13","r","b","50"],["51","2016-05-25","r","b","51"],["52","2016-07-20","r","b","52"],["53","2016-08-31","r","b","53"],["54","2016-10-12","r","b","54"],["55","2016-12-01","r","b","55"],["56","2017-01-25","r","b","56"],["57","2017-03-09","r","b","57"],["58","2017-04-19","r","b","58"],["59","2017-06-05","r","b","59"],["60","2017-07-25","r","b","60"],["61","2017-09-05","r","b","61"],["62","2017-10-17","r","b","62"],["63","2017-12-06","r","b","63"],["64","2018-01-23","r","b","64"],["65","2018-03-06","r","b","65"],["66","2018-04-17","r","b","66"],["67","2018-05-29","r","b","67"],["68","2018-07-24","r","b","68"],["69","2018-09-04","r","b","69"],["70","2018-10-16","r","b","70"],["71","2018-12-04","r","b","71"],["72","2019-01-29","r","b","72"],["73","2019-03-12","r","b","73"],["74","2019-04-23","r","b","74"],["75","2019-06-04","r","b","75"],["76","2019-07-30","r","b","76"],["77","2019-09-10","r","b","77"],["78","2019-10-22","r","b","78"],["79","2019-12-10","r","b","79"],["80","2020-02-04","r","b","80"],["81","2020-04-07","r","b","81"],["83","2020-05-19","r","b","83"],["84","2020-07-27","r","b","84"],["85","2020-08-25","r","b","85"],["86","2020-10-20","r","b","86"],["87","2020-11-17","r","b","87"],["88","2021-01-19","r","b","88"],["89","2021-03-02","r","b","89"],["90","2021-04-13","r","b","90"],["91","2021-05-25","r","b","91"],["92","2021-07-20","r","b","92"],["93","2021-08-31","r","b","93"],["94","2021-09-21","r","b","94"],["95","2021-10-19","r","b","95"],["96","2021-11-15","r","b","96"],["97","2022-01-04","r","b","97"],["98","2022-02-01","r","b","98"],["99","2022-03-01","r","b","99"],["100","2022-03-29","r","b","100"],["101","2022-04-26","r","b","101"],["102","2022-05-24","r","b","102"],["103","2022-06-21","r","b","103"],["104","2022-08-02","r","b","104"],["105","2022-09-02","r","b","105"],["106","2022-09-27","r","b","106"],["107","2022-10-25","r","b","107"],["108","2022-11-29","r","b","108"],["109","2023-01-10","r","b","109"],["110","2023-02-07","r","b","110"],["111","2023-03-07","r","b","111"],["112","2023-04-04","r","b","112"],["113","2023-05-02","r","b","113"],["114","2023-05-30","r","b","114"],["115","2023-07-18","r","b","115"],["116","2023-08-15","r","b","116"],["117","2023-09-12","r","b","117"],["118","2023-10-10","r","b","118"],["119","2023-10-31","r","b","119"],["120","2023-12-05","r","b","120"],["121","2024-01-23","r","b","121"],["122","2024-02-20","r","b","122"],["123","2024-03-19","r","b","123"],["124","2024-04-16","r","b","124"],["125","2024-05-14","r","b","125"],["126","2024-06-11","r","b","126"],["127","2024-07-23","r","b","127"],["128","2024-08-20","r","b","128"],["129","2024-09-17","r","b","129"],["130","2024-10-15","r","b","130"],["131","2024-11-12","r","b","131"],["132","2025-01-14","r","b","132"],["133","2025-02-04","r","b","133"],["134","2025-03-04","r","b","134"],["135","2025-04-01","r","b","135"],["136","2025-04-29","r","b","136"],["137","2025-05-27","r","b","137"],["138","2025-06-24","r","b","138"],["139","2025-08-05","r","b","139"],["140","2025-09-02","r","b","140"],["141","2025-09-30","r","b","141"],["142","2025-10-28","c","b","142"],["143","2025-12-02","b","b","143"],["144","2026-01-13","n","b","144"],["145",null,"p","b","145"]]},chrome_android:{releases:[["18","2012-06-27","r","w","535Line truncated
@@ -0,0 +1,7 @@
import * as react_jsx_runtime from 'react/jsx-runtime';
import { IconSvgProps } from './types.js';
import 'react';
declare const CopyIcon: (props: IconSvgProps) => react_jsx_runtime.JSX.Element;
export { CopyIcon };
@@ -0,0 +1,27 @@
import { OneBotAction } from '../../action/OneBotAction';
import { Static } from '@sinclair/typebox';
declare const PayloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
enable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TString]>>;
}>;
type PayloadType = Static<typeof PayloadSchema>;
declare const ReturnSchema: import("@sinclair/typebox").TNull;
type ReturnType = Static<typeof ReturnSchema>;
export default class SetGroupWholeBan extends OneBotAction<PayloadType, ReturnType> {
actionName: "set_group_whole_ban";
payloadSchema: import("@sinclair/typebox").TObject<{
group_id: import("@sinclair/typebox").TString;
enable: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TString]>>;
}>;
returnSchema: import("@sinclair/typebox").TNull;
actionSummary: string;
actionDescription: string;
actionTags: string[];
payloadExample: {
group_id: string;
enable: boolean;
};
returnExample: null;
_handle(payload: PayloadType): Promise<null>;
}
export {};
@@ -0,0 +1,5 @@
var convert = require('./convert'),
func = convert('isSymbol', require('../isSymbol'), require('./_falseOptions'));
func.placeholder = require('./placeholder');
module.exports = func;
@@ -0,0 +1,147 @@
import { Kind } from '../type/symbols/index.mjs';
import { ValueErrorType } from './errors.mjs';
/** Creates an error message using en-US as the default locale */
export function DefaultErrorFunction(error) {
switch (error.errorType) {
case ValueErrorType.ArrayContains:
return 'Expected array to contain at least one matching value';
case ValueErrorType.ArrayMaxContains:
return `Expected array to contain no more than ${error.schema.maxContains} matching values`;
case ValueErrorType.ArrayMinContains:
return `Expected array to contain at least ${error.schema.minContains} matching values`;
case ValueErrorType.ArrayMaxItems:
return `Expected array length to be less or equal to ${error.schema.maxItems}`;
case ValueErrorType.ArrayMinItems:
return `Expected array length to be greater or equal to ${error.schema.minItems}`;
case ValueErrorType.ArrayUniqueItems:
return 'Expected array elements to be unique';
case ValueErrorType.Array:
return 'Expected array';
case ValueErrorType.AsyncIterator:
return 'Expected AsyncIterator';
case ValueErrorType.BigIntExclusiveMaximum:
return `Expected bigint to be less than ${error.schema.exclusiveMaximum}`;
case ValueErrorType.BigIntExclusiveMinimum:
return `Expected bigint to be greater than ${error.schema.exclusiveMinimum}`;
case ValueErrorType.BigIntMaximum:
return `Expected bigint to be less or equal to ${error.schema.maximum}`;
case ValueErrorType.BigIntMinimum:
return `Expected bigint to be greater or equal to ${error.schema.minimum}`;
case ValueErrorType.BigIntMultipleOf:
return `Expected bigint to be a multiple of ${error.schema.multipleOf}`;
case ValueErrorType.BigInt:
return 'Expected bigint';
case ValueErrorType.Boolean:
return 'Expected boolean';
case ValueErrorType.DateExclusiveMinimumTimestamp:
return `Expected Date timestamp to be greater than ${error.schema.exclusiveMinimumTimestamp}`;
case ValueErrorType.DateExclusiveMaximumTimestamp:
return `Expected Date timestamp to be less than ${error.schema.exclusiveMaximumTimestamp}`;
case ValueErrorType.DateMinimumTimestamp:
return `Expected Date timestamp to be greater or equal to ${error.schema.minimumTimestamp}`;
case ValueErrorType.DateMaximumTimestamp:
return `Expected Date timestamp to be less or equal to ${error.schema.maximumTimestamp}`;
case ValueErrorType.DateMultipleOfTimestamp:
return `Expected Date timestamp to be a multiple of ${error.schema.multipleOfTimestamp}`;
case ValueErrorType.Date:
return 'Expected Date';
case ValueErrorType.Function:
return 'Expected function';
case ValueErrorType.IntegerExclusiveMaximum:
return `Expected integer to be less than ${error.schema.exclusiveMaximum}`;
case ValueErrorType.IntegerExclusiveMinimum:
return `Expected integer to be greater than ${error.schema.exclusiveMinimum}`;
case ValueErrorType.IntegerMaximum:
return `Expected integer to be less or equal to ${error.schema.maximum}`;
case ValueErrorType.IntegerMinimum:
return `Expected integer to be greater or equal to ${error.schema.minimum}`;
case ValueErrorType.IntegerMultipleOf:
return `Expected integer to be a multiple of ${error.schema.multipleOf}`;
case ValueErrorType.Integer:
return 'Expected integer';
case ValueErrorType.IntersectUnevaluatedProperties:
return 'Unexpected property';
case ValueErrorType.Intersect:
return 'Expected all values to match';
case ValueErrorType.Iterator:
return 'Expected Iterator';
case ValueErrorType.Literal:
return `Expected ${typeof error.schema.const === 'string' ? `'${error.schema.const}'` : error.schema.const}`;
case ValueErrorType.Never:
return 'Never';
case ValueErrorType.Not:
return 'Value should not match';
case ValueErrorType.Null:
return 'Expected null';
case ValueErrorType.NumberExclusiveMaximum:
return `Expected number to be less than ${error.schema.exclusiveMaximum}`;
case ValueErrorType.NumberExclusiveMinimum:
return `Expected number to be greater than ${error.schema.exclusiveMinimum}`;
case ValueErrorType.NumberMaximum:
return `Expected number to be less or equal to ${error.schema.maximum}`;
case ValueErrorType.NumberMinimum:
return `Expected number to be greater or equal to ${error.schema.minimum}`;
case ValueErrorType.NumberMultipleOf:
return `Expected number to be a multiple of ${error.schema.multipleOf}`;
case ValueErrorType.Number:
return 'Expected number';
case ValueErrorType.Object:
return 'Expected object';
case ValueErrorType.ObjectAdditionalProperties:
return 'Unexpected property';
case ValueErrorType.ObjectMaxProperties:
return `Expected object to have no more than ${error.schema.maxProperties} properties`;
case ValueErrorType.ObjectMinProperties:
return `Expected object to have at least ${error.schema.minProperties} properties`;
case ValueErrorType.ObjectRequiredProperty:
return 'Expected required property';
case ValueErrorType.Promise:
return 'Expected Promise';
case ValueErrorType.RegExp:
return 'Expected string to match regular expression';
case ValueErrorType.StringFormatUnknown:
return `Unknown format '${error.schema.format}'`;
case ValueErrorType.StringFormat:
return `Expected string to match '${error.schema.format}' format`;
case ValueErrorType.StringMaxLength:
return `Expected string length less or equal to ${error.schema.maxLength}`;
case ValueErrorType.StringMinLength:
return `Expected string length greater or equal to ${error.schema.minLength}`;
case ValueErrorType.StringPattern:
return `Expected string to match '${error.schema.pattern}'`;
case ValueErrorType.String:
return 'Expected string';
case ValueErrorType.Symbol:
return 'Expected symbol';
case ValueErrorType.TupleLength:
return `Expected tuple to have ${error.schema.maxItems || 0} elements`;
case ValueErrorType.Tuple:
return 'Expected tuple';
case ValueErrorType.Uint8ArrayMaxByteLength:
return `Expected byte length less or equal to ${error.schema.maxByteLength}`;
case ValueErrorType.Uint8ArrayMinByteLength:
return `Expected byte length greater or equal to ${error.schema.minByteLength}`;
case ValueErrorType.Uint8Array:
return 'Expected Uint8Array';
case ValueErrorType.Undefined:
return 'Expected undefined';
case ValueErrorType.Union:
return 'Expected union value';
case ValueErrorType.Void:
return 'Expected void';
case ValueErrorType.Kind:
return `Expected kind '${error.schema[Kind]}'`;
default:
return 'Unknown error type';
}
}
/** Manages error message providers */
let errorFunction = DefaultErrorFunction;
/** Sets the error function used to generate error messages. */
export function SetErrorFunction(callback) {
errorFunction = callback;
}
/** Gets the error function used to generate error messages */
export function GetErrorFunction() {
return errorFunction;
}
@@ -0,0 +1,54 @@
import { Plugin } from 'vite';
import { ZlibOptions, BrotliOptions } from 'zlib';
declare type Algorithm = 'gzip' | 'brotliCompress' | 'deflate' | 'deflateRaw';
declare type CompressionOptions = Partial<ZlibOptions> | Partial<BrotliOptions>;
interface VitePluginCompression {
/**
* Log compressed files and their compression ratios.
* @default: true
*/
verbose?: boolean;
/**
* Minimum file size before compression is used.
* @default 1025
*/
threshold?: number;
/**
* Filter files that do not need to be compressed
* @default /\.(js|mjs|json|css|html)$/i
*/
filter?: RegExp | ((file: string) => boolean);
/**
* Whether to enable compression
* @default: false
*/
disable?: boolean;
/**
* Compression algorithm
* @default gzip
*/
algorithm?: Algorithm;
/**
* File format after compression
* @default .gz
*/
ext?: string;
/**
* Compression Options
*/
compressionOptions?: CompressionOptions;
/**
* Delete the corresponding source file after compressing the file
* @default: false
*/
deleteOriginFile?: boolean;
/**
* success callback after completed
*/
success?: () => void;
}
declare function export_default(options?: VitePluginCompression): Plugin;
export { export_default as default };
@@ -0,0 +1 @@
{"version":3,"names":["_deepArray","require","Plugin","constructor","plugin","options","key","externalDependencies","finalize","manipulateOptions","post","pre","visitor","parserOverride","generatorOverride","name","exports","default"],"sources":["../../src/config/plugin.ts"],"sourcesContent":["import { finalize } from \"./helpers/deep-array.ts\";\nimport type { ReadonlyDeepArray } from \"./helpers/deep-array.ts\";\nimport type { PluginObject } from \"./validation/plugins.ts\";\n\nexport default class Plugin {\n key: string | undefined | null;\n manipulateOptions?: PluginObject[\"manipulateOptions\"];\n post?: PluginObject[\"post\"];\n pre?: PluginObject[\"pre\"];\n visitor: PluginObject[\"visitor\"];\n\n parserOverride?: PluginObject[\"parserOverride\"];\n generatorOverride?: PluginObject[\"generatorOverride\"];\n\n options: object;\n\n externalDependencies: ReadonlyDeepArray<string>;\n\n constructor(\n plugin: PluginObject,\n options: object,\n key?: string,\n externalDependencies: ReadonlyDeepArray<string> = finalize([]),\n ) {\n this.key = plugin.name || key;\n\n this.manipulateOptions = plugin.manipulateOptions;\n this.post = plugin.post;\n this.pre = plugin.pre;\n this.visitor = plugin.visitor || {};\n this.parserOverride = plugin.parserOverride;\n this.generatorOverride = plugin.generatorOverride;\n\n this.options = options;\n this.externalDependencies = externalDependencies;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAIe,MAAMC,MAAM,CAAC;EAc1BC,WAAWA,CACTC,MAAoB,EACpBC,OAAe,EACfC,GAAY,EACZC,oBAA+C,GAAG,IAAAC,mBAAQ,EAAC,EAAE,CAAC,EAC9D;IAAA,KAlBFF,GAAG;IAAA,KACHG,iBAAiB;IAAA,KACjBC,IAAI;IAAA,KACJC,GAAG;IAAA,KACHC,OAAO;IAAA,KAEPC,cAAc;IAAA,KACdC,iBAAiB;IAAA,KAEjBT,OAAO;IAAA,KAEPE,oBAAoB;IAQlB,IAAI,CAACD,GAAG,GAAGF,MAAM,CAACW,IAAI,IAAIT,GAAG;IAE7B,IAAI,CAACG,iBAAiB,GAAGL,MAAM,CAACK,iBAAiB;IACjD,IAAI,CAACC,IAAI,GAAGN,MAAM,CAACM,IAAI;IACvB,IAAI,CAACC,GAAG,GAAGP,MAAM,CAACO,GAAG;IACrB,IAAI,CAACC,OAAO,GAAGR,MAAM,CAACQ,OAAO,IAAI,CAAC,CAAC;IACnC,IAAI,CAACC,cAAc,GAAGT,MAAM,CAACS,cAAc;IAC3C,IAAI,CAACC,iBAAiB,GAAGV,MAAM,CAACU,iBAAiB;IAEjD,IAAI,CAACT,OAAO,GAAGA,OAAO;IACtB,IAAI,CAACE,oBAAoB,GAAGA,oBAAoB;EAClD;AACF;AAACS,OAAA,CAAAC,OAAA,GAAAf,MAAA;AAAA","ignoreList":[]}
@@ -0,0 +1,36 @@
import {
tv
} from "./chunk-UWE6H66T.mjs";
// src/components/scroll-shadow.ts
var verticalShadow = [
"data-[top-scroll=true]:[mask-image:linear-gradient(0deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]",
"data-[bottom-scroll=true]:[mask-image:linear-gradient(180deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]",
"data-[top-bottom-scroll=true]:[mask-image:linear-gradient(#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"
];
var horizontalShadow = [
"data-[left-scroll=true]:[mask-image:linear-gradient(270deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]",
"data-[right-scroll=true]:[mask-image:linear-gradient(90deg,#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]",
"data-[left-right-scroll=true]:[mask-image:linear-gradient(to_right,#000,#000,transparent_0,#000_var(--scroll-shadow-size),#000_calc(100%_-_var(--scroll-shadow-size)),transparent)]"
];
var scrollShadow = tv({
base: [],
variants: {
orientation: {
vertical: ["overflow-y-auto", ...verticalShadow],
horizontal: ["overflow-x-auto", ...horizontalShadow]
},
hideScrollBar: {
true: "scrollbar-hide",
false: ""
}
},
defaultVariants: {
orientation: "vertical",
hideScrollBar: false
}
});
export {
scrollShadow
};
@@ -0,0 +1,169 @@
import {CalendarDate as $35ea8db9cb2ccb90$export$99faa760c7908e4f, CalendarDateTime as $35ea8db9cb2ccb90$export$ca871e8dbb80966f, Time as $35ea8db9cb2ccb90$export$680ea196effce5f, ZonedDateTime as $35ea8db9cb2ccb90$export$d3b7288e7994edea} from "./CalendarDate.module.js";
import {epochFromDate as $11d87f3f76e88657$export$bd4fb2bc8bb06fb, fromAbsolute as $11d87f3f76e88657$export$1b96692a1ba042ac, possibleAbsolutes as $11d87f3f76e88657$export$136f38efe7caf549, toAbsolute as $11d87f3f76e88657$export$5107c82f94518f5c, toCalendar as $11d87f3f76e88657$export$b4a036af3fc0b032, toCalendarDateTime as $11d87f3f76e88657$export$b21e0b124e224484, toTimeZone as $11d87f3f76e88657$export$538b00033cc11c75} from "./conversion.module.js";
import {getLocalTimeZone as $14e0f24ef4ac5c92$export$aa8b41735afcabd2} from "./queries.module.js";
import {GregorianCalendar as $3b62074eb05584b2$export$80ee6245ec4f29ec} from "./GregorianCalendar.module.js";
/*
* 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.
*/
const $fae977aafc393c5c$var$TIME_RE = /^(\d{2})(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
const $fae977aafc393c5c$var$DATE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/;
const $fae977aafc393c5c$var$DATE_TIME_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/;
const $fae977aafc393c5c$var$ZONED_DATE_TIME_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/;
const $fae977aafc393c5c$var$ABSOLUTE_RE = /^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;
const $fae977aafc393c5c$var$DATE_TIME_DURATION_RE = /^((?<negative>-)|\+)?P((?<years>\d*)Y)?((?<months>\d*)M)?((?<weeks>\d*)W)?((?<days>\d*)D)?((?<time>T)((?<hours>\d*[.,]?\d{1,9})H)?((?<minutes>\d*[.,]?\d{1,9})M)?((?<seconds>\d*[.,]?\d{1,9})S)?)?$/;
const $fae977aafc393c5c$var$requiredDurationTimeGroups = [
'hours',
'minutes',
'seconds'
];
const $fae977aafc393c5c$var$requiredDurationGroups = [
'years',
'months',
'weeks',
'days',
...$fae977aafc393c5c$var$requiredDurationTimeGroups
];
function $fae977aafc393c5c$export$c9698ec7f05a07e1(value) {
let m = value.match($fae977aafc393c5c$var$TIME_RE);
if (!m) throw new Error('Invalid ISO 8601 time string: ' + value);
return new (0, $35ea8db9cb2ccb90$export$680ea196effce5f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 23), m[2] ? $fae977aafc393c5c$var$parseNumber(m[2], 0, 59) : 0, m[3] ? $fae977aafc393c5c$var$parseNumber(m[3], 0, 59) : 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, Infinity) * 1000 : 0);
}
function $fae977aafc393c5c$export$6b862160d295c8e(value) {
let m = value.match($fae977aafc393c5c$var$DATE_RE);
if (!m) throw new Error('Invalid ISO 8601 date string: ' + value);
let date = new (0, $35ea8db9cb2ccb90$export$99faa760c7908e4f)($fae977aafc393c5c$var$parseNumber(m[1], 0, 9999), $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1);
date.day = $fae977aafc393c5c$var$parseNumber(m[3], 1, date.calendar.getDaysInMonth(date));
return date;
}
function $fae977aafc393c5c$export$588937bcd60ade55(value) {
let m = value.match($fae977aafc393c5c$var$DATE_TIME_RE);
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);
let year = $fae977aafc393c5c$var$parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date = new (0, $35ea8db9cb2ccb90$export$ca871e8dbb80966f)(era, year < 1 ? -year + 1 : year, $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);
date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
return date;
}
function $fae977aafc393c5c$export$fd7893f06e92a6a4(value, disambiguation) {
let m = value.match($fae977aafc393c5c$var$ZONED_DATE_TIME_RE);
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);
let year = $fae977aafc393c5c$var$parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date = new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)(era, year < 1 ? -year + 1 : year, $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, m[11], 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);
date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
let plainDateTime = (0, $11d87f3f76e88657$export$b21e0b124e224484)(date);
let ms;
if (m[8]) {
let hourOffset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23);
var _m_, _m_1;
date.offset = Math.sign(hourOffset) * (Math.abs(hourOffset) * 3600000 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : '0', 0, 59) * 60000 + $fae977aafc393c5c$var$parseNumber((_m_1 = m[10]) !== null && _m_1 !== void 0 ? _m_1 : '0', 0, 59) * 1000);
ms = (0, $11d87f3f76e88657$export$bd4fb2bc8bb06fb)(date) - date.offset;
// Validate offset against parsed date.
let absolutes = (0, $11d87f3f76e88657$export$136f38efe7caf549)(plainDateTime, date.timeZone);
if (!absolutes.includes(ms)) throw new Error(`Offset ${$fae977aafc393c5c$var$offsetToString(date.offset)} is invalid for ${$fae977aafc393c5c$export$4223de14708adc63(date)} in ${date.timeZone}`);
} else // Convert to absolute and back to fix invalid times due to DST.
ms = (0, $11d87f3f76e88657$export$5107c82f94518f5c)((0, $11d87f3f76e88657$export$b21e0b124e224484)(plainDateTime), date.timeZone, disambiguation);
return (0, $11d87f3f76e88657$export$1b96692a1ba042ac)(ms, date.timeZone);
}
function $fae977aafc393c5c$export$5adfdab05168c219(value, timeZone) {
let m = value.match($fae977aafc393c5c$var$ABSOLUTE_RE);
if (!m) throw new Error('Invalid ISO 8601 date time string: ' + value);
let year = $fae977aafc393c5c$var$parseNumber(m[1], -9999, 9999);
let era = year < 1 ? 'BC' : 'AD';
let date = new (0, $35ea8db9cb2ccb90$export$d3b7288e7994edea)(era, year < 1 ? -year + 1 : year, $fae977aafc393c5c$var$parseNumber(m[2], 1, 12), 1, timeZone, 0, m[4] ? $fae977aafc393c5c$var$parseNumber(m[4], 0, 23) : 0, m[5] ? $fae977aafc393c5c$var$parseNumber(m[5], 0, 59) : 0, m[6] ? $fae977aafc393c5c$var$parseNumber(m[6], 0, 59) : 0, m[7] ? $fae977aafc393c5c$var$parseNumber(m[7], 0, Infinity) * 1000 : 0);
date.day = $fae977aafc393c5c$var$parseNumber(m[3], 0, date.calendar.getDaysInMonth(date));
var _m_;
if (m[8]) date.offset = $fae977aafc393c5c$var$parseNumber(m[8], -23, 23) * 3600000 + $fae977aafc393c5c$var$parseNumber((_m_ = m[9]) !== null && _m_ !== void 0 ? _m_ : '0', 0, 59) * 60000;
return (0, $11d87f3f76e88657$export$538b00033cc11c75)(date, timeZone);
}
function $fae977aafc393c5c$export$8e384432362ed0f0(value) {
return $fae977aafc393c5c$export$5adfdab05168c219(value, (0, $14e0f24ef4ac5c92$export$aa8b41735afcabd2)());
}
function $fae977aafc393c5c$var$parseNumber(value, min, max) {
let val = Number(value);
if (val < min || val > max) throw new RangeError(`Value out of range: ${min} <= ${val} <= ${max}`);
return val;
}
function $fae977aafc393c5c$export$f59dee82248f5ad4(time) {
return `${String(time.hour).padStart(2, '0')}:${String(time.minute).padStart(2, '0')}:${String(time.second).padStart(2, '0')}${time.millisecond ? String(time.millisecond / 1000).slice(1) : ''}`;
}
function $fae977aafc393c5c$export$60dfd74aa96791bd(date) {
let gregorianDate = (0, $11d87f3f76e88657$export$b4a036af3fc0b032)(date, new (0, $3b62074eb05584b2$export$80ee6245ec4f29ec)());
let year;
if (gregorianDate.era === 'BC') year = gregorianDate.year === 1 ? '0000' : '-' + String(Math.abs(1 - gregorianDate.year)).padStart(6, '00');
else year = String(gregorianDate.year).padStart(4, '0');
return `${year}-${String(gregorianDate.month).padStart(2, '0')}-${String(gregorianDate.day).padStart(2, '0')}`;
}
function $fae977aafc393c5c$export$4223de14708adc63(date) {
// @ts-ignore
return `${$fae977aafc393c5c$export$60dfd74aa96791bd(date)}T${$fae977aafc393c5c$export$f59dee82248f5ad4(date)}`;
}
function $fae977aafc393c5c$var$offsetToString(offset) {
let sign = Math.sign(offset) < 0 ? '-' : '+';
offset = Math.abs(offset);
let offsetHours = Math.floor(offset / 3600000);
let offsetMinutes = Math.floor(offset % 3600000 / 60000);
let offsetSeconds = Math.floor(offset % 3600000 % 60000 / 1000);
let stringOffset = `${sign}${String(offsetHours).padStart(2, '0')}:${String(offsetMinutes).padStart(2, '0')}`;
if (offsetSeconds !== 0) stringOffset += `:${String(offsetSeconds).padStart(2, '0')}`;
return stringOffset;
}
function $fae977aafc393c5c$export$bf79f1ebf4b18792(date) {
return `${$fae977aafc393c5c$export$4223de14708adc63(date)}${$fae977aafc393c5c$var$offsetToString(date.offset)}[${date.timeZone}]`;
}
function $fae977aafc393c5c$export$ecae829bb3747ea6(value) {
var _match_groups, _match_groups1, _match_groups2, _match_groups3, _match_groups4, _match_groups5, _match_groups6, _match_groups7, _match_groups8;
const match = value.match($fae977aafc393c5c$var$DATE_TIME_DURATION_RE);
if (!match) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
const parseDurationGroup = (group, isNegative)=>{
if (!group) return 0;
try {
const sign = isNegative ? -1 : 1;
return sign * Number(group.replace(',', '.'));
} catch {
throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
}
};
const isNegative = !!((_match_groups = match.groups) === null || _match_groups === void 0 ? void 0 : _match_groups.negative);
const hasRequiredGroups = $fae977aafc393c5c$var$requiredDurationGroups.some((group)=>{
var _match_groups;
return (_match_groups = match.groups) === null || _match_groups === void 0 ? void 0 : _match_groups[group];
});
if (!hasRequiredGroups) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
const durationStringIncludesTime = (_match_groups1 = match.groups) === null || _match_groups1 === void 0 ? void 0 : _match_groups1.time;
if (durationStringIncludesTime) {
const hasRequiredDurationTimeGroups = $fae977aafc393c5c$var$requiredDurationTimeGroups.some((group)=>{
var _match_groups;
return (_match_groups = match.groups) === null || _match_groups === void 0 ? void 0 : _match_groups[group];
});
if (!hasRequiredDurationTimeGroups) throw new Error(`Invalid ISO 8601 Duration string: ${value}`);
}
const duration = {
years: parseDurationGroup((_match_groups2 = match.groups) === null || _match_groups2 === void 0 ? void 0 : _match_groups2.years, isNegative),
months: parseDurationGroup((_match_groups3 = match.groups) === null || _match_groups3 === void 0 ? void 0 : _match_groups3.months, isNegative),
weeks: parseDurationGroup((_match_groups4 = match.groups) === null || _match_groups4 === void 0 ? void 0 : _match_groups4.weeks, isNegative),
days: parseDurationGroup((_match_groups5 = match.groups) === null || _match_groups5 === void 0 ? void 0 : _match_groups5.days, isNegative),
hours: parseDurationGroup((_match_groups6 = match.groups) === null || _match_groups6 === void 0 ? void 0 : _match_groups6.hours, isNegative),
minutes: parseDurationGroup((_match_groups7 = match.groups) === null || _match_groups7 === void 0 ? void 0 : _match_groups7.minutes, isNegative),
seconds: parseDurationGroup((_match_groups8 = match.groups) === null || _match_groups8 === void 0 ? void 0 : _match_groups8.seconds, isNegative)
};
if (duration.hours !== undefined && duration.hours % 1 !== 0 && (duration.minutes || duration.seconds)) throw new Error(`Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`);
if (duration.minutes !== undefined && duration.minutes % 1 !== 0 && duration.seconds) throw new Error(`Invalid ISO 8601 Duration string: ${value} - only the smallest unit can be fractional`);
return duration;
}
export {$fae977aafc393c5c$export$c9698ec7f05a07e1 as parseTime, $fae977aafc393c5c$export$6b862160d295c8e as parseDate, $fae977aafc393c5c$export$588937bcd60ade55 as parseDateTime, $fae977aafc393c5c$export$fd7893f06e92a6a4 as parseZonedDateTime, $fae977aafc393c5c$export$4223de14708adc63 as dateTimeToString, $fae977aafc393c5c$export$5adfdab05168c219 as parseAbsolute, $fae977aafc393c5c$export$8e384432362ed0f0 as parseAbsoluteToLocal, $fae977aafc393c5c$export$f59dee82248f5ad4 as timeToString, $fae977aafc393c5c$export$60dfd74aa96791bd as dateToString, $fae977aafc393c5c$export$bf79f1ebf4b18792 as zonedDateTimeToString, $fae977aafc393c5c$export$ecae829bb3747ea6 as parseDuration};
//# sourceMappingURL=string.module.js.map
@@ -0,0 +1,4 @@
import type { ReverseSegment, SourceMapSegment } from './sourcemap-segment.mts';
export type Source = ReverseSegment[][];
export default function buildBySources(decoded: readonly SourceMapSegment[][], memos: unknown[]): Source[];
//# sourceMappingURL=by-source.d.ts.map
@@ -0,0 +1,120 @@
/**
* @fileoverview Define 2 token factories; forward and backward.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const BackwardTokenCommentCursor = require("./backward-token-comment-cursor");
const BackwardTokenCursor = require("./backward-token-cursor");
const FilterCursor = require("./filter-cursor");
const ForwardTokenCommentCursor = require("./forward-token-comment-cursor");
const ForwardTokenCursor = require("./forward-token-cursor");
const LimitCursor = require("./limit-cursor");
const SkipCursor = require("./skip-cursor");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* The cursor factory.
* @private
*/
class CursorFactory {
/**
* Initializes this cursor.
* @param {Function} TokenCursor The class of the cursor which iterates tokens only.
* @param {Function} TokenCommentCursor The class of the cursor which iterates the mix of tokens and comments.
*/
constructor(TokenCursor, TokenCommentCursor) {
this.TokenCursor = TokenCursor;
this.TokenCommentCursor = TokenCommentCursor;
}
/**
* Creates a base cursor instance that can be decorated by createCursor.
* @param {Token[]} tokens The array of tokens.
* @param {Comment[]} comments The array of comments.
* @param {Object} indexMap The map from locations to indices in `tokens`.
* @param {number} startLoc The start location of the iteration range.
* @param {number} endLoc The end location of the iteration range.
* @param {boolean} includeComments The flag to iterate comments as well.
* @returns {Cursor} The created base cursor.
*/
createBaseCursor(
tokens,
comments,
indexMap,
startLoc,
endLoc,
includeComments,
) {
const Cursor = includeComments
? this.TokenCommentCursor
: this.TokenCursor;
return new Cursor(tokens, comments, indexMap, startLoc, endLoc);
}
/**
* Creates a cursor that iterates tokens with normalized options.
* @param {Token[]} tokens The array of tokens.
* @param {Comment[]} comments The array of comments.
* @param {Object} indexMap The map from locations to indices in `tokens`.
* @param {number} startLoc The start location of the iteration range.
* @param {number} endLoc The end location of the iteration range.
* @param {boolean} includeComments The flag to iterate comments as well.
* @param {Function|null} filter The predicate function to choose tokens.
* @param {number} skip The count of tokens the cursor skips.
* @param {number} count The maximum count of tokens the cursor iterates. Zero is no iteration for backward compatibility.
* @returns {Cursor} The created cursor.
*/
createCursor(
tokens,
comments,
indexMap,
startLoc,
endLoc,
includeComments,
filter,
skip,
count,
) {
let cursor = this.createBaseCursor(
tokens,
comments,
indexMap,
startLoc,
endLoc,
includeComments,
);
if (filter) {
cursor = new FilterCursor(cursor, filter);
}
if (skip >= 1) {
cursor = new SkipCursor(cursor, skip);
}
if (count >= 0) {
cursor = new LimitCursor(cursor, count);
}
return cursor;
}
}
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
module.exports = {
forward: new CursorFactory(ForwardTokenCursor, ForwardTokenCommentCursor),
backward: new CursorFactory(
BackwardTokenCursor,
BackwardTokenCommentCursor,
),
};
@@ -0,0 +1 @@
{"version":3,"file":"Either.d.ts","sourceRoot":"","sources":["../../../../src/either/models/Either.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,CAAC,KAAK,EAAE,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAEhE,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,IAAI,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAC5C,OAAO,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,WAAW,KAAK,CAAC,CAAC,CAAE,SAAQ,UAAU,CAAC,CAAC,CAAC;IAC7C,OAAO,EAAE,IAAI,CAAC;CACf"}
@@ -0,0 +1,41 @@
function stringifyNode(node, custom) {
var type = node.type
var value = node.value
var buf
var customResult
if (custom && (customResult = custom(node)) !== undefined) {
return customResult
} else if (type === 'word' || type === 'space') {
return value
} else if (type === 'string') {
buf = node.quote || ''
return buf + value + (node.unclosed ? '' : buf)
} else if (type === 'comment') {
return '/*' + value + (node.unclosed ? '' : '*/')
} else if (type === 'div') {
return (node.before || '') + value + (node.after || '')
} else if (Array.isArray(node.nodes)) {
buf = stringify(node.nodes, custom)
if (type !== 'function') {
return buf
}
return value + '(' + (node.before || '') + buf + (node.after || '') + (node.unclosed ? '' : ')')
}
return value
}
function stringify(nodes, custom) {
var result, i
if (Array.isArray(nodes)) {
result = ''
for (i = nodes.length - 1; ~i; i -= 1) {
result = stringifyNode(nodes[i], custom) + result
}
return result
}
return stringifyNode(nodes, custom)
}
module.exports = stringify
@@ -0,0 +1,24 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2018 = void 0;
const es2017_1 = require("./es2017");
const es2018_asyncgenerator_1 = require("./es2018.asyncgenerator");
const es2018_asynciterable_1 = require("./es2018.asynciterable");
const es2018_intl_1 = require("./es2018.intl");
const es2018_promise_1 = require("./es2018.promise");
const es2018_regexp_1 = require("./es2018.regexp");
exports.es2018 = {
libs: [
es2017_1.es2017,
es2018_asynciterable_1.es2018_asynciterable,
es2018_asyncgenerator_1.es2018_asyncgenerator,
es2018_promise_1.es2018_promise,
es2018_regexp_1.es2018_regexp,
es2018_intl_1.es2018_intl,
],
variables: [],
};
@@ -0,0 +1,18 @@
'use strict';
var define = require('define-properties');
var getPolyfill = require('./polyfill');
var $IteratorPrototype = require('../Iterator.prototype/implementation');
module.exports = function shimIteratorPrototypeToArray() {
var polyfill = getPolyfill();
define(
$IteratorPrototype,
{ toArray: polyfill },
{ toArray: function () { return $IteratorPrototype.toArray !== polyfill; } }
);
return polyfill;
};
@@ -0,0 +1,14 @@
Copyright (c) 2017, Rebecca Turner <me@re-becca.org>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -0,0 +1,9 @@
import Decimal from 'decimal.js';
import { RawNumberFormatResult, UnsignedRoundingModeType } from '../types/number';
/**
* https://tc39.es/ecma402/#sec-torawprecision
* @param x a finite non-negative Number or BigInt
* @param minPrecision an integer between 1 and 21
* @param maxPrecision an integer between 1 and 21
*/
export declare function ToRawPrecision(x: Decimal, minPrecision: number, maxPrecision: number, unsignedRoundingMode: UnsignedRoundingModeType): RawNumberFormatResult;
@@ -0,0 +1 @@
{"version":3,"file":"Op.js","sourceRoot":"","sources":["../src/Op.ts"],"names":[],"mappings":";;AAWA,IAAU,EAAE,CAYX;AAZD,WAAU,EAAE;IACV,SAAgB,MAAM,CAAC,EAAM;QAC3B,IAAI,OAAO,EAAE,CAAC,MAAM,KAAK,QAAQ,EAAE;YACjC,OAAO,EAAE,CAAC,MAAM,CAAC;SAClB;aAAM,IAAI,OAAO,EAAE,CAAC,MAAM,KAAK,QAAQ,EAAE;YACxC,OAAO,EAAE,CAAC,MAAM,CAAC;SAClB;aAAM,IAAI,OAAO,EAAE,CAAC,MAAM,KAAK,QAAQ,IAAI,EAAE,CAAC,MAAM,KAAK,IAAI,EAAE;YAC9D,OAAO,CAAC,CAAC;SACV;aAAM;YACL,OAAO,OAAO,EAAE,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;SAC7D;IACH,CAAC;IAVe,SAAM,SAUrB,CAAA;AACH,CAAC,EAZS,EAAE,KAAF,EAAE,QAYX;AAED,kBAAe,EAAE,CAAC"}
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../src/util/location.ts","../src/parse-error/module-errors.ts","../src/parse-error/to-node-description.ts","../src/parse-error/standard-errors.ts","../src/parse-error/strict-mode-errors.ts","../src/parse-error/parse-expression-errors.ts","../src/parse-error/pipeline-operator-errors.ts","../src/parse-error.ts","../src/options.ts","../src/plugins/estree.ts","../src/tokenizer/context.ts","../src/tokenizer/types.ts","../../babel-helper-validator-identifier/src/identifier.ts","../../babel-helper-validator-identifier/src/keyword.ts","../src/util/identifier.ts","../src/util/scope.ts","../src/plugins/flow/scope.ts","../src/plugins/flow/index.ts","../src/plugins/jsx/xhtml.ts","../src/util/whitespace.ts","../src/plugins/jsx/index.ts","../src/plugins/typescript/scope.ts","../src/util/production-parameter.ts","../src/parser/base.ts","../src/parser/comments.ts","../src/tokenizer/state.ts","../../babel-helper-string-parser/src/index.ts","../src/tokenizer/index.ts","../src/util/class-scope.ts","../src/util/expression-scope.ts","../src/parser/util.ts","../src/parser/node.ts","../src/parser/lval.ts","../src/plugins/typescript/index.ts","../src/plugins/placeholders.ts","../src/plugins/v8intrinsic.ts","../src/plugin-utils.ts","../src/parser/expression.ts","../src/parser/statement.ts","../src/parser/index.ts","../src/index.ts"],"sourcesContent":["export type Pos = {\n start: number;\n};\n\n// These are used when `options.locations` is on, for the\n// `startLoc` and `endLoc` properties.\n\nexport class Position {\n line: number;\n column: number;\n index: number;\n\n constructor(line: number, col: number, index: number) {\n this.line = line;\n this.column = col;\n this.index = index;\n }\n}\n\nexport class SourceLocation {\n start: Position;\n end: Position;\n filename: string | undefined;\n identifierName: string | undefined | null;\n\n constructor(start: Position, end?: Position) {\n this.start = start;\n // (may start as null, but initialized later)\n this.end = end!;\n }\n}\n\n/**\n * creates a new position with a non-zero column offset from the given position.\n * This function should be only be used when we create AST node out of the token\n * boundaries, such as TemplateElement ends before tt.templateNonTail. This\n * function does not skip whitespaces.\n */\nexport function createPositionWithColumnOffset(\n position: Position,\n columnOffset: number,\n) {\n const { line, column, index } = position;\n return new Position(line, column + columnOffset, index + columnOffset);\n}\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\n\nconst code = \"BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED\";\n\nexport default {\n ImportMetaOutsideModule: {\n message: `import.meta may appear only with 'sourceType: \"module\"'`,\n code,\n },\n ImportOutsideModule: {\n message: `'import' and 'export' may appear only with 'sourceType: \"module\"'`,\n code,\n },\n} satisfies ParseErrorTemplates;\n","const NodeDescriptions = {\n ArrayPattern: \"array destructuring pattern\",\n AssignmentExpression: \"assignment expression\",\n AssignmentPattern: \"assignment expression\",\n ArrowFunctionExpression: \"arrow function expression\",\n ConditionalExpression: \"conditional expression\",\n CatchClause: \"catch clause\",\n ForOfStatement: \"for-of statement\",\n ForInStatement: \"for-in statement\",\n ForStatement: \"for-loop\",\n FormalParameters: \"function parameter list\",\n Identifier: \"identifier\",\n ImportSpecifier: \"import specifier\",\n ImportDefaultSpecifier: \"import default specifier\",\n ImportNamespaceSpecifier: \"import namespace specifier\",\n ObjectPattern: \"object destructuring pattern\",\n ParenthesizedExpression: \"parenthesized expression\",\n RestElement: \"rest element\",\n UpdateExpression: {\n true: \"prefix operation\",\n false: \"postfix operation\",\n },\n VariableDeclarator: \"variable declaration\",\n YieldExpression: \"yield expression\",\n};\n\ntype NodeTypesWithDescriptions = keyof Omit<\n typeof NodeDescriptions,\n \"UpdateExpression\"\n>;\n\ntype NodeWithDescription =\n | {\n type: \"UpdateExpression\";\n prefix: boolean;\n }\n | {\n type: NodeTypesWithDescriptions;\n };\n\nconst toNodeDescription = (node: NodeWithDescription) =>\n node.type === \"UpdateExpression\"\n ? NodeDescriptions.UpdateExpression[`${node.prefix}`]\n : NodeDescriptions[node.type];\n\nexport default toNodeDescription;\n","import type { ParseErrorTemplates } from \"../parse-error.ts\";\nimport toNodeDescription from \"./to-node-description.ts\";\n\nexport type LValAncestor =\n | { type: \"UpdateExpression\"; prefix: boolean }\n | {\n type:\n | \"ArrayPattern\"\n | \"AssignmentExpression\"\n | \"CatchClause\"\n | \"ForOfStatement\"\n | \"FormalParameters\"\n | \"ForInStatement\"\n | \"ForStatement\"\n | \"ImportSpecifier\Line truncated
@@ -0,0 +1,7 @@
"use strict";
/**
* Copyright (c) 2016, Daniel Imms (MIT License).
* Copyright (c) 2018, Microsoft Corporation (MIT License).
*/
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
{"name":"safe-array-concat","version":"1.1.3","requiresBuild":false,"files":{".eslintrc":{"checkedAt":1794532097293,"integrity":"sha512-Zqu3KaP2qZFZz5Ab2VjMGWOxZA63BlwTv7Gw7QFIJ7VQCJPfUyxHeFZUmmucVKUtfaTUXfr+8idAEOWgBmh/Dw==","mode":420,"size":201},".nycrc":{"checkedAt":1794532097293,"integrity":"sha512-42sgwWzusJB1Dzhl78jX/Zg65Oi0HDDMOGXS/Uklv1kCYn4fHtRsD/JFPwdu+d40vome9XdUspzRWEQAcTGEeQ==","mode":420,"size":216},"LICENSE":{"checkedAt":1794532097293,"integrity":"sha512-9CCWKHOyAcobQT+fPtmiq2F2+xkrIWD+4MQshpA5agEGKdLA+jCQ3LpOf7KqU2TmrzLa8AoocMeOs+/AxmpiBQ==","mode":420,"size":1071},"index.js":{"checkedAt":1794532097293,"integrity":"sha512-M0Wd0I0rWKXWhB6ExV8jHMtlPU43oE9bNhnexluljPWBtZXLumJUREt8WjaMiHRbbpxFkKRt8Ir2hUNkkxhiug==","mode":420,"size":1877},"test/index.js":{"checkedAt":1794532097294,"integrity":"sha512-4eeKIDuNKuwWLaSxugaQ+x3skblCWKa10PW1k6l3v/yJYXAXdDjCtrqbap19+y9u1o8qcr5wh089ldD8ZtF4dg==","mode":420,"size":3090},"package.json":{"checkedAt":1794532097294,"integrity":"sha512-USOyc93iyWX29BT9b5Traxx+lXFXcuei8WoK9Wktjquw9OW+Enb55MKyVXNUNyDv9Yv7n3PJYFeN27uxcwmk/A==","mode":420,"size":2427},"tsconfig.json":{"checkedAt":1794532097294,"integrity":"sha512-fa2Zk3IIbRQSpZn45qY5IHkID0oGejF1G9bQ5kVV/m5VmvgS1ODCQ6zlums9zI3CsLX46x60x+jQb5w08gZj3w==","mode":420,"size":125},"CHANGELOG.md":{"checkedAt":1794532097294,"integrity":"sha512-cWB+NQC4AEFs9evoOgFeJNQVDQ+F3et5iaL9D41TQxRvPPNY6cY4VvU6kFcTUKQ2b/WJXBW6zdPD7D8c8vi4BA==","mode":420,"size":5306},"README.md":{"checkedAt":1794532097294,"integrity":"sha512-gLH6bJkUsS9p764/WykIwuICG4zHmkSKRCoVTSycMabReex9uj8YZK1vHfWKhZpYgjOdasn0DXSfKi2J3wDtwQ==","mode":420,"size":2585},"index.d.ts":{"checkedAt":1794532097294,"integrity":"sha512-DhqMkcgF7I48B4BnUQuul+ww34Co9yYtuXItf+aSMw9VGSiIT423p68BbmfTX7IHJHciXfjSn4frZg1lxxJRCg==","mode":420,"size":117},".github/FUNDING.yml":{"checkedAt":1794532097294,"integrity":"sha512-aIU7Fd2SZpLW6u4JKii1hFkjUHMI1sFvD3B8moNT1tXqZkU0LLI06IVJ2y/ACYd0BDfvHnCp3h7qsIOaLz+VOw==","mode":420,"size":588}}}
@@ -0,0 +1,70 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { checkPublish, messages } = require("../util/check-publish")
const getAllowModules = require("../util/get-allow-modules")
const getConvertPath = require("../util/get-convert-path")
const getResolvePaths = require("../util/get-resolve-paths")
const getResolverConfig = require("../util/get-resolver-config")
const getTryExtensions = require("../util/get-try-extensions")
const visitImport = require("../util/visit-import")
/**
* @typedef {[
* {
* allowModules?: import('../util/get-allow-modules').AllowModules;
* convertPath?: import('../util/get-convert-path').ConvertPath;
* resolvePaths?: import('../util/get-resolve-paths').ResolvePaths;
* resolverConfig?: import('../util/get-resolver-config').ResolverConfig;
* tryExtensions?: import('../util/get-try-extensions').TryExtensions;
* ignoreTypeImport?: boolean;
* ignorePrivate?: boolean;
* }?
* ]} RuleOptions
*/
/** @type {import('./rule-module').RuleModule<{RuleOptions: RuleOptions}>} */
module.exports = {
meta: {
docs: {
description:
"disallow `import` declarations which import private modules",
recommended: true,
url: "https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-import.md",
},
type: "problem",
fixable: null,
schema: [
{
type: "object",
properties: {
allowModules: getAllowModules.schema,
convertPath: getConvertPath.schema,
resolvePaths: getResolvePaths.schema,
resolverConfig: getResolverConfig.schema,
tryExtensions: getTryExtensions.schema,
ignoreTypeImport: { type: "boolean", default: false },
ignorePrivate: { type: "boolean", default: true },
},
additionalProperties: false,
},
],
messages,
},
create(context) {
const filePath = context.filename ?? context.getFilename()
const options = context.options[0] || {}
const ignoreTypeImport = options.ignoreTypeImport ?? false
const ignorePrivate = options.ignorePrivate ?? true
if (filePath === "<input>") {
return {}
}
return visitImport(context, { ignoreTypeImport }, targets => {
checkPublish(context, filePath, targets, { ignorePrivate })
})
},
}
@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
function isLength(value) {
return Number.isInteger(value) && value > -1;
}
exports.isLength = isLength;
@@ -0,0 +1,719 @@
export default `flf2a$ 7 7 26 32 3
Alligator by Simon Bradley <syb3@aber.ac.uk>
17th June, 1994
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
:::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
$ $ @
###$ @@
::: :::$@
:+: :+:$ @
$ $ @
$ $ @
$ $ @
$ $ @
$ $ @@
::: :::$ @
:+: :+:$ @
+:+:+:+:+:+:+:+$@
+#+ +:+$ @
+#+#+#+#+#+#+#+$ @
#+# #+#$ @
### ###$ @@
:::$ @
:+:+:+:+:$@
+:+ +:+$ @
+#++:++#+$ @
+#+ +#+$ @
#+#+#+#+#$ @
###$ @@
::: :::$ @
:+: :+:$ @
+:+$ @
+#+$ @
+#+$ @
#+# #+#$@
### ###$ @@
:::::::$ @
:+: :+:$ @
+:+ +:+$ @
+#++: ++#$@
+#+ +#+#+#$ @
#+# #+#+$ @
##########$ @@
:::$@
:+$ @
$$ @
$$ @
$$ @
$$ @
$$ @@
:::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
###$ @@
:::$@
:+:$@
+:+$@
+#+$ @
+#+$ @
#+#$ @
###$ @@
$ $ $ $@
:+: :+:$@
+:+ +:+$ @
+#++:++#++:++$ @
+#+ +#+$ @
#+# #+#$ @
$ $ $ $ @@
$ $ @
:+:$ @
+:+$ @
+#++:++#++:++$@
+#+$ @
#+#$ @
$ $ @@
$ $@
$ $ @
$ $ @
$ $ @
$ $ @
#+#$ @
##$ @@
$ $@
$ $ @
$ $ @
+#++:++#++:++$ @
$ $ @
$ $ @
$ $ @@
$ $@
$ $ @
$ $ @
$ $ @
$ $ @
#+#$ @
###$ @@
:::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
###$ @@
:::::::$@
:+: :+:$@
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
#######$ @@
:::$@
:+:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
#######$ @@
::::::::$@
:+: :+:$@
$ +:+$ @
$ +#+$ @
$ +#+$ @
#+#$ @
##########$ @@
::::::::$@
:+: :+:$@
$ +:+$ @
$ +#++:$ @
$ +#+$ @
#+# #+#$ @
########$ @@
:::$@
:+:$ @
+:+ +:+$@
+#+ +:+$ @
+#+#+#+#+#+$@
#+#$ @
###$ @@
::::::::::$@
:+: :+:$ @
+:+ $ @
+#++:++#+$ @
$ +#+$ @
#+# #+#$ @
########$ @@
::::::::$@
:+: :+:$@
+:+ $ @
+#++:++#+$ @
+#+ +#+$ @
#+# #+#$ @
########$ @@
:::::::::::$@
:+: :+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
###$ @@
::::::::$@
:+: :+:$@
+:+ +:+$ @
+#++:++#$ @
+#+ +#+$ @
#+# #+#$ @
########$ @@
::::::::$@
:+: :+:$@
+:+ +:+$ @
+#++:++#+$ @
$ +#+$ @
#+# #+#$ @
########$ @@
$ $@
:+:$@
$ $ @
$ $ @
$ $ @
#+#$ @
$ $ @@
$ $@
:+:$@
$ $ @
$ $ @
$ $ @
#+#$ @
##$ @@
:::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
###$ @@
$ $@
$ $ @
+:+:+:+:+:+:+$ @
$ $ @
+#+#+#+#+#+#+$ @
$ $ @
$ $ @@
:::$@
:+:$@
+:+$@
+#+$@
+#+$ @
#+#$ @
###$ @@
:::::::::$@
:+: :+:$@
+:+$ @
+#+$ @
+#+$ @
$ $ @
###$ @@
:::::::::::$ @
:+: :+:+:+:+:+:$@
+:+ +:+ +:+ +:+$@
+#+ +:+ +#+ +:+$ @
+#+ +#+ +#+ +#+$ @
#+# #+#+#+#+#+$ @
#####$ @@
:::$ @
:+: :+:$@
+:+ +:+$@
+#++:++#++:$@
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
:::::::::$@
:+: :+:$@
+:+ +:+$ @
+#++:++#+$ @
+#+ +#+$ @
#+# #+#$ @
#########$ @@
::::::::$@
:+: :+:$@
+:+ $ @
+#+ $ @
+#+ $ @
#+# #+#$ @
########$ @@
:::::::::$@
:+: :+:$@
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
#########$ @@
::::::::::$@
:+:$ @
+:+$ @
+#++:++#$ @
+#+$ @
#+#$ @
##########$ @@
::::::::::$@
:+:$ @
+:+$ @
:#::+::#$ @
+#+$ @
#+#$ @
###$ @@
::::::::$@
:+: :+:$@
+:+ $ @
:#: $ @
+#+ +#+#$ @
#+# #+#$ @
########$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#++:++#++$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
:::::::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
###########$ @@
:::::::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+# #+#$ @
#####$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#++:++$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
:::$ @
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
##########$@@
::: :::$@
:+:+: :+:+:$@
+:+ +:+:+ +:+$@
+#+ +:+ +#+$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
:::: :::$@
:+:+: :+:$ @
:+:+:+ +:+$ @
+#+ +:+ +#+$ @
+#+ +#+#+#$ @
#+# #+#+#$ @
### ####$ @@
::::::::$@
:+: :+:$@
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
########$ @@
:::::::::$@
:+: :+:$@
+:+ +:+$ @
+#++:++#+$ @
+#+$ @
#+#$ @
###$ @@
::::::::$@
:+: :+:$@
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
###########$ @@
:::::::::$@
:+: :+:$@
+:+ +:+$ @
+#++:++#:$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
::::::::$@
:+: :+:$@
+:+ $ @
+#++:++#++$ @
$ +#+$ @
#+# #+#$ @
########$ @@
:::::::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
###$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
########$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+#+#+#$ @
###$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#+ +:+ +#+$ @
+#+ +#+#+ +#+$ @
#+#+# #+#+#$ @
### ###$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#++:+$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#++:$ @
+#+$ @
#+#$ @
###$ @@
:::::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
#########$ @@
::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
######$ @@
:::$@
:+:$@
+:+$@
+#+$@
+#+$@
#+#$@
###$@@
::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
######$ @@
:::$ @
:+: :+:$ @
+:+ +:+$@
$ $ @
$ $ @
$ $ @
$ $ @@
$ $@
$ $ @
$ $ @
$ $ @
$ $ @
$ $ @
##########$ @@
:::$@
:+$ @
$$ @
$$ @
$$ @
$$ @
$$ @@
:::$ @
:+: :+:$@
+:+ +:+$@
+#++:++#++:$@
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
:::::::::$@
:+: :+:$@
+:+ +:+$ @
+#++:++#+$ @
+#+ +#+$ @
#+# #+#$ @
#########$ @@
::::::::$@
:+: :+:$@
+:+ $ @
+#+ $ @
+#+ $ @
#+# #+#$ @
########$ @@
:::::::::$@
:+: :+:$@
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
#########$ @@
::::::::::$@
:+:$ @
+:+$ @
+#++:++#$ @
+#+$ @
#+#$ @
##########$ @@
::::::::::$@
:+:$ @
+:+$ @
:#::+::#$ @
+#+$ @
#+#$ @
###$ @@
::::::::$@
:+: :+:$@
+:+ $ @
:#: $ @
+#+ +#+#$ @
#+# #+#$ @
########$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#++:++#++$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
:::::::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
###########$ @@
:::::::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+# #+#$ @
#####$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#++:++$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
:::$ @
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
##########$@@
::: :::$@
:+:+: :+:+:$@
+:+ +:+:+ +:+$@
+#+ +:+ +#+$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
:::: :::$@
:+:+: :+:$ @
:+:+:+ +:+$ @
+#+ +:+ +#+$ @
+#+ +#+#+#$ @
#+# #+#+#$ @
### ####$ @@
::::::::$@
:+: :+:$@
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
########$ @@
:::::::::$@
:+: :+:$@
+:+ +:+$ @
+#++:++#+$ @
+#+$ @
#+#$ @
###$ @@
::::::::$@
:+: :+:$@
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
###########$ @@
:::::::::$@
:+: :+:$@
+:+ +:+$ @
+#++:++#:$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
::::::::$@
:+: :+:$@
+:+ $ @
+#++:++#++$ @
$ +#+$ @
#+# #+#$ @
########$ @@
:::::::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
###$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+# #+#$ @
########$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#+ +:+$ @
+#+ +#+$ @
#+#+#+#$ @
###$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#+ +:+ +#+$ @
+#+ +#+#+ +#+$ @
#+#+# #+#+#$ @
### ###$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#++:+$ @
+#+ +#+$ @
#+# #+#$ @
### ###$ @@
::: :::$@
:+: :+:$ @
+:+ +:+$ @
+#++:$ @
+#+$ @
#+#$ @
###$ @@
:::::::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
#########$ @@
::::$@
:+:$ @
+:+$ @
+#+$ @
+#+$ @
#+#$ @
####$ @@
:::$@
:+:$ @
+:+$ @
$ $ @
+#+$ @
#+#$ @
###$ @@
::::$@
:+:$@
+:+$ @
+#+$@
+#+$ @
#+#$ @
####$ @@
::::: :::$@
:+: :+:+:$ @
$ $ @
$ $ @
$ $ @
$ $ @
$ $ @@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
`
@@ -0,0 +1,13 @@
import { GroupAnimationWithThen } from 'motion-dom';
import { createAnimationsFromSequence } from '../../sequence/create.mjs';
import { animateElements } from './animate-elements.mjs';
function animateSequence(definition, options) {
const animations = [];
createAnimationsFromSequence(definition, options).forEach(({ keyframes, transition }, element) => {
animations.push(...animateElements(element, keyframes, transition));
});
return new GroupAnimationWithThen(animations);
}
export { animateSequence };
@@ -0,0 +1,9 @@
/**
* @param {Link} node
* @param {State} state
* @returns {boolean}
*/
export function formatLinkAsAutolink(node: Link, state: State): boolean;
import type { Link } from 'mdast';
import type { State } from 'mdast-util-to-markdown';
//# sourceMappingURL=format-link-as-autolink.d.ts.map
@@ -0,0 +1 @@
export declare const digitMapping: Record<string, ReadonlyArray<string>>;
@@ -0,0 +1,202 @@
# fd-slicer2
[![Build Status](https://travis-ci.com/nalhabash/node-fd-slicer.svg?branch=master)](https://travis-ci.com/nalhabash/node-fd-slicer)
[![node](https://img.shields.io/node/v/fd-slicer2.svg)](https://github.com/nalhabash/fd-slicer2)
### *This is a fork of the original fd-slicer package, without the DEP0005 deprecation error*
Safe `fs.ReadStream` and `fs.WriteStream` using the same fd.
Let's say that you want to perform a parallel upload of a file to a remote
server. To do this, we want to create multiple read streams. The first thing
you might think of is to use the `{start: 0, end: 0}` API of
`fs.createReadStream`. This gives you two choices:
0. Use the same file descriptor for all `fs.ReadStream` objects.
0. Open the file multiple times, resulting in a separate file descriptor
for each read stream.
Neither of these are acceptable options. The first one is a severe bug,
because the API docs for `fs.write` state:
> Note that it is unsafe to use `fs.write` multiple times on the same file
> without waiting for the callback. For this scenario, `fs.createWriteStream`
> is strongly recommended.
`fs.createWriteStream` will solve the problem if you only create one of them
for the file descriptor, but it will exhibit this unsafety if you create
multiple write streams per file descriptor.
The second option suffers from a race condition. For each additional time the
file is opened after the first, it is possible that the file is modified. So
in our parallel uploading example, we might upload a corrupt file that never
existed on the client's computer.
This module solves this problem by providing `createReadStream` and
`createWriteStream` that operate on a shared file descriptor and provides
the convenient stream API while still allowing slicing and dicing.
This module also gives you some additional power that the builtin
`fs.createWriteStream` do not give you. These features are:
* Emitting a 'progress' event on write.
* Ability to set a maximum size and emit an error if this size is exceeded.
* Ability to create an `FdSlicer` instance from a `Buffer`. This enables you
to provide API for handling files as well as buffers using the same API.
## Usage
```js
var fdSlicer = require('fd-slicer');
var fs = require('fs');
fs.open("file.txt", 'r', function(err, fd) {
if (err) throw err;
var slicer = fdSlicer.createFromFd(fd);
var firstPart = slicer.createReadStream({start: 0, end: 100});
var secondPart = slicer.createReadStream({start: 100});
var firstOut = fs.createWriteStream("first.txt");
var secondOut = fs.createWriteStream("second.txt");
firstPart.pipe(firstOut);
secondPart.pipe(secondOut);
});
```
You can also create from a buffer:
```js
var fdSlicer = require('fd-slicer');
var slicer = FdSlicer.createFromBuffer(someBuffer);
var firstPart = slicer.createReadStream({start: 0, end: 100});
var secondPart = slicer.createReadStream({start: 100});
var firstOut = fs.createWriteStream("first.txt");
var secondOut = fs.createWriteStream("second.txt");
firstPart.pipe(firstOut);
secondPart.pipe(secondOut);
```
## API Documentation
### fdSlicer.createFromFd(fd, [options])
```js
var fdSlicer = require('fd-slicer');
fs.open("file.txt", 'r', function(err, fd) {
if (err) throw err;
var slicer = fdSlicer.createFromFd(fd);
// ...
});
```
Make sure `fd` is a properly initialized file descriptor. If you want to
use `createReadStream` make sure you open it for reading and if you want
to use `createWriteStream` make sure you open it for writing.
`options` is an optional object which can contain:
* `autoClose` - if set to `true`, the file descriptor will be automatically
closed once the last stream that references it is closed. Defaults to
`false`. `ref()` and `unref()` can be used to increase or decrease the
reference count, respectively.
### fdSlicer.createFromBuffer(buffer, [options])
```js
var fdSlicer = require('fd-slicer');
var slicer = fdSlicer.createFromBuffer(someBuffer);
// ...
```
`options` is an optional object which can contain:
* `maxChunkSize` - A `Number` of bytes. see `createReadStream()`.
If falsey, defaults to unlimited.
#### Properties
##### fd
The file descriptor passed in. `undefined` if created from a buffer.
#### Methods
##### createReadStream(options)
Available `options`:
* `start` - Number. The offset into the file to start reading from. Defaults
to 0.
* `end` - Number. Exclusive upper bound offset into the file to stop reading
from.
* `highWaterMark` - Number. The maximum number of bytes to store in the
internal buffer before ceasing to read from the underlying resource.
Defaults to 16 KB.
* `encoding` - String. If specified, then buffers will be decoded to strings
using the specified encoding. Defaults to `null`.
The ReadableStream that this returns has these additional methods:
* `destroy(err)` - stop streaming. `err` is optional and is the error that
will be emitted in order to cause the streaming to stop. Defaults to
`new Error("stream destroyed")`.
If `maxChunkSize` was specified (see `createFromBuffer()`), the read stream
will provide chunks of at most that size. Normally, the read stream provides
the entire range requested in a single chunk, but this can cause performance
problems in some circumstances.
See [thejoshwolfe/yauzl#87](https://github.com/thejoshwolfe/yauzl/issues/87).
##### createWriteStream(options)
Available `options`:
* `start` - Number. The offset into the file to start writing to. Defaults to
0.
* `end` - Number. Exclusive upper bound offset into the file. If this offset
is reached, the write stream will emit an 'error' event and stop functioning.
In this situation, `err.code === 'ETOOBIG'`. Defaults to `Infinity`.
* `highWaterMark` - Number. Buffer level when `write()` starts returning
false. Defaults to 16KB.
* `decodeStrings` - Boolean. Whether or not to decode strings into Buffers
before passing them to` _write()`. Defaults to `true`.
The WritableStream that this returns has these additional methods:
* `destroy()` - stop streaming
And these additional properties:
* `bytesWritten` - number of bytes written to the stream
And these additional events:
* 'progress' - emitted when `bytesWritten` changes.
##### read(buffer, offset, length, position, callback)
Equivalent to `fs.read`, but with concurrency protection.
`callback` must be defined.
##### write(buffer, offset, length, position, callback)
Equivalent to `fs.write`, but with concurrency protection.
`callback` must be defined.
##### ref()
Increase the `autoClose` reference count by 1.
##### unref()
Decrease the `autoClose` reference count by 1.
#### Events
##### 'error'
Emitted if `fs.close` returns an error when auto closing.
##### 'close'
Emitted when fd-slicer closes the file descriptor due to `autoClose`. Never
emitted if created from a buffer.
@@ -0,0 +1,123 @@
/**
* Rule: no-nesting
* Avoid nesting your promises.
*/
'use strict'
const { getScope } = require('./lib/eslint-compat')
const getDocsUrl = require('./lib/get-docs-url')
const hasPromiseCallback = require('./lib/has-promise-callback')
const isInsidePromise = require('./lib/is-inside-promise')
module.exports = {
meta: {
type: 'suggestion',
docs: {
description: 'Disallow nested `then()` or `catch()` statements.',
url: getDocsUrl('no-nesting'),
},
schema: [],
messages: {
avoidNesting: 'Avoid nesting promises.',
},
},
create(context) {
/**
* Array of callback function scopes.
* Scopes are in order closest to the current node.
* @type {import('eslint').Scope.Scope[]}
*/
const callbackScopes = []
/**
* @param {import('eslint').Scope.Scope} scope
* @returns {Iterable<import('eslint').Scope.Reference>}
*/
function* iterateDefinedReferences(scope) {
for (const variable of scope.variables) {
for (const reference of variable.references) {
yield reference
}
}
}
return {
':function'(node) {
if (isInsidePromise(node)) {
callbackScopes.unshift(getScope(context, node))
}
},
':function:exit'(node) {
if (isInsidePromise(node)) {
callbackScopes.shift()
}
},
CallExpression(node) {
if (!hasPromiseCallback(node)) return
if (!callbackScopes.length) {
// The node is not in the callback function.
return
}
// Checks if the argument callback uses variables defined in the closest callback function scope.
//
// e.g.
// ```
// doThing()
// .then(a => getB(a)
// .then(b => getC(a, b))
// )
// ```
//
// In the above case, Since the variables it references are undef,
// we cannot refactor the nesting like following:
// ```
// doThing()
// .then(a => getB(a))
// .then(b => getC(a, b))
// ```
//
// However, `getD` can be refactored in the following:
// ```
// doThing()
// .then(a => getB(a)
// .then(b => getC(a, b)
// .then(c => getD(a, c))
// )
// )
// ```
// ↓
// ```
// doThing()
// .then(a => getB(a)
// .then(b => getC(a, b))
// .then(c => getD(a, c))
// )
// ```
// This is why we only check the closest callback function scope.
//
const closestCallbackScope = callbackScopes[0]
for (const reference of iterateDefinedReferences(
closestCallbackScope,
)) {
if (
node.arguments.some(
(arg) =>
arg.range[0] <= reference.identifier.range[0] &&
reference.identifier.range[1] <= arg.range[1],
)
) {
// Argument callbacks refer to variables defined in the callback function.
return
}
}
context.report({
node: node.callee.property,
messageId: 'avoidNesting',
})
},
}
},
}
@@ -0,0 +1,400 @@
import {getItemElement as $feb5ffebff200149$export$c3d8340acf92597f, isNonContiguousSelectionModifier as $feb5ffebff200149$export$d3e3bd3e26688c04, useCollectionId as $feb5ffebff200149$export$881eb0d9f3605d9d} from "./utils.module.js";
import {useTypeSelect as $fb3050f43d946246$export$e32c88dfddc6e1d8} from "./useTypeSelect.module.js";
import {useRouter as $3H3GQ$useRouter, isCtrlKeyPressed as $3H3GQ$isCtrlKeyPressed, focusWithoutScrolling as $3H3GQ$focusWithoutScrolling, useEvent as $3H3GQ$useEvent, scrollIntoViewport as $3H3GQ$scrollIntoViewport, FOCUS_EVENT as $3H3GQ$FOCUS_EVENT, useEffectEvent as $3H3GQ$useEffectEvent, getActiveElement as $3H3GQ$getActiveElement, useUpdateLayoutEffect as $3H3GQ$useUpdateLayoutEffect, CLEAR_FOCUS_EVENT as $3H3GQ$CLEAR_FOCUS_EVENT, scrollIntoView as $3H3GQ$scrollIntoView, mergeProps as $3H3GQ$mergeProps} from "@react-aria/utils";
import {getFocusableTreeWalker as $3H3GQ$getFocusableTreeWalker, moveVirtualFocus as $3H3GQ$moveVirtualFocus, dispatchVirtualFocus as $3H3GQ$dispatchVirtualFocus} from "@react-aria/focus";
import {flushSync as $3H3GQ$flushSync} from "react-dom";
import {useRef as $3H3GQ$useRef, useEffect as $3H3GQ$useEffect} from "react";
import {getInteractionModality as $3H3GQ$getInteractionModality, focusSafely as $3H3GQ$focusSafely} from "@react-aria/interactions";
import {useLocale as $3H3GQ$useLocale} from "@react-aria/i18n";
/*
* 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.
*/
function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
let { selectionManager: manager, keyboardDelegate: delegate, ref: ref, autoFocus: autoFocus = false, shouldFocusWrap: shouldFocusWrap = false, disallowEmptySelection: disallowEmptySelection = false, disallowSelectAll: disallowSelectAll = false, escapeKeyBehavior: escapeKeyBehavior = 'clearSelection', selectOnFocus: selectOnFocus = manager.selectionBehavior === 'replace', disallowTypeAhead: disallowTypeAhead = false, shouldUseVirtualFocus: shouldUseVirtualFocus, allowsTabNavigation: allowsTabNavigation = false, isVirtualized: isVirtualized, scrollRef: // If no scrollRef is provided, assume the collection ref is the scrollable region
scrollRef = ref, linkBehavior: linkBehavior = 'action' } = options;
let { direction: direction } = (0, $3H3GQ$useLocale)();
let router = (0, $3H3GQ$useRouter)();
let onKeyDown = (e)=>{
var _ref_current;
// Prevent option + tab from doing anything since it doesn't move focus to the cells, only buttons/checkboxes
if (e.altKey && e.key === 'Tab') e.preventDefault();
// Keyboard events bubble through portals. Don't handle keyboard events
// for elements outside the collection (e.g. menus).
if (!((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.contains(e.target))) return;
const navigateToKey = (key, childFocus)=>{
if (key != null) {
if (manager.isLink(key) && linkBehavior === 'selection' && selectOnFocus && !(0, $feb5ffebff200149$export$d3e3bd3e26688c04)(e)) {
// Set focused key and re-render synchronously to bring item into view if needed.
(0, $3H3GQ$flushSync)(()=>{
manager.setFocusedKey(key, childFocus);
});
let item = (0, $feb5ffebff200149$export$c3d8340acf92597f)(ref, key);
let itemProps = manager.getItemProps(key);
if (item) router.open(item, e, itemProps.href, itemProps.routerOptions);
return;
}
manager.setFocusedKey(key, childFocus);
if (manager.isLink(key) && linkBehavior === 'override') return;
if (e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(key);
else if (selectOnFocus && !(0, $feb5ffebff200149$export$d3e3bd3e26688c04)(e)) manager.replaceSelection(key);
}
};
switch(e.key){
case 'ArrowDown':
if (delegate.getKeyBelow) {
var _delegate_getKeyBelow, _delegate_getFirstKey, _delegate_getFirstKey1;
let nextKey = manager.focusedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate, manager.focusedKey);
if (nextKey != null) {
e.preventDefault();
navigateToKey(nextKey);
}
}
break;
case 'ArrowUp':
if (delegate.getKeyAbove) {
var _delegate_getKeyAbove, _delegate_getLastKey, _delegate_getLastKey1;
let nextKey = manager.focusedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === void 0 ? void 0 : _delegate_getLastKey1.call(delegate, manager.focusedKey);
if (nextKey != null) {
e.preventDefault();
navigateToKey(nextKey);
}
}
break;
case 'ArrowLeft':
if (delegate.getKeyLeftOf) {
var _delegate_getKeyLeftOf, _delegate_getFirstKey2, _delegate_getLastKey2;
let nextKey = manager.focusedKey != null ? (_delegate_getKeyLeftOf = delegate.getKeyLeftOf) === null || _delegate_getKeyLeftOf === void 0 ? void 0 : _delegate_getKeyLeftOf.call(delegate, manager.focusedKey) : null;
if (nextKey == null && shouldFocusWrap) nextKey = direction === 'rtl' ? (_delegate_getFirstKey2 = delegate.getFirstKey) === null || _delegate_getFirstKey2 === void 0 ? void 0 : _delegate_getFirstKey2.call(delegate, manager.focusedKey) : (_delegate_getLastKey2 = delegate.getLastKey) === null || _delegate_getLastKey2 === void 0 ? void 0 : _delegate_getLastKey2.call(delegate, manager.focusedKey);
if (nextKey != null) {
e.preventDefault();
navigateToKey(nextKey, direction === 'rtl' ? 'first' : 'last');
}
}
break;
case 'ArrowRight':
if (delegate.getKeyRightOf) {
var _delegate_getKeyRightOf, _delegate_getLastKey3, _delegate_getFirstKey3;
let nextKey = manager.focusedKey != null ? (_delegate_getKeyRightOf = delegate.getKeyRightOf) === null || _delegate_getKeyRightOf === void 0 ? void 0 : _delegate_getKeyRightOf.call(delegate, manager.focusedKey) : null;
if (nextKey == null && shouldFocusWrap) nextKey = direction === 'rtl' ? (_delegate_getLastKey3 = delegate.getLastKey) === null || _delegate_getLastKey3 === void 0 ? void 0 : _delegate_getLastKey3.call(delegate, manager.focusedKey) : (_delegate_getFirstKey3 = delegate.getFirstKey) === null || _delegate_getFirstKey3 === void 0 ? void 0 : _delegate_getFirstKey3.call(delegate, manager.focusedKey);
if (nextKey != null) {
e.preventDefault();
navigateToKey(nextKey, direction === 'rtl' ? 'last' : 'first');
}
}
break;
case 'Home':
if (delegate.getFirstKey) {
if (manager.focusedKey === null && e.shiftKey) return;
e.preventDefault();
let firstKey = delegate.getFirstKey(manager.focusedKey, (0, $3H3GQ$isCtrlKeyPressed)(e));
manager.setFocusedKey(firstKey);
if (firstKey != null) {
if ((0, $3H3GQ$isCtrlKeyPressed)(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(firstKey);
else if (selectOnFocus) manager.replaceSelection(firstKey);
}
}
break;
case 'End':
if (delegate.getLastKey) {
if (manager.focusedKey === null && e.shiftKey) return;
e.preventDefault();
let lastKey = delegate.getLastKey(manager.focusedKey, (0, $3H3GQ$isCtrlKeyPressed)(e));
manager.setFocusedKey(lastKey);
if (lastKey != null) {
if ((0, $3H3GQ$isCtrlKeyPressed)(e) && e.shiftKey && manager.selectionMode === 'multiple') manager.extendSelection(lastKey);
else if (selectOnFocus) manager.replaceSelection(lastKey);
}
}
break;
case 'PageDown':
if (delegate.getKeyPageBelow && manager.focusedKey != null) {
let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
if (nextKey != null) {
e.preventDefault();
navigateToKey(nextKey);
}
}
break;
case 'PageUp':
if (delegate.getKeyPageAbove && manager.focusedKey != null) {
let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
if (nextKey != null) {
e.preventDefault();
navigateToKey(nextKey);
}
}
break;
case 'a':
if ((0, $3H3GQ$isCtrlKeyPressed)(e) && manager.selectionMode === 'multiple' && disallowSelectAll !== true) {
e.preventDefault();
manager.selectAll();
}
break;
case 'Escape':
if (escapeKeyBehavior === 'clearSelection' && !disallowEmptySelection && manager.selectedKeys.size !== 0) {
e.stopPropagation();
e.preventDefault();
manager.clearSelection();
}
break;
case 'Tab':
if (!allowsTabNavigation) {
// There may be elements that are "tabbable" inside a collection (e.g. in a grid cell).
// However, collections should be treated as a single tab stop, with arrow key navigation internally.
// We don't control the rendering of these, so we can't override the tabIndex to prevent tabbing.
// Instead, we handle the Tab key, and move focus manually to the first/last tabbable element
// in the collection, so that the browser default behavior will apply starting from that element
// rather than the currently focused one.
if (e.shiftKey) ref.current.focus();
else {
let walker = (0, $3H3GQ$getFocusableTreeWalker)(ref.current, {
tabbable: true
});
let next = undefined;
let last;
do {
last = walker.lastChild();
if (last) next = last;
}while (last);
if (next && !next.contains(document.activeElement)) (0, $3H3GQ$focusWithoutScrolling)(next);
}
break;
}
}
};
// Store the scroll position so we can restore it later.
/// TODO: should this happen all the time??
let scrollPos = (0, $3H3GQ$useRef)({
top: 0,
left: 0
});
(0, $3H3GQ$useEvent)(scrollRef, 'scroll', isVirtualized ? undefined : ()=>{
var _scrollRef_current, _scrollRef_current1;
var _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
scrollPos.current = {
top: (_scrollRef_current_scrollTop = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.scrollTop) !== null && _scrollRef_current_scrollTop !== void 0 ? _scrollRef_current_scrollTop : 0,
left: (_scrollRef_current_scrollLeft = (_scrollRef_current1 = scrollRef.current) === null || _scrollRef_current1 === void 0 ? void 0 : _scrollRef_current1.scrollLeft) !== null && _scrollRef_current_scrollLeft !== void 0 ? _scrollRef_current_scrollLeft : 0
};
});
let onFocus = (e)=>{
if (manager.isFocused) {
// If a focus event bubbled through a portal, reset focus state.
if (!e.currentTarget.contains(e.target)) manager.setFocused(false);
return;
}
// Focus events can bubble through portals. Ignore these events.
if (!e.currentTarget.contains(e.target)) return;
manager.setFocused(true);
if (manager.focusedKey == null) {
var _delegate_getLastKey, _delegate_getFirstKey;
let navigateToKey = (key)=>{
if (key != null) {
manager.setFocusedKey(key);
if (selectOnFocus && !manager.isSelected(key)) manager.replaceSelection(key);
}
};
// If the user hasn't yet interacted with the collection, there will be no focusedKey set.
// Attempt to detect whether the user is tabbing forward or backward into the collection
// and either focus the first or last item accordingly.
let relatedTarget = e.relatedTarget;
var _manager_lastSelectedKey, _manager_firstSelectedKey;
if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate));
else navigateToKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate));
} else if (!isVirtualized && scrollRef.current) {
// Restore the scroll position to what it was before.
scrollRef.current.scrollTop = scrollPos.current.top;
scrollRef.current.scrollLeft = scrollPos.current.left;
}
if (manager.focusedKey != null && scrollRef.current) {
// Refocus and scroll the focused item into view if it exists within the scrollable region.
let element = (0, $feb5ffebff200149$export$c3d8340acf92597f)(ref, manager.focusedKey);
if (element instanceof HTMLElement) {
// This prevents a flash of focus on the first/last element in the collection, or the collection itself.
if (!element.contains(document.activeElement) && !shouldUseVirtualFocus) (0, $3H3GQ$focusWithoutScrolling)(element);
let modality = (0, $3H3GQ$getInteractionModality)();
if (modality === 'keyboard') (0, $3H3GQ$scrollIntoViewport)(element, {
containingElement: ref.current
});
}
}
};
let onBlur = (e)=>{
// Don't set blurred and then focused again if moving focus within the collection.
if (!e.currentTarget.contains(e.relatedTarget)) manager.setFocused(false);
};
// Ref to track whether the first item in the collection should be automatically focused. Specifically used for autocomplete when user types
// to focus the first key AFTER the collection updates.
// TODO: potentially expand the usage of this
let shouldVirtualFocusFirst = (0, $3H3GQ$useRef)(false);
// Add event listeners for custom virtual events. These handle updating the focused key in response to various keyboard events
// at the autocomplete level
// TODO: fix type later
(0, $3H3GQ$useEvent)(ref, (0, $3H3GQ$FOCUS_EVENT), !shouldUseVirtualFocus ? undefined : (e)=>{
let { detail: detail } = e;
e.stopPropagation();
manager.setFocused(true);
// If the user is typing forwards, autofocus the first option in the list.
if ((detail === null || detail === void 0 ? void 0 : detail.focusStrategy) === 'first') shouldVirtualFocusFirst.current = true;
});
let updateActiveDescendant = (0, $3H3GQ$useEffectEvent)(()=>{
var _delegate_getFirstKey;
var _delegate_getFirstKey1;
let keyToFocus = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
// If no focusable items exist in the list, make sure to clear any activedescendant that may still exist and move focus back to
// the original active element (e.g. the autocomplete input)
if (keyToFocus == null) {
let previousActiveElement = (0, $3H3GQ$getActiveElement)();
(0, $3H3GQ$moveVirtualFocus)(ref.current);
(0, $3H3GQ$dispatchVirtualFocus)(previousActiveElement, null);
// If there wasn't a focusable key but the collection had items, then that means we aren't in an intermediate load state and all keys are disabled.
// Reset shouldVirtualFocusFirst so that we don't erronously autofocus an item when the collection is filtered again.
if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
} else {
manager.setFocusedKey(keyToFocus);
// Only set shouldVirtualFocusFirst to false if we've successfully set the first key as the focused key
// If there wasn't a key to focus, we might be in a temporary loading state so we'll want to still focus the first key
// after the collection updates after load
shouldVirtualFocusFirst.current = false;
}
});
(0, $3H3GQ$useUpdateLayoutEffect)(()=>{
if (shouldVirtualFocusFirst.current) updateActiveDescendant();
}, [
manager.collection,
updateActiveDescendant
]);
let resetFocusFirstFlag = (0, $3H3GQ$useEffectEvent)(()=>{
// If user causes the focused key to change in any other way, clear shouldVirtualFocusFirst so we don't
// accidentally move focus from under them. Skip this if the collection was empty because we might be in a load
// state and will still want to focus the first item after load
if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
});
(0, $3H3GQ$useUpdateLayoutEffect)(()=>{
resetFocusFirstFlag();
}, [
manager.focusedKey,
resetFocusFirstFlag
]);
(0, $3H3GQ$useEvent)(ref, (0, $3H3GQ$CLEAR_FOCUS_EVENT), !shouldUseVirtualFocus ? undefined : (e)=>{
var _e_detail;
e.stopPropagation();
manager.setFocused(false);
if ((_e_detail = e.detail) === null || _e_detail === void 0 ? void 0 : _e_detail.clearFocusKey) manager.setFocusedKey(null);
});
const autoFocusRef = (0, $3H3GQ$useRef)(autoFocus);
const didAutoFocusRef = (0, $3H3GQ$useRef)(false);
(0, $3H3GQ$useEffect)(()=>{
if (autoFocusRef.current) {
var _delegate_getFirstKey, _delegate_getLastKey;
let focusedKey = null;
var _delegate_getFirstKey1;
// Check focus strategy to determine which item to focus
if (autoFocus === 'first') focusedKey = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
var _delegate_getLastKey1;
if (autoFocus === 'last') focusedKey = (_delegate_getLastKey1 = (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate)) !== null && _delegate_getLastKey1 !== void 0 ? _delegate_getLastKey1 : null;
// If there are any selected keys, make the first one the new focus target
let selectedKeys = manager.selectedKeys;
if (selectedKeys.size) {
for (let key of selectedKeys)if (manager.canSelectItem(key)) {
focusedKey = key;
break;
}
}
manager.setFocused(true);
manager.setFocusedKey(focusedKey);
// If no default focus key is selected, focus the collection itself.
if (focusedKey == null && !shouldUseVirtualFocus && ref.current) (0, $3H3GQ$focusSafely)(ref.current);
// Wait until the collection has items to autofocus.
if (manager.collection.size > 0) {
autoFocusRef.current = false;
didAutoFocusRef.current = true;
}
}
});
// Scroll the focused element into view when the focusedKey changes.
let lastFocusedKey = (0, $3H3GQ$useRef)(manager.focusedKey);
let raf = (0, $3H3GQ$useRef)(null);
(0, $3H3GQ$useEffect)(()=>{
if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || didAutoFocusRef.current) && scrollRef.current && ref.current) {
let modality = (0, $3H3GQ$getInteractionModality)();
let element = (0, $feb5ffebff200149$export$c3d8340acf92597f)(ref, manager.focusedKey);
if (!(element instanceof HTMLElement)) // If item element wasn't found, return early (don't update autoFocusRef and lastFocusedKey).
// The collection may initially be empty (e.g. virtualizer), so wait until the element exists.
return;
if (modality === 'keyboard' || didAutoFocusRef.current) {
if (raf.current) cancelAnimationFrame(raf.current);
raf.current = requestAnimationFrame(()=>{
if (scrollRef.current) {
(0, $3H3GQ$scrollIntoView)(scrollRef.current, element);
// Avoid scroll in iOS VO, since it may cause overlay to close (i.e. RAC submenu)
if (modality !== 'virtual') (0, $3H3GQ$scrollIntoViewport)(element, {
containingElement: ref.current
});
}
});
}
}
// If the focused key becomes null (e.g. the last item is deleted), focus the whole collection.
if (!shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null && ref.current) (0, $3H3GQ$focusSafely)(ref.current);
lastFocusedKey.current = manager.focusedKey;
didAutoFocusRef.current = false;
});
(0, $3H3GQ$useEffect)(()=>{
return ()=>{
if (raf.current) cancelAnimationFrame(raf.current);
};
}, []);
// Intercept FocusScope restoration since virtualized collections can reuse DOM nodes.
(0, $3H3GQ$useEvent)(ref, 'react-aria-focus-scope-restore', (e)=>{
e.preventDefault();
manager.setFocused(true);
});
let handlers = {
onKeyDown: onKeyDown,
onFocus: onFocus,
onBlur: onBlur,
onMouseDown (e) {
// Ignore events that bubbled through portals.
if (scrollRef.current === e.target) // Prevent focus going to the collection when clicking on the scrollbar.
e.preventDefault();
}
};
let { typeSelectProps: typeSelectProps } = (0, $fb3050f43d946246$export$e32c88dfddc6e1d8)({
keyboardDelegate: delegate,
selectionManager: manager
});
if (!disallowTypeAhead) handlers = (0, $3H3GQ$mergeProps)(typeSelectProps, handlers);
// If nothing is focused within the collection, make the collection itself tabbable.
// This will be marshalled to either the first or last item depending on where focus came from.
let tabIndex = undefined;
if (!shouldUseVirtualFocus) tabIndex = manager.focusedKey == null ? 0 : -1;
let collectionId = (0, $feb5ffebff200149$export$881eb0d9f3605d9d)(manager.collection);
return {
collectionProps: (0, $3H3GQ$mergeProps)(handlers, {
tabIndex: tabIndex,
'data-collection': collectionId
})
};
}
export {$ae20dd8cbca75726$export$d6daf82dcd84e87c as useSelectableCollection};
//# sourceMappingURL=useSelectableCollection.module.js.map
@@ -0,0 +1,37 @@
{
"name": "gensync",
"version": "1.0.0-beta.2",
"license": "MIT",
"description": "Allows users to use generators in order to write common functions that can be both sync or async.",
"main": "index.js",
"author": "Logan Smyth <loganfsmyth@gmail.com>",
"homepage": "https://github.com/loganfsmyth/gensync",
"repository": {
"type": "git",
"url": "https://github.com/loganfsmyth/gensync.git"
},
"scripts": {
"test": "jest"
},
"engines": {
"node": ">=6.9.0"
},
"keywords": [
"async",
"sync",
"generators",
"async-await",
"callbacks"
],
"devDependencies": {
"babel-core": "^6.26.3",
"babel-preset-env": "^1.6.1",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-prettier": "^2.6.0",
"flow-bin": "^0.71.0",
"jest": "^22.4.3",
"prettier": "^1.12.1"
}
}
@@ -0,0 +1,155 @@
/**
* @fileoverview Prevent direct mutation of this.state
* @author David Petersen
* @author Nicolas Fernandez <@burabure>
*/
'use strict';
const values = require('object.values');
const Components = require('../util/Components');
const componentUtil = require('../util/componentUtil');
const docsUrl = require('../util/docsUrl');
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
noDirectMutation: 'Do not mutate state directly. Use setState().',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Disallow direct mutation of this.state',
category: 'Possible Errors',
recommended: true,
url: docsUrl('no-direct-mutation-state'),
},
messages,
},
create: Components.detect((context, components, utils) => {
/**
* Checks if the component is valid
* @param {Object} component The component to process
* @returns {boolean} True if the component is valid, false if not.
*/
function isValid(component) {
return !!component && !component.mutateSetState;
}
/**
* Reports undeclared proptypes for a given component
* @param {Object} component The component to process
*/
function reportMutations(component) {
let mutation;
for (let i = 0, j = component.mutations.length; i < j; i++) {
mutation = component.mutations[i];
report(context, messages.noDirectMutation, 'noDirectMutation', {
node: mutation,
});
}
}
/**
* Walks through the MemberExpression to the top-most property.
* @param {Object} node The node to process
* @returns {Object} The outer-most MemberExpression
*/
function getOuterMemberExpression(node) {
while (node.object && node.object.property) {
node = node.object;
}
return node;
}
/**
* Determine if we should currently ignore assignments in this component.
* @param {?Object} component The component to process
* @returns {boolean} True if we should skip assignment checks.
*/
function shouldIgnoreComponent(component) {
return !component || (component.inConstructor && !component.inCallExpression);
}
// --------------------------------------------------------------------------
// Public
// --------------------------------------------------------------------------
return {
MethodDefinition(node) {
if (node.kind === 'constructor') {
components.set(node, {
inConstructor: true,
});
}
},
CallExpression(node) {
components.set(node, {
inCallExpression: true,
});
},
AssignmentExpression(node) {
const component = components.get(utils.getParentComponent(node));
if (shouldIgnoreComponent(component) || !node.left || !node.left.object) {
return;
}
const item = getOuterMemberExpression(node.left);
if (componentUtil.isStateMemberExpression(item)) {
const mutations = (component && component.mutations) || [];
mutations.push(node.left.object);
components.set(node, {
mutateSetState: true,
mutations,
});
}
},
UpdateExpression(node) {
const component = components.get(utils.getParentComponent(node));
if (shouldIgnoreComponent(component) || node.argument.type !== 'MemberExpression') {
return;
}
const item = getOuterMemberExpression(node.argument);
if (componentUtil.isStateMemberExpression(item)) {
const mutations = (component && component.mutations) || [];
mutations.push(item);
components.set(node, {
mutateSetState: true,
mutations,
});
}
},
'CallExpression:exit'(node) {
components.set(node, {
inCallExpression: false,
});
},
'MethodDefinition:exit'(node) {
if (node.kind === 'constructor') {
components.set(node, {
inConstructor: false,
});
}
},
'Program:exit'() {
values(components.list())
.filter((component) => !isValid(component))
.forEach((component) => {
reportMutations(component);
});
},
};
}),
};
@@ -0,0 +1 @@
{"name":"path-is-absolute","version":"1.0.1","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532120789,"integrity":"sha512-IhelNAiFepmsncBcCbBVWAif1Lx0UBSERSv1E+8QCCWdnpWI7oJGVATNE+CTEFppMsG3erLUQwLA5Kq+AkXS5A==","mode":420,"size":733},"index.js":{"checkedAt":1794532120789,"integrity":"sha512-qBuLyosHHR1rhtuGeoMlKMX7ZVB6Gi5vw5MGrb09eV2pMqxzvie799SW9wJC8H3FhlcDPSyp2FtSDCfAHpMiwg==","mode":420,"size":611},"license":{"checkedAt":1794532120789,"integrity":"sha512-rnnnpCCaRRrva3j3sLiBcOeiIzUSasNFUiv06v4IGNpYZarhUHxdwCJO+FRUjHId+ahDcYIvNtUMvNl/qUbu6Q==","mode":420,"size":1119},"readme.md":{"checkedAt":1794532120789,"integrity":"sha512-65TCpQkvWIw4kunpD3lsF3BE+63v1D5pUd3H7bDqAtygIuAdV6Fuf+Q+h3gF2T1hDk/C5+GBaM8n00+BiNv9EA==","mode":420,"size":1153}}}
@@ -0,0 +1 @@
{"name":"@heroui/use-safe-layout-effect","version":"2.1.2","requiresBuild":false,"files":{"dist/index.js":{"checkedAt":1794532107254,"integrity":"sha512-FgjdSyRiOq12nKLtfWir4XcpgBYamdbjZcf5xuYHDUv/Ht8c1I60ptopQkmeKxnSbDOgaf1gqX6CL8QIX3mvuQ==","mode":420,"size":1251},"package.json":{"checkedAt":1794532107254,"integrity":"sha512-zJJ7ilW4LXKwdV1KB4qRPYlVrHknmE6NduXMwUWdeqwgi97x+KSWVAfGIrHgZHIPYgPOw3zB2M4IC/h4xS9TYA==","mode":420,"size":1269},"README.md":{"checkedAt":1794532107254,"integrity":"sha512-E97whO/Q6rhGhekWmj3p+aP1nOtU1ChFStprgb5JdmKeux0j4jY/tXKhaPX79v/UPooiLCjUtoHVc+nHIKKwrg==","mode":420,"size":521},"dist/index.mjs":{"checkedAt":1794532107255,"integrity":"sha512-HnfpgBdRpxg8R5Fp2aMjtS/EfhU+ZRSNGAYWbx4prnsaMvTwcCM0owLtr5kWeL1tascE0VzNgGEdNSlEdAva/w==","mode":420,"size":218},"dist/index.d.ts":{"checkedAt":1794532107255,"integrity":"sha512-6QgwPcjGVpdqVtyqG16wLDyRvS/7ieZBfeLCYdLNKw03JBOAZoPxHjCdyxwUkHLTXcBiH4HxJj6V2GS/XqB0XA==","mode":420,"size":134},"LICENSE":{"checkedAt":1794532107255,"integrity":"sha512-eaopHP+N4EYXlGoX9hmoxDPoVft4BqrXKmbsFTcsoBHSrJp/GWF4qVtLBzrw9h9ZrbFfPY69z+3RuDX9FdPG+Q==","mode":420,"size":1064}}}
@@ -0,0 +1,49 @@
/**
* @author Toru Nagashima
* See LICENSE file in root directory for full license.
*/
"use strict"
const { READ } = require("eslint-utils")
const checkForPreferGlobal = require("../../util/check-prefer-global")
const trackMap = {
globals: {
TextDecoder: { [READ]: true },
},
modules: {
util: {
TextDecoder: { [READ]: true },
},
},
}
module.exports = {
meta: {
docs: {
description:
'enforce either `TextDecoder` or `require("util").TextDecoder`',
category: "Stylistic Issues",
recommended: false,
url:
"https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/prefer-global/text-decoder.md",
},
type: "suggestion",
fixable: null,
schema: [{ enum: ["always", "never"] }],
messages: {
preferGlobal:
"Unexpected use of 'require(\"util\").TextDecoder'. Use the global variable 'TextDecoder' instead.",
preferModule:
"Unexpected use of the global variable 'TextDecoder'. Use 'require(\"util\").TextDecoder' instead.",
},
},
create(context) {
return {
"Program:exit"() {
checkForPreferGlobal(context, trackMap)
},
}
},
}
@@ -0,0 +1,104 @@
/*
* 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.
*/
import {AriaCheckboxProps} from '@react-types/checkbox';
import {InputHTMLAttributes, LabelHTMLAttributes, useEffect, useMemo} from 'react';
import {mergeProps} from '@react-aria/utils';
import {privateValidationStateProp, useFormValidationState} from '@react-stately/form';
import {RefObject, ValidationResult} from '@react-types/shared';
import {ToggleState} from '@react-stately/toggle';
import {useFormValidation} from '@react-aria/form';
import {usePress} from '@react-aria/interactions';
import {useToggle} from '@react-aria/toggle';
export interface CheckboxAria extends ValidationResult {
/** Props for the label wrapper element. */
labelProps: LabelHTMLAttributes<HTMLLabelElement>,
/** Props for the input element. */
inputProps: InputHTMLAttributes<HTMLInputElement>,
/** Whether the checkbox is selected. */
isSelected: boolean,
/** Whether the checkbox is in a pressed state. */
isPressed: boolean,
/** Whether the checkbox is disabled. */
isDisabled: boolean,
/** Whether the checkbox is read only. */
isReadOnly: boolean
}
/**
* Provides the behavior and accessibility implementation for a checkbox component.
* Checkboxes allow users to select multiple items from a list of individual items, or
* to mark one individual item as selected.
* @param props - Props for the checkbox.
* @param state - State for the checkbox, as returned by `useToggleState`.
* @param inputRef - A ref for the HTML input element.
*/
export function useCheckbox(props: AriaCheckboxProps, state: ToggleState, inputRef: RefObject<HTMLInputElement | null>): CheckboxAria {
// Create validation state here because it doesn't make sense to add to general useToggleState.
let validationState = useFormValidationState({...props, value: state.isSelected});
let {isInvalid, validationErrors, validationDetails} = validationState.displayValidation;
let {labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly} = useToggle({
...props,
isInvalid
}, state, inputRef);
useFormValidation(props, validationState, inputRef);
let {isIndeterminate, isRequired, validationBehavior = 'aria'} = props;
useEffect(() => {
// indeterminate is a property, but it can only be set via javascript
// https://css-tricks.com/indeterminate-checkboxes/
if (inputRef.current) {
inputRef.current.indeterminate = !!isIndeterminate;
}
});
// Reset validation state on label press for checkbox with a hidden input.
let {pressProps} = usePress({
isDisabled: isDisabled || isReadOnly,
onPress() {
// @ts-expect-error
let {[privateValidationStateProp]: groupValidationState} = props;
let {commitValidation} = groupValidationState
? groupValidationState
: validationState;
commitValidation();
}
});
return {
labelProps: mergeProps(
labelProps,
pressProps,
useMemo(() => ({
// Prevent label from being focused when mouse down on it.
// Note, this does not prevent the input from being focused in the `click` event.
onMouseDown: e => e.preventDefault()
}), [])),
inputProps: {
...inputProps,
checked: isSelected,
'aria-required': (isRequired && validationBehavior === 'aria') || undefined,
required: isRequired && validationBehavior === 'native'
},
isSelected,
isPressed,
isDisabled,
isReadOnly,
isInvalid,
validationErrors,
validationDetails
};
}
@@ -0,0 +1,27 @@
import * as core from "../core/index.js";
import * as schemas from "./schemas.js";
export interface ZodCoercedString<T = unknown> extends schemas._ZodString<core.$ZodStringInternals<T>> {}
export function string<T = unknown>(params?: string | core.$ZodStringParams): ZodCoercedString<T> {
return core._coercedString(schemas.ZodString, params) as any;
}
export interface ZodCoercedNumber<T = unknown> extends schemas._ZodNumber<core.$ZodNumberInternals<T>> {}
export function number<T = unknown>(params?: string | core.$ZodNumberParams): ZodCoercedNumber<T> {
return core._coercedNumber(schemas.ZodNumber, params) as ZodCoercedNumber<T>;
}
export interface ZodCoercedBoolean<T = unknown> extends schemas._ZodBoolean<core.$ZodBooleanInternals<T>> {}
export function boolean<T = unknown>(params?: string | core.$ZodBooleanParams): ZodCoercedBoolean<T> {
return core._coercedBoolean(schemas.ZodBoolean, params) as ZodCoercedBoolean<T>;
}
export interface ZodCoercedBigInt<T = unknown> extends schemas._ZodBigInt<core.$ZodBigIntInternals<T>> {}
export function bigint<T = unknown>(params?: string | core.$ZodBigIntParams): ZodCoercedBigInt<T> {
return core._coercedBigint(schemas.ZodBigInt, params) as ZodCoercedBigInt<T>;
}
export interface ZodCoercedDate<T = unknown> extends schemas._ZodDate<core.$ZodDateInternals<T>> {}
export function date<T = unknown>(params?: string | core.$ZodDateParams): ZodCoercedDate<T> {
return core._coercedDate(schemas.ZodDate, params) as ZodCoercedDate<T>;
}
@@ -0,0 +1,21 @@
'use strict';
var $TypeError = require('es-errors/type');
var ToInt32 = require('../ToInt32');
var ToUint32 = require('../ToUint32');
// https://262.ecma-international.org/11.0/#sec-numeric-types-number-leftShift
module.exports = function NumberLeftShift(x, y) {
if (typeof x !== 'number' || typeof y !== 'number') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be Numbers');
}
var lnum = ToInt32(x);
var rnum = ToUint32(y);
var shiftCount = rnum & 0x1F;
return lnum << shiftCount;
};
@@ -0,0 +1,33 @@
type Key = string | number | symbol;
/**
* SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
* index of the `key` in the backing array.
*
* This is designed to allow synchronizing a second array with the contents of the backing array,
* like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
* and there are never duplicates.
*/
export declare class SetArray<T extends Key = Key> {
private _indexes;
array: readonly T[];
constructor();
}
/**
* Gets the index associated with `key` in the backing array, if it is already present.
*/
export declare function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined;
/**
* Puts `key` into the backing array, if it is not already present. Returns
* the index of the `key` in the backing array.
*/
export declare function put<T extends Key>(setarr: SetArray<T>, key: T): number;
/**
* Pops the last added item out of the SetArray.
*/
export declare function pop<T extends Key>(setarr: SetArray<T>): void;
/**
* Removes the key, if it exists in the set.
*/
export declare function remove<T extends Key>(setarr: SetArray<T>, key: T): void;
export {};
//# sourceMappingURL=set-array.d.ts.map
@@ -0,0 +1,4 @@
{
"main": "../../cjs/_class_check_private_static_field_descriptor.cjs",
"module": "../../esm/_class_check_private_static_field_descriptor.js"
}
@@ -0,0 +1,134 @@
# through2
[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)
**A tiny wrapper around Node streams.Transform (Streams2/3) to avoid explicit subclassing noise**
Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.
Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.
```js
fs.createReadStream('ex.txt')
.pipe(through2(function (chunk, enc, callback) {
for (var i = 0; i < chunk.length; i++)
if (chunk[i] == 97)
chunk[i] = 122 // swap 'a' for 'z'
this.push(chunk)
callback()
}))
.pipe(fs.createWriteStream('out.txt'))
.on('finish', () => doSomethingSpecial())
```
Or object streams:
```js
var all = []
fs.createReadStream('data.csv')
.pipe(csv2())
.pipe(through2.obj(function (chunk, enc, callback) {
var data = {
name : chunk[0]
, address : chunk[3]
, phone : chunk[10]
}
this.push(data)
callback()
}))
.on('data', (data) => {
all.push(data)
})
.on('end', () => {
doSomethingSpecial(all)
})
```
Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.
## API
<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>
Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).
### options
The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).
The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:
```js
fs.createReadStream('/tmp/important.dat')
.pipe(through2({ objectMode: true, allowHalfOpen: false },
(chunk, enc, cb) => {
cb(null, 'wut?') // note we can use the second argument on the callback
// to provide data as an alternative to this.push('wut?')
}
)
.pipe(fs.createWriteStream('/tmp/wut.txt'))
```
### transformFunction
The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.
To queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.
Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.
If you **do not provide a `transformFunction`** then you will get a simple pass-through stream.
### flushFunction
The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.
```js
fs.createReadStream('/tmp/important.dat')
.pipe(through2(
(chunk, enc, cb) => cb(null, chunk), // transform is a noop
function (cb) { // flush function
this.push('tacking on an extra buffer to the end');
cb();
}
))
.pipe(fs.createWriteStream('/tmp/wut.txt'));
```
<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>
Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.
```js
var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {
if (record.temp != null && record.unit == "F") {
record.temp = ( ( record.temp - 32 ) * 5 ) / 9
record.unit = "C"
}
this.push(record)
callback()
})
// Create instances of FToC like so:
var converter = new FToC()
// Or:
var converter = FToC()
// Or specify/override options when you instantiate, if you prefer:
var converter = FToC({objectMode: true})
```
## See Also
- [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.
- [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.
- [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.
- [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.
- the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one
## License
**through2** is Copyright (c) Rod Vagg [@rvagg](https://twitter.com/rvagg) and additional contributors and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getBaseType = exports.findInPrototypeChain = void 0;
const findInPrototypeChain_1 = require("./prototype/calculations/findInPrototypeChain");
Object.defineProperty(exports, "findInPrototypeChain", { enumerable: true, get: function () { return findInPrototypeChain_1.findInPrototypeChain; } });
const getBaseType_1 = require("./prototype/calculations/getBaseType");
Object.defineProperty(exports, "getBaseType", { enumerable: true, get: function () { return getBaseType_1.getBaseType; } });
//# sourceMappingURL=index.js.map
@@ -0,0 +1,32 @@
{
"name": "lru-cache",
"description": "A cache object that deletes the least-recently-used items.",
"version": "5.1.1",
"author": "Isaac Z. Schlueter <i@izs.me>",
"keywords": [
"mru",
"lru",
"cache"
],
"scripts": {
"test": "tap test/*.js --100 -J",
"snap": "TAP_SNAPSHOT=1 tap test/*.js -J",
"coveragerport": "tap --coverage-report=html",
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --all; git push origin --tags"
},
"main": "index.js",
"repository": "git://github.com/isaacs/node-lru-cache.git",
"devDependencies": {
"benchmark": "^2.1.4",
"tap": "^12.1.0"
},
"license": "ISC",
"dependencies": {
"yallist": "^3.0.2"
},
"files": [
"index.js"
]
}
@@ -0,0 +1,460 @@
// Copyright (c) 2016 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.
#include "WindowsSecurity.h"
#include <array>
#include "DebugClient.h"
#include "OsModule.h"
#include "OwnedHandle.h"
#include "StringBuilder.h"
#include "WindowsVersion.h"
#include "WinptyAssert.h"
#include "WinptyException.h"
namespace {
struct LocalFreer {
void operator()(void *ptr) {
if (ptr != nullptr) {
LocalFree(reinterpret_cast<HLOCAL>(ptr));
}
}
};
typedef std::unique_ptr<void, LocalFreer> PointerLocal;
template <typename T>
SecurityItem<T> localItem(typename T::type v) {
typedef typename T::type P;
struct Impl : SecurityItem<T>::Impl {
P m_v;
Impl(P v) : m_v(v) {}
virtual ~Impl() {
LocalFree(reinterpret_cast<HLOCAL>(m_v));
}
};
return SecurityItem<T>(v, std::unique_ptr<Impl>(new Impl { v }));
}
Sid allocatedSid(PSID v) {
struct Impl : Sid::Impl {
PSID m_v;
Impl(PSID v) : m_v(v) {}
virtual ~Impl() {
if (m_v != nullptr) {
FreeSid(m_v);
}
}
};
return Sid(v, std::unique_ptr<Impl>(new Impl { v }));
}
} // anonymous namespace
// Returns a handle to the thread's effective security token. If the thread
// is impersonating another user, its token is returned, and otherwise, the
// process' security token is opened. The handle is opened with TOKEN_QUERY.
static OwnedHandle openSecurityTokenForQuery() {
HANDLE token = nullptr;
// It is unclear to me whether OpenAsSelf matters for winpty, or what the
// most appropriate value is.
if (!OpenThreadToken(GetCurrentThread(), TOKEN_QUERY,
/*OpenAsSelf=*/FALSE, &token)) {
if (GetLastError() != ERROR_NO_TOKEN) {
throwWindowsError(L"OpenThreadToken failed");
}
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token)) {
throwWindowsError(L"OpenProcessToken failed");
}
}
ASSERT(token != nullptr &&
"OpenThreadToken/OpenProcessToken token is NULL");
return OwnedHandle(token);
}
// Returns the TokenOwner of the thread's effective security token.
Sid getOwnerSid() {
struct Impl : Sid::Impl {
std::unique_ptr<char[]> buffer;
};
OwnedHandle token = openSecurityTokenForQuery();
DWORD actual = 0;
BOOL success;
success = GetTokenInformation(token.get(), TokenOwner,
nullptr, 0, &actual);
if (success) {
throwWinptyException(L"getOwnerSid: GetTokenInformation: "
L"expected ERROR_INSUFFICIENT_BUFFER");
} else if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
throwWindowsError(L"getOwnerSid: GetTokenInformation: "
L"expected ERROR_INSUFFICIENT_BUFFER");
}
std::unique_ptr<Impl> impl(new Impl);
impl->buffer = std::unique_ptr<char[]>(new char[actual]);
success = GetTokenInformation(token.get(), TokenOwner,
impl->buffer.get(), actual, &actual);
if (!success) {
throwWindowsError(L"getOwnerSid: GetTokenInformation");
}
TOKEN_OWNER tmp;
ASSERT(actual >= sizeof(tmp));
std::copy(
impl->buffer.get(),
impl->buffer.get() + sizeof(tmp),
reinterpret_cast<char*>(&tmp));
return Sid(tmp.Owner, std::move(impl));
}
Sid wellKnownSid(
const wchar_t *debuggingName,
SID_IDENTIFIER_AUTHORITY authority,
BYTE authorityCount,
DWORD subAuthority0/*=0*/,
DWORD subAuthority1/*=0*/) {
PSID psid = nullptr;
if (!AllocateAndInitializeSid(&authority, authorityCount,
subAuthority0,
subAuthority1,
0, 0, 0, 0, 0, 0,
&psid)) {
const auto err = GetLastError();
const auto msg =
std::wstring(L"wellKnownSid: error getting ") +
debuggingName + L" SID";
throwWindowsError(msg.c_str(), err);
}
return allocatedSid(psid);
}
Sid builtinAdminsSid() {
// S-1-5-32-544
SID_IDENTIFIER_AUTHORITY authority = { SECURITY_NT_AUTHORITY };
return wellKnownSid(L"BUILTIN\\Administrators group",
authority, 2,
SECURITY_BUILTIN_DOMAIN_RID, // 32
DOMAIN_ALIAS_RID_ADMINS); // 544
}
Sid localSystemSid() {
// S-1-5-18
SID_IDENTIFIER_AUTHORITY authority = { SECURITY_NT_AUTHORITY };
return wellKnownSid(L"LocalSystem account",
authority, 1,
SECURITY_LOCAL_SYSTEM_RID); // 18
}
Sid everyoneSid() {
// S-1-1-0
SID_IDENTIFIER_AUTHORITY authority = { SECURITY_WORLD_SID_AUTHORITY };
return wellKnownSid(L"Everyone account",
authority, 1,
SECURITY_WORLD_RID); // 0
}
static SecurityDescriptor finishSecurityDescriptor(
size_t daclEntryCount,
EXPLICIT_ACCESSW *daclEntries,
Acl &outAcl) {
{
PACL aclRaw = nullptr;
DWORD aclError =
SetEntriesInAclW(daclEntryCount,
daclEntries,
nullptr, &aclRaw);
if (aclError != ERROR_SUCCESS) {
WStringBuilder sb(64);
sb << L"finishSecurityDescriptor: "
<< L"SetEntriesInAcl failed: " << aclError;
throwWinptyException(sb.c_str());
}
outAcl = localItem<AclTag>(aclRaw);
}
const PSECURITY_DESCRIPTOR sdRaw =
reinterpret_cast<PSECURITY_DESCRIPTOR>(
LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH));
if (sdRaw == nullptr) {
throwWinptyException(L"finishSecurityDescriptor: LocalAlloc failed");
}
SecurityDescriptor sd = localItem<SecurityDescriptorTag>(sdRaw);
if (!InitializeSecurityDescriptor(sdRaw, SECURITY_DESCRIPTOR_REVISION)) {
throwWindowsError(
L"finishSecurityDescriptor: InitializeSecurityDescriptor");
}
if (!SetSecurityDescriptorDacl(sdRaw, TRUE, outAcl.get(), FALSE)) {
throwWindowsError(
L"finishSecurityDescriptor: SetSecurityDescriptorDacl");
}
return std::move(sd);
}
// Create a security descriptor that grants full control to the local system
// account, built-in administrators, and the owner.
SecurityDescriptor
createPipeSecurityDescriptorOwnerFullControl() {
struct Impl : SecurityDescriptor::Impl {
Sid localSystem;
Sid builtinAdmins;
Sid owner;
std::array<EXPLICIT_ACCESSW, 3> daclEntries = {};
Acl dacl;
SecurityDescriptor value;
};
std::unique_ptr<Impl> impl(new Impl);
impl->localSystem = localSystemSid();
impl->builtinAdmins = builtinAdminsSid();
impl->owner = getOwnerSid();
for (auto &ea : impl->daclEntries) {
ea.grfAccessPermissions = GENERIC_ALL;
ea.grfAccessMode = SET_ACCESS;
ea.grfInheritance = NO_INHERITANCE;
ea.Trustee.TrusteeForm = TRUSTEE_IS_SID;
}
impl->daclEntries[0].Trustee.ptstrName =
reinterpret_cast<LPWSTR>(impl->localSystem.get());
impl->daclEntries[1].Trustee.ptstrName =
reinterpret_cast<LPWSTR>(impl->builtinAdmins.get());
impl->daclEntries[2].Trustee.ptstrName =
reinterpret_cast<LPWSTR>(impl->owner.get());
impl->value = finishSecurityDescriptor(
impl->daclEntries.size(),
impl->daclEntries.data(),
impl->dacl);
const auto retValue = impl->value.get();
return SecurityDescriptor(retValue, std::move(impl));
}
SecurityDescriptor
createPipeSecurityDescriptorOwnerFullControlEveryoneWrite() {
struct Impl : SecurityDescriptor::Impl {
Sid localSystem;
Sid builtinAdmins;
Sid owner;
Sid everyone;
std::array<EXPLICIT_ACCESSW, 4> daclEntries = {};
Acl dacl;
SecurityDescriptor value;
};
std::unique_ptr<Impl> impl(new Impl);
impl->localSystem = localSystemSid();
impl->builtinAdmins = builtinAdminsSid();
impl->owner = getOwnerSid();
impl->everyone = everyoneSid();
for (auto &ea : impl->daclEntries) {
ea.grfAccessPermissions = GENERIC_ALL;
ea.grfAccessMode = SET_ACCESS;
ea.grfInheritance = NO_INHERITANCE;
ea.Trustee.TrusteeForm = TRUSTEE_IS_SID;
}
impl->daclEntries[0].Trustee.ptstrName =
reinterpret_cast<LPWSTR>(impl->localSystem.get());
impl->daclEntries[1].Trustee.ptstrName =
reinterpret_cast<LPWSTR>(impl->builtinAdmins.get());
impl->daclEntries[2].Trustee.ptstrName =
reinterpret_cast<LPWSTR>(impl->owner.get());
impl->daclEntries[3].Trustee.ptstrName =
reinterpret_cast<LPWSTR>(impl->everyone.get());
// Avoid using FILE_GENERIC_WRITE because it includes FILE_APPEND_DATA,
// which is equal to FILE_CREATE_PIPE_INSTANCE. Instead, include all the
// flags that comprise FILE_GENERIC_WRITE, except for the one.
impl->daclEntries[3].grfAccessPermissions =
FILE_GENERIC_READ |
FILE_WRITE_ATTRIBUTES | FILE_WRITE_DATA | FILE_WRITE_EA |
STANDARD_RIGHTS_WRITE | SYNCHRONIZE;
impl->value = finishSecurityDescriptor(
impl->daclEntries.size(),
impl->daclEntries.data(),
impl->dacl);
const auto retValue = impl->value.get();
return SecurityDescriptor(retValue, std::move(impl));
}
SecurityDescriptor getObjectSecurityDescriptor(HANDLE handle) {
PACL dacl = nullptr;
PSECURITY_DESCRIPTOR sd = nullptr;
const DWORD errCode = GetSecurityInfo(handle, SE_KERNEL_OBJECT,
OWNER_SECURITY_INFORMATION |
GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION,
nullptr, nullptr, &dacl, nullptr, &sd);
if (errCode != ERROR_SUCCESS) {
throwWindowsError(L"GetSecurityInfo failed");
}
return localItem<SecurityDescriptorTag>(sd);
}
// The (SID/SD)<->string conversion APIs are useful for testing/debugging, so
// create convenient accessor functions for them. They're too slow for
// ordinary use. The APIs exist in XP and up, but the MinGW headers only
// declare the SID<->string APIs, not the SD APIs. MinGW also gets the
// prototype wrong for ConvertStringSidToSidW (LPWSTR instead of LPCWSTR) and
// requires WINVER to be defined. MSVC and MinGW-w64 get everything right, but
// for consistency, use LoadLibrary/GetProcAddress for all four APIs.
typedef BOOL WINAPI ConvertStringSidToSidW_t(
LPCWSTR StringSid,
PSID *Sid);
typedef BOOL WINAPI ConvertSidToStringSidW_t(
PSID Sid,
LPWSTR *StringSid);
typedef BOOL WINAPI ConvertStringSecurityDescriptorToSecurityDescriptorW_t(
LPCWSTR StringSecurityDescriptor,
DWORD StringSDRevision,
PSECURITY_DESCRIPTOR *SecurityDescriptor,
PULONG SecurityDescriptorSize);
typedef BOOL WINAPI ConvertSecurityDescriptorToStringSecurityDescriptorW_t(
PSECURITY_DESCRIPTOR SecurityDescriptor,
DWORD RequestedStringSDRevision,
SECURITY_INFORMATION SecurityInformation,
LPWSTR *StringSecurityDescriptor,
PULONG StringSecurityDescriptorLen);
#define GET_MODULE_PROC(mod, funcName) \
const auto p##funcName = \
reinterpret_cast<funcName##_t*>( \
mod.proc(#funcName)); \
if (p##funcName == nullptr) { \
throwWinptyException( \
L"" L ## #funcName L" API is missing from ADVAPI32.DLL"); \
}
const DWORD kSDDL_REVISION_1 = 1;
std::wstring sidToString(PSID sid) {
OsModule advapi32(L"advapi32.dll");
GET_MODULE_PROC(advapi32, ConvertSidToStringSidW);
wchar_t *sidString = NULL;
BOOL success = pConvertSidToStringSidW(sid, &sidString);
if (!success) {
throwWindowsError(L"ConvertSidToStringSidW failed");
}
PointerLocal freer(sidString);
return std::wstring(sidString);
}
Sid stringToSid(const std::wstring &str) {
// Cast the string from const wchar_t* to LPWSTR because the function is
// incorrectly prototyped in the MinGW sddl.h header. The API does not
// modify the string -- it is correctly prototyped as taking LPCWSTR in
// MinGW-w64, MSVC, and MSDN.
OsModule advapi32(L"advapi32.dll");
GET_MODULE_PROC(advapi32, ConvertStringSidToSidW);
PSID psid = nullptr;
BOOL success = pConvertStringSidToSidW(const_cast<LPWSTR>(str.c_str()),
&psid);
if (!success) {
const auto err = GetLastError();
throwWindowsError(
(std::wstring(L"ConvertStringSidToSidW failed on \"") +
str + L'"').c_str(),
err);
}
return localItem<SidTag>(psid);
}
SecurityDescriptor stringToSd(const std::wstring &str) {
OsModule advapi32(L"advapi32.dll");
GET_MODULE_PROC(advapi32, ConvertStringSecurityDescriptorToSecurityDescriptorW);
PSECURITY_DESCRIPTOR desc = nullptr;
if (!pConvertStringSecurityDescriptorToSecurityDescriptorW(
str.c_str(), kSDDL_REVISION_1, &desc, nullptr)) {
const auto err = GetLastError();
throwWindowsError(
(std::wstring(L"ConvertStringSecurityDescriptorToSecurityDescriptorW failed on \"") +
str + L'"').c_str(),
err);
}
return localItem<SecurityDescriptorTag>(desc);
}
std::wstring sdToString(PSECURITY_DESCRIPTOR sd) {
OsModule advapi32(L"advapi32.dll");
GET_MODULE_PROC(advapi32, ConvertSecurityDescriptorToStringSecurityDescriptorW);
wchar_t *sdString = nullptr;
if (!pConvertSecurityDescriptorToStringSecurityDescriptorW(
sd,
kSDDL_REVISION_1,
OWNER_SECURITY_INFORMATION |
GROUP_SECURITY_INFORMATION |
DACL_SECURITY_INFORMATION,
&sdString,
nullptr)) {
throwWindowsError(
L"ConvertSecurityDescriptorToStringSecurityDescriptor failed");
}
PointerLocal freer(sdString);
return std::wstring(sdString);
}
// Vista added a useful flag to CreateNamedPipe, PIPE_REJECT_REMOTE_CLIENTS,
// that rejects remote connections. Return this flag on Vista, or return 0
// otherwise.
DWORD rejectRemoteClientsPipeFlag() {
if (isAtLeastWindowsVista()) {
// MinGW lacks this flag; MinGW-w64 has it.
const DWORD kPIPE_REJECT_REMOTE_CLIENTS = 8;
return kPIPE_REJECT_REMOTE_CLIENTS;
} else {
trace("Omitting PIPE_REJECT_REMOTE_CLIENTS on pre-Vista OS");
return 0;
}
}
typedef BOOL WINAPI GetNamedPipeClientProcessId_t(
HANDLE Pipe,
PULONG ClientProcessId);
std::tuple<GetNamedPipeClientProcessId_Result, DWORD, DWORD>
getNamedPipeClientProcessId(HANDLE serverPipe) {
OsModule kernel32(L"kernel32.dll");
const auto pGetNamedPipeClientProcessId =
reinterpret_cast<GetNamedPipeClientProcessId_t*>(
kernel32.proc("GetNamedPipeClientProcessId"));
if (pGetNamedPipeClientProcessId == nullptr) {
return std::make_tuple(
GetNamedPipeClientProcessId_Result::UnsupportedOs, 0, 0);
}
ULONG pid = 0;
if (!pGetNamedPipeClientProcessId(serverPipe, &pid)) {
return std::make_tuple(
GetNamedPipeClientProcessId_Result::Failure, 0, GetLastError());
}
return std::make_tuple(
GetNamedPipeClientProcessId_Result::Success,
static_cast<DWORD>(pid),
0);
}
@@ -0,0 +1 @@
{"version":3,"file":"isParentBindingConstraintsWithTag.js","sourceRoot":"","sources":["../../../../src/binding/calculations/isParentBindingConstraintsWithTag.ts"],"names":[],"mappings":";;AAKA,8EAKC;AARD,+EAA4E;AAC5E,6EAA0E;AAE1E,SAAgB,iCAAiC,CAC/C,GAAgB,EAChB,KAAc;IAEd,OAAO,IAAA,uDAA0B,EAAC,IAAA,yDAA2B,EAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7E,CAAC"}
@@ -0,0 +1,41 @@
import arrayEach from './_arrayEach.js';
import baseEach from './_baseEach.js';
import castFunction from './_castFunction.js';
import isArray from './isArray.js';
/**
* Iterates over elements of `collection` and invokes `iteratee` for each element.
* The iteratee is invoked with three arguments: (value, index|key, collection).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* **Note:** As with other "Collections" methods, objects with a "length"
* property are iterated like arrays. To avoid this behavior use `_.forIn`
* or `_.forOwn` for object iteration.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias each
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see _.forEachRight
* @example
*
* _.forEach([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
*
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forEach(collection, iteratee) {
var func = isArray(collection) ? arrayEach : baseEach;
return func(collection, castFunction(iteratee));
}
export default forEach;
@@ -0,0 +1,129 @@
# brace-expansion
[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html),
as known from sh/bash, in JavaScript.
[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion)
[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion)
[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/)
[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion)
## Example
```js
var expand = require('brace-expansion');
expand('file-{a,b,c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('-v{,,}')
// => ['-v', '-v', '-v']
expand('file{0..2}.jpg')
// => ['file0.jpg', 'file1.jpg', 'file2.jpg']
expand('file-{a..c}.jpg')
// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg']
expand('file{2..0}.jpg')
// => ['file2.jpg', 'file1.jpg', 'file0.jpg']
expand('file{0..4..2}.jpg')
// => ['file0.jpg', 'file2.jpg', 'file4.jpg']
expand('file-{a..e..2}.jpg')
// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg']
expand('file{00..10..5}.jpg')
// => ['file00.jpg', 'file05.jpg', 'file10.jpg']
expand('{{A..C},{a..c}}')
// => ['A', 'B', 'C', 'a', 'b', 'c']
expand('ppp{,config,oe{,conf}}')
// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf']
```
## API
```js
var expand = require('brace-expansion');
```
### var expanded = expand(str)
Return an array of all possible and valid expansions of `str`. If none are
found, `[str]` is returned.
Valid expansions are:
```js
/^(.*,)+(.+)?$/
// {a,b,...}
```
A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
A numeric sequence from `x` to `y` inclusive, with optional increment.
If `x` or `y` start with a leading `0`, all the numbers will be padded
to have equal length. Negative numbers and backwards iteration work too.
```js
/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/
// {x..y[..incr]}
```
An alphabetic sequence from `x` to `y` inclusive, with optional increment.
`x` and `y` must be exactly one character, and if given, `incr` must be a
number.
For compatibility reasons, the string `${` is not eligible for brace expansion.
## Installation
With [npm](https://npmjs.org) do:
```bash
npm install brace-expansion
```
## Contributors
- [Julian Gruber](https://github.com/juliangruber)
- [Isaac Z. Schlueter](https://github.com/isaacs)
## Sponsors
This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)!
Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)!
## License
(MIT)
Copyright (c) 2013 Julian Gruber &lt;julian@juliangruber.com&gt;
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,129 @@
/*
* 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.
*/
import {AriaListBoxProps} from '@react-types/listbox';
import {DOMAttributes, KeyboardDelegate, LayoutDelegate, RefObject} from '@react-types/shared';
import {filterDOMProps, mergeProps, useId} from '@react-aria/utils';
import {listData} from './utils';
import {ListState} from '@react-stately/list';
import {useFocusWithin} from '@react-aria/interactions';
import {useLabel} from '@react-aria/label';
import {useSelectableList} from '@react-aria/selection';
export interface ListBoxAria {
/** Props for the listbox element. */
listBoxProps: DOMAttributes,
/** Props for the listbox's visual label element (if any). */
labelProps: DOMAttributes
}
export interface AriaListBoxOptions<T> extends Omit<AriaListBoxProps<T>, 'children'> {
/** Whether the listbox uses virtual scrolling. */
isVirtualized?: boolean,
/**
* An optional keyboard delegate implementation for type to select,
* to override the default.
*/
keyboardDelegate?: KeyboardDelegate,
/**
* A delegate object that provides layout information for items in the collection.
* By default this uses the DOM, but this can be overridden to implement things like
* virtualized scrolling.
*/
layoutDelegate?: LayoutDelegate,
/**
* Whether the listbox items should use virtual focus instead of being focused directly.
*/
shouldUseVirtualFocus?: boolean,
/** Whether selection should occur on press up instead of press down. */
shouldSelectOnPressUp?: boolean,
/** Whether options should be focused when the user hovers over them. */
shouldFocusOnHover?: boolean,
/**
* The behavior of links in the collection.
* - 'action': link behaves like onAction.
* - 'selection': link follows selection interactions (e.g. if URL drives selection).
* - 'override': links override all other interactions (link items are not selectable).
* @default 'override'
*/
linkBehavior?: 'action' | 'selection' | 'override'
}
/**
* Provides the behavior and accessibility implementation for a listbox component.
* A listbox displays a list of options and allows a user to select one or more of them.
* @param props - Props for the listbox.
* @param state - State for the listbox, as returned by `useListState`.
*/
export function useListBox<T>(props: AriaListBoxOptions<T>, state: ListState<T>, ref: RefObject<HTMLElement | null>): ListBoxAria {
let domProps = filterDOMProps(props, {labelable: true});
// Use props instead of state here. We don't want this to change due to long press.
let selectionBehavior = props.selectionBehavior || 'toggle';
let linkBehavior = props.linkBehavior || (selectionBehavior === 'replace' ? 'action' : 'override');
if (selectionBehavior === 'toggle' && linkBehavior === 'action') {
// linkBehavior="action" does not work with selectionBehavior="toggle" because there is no way
// to initiate selection (checkboxes are not allowed inside a listbox). Link items will not be
// selectable in this configuration.
linkBehavior = 'override';
}
let {listProps} = useSelectableList({
...props,
ref,
selectionManager: state.selectionManager,
collection: state.collection,
disabledKeys: state.disabledKeys,
linkBehavior
});
let {focusWithinProps} = useFocusWithin({
onFocusWithin: props.onFocus,
onBlurWithin: props.onBlur,
onFocusWithinChange: props.onFocusChange
});
// Share list id and some props with child options.
let id = useId(props.id);
listData.set(state, {
id,
shouldUseVirtualFocus: props.shouldUseVirtualFocus,
shouldSelectOnPressUp: props.shouldSelectOnPressUp,
shouldFocusOnHover: props.shouldFocusOnHover,
isVirtualized: props.isVirtualized,
onAction: props.onAction,
linkBehavior
});
let {labelProps, fieldProps} = useLabel({
...props,
id,
// listbox is not an HTML input element so it
// shouldn't be labeled by a <label> element.
labelElementType: 'span'
});
return {
labelProps,
listBoxProps: mergeProps(domProps, focusWithinProps, state.selectionManager.selectionMode === 'multiple' ? {
'aria-multiselectable': 'true'
} : {}, {
role: 'listbox',
...mergeProps(fieldProps, listProps)
})
};
}
@@ -0,0 +1,6 @@
# https://tea.xyz/what-is-this-file
---
version: 1.0.0
codeOwners:
- '0x8958579fcDE99f81808e6c89aCFeEc3DF93Ad9bb'
quorum: 1
@@ -0,0 +1,3 @@
declare const _exports: import('eslint').Rule.RuleModule;
export = _exports;
//# sourceMappingURL=jsx-max-depth.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"traversal.js","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["traversal.ts"],"names":[],"mappings":";;AAgBA,kCAEC;AAUD,8BAEC;AAaD,kCAeC;AAUD,8CAKC;AAUD,8BAMC;AASD,0BAEC;AAUD,gDAIC;AAUD,gDAIC;AAhID,yCAOoB;AAEpB;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,IAAa;IACrC,OAAO,IAAA,wBAAW,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC;AAClD,CAAC;AAGD;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,IAAa;IACnC,OAAO,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC;AAC/B,CAAC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,WAAW,CAAC,IAAa;;IACrC,IAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,IAAI,MAAM,IAAI,IAAI;QAAE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;IAE/C,IAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,IAAA,IAAI,GAAW,IAAI,KAAf,EAAE,IAAI,GAAK,IAAI,KAAT,CAAU;IAC1B,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC;QAClB,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,KAAW,IAAI,EAAb,IAAI,UAAA,CAAU,CAAC;IACtB,CAAC;IACD,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC;QAClB,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC,KAAW,IAAI,EAAb,IAAI,UAAA,CAAU,CAAC;IACtB,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,iBAAiB,CAC7B,IAAa,EACb,IAAY;;IAEZ,OAAO,MAAA,IAAI,CAAC,OAAO,0CAAG,IAAI,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,SAAS,CAAC,IAAa,EAAE,IAAY;IACjD,OAAO,CACH,IAAI,CAAC,OAAO,IAAI,IAAI;QACpB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;QACxD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAC7B,CAAC;AACN,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,OAAO,CAAC,IAAa;IACjC,OAAO,IAAI,CAAC,IAAI,CAAC;AACrB,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,IAAa;;IACtC,IAAA,IAAI,GAAK,IAAI,KAAT,CAAU;IACpB,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,IAAA,kBAAK,EAAC,IAAI,CAAC;QAAE,CAAC,KAAW,IAAI,EAAb,IAAI,UAAA,CAAU,CAAC;IACxD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,IAAa;;IACtC,IAAA,IAAI,GAAK,IAAI,KAAT,CAAU;IACpB,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,IAAA,kBAAK,EAAC,IAAI,CAAC;QAAE,CAAC,KAAW,IAAI,EAAb,IAAI,UAAA,CAAU,CAAC;IACxD,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -0,0 +1,7 @@
import type { TSESLint } from '@typescript-eslint/utils';
export interface Options {
exceptions?: string[];
}
export type MessageId = 'notAllowed';
declare const _default: TSESLint.RuleModule<"notAllowed", [(Options | undefined)?], import("../utils/create-rule.ts").ImportXPluginDocs, TSESLint.RuleListener>;
export default _default;
@@ -0,0 +1 @@
{"version":3,"sources":["../../src/react/index.ts","../../src/dynamicMiddleware/react/index.ts"],"sourcesContent":["// This must remain here so that the `mangleErrors.cjs` build script\n// does not have to import this into each source file it rewrites.\nimport { formatProdErrorMessage } from '@reduxjs/toolkit';\nexport * from '@reduxjs/toolkit';\nexport { createDynamicMiddleware } from '../dynamicMiddleware/react';\nexport type { CreateDispatchWithMiddlewareHook } from '../dynamicMiddleware/react/index';","import type { DynamicMiddlewareInstance, GetDispatch, GetState, MiddlewareApiConfig, TSHelpersExtractDispatchExtensions } from '@reduxjs/toolkit';\nimport { createDynamicMiddleware as cDM } from '@reduxjs/toolkit';\nimport type { Context } from 'react';\nimport type { ReactReduxContextValue } from 'react-redux';\nimport { createDispatchHook, ReactReduxContext, useDispatch as useDefaultDispatch } from 'react-redux';\nimport type { Action, Dispatch, Middleware, UnknownAction } from 'redux';\nexport type UseDispatchWithMiddlewareHook<Middlewares extends Middleware<any, State, DispatchType>[] = [], State = any, DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>> = () => TSHelpersExtractDispatchExtensions<Middlewares> & DispatchType;\nexport type CreateDispatchWithMiddlewareHook<State = any, DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>> = {\n <Middlewares extends [Middleware<any, State, DispatchType>, ...Middleware<any, State, DispatchType>[]]>(...middlewares: Middlewares): UseDispatchWithMiddlewareHook<Middlewares, State, DispatchType>;\n withTypes<MiddlewareConfig extends MiddlewareApiConfig>(): CreateDispatchWithMiddlewareHook<GetState<MiddlewareConfig>, GetDispatch<MiddlewareConfig>>;\n};\ntype ActionFromDispatch<DispatchType extends Dispatch<Action>> = DispatchType extends Dispatch<infer Action> ? Action : never;\ntype ReactDynamicMiddlewareInstance<State = any, DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>> = DynamicMiddlewareInstance<State, DispatchType> & {\n createDispatchWithMiddlewareHookFactory: (context?: Context<ReactReduxContextValue<State, ActionFromDispatch<DispatchType>> | null>) => CreateDispatchWithMiddlewareHook<State, DispatchType>;\n createDispatchWithMiddlewareHook: CreateDispatchWithMiddlewareHook<State, DispatchType>;\n};\nexport const createDynamicMiddleware = <State = any, DispatchType extends Dispatch<UnknownAction> = Dispatch<UnknownAction>>(): ReactDynamicMiddlewareInstance<State, DispatchType> => {\n const instance = cDM<State, DispatchType>();\n const createDispatchWithMiddlewareHookFactory = (\n // @ts-ignore\n context: Context<ReactReduxContextValue<State, ActionFromDispatch<DispatchType>> | null> = ReactReduxContext) => {\n const useDispatch = context === ReactReduxContext ? useDefaultDispatch : createDispatchHook(context);\n function createDispatchWithMiddlewareHook<Middlewares extends Middleware<any, State, DispatchType>[]>(...middlewares: Middlewares) {\n instance.addMiddleware(...middlewares);\n return useDispatch;\n }\n createDispatchWithMiddlewareHook.withTypes = () => createDispatchWithMiddlewareHook;\n return createDispatchWithMiddlewareHook as CreateDispatchWithMiddlewareHook<State, DispatchType>;\n };\n const createDispatchWithMiddlewareHook = createDispatchWithMiddlewareHookFactory();\n return {\n ...instance,\n createDispatchWithMiddlewareHookFactory,\n createDispatchWithMiddlewareHook\n };\n};"],"mappings":";AAGA,cAAc;;;ACFd,SAAS,2BAA2B,WAAW;AAG/C,SAAS,oBAAoB,mBAAmB,eAAe,0BAA0B;AAYlF,IAAM,0BAA0B,MAAgJ;AACrL,QAAM,WAAW,IAAyB;AAC1C,QAAM,0CAA0C,CAEhD,UAA2F,sBAAsB;AAC/G,UAAM,cAAc,YAAY,oBAAoB,qBAAqB,mBAAmB,OAAO;AACnG,aAASA,qCAAgG,aAA0B;AACjI,eAAS,cAAc,GAAG,WAAW;AACrC,aAAO;AAAA,IACT;AACA,IAAAA,kCAAiC,YAAY,MAAMA;AACnD,WAAOA;AAAA,EACT;AACA,QAAM,mCAAmC,wCAAwC;AACjF,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACF;AACF;","names":["createDispatchWithMiddlewareHook"]}
@@ -0,0 +1,18 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _rewriteStackTrace = require("./rewrite-stack-trace.js");
class ConfigError extends Error {
constructor(message, filename) {
super(message);
(0, _rewriteStackTrace.expectedError)(this);
if (filename) (0, _rewriteStackTrace.injectVirtualStackFrame)(this, filename);
}
}
exports.default = ConfigError;
0 && 0;
//# sourceMappingURL=config-error.js.map
@@ -0,0 +1,46 @@
Note regarding ENABLE_EXTENDED_FLAGS (2016-05-30)
There is a complicated interaction between the ENABLE_EXTENDED_FLAGS flag
and the ENABLE_QUICK_EDIT_MODE and ENABLE_INSERT_MODE flags (presumably for
backwards compatibility?). I studied the behavior on Windows 7 and Windows
10, with both the old and new consoles, and I didn't see any differences
between versions. Here's what I seemed to observe:
- The console has three flags internally:
- QuickEdit
- InsertMode
- ExtendedFlags
- SetConsoleMode psuedocode:
void SetConsoleMode(..., DWORD mode) {
ExtendedFlags = (mode & (ENABLE_EXTENDED_FLAGS
| ENABLE_QUICK_EDIT_MODE
| ENABLE_INSERT_MODE )) != 0;
if (ExtendedFlags) {
QuickEdit = (mode & ENABLE_QUICK_EDIT_MODE) != 0;
InsertMode = (mode & ENABLE_INSERT_MODE) != 0;
}
}
- Setting QuickEdit or InsertMode from the properties dialog GUI does not
affect the ExtendedFlags setting -- it simply toggles the one flag.
- GetConsoleMode psuedocode:
GetConsoleMode(..., DWORD *result) {
if (ExtendedFlags) {
*result |= ENABLE_EXTENDED_FLAGS;
if (QuickEdit) { *result |= ENABLE_QUICK_EDIT_MODE; }
if (InsertMode) { *result |= ENABLE_INSERT_MODE; }
}
}
Effectively, the ExtendedFlags flags controls whether the other two flags
are visible/controlled by the user application. If they aren't visible,
though, there is no way for the user application to make them visible,
except by overwriting their values! Calling SetConsoleMode with just
ENABLE_EXTENDED_FLAGS would clear the extended flags we want to read.
Consequently, if a program temporarily alters the QuickEdit flag (e.g. to
enable mouse input), it cannot restore the original values of the QuickEdit
and InsertMode flags, UNLESS every other console program cooperates by
keeping the ExtendedFlags flag set.
@@ -0,0 +1,17 @@
// Returns global object of a current environment.
export default (() => {
if (typeof global !== 'undefined' && global.Math === Math) {
return global;
}
if (typeof self !== 'undefined' && self.Math === Math) {
return self;
}
if (typeof window !== 'undefined' && window.Math === Math) {
return window;
}
// eslint-disable-next-line no-new-func
return Function('return this')();
})();
@@ -0,0 +1,843 @@
export default `flf2a$ 8 4 14 0 25 0 16256
Cricket by Leslie Bates Jan. 1, 1996
cricket9@aros.net http://www.aros.net/~cricket9
I wish to thank Wade Fincher for the SIG that was used as a base for Cricket as
well as Chris Gill who designed the Square font, some of which was used in
Cricket. And finally I wish to thank Paul Burton, who if it was not for his
desire to create FIGWin, I may never have had the motivation to create a
FIGfont.
FIGWin is the Windows clone of FIGlet with a full featured FIGfont editor!
Forget about doing the math to figure out the smushmode number. Just check a
few boxes for each smushing rule. Forget about endmarks -- let the computer
figure out how tall and how wide your font is. Just draw FIGfonts with the
mouse and wipe the smudgemarks off your screen from all that counting!
FIGWin is full of features, but it's designed for use by a complete idiot. If
you qualify, visit the FIGWin website. Screen shots are shown, and of course
you can download it. (FREE!)
http://home.earthlink.net/~solution
Also see the FIGlet website: http://st-www.cs.uiuc.edu/users/chai/figlet.html
---
Font modified June 17, 2007 by patorjk
This was to widen the space character.
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ @
| |@
|__|@
|__|@
@
@
@
@@
____ @
| | |@
|_|_|@
@
@
@
@
@@
_____ @
_| | |_ @
|_ _|@
|_ _|@
|__|__| @
@
@
@@
__,-,__ @
| ' '__|@
|__ |@
|_______|@
|_| @
@
@
@@
__ ___ @
|__| |@
| __|@
|___|__|@
@
@
@
@@
__,-,__ @
| ' '__|@
| __|@
|_______|@
|_| @
@
@
@@
__ @
| |@
|_|@
@
@
@
@
@@
___ @
,' _|@
| | @
| |_ @
\`.___|@
@
@
@@
___ @
|_ \`.@
| |@
_| |@
|___,'@
@
@
@@
__ _ __ @
| | | |@
> < @
|__|_|__|@
@
@
@
@@
__ @
_| |_ @
|_ _|@
|__| @
@
@
@
@@
@
@
__ @
| |@
|_|@
@
@
@@
@
______ @
|______|@
@
@
@
@
@@
@
@
__ @
|__|@
@
@
@
@@
___@
/ /@
,' ,' @
/__/ @
@
@
@
@@
_______ @
| _ |@
|. | |@
|. | |@
|: 1 |@
|::.. . |@
\`-------'@
@@
_____ @
| _ |@
|.| |@
\`-|. |@
|: |@
|::.|@
\`---'@
@@
_______ @
| |@
|___| |@
/ ___/ @
|: 1 \\ @
|::.. . |@
\`-------'@
@@
_______ @
| _ |@
|___| |@
_(__ |@
|: 1 |@
|::.. . |@
\`-------'@
@@
___ ___ @
| Y |@
| | |@
|____ |@
|: |@
|::.|@
\`---'@
@@
_______ @
| _ |@
| 1___|@
|____ |@
|: 1 |@
|::.. . |@
\`-------'@
@@
_______ @
| _ |@
| 1___|@
|. \\ @
|: 1 |@
|::.. . |@
\`-------'@
@@
_______ @
| _ |@
|___| |@
/ / @
| | @
| | @
\`---' @
@@
_______ @
| _ |@
|. | |@
|. _ |@
|: 1 |@
|::.. . |@
\`-------'@
@@
_______ @
| _ |@
| | |@
\\___ |@
|: 1 |@
|::.. . |@
\`-------'@
@@
__ @
|__|@
__ @
|__|@
@
@
@
@@
__ @
|__|@
__ @
| |@
|_|@
@
@
@@
__ @
,' _|@
/ / @
\\ \\_ @
\`.__|@
@
@
@@
@
______ @
|______|@
|______|@
@
@
@
@@
__ @
|_ \`. @
\\ \\@
_/ /@
|__,' @
@
@
@@
_____ @
|__ |@
', ,- @
|--| @
'-- @
@
@
@@
_________ @
| ___ |@
| | _ |@
| |______|@
|_________|@
@
@
@@
_______ @
| _ |@
|. 1 |@
|. _ |@
|: | |@
|::.|:. |@
\`--- ---'@
@@
_______ @
| _ \\ @
|. 1 / @
|. _ \\ @
|: 1 \\@
|::.. . /@
\`-------' @
@@
_______ @
| _ |@
|. 1___|@
|. |___ @
|: 1 |@
|::.. . |@
\`-------'@
@@
______ @
| _ \\ @
|. | \\ @
|. | \\@
|: 1 /@
|::.. . / @
\`------' @
@@
_______ @
| _ |@
|. 1___|@
|. __)_ @
|: 1 |@
|::.. . |@
\`-------'@
@@
_______ @
| _ |@
|. 1___|@
|. __) @
|: | @
|::.| @
\`---' @
@@
_______ @
| _ |@
|. |___|@
|. | |@
|: 1 |@
|::.. . |@
\`-------'@
@@
___ ___ @
| Y |@
|. 1 |@
|. _ |@
|: | |@
|::.|:. |@
\`--- ---'@
@@
___ @
| |@
|. |@
|. |@
|: |@
|::.|@
\`---'@
@@
_______ @
| _ |@
|___| |@
|. | |@
|: 1 |@
|::.. . |@
\`-------'@
@@
___ ___ @
| Y ) @
|. 1 / @
|. _ \\ @
|: | \\ @
|::.| . )@
\`--- ---' @
@@
___ @
| | @
|. | @
|. |___ @
|: 1 |@
|::.. . |@
\`-------'@
@@
___ ___ @
| Y |@
|. |@
|. \\_/ |@
|: | |@
|::.|:. |@
\`--- ---'@
@@
______ @
| _ \\ @
|. | |@
|. | |@
|: | |@
|::.| |@
\`--- ---'@
@@
_______ @
| _ |@
|. | |@
|. | |@
|: 1 |@
|::.. . |@
\`-------'@
@@
_______ @
| _ |@
|. 1 |@
|. ____|@
|: | @
|::.| @
\`---' @
@@
_______ @
| _ |@
|. | |@
|. | |@
|: 1 |@
|::.. |@
\`----|:.|@
\`--'@@
_______ @
| _ \\@
|. l /@
|. _ 1@
|: | |@
|::.|:. |@
\`--- ---'@
@@
_______ @
| _ |@
| 1___|@
|____ |@
|: 1 |@
|::.. . |@
\`-------'@
@@
_______ @
| |@
|.| | |@
\`-|. |-'@
|: | @
|::.| @
\`---' @
@@
___ ___ @
| Y |@
|. | |@
|. | |@
|: 1 |@
|::.. . |@
\`-------'@
@@
___ ___ @
| Y |@
|. | |@
|. | |@
|: 1 |@
\\:.. ./ @
\`---' @
@@
___ ___ @
| Y |@
|. | |@
|. / \\ |@
|: |@
|::.|:. |@
\`--- ---'@
@@
___ ___ @
( Y ) @
\\ 1 / @
/ _ \\ @
/: | \\ @
(::. |:. )@
\`--- ---' @
@@
___ ___ @
| Y |@
| 1 |@
\\_ _/ @
|: | @
|::.| @
\`---' @
@@
_______ @
| _ |@
|___| |@
/ ___/ @
|: 1 \\ @
|::.. . |@
\`-------'@
@@
____ @
| _|@
| | @
| |_ @
|____|@
@
@
@@
___ @
\\ \\ @
\`. \`. @
\\__\\@
@
@
@
@@
____ @
|_ |@
| |@
_| |@
|____|@
@
@
@@
____ @
| |@
|_/\\_|@
@
@
@
@
@@
@
@
@
______ @
|______|@
@
@
@@
__ @
| |@
|_| @
@
@
@
@
@@
@
.---.-.@
| _ |@
|___._|@
@
@
@
@@
__ @
| |--.@
| _ |@
|_____|@
@
@
@
@@
@
.----.@
| __|@
|____|@
@
@
@
@@
__ @
.--| |@
| _ |@
|_____|@
@
@
@
@@
@
.-----.@
| -__|@
|_____|@
@
@
@
@@
___ @
.' _|@
| _|@
|__| @
@
@
@
@@
@
.-----.@
| _ |@
|___ |@
|_____|@
@
@
@@
__ @
| |--.@
| |@
|__|__|@
@
@
@
@@
__ @
|__|@
| |@
|__|@
@
@
@
@@
__ @
|__|@
| |@
| |@
|___|@
@
@
@@
__ @
| |--.@
| < @
|__|__|@
@
@
@
@@
__ @
| |@
| |@
|__|@
@
@
@
@@
@
.--------.@
| |@
|__|__|__|@
@
@
@
@@
@
.-----.@
| |@
|__|__|@
@
@
@
@@
@
.-----.@
| _ |@
|_____|@
@
@
@
@@
@
.-----.@
| _ |@
| __|@
|__| @
@
@
@@
@
.-----.@
| _ |@
|__ |@
|__|@
@
@
@@
@
.----.@
| _|@
|__| @
@
@
@
@@
@
.-----.@
|__ --|@
|_____|@
@
@
@
@@
__ @
| |_ @
| _|@
|____|@
@
@
@
@@
@
.--.--.@
| | |@
|_____|@
@
@
@
@@
@
.--.--.@
| | |@
\\___/ @
@
@
@
@@
@
.--.--.--.@
| | | |@
|________|@
@
@
@
@@
@
.--.--.@
|_ _|@
|__.__|@
@
@
@
@@
@
.--.--.@
| | |@
|___ |@
|_____|@
@
@
@@
@
.-----.@
|-- __|@
|_____|@
@
@
@
@@
___ @
| _|@
/ / @
\\ \\_ @
|___|@
@
@
@@
__ @
| |@
| |@
| |@
|__|@
@
@
@@
___ @
|_ | @
\\ \\@
_/ /@
|___| @
@
@
@@
___ @
| ' |@
|_,_| @
@
@
@
@
@@
.--.--.@
|-----|@
| - |@
|__|__|@
@
@
@
@@
.--.--.@
|-----|@
| _ |@
|_____|@
@
@
@
@@
.--.--.@
|--|--|@
| | |@
|_____|@
@
@
@
@@
.--.--.@
|---.-|@
| _ |@
|___._|@
@
@
@
@@
.--.--.@
|-----|@
| _ |@
|_____|@
@
@
@
@@
.--.--.@
|--|--|@
| | |@
|_____|@
@
@
@
@@
_______ @
| __ \\@
| __ <@
| |____/@
|__| @
@
@
@@
`
@@ -0,0 +1,25 @@
"use strict";
var ExtendedKeyUsage_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.id_kp_OCSPSigning = exports.id_kp_timeStamping = exports.id_kp_emailProtection = exports.id_kp_codeSigning = exports.id_kp_clientAuth = exports.id_kp_serverAuth = exports.anyExtendedKeyUsage = exports.ExtendedKeyUsage = exports.id_ce_extKeyUsage = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const object_identifiers_1 = require("../object_identifiers");
exports.id_ce_extKeyUsage = `${object_identifiers_1.id_ce}.37`;
let ExtendedKeyUsage = ExtendedKeyUsage_1 = class ExtendedKeyUsage extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, ExtendedKeyUsage_1.prototype);
}
};
exports.ExtendedKeyUsage = ExtendedKeyUsage;
exports.ExtendedKeyUsage = ExtendedKeyUsage = ExtendedKeyUsage_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence, itemType: asn1_schema_1.AsnPropTypes.ObjectIdentifier })
], ExtendedKeyUsage);
exports.anyExtendedKeyUsage = `${exports.id_ce_extKeyUsage}.0`;
exports.id_kp_serverAuth = `${object_identifiers_1.id_kp}.1`;
exports.id_kp_clientAuth = `${object_identifiers_1.id_kp}.2`;
exports.id_kp_codeSigning = `${object_identifiers_1.id_kp}.3`;
exports.id_kp_emailProtection = `${object_identifiers_1.id_kp}.4`;
exports.id_kp_timeStamping = `${object_identifiers_1.id_kp}.8`;
exports.id_kp_OCSPSigning = `${object_identifiers_1.id_kp}.9`;
@@ -0,0 +1 @@
{"version":3,"file":"resolveInstanceBindingConstructorParams.spec.d.ts","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveInstanceBindingConstructorParams.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,312 @@
flf2a$ 3 2 11 0 5
Tiny Tengwar 1.0 by Belinda Asbell <mba@ccd.harris.com>
Adapted from Mike Urban's <urban@sideshow.jpl.nasa.gov> Tengwar for
Metafont (which is, in turn, based on Tolkien :)
Date: 28 Feb 1996
$@
$@
$@@
/$@
\$@
/$@@
/ /$@
$@
$@@
_||_$@
-||-$@
$@@
(|`$@
.|)$@
$@@
o/$@
/o$@
$@@
Q $@
(_X$@
$@@
/$@
$@
$@@
/$@
| $@
\$@@
\ $@
|$@
/ $@@
\|/$@
/|\$@
$@@
_|_$@
| $@
$@@
$@
$@
/$@@
$@
--$@
$@@
..$@
..$@
$@@
/$@
/ $@
$@@
`~\$@
,_/$@
$@@
___$@
(_ $@
$@@
____$@
(_(_$@
$@@
______$@
(_(_(_$@
$@@
~| $@
| $@
(_,$@@
~|__$@
|(_$@
(_, $@@
~|____$@
|(_(_$@
(_, $@@
~|$@
|$@
(_|$@@
~|_ $@
|_)_$@
(_| $@@
~|_ _ $@
|_)_)_$@
(_| $@@
$@
.$@
$@@
.$@
.$@
$@@
,'$@
`.$@
$@@
__$@
--$@
$@@
\ $@
>$@
/ $@@
|)$@
|)$@
| $@@
/~\$@
|@/$@
$@@
.',$@
| $@
$@@
_ _ $@
|_)_)$@
| $@@
$@
(_|$@
|$@@
_ _ $@
| ) )$@
| $@@
,'$@
|$@
$@@
|_ $@
|_)$@
$@@
_____$@
(_(_|$@
|$@@
\ $@
/\$@
$@@
'$@
|$@
$@@
$@
(_(_|$@
|$@@
___$@
(_|$@
|$@@
$@
---$@
(_,$@@
_ _ $@
|_)_)$@
$@@
_ _ $@
| ) )$@
$@@
c$@
|$@
$@@
_ $@
|_)_$@
| $@@
__|$@
(_|$@
$@@
$@
\/$@
(,$@@
_ $@
( )$@
/ $@@
_ $@
| )$@
| $@@
?$@
|$@
$@@
|_ _ $@
|_)_)_$@
$@@
_ $@
| )$@
~~~$@@
|$@
(_(_|$@
$@@
_ $@
'_)$@
$@@
_ $@
( )$@
/)$@@
|~$@
| $@
|_$@@
\ $@
\$@
$@@
~|$@
|$@
_|$@@
/\$@
$@
$@@
$@
$@
___$@@
\ $@
\$@
$@@
.',$@
| $@
$@@
_ _ $@
|_)_)$@
| $@@
$@
(_|$@
|$@@
_ _ $@
| ) )$@
| $@@
,'$@
|$@
$@@
|_ $@
|_)$@
$@@
_____$@
(_(_|$@
|$@@
\ $@
/\$@
$@@
'$@
|$@
$@@
$@
(_(_|$@
|$@@
___$@
(_|$@
|$@@
$@
---$@
(_,$@@
_ _ $@
|_)_)$@
$@@
_ _ $@
| ) )$@
$@@
c$@
|$@
$@@
$@
|~)$@
|~~$@@
__|$@
(_|$@
$@@
$@
\/$@
(,$@@
$@
(~)$@
/ $@@
$@
|~)$@
| $@@
?$@
|$@
$@@
|_ _ $@
|_)_)_$@
$@@
$@
|~)$@
~~~$@@
|$@
(_(_|$@
$@@
_ $@
'_)$@
$@@
$@
(~)$@
/)$@@
(~$@
< $@
(_$@@
|$@
|$@
|$@@
~)$@
>$@
_)$@@
'`'$@
$@
$@@
$@
$@
$@@
$@
$@
$@@
$@
$@
$@@
$@
$@
$@@
$@
$@
$@@
$@
$@
$@@
$@
$@
$@@
@@ -0,0 +1,8 @@
"use client";
import {
useCheckbox
} from "./chunk-VBM6YDUQ.mjs";
import "./chunk-LK575OWX.mjs";
export {
useCheckbox
};
@@ -0,0 +1,9 @@
/**
* @file DOM解析器,兼容node端和浏览器端
* @author mengke01(kekee000@gmail.com)
*/
/* eslint-disable no-undef */
export default typeof window !== 'undefined' && window.DOMParser
? window.DOMParser
: require('@xmldom/xmldom').DOMParser;
@@ -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","130":"O P"},C:{"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 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 yC zC 0C 1C","578":"JC KC LC Q H R WC S T U"},D:{"1":"0 1 2 3 4 5 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 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"},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","4":"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 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 FD GD HD ID NC uC JD OC"},G:{"2":"E ZC KD vC LD MD ND OD PD QD RD SD TD","4":"gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC","260":"UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC"},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 J AB BB CB DB EB FB oD pD qD rD sD aC tD uD vD wD xD QC RC SC yD"},Q:{"1":"zD"},R:{"1":"0D"},S:{"2":"1D 2D"}},B:5,C:"Add to home screen (A2HS)",D:false};
@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.preDestroy = preDestroy;
const reflect_metadata_utils_1 = require("@inversifyjs/reflect-metadata-utils");
const classMetadataReflectKey_1 = require("../../reflectMetadata/data/classMetadataReflectKey");
const updateMaybeClassMetadataPreDestroy_1 = require("../actions/updateMaybeClassMetadataPreDestroy");
const getDefaultClassMetadata_1 = require("../calculations/getDefaultClassMetadata");
const handleInjectionError_1 = require("../calculations/handleInjectionError");
function preDestroy() {
return (target, propertyKey, _descriptor) => {
try {
(0, reflect_metadata_utils_1.updateOwnReflectMetadata)(target.constructor, classMetadataReflectKey_1.classMetadataReflectKey, getDefaultClassMetadata_1.getDefaultClassMetadata, (0, updateMaybeClassMetadataPreDestroy_1.updateMaybeClassMetadataPreDestroy)(propertyKey));
}
catch (error) {
(0, handleInjectionError_1.handleInjectionError)(target, propertyKey, undefined, error);
}
};
}
//# sourceMappingURL=preDestroy.js.map
@@ -0,0 +1 @@
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../src/rules/order.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAiBrC,OAAO,EACL,QAAQ,EACR,UAAU,EACV,eAAe,EACf,UAAU,GACX,MAAM,mBAAmB,CAAA;AAE1B,MAAM,GAAG,GAAG,KAAK,CAAC,oCAAoC,CAAC,CAAA;AAGvD,MAAM,OAAO,GAAG,CACd,KAAU,EACV,OAAoD,EACpD,EAAE,CACF,KAAK,CAAC,MAAM,CAAsB,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE;IACrD,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAC/B;IAAA,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC7B,OAAO,GAAG,CAAA;AACZ,CAAC,EAAE,EAAE,CAAC,CAAA;AAER,MAAM,UAAU,GAAG;IACjB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACV,CAAA;AAIV,MAAM,aAAa,GAAG;IACpB,SAAS;IACT,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;CACC,CAAA;AAIV,SAAS,OAAO,CAAC,KAA4B;IAC3C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,EAAE,CAAA;AAC5D,CAAC;AAED,SAAS,wBAAwB,CAC/B,UAA+B,EAC/B,IAAmB,EACnB,KAAa;IAEb,IAAI,kBAAkB,GAA0C,IAAI,CAAA;IACpE,MAAM,MAAM,GAA0C,EAAE,CAAA;IACxD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,kBAAkB,GAAG,UAAU,CAAC,aAAa,CAAC,kBAAkB,EAAE;YAChE,eAAe,EAAE,IAAI;SACtB,CAAC,CAAA;QACF,IAAI,kBAAkB,IAAI,IAAI,EAAE,CAAC;YAC/B,MAAK;QACP,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IACjC,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,yBAAyB,CAChC,UAA+B,EAC/B,IAAmB,EACnB,KAAa;IAEb,IAAI,kBAAkB,GAA0C,IAAI,CAAA;IACpE,MAAM,MAAM,GAA0C,EAAE,CAAA;IACxD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,kBAAkB,GAAG,UAAU,CAAC,cAAc,CAAC,kBAAkB,EAAE;YACjE,eAAe,EAAE,IAAI;SACtB,CAAC,CAAA;QACF,IAAI,kBAAkB,IAAI,IAAI,EAAE,CAAC;YAC/B,MAAK;QACP,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IACjC,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACzB,CAAC;AAED,SAAS,oBAAoB,CAC3B,UAA+B,EAC/B,IAAmB,EACnB,SAAmE;IAEnE,MAAM,MAAM,GAAG,wBAAwB,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,CAAA;IAC9D,MAAM,MAAM,GAA0C,EAAE,CAAA;IACxD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACrB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACpB,CAAC;aAAM,CAAC;YACN,MAAK;QACP,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,qBAAqB,CAC5B,UAA+B,EAC/B,IAAmB,EACnB,SAAmE;IAEnE,MAAM,MAAM,GAAG,yBAAyB,CAAC,UAAU,EAAE,IAAI,EAAE,GAAG,CAAC,CAAA;IAC/D,MAAM,MAAM,GAA0C,EAAE,CAAA;IACxD,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACzB,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAA;QACxB,CAAC;aAAM,CAAC;YACN,MAAK;QACP,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,OAAO,EAAE,CAAA;AACzB,CAAC;AAED,SAAS,cAAc,CAAC,QAA+B;IACrD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAA;IACX,CAAC;IACD,IAAI,eAAe,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACjC,OAAO,QAAQ,CAAC,MAAM,CAAC,UAAU,cAAc;QAC7C,MAAM,GAAG,GAAG,cAAc,CAAC,IAAI,GAAG,eAAe,CAAC,IAAI,CAAA;QACtD,IAAI,eAAe,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC;YAC/C,eAAe,GAAG,cAAc,CAAA;QAClC,CAAC;QACD,OAAO,GAAG,CAAA;IACZ,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,IAAmB;IACvC,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB,OACE,MAAM,CAAC,MAAM,IAAI,IAAI;QACrB,CAAC,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,EAC1D,CAAC;QACD,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;IACxB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,yBAAyB,CAChC,UAA+B,EAC/B,IAAmB;IAEnB,MAAM,iBAAiB,GAAG,oBAAoB,CAC5C,UAAU,EACV,IAAI,EACJ,mBAAmB,CAAC,IAAI,CAAC,CAC1B,CAAA;IACD,MAAM,WAAW,GACf,iBAAiB,CAAC,MAAM,GAAG,CAAC;QAC1B,CAAC,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1D,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACnB,IAAI,MAAM,GAAG,WAAW,CAAA;IACxB,KAAK,IAAI,CAAC,GAAG,WAAW,EAAE,CAAC,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC1D,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAChC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAA;YACd,MAAK;QACP,CAAC;QACD,IACE,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG;YAC1B,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI;YAC3B,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAC3B,CAAC;YACD,MAAK;QACP,CAAC;QACD,MAAM,GAAG,CAAC,GAAG,CAAC,CAAA;IAChB,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED,SAAS,mBAAmB,CAAC,IAAmB;IAC9C,OAAO,CAAC,KAAqC,EAAE,EAAE,CAC/C,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,CAAC;QACjD,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI;QAC3C,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAA;AAC5C,CAAC;AAED,SAAS,2BAA2B,CAClC,UAA+B,EAC/B,IAAmB;IAEnB,MAAM,iBAAiB,GAAG,qBAAqB,CAC7C,UAAU,EACV,IAAI,EACJ,mBAAmB,CAAC,IAAI,CAAC,CAC1B,CAAA;IACD,MAAM,aAAa,GACjB,iBAAiB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAC9E,IAAI,MAAM,GAAG,aAAa,CAAA;IAC1B,KAAK,IAAI,CAAC,GAAG,aAAa,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YAC9D,MAAK;QACP,CAAC;QACD,MAAM,GAAG,CAAC,CAAA;IACZ,CAAC;IACD,OAAO,MAAM,CAALine truncated
@@ -0,0 +1,60 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
exports.default = (0, util_1.createRule)({
name: 'no-dynamic-delete',
meta: {
type: 'suggestion',
docs: {
description: 'Disallow using the `delete` operator on computed key expressions',
recommended: 'strict',
},
fixable: 'code',
messages: {
dynamicDelete: 'Do not delete dynamically computed property keys.',
},
schema: [],
},
defaultOptions: [],
create(context) {
function createFixer(member) {
if (member.property.type === utils_1.AST_NODE_TYPES.Literal &&
typeof member.property.value === 'string') {
return createPropertyReplacement(member.property, `.${member.property.value}`);
}
return undefined;
}
return {
'UnaryExpression[operator=delete]'(node) {
if (node.argument.type !== utils_1.AST_NODE_TYPES.MemberExpression ||
!node.argument.computed ||
isAcceptableIndexExpression(node.argument.property)) {
return;
}
context.report({
node: node.argument.property,
messageId: 'dynamicDelete',
fix: createFixer(node.argument),
});
},
};
function createPropertyReplacement(property, replacement) {
return (fixer) => fixer.replaceTextRange(getTokenRange(property), replacement);
}
function getTokenRange(property) {
return [
(0, util_1.nullThrows)(context.sourceCode.getTokenBefore(property), util_1.NullThrowsReasons.MissingToken('token before', 'property')).range[0],
(0, util_1.nullThrows)(context.sourceCode.getTokenAfter(property), util_1.NullThrowsReasons.MissingToken('token after', 'property')).range[1],
];
}
},
});
function isAcceptableIndexExpression(property) {
return ((property.type === utils_1.AST_NODE_TYPES.Literal &&
['number', 'string'].includes(typeof property.value)) ||
(property.type === utils_1.AST_NODE_TYPES.UnaryExpression &&
property.operator === '-' &&
property.argument.type === utils_1.AST_NODE_TYPES.Literal &&
typeof property.argument.value === 'number'));
}
@@ -0,0 +1,9 @@
/**
* A simple guard function:
*
* ```js
* Math.min(Math.max(low, value), high)
* ```
*/
declare function guard(low: number, high: number, value: number): number;
export default guard;
@@ -0,0 +1 @@
{"version":3,"names":["_findSuggestion","require","OptionValidator","constructor","descriptor","validateTopLevelOptions","options","TopLevelOptionShape","validOptionNames","Object","keys","option","includes","Error","formatMessage","findSuggestion","validateBooleanOption","name","value","defaultValue","undefined","invariant","validateStringOption","condition","message","exports"],"sources":["../src/validator.ts"],"sourcesContent":["import { findSuggestion } from \"./find-suggestion.ts\";\n\nexport class OptionValidator {\n declare descriptor: string;\n constructor(descriptor: string) {\n this.descriptor = descriptor;\n }\n\n /**\n * Validate if the given `options` follow the name of keys defined in the `TopLevelOptionShape`\n *\n * @param {Object} options\n * @param {Object} TopLevelOptionShape\n * An object with all the valid key names that `options` should be allowed to have\n * The property values of `TopLevelOptionShape` can be arbitrary\n * @memberof OptionValidator\n */\n validateTopLevelOptions(options: object, TopLevelOptionShape: object): void {\n const validOptionNames = Object.keys(TopLevelOptionShape);\n for (const option of Object.keys(options)) {\n if (!validOptionNames.includes(option)) {\n throw new Error(\n this.formatMessage(`'${option}' is not a valid top-level option.\n- Did you mean '${findSuggestion(option, validOptionNames)}'?`),\n );\n }\n }\n }\n\n // note: we do not consider rewrite them to high order functions\n // until we have to support `validateNumberOption`.\n validateBooleanOption<T extends boolean>(\n name: string,\n value?: boolean,\n defaultValue?: T,\n ): boolean | T {\n if (value === undefined) {\n return defaultValue;\n } else {\n this.invariant(\n typeof value === \"boolean\",\n `'${name}' option must be a boolean.`,\n );\n }\n return value;\n }\n\n validateStringOption<T extends string>(\n name: string,\n value?: string,\n defaultValue?: T,\n ): string | T {\n if (value === undefined) {\n return defaultValue;\n } else {\n this.invariant(\n typeof value === \"string\",\n `'${name}' option must be a string.`,\n );\n }\n return value;\n }\n /**\n * A helper interface copied from the `invariant` npm package.\n * It throws given `message` when `condition` is not met\n *\n * @param {boolean} condition\n * @param {string} message\n * @memberof OptionValidator\n */\n invariant(condition: boolean, message: string): void {\n if (!condition) {\n throw new Error(this.formatMessage(message));\n }\n }\n\n formatMessage(message: string): string {\n return `${this.descriptor}: ${message}`;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAEO,MAAMC,eAAe,CAAC;EAE3BC,WAAWA,CAACC,UAAkB,EAAE;IAC9B,IAAI,CAACA,UAAU,GAAGA,UAAU;EAC9B;EAWAC,uBAAuBA,CAACC,OAAe,EAAEC,mBAA2B,EAAQ;IAC1E,MAAMC,gBAAgB,GAAGC,MAAM,CAACC,IAAI,CAACH,mBAAmB,CAAC;IACzD,KAAK,MAAMI,MAAM,IAAIF,MAAM,CAACC,IAAI,CAACJ,OAAO,CAAC,EAAE;MACzC,IAAI,CAACE,gBAAgB,CAACI,QAAQ,CAACD,MAAM,CAAC,EAAE;QACtC,MAAM,IAAIE,KAAK,CACb,IAAI,CAACC,aAAa,CAAC,IAAIH,MAAM;AACvC,kBAAkB,IAAAI,8BAAc,EAACJ,MAAM,EAAEH,gBAAgB,CAAC,IAAI,CACtD,CAAC;MACH;IACF;EACF;EAIAQ,qBAAqBA,CACnBC,IAAY,EACZC,KAAe,EACfC,YAAgB,EACH;IACb,IAAID,KAAK,KAAKE,SAAS,EAAE;MACvB,OAAOD,YAAY;IACrB,CAAC,MAAM;MACL,IAAI,CAACE,SAAS,CACZ,OAAOH,KAAK,KAAK,SAAS,EAC1B,IAAID,IAAI,6BACV,CAAC;IACH;IACA,OAAOC,KAAK;EACd;EAEAI,oBAAoBA,CAClBL,IAAY,EACZC,KAAc,EACdC,YAAgB,EACJ;IACZ,IAAID,KAAK,KAAKE,SAAS,EAAE;MACvB,OAAOD,YAAY;IACrB,CAAC,MAAM;MACL,IAAI,CAACE,SAAS,CACZ,OAAOH,KAAK,KAAK,QAAQ,EACzB,IAAID,IAAI,4BACV,CAAC;IACH;IACA,OAAOC,KAAK;EACd;EASAG,SAASA,CAACE,SAAkB,EAAEC,OAAe,EAAQ;IACnD,IAAI,CAACD,SAAS,EAAE;MACd,MAAM,IAAIV,KAAK,CAAC,IAAI,CAACC,aAAa,CAACU,OAAO,CAAC,CAAC;IAC9C;EACF;EAEAV,aAAaA,CAACU,OAAe,EAAU;IACrC,OAAO,GAAG,IAAI,CAACpB,UAAU,KAAKoB,OAAO,EAAE;EACzC;AACF;AAACC,OAAA,CAAAvB,eAAA,GAAAA,eAAA","ignoreList":[]}
@@ -0,0 +1,71 @@
import fs from 'node:fs';
import { j as join, d as dirname } from './chunk-pathe.M-eThtNZ.js';
const packageCache = new Map();
function findNearestPackageData(basedir) {
const originalBasedir = basedir;
while (basedir) {
var _tryStatSync;
const cached = getCachedData(packageCache, basedir, originalBasedir);
if (cached) {
return cached;
}
const pkgPath = join(basedir, "package.json");
if ((_tryStatSync = tryStatSync(pkgPath)) === null || _tryStatSync === void 0 ? void 0 : _tryStatSync.isFile()) {
const pkgData = JSON.parse(stripBomTag(fs.readFileSync(pkgPath, "utf8")));
if (packageCache) {
setCacheData(packageCache, pkgData, basedir, originalBasedir);
}
return pkgData;
}
const nextBasedir = dirname(basedir);
if (nextBasedir === basedir) {
break;
}
basedir = nextBasedir;
}
return {};
}
function stripBomTag(content) {
if (content.charCodeAt(0) === 65279) {
return content.slice(1);
}
return content;
}
function tryStatSync(file) {
try {
// The "throwIfNoEntry" is a performance optimization for cases where the file does not exist
return fs.statSync(file, { throwIfNoEntry: false });
} catch {}
}
function getCachedData(cache, basedir, originalBasedir) {
const pkgData = cache.get(getFnpdCacheKey(basedir));
if (pkgData) {
traverseBetweenDirs(originalBasedir, basedir, (dir) => {
cache.set(getFnpdCacheKey(dir), pkgData);
});
return pkgData;
}
}
function setCacheData(cache, data, basedir, originalBasedir) {
cache.set(getFnpdCacheKey(basedir), data);
traverseBetweenDirs(originalBasedir, basedir, (dir) => {
cache.set(getFnpdCacheKey(dir), data);
});
}
function getFnpdCacheKey(basedir) {
return `fnpd_${basedir}`;
}
/**
* Traverse between `longerDir` (inclusive) and `shorterDir` (exclusive) and call `cb` for each dir.
* @param longerDir Longer dir path, e.g. `/User/foo/bar/baz`
* @param shorterDir Shorter dir path, e.g. `/User/foo`
*/
function traverseBetweenDirs(longerDir, shorterDir, cb) {
while (longerDir !== shorterDir) {
cb(longerDir);
longerDir = dirname(longerDir);
}
}
export { findNearestPackageData, getCachedData, setCacheData };
@@ -0,0 +1 @@
{"version":3,"file":"generateRegistrationOptions.d.ts","sourceRoot":"","sources":["../../src/registration/generateRegistrationOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oCAAoC,EACpC,8BAA8B,EAC9B,4BAA4B,EAC5B,eAAe,EACf,uBAAuB,EACvB,sCAAsC,EAGtC,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAK3B,MAAM,MAAM,+BAA+B,GAAG,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhG;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,EAAE,uBAAuB,EAqBtE,CAAC;AAsBF;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE;IACP,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,MAAM,CAAC;IACnD,kBAAkB,CAAC,EAAE;QACnB,EAAE,EAAE,eAAe,CAAC;QACpB,UAAU,CAAC,EAAE,4BAA4B,EAAE,CAAC;KAC7C,EAAE,CAAC;IACJ,sBAAsB,CAAC,EAAE,8BAA8B,CAAC;IACxD,UAAU,CAAC,EAAE,oCAAoC,CAAC;IAClD,qBAAqB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAClD,0BAA0B,CAAC,EAAE,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC;CAC7E,GACA,OAAO,CAAC,sCAAsC,CAAC,CAqIjD"}
@@ -0,0 +1,224 @@
# micromark-factory-label
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][bundle-size-badge]][bundle-size]
[![Sponsors][sponsors-badge]][opencollective]
[![Backers][backers-badge]][opencollective]
[![Chat][chat-badge]][chat]
[micromark][] factory to parse labels (found in media, definitions).
## Contents
* [What is this?](#what-is-this)
* [When should I use this?](#when-should-i-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`factoryLabel(…)`](#factorylabel)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package exposes states to parse labels.
## When should I use this?
This package is useful when you are making your own micromark extensions.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-factory-label
```
In Deno with [`esm.sh`][esmsh]:
```js
import {factoryLabel} from 'https://esm.sh/micromark-factory-label@1'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {factoryLabel} from 'https://esm.sh/micromark-factory-label@1?bundle'
</script>
```
## Use
```js
import {ok as assert} from 'devlop'
import {factoryLabel} from 'micromark-factory-label'
import {codes, types} from 'micromark-util-symbol'
// A micromark tokenizer that uses the factory:
/**
* @this {TokenizeContext}
* Context.
* @type {Tokenizer}
*/
function tokenizeDefinition(effects, ok, nok) {
return start
// …
/** @type {State} */
function start(code) {
assert(code === codes.leftSquareBracket, 'expected `[`')
effects.enter(types.definition)
return factoryLabel.call(
self,
effects,
labelAfter,
nok,
types.definitionLabel,
types.definitionLabelMarker,
types.definitionLabelString
)(code)
}
// …
}
```
## API
This module exports the identifier [`factoryLabel`][api-factory-label].
There is no default export.
### `factoryLabel(…)`
Parse labels.
> 👉 **Note**: labels in markdown are capped at 999 characters in the string.
###### Examples
```markdown
[a]
[a
b]
[a\]b]
```
###### Parameters
* `this` (`TokenizeContext`)
— tokenize context
* `effects` (`Effects`)
— context
* `ok` (`State`)
— state switched to when successful
* `nok` (`State`)
— state switched to when unsuccessful
* `type` (`string`)
— type of the whole label (`[a]`)
* `markerType` (`string`)
— type for the markers (`[` and `]`)
* `stringType` (`string`)
— type for the identifier (`a`)
###### Returns
Start state (`State`).
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
`micromark-factory-label@2`, compatible with Node.js 16.
This package works with `micromark@3`.
## Security
This package is safe.
See [`security.md`][securitymd] in [`micromark/.github`][health] for how to
submit a security report.
## Contribute
See [`contributing.md`][contributing] in [`micromark/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/micromark/micromark/workflows/main/badge.svg
[build]: https://github.com/micromark/micromark/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark.svg
[coverage]: https://codecov.io/github/micromark/micromark
[downloads-badge]: https://img.shields.io/npm/dm/micromark-factory-label.svg
[downloads]: https://www.npmjs.com/package/micromark-factory-label
[bundle-size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-label
[bundle-size]: https://bundlejs.com/?q=micromark-factory-label
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[opencollective]: https://opencollective.com/unified
[npm]: https://docs.npmjs.com/cli/install
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
[license]: https://github.com/micromark/micromark/blob/main/license
[author]: https://wooorm.com
[health]: https://github.com/micromark/.github
[securitymd]: https://github.com/micromark/.github/blob/main/security.md
[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
[support]: https://github.com/micromark/.github/blob/main/support.md
[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[typescript]: https://www.typescriptlang.org
[micromark]: https://github.com/micromark/micromark
[api-factory-label]: #factorylabel
@@ -0,0 +1,83 @@
import { timeData } from './time-data.generated';
/**
* 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 function getBestPattern(skeleton, locale) {
var skeletonCopy = '';
for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {
var patternChar = skeleton.charAt(patternPos);
if (patternChar === 'j') {
var extraLength = 0;
while (patternPos + 1 < skeleton.length &&
skeleton.charAt(patternPos + 1) === patternChar) {
extraLength++;
patternPos++;
}
var hourLen = 1 + (extraLength & 1);
var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);
var dayPeriodChar = 'a';
var hourChar = getDefaultHourSymbolFromLocale(locale);
if (hourChar == 'H' || hourChar == 'k') {
dayPeriodLen = 0;
}
while (dayPeriodLen-- > 0) {
skeletonCopy += dayPeriodChar;
}
while (hourLen-- > 0) {
skeletonCopy = hourChar + skeletonCopy;
}
}
else if (patternChar === 'J') {
skeletonCopy += 'H';
}
else {
skeletonCopy += patternChar;
}
}
return skeletonCopy;
}
/**
* Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)
* of the given `locale` to the corresponding time pattern.
* @param locale
*/
function getDefaultHourSymbolFromLocale(locale) {
var hourCycle = locale.hourCycle;
if (hourCycle === undefined &&
// @ts-ignore hourCycle(s) is not identified yet
locale.hourCycles &&
// @ts-ignore
locale.hourCycles.length) {
// @ts-ignore
hourCycle = locale.hourCycles[0];
}
if (hourCycle) {
switch (hourCycle) {
case 'h24':
return 'k';
case 'h23':
return 'H';
case 'h12':
return 'h';
case 'h11':
return 'K';
default:
throw new Error('Invalid hourCycle');
}
}
// TODO: Once hourCycle is fully supported remove the following with data generation
var languageTag = locale.language;
var regionTag;
if (languageTag !== 'root') {
regionTag = locale.maximize().region;
}
var hourCycles = timeData[regionTag || ''] ||
timeData[languageTag || ''] ||
timeData["".concat(languageTag, "-001")] ||
timeData['001'];
return hourCycles[0];
}
@@ -0,0 +1,71 @@
import { stringifyNumber } from '../../stringify/stringifyNumber.js';
const intIdentify = (value) => typeof value === 'bigint' || Number.isInteger(value);
function intResolve(str, offset, radix, { intAsBigInt }) {
const sign = str[0];
if (sign === '-' || sign === '+')
offset += 1;
str = str.substring(offset).replace(/_/g, '');
if (intAsBigInt) {
switch (radix) {
case 2:
str = `0b${str}`;
break;
case 8:
str = `0o${str}`;
break;
case 16:
str = `0x${str}`;
break;
}
const n = BigInt(str);
return sign === '-' ? BigInt(-1) * n : n;
}
const n = parseInt(str, radix);
return sign === '-' ? -1 * n : n;
}
function intStringify(node, radix, prefix) {
const { value } = node;
if (intIdentify(value)) {
const str = value.toString(radix);
return value < 0 ? '-' + prefix + str.substr(1) : prefix + str;
}
return stringifyNumber(node);
}
const intBin = {
identify: intIdentify,
default: true,
tag: 'tag:yaml.org,2002:int',
format: 'BIN',
test: /^[-+]?0b[0-1_]+$/,
resolve: (str, _onError, opt) => intResolve(str, 2, 2, opt),
stringify: node => intStringify(node, 2, '0b')
};
const intOct = {
identify: intIdentify,
default: true,
tag: 'tag:yaml.org,2002:int',
format: 'OCT',
test: /^[-+]?0[0-7_]+$/,
resolve: (str, _onError, opt) => intResolve(str, 1, 8, opt),
stringify: node => intStringify(node, 8, '0')
};
const int = {
identify: intIdentify,
default: true,
tag: 'tag:yaml.org,2002:int',
test: /^[-+]?[0-9][0-9_]*$/,
resolve: (str, _onError, opt) => intResolve(str, 0, 10, opt),
stringify: stringifyNumber
};
const intHex = {
identify: intIdentify,
default: true,
tag: 'tag:yaml.org,2002:int',
format: 'HEX',
test: /^[-+]?0x[0-9a-fA-F_]+$/,
resolve: (str, _onError, opt) => intResolve(str, 2, 16, opt),
stringify: node => intStringify(node, 16, '0x')
};
export { int, intBin, intHex, intOct };
@@ -0,0 +1,46 @@
'use strict';
var _contextCompat = require('eslint-module-utils/contextCompat');
var _docsUrl = require('../docsUrl');var _docsUrl2 = _interopRequireDefault(_docsUrl);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { 'default': obj };}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/**
* @fileoverview Rule to prefer imports to AMD
* @author Jamund Ferguson
*/module.exports = { meta: { type: 'suggestion',
docs: {
category: 'Module systems',
description: 'Forbid AMD `require` and `define` calls.',
url: (0, _docsUrl2['default'])('no-amd') },
schema: [] },
create: function () {function create(context) {
return {
CallExpression: function () {function CallExpression(node) {
if ((0, _contextCompat.getScope)(context, node).type !== 'module') {return;}
if (node.callee.type !== 'Identifier') {return;}
if (node.callee.name !== 'require' && node.callee.name !== 'define') {return;}
// todo: capture define((require, module, exports) => {}) form?
if (node.arguments.length !== 2) {return;}
var modules = node.arguments[0];
if (modules.type !== 'ArrayExpression') {return;}
// todo: check second arg type? (identifier or callback)
context.report(node, 'Expected imports instead of AMD ' + String(node.callee.name) + '().');
}return CallExpression;}() };
}return create;}() };
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9ydWxlcy9uby1hbWQuanMiXSwibmFtZXMiOlsibW9kdWxlIiwiZXhwb3J0cyIsIm1ldGEiLCJ0eXBlIiwiZG9jcyIsImNhdGVnb3J5IiwiZGVzY3JpcHRpb24iLCJ1cmwiLCJzY2hlbWEiLCJjcmVhdGUiLCJjb250ZXh0IiwiQ2FsbEV4cHJlc3Npb24iLCJub2RlIiwiY2FsbGVlIiwibmFtZSIsImFyZ3VtZW50cyIsImxlbmd0aCIsIm1vZHVsZXMiLCJyZXBvcnQiXSwibWFwcGluZ3MiOiI7Ozs7O0FBS0E7O0FBRUEscUM7O0FBRUE7QUFDQTtBQUNBO0FBWEE7OztHQWFBQSxPQUFPQyxPQUFQLEdBQWlCLEVBQ2ZDLE1BQU0sRUFDSkMsTUFBTSxZQURGO0FBRUpDLFVBQU07QUFDSkMsZ0JBQVUsZ0JBRE47QUFFSkMsbUJBQWEsMENBRlQ7QUFHSkMsV0FBSywwQkFBUSxRQUFSLENBSEQsRUFGRjs7QUFPSkMsWUFBUSxFQVBKLEVBRFM7OztBQVdmQyxRQVhlLCtCQVdSQyxPQVhRLEVBV0M7QUFDZCxhQUFPO0FBQ0xDLHNCQURLLHVDQUNVQyxJQURWLEVBQ2dCO0FBQ25CLGdCQUFJLDZCQUFTRixPQUFULEVBQWtCRSxJQUFsQixFQUF3QlQsSUFBeEIsS0FBaUMsUUFBckMsRUFBK0MsQ0FBRSxPQUFTOztBQUUxRCxnQkFBSVMsS0FBS0MsTUFBTCxDQUFZVixJQUFaLEtBQXFCLFlBQXpCLEVBQXVDLENBQUUsT0FBUztBQUNsRCxnQkFBSVMsS0FBS0MsTUFBTCxDQUFZQyxJQUFaLEtBQXFCLFNBQXJCLElBQWtDRixLQUFLQyxNQUFMLENBQVlDLElBQVosS0FBcUIsUUFBM0QsRUFBcUUsQ0FBRSxPQUFTOztBQUVoRjtBQUNBLGdCQUFJRixLQUFLRyxTQUFMLENBQWVDLE1BQWYsS0FBMEIsQ0FBOUIsRUFBaUMsQ0FBRSxPQUFTOztBQUU1QyxnQkFBTUMsVUFBVUwsS0FBS0csU0FBTCxDQUFlLENBQWYsQ0FBaEI7QUFDQSxnQkFBSUUsUUFBUWQsSUFBUixLQUFpQixpQkFBckIsRUFBd0MsQ0FBRSxPQUFTOztBQUVuRDs7QUFFQU8sb0JBQVFRLE1BQVIsQ0FBZU4sSUFBZiw4Q0FBd0RBLEtBQUtDLE1BQUwsQ0FBWUMsSUFBcEU7QUFDRCxXQWhCSSwyQkFBUDs7O0FBbUJELEtBL0JjLG1CQUFqQiIsImZpbGUiOiJuby1hbWQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEBmaWxlb3ZlcnZpZXcgUnVsZSB0byBwcmVmZXIgaW1wb3J0cyB0byBBTURcbiAqIEBhdXRob3IgSmFtdW5kIEZlcmd1c29uXG4gKi9cblxuaW1wb3J0IHsgZ2V0U2NvcGUgfSBmcm9tICdlc2xpbnQtbW9kdWxlLXV0aWxzL2NvbnRleHRDb21wYXQnO1xuXG5pbXBvcnQgZG9jc1VybCBmcm9tICcuLi9kb2NzVXJsJztcblxuLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cbi8vIFJ1bGUgRGVmaW5pdGlvblxuLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cblxubW9kdWxlLmV4cG9ydHMgPSB7XG4gIG1ldGE6IHtcbiAgICB0eXBlOiAnc3VnZ2VzdGlvbicsXG4gICAgZG9jczoge1xuICAgICAgY2F0ZWdvcnk6ICdNb2R1bGUgc3lzdGVtcycsXG4gICAgICBkZXNjcmlwdGlvbjogJ0ZvcmJpZCBBTUQgYHJlcXVpcmVgIGFuZCBgZGVmaW5lYCBjYWxscy4nLFxuICAgICAgdXJsOiBkb2NzVXJsKCduby1hbWQnKSxcbiAgICB9LFxuICAgIHNjaGVtYTogW10sXG4gIH0sXG5cbiAgY3JlYXRlKGNvbnRleHQpIHtcbiAgICByZXR1cm4ge1xuICAgICAgQ2FsbEV4cHJlc3Npb24obm9kZSkge1xuICAgICAgICBpZiAoZ2V0U2NvcGUoY29udGV4dCwgbm9kZSkudHlwZSAhPT0gJ21vZHVsZScpIHsgcmV0dXJuOyB9XG5cbiAgICAgICAgaWYgKG5vZGUuY2FsbGVlLnR5cGUgIT09ICdJZGVudGlmaWVyJykgeyByZXR1cm47IH1cbiAgICAgICAgaWYgKG5vZGUuY2FsbGVlLm5hbWUgIT09ICdyZXF1aXJlJyAmJiBub2RlLmNhbGxlZS5uYW1lICE9PSAnZGVmaW5lJykgeyByZXR1cm47IH1cblxuICAgICAgICAvLyB0b2RvOiBjYXB0dXJlIGRlZmluZSgocmVxdWlyZSwgbW9kdWxlLCBleHBvcnRzKSA9PiB7fSkgZm9ybT9cbiAgICAgICAgaWYgKG5vZGUuYXJndW1lbnRzLmxlbmd0aCAhPT0gMikgeyByZXR1cm47IH1cblxuICAgICAgICBjb25zdCBtb2R1bGVzID0gbm9kZS5hcmd1bWVudHNbMF07XG4gICAgICAgIGlmIChtb2R1bGVzLnR5cGUgIT09ICdBcnJheUV4cHJlc3Npb24nKSB7IHJldHVybjsgfVxuXG4gICAgICAgIC8vIHRvZG86IGNoZWNrIHNlY29uZCBhcmcgdHlwZT8gKGlkZW50aWZpZXIgb3IgY2FsbGJhY2spXG5cbiAgICAgICAgY29udGV4dC5yZXBvcnQobm9kZSwgYEV4cGVjdGVkIGltcG9ydHMgaW5zdGVhZCBvZiBBTUQgJHtub2RlLmNhbGxlZS5uYW1lfSgpLmApO1xuICAgICAgfSxcbiAgICB9O1xuXG4gIH0sXG59O1xuIl19
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resetDeactivationParams = resetDeactivationParams;
function resetDeactivationParams(serviceReferenceManager, deactivationParams) {
deactivationParams.getBindings =
serviceReferenceManager.bindingService.get.bind(serviceReferenceManager.bindingService);
deactivationParams.getBindingsFromModule =
serviceReferenceManager.bindingService.getByModuleId.bind(serviceReferenceManager.bindingService);
deactivationParams.getDeactivations =
serviceReferenceManager.deactivationService.get.bind(serviceReferenceManager.deactivationService);
}
//# sourceMappingURL=resetDeactivationParams.js.map
@@ -0,0 +1,82 @@
var $6acf696f746f932c$exports = require("./utils.main.js");
var $6RVcf$reactstatelycollections = require("@react-stately/collections");
var $6RVcf$reactariagrid = require("@react-aria/grid");
var $6RVcf$reactariautils = require("@react-aria/utils");
var $6RVcf$reactstatelyflags = require("@react-stately/flags");
var $6RVcf$reactariai18n = require("@react-aria/i18n");
function $parcel$export(e, n, v, s) {
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
}
$parcel$export(module.exports, "useTableRow", () => $10b2115217af7c93$export$7f2f6ae19e707aa5);
/*
* 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.
*/
const $10b2115217af7c93$var$EXPANSION_KEYS = {
expand: {
ltr: 'ArrowRight',
rtl: 'ArrowLeft'
},
'collapse': {
ltr: 'ArrowLeft',
rtl: 'ArrowRight'
}
};
function $10b2115217af7c93$export$7f2f6ae19e707aa5(props, state, ref) {
let { node: node, isVirtualized: isVirtualized } = props;
let { rowProps: rowProps, ...states } = (0, $6RVcf$reactariagrid.useGridRow)(props, state, ref);
let { direction: direction } = (0, $6RVcf$reactariai18n.useLocale)();
if (isVirtualized && !((0, $6RVcf$reactstatelyflags.tableNestedRows)() && 'expandedKeys' in state)) rowProps['aria-rowindex'] = node.index + 1 + state.collection.headerRows.length; // aria-rowindex is 1 based
else delete rowProps['aria-rowindex'];
let treeGridRowProps = {};
if ((0, $6RVcf$reactstatelyflags.tableNestedRows)() && 'expandedKeys' in state) {
let treeNode = state.keyMap.get(node.key);
if (treeNode != null) {
var _treeNode_props, _treeNode_props_children, _treeNode_props1, _getLastItem, _state_keyMap_get, _getLastItem1;
let hasChildRows = ((_treeNode_props = treeNode.props) === null || _treeNode_props === void 0 ? void 0 : _treeNode_props.UNSTABLE_childItems) || ((_treeNode_props1 = treeNode.props) === null || _treeNode_props1 === void 0 ? void 0 : (_treeNode_props_children = _treeNode_props1.children) === null || _treeNode_props_children === void 0 ? void 0 : _treeNode_props_children.length) > state.userColumnCount;
var _treeNode_indexOfType, _state_keyMap_get_childNodes, _getLastItem_indexOfType, _getLastItem_indexOfType1;
treeGridRowProps = {
onKeyDown: (e)=>{
if (e.key === $10b2115217af7c93$var$EXPANSION_KEYS['expand'][direction] && state.selectionManager.focusedKey === treeNode.key && hasChildRows && state.expandedKeys !== 'all' && !state.expandedKeys.has(treeNode.key)) {
state.toggleKey(treeNode.key);
e.stopPropagation();
} else if (e.key === $10b2115217af7c93$var$EXPANSION_KEYS['collapse'][direction] && state.selectionManager.focusedKey === treeNode.key && hasChildRows && (state.expandedKeys === 'all' || state.expandedKeys.has(treeNode.key))) {
state.toggleKey(treeNode.key);
e.stopPropagation();
}
},
'aria-expanded': hasChildRows ? state.expandedKeys === 'all' || state.expandedKeys.has(node.key) : undefined,
'aria-level': treeNode.level,
'aria-posinset': ((_treeNode_indexOfType = treeNode.indexOfType) !== null && _treeNode_indexOfType !== void 0 ? _treeNode_indexOfType : 0) + 1,
'aria-setsize': treeNode.level > 1 ? ((_getLastItem_indexOfType = (_getLastItem = (0, $6RVcf$reactstatelycollections.getLastItem)((_state_keyMap_get_childNodes = (_state_keyMap_get = state.keyMap.get(treeNode.parentKey)) === null || _state_keyMap_get === void 0 ? void 0 : _state_keyMap_get.childNodes) !== null && _state_keyMap_get_childNodes !== void 0 ? _state_keyMap_get_childNodes : [])) === null || _getLastItem === void 0 ? void 0 : _getLastItem.indexOfType) !== null && _getLastItem_indexOfType !== void 0 ? _getLastItem_indexOfType : 0) + 1 : ((_getLastItem_indexOfType1 = (_getLastItem1 = (0, $6RVcf$reactstatelycollections.getLastItem)(state.collection.body.childNodes)) === null || _getLastItem1 === void 0 ? void 0 : _getLastItem1.indexOfType) !== null && _getLastItem_indexOfType1 !== void 0 ? _getLastItem_indexOfType1 : 0) + 1
};
}
}
let syntheticLinkProps = (0, $6RVcf$reactariautils.useSyntheticLinkProps)(node.props);
let linkProps = states.hasAction ? syntheticLinkProps : {};
return {
rowProps: {
...(0, $6RVcf$reactariautils.mergeProps)(rowProps, treeGridRowProps, linkProps),
'aria-labelledby': (0, $6acf696f746f932c$exports.getRowLabelledBy)(state, node.key)
},
...states
};
}
//# sourceMappingURL=useTableRow.main.js.map
@@ -0,0 +1,3 @@
// Make exports work in Node < 12
// eslint-disable-next-line no-undef, unicorn/prefer-module
module.exports = require("./dist/commonjs/WritableStream.js");
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more