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,8 @@
export { CheckLinearIcon } from './check.mjs';
export { CopyLinearIcon } from './copy.mjs';
export { ChevronCircleTopLinearIcon } from './chevron-circle-top.mjs';
export { SearchLinearIcon } from './search.mjs';
export { ClockCircleLinearIcon } from './clock-circle-linear.mjs';
import 'react/jsx-runtime';
import '../types.mjs';
import 'react';
@@ -0,0 +1 @@
{"name":"nopt","version":"6.0.0","requiresBuild":false,"files":{"LICENSE":{"checkedAt":1794532122502,"integrity":"sha512-P6dI5Z+zrwxSk1MIRPqpYG2ScYNkidLIATQXd50QzBgBh/XmcEd/nsd9NB4O9k6rfc+4dsY5DwJ7xvhpoS0PRg==","mode":420,"size":765},"bin/nopt.js":{"checkedAt":1794532122502,"integrity":"sha512-zXFCzxnhGIXSWzCMcJnL4yYnW5wC/RDzFzaB48HdzkPajm0d155B9mnvInfFzf840bViNCn91vlnzxjh9g/I/g==","mode":493,"size":1210},"lib/nopt.js":{"checkedAt":1794532122503,"integrity":"sha512-2Fs6fGsV21I5I0+L1d7+z+nrtjP7d0oG71xpf0VEp3U2RUlk9czaHnZGSEswOM/KSGEKec8GGxaijxRNQb2QZw==","mode":420,"size":13078},"package.json":{"checkedAt":1794532122503,"integrity":"sha512-mT8P2DK2VZ4Q7Yy9b2TD9H2Sf2hxIhKUGpgzaED+GZhioJu6t+sGhrc/MbbYVdcwClqA7Lk2KlG96lRa4baA6w==","mode":420,"size":1275},"README.md":{"checkedAt":1794532122503,"integrity":"sha512-ZullvtlD3gycMqq0EiTC4oKm4kegUiV+2OwvOh6jaE86vRZESSVd1SWZ0jm0FcdjfHBbxSWDIXIj7EsKhtwopQ==","mode":420,"size":7618}}}
@@ -0,0 +1,19 @@
Copyright (c) 2012 Felix Geisendörfer (felix@debuggable.com) and 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,22 @@
{ "name": "busboy",
"version": "1.6.0",
"author": "Brian White <mscdex@mscdex.net>",
"description": "A streaming parser for HTML form data for node.js",
"main": "./lib/index.js",
"dependencies": {
"streamsearch": "^1.1.0"
},
"devDependencies": {
"@mscdex/eslint-config": "^1.1.0",
"eslint": "^7.32.0"
},
"scripts": {
"test": "node test/test.js",
"lint": "eslint --cache --report-unused-disable-directives --ext=.js .eslintrc.js lib test bench",
"lint:fix": "npm run lint -- --fix"
},
"engines": { "node": ">=10.16.0" },
"keywords": [ "uploads", "forms", "multipart", "form-data" ],
"licenses": [ { "type": "MIT", "url": "http://github.com/mscdex/busboy/raw/master/LICENSE" } ],
"repository": { "type": "git", "url": "http://github.com/mscdex/busboy.git" }
}
@@ -0,0 +1 @@
{"version":3,"file":"inject.int.spec.d.ts","sourceRoot":"","sources":["../../../../src/test/annotation/inject.int.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
import {isAndroid as $c87311424ea30a05$export$a11b0059900ceec8} from "./platform.module.js";
/*
* 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.
*/
function $6a7db85432448f7f$export$60278871457622de(event) {
// JAWS/NVDA with Firefox.
if (event.mozInputSource === 0 && event.isTrusted) return true;
// Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead
// If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check
// to detect TalkBack virtual clicks.
if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === 'click' && event.buttons === 1;
return event.detail === 0 && !event.pointerType;
}
function $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {
// If the pointer size is zero, then we assume it's from a screen reader.
// Android TalkBack double tap will sometimes return a event with width and height of 1
// and pointerType === 'mouse' so we need to check for a specific combination of event attributes.
// Cannot use "event.pressure === 0" as the sole check due to Safari pointer events always returning pressure === 0
// instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush
// Talkback double tap from Windows Firefox touch screen press
return !(0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === 'mouse';
}
export {$6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent};
//# sourceMappingURL=isVirtualEvent.module.js.map
@@ -0,0 +1,2 @@
export { TouchSensor } from './TouchSensor';
export type { TouchSensorOptions, TouchSensorProps } from './TouchSensor';
@@ -0,0 +1,720 @@
flf2a$ 7 7 13 0 5 0 64 0
Font Author: ?
Font based on TheDraw's "THE_EDGE.TDF"
FIGFont created with: http://patorjk.com/figfont-editor
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
▄$@
█$ @
█$ @
█$ @
@
▀$ @
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
██$@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
██$ @
█ █$ @
█▄▄█$@
█ █$@
█$@
█$ @
▀$ @@
███$ @
█ █$ @
█ ▀ ▄$@
█ ▄▀$@
███$ @
@
@@
▄█▄$ @
█▀ ▀▄$ @
█ ▀$ @
█▄ ▄▀$@
▀███▀$ @
@
@@
██▄$ @
█ █$ @
█ █$@
█ █$ @
███▀$ @
@
@@
▄███▄$ @
█▀ ▀$ @
██▄▄ @
█▄ ▄▀$@
▀███▀$ @
@
@@
▄████$ @
█▀ ▀$@
█▀▀ @
█ @
█ @
▀ @
@@
▄▀$ @
▄▀ @
█ ▀▄$ @
█ █$@
███$ @
@
@@
▄ █$@
█ █$@
██▀▀█$@
█ █$@
█$ @
▀$ @
@@
▄█$@
██$@
██$@
▐█$@
▐$@
@
@@
▄▄▄▄▄$@
▄▀ █$ @
█$ @
▄ █$ @
▀$ @
@
@@
█ █▀$@
█▄█$ @
█▀▄$ @
█ █$ @
█$ @
▀$ @
@@
█$ @
█$ @
█$ @
███▄$ @
▀$@
@
@@
█▀▄▀█$@
█ █ █$@
█ ▄ █$@
█ █$@
█$ @
▀$ @
@@
▄$ @
█$ @
██ █$@
█ █ █$@
█ █ █$@
█ ██$@
@@
████▄$@
█ █$@
█ █$@
▀████$@
@
@
@@
█ ▄▄$ @
█ █$@
█▀▀▀$ @
█$ @
█$ @
▀$ @
@@
▄▄ █$ @
█ █$ @
▀▀▀█$ @
█$ @
█$ @
▀$@
@@
█▄▄▄▄$@
█ ▄▀$@
█▀▀▌$ @
█ █$ @
█$ @
▀$ @
@@
▄▄▄▄▄$ @
█ ▀▄$@
▄ ▀▀▀▀▄$ @
▀▄▄▄▄▀$ @
@
@
@@
▄▄▄▄▀$@
▀▀▀ █$ @
█$ @
█$ @
▀$ @
@
@@
▄$ @
█$ @
█ █$@
█ █$@
█▄ ▄█$@
▀▀▀$ @
@@
▄$ @
█$ @
█ █$@
█ █$@
█ █$ @
█▐$ @
▐$ @@
▄ ▄$ @
█ █$ @
█ ▄ █$@
█ █ █$@
█ █ █$ @
▀ ▀$ @
@@
▄$ @
▀▄ █$@
█ ▀$ @
▄ █$ @
█ ▀▄$@
▀ @
@@
▀▄ ▄$@
█ █$ @
▀█$ @
█$ @
▄▀$ @
@
@@
▄▄▄▄▄▄$ @
▀ ▄▄▀$ @
▄▀▀ ▄▀$@
▀▀▀▀▀▀$ @
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
██$ @
█ █$ @
█▄▄█$@
█ █$@
█$@
█$ @
▀$ @@
███$ @
█ █$ @
█ ▀ ▄$@
█ ▄▀$@
███$ @
@
@@
▄█▄$ @
█▀ ▀▄$ @
█ ▀$ @
█▄ ▄▀$@
▀███▀$ @
@
@@
██▄$ @
█ █$ @
█ █$@
█ █$ @
███▀$ @
@
@@
▄███▄$ @
█▀ ▀$ @
██▄▄ @
█▄ ▄▀$@
▀███▀$ @
@
@@
▄████$ @
█▀ ▀$@
█▀▀ @
█ @
█ @
▀ @
@@
▄▀$ @
▄▀ @
█ ▀▄$ @
█ █$@
███$ @
@
@@
▄ █$@
█ █$@
██▀▀█$@
█ █$@
█$ @
▀$ @
@@
▄█$@
██$@
██$@
▐█$@
▐$@
@
@@
▄▄▄▄▄$@
▄▀ █$ @
█$ @
▄ █$ @
▀$ @
@
@@
█ █▀$@
█▄█$ @
█▀▄$ @
█ █$ @
█$ @
▀$ @
@@
█$ @
█$ @
█$ @
███▄$ @
▀$@
@
@@
█▀▄▀█$@
█ █ █$@
█ ▄ █$@
█ █$@
█$ @
▀$ @
@@
▄$ @
█$ @
██ █$@
█ █ █$@
█ █ █$@
█ ██$@
@@
████▄$@
█ █$@
█ █$@
▀████$@
@
@
@@
█ ▄▄$ @
█ █$@
█▀▀▀$ @
█$ @
█$ @
▀$ @
@@
▄▄ █$ @
█ █$ @
▀▀▀█$ @
█$ @
█$ @
▀$@
@@
█▄▄▄▄$@
█ ▄▀$@
█▀▀▌$ @
█ █$ @
█$ @
▀$ @
@@
▄▄▄▄▄$ @
█ ▀▄$@
▄ ▀▀▀▀▄$ @
▀▄▄▄▄▀$ @
@
@
@@
▄▄▄▄▀$@
▀▀▀ █$ @
█$ @
█$ @
▀$ @
@
@@
▄$ @
█$ @
█ █$@
█ █$@
█▄ ▄█$@
▀▀▀$ @
@@
▄$ @
█$ @
█ █$@
█ █$@
█ █$ @
█▐$ @
▐$ @@
▄ ▄$ @
█ █$ @
█ ▄ █$@
█ █ █$@
█ █ █$ @
▀ ▀$ @
@@
▄$ @
▀▄ █$@
█ ▀$ @
▄ █$ @
█ ▀▄$@
▀ @
@@
▀▄ ▄$@
█ █$ @
▀█$ @
█$ @
▄▀$ @
@
@@
▄▄▄▄▄▄$ @
▀ ▄▄▀$ @
▄▀▀ ▄▀$@
▀▀▀▀▀▀$ @
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@@ -0,0 +1 @@
{"version":3,"file":"video.js","names":["BlockEmbed","Link","ATTRIBUTES","Video","blotName","className","tagName","create","value","node","setAttribute","sanitize","formats","domNode","reduce","attribute","hasAttribute","getAttribute","url","format","name","indexOf","removeAttribute","html","video"],"sources":["../../src/formats/video.ts"],"sourcesContent":["import { BlockEmbed } from '../blots/block.js';\nimport Link from './link.js';\n\nconst ATTRIBUTES = ['height', 'width'];\n\nclass Video extends BlockEmbed {\n static blotName = 'video';\n static className = 'ql-video';\n static tagName = 'IFRAME';\n\n static create(value: string) {\n const node = super.create(value) as Element;\n node.setAttribute('frameborder', '0');\n node.setAttribute('allowfullscreen', 'true');\n node.setAttribute('src', this.sanitize(value));\n return node;\n }\n\n static formats(domNode: Element) {\n return ATTRIBUTES.reduce(\n (formats: Record<string, string | null>, attribute) => {\n if (domNode.hasAttribute(attribute)) {\n formats[attribute] = domNode.getAttribute(attribute);\n }\n return formats;\n },\n {},\n );\n }\n\n static sanitize(url: string) {\n return Link.sanitize(url);\n }\n\n static value(domNode: Element) {\n return domNode.getAttribute('src');\n }\n\n domNode: HTMLVideoElement;\n\n format(name: string, value: string) {\n if (ATTRIBUTES.indexOf(name) > -1) {\n if (value) {\n this.domNode.setAttribute(name, value);\n } else {\n this.domNode.removeAttribute(name);\n }\n } else {\n super.format(name, value);\n }\n }\n\n html() {\n const { video } = this.value();\n return `<a href=\"${video}\">${video}</a>`;\n }\n}\n\nexport default Video;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,mBAAmB;AAC9C,OAAOC,IAAI,MAAM,WAAW;AAE5B,MAAMC,UAAU,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC;AAEtC,MAAMC,KAAK,SAASH,UAAU,CAAC;EAC7B,OAAOI,QAAQ,GAAG,OAAO;EACzB,OAAOC,SAAS,GAAG,UAAU;EAC7B,OAAOC,OAAO,GAAG,QAAQ;EAEzB,OAAOC,MAAMA,CAACC,KAAa,EAAE;IAC3B,MAAMC,IAAI,GAAG,KAAK,CAACF,MAAM,CAACC,KAAK,CAAY;IAC3CC,IAAI,CAACC,YAAY,CAAC,aAAa,EAAE,GAAG,CAAC;IACrCD,IAAI,CAACC,YAAY,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAC5CD,IAAI,CAACC,YAAY,CAAC,KAAK,EAAE,IAAI,CAACC,QAAQ,CAACH,KAAK,CAAC,CAAC;IAC9C,OAAOC,IAAI;EACb;EAEA,OAAOG,OAAOA,CAACC,OAAgB,EAAE;IAC/B,OAAOX,UAAU,CAACY,MAAM,CACtB,CAACF,OAAsC,EAAEG,SAAS,KAAK;MACrD,IAAIF,OAAO,CAACG,YAAY,CAACD,SAAS,CAAC,EAAE;QACnCH,OAAO,CAACG,SAAS,CAAC,GAAGF,OAAO,CAACI,YAAY,CAACF,SAAS,CAAC;MACtD;MACA,OAAOH,OAAO;IAChB,CAAC,EACD,CAAC,CACH,CAAC;EACH;EAEA,OAAOD,QAAQA,CAACO,GAAW,EAAE;IAC3B,OAAOjB,IAAI,CAACU,QAAQ,CAACO,GAAG,CAAC;EAC3B;EAEA,OAAOV,KAAKA,CAACK,OAAgB,EAAE;IAC7B,OAAOA,OAAO,CAACI,YAAY,CAAC,KAAK,CAAC;EACpC;EAIAE,MAAMA,CAACC,IAAY,EAAEZ,KAAa,EAAE;IAClC,IAAIN,UAAU,CAACmB,OAAO,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE;MACjC,IAAIZ,KAAK,EAAE;QACT,IAAI,CAACK,OAAO,CAACH,YAAY,CAACU,IAAI,EAAEZ,KAAK,CAAC;MACxC,CAAC,MAAM;QACL,IAAI,CAACK,OAAO,CAACS,eAAe,CAACF,IAAI,CAAC;MACpC;IACF,CAAC,MAAM;MACL,KAAK,CAACD,MAAM,CAACC,IAAI,EAAEZ,KAAK,CAAC;IAC3B;EACF;EAEAe,IAAIA,CAAA,EAAG;IACL,MAAM;MAAEC;IAAM,CAAC,GAAG,IAAI,CAAChB,KAAK,CAAC,CAAC;IAC9B,OAAQ,YAAWgB,KAAM,KAAIA,KAAM,MAAK;EAC1C;AACF;AAEA,eAAerB,KAAK","ignoreList":[]}
@@ -0,0 +1,7 @@
import {Config} from "tailwindcss/types/config";
export type GenerateTypes = {
(theme: Config["theme"]): void;
};
export declare const generateTypes: GenerateTypes;
@@ -0,0 +1,570 @@
export default `flf2a$ 5 4 20 0 16
Font : Dr. Pepper (after a name in one sig done in this style).
Author: Eero Tamminen, t150315@cc.tut.fi.
Characters '#' and '&' are lousy and I'm not very satisfied
with the '$' or 't'... Suggestions?
Explanation of first line:
flf2 - "magic number" for file identifiction
a - should always be \`a', for now
$ - the "hardblank" -- prints s a blank, but can't be smushed
5 - height of a character
4 - height of a character, not including descenders
20 - max line length (excluding comment lines) + fudge factor
0 - default smushmode for this font
16 - number of comment lines
$@
$@
$@
$@
$@@
_ @
| |@
|_/@
<_>@
@@
_ _@
|/|/@
@
@
@@
@
$_|_|_$@
$_|_|_$@
| | @
@@
@
||_@
<_-<@
/__/@
|| @@
__@
<>/ /@
/ / @
/_/<>@
@@
_ @
< > @
/.\\/$@
\\_/\\$@
@@
_@
|/@
@
@
@@
__@
/ /@
| | @
| | @
\\_\\@@
__ @
\\ \\ @
| |@
| |@
/_/ @@
@
_/\\_@
> <@
\\/ @
@@
_ @
_| |_ @
|_ _|@
|_| @
@@
@
@
_@
|/@
@@
@
___ @
|___|@
@
@@
@
@
_ @
<_>@
@@
__@
/ /@
/ / @
/_/ @
@@
___ @
| |@
| / |@
\`___'@
@@
_ @
/ |@
| |@
|_|@
@@
___ @
<_ >@
/ / @
<___>@
@@
____@
<__ /@
<_ \\@
<___/@
@@
__ @
/. | @
/_ .|@
|_| @
@@
___ @
| __|@
\`__ \\@
|___/@
@@
___ @
| __>@
| . \\@
\`___/@
@@
___ @
|_ |@
/ / @
/_/ @
@@
___ @
< . >@
/ . \\@
\\___/@
@@
___ @
| . |@
\`_ /@
/_/ @
@@
_ @
<_>@
_ @
<_>@
@@
_ @
<_>@
_ @
|/ @
@@
__@
/ /@
< < @
\\_\\@
@@
___ @
|___|@
___ @
|___|@
@@
__ @
\\ \\ @
> >@
/_/ @
@@
___ @
<_. >@
/_/ @
<_> @
@@
___ @
| "|@
| \\_|@
\`___/@
@@
___ @
| . |@
| |@
|_|_|@
@@
___ @
| . >@
| . \\@
|___/@
@@
___ @
| _>@
| <__@
\`___/@
@@
___ @
| . \\@
| | |@
|___/@
@@
___ @
| __>@
| _> @
|___>@
@@
___ @
| __>@
| _> @
|_| @
@@
___ @
/ _> @
| <_/\\@
\`____/@
@@
_ _ @
| | |@
| |@
|_|_|@
@@
_ @
| |@
| |@
|_|@
@@
_ @
| |@
_| |@
\\__/@
@@
_ __@
| / /@
| \\ @
|_\\_\\@
@@
_ @
| | @
| |_ @
|___|@
@@
__ __ @
| \\ \\@
| |@
|_|_|_|@
@@
_ _ @
| \\ |@
| |@
|_\\_|@
@@
___ @
| . |@
| | |@
\`___'@
@@
___ @
| . \\@
| _/@
|_| @
@@
___ @
| . |@
| | |@
\`___\\@
@@
___ @
| . \\@
| /@
|_\\_\\@
@@
___ @
/ __>@
\\__ \\@
<___/@
@@
___ @
|_ _|@
| | @
|_| @
@@
_ _ @
| | |@
| ' |@
\`___'@
@@
_ _ @
| | |@
| ' |@
|__/ @
@@
_ _ _ @
| | | |@
| | | |@
|__/_/ @
@@
__ _$@
\\ \\/ @
\\ \\ @
_/\\_\\ @
@@
_ _ @
| | |@
\\ /@
|_| @
@@
____@
|_ /@
/ / @
/___|@
@@
___ @
| _|@
| | @
| |_ @
|___|@@
__ @
\\ \\ @
\\ \\ @
\\_\\@
@@
___ @
|_ |@
| |@
_| |@
|___|@@
/\\ @
</\\>@
@
@
@@
@
@
___ @
|___|@
@@
_ @
\\|@
@
@
@@
@
___ @
<_> |@
<___|@
@@
_ @
| |_ @
| . \\@
|___/@
@@
@
___ @
/ | '@
\\_|_.@
@@
_ @
_| |@
/ . |@
\\___|@
@@
@
___ @
/ ._>@
\\___.@
@@
___ @
| | '@
| |- @
|_| @
@@
@
___ @
/ . |@
\\_. |@
<___'@@
_ @
| |_ @
| . |@
|_|_|@
@@
_ @
<_>@
| |@
|_|@
@@
_ @
<_>@
| |@
| |@
<__'@@
_ @
| |__@
| / /@
|_\\_\\@
@@
_ @
| |@
| |@
|_|@
@@
@
._ _ _ @
| ' ' |@
|_|_|_|@
@@
@
._ _ @
| ' |@
|_|_|@
@@
@
___ @
/ . \\@
\\___/@
@@
@
___ @
| . \\@
| _/@
|_| @@
@
___ @
/ . |@
\\_ |@
|_|@@
@
_ _ @
| '_>@
|_| @
@@
@
___@
<_-<@
/__/@
@@
_ @
$_| |_$@
| | @
|_| @
@@
@
_ _ @
| | |@
\`___|@
@@
@
_ _ @
| | |@
|__/ @
@@
@
_ _ _ @
| | | |@
|__/_/ @
@@
@
__ @
\\ \\/@
/\\_\\@
@@
@
_ _ @
| | |@
\`_. |@
<___'@@
@
.___@
/ /@
/___@
@@
__@
/ /@
/ | @
\\ | @
\\_\\@@
||@
||@
||@
||@
@@
__ @
\\ \\ @
| \\@
| /@
/_/ @@
@
/\\/|@
|/\\/ @
@
@@
<>_<>@
| . |@
| |@
|_|_|@
@@
<>_<>@
| . |@
| | |@
\`___'@
@@
<>_<>@
| | |@
| ' |@
\`___'@
@@
@
<>_<>@
\`_> |@
<___|@
@@
@
<>_<>@
/ . \\@
\\___/@
@@
@
<>_<>@
| | |@
\`___|@
@@
___ @
| . >@
| . \\@
| ._/@
|_| @@
196
<>_<>@
| . |@
| |@
|_|_|@
@@
214
<>_<>@
| . |@
| | |@
\`___'@
@@
220
<>_<>@
| | |@
| ' |@
\`___'@
@@
223
___ @
| . >@
| . \\@
| ._/@
|_| @@
228
@
<>_<>@
\`_> |@
<___|@
@@
246
@
<>_<>@
/ . \\@
\\___/@
@@
252
@
<>_<>@
| | |@
\`___|@
@@
`
@@ -0,0 +1,22 @@
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
module.exports = baseClamp;
@@ -0,0 +1,100 @@
{
"name": "react-redux",
"version": "9.2.0",
"description": "Official React bindings for Redux",
"keywords": [
"react",
"reactjs",
"redux"
],
"license": "MIT",
"author": "Dan Abramov <dan.abramov@me.com> (https://github.com/gaearon)",
"homepage": "https://github.com/reduxjs/react-redux",
"repository": "github:reduxjs/react-redux",
"bugs": "https://github.com/reduxjs/react-redux/issues",
"module": "dist/react-redux.legacy-esm.js",
"main": "dist/cjs/index.js",
"react-native": "./dist/react-redux.legacy-esm.js",
"types": "dist/react-redux.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/react-redux.d.ts",
"react-server": "./dist/rsc.mjs",
"react-native": "./dist/react-redux.legacy-esm.js",
"import": "./dist/react-redux.mjs",
"default": "./dist/cjs/index.js"
},
"./alternate-renderers": {
"types": "./dist/react-redux.d.ts",
"import": "./dist/react-redux.mjs",
"default": "./dist/cjs/index.js"
}
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"scripts": {
"build": "yarn clean && tsup",
"clean": "rimraf lib dist es coverage",
"api-types": "api-extractor run --local",
"format": "prettier --write \"{src,test}/**/*.{js,ts,tsx}\" \"docs/**/*.md\"",
"lint": "eslint src test",
"lint:fix": "eslint src test --fix",
"prepack": "yarn build",
"pretest": "yarn lint",
"test": "vitest --run --typecheck",
"test:watch": "vitest --watch",
"type-tests": "tsc --noEmit -p tsconfig.test.json",
"coverage": "codecov"
},
"peerDependencies": {
"@types/react": "^18.2.25 || ^19",
"react": "^18.0 || ^19",
"redux": "^5.0.0"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"redux": {
"optional": true
}
},
"dependencies": {
"@types/use-sync-external-store": "^0.0.6",
"use-sync-external-store": "^1.4.0"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.47.0",
"@reduxjs/toolkit": "^2.2.5",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.1.0",
"@types/node": "^20.14.2",
"@types/prop-types": "^15.7.12",
"@types/react": "^19.0.1",
"@types/react-dom": "^19.0.1",
"codecov": "^3.8.3",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.2",
"jsdom": "^25.0.1",
"prettier": "^3.3.3",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"redux": "^5.0.1",
"rimraf": "^5.0.7",
"tsup": "^8.3.5",
"typescript": "^5.5.4",
"typescript-eslint": "^7.12.0",
"vitest": "^1.6.0"
},
"packageManager": "yarn@4.4.1"
}
@@ -0,0 +1,24 @@
# @heroui/loading
Spinner express an unspecified wait time or display the length of a process.
Please refer to the [documentation](https://heroui.com/docs/components/loading) for more information.
## Installation
```sh
yarn add @heroui/loading
# or
npm i @heroui/loading
```
## Contribution
Yes please! See the
[contributing guidelines](https://github.com/frontio-ai/heroui/blob/master/CONTRIBUTING.md)
for details.
## License
This project is licensed under the terms of the
[MIT license](https://github.com/frontio-ai/heroui/blob/master/LICENSE).
@@ -0,0 +1 @@
{"version":3,"file":"resolveBindingActivations.js","sourceRoot":"","sources":["../../../../src/resolution/actions/resolveBindingActivations.ts"],"names":[],"mappings":";;AAUA,8DAyBC;AAnCD,gDAAgD;AAQhD,yFAAsF;AAEtF,SAAgB,yBAAyB,CACvC,MAAwB,EACxB,OAA6D,EAC7D,KAA2B;IAE3B,IAAI,gBAAgB,GAAqC,KAAK,CAAC;IAE/D,IAAI,OAAO,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,YAAY,GAAkC,OAAO,CAAC,YAAY,CAAC;QAEzE,IAAI,IAAA,kBAAS,EAAC,gBAAgB,CAAC,EAAE,CAAC;YAChC,gBAAgB,GAAG,gBAAgB,CAAC,IAAI,CACtC,CAAC,QAAkC,EAAwB,EAAE,CAC3D,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CACzC,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,gBAAgB,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IAED,OAAO,IAAA,mEAAgC,EACrC,MAAM,EACN,OAAO,CAAC,iBAAiB,EACzB,gBAAgB,CACjB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,31 @@
import { Transform } from './index.js';
import { Block, Line } from '../primitives.js';
import { rewireSource } from '../util.js';
const order = [
'end',
'description',
'postType',
'type',
'postName',
'name',
'postTag',
'tag',
'postDelimiter',
'delimiter',
'start',
];
export type Ending = 'LF' | 'CRLF';
export default function crlf(ending: Ending): Transform {
function update(line: Line): Line {
return {
...line,
tokens: { ...line.tokens, lineEnd: ending === 'LF' ? '' : '\r' },
};
}
return ({ source, ...fields }: Block): Block =>
rewireSource({ ...fields, source: source.map(update) });
}
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = getImplicitRoleForArticle;
/**
* Returns the implicit role for an article tag.
*/
function getImplicitRoleForArticle() {
return 'article';
}
module.exports = exports.default;
@@ -0,0 +1,315 @@
/**
* @fileoverview Validate closing bracket location in JSX
* @author Yannick Croissant
*/
'use strict';
const has = require('hasown');
const repeat = require('string.prototype.repeat');
const docsUrl = require('../util/docsUrl');
const getSourceCode = require('../util/eslint').getSourceCode;
const report = require('../util/report');
// ------------------------------------------------------------------------------
// Rule Definition
// ------------------------------------------------------------------------------
const messages = {
bracketLocation: 'The closing bracket must be {{location}}{{details}}',
};
/** @type {import('eslint').Rule.RuleModule} */
module.exports = {
meta: {
docs: {
description: 'Enforce closing bracket location in JSX',
category: 'Stylistic Issues',
recommended: false,
url: docsUrl('jsx-closing-bracket-location'),
},
fixable: 'code',
messages,
schema: [{
anyOf: [
{
enum: ['after-props', 'props-aligned', 'tag-aligned', 'line-aligned'],
},
{
type: 'object',
properties: {
location: {
enum: ['after-props', 'props-aligned', 'tag-aligned', 'line-aligned'],
},
},
additionalProperties: false,
}, {
type: 'object',
properties: {
nonEmpty: {
enum: ['after-props', 'props-aligned', 'tag-aligned', 'line-aligned', false],
},
selfClosing: {
enum: ['after-props', 'props-aligned', 'tag-aligned', 'line-aligned', false],
},
},
additionalProperties: false,
},
],
}],
},
create(context) {
const MESSAGE_LOCATION = {
'after-props': 'placed after the last prop',
'after-tag': 'placed after the opening tag',
'props-aligned': 'aligned with the last prop',
'tag-aligned': 'aligned with the opening tag',
'line-aligned': 'aligned with the line containing the opening tag',
};
const DEFAULT_LOCATION = 'tag-aligned';
const config = context.options[0];
const options = {
nonEmpty: DEFAULT_LOCATION,
selfClosing: DEFAULT_LOCATION,
};
if (typeof config === 'string') {
// simple shorthand [1, 'something']
options.nonEmpty = config;
options.selfClosing = config;
} else if (typeof config === 'object') {
// [1, {location: 'something'}] (back-compat)
if (has(config, 'location')) {
options.nonEmpty = config.location;
options.selfClosing = config.location;
}
// [1, {nonEmpty: 'something'}]
if (has(config, 'nonEmpty')) {
options.nonEmpty = config.nonEmpty;
}
// [1, {selfClosing: 'something'}]
if (has(config, 'selfClosing')) {
options.selfClosing = config.selfClosing;
}
}
/**
* Get expected location for the closing bracket
* @param {Object} tokens Locations of the opening bracket, closing bracket and last prop
* @return {string} Expected location for the closing bracket
*/
function getExpectedLocation(tokens) {
let location;
// Is always after the opening tag if there is no props
if (typeof tokens.lastProp === 'undefined') {
location = 'after-tag';
// Is always after the last prop if this one is on the same line as the opening bracket
} else if (tokens.opening.line === tokens.lastProp.lastLine) {
location = 'after-props';
// Else use configuration dependent on selfClosing property
} else {
location = tokens.selfClosing ? options.selfClosing : options.nonEmpty;
}
return location;
}
/**
* Get the correct 0-indexed column for the closing bracket, given the
* expected location.
* @param {Object} tokens Locations of the opening bracket, closing bracket and last prop
* @param {string} expectedLocation Expected location for the closing bracket
* @return {?Number} The correct column for the closing bracket, or null
*/
function getCorrectColumn(tokens, expectedLocation) {
switch (expectedLocation) {
case 'props-aligned':
return tokens.lastProp.column;
case 'tag-aligned':
return tokens.opening.column;
case 'line-aligned':
return tokens.openingStartOfLine.column;
default:
return null;
}
}
/**
* Check if the closing bracket is correctly located
* @param {Object} tokens Locations of the opening bracket, closing bracket and last prop
* @param {string} expectedLocation Expected location for the closing bracket
* @return {boolean} True if the closing bracket is correctly located, false if not
*/
function hasCorrectLocation(tokens, expectedLocation) {
switch (expectedLocation) {
case 'after-tag':
return tokens.tag.line === tokens.closing.line;
case 'after-props':
return tokens.lastProp.lastLine === tokens.closing.line;
case 'props-aligned':
case 'tag-aligned':
case 'line-aligned': {
const correctColumn = getCorrectColumn(tokens, expectedLocation);
return correctColumn === tokens.closing.column;
}
default:
return true;
}
}
/**
* Get the characters used for indentation on the line to be matched
* @param {Object} tokens Locations of the opening bracket, closing bracket and last prop
* @param {string} expectedLocation Expected location for the closing bracket
* @param {number} [correctColumn] Expected column for the closing bracket. Default to 0
* @return {string} The characters used for indentation
*/
function getIndentation(tokens, expectedLocation, correctColumn) {
const newColumn = correctColumn || 0;
let indentation;
let spaces = '';
switch (expectedLocation) {
case 'props-aligned':
indentation = /^\s*/.exec(getSourceCode(context).lines[tokens.lastProp.firstLine - 1])[0];
break;
case 'tag-aligned':
case 'line-aligned':
indentation = /^\s*/.exec(getSourceCode(context).lines[tokens.opening.line - 1])[0];
break;
default:
indentation = '';
}
if (indentation.length + 1 < newColumn) {
// Non-whitespace characters were included in the column offset
spaces = repeat(' ', +correctColumn - indentation.length);
}
return indentation + spaces;
}
/**
* Get the locations of the opening bracket, closing bracket, last prop, and
* start of opening line.
* @param {ASTNode} node The node to check
* @return {Object} Locations of the opening bracket, closing bracket, last
* prop and start of opening line.
*/
function getTokensLocations(node) {
const sourceCode = getSourceCode(context);
const opening = sourceCode.getFirstToken(node).loc.start;
const closing = sourceCode.getLastTokens(node, node.selfClosing ? 2 : 1)[0].loc.start;
const tag = sourceCode.getFirstToken(node.name).loc.start;
let lastProp;
if (node.attributes.length) {
lastProp = node.attributes[node.attributes.length - 1];
lastProp = {
column: sourceCode.getFirstToken(lastProp).loc.start.column,
firstLine: sourceCode.getFirstToken(lastProp).loc.start.line,
lastLine: sourceCode.getLastToken(lastProp).loc.end.line,
};
}
const openingLine = sourceCode.lines[opening.line - 1];
const closingLine = sourceCode.lines[closing.line - 1];
const isTab = {
openTab: /^\t/.test(openingLine),
closeTab: /^\t/.test(closingLine),
};
const openingStartOfLine = {
column: /^\s*/.exec(openingLine)[0].length,
line: opening.line,
};
return {
isTab,
tag,
opening,
closing,
lastProp,
selfClosing: node.selfClosing,
openingStartOfLine,
};
}
/**
* Get an unique ID for a given JSXOpeningElement
*
* @param {ASTNode} node The AST node being checked.
* @returns {string} Unique ID (based on its range)
*/
function getOpeningElementId(node) {
return node.range.join(':');
}
const lastAttributeNode = {};
return {
JSXAttribute(node) {
lastAttributeNode[getOpeningElementId(node.parent)] = node;
},
JSXSpreadAttribute(node) {
lastAttributeNode[getOpeningElementId(node.parent)] = node;
},
'JSXOpeningElement:exit'(node) {
const attributeNode = lastAttributeNode[getOpeningElementId(node)];
const cachedLastAttributeEndPos = attributeNode ? attributeNode.range[1] : null;
let expectedNextLine;
const tokens = getTokensLocations(node);
const expectedLocation = getExpectedLocation(tokens);
let usingSameIndentation = true;
if (expectedLocation === 'tag-aligned') {
usingSameIndentation = tokens.isTab.openTab === tokens.isTab.closeTab;
}
if (hasCorrectLocation(tokens, expectedLocation) && usingSameIndentation) {
return;
}
const data = {
location: MESSAGE_LOCATION[expectedLocation],
details: '',
};
const correctColumn = getCorrectColumn(tokens, expectedLocation);
if (correctColumn !== null) {
expectedNextLine = tokens.lastProp
&& (tokens.lastProp.lastLine === tokens.closing.line);
data.details = ` (expected column ${correctColumn + 1}${expectedNextLine ? ' on the next line)' : ')'}`;
}
report(context, messages.bracketLocation, 'bracketLocation', {
node,
loc: tokens.closing,
data,
fix(fixer) {
const closingTag = tokens.selfClosing ? '/>' : '>';
switch (expectedLocation) {
case 'after-tag':
if (cachedLastAttributeEndPos) {
return fixer.replaceTextRange([cachedLastAttributeEndPos, node.range[1]],
(expectedNextLine ? '\n' : '') + closingTag);
}
return fixer.replaceTextRange([node.name.range[1], node.range[1]],
(expectedNextLine ? '\n' : ' ') + closingTag);
case 'after-props':
return fixer.replaceTextRange([cachedLastAttributeEndPos, node.range[1]],
(expectedNextLine ? '\n' : '') + closingTag);
case 'props-aligned':
case 'tag-aligned':
case 'line-aligned':
return fixer.replaceTextRange([cachedLastAttributeEndPos, node.range[1]],
`\n${getIndentation(tokens, expectedLocation, correctColumn)}${closingTag}`);
default:
return true;
}
},
});
},
};
},
};
@@ -0,0 +1,119 @@
import { mixNumber } from 'motion-dom';
import { hasTransform } from '../utils/has-transform.mjs';
/**
* Scales a point based on a factor and an originPoint
*/
function scalePoint(point, scale, originPoint) {
const distanceFromOrigin = point - originPoint;
const scaled = scale * distanceFromOrigin;
return originPoint + scaled;
}
/**
* Applies a translate/scale delta to a point
*/
function applyPointDelta(point, translate, scale, originPoint, boxScale) {
if (boxScale !== undefined) {
point = scalePoint(point, boxScale, originPoint);
}
return scalePoint(point, scale, originPoint) + translate;
}
/**
* Applies a translate/scale delta to an axis
*/
function applyAxisDelta(axis, translate = 0, scale = 1, originPoint, boxScale) {
axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
}
/**
* Applies a translate/scale delta to a box
*/
function applyBoxDelta(box, { x, y }) {
applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
}
const TREE_SCALE_SNAP_MIN = 0.999999999999;
const TREE_SCALE_SNAP_MAX = 1.0000000000001;
/**
* Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms
* in a tree upon our box before then calculating how to project it into our desired viewport-relative box
*
* This is the final nested loop within updateLayoutDelta for future refactoring
*/
function applyTreeDeltas(box, treeScale, treePath, isSharedTransition = false) {
const treeLength = treePath.length;
if (!treeLength)
return;
// Reset the treeScale
treeScale.x = treeScale.y = 1;
let node;
let delta;
for (let i = 0; i < treeLength; i++) {
node = treePath[i];
delta = node.projectionDelta;
/**
* TODO: Prefer to remove this, but currently we have motion components with
* display: contents in Framer.
*/
const { visualElement } = node.options;
if (visualElement &&
visualElement.props.style &&
visualElement.props.style.display === "contents") {
continue;
}
if (isSharedTransition &&
node.options.layoutScroll &&
node.scroll &&
node !== node.root) {
transformBox(box, {
x: -node.scroll.offset.x,
y: -node.scroll.offset.y,
});
}
if (delta) {
// Incoporate each ancestor's scale into a culmulative treeScale for this component
treeScale.x *= delta.x.scale;
treeScale.y *= delta.y.scale;
// Apply each ancestor's calculated delta into this component's recorded layout box
applyBoxDelta(box, delta);
}
if (isSharedTransition && hasTransform(node.latestValues)) {
transformBox(box, node.latestValues);
}
}
/**
* Snap tree scale back to 1 if it's within a non-perceivable threshold.
* This will help reduce useless scales getting rendered.
*/
if (treeScale.x < TREE_SCALE_SNAP_MAX &&
treeScale.x > TREE_SCALE_SNAP_MIN) {
treeScale.x = 1.0;
}
if (treeScale.y < TREE_SCALE_SNAP_MAX &&
treeScale.y > TREE_SCALE_SNAP_MIN) {
treeScale.y = 1.0;
}
}
function translateAxis(axis, distance) {
axis.min = axis.min + distance;
axis.max = axis.max + distance;
}
/**
* Apply a transform to an axis from the latest resolved motion values.
* This function basically acts as a bridge between a flat motion value map
* and applyAxisDelta
*/
function transformAxis(axis, axisTranslate, axisScale, boxScale, axisOrigin = 0.5) {
const originPoint = mixNumber(axis.min, axis.max, axisOrigin);
// Apply the axis delta to the final axis
applyAxisDelta(axis, axisTranslate, axisScale, originPoint, boxScale);
}
/**
* Apply a transform to a box from the latest resolved motion values.
*/
function transformBox(box, transform) {
transformAxis(box.x, transform.x, transform.scaleX, transform.scale, transform.originX);
transformAxis(box.y, transform.y, transform.scaleY, transform.scale, transform.originY);
}
export { applyAxisDelta, applyBoxDelta, applyPointDelta, applyTreeDeltas, scalePoint, transformAxis, transformBox, translateAxis };
@@ -0,0 +1,622 @@
## **6.14.0**
- [New] `parse`: add `throwOnParameterLimitExceeded` option (#517)
- [Refactor] `parse`: use `utils.combine` more
- [patch] `parse`: add explicit `throwOnLimitExceeded` default
- [actions] use shared action; re-add finishers
- [meta] Fix changelog formatting bug
- [Deps] update `side-channel`
- [Dev Deps] update `es-value-fixtures`, `has-bigints`, `has-proto`, `has-symbols`
- [Tests] increase coverage
## **6.13.1**
- [Fix] `stringify`: avoid a crash when a `filter` key is `null`
- [Fix] `utils.merge`: functions should not be stringified into keys
- [Fix] `parse`: avoid a crash with interpretNumericEntities: true, comma: true, and iso charset
- [Fix] `stringify`: ensure a non-string `filter` does not crash
- [Refactor] use `__proto__` syntax instead of `Object.create` for null objects
- [Refactor] misc cleanup
- [Tests] `utils.merge`: add some coverage
- [Tests] fix a test case
- [actions] split out node 10-20, and 20+
- [Dev Deps] update `es-value-fixtures`, `mock-property`, `object-inspect`, `tape`
## **6.13.0**
- [New] `parse`: add `strictDepth` option (#511)
- [Tests] use `npm audit` instead of `aud`
## **6.12.3**
- [Fix] `parse`: properly account for `strictNullHandling` when `allowEmptyArrays`
- [meta] fix changelog indentation
## **6.12.2**
- [Fix] `parse`: parse encoded square brackets (#506)
- [readme] add CII best practices badge
## **6.12.1**
- [Fix] `parse`: Disable `decodeDotInKeys` by default to restore previous behavior (#501)
- [Performance] `utils`: Optimize performance under large data volumes, reduce memory usage, and speed up processing (#502)
- [Refactor] `utils`: use `+=`
- [Tests] increase coverage
## **6.12.0**
- [New] `parse`/`stringify`: add `decodeDotInKeys`/`encodeDotKeys` options (#488)
- [New] `parse`: add `duplicates` option
- [New] `parse`/`stringify`: add `allowEmptyArrays` option to allow [] in object values (#487)
- [Refactor] `parse`/`stringify`: move allowDots config logic to its own variable
- [Refactor] `stringify`: move option-handling code into `normalizeStringifyOptions`
- [readme] update readme, add logos (#484)
- [readme] `stringify`: clarify default `arrayFormat` behavior
- [readme] fix line wrapping
- [readme] remove dead badges
- [Deps] update `side-channel`
- [meta] make the dist build 50% smaller
- [meta] add `sideEffects` flag
- [meta] run build in prepack, not prepublish
- [Tests] `parse`: remove useless tests; add coverage
- [Tests] `stringify`: increase coverage
- [Tests] use `mock-property`
- [Tests] `stringify`: improve coverage
- [Dev Deps] update `@ljharb/eslint-config `, `aud`, `has-override-mistake`, `has-property-descriptors`, `mock-property`, `npmignore`, `object-inspect`, `tape`
- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak`
- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6
## **6.11.2**
- [Fix] `parse`: Fix parsing when the global Object prototype is frozen (#473)
- [Tests] add passing test cases with empty keys (#473)
## **6.11.1**
- [Fix] `stringify`: encode comma values more consistently (#463)
- [readme] add usage of `filter` option for injecting custom serialization, i.e. of custom types (#447)
- [meta] remove extraneous code backticks (#457)
- [meta] fix changelog markdown
- [actions] update checkout action
- [actions] restrict action permissions
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape`
## **6.11.0**
- [New] [Fix] `stringify`: revert 0e903c0; add `commaRoundTrip` option (#442)
- [readme] fix version badge
## **6.10.5**
- [Fix] `stringify`: with `arrayFormat: comma`, properly include an explicit `[]` on a single-item array (#434)
## **6.10.4**
- [Fix] `stringify`: with `arrayFormat: comma`, include an explicit `[]` on a single-item array (#441)
- [meta] use `npmignore` to autogenerate an npmignore file
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbol`, `object-inspect`, `tape`
## **6.10.3**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [actions] reuse common workflows
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `tape`
## **6.10.2**
- [Fix] `stringify`: actually fix cyclic references (#426)
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Docs] add note and links for coercing primitive values (#408)
- [actions] update codecov uploader
- [actions] update workflows
- [Tests] clean up stringify tests slightly
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `safe-publish-latest`, `tape`
## **6.10.1**
- [Fix] `stringify`: avoid exception on repeated object values (#402)
## **6.10.0**
- [New] `stringify`: throw on cycles, instead of an infinite loop (#395, #394, #393)
- [New] `parse`: add `allowSparse` option for collapsing arrays with missing indices (#312)
- [meta] fix README.md (#399)
- [meta] only run `npm run dist` in publish, not install
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `tape`
- [Tests] fix tests on node v0.6
- [Tests] use `ljharb/actions/node/install` instead of `ljharb/actions/node/run`
- [Tests] Revert "[meta] ignore eclint transitive audit warning"
## **6.9.7**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Docs] add note and links for coercing primitive values (#408)
- [Tests] clean up stringify tests slightly
- [meta] fix README.md (#399)
- Revert "[meta] ignore eclint transitive audit warning"
- [actions] backport actions from main
- [Dev Deps] backport updates from main
## **6.9.6**
- [Fix] restore `dist` dir; mistakenly removed in d4f6c32
## **6.9.5**
- [Fix] `stringify`: do not encode parens for RFC1738
- [Fix] `stringify`: fix arrayFormat comma with empty array/objects (#350)
- [Refactor] `format`: remove `util.assign` call
- [meta] add "Allow Edits" workflow; update rebase workflow
- [actions] switch Automatic Rebase workflow to `pull_request_target` event
- [Tests] `stringify`: add tests for #378
- [Tests] migrate tests to Github Actions
- [Tests] run `nyc` on all tests; use `tape` runner
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `mkdirp`, `object-inspect`, `tape`; add `aud`
## **6.9.4**
- [Fix] `stringify`: when `arrayFormat` is `comma`, respect `serializeDate` (#364)
- [Refactor] `stringify`: reduce branching (part of #350)
- [Refactor] move `maybeMap` to `utils`
- [Dev Deps] update `browserify`, `tape`
## **6.9.3**
- [Fix] proper comma parsing of URL-encoded commas (#361)
- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336)
## **6.9.2**
- [Fix] `parse`: Fix parsing array from object with `comma` true (#359)
- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349)
- [meta] ignore eclint transitive audit warning
- [meta] fix indentation in package.json
- [meta] add tidelift marketing copy
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `has-symbols`, `tape`, `mkdirp`, `iconv-lite`
- [actions] add automatic rebasing / merge commit blocking
## **6.9.1**
- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335)
- [Fix] `parse`: with comma true, do not split non-string values (#334)
- [meta] add `funding` field
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`
- [Tests] use shared travis-ci config
## **6.9.0**
- [New] `parse`/`stringify`: Pass extra key/value argument to `decoder` (#333)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `evalmd`
- [Tests] `parse`: add passing `arrayFormat` tests
- [Tests] add `posttest` using `npx aud` to run `npm audit` without a lockfile
- [Tests] up to `node` `v12.10`, `v11.15`, `v10.16`, `v8.16`
- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray
## **6.8.3**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Tests] clean up stringify tests slightly
- [Docs] add note and links for coercing primitive values (#408)
- [meta] fix README.md (#399)
- [actions] backport actions from main
- [Dev Deps] backport updates from main
- [Refactor] `stringify`: reduce branching
- [meta] do not publish workflow files
## **6.8.2**
- [Fix] proper comma parsing of URL-encoded commas (#361)
- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336)
## **6.8.1**
- [Fix] `parse`: Fix parsing array from object with `comma` true (#359)
- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349)
- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335)
- [fix] `parse`: with comma true, do not split non-string values (#334)
- [meta] add tidelift marketing copy
- [meta] add `funding` field
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `evalmd`, `has-symbols`, `iconv-lite`, `mkdirp`, `object-inspect`
- [Tests] `parse`: add passing `arrayFormat` tests
- [Tests] use shared travis-ci configs
- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray
- [actions] add automatic rebasing / merge commit blocking
## **6.8.0**
- [New] add `depth=false` to preserve the original key; [Fix] `depth=0` should preserve the original key (#326)
- [New] [Fix] stringify symbols and bigints
- [Fix] ensure node 0.12 can stringify Symbols
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
- [Refactor] `formats`: tiny bit of cleanup.
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `safe-publish-latest`, `iconv-lite`, `tape`
- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended (#326)
- [Tests] use `eclint` instead of `editorconfig-tools`
- [docs] readme: add security note
- [meta] add github sponsorship
- [meta] add FUNDING.yml
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
## **6.7.3**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Docs] add note and links for coercing primitive values (#408)
- [meta] fix README.md (#399)
- [meta] do not publish workflow files
- [actions] backport actions from main
- [Dev Deps] backport updates from main
- [Tests] use `nyc` for coverage
- [Tests] clean up stringify tests slightly
## **6.7.2**
- [Fix] proper comma parsing of URL-encoded commas (#361)
- [Fix] parses comma delimited array while having percent-encoded comma treated as normal text (#336)
## **6.7.1**
- [Fix] `parse`: Fix parsing array from object with `comma` true (#359)
- [Fix] `parse`: with comma true, handle field that holds an array of arrays (#335)
- [fix] `parse`: with comma true, do not split non-string values (#334)
- [Fix] `parse`: throw a TypeError instead of an Error for bad charset (#349)
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
- [Refactor] `formats`: tiny bit of cleanup.
- readme: add security note
- [meta] add tidelift marketing copy
- [meta] add `funding` field
- [meta] add FUNDING.yml
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`, `safe-publish-latest`, `evalmd`, `iconv-lite`, `mkdirp`, `object-inspect`, `browserify`
- [Tests] `parse`: add passing `arrayFormat` tests
- [Tests] use shared travis-ci configs
- [Tests] `Buffer.from` in node v5.0-v5.9 and v4.0-v4.4 requires a TypedArray
- [Tests] add tests for `depth=0` and `depth=false` behavior, both current and intuitive/intended
- [Tests] use `eclint` instead of `editorconfig-tools`
- [actions] add automatic rebasing / merge commit blocking
## **6.7.0**
- [New] `stringify`/`parse`: add `comma` as an `arrayFormat` option (#276, #219)
- [Fix] correctly parse nested arrays (#212)
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source, also with an array source
- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty`
- [Refactor] `utils`: `isBuffer`: small tweak; add tests
- [Refactor] use cached `Array.isArray`
- [Refactor] `parse`/`stringify`: make a function to normalize the options
- [Refactor] `utils`: reduce observable [[Get]]s
- [Refactor] `stringify`/`utils`: cache `Array.isArray`
- [Tests] always use `String(x)` over `x.toString()`
- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10
- [Tests] temporarily allow coverage to fail
## **6.6.1**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
- [Fix] correctly parse nested arrays
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [Robustness] `stringify`: cache `Object.prototype.hasOwnProperty`
- [Refactor] `formats`: tiny bit of cleanup.
- [Refactor] `utils`: `isBuffer`: small tweak; add tests
- [Refactor]: `stringify`/`utils`: cache `Array.isArray`
- [Refactor] `utils`: reduce observable [[Get]]s
- [Refactor] use cached `Array.isArray`
- [Refactor] `parse`/`stringify`: make a function to normalize the options
- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Docs] Clarify the need for "arrayLimit" option
- [meta] fix README.md (#399)
- [meta] do not publish workflow files
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
- [meta] add FUNDING.yml
- [meta] Fixes typo in CHANGELOG.md
- [actions] backport actions from main
- [Tests] fix Buffer tests to work in node < 4.5 and node < 5.10
- [Tests] always use `String(x)` over `x.toString()`
- [Dev Deps] backport from main
## **6.6.0**
- [New] Add support for iso-8859-1, utf8 "sentinel" and numeric entities (#268)
- [New] move two-value combine to a `utils` function (#189)
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]` (#260)
- [Fix] `stringify`: do not crash in an obscure combo of `interpretNumericEntities`, a bad custom `decoder`, & `iso-8859-1`
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
- [refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269)
- [Refactor] `parse`: only need to reassign the var once
- [Refactor] `parse`/`stringify`: clean up `charset` options checking; fix defaults
- [Refactor] add missing defaults
- [Refactor] `parse`: one less `concat` call
- [Refactor] `utils`: `compactQueue`: make it explicitly side-effecting
- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`, `iconv-lite`, `safe-publish-latest`, `tape`
- [Tests] up to `node` `v10.10`, `v9.11`, `v8.12`, `v6.14`, `v4.9`; pin included builds to LTS
## **6.5.3**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
- [Fix] correctly parse nested arrays
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
- [Refactor] `utils`: reduce observable [[Get]]s
- [Refactor] use cached `Array.isArray`
- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269)
- [Refactor] `parse`: only need to reassign the var once
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
- [Docs] Clarify the need for "arrayLimit" option
- [meta] fix README.md (#399)
- [meta] add FUNDING.yml
- [actions] backport actions from main
- [Tests] always use `String(x)` over `x.toString()`
- [Tests] remove nonexistent tape option
- [Dev Deps] backport from main
## **6.5.2**
- [Fix] use `safer-buffer` instead of `Buffer` constructor
- [Refactor] utils: `module.exports` one thing, instead of mutating `exports` (#230)
- [Dev Deps] update `browserify`, `eslint`, `iconv-lite`, `safer-buffer`, `tape`, `browserify`
## **6.5.1**
- [Fix] Fix parsing & compacting very deep objects (#224)
- [Refactor] name utils functions
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape`
- [Tests] up to `node` `v8.4`; use `nvm install-latest-npm` so newer npm doesn’t break older node
- [Tests] Use precise dist for Node.js 0.6 runtime (#225)
- [Tests] make 0.6 required, now that it’s passing
- [Tests] on `node` `v8.2`; fix npm on node 0.6
## **6.5.0**
- [New] add `utils.assign`
- [New] pass default encoder/decoder to custom encoder/decoder functions (#206)
- [New] `parse`/`stringify`: add `ignoreQueryPrefix`/`addQueryPrefix` options, respectively (#213)
- [Fix] Handle stringifying empty objects with addQueryPrefix (#217)
- [Fix] do not mutate `options` argument (#207)
- [Refactor] `parse`: cache index to reuse in else statement (#182)
- [Docs] add various badges to readme (#208)
- [Dev Deps] update `eslint`, `browserify`, `iconv-lite`, `tape`
- [Tests] up to `node` `v8.1`, `v7.10`, `v6.11`; npm v4.6 breaks on node < v1; npm v5+ breaks on node < v4
- [Tests] add `editorconfig-tools`
## **6.4.1**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
- [Fix] use `safer-buffer` instead of `Buffer` constructor
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [Refactor] use cached `Array.isArray`
- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269)
- [readme] remove travis badge; add github actions/codecov badges; update URLs
- [Docs] Clarify the need for "arrayLimit" option
- [meta] fix README.md (#399)
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
- [meta] add FUNDING.yml
- [actions] backport actions from main
- [Tests] remove nonexistent tape option
- [Dev Deps] backport from main
## **6.4.0**
- [New] `qs.stringify`: add `encodeValuesOnly` option
- [Fix] follow `allowPrototypes` option during merge (#201, #201)
- [Fix] support keys starting with brackets (#202, #200)
- [Fix] chmod a-x
- [Dev Deps] update `eslint`
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
- [eslint] reduce warnings
## **6.3.3**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [Refactor] use cached `Array.isArray`
- [Refactor] `stringify`: Avoid arr = arr.concat(...), push to the existing instance (#269)
- [Docs] Clarify the need for "arrayLimit" option
- [meta] fix README.md (#399)
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
- [meta] add FUNDING.yml
- [actions] backport actions from main
- [Tests] use `safer-buffer` instead of `Buffer` constructor
- [Tests] remove nonexistent tape option
- [Dev Deps] backport from main
## **6.3.2**
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
- [Dev Deps] update `eslint`
- [Fix] chmod a-x
- [Fix] support keys starting with brackets (#202, #200)
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
## **6.3.1**
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties (thanks, @snyk!)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `browserify`, `iconv-lite`, `qs-iconv`, `tape`
- [Tests] on all node minors; improve test matrix
- [Docs] document stringify option `allowDots` (#195)
- [Docs] add empty object and array values example (#195)
- [Docs] Fix minor inconsistency/typo (#192)
- [Docs] document stringify option `sort` (#191)
- [Refactor] `stringify`: throw faster with an invalid encoder
- [Refactor] remove unnecessary escapes (#184)
- Remove contributing.md, since `qs` is no longer part of `hapi` (#183)
## **6.3.0**
- [New] Add support for RFC 1738 (#174, #173)
- [New] `stringify`: Add `serializeDate` option to customize Date serialization (#159)
- [Fix] ensure `utils.merge` handles merging two arrays
- [Refactor] only constructors should be capitalized
- [Refactor] capitalized var names are for constructors only
- [Refactor] avoid using a sparse array
- [Robustness] `formats`: cache `String#replace`
- [Dev Deps] update `browserify`, `eslint`, `@ljharb/eslint-config`; add `safe-publish-latest`
- [Tests] up to `node` `v6.8`, `v4.6`; improve test matrix
- [Tests] flesh out arrayLimit/arrayFormat tests (#107)
- [Tests] skip Object.create tests when null objects are not available
- [Tests] Turn on eslint for test files (#175)
## **6.2.4**
- [Fix] `parse`: ignore `__proto__` keys (#428)
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
- [Refactor] use cached `Array.isArray`
- [Docs] Clarify the need for "arrayLimit" option
- [meta] fix README.md (#399)
- [meta] Clean up license text so it’s properly detected as BSD-3-Clause
- [meta] add FUNDING.yml
- [actions] backport actions from main
- [Tests] use `safer-buffer` instead of `Buffer` constructor
- [Tests] remove nonexistent tape option
- [Dev Deps] backport from main
## **6.2.3**
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
- [Fix] chmod a-x
- [Fix] support keys starting with brackets (#202, #200)
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
## **6.2.2**
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
## **6.2.1**
- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
- [Refactor] Be explicit and use `Object.prototype.hasOwnProperty.call`
- [Tests] remove `parallelshell` since it does not reliably report failures
- [Tests] up to `node` `v6.3`, `v5.12`
- [Dev Deps] update `tape`, `eslint`, `@ljharb/eslint-config`, `qs-iconv`
## [**6.2.0**](https://github.com/ljharb/qs/issues?milestone=36&state=closed)
- [New] pass Buffers to the encoder/decoder directly (#161)
- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
- [Fix] fix compacting of nested sparse arrays (#150)
## **6.1.2**
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
- [Fix] chmod a-x
- [Fix] support keys starting with brackets (#202, #200)
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
## **6.1.1**
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
## [**6.1.0**](https://github.com/ljharb/qs/issues?milestone=35&state=closed)
- [New] allowDots option for `stringify` (#151)
- [Fix] "sort" option should work at a depth of 3 or more (#151)
- [Fix] Restore `dist` directory; will be removed in v7 (#148)
## **6.0.4**
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
- [Fix] chmod a-x
- [Fix] support keys starting with brackets (#202, #200)
- [Tests] up to `node` `v7.7`, `v6.10`,` v4.8`; disable osx builds since they block linux builds
## **6.0.3**
- [Fix] ensure that `allowPrototypes: false` does not ever shadow Object.prototype properties
- [Fix] Restore `dist` directory; will be removed in v7 (#148)
## [**6.0.2**](https://github.com/ljharb/qs/issues?milestone=33&state=closed)
- Revert ES6 requirement and restore support for node down to v0.8.
## [**6.0.1**](https://github.com/ljharb/qs/issues?milestone=32&state=closed)
- [**#127**](https://github.com/ljharb/qs/pull/127) Fix engines definition in package.json
## [**6.0.0**](https://github.com/ljharb/qs/issues?milestone=31&state=closed)
- [**#124**](https://github.com/ljharb/qs/issues/124) Use ES6 and drop support for node < v4
## **5.2.1**
- [Fix] ensure `key[]=x&key[]&key[]=y` results in 3, not 2, values
## [**5.2.0**](https://github.com/ljharb/qs/issues?milestone=30&state=closed)
- [**#64**](https://github.com/ljharb/qs/issues/64) Add option to sort object keys in the query string
## [**5.1.0**](https://github.com/ljharb/qs/issues?milestone=29&state=closed)
- [**#117**](https://github.com/ljharb/qs/issues/117) make URI encoding stringified results optional
- [**#106**](https://github.com/ljharb/qs/issues/106) Add flag `skipNulls` to optionally skip null values in stringify
## [**5.0.0**](https://github.com/ljharb/qs/issues?milestone=28&state=closed)
- [**#114**](https://github.com/ljharb/qs/issues/114) default allowDots to false
- [**#100**](https://github.com/ljharb/qs/issues/100) include dist to npm
## [**4.0.0**](https://github.com/ljharb/qs/issues?milestone=26&state=closed)
- [**#98**](https://github.com/ljharb/qs/issues/98) make returning plain objects and allowing prototype overwriting properties optional
## [**3.1.0**](https://github.com/ljharb/qs/issues?milestone=24&state=closed)
- [**#89**](https://github.com/ljharb/qs/issues/89) Add option to disable "Transform dot notation to bracket notation"
## [**3.0.0**](https://github.com/ljharb/qs/issues?milestone=23&state=closed)
- [**#80**](https://github.com/ljharb/qs/issues/80) qs.parse silently drops properties
- [**#77**](https://github.com/ljharb/qs/issues/77) Perf boost
- [**#60**](https://github.com/ljharb/qs/issues/60) Add explicit option to disable array parsing
- [**#74**](https://github.com/ljharb/qs/issues/74) Bad parse when turning array into object
- [**#81**](https://github.com/ljharb/qs/issues/81) Add a `filter` option
- [**#68**](https://github.com/ljharb/qs/issues/68) Fixed issue with recursion and passing strings into objects.
- [**#66**](https://github.com/ljharb/qs/issues/66) Add mixed array and object dot notation support Closes: #47
- [**#76**](https://github.com/ljharb/qs/issues/76) RFC 3986
- [**#85**](https://github.com/ljharb/qs/issues/85) No equal sign
- [**#84**](https://github.com/ljharb/qs/issues/84) update license attribute
## [**2.4.1**](https://github.com/ljharb/qs/issues?milestone=20&state=closed)
- [**#73**](https://github.com/ljharb/qs/issues/73) Property 'hasOwnProperty' of object #<Object> is not a function
## [**2.4.0**](https://github.com/ljharb/qs/issues?milestone=19&state=closed)
- [**#70**](https://github.com/ljharb/qs/issues/70) Add arrayFormat option
## [**2.3.3**](https://github.com/ljharb/qs/issues?milestone=18&state=closed)
- [**#59**](https://github.com/ljharb/qs/issues/59) make sure array indexes are >= 0, closes #57
- [**#58**](https://github.com/ljharb/qs/issues/58) make qs usable for browser loader
## [**2.3.2**](https://github.com/ljharb/qs/issues?milestone=17&state=closed)
- [**#55**](https://github.com/ljharb/qs/issues/55) allow merging a string into an object
## [**2.3.1**](https://github.com/ljharb/qs/issues?milestone=16&state=closed)
- [**#52**](https://github.com/ljharb/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
## [**2.3.0**](https://github.com/ljharb/qs/issues?milestone=15&state=closed)
- [**#50**](https://github.com/ljharb/qs/issues/50) add option to omit array indices, closes #46
## [**2.2.5**](https://github.com/ljharb/qs/issues?milestone=14&state=closed)
- [**#39**](https://github.com/ljharb/qs/issues/39) Is there an alternative to Buffer.isBuffer?
- [**#49**](https://github.com/ljharb/qs/issues/49) refactor utils.merge, fixes #45
- [**#41**](https://github.com/ljharb/qs/issues/41) avoid browserifying Buffer, for #39
## [**2.2.4**](https://github.com/ljharb/qs/issues?milestone=13&state=closed)
- [**#38**](https://github.com/ljharb/qs/issues/38) how to handle object keys beginning with a number
## [**2.2.3**](https://github.com/ljharb/qs/issues?milestone=12&state=closed)
- [**#37**](https://github.com/ljharb/qs/issues/37) parser discards first empty value in array
- [**#36**](https://github.com/ljharb/qs/issues/36) Update to lab 4.x
## [**2.2.2**](https://github.com/ljharb/qs/issues?milestone=11&state=closed)
- [**#33**](https://github.com/ljharb/qs/issues/33) Error when plain object in a value
- [**#34**](https://github.com/ljharb/qs/issues/34) use Object.prototype.hasOwnProperty.call instead of obj.hasOwnProperty
- [**#24**](https://github.com/ljharb/qs/issues/24) Changelog? Semver?
## [**2.2.1**](https://github.com/ljharb/qs/issues?milestone=10&state=closed)
- [**#32**](https://github.com/ljharb/qs/issues/32) account for circular references properly, closes #31
- [**#31**](https://github.com/ljharb/qs/issues/31) qs.parse stackoverflow on circular objects
## [**2.2.0**](https://github.com/ljharb/qs/issues?milestone=9&state=closed)
- [**#26**](https://github.com/ljharb/qs/issues/26) Don't use Buffer global if it's not present
- [**#30**](https://github.com/ljharb/qs/issues/30) Bug when merging non-object values into arrays
- [**#29**](https://github.com/ljharb/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
- [**#23**](https://github.com/ljharb/qs/issues/23) Ability to not limit parameters?
## [**2.1.0**](https://github.com/ljharb/qs/issues?milestone=8&state=closed)
- [**#22**](https://github.com/ljharb/qs/issues/22) Enable using a RegExp as delimiter
## [**2.0.0**](https://github.com/ljharb/qs/issues?milestone=7&state=closed)
- [**#18**](https://github.com/ljharb/qs/issues/18) Why is there arrayLimit?
- [**#20**](https://github.com/ljharb/qs/issues/20) Configurable parametersLimit
- [**#21**](https://github.com/ljharb/qs/issues/21) make all limits optional, for #18, for #20
## [**1.2.2**](https://github.com/ljharb/qs/issues?milestone=6&state=closed)
- [**#19**](https://github.com/ljharb/qs/issues/19) Don't overwrite null values
## [**1.2.1**](https://github.com/ljharb/qs/issues?milestone=5&state=closed)
- [**#16**](https://github.com/ljharb/qs/issues/16) ignore non-string delimiters
- [**#15**](https://github.com/ljharb/qs/issues/15) Close code block
## [**1.2.0**](https://github.com/ljharb/qs/issues?milestone=4&state=closed)
- [**#12**](https://github.com/ljharb/qs/issues/12) Add optional delim argument
- [**#13**](https://github.com/ljharb/qs/issues/13) fix #11: flattened keys in array are now correctly parsed
## [**1.1.0**](https://github.com/ljharb/qs/issues?milestone=3&state=closed)
- [**#7**](https://github.com/ljharb/qs/issues/7) Empty values of a POST array disappear after being submitted
- [**#9**](https://github.com/ljharb/qs/issues/9) Should not omit equals signs (=) when value is null
- [**#6**](https://github.com/ljharb/qs/issues/6) Minor grammar fix in README
## [**1.0.2**](https://github.com/ljharb/qs/issues?milestone=2&state=closed)
- [**#5**](https://github.com/ljharb/qs/issues/5) array holes incorrectly copied into object on large index
@@ -0,0 +1,274 @@
'use strict';
var GetIntrinsic = require('../');
var test = require('tape');
var forEach = require('for-each');
var debug = require('object-inspect');
var generatorFns = require('make-generator-function')();
var asyncFns = require('make-async-function').list();
var asyncGenFns = require('make-async-generator-function')();
var mockProperty = require('mock-property');
var callBound = require('call-bound');
var v = require('es-value-fixtures');
var $gOPD = require('gopd');
var DefinePropertyOrThrow = require('es-abstract/2023/DefinePropertyOrThrow');
var $isProto = callBound('%Object.prototype.isPrototypeOf%');
test('export', function (t) {
t.equal(typeof GetIntrinsic, 'function', 'it is a function');
t.equal(GetIntrinsic.length, 2, 'function has length of 2');
t.end();
});
test('throws', function (t) {
t['throws'](
function () { GetIntrinsic('not an intrinsic'); },
SyntaxError,
'nonexistent intrinsic throws a syntax error'
);
t['throws'](
function () { GetIntrinsic(''); },
TypeError,
'empty string intrinsic throws a type error'
);
t['throws'](
function () { GetIntrinsic('.'); },
SyntaxError,
'"just a dot" intrinsic throws a syntax error'
);
t['throws'](
function () { GetIntrinsic('%String'); },
SyntaxError,
'Leading % without trailing % throws a syntax error'
);
t['throws'](
function () { GetIntrinsic('String%'); },
SyntaxError,
'Trailing % without leading % throws a syntax error'
);
t['throws'](
function () { GetIntrinsic("String['prototype]"); },
SyntaxError,
'Dynamic property access is disallowed for intrinsics (unterminated string)'
);
t['throws'](
function () { GetIntrinsic('%Proxy.prototype.undefined%'); },
TypeError,
"Throws when middle part doesn't exist (%Proxy.prototype.undefined%)"
);
t['throws'](
function () { GetIntrinsic('%Array.prototype%garbage%'); },
SyntaxError,
'Throws with extra percent signs'
);
t['throws'](
function () { GetIntrinsic('%Array.prototype%push%'); },
SyntaxError,
'Throws with extra percent signs, even on an existing intrinsic'
);
forEach(v.nonStrings, function (nonString) {
t['throws'](
function () { GetIntrinsic(nonString); },
TypeError,
debug(nonString) + ' is not a String'
);
});
forEach(v.nonBooleans, function (nonBoolean) {
t['throws'](
function () { GetIntrinsic('%', nonBoolean); },
TypeError,
debug(nonBoolean) + ' is not a Boolean'
);
});
forEach([
'toString',
'propertyIsEnumerable',
'hasOwnProperty'
], function (objectProtoMember) {
t['throws'](
function () { GetIntrinsic(objectProtoMember); },
SyntaxError,
debug(objectProtoMember) + ' is not an intrinsic'
);
});
t.end();
});
test('base intrinsics', function (t) {
t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object');
t.equal(GetIntrinsic('Object'), Object, 'Object yields Object');
t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array');
t.equal(GetIntrinsic('Array'), Array, 'Array yields Array');
t.end();
});
test('dotted paths', function (t) {
t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString');
t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString');
t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push');
t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push');
test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) {
var original = GetIntrinsic('%ObjProto_toString%');
forEach([
'%Object.prototype.toString%',
'Object.prototype.toString',
'%ObjectPrototype.toString%',
'ObjectPrototype.toString',
'%ObjProto_toString%',
'ObjProto_toString'
], function (name) {
DefinePropertyOrThrow(Object.prototype, 'toString', {
'[[Value]]': function toString() {
return original.apply(this, arguments);
}
});
st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString');
});
DefinePropertyOrThrow(Object.prototype, 'toString', { '[[Value]]': original });
st.end();
});
test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) {
var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%');
forEach([
'%Object.prototype.propertyIsEnumerable%',
'Object.prototype.propertyIsEnumerable',
'%ObjectPrototype.propertyIsEnumerable%',
'ObjectPrototype.propertyIsEnumerable'
], function (name) {
var restore = mockProperty(Object.prototype, 'propertyIsEnumerable', {
value: function propertyIsEnumerable() {
return original.apply(this, arguments);
}
});
st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable');
restore();
});
st.end();
});
test('dotted path reports correct error', function (st) {
st['throws'](function () {
GetIntrinsic('%NonExistentIntrinsic.prototype.property%');
}, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%');
st['throws'](function () {
GetIntrinsic('%NonExistentIntrinsicPrototype.property%');
}, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%');
st.end();
});
t.end();
});
test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) {
var actual = $gOPD(Map.prototype, 'size');
t.ok(actual, 'Map.prototype.size has a descriptor');
t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function');
t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it');
t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it');
t.end();
});
test('generator functions', { skip: !generatorFns.length }, function (t) {
var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%');
var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%');
var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%');
forEach(generatorFns, function (genFn) {
var fnName = genFn.name;
fnName = fnName ? "'" + fnName + "'" : 'genFn';
t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%');
t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName);
t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype');
});
t.end();
});
test('async functions', { skip: !asyncFns.length }, function (t) {
var $AsyncFunction = GetIntrinsic('%AsyncFunction%');
var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%');
forEach(asyncFns, function (asyncFn) {
var fnName = asyncFn.name;
fnName = fnName ? "'" + fnName + "'" : 'asyncFn';
t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%');
t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName);
});
t.end();
});
test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) {
var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%');
var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%');
var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%');
forEach(asyncGenFns, function (asyncGenFn) {
var fnName = asyncGenFn.name;
fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn';
t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%');
t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName);
t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype');
});
t.end();
});
test('%ThrowTypeError%', function (t) {
var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%');
t.equal(typeof $ThrowTypeError, 'function', 'is a function');
t['throws'](
$ThrowTypeError,
TypeError,
'%ThrowTypeError% throws a TypeError'
);
t.end();
});
test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) {
t['throws'](
function () { GetIntrinsic('%AsyncGeneratorPrototype%'); },
TypeError,
'throws when missing'
);
t.equal(
GetIntrinsic('%AsyncGeneratorPrototype%', true),
undefined,
'does not throw when allowMissing'
);
t.end();
});
@@ -0,0 +1,4 @@
import type { ParseAst, ParseAstAsync } from './rollup';
export const parseAst: ParseAst;
export const parseAstAsync: ParseAstAsync;
@@ -0,0 +1,37 @@
{
"name": "w3c-keyname",
"version": "2.2.8",
"description": "Get a KeyboardEvent.key-style string from an event",
"main": "index.cjs",
"type": "module",
"exports": {
"import": "./index.js",
"require": "./index.cjs"
},
"module": "index.js",
"types": "index.d.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/marijnh/w3c-keyname.git"
},
"keywords": [
"browser",
"key",
"event",
"key code"
],
"author": "Marijn Haverbeke <marijn@haverbeke.berlin>",
"license": "MIT",
"bugs": {
"url": "https://github.com/marijnh/w3c-keyname/issues"
},
"homepage": "https://github.com/marijnh/w3c-keyname#readme",
"scripts": {
"build": "rollup -c",
"watch": "rollup -c -w",
"prepare": "npm run build"
},
"devDependencies": {
"rollup": "^1.26.3"
}
}
@@ -0,0 +1,26 @@
import * as util from 'util';
const pv = (typeof process === 'object' &&
!!process &&
typeof process.version === 'string') ?
process.version
: 'v0.0.0';
const pvs = pv
.replace(/^v/, '')
.split('.')
.map(s => parseInt(s, 10));
/* c8 ignore start */
const [major = 0, minor = 0] = pvs;
/* c8 ignore stop */
let { parseArgs: pa, } = util;
/* c8 ignore start - version specific */
if (!pa ||
major < 16 ||
(major === 18 && minor < 11) ||
(major === 16 && minor < 19)) {
// Ignore because we will clobber it for commonjs
//@ts-ignore
pa = (await import('@pkgjs/parseargs')).parseArgs;
}
/* c8 ignore stop */
export const parseArgs = pa;
//# sourceMappingURL=parse-args.js.map
@@ -0,0 +1,36 @@
import { createNode } from '../doc/createNode.js';
import { stringifyPair } from '../stringify/stringifyPair.js';
import { addPairToJSMap } from './addPairToJSMap.js';
import { NODE_TYPE, PAIR, isNode } from './identity.js';
function createPair(key, value, ctx) {
const k = createNode(key, undefined, ctx);
const v = createNode(value, undefined, ctx);
return new Pair(k, v);
}
class Pair {
constructor(key, value = null) {
Object.defineProperty(this, NODE_TYPE, { value: PAIR });
this.key = key;
this.value = value;
}
clone(schema) {
let { key, value } = this;
if (isNode(key))
key = key.clone(schema);
if (isNode(value))
value = value.clone(schema);
return new Pair(key, value);
}
toJSON(_, ctx) {
const pair = ctx?.mapAsMap ? new Map() : {};
return addPairToJSMap(ctx, pair, this);
}
toString(ctx, onComment, onChompKeep) {
return ctx?.doc
? stringifyPair(this, ctx, onComment, onChompKeep)
: JSON.stringify(this);
}
}
export { Pair, createPair };
@@ -0,0 +1,61 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseCertInfo = parseCertInfo;
const constants_js_1 = require("./constants.js");
const index_js_1 = require("../../../helpers/iso/index.js");
/**
* Cut up a TPM attestation's certInfo into intelligible chunks
*/
function parseCertInfo(certInfo) {
let pointer = 0;
const dataView = index_js_1.isoUint8Array.toDataView(certInfo);
// Get a magic constant
const magic = dataView.getUint32(pointer);
pointer += 4;
// Determine the algorithm used for attestation
const typeBuffer = dataView.getUint16(pointer);
pointer += 2;
const type = constants_js_1.TPM_ST[typeBuffer];
// The name of a parent entity, can be ignored
const qualifiedSignerLength = dataView.getUint16(pointer);
pointer += 2;
const qualifiedSigner = certInfo.slice(pointer, pointer += qualifiedSignerLength);
// Get the expected hash of `attsToBeSigned`
const extraDataLength = dataView.getUint16(pointer);
pointer += 2;
const extraData = certInfo.slice(pointer, pointer += extraDataLength);
// Information about the TPM device's internal clock, can be ignored
const clock = certInfo.slice(pointer, pointer += 8);
const resetCount = dataView.getUint32(pointer);
pointer += 4;
const restartCount = dataView.getUint32(pointer);
pointer += 4;
const safe = !!certInfo.slice(pointer, pointer += 1);
const clockInfo = { clock, resetCount, restartCount, safe };
// TPM device firmware version
const firmwareVersion = certInfo.slice(pointer, pointer += 8);
// Attested Name
const attestedNameLength = dataView.getUint16(pointer);
pointer += 2;
const attestedName = certInfo.slice(pointer, pointer += attestedNameLength);
const attestedNameDataView = index_js_1.isoUint8Array.toDataView(attestedName);
// Attested qualified name, can be ignored
const qualifiedNameLength = dataView.getUint16(pointer);
pointer += 2;
const qualifiedName = certInfo.slice(pointer, pointer += qualifiedNameLength);
const attested = {
nameAlg: constants_js_1.TPM_ALG[attestedNameDataView.getUint16(0)],
nameAlgBuffer: attestedName.slice(0, 2),
name: attestedName,
qualifiedName,
};
return {
magic,
type,
qualifiedSigner,
extraData,
clockInfo,
firmwareVersion,
attested,
};
}
@@ -0,0 +1 @@
{"name":"delayed-stream","version":"1.0.0","requiresBuild":false,"files":{"package.json":{"checkedAt":1794532111417,"integrity":"sha512-GbVWu3bA5RXylowMktE8IjjUVdqQj+e4k+WTYieu8k2Nip2wTJQmH/7v06jb5/ZEZ3w0OcYNXh5SRplSIYSorw==","mode":420,"size":684},".npmignore":{"checkedAt":1794532111417,"integrity":"sha512-Dj51I0q8aPQ3ioaz9LMqGYujAYRbDNblAQbodDRXAMxmY6hsHqEl3F6SvhfJj5oPhcqdX1ldsgEvfMNXGUXBIw==","mode":420,"size":5},"License":{"checkedAt":1794532111417,"integrity":"sha512-QC/HN+kDgNYpC7i33wfvn5wKaEz8H4mMLjVuA6w03m1OlQFq5w7L4MbJZrWZaWlso2u4xIS7xZDZT6574cQ1Og==","mode":420,"size":1085},"Makefile":{"checkedAt":1794532111418,"integrity":"sha512-VrB2F7mxP++iP2L5cK27VRXxuyOIWC3nKa6JFlrzqCR4t9A5UK+nEmdI11S/z72kl+7LowptDz9AdIEvtx04Yg==","mode":420,"size":57},"Readme.md":{"checkedAt":1794532111418,"integrity":"sha512-E/kRfSrwwFnzJPSDzGq2tOUcKN7ihwO4O/w/rHwQd8yQ7nyyIrbiFk6zGRpDAAKyTP7ge/2RoqUWBCUM/E1KSg==","mode":420,"size":3871},"lib/delayed_stream.js":{"checkedAt":1794532111418,"integrity":"sha512-qxdTU5+ev9ty1SQwdqh0WQaMtNMBTJVy/Y/X1jKJVy0z6huaCTQ3B7zAFW9S2jjUGSVagN3MPQR6y0Ja0TpsZQ==","mode":420,"size":2319}}}
@@ -0,0 +1 @@
module.exports={C:{"72":0.00431,"78":0.00431,"82":0.00431,"106":0.00431,"112":0.0345,"113":0.00431,"114":0.00431,"115":0.09489,"116":0.00863,"127":0.01725,"131":0.00431,"135":0.01294,"136":0.00431,"140":0.01294,"141":0.0345,"143":0.31054,"144":0.36661,"145":0.00431,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 73 74 75 76 77 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 107 108 109 110 111 117 118 119 120 121 122 123 124 125 126 128 129 130 132 133 134 137 138 139 142 146 147 3.5 3.6"},D:{"37":0.00431,"39":0.00431,"40":0.00863,"41":0.02157,"42":0.00863,"43":0.01294,"44":0.01294,"45":0.01294,"46":0.01294,"47":0.01294,"48":0.02157,"49":0.00431,"50":0.04744,"51":0.00431,"52":0.00863,"53":0.01294,"54":0.02157,"55":0.01294,"56":0.00863,"57":0.02157,"58":0.01725,"59":0.01294,"60":0.00431,"62":0.00863,"72":0.01725,"75":0.00863,"79":0.04744,"81":0.00431,"83":0.00431,"84":0.01725,"85":0.00431,"87":0.03882,"89":0.00431,"91":0.00431,"95":0.00431,"99":0.00863,"103":0.03882,"105":0.00431,"106":0.01294,"109":0.91436,"112":0.00431,"113":0.03882,"114":0.07332,"115":0.00431,"116":0.21996,"119":0.01294,"120":0.00863,"122":0.01294,"123":0.00431,"124":0.04313,"125":5.07209,"126":0.01294,"127":0.01294,"128":0.0647,"130":0.06038,"131":0.01725,"132":0.05607,"133":0.05607,"134":0.12939,"135":0.0647,"136":0.03882,"137":0.15096,"138":1.34566,"139":0.44855,"140":6.02526,"141":11.39495,"142":0.19409,"143":0.01294,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 61 63 64 65 66 67 68 69 70 71 73 74 76 77 78 80 86 88 90 92 93 94 96 97 98 100 101 102 104 107 108 110 111 117 118 121 129 144 145"},F:{"40":0.02157,"71":0.00431,"91":0.16821,"92":0.02588,"95":0.00863,"120":0.06901,"121":0.03882,"122":0.58657,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 93 94 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"15":0.00431,"17":0.00431,"18":0.0345,"85":0.01725,"90":0.00431,"92":0.05607,"93":0.00431,"100":0.00863,"109":0.00863,"114":0.14664,"117":0.00431,"122":0.00431,"125":0.01294,"126":0.00431,"128":0.00431,"129":0.01294,"134":0.00863,"136":0.01725,"137":0.00863,"138":0.06901,"139":0.05176,"140":2.18238,"141":4.7098,"142":0.00431,_:"12 13 14 16 79 80 81 83 84 86 87 88 89 91 94 95 96 97 98 99 101 102 103 104 105 106 107 108 110 111 112 113 115 116 118 119 120 121 123 124 127 130 131 132 133 135"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 12.1 15.4 15.5 16.4 16.5 17.0 17.3 18.1 18.2 26.2","11.1":0.08195,"13.1":0.00431,"14.1":0.0345,"15.1":0.01294,"15.2-15.3":0.01294,"15.6":0.09057,"16.0":0.00863,"16.1":0.00431,"16.2":0.01294,"16.3":0.02588,"16.6":0.25447,"17.1":0.02588,"17.2":0.00431,"17.4":0.03019,"17.5":0.00431,"17.6":0.21565,"18.0":0.00431,"18.3":0.38817,"18.4":0.02157,"18.5-18.6":0.18115,"26.0":0.37954,"26.1":0.00431},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00137,"5.0-5.1":0,"6.0-6.1":0.00547,"7.0-7.1":0.0041,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.0123,"10.0-10.2":0.00137,"10.3":0.02323,"11.0-11.2":0.34438,"11.3-11.4":0.0082,"12.0-12.1":0.00273,"12.2-12.5":0.06696,"13.0-13.1":0,"13.2":0.00683,"13.3":0.00273,"13.4-13.7":0.01093,"14.0-14.4":0.02323,"14.5-14.8":0.0246,"15.0-15.1":0.02323,"15.2-15.3":0.01777,"15.4":0.0205,"15.5":0.02323,"15.6-15.8":0.30338,"16.0":0.041,"16.1":0.07653,"16.2":0.03963,"16.3":0.07106,"16.4":0.01777,"16.5":0.03143,"16.6-16.7":0.40588,"17.0":0.0287,"17.1":0.04373,"17.2":0.03143,"17.3":0.04646,"17.4":0.082,"17.5":0.14076,"17.6-17.7":0.35531,"18.0":0.08063,"18.1":0.16672,"18.2":0.09019,"18.3":0.28972,"18.4":0.14896,"18.5-18.6":7.59549,"26.0":0.93884,"26.1":0.03416},P:{"4":0.07282,"21":0.0104,"22":0.44731,"23":0.0104,"24":0.11443,"25":0.0104,"26":0.14564,"27":0.19765,"28":2.47583,"29":0.13523,_:"20 5.0-5.4 9.2 10.1 11.1-11.2 12.0 13.0 15.0 17.0 18.0 19.0","6.2-6.4":0.0104,"7.2-7.4":0.06242,"8.2":0.04161,"14.0":0.02081,"16.0":0.02081},I:{"0":0.01136,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":1.10603,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{"2.5":0.00569,_:"3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.08531},Q:{_:"14.9"},O:{"0":0.03412},H:{"0":0.02},L:{"0":41.36094}};
@@ -0,0 +1,306 @@
"use client";
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
Tooltip: () => tooltip_default,
useTooltip: () => useTooltip
});
module.exports = __toCommonJS(src_exports);
// src/tooltip.tsx
var import_system2 = require("@heroui/system");
var import_overlays2 = require("@react-aria/overlays");
var import_framer_motion = require("framer-motion");
var import_framer_utils = require("@heroui/framer-utils");
var import_shared_utils2 = require("@heroui/shared-utils");
var import_react3 = require("react");
var import_aria_utils2 = require("@heroui/aria-utils");
var import_utils2 = require("@react-aria/utils");
// src/use-tooltip.ts
var import_react = require("react");
var import_tooltip = require("@react-stately/tooltip");
var import_utils = require("@react-aria/utils");
var import_tooltip2 = require("@react-aria/tooltip");
var import_overlays = require("@react-aria/overlays");
var import_system = require("@heroui/system");
var import_theme = require("@heroui/theme");
var import_shared_utils = require("@heroui/shared-utils");
var import_react_utils = require("@heroui/react-utils");
var import_react_utils2 = require("@heroui/react-utils");
var import_react2 = require("react");
var import_aria_utils = require("@heroui/aria-utils");
var import_use_safe_layout_effect = require("@heroui/use-safe-layout-effect");
function useTooltip(originalProps) {
var _a, _b;
const globalContext = (0, import_system.useProviderContext)();
const [props, variantProps] = (0, import_system.mapPropsVariants)(originalProps, import_theme.popover.variantKeys);
const {
ref,
as,
isOpen: isOpenProp,
content,
children,
defaultOpen,
onOpenChange,
isDisabled,
trigger: triggerAction,
shouldFlip = true,
containerPadding = 12,
placement: placementProp = "top",
delay = 0,
closeDelay = 500,
showArrow = false,
offset = 7,
crossOffset = 0,
isDismissable,
shouldCloseOnBlur = true,
portalContainer,
isKeyboardDismissDisabled = false,
updatePositionDeps = [],
shouldCloseOnInteractOutside,
className,
onClose,
motionProps,
classNames,
...otherProps
} = props;
const Component = as || "div";
const disableAnimation = (_b = (_a = originalProps == null ? void 0 : originalProps.disableAnimation) != null ? _a : globalContext == null ? void 0 : globalContext.disableAnimation) != null ? _b : false;
const state = (0, import_tooltip.useTooltipTriggerState)({
delay,
closeDelay,
isDisabled,
defaultOpen,
isOpen: isOpenProp,
onOpenChange: (isOpen2) => {
onOpenChange == null ? void 0 : onOpenChange(isOpen2);
if (!isOpen2) {
onClose == null ? void 0 : onClose();
}
}
});
const triggerRef = (0, import_react2.useRef)(null);
const overlayRef = (0, import_react2.useRef)(null);
const tooltipId = (0, import_react.useId)();
const isOpen = state.isOpen && !isDisabled;
(0, import_react.useImperativeHandle)(
ref,
() => (0, import_react_utils2.createDOMRef)(overlayRef)
);
const { triggerProps, tooltipProps: triggerTooltipProps } = (0, import_tooltip2.useTooltipTrigger)(
{
isDisabled,
trigger: triggerAction
},
state,
triggerRef
);
const { tooltipProps } = (0, import_tooltip2.useTooltip)(
{
isOpen,
...(0, import_utils.mergeProps)(props, triggerTooltipProps)
},
state
);
const {
overlayProps: positionProps,
placement,
updatePosition
} = (0, import_overlays.useOverlayPosition)({
isOpen,
targetRef: triggerRef,
placement: (0, import_aria_utils.toReactAriaPlacement)(placementProp),
overlayRef,
offset: showArrow ? offset + 3 : offset,
crossOffset,
shouldFlip,
containerPadding
});
(0, import_use_safe_layout_effect.useSafeLayoutEffect)(() => {
if (!updatePositionDeps.length)
return;
updatePosition();
}, updatePositionDeps);
const { overlayProps } = (0, import_overlays.useOverlay)(
{
isOpen,
onClose: state.close,
isDismissable,
shouldCloseOnBlur,
isKeyboardDismissDisabled,
shouldCloseOnInteractOutside
},
overlayRef
);
const slots = (0, import_react2.useMemo)(
() => {
var _a2, _b2, _c;
return (0, import_theme.popover)({
...variantProps,
disableAnimation,
radius: (_a2 = originalProps == null ? void 0 : originalProps.radius) != null ? _a2 : "md",
size: (_b2 = originalProps == null ? void 0 : originalProps.size) != null ? _b2 : "md",
shadow: (_c = originalProps == null ? void 0 : originalProps.shadow) != null ? _c : "sm"
});
},
[
(0, import_shared_utils.objectToDeps)(variantProps),
disableAnimation,
originalProps == null ? void 0 : originalProps.radius,
originalProps == null ? void 0 : originalProps.size,
originalProps == null ? void 0 : originalProps.shadow
]
);
const getTriggerProps = (0, import_react2.useCallback)(
(props2 = {}, _ref = null) => ({
...(0, import_utils.mergeProps)(triggerProps, props2),
ref: (0, import_react_utils.mergeRefs)(_ref, triggerRef),
"aria-describedby": isOpen ? tooltipId : void 0
}),
[triggerProps, isOpen, tooltipId, state]
);
const getTooltipProps = (0, import_react2.useCallback)(
() => ({
ref: overlayRef,
"data-slot": "base",
"data-open": (0, import_shared_utils.dataAttr)(isOpen),
"data-arrow": (0, import_shared_utils.dataAttr)(showArrow),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-placement": (0, import_aria_utils.getArrowPlacement)(placement || "top", placementProp),
...(0, import_utils.mergeProps)(tooltipProps, overlayProps, otherProps),
style: (0, import_utils.mergeProps)(positionProps.style, otherProps.style, props.style),
className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
id: tooltipId
}),
[
slots,
isOpen,
showArrow,
isDisabled,
placement,
placementProp,
tooltipProps,
overlayProps,
otherProps,
positionProps,
props,
tooltipId
]
);
const getTooltipContentProps = (0, import_react2.useCallback)(
() => ({
"data-slot": "content",
"data-open": (0, import_shared_utils.dataAttr)(isOpen),
"data-arrow": (0, import_shared_utils.dataAttr)(showArrow),
"data-disabled": (0, import_shared_utils.dataAttr)(isDisabled),
"data-placement": (0, import_aria_utils.getArrowPlacement)(placement || "top", placementProp),
className: slots.content({ class: (0, import_shared_utils.clsx)(classNames == null ? void 0 : classNames.content, className) })
}),
[slots, isOpen, showArrow, isDisabled, placement, placementProp, classNames]
);
return {
Component,
content,
children,
isOpen,
triggerRef,
showArrow,
portalContainer,
placement: placementProp,
disableAnimation,
isDisabled,
motionProps,
getTooltipContentProps,
getTriggerProps,
getTooltipProps
};
}
// src/tooltip.tsx
var import_jsx_runtime = require("react/jsx-runtime");
var domAnimation = () => import("@heroui/dom-animation").then((res) => res.default);
var Tooltip = (0, import_system2.forwardRef)((props, ref) => {
const {
Component,
children,
content,
isOpen,
portalContainer,
placement,
disableAnimation,
motionProps,
getTriggerProps,
getTooltipProps,
getTooltipContentProps
} = useTooltip({
...props,
ref
});
let trigger;
try {
const childrenNum = import_react3.Children.count(children);
if (childrenNum !== 1)
throw new Error();
if (!(0, import_react3.isValidElement)(children)) {
trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { ...getTriggerProps(), children });
} else {
const child = children;
trigger = (0, import_react3.cloneElement)(child, getTriggerProps(child.props, child.ref));
}
} catch (error) {
trigger = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {});
(0, import_shared_utils2.warn)("Tooltip must have only one child node. Please, check your code.");
}
const { ref: tooltipRef, id, style, ...otherTooltipProps } = getTooltipProps();
const animatedContent = /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: tooltipRef, id, style, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.LazyMotion, { features: domAnimation, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_framer_motion.m.div,
{
animate: "enter",
exit: "exit",
initial: "exit",
variants: import_framer_utils.TRANSITION_VARIANTS.scaleSpring,
...(0, import_utils2.mergeProps)(motionProps, otherTooltipProps),
style: {
...(0, import_aria_utils2.getTransformOrigins)(placement)
},
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...getTooltipContentProps(), children: content })
}
) }) });
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
trigger,
disableAnimation && isOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.OverlayContainer, { portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ref: tooltipRef, id, style, ...otherTooltipProps, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...getTooltipContentProps(), children: content }) }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_framer_motion.AnimatePresence, { children: isOpen ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_overlays2.OverlayContainer, { portalContainer, children: animatedContent }) : null })
] });
});
Tooltip.displayName = "HeroUI.Tooltip";
var tooltip_default = Tooltip;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
Tooltip,
useTooltip
});
@@ -0,0 +1,39 @@
import baseMerge from './_baseMerge.js';
import createAssigner from './_createAssigner.js';
/**
* This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source
* properties. If `customizer` returns `undefined`, merging is handled by the
* method instead. The `customizer` is invoked with six arguments:
* (objValue, srcValue, key, object, source, stack).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} customizer The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* function customizer(objValue, srcValue) {
* if (_.isArray(objValue)) {
* return objValue.concat(srcValue);
* }
* }
*
* var object = { 'a': [1], 'b': [2] };
* var other = { 'a': [3], 'b': [4] };
*
* _.mergeWith(object, other, customizer);
* // => { 'a': [1, 3], 'b': [2, 4] }
*/
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
baseMerge(object, source, srcIndex, customizer);
});
export default mergeWith;
@@ -0,0 +1,15 @@
import { Binding } from '../../binding/models/Binding';
import { InternalBindingConstraints } from '../../binding/models/BindingConstraintsImplementation';
import { SingleImmutableLinkedList } from '../../common/models/SingleImmutableLinkedList';
import { PlanServiceNodeBindingRemovedResult } from '../../metadata/models/PlanServiceNodeBindingRemovedResult';
import { PlanServiceNode } from '../models/PlanServiceNode';
/**
* Detach a binding to the root service node if it is context-free.
* @param serviceNode The service node to attach the binding to.
* @param binding The binding to attach.
* @param bindingConstraintsList The list of binding constraints.
* @param optionalBindings Whether the bindings are optional.
* @returns True if the binding requires ancestor metadata, false otherwise.
*/
export declare function removeServiceNodeBindingIfContextFree(serviceNode: PlanServiceNode, binding: Binding<unknown>, bindingConstraintsList: SingleImmutableLinkedList<InternalBindingConstraints>, optionalBindings: boolean): PlanServiceNodeBindingRemovedResult;
//# sourceMappingURL=removeServiceNodeBindingIfContextFree.d.ts.map
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.transformFile = void 0;
exports.transformFileAsync = transformFileAsync;
exports.transformFileSync = transformFileSync;
const transformFile = exports.transformFile = function transformFile(filename, opts, callback) {
if (typeof opts === "function") {
callback = opts;
}
callback(new Error("Transforming files is not supported in browsers"), null);
};
function transformFileSync() {
throw new Error("Transforming files is not supported in browsers");
}
function transformFileAsync() {
return Promise.reject(new Error("Transforming files is not supported in browsers"));
}
0 && 0;
//# sourceMappingURL=transform-file-browser.js.map
@@ -0,0 +1,36 @@
var baseAssignValue = require('./_baseAssignValue'),
createAggregator = require('./_createAggregator');
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The corresponding value of
* each key is the last element responsible for generating the key. The
* iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* var array = [
* { 'dir': 'left', 'code': 97 },
* { 'dir': 'right', 'code': 100 }
* ];
*
* _.keyBy(array, function(o) {
* return String.fromCharCode(o.code);
* });
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*
* _.keyBy(array, 'dir');
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*/
var keyBy = createAggregator(function(result, value, key) {
baseAssignValue(result, key, value);
});
module.exports = keyBy;
@@ -0,0 +1,274 @@
"use strict";
// Copyright 2008 Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Code generated by the Protocol Buffer compiler is owned by the owner
// of the input file used when generating it. This code is not
// standalone and requires a support library to be linked with it. This
// support library is itself covered by the above license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.varint32read = exports.varint32write = exports.int64toString = exports.int64fromString = exports.varint64write = exports.varint64read = void 0;
/**
* Read a 64 bit varint as two JS numbers.
*
* Returns tuple:
* [0]: low bits
* [0]: high bits
*
* Copyright 2008 Google Inc. All rights reserved.
*
* See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L175
*/
function varint64read() {
let lowBits = 0;
let highBits = 0;
for (let shift = 0; shift < 28; shift += 7) {
let b = this.buf[this.pos++];
lowBits |= (b & 0x7F) << shift;
if ((b & 0x80) == 0) {
this.assertBounds();
return [lowBits, highBits];
}
}
let middleByte = this.buf[this.pos++];
// last four bits of the first 32 bit number
lowBits |= (middleByte & 0x0F) << 28;
// 3 upper bits are part of the next 32 bit number
highBits = (middleByte & 0x70) >> 4;
if ((middleByte & 0x80) == 0) {
this.assertBounds();
return [lowBits, highBits];
}
for (let shift = 3; shift <= 31; shift += 7) {
let b = this.buf[this.pos++];
highBits |= (b & 0x7F) << shift;
if ((b & 0x80) == 0) {
this.assertBounds();
return [lowBits, highBits];
}
}
throw new Error('invalid varint');
}
exports.varint64read = varint64read;
/**
* Write a 64 bit varint, given as two JS numbers, to the given bytes array.
*
* Copyright 2008 Google Inc. All rights reserved.
*
* See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344
*/
function varint64write(lo, hi, bytes) {
for (let i = 0; i < 28; i = i + 7) {
const shift = lo >>> i;
const hasNext = !((shift >>> 7) == 0 && hi == 0);
const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;
bytes.push(byte);
if (!hasNext) {
return;
}
}
const splitBits = ((lo >>> 28) & 0x0F) | ((hi & 0x07) << 4);
const hasMoreBits = !((hi >> 3) == 0);
bytes.push((hasMoreBits ? splitBits | 0x80 : splitBits) & 0xFF);
if (!hasMoreBits) {
return;
}
for (let i = 3; i < 31; i = i + 7) {
const shift = hi >>> i;
const hasNext = !((shift >>> 7) == 0);
const byte = (hasNext ? shift | 0x80 : shift) & 0xFF;
bytes.push(byte);
if (!hasNext) {
return;
}
}
bytes.push((hi >>> 31) & 0x01);
}
exports.varint64write = varint64write;
// constants for binary math
const TWO_PWR_32_DBL = (1 << 16) * (1 << 16);
/**
* Parse decimal string of 64 bit integer value as two JS numbers.
*
* Returns tuple:
* [0]: minus sign?
* [1]: low bits
* [2]: high bits
*
* Copyright 2008 Google Inc.
*/
function int64fromString(dec) {
// Check for minus sign.
let minus = dec[0] == '-';
if (minus)
dec = dec.slice(1);
// Work 6 decimal digits at a time, acting like we're converting base 1e6
// digits to binary. This is safe to do with floating point math because
// Number.isSafeInteger(ALL_32_BITS * 1e6) == true.
const base = 1e6;
let lowBits = 0;
let highBits = 0;
function add1e6digit(begin, end) {
// Note: Number('') is 0.
const digit1e6 = Number(dec.slice(begin, end));
highBits *= base;
lowBits = lowBits * base + digit1e6;
// Carry bits from lowBits to highBits
if (lowBits >= TWO_PWR_32_DBL) {
highBits = highBits + ((lowBits / TWO_PWR_32_DBL) | 0);
lowBits = lowBits % TWO_PWR_32_DBL;
}
}
add1e6digit(-24, -18);
add1e6digit(-18, -12);
add1e6digit(-12, -6);
add1e6digit(-6);
return [minus, lowBits, highBits];
}
exports.int64fromString = int64fromString;
/**
* Format 64 bit integer value (as two JS numbers) to decimal string.
*
* Copyright 2008 Google Inc.
*/
function int64toString(bitsLow, bitsHigh) {
// Skip the expensive conversion if the number is small enough to use the
// built-in conversions.
if ((bitsHigh >>> 0) <= 0x1FFFFF) {
return '' + (TWO_PWR_32_DBL * bitsHigh + (bitsLow >>> 0));
}
// What this code is doing is essentially converting the input number from
// base-2 to base-1e7, which allows us to represent the 64-bit range with
// only 3 (very large) digits. Those digits are then trivial to convert to
// a base-10 string.
// The magic numbers used here are -
// 2^24 = 16777216 = (1,6777216) in base-1e7.
// 2^48 = 281474976710656 = (2,8147497,6710656) in base-1e7.
// Split 32:32 representation into 16:24:24 representation so our
// intermediate digits don't overflow.
let low = bitsLow & 0xFFFFFF;
let mid = (((bitsLow >>> 24) | (bitsHigh << 8)) >>> 0) & 0xFFFFFF;
let high = (bitsHigh >> 16) & 0xFFFF;
// Assemble our three base-1e7 digits, ignoring carries. The maximum
// value in a digit at this step is representable as a 48-bit integer, which
// can be stored in a 64-bit floating point number.
let digitA = low + (mid * 6777216) + (high * 6710656);
let digitB = mid + (high * 8147497);
let digitC = (high * 2);
// Apply carries from A to B and from B to C.
let base = 10000000;
if (digitA >= base) {
digitB += Math.floor(digitA / base);
digitA %= base;
}
if (digitB >= base) {
digitC += Math.floor(digitB / base);
digitB %= base;
}
// Convert base-1e7 digits to base-10, with optional leading zeroes.
function decimalFrom1e7(digit1e7, needLeadingZeros) {
let partial = digit1e7 ? String(digit1e7) : '';
if (needLeadingZeros) {
return '0000000'.slice(partial.length) + partial;
}
return partial;
}
return decimalFrom1e7(digitC, /*needLeadingZeros=*/ 0) +
decimalFrom1e7(digitB, /*needLeadingZeros=*/ digitC) +
// If the final 1e7 digit didn't need leading zeros, we would have
// returned via the trivial code path at the top.
decimalFrom1e7(digitA, /*needLeadingZeros=*/ 1);
}
exports.int64toString = int64toString;
/**
* Write a 32 bit varint, signed or unsigned. Same as `varint64write(0, value, bytes)`
*
* Copyright 2008 Google Inc. All rights reserved.
*
* See https://github.com/protocolbuffers/protobuf/blob/1b18833f4f2a2f681f4e4a25cdf3b0a43115ec26/js/binary/encoder.js#L144
*/
function varint32write(value, bytes) {
if (value >= 0) {
// write value as varint 32
while (value > 0x7f) {
bytes.push((value & 0x7f) | 0x80);
value = value >>> 7;
}
bytes.push(value);
}
else {
for (let i = 0; i < 9; i++) {
bytes.push(value & 127 | 128);
value = value >> 7;
}
bytes.push(1);
}
}
exports.varint32write = varint32write;
/**
* Read an unsigned 32 bit varint.
*
* See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/buffer_decoder.js#L220
*/
function varint32read() {
let b = this.buf[this.pos++];
let result = b & 0x7F;
if ((b & 0x80) == 0) {
this.assertBounds();
return result;
}
b = this.buf[this.pos++];
result |= (b & 0x7F) << 7;
if ((b & 0x80) == 0) {
this.assertBounds();
return result;
}
b = this.buf[this.pos++];
result |= (b & 0x7F) << 14;
if ((b & 0x80) == 0) {
this.assertBounds();
return result;
}
b = this.buf[this.pos++];
result |= (b & 0x7F) << 21;
if ((b & 0x80) == 0) {
this.assertBounds();
return result;
}
// Extract only last 4 bits
b = this.buf[this.pos++];
result |= (b & 0x0F) << 28;
for (let readBytes = 5; ((b & 0x80) !== 0) && readBytes < 10; readBytes++)
b = this.buf[this.pos++];
if ((b & 0x80) != 0)
throw new Error('invalid varint');
this.assertBounds();
// Result can have 32 bits, convert it to unsigned
return result >>> 0;
}
exports.varint32read = varint32read;
@@ -0,0 +1 @@
{"version":3,"names":["_index","require","isNodesEquivalent","a","b","type","fields","Object","keys","NODE_FIELDS","visitorKeys","VISITOR_KEYS","field","val_a","val_b","Array","isArray","length","i","includes","key"],"sources":["../../src/validators/isNodesEquivalent.ts"],"sourcesContent":["import { NODE_FIELDS, VISITOR_KEYS } from \"../definitions/index.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Check if two nodes are equivalent\n */\nexport default function isNodesEquivalent<T extends Partial<t.Node>>(\n a: T,\n b: any,\n): b is T {\n if (\n typeof a !== \"object\" ||\n typeof b !== \"object\" ||\n a == null ||\n b == null\n ) {\n return a === b;\n }\n\n if (a.type !== b.type) {\n return false;\n }\n\n const fields = Object.keys(NODE_FIELDS[a.type] || a.type);\n const visitorKeys = VISITOR_KEYS[a.type];\n\n for (const field of fields) {\n const val_a =\n // @ts-expect-error field must present in a\n a[field];\n const val_b = b[field];\n if (typeof val_a !== typeof val_b) {\n return false;\n }\n if (val_a == null && val_b == null) {\n continue;\n } else if (val_a == null || val_b == null) {\n return false;\n }\n\n if (Array.isArray(val_a)) {\n if (!Array.isArray(val_b)) {\n return false;\n }\n if (val_a.length !== val_b.length) {\n return false;\n }\n\n for (let i = 0; i < val_a.length; i++) {\n if (!isNodesEquivalent(val_a[i], val_b[i])) {\n return false;\n }\n }\n continue;\n }\n\n if (typeof val_a === \"object\" && !visitorKeys?.includes(field)) {\n for (const key of Object.keys(val_a)) {\n if (val_a[key] !== val_b[key]) {\n return false;\n }\n }\n continue;\n }\n\n if (!isNodesEquivalent(val_a, val_b)) {\n return false;\n }\n }\n\n return true;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAMe,SAASC,iBAAiBA,CACvCC,CAAI,EACJC,CAAM,EACE;EACR,IACE,OAAOD,CAAC,KAAK,QAAQ,IACrB,OAAOC,CAAC,KAAK,QAAQ,IACrBD,CAAC,IAAI,IAAI,IACTC,CAAC,IAAI,IAAI,EACT;IACA,OAAOD,CAAC,KAAKC,CAAC;EAChB;EAEA,IAAID,CAAC,CAACE,IAAI,KAAKD,CAAC,CAACC,IAAI,EAAE;IACrB,OAAO,KAAK;EACd;EAEA,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACC,kBAAW,CAACN,CAAC,CAACE,IAAI,CAAC,IAAIF,CAAC,CAACE,IAAI,CAAC;EACzD,MAAMK,WAAW,GAAGC,mBAAY,CAACR,CAAC,CAACE,IAAI,CAAC;EAExC,KAAK,MAAMO,KAAK,IAAIN,MAAM,EAAE;IAC1B,MAAMO,KAAK,GAETV,CAAC,CAACS,KAAK,CAAC;IACV,MAAME,KAAK,GAAGV,CAAC,CAACQ,KAAK,CAAC;IACtB,IAAI,OAAOC,KAAK,KAAK,OAAOC,KAAK,EAAE;MACjC,OAAO,KAAK;IACd;IACA,IAAID,KAAK,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI,EAAE;MAClC;IACF,CAAC,MAAM,IAAID,KAAK,IAAI,IAAI,IAAIC,KAAK,IAAI,IAAI,EAAE;MACzC,OAAO,KAAK;IACd;IAEA,IAAIC,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EAAE;MACxB,IAAI,CAACE,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;QACzB,OAAO,KAAK;MACd;MACA,IAAID,KAAK,CAACI,MAAM,KAAKH,KAAK,CAACG,MAAM,EAAE;QACjC,OAAO,KAAK;MACd;MAEA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,KAAK,CAACI,MAAM,EAAEC,CAAC,EAAE,EAAE;QACrC,IAAI,CAAChB,iBAAiB,CAACW,KAAK,CAACK,CAAC,CAAC,EAAEJ,KAAK,CAACI,CAAC,CAAC,CAAC,EAAE;UAC1C,OAAO,KAAK;QACd;MACF;MACA;IACF;IAEA,IAAI,OAAOL,KAAK,KAAK,QAAQ,IAAI,EAACH,WAAW,YAAXA,WAAW,CAAES,QAAQ,CAACP,KAAK,CAAC,GAAE;MAC9D,KAAK,MAAMQ,GAAG,IAAIb,MAAM,CAACC,IAAI,CAACK,KAAK,CAAC,EAAE;QACpC,IAAIA,KAAK,CAACO,GAAG,CAAC,KAAKN,KAAK,CAACM,GAAG,CAAC,EAAE;UAC7B,OAAO,KAAK;QACd;MACF;MACA;IACF;IAEA,IAAI,CAAClB,iBAAiB,CAACW,KAAK,EAAEC,KAAK,CAAC,EAAE;MACpC,OAAO,KAAK;IACd;EACF;EAEA,OAAO,IAAI;AACb","ignoreList":[]}
@@ -0,0 +1,27 @@
{
"name": "unpipe",
"description": "Unpipe a stream from all destinations",
"version": "1.0.0",
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
"license": "MIT",
"repository": "stream-utils/unpipe",
"devDependencies": {
"istanbul": "0.3.15",
"mocha": "2.2.5",
"readable-stream": "1.1.13"
},
"files": [
"HISTORY.md",
"LICENSE",
"README.md",
"index.js"
],
"engines": {
"node": ">= 0.8"
},
"scripts": {
"test": "mocha --reporter spec --bail --check-leaks test/",
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
}
}
@@ -0,0 +1,11 @@
/**
* @import {Options, State} from 'mdast-util-to-markdown'
*/
/**
* @param {State} state
* @returns {Exclude<Options['strong'], null | undefined>}
*/
export function checkStrong(state: State): Exclude<Options["strong"], null | undefined>;
import type { State } from 'mdast-util-to-markdown';
import type { Options } from 'mdast-util-to-markdown';
//# sourceMappingURL=check-strong.d.ts.map
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
@@ -0,0 +1 @@
export declare const schema: (import('../types').CollectionTag | import('../types').ScalarTag)[];
@@ -0,0 +1 @@
{"mappings":"AAAA,iBAAiB;IAAG,WAAW,CAAC,kBAAM,CAAC;AACvC","sources":["packages/@react-aria/overlays/intl/sk-SK.json"],"sourcesContent":["{\n \"dismiss\": \"Zrušiť\"\n}\n"],"names":[],"version":3,"file":"sk-SK.main.js.map"}
@@ -0,0 +1,178 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ValueDiffError = exports.Edit = exports.Delete = exports.Update = exports.Insert = void 0;
exports.Diff = Diff;
exports.Patch = Patch;
const index_1 = require("../guard/index");
const index_2 = require("../pointer/index");
const index_3 = require("../clone/index");
const equal_1 = require("../equal/equal");
const index_4 = require("../../type/error/index");
const index_5 = require("../../type/literal/index");
const index_6 = require("../../type/object/index");
const index_7 = require("../../type/string/index");
const index_8 = require("../../type/unknown/index");
const index_9 = require("../../type/union/index");
exports.Insert = (0, index_6.Object)({
type: (0, index_5.Literal)('insert'),
path: (0, index_7.String)(),
value: (0, index_8.Unknown)(),
});
exports.Update = (0, index_6.Object)({
type: (0, index_5.Literal)('update'),
path: (0, index_7.String)(),
value: (0, index_8.Unknown)(),
});
exports.Delete = (0, index_6.Object)({
type: (0, index_5.Literal)('delete'),
path: (0, index_7.String)(),
});
exports.Edit = (0, index_9.Union)([exports.Insert, exports.Update, exports.Delete]);
// ------------------------------------------------------------------
// Errors
// ------------------------------------------------------------------
class ValueDiffError extends index_4.TypeBoxError {
constructor(value, message) {
super(message);
this.value = value;
}
}
exports.ValueDiffError = ValueDiffError;
// ------------------------------------------------------------------
// Command Factory
// ------------------------------------------------------------------
function CreateUpdate(path, value) {
return { type: 'update', path, value };
}
function CreateInsert(path, value) {
return { type: 'insert', path, value };
}
function CreateDelete(path) {
return { type: 'delete', path };
}
// ------------------------------------------------------------------
// AssertDiffable
// ------------------------------------------------------------------
function AssertDiffable(value) {
if (globalThis.Object.getOwnPropertySymbols(value).length > 0)
throw new ValueDiffError(value, 'Cannot diff objects with symbols');
}
// ------------------------------------------------------------------
// Diffing Generators
// ------------------------------------------------------------------
function* ObjectType(path, current, next) {
AssertDiffable(current);
AssertDiffable(next);
if (!(0, index_1.IsStandardObject)(next))
return yield CreateUpdate(path, next);
const currentKeys = globalThis.Object.getOwnPropertyNames(current);
const nextKeys = globalThis.Object.getOwnPropertyNames(next);
// ----------------------------------------------------------------
// inserts
// ----------------------------------------------------------------
for (const key of nextKeys) {
if ((0, index_1.HasPropertyKey)(current, key))
continue;
yield CreateInsert(`${path}/${key}`, next[key]);
}
// ----------------------------------------------------------------
// updates
// ----------------------------------------------------------------
for (const key of currentKeys) {
if (!(0, index_1.HasPropertyKey)(next, key))
continue;
if ((0, equal_1.Equal)(current, next))
continue;
yield* Visit(`${path}/${key}`, current[key], next[key]);
}
// ----------------------------------------------------------------
// deletes
// ----------------------------------------------------------------
for (const key of currentKeys) {
if ((0, index_1.HasPropertyKey)(next, key))
continue;
yield CreateDelete(`${path}/${key}`);
}
}
function* ArrayType(path, current, next) {
if (!(0, index_1.IsArray)(next))
return yield CreateUpdate(path, next);
for (let i = 0; i < Math.min(current.length, next.length); i++) {
yield* Visit(`${path}/${i}`, current[i], next[i]);
}
for (let i = 0; i < next.length; i++) {
if (i < current.length)
continue;
yield CreateInsert(`${path}/${i}`, next[i]);
}
for (let i = current.length - 1; i >= 0; i--) {
if (i < next.length)
continue;
yield CreateDelete(`${path}/${i}`);
}
}
function* TypedArrayType(path, current, next) {
if (!(0, index_1.IsTypedArray)(next) || current.length !== next.length || globalThis.Object.getPrototypeOf(current).constructor.name !== globalThis.Object.getPrototypeOf(next).constructor.name)
return yield CreateUpdate(path, next);
for (let i = 0; i < Math.min(current.length, next.length); i++) {
yield* Visit(`${path}/${i}`, current[i], next[i]);
}
}
function* ValueType(path, current, next) {
if (current === next)
return;
yield CreateUpdate(path, next);
}
function* Visit(path, current, next) {
if ((0, index_1.IsStandardObject)(current))
return yield* ObjectType(path, current, next);
if ((0, index_1.IsArray)(current))
return yield* ArrayType(path, current, next);
if ((0, index_1.IsTypedArray)(current))
return yield* TypedArrayType(path, current, next);
if ((0, index_1.IsValueType)(current))
return yield* ValueType(path, current, next);
throw new ValueDiffError(current, 'Unable to diff value');
}
// ------------------------------------------------------------------
// Diff
// ------------------------------------------------------------------
function Diff(current, next) {
return [...Visit('', current, next)];
}
// ------------------------------------------------------------------
// Patch
// ------------------------------------------------------------------
function IsRootUpdate(edits) {
return edits.length > 0 && edits[0].path === '' && edits[0].type === 'update';
}
function IsIdentity(edits) {
return edits.length === 0;
}
function Patch(current, edits) {
if (IsRootUpdate(edits)) {
return (0, index_3.Clone)(edits[0].value);
}
if (IsIdentity(edits)) {
return (0, index_3.Clone)(current);
}
const clone = (0, index_3.Clone)(current);
for (const edit of edits) {
switch (edit.type) {
case 'insert': {
index_2.ValuePointer.Set(clone, edit.path, edit.value);
break;
}
case 'update': {
index_2.ValuePointer.Set(clone, edit.path, edit.value);
break;
}
case 'delete': {
index_2.ValuePointer.Delete(clone, edit.path);
break;
}
}
}
return clone;
}
@@ -0,0 +1,18 @@
'use strict';
var l, s;
if (process.env.NODE_ENV === 'production') {
l = require('./cjs/react-dom-server-legacy.node.production.js');
s = require('./cjs/react-dom-server.node.production.js');
} else {
l = require('./cjs/react-dom-server-legacy.node.development.js');
s = require('./cjs/react-dom-server.node.development.js');
}
exports.version = l.version;
exports.renderToString = l.renderToString;
exports.renderToStaticMarkup = l.renderToStaticMarkup;
exports.renderToPipeableStream = s.renderToPipeableStream;
exports.renderToReadableStream = s.renderToReadableStream;
exports.resumeToPipeableStream = s.resumeToPipeableStream;
exports.resume = s.resume;
@@ -0,0 +1,46 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const Hook = require("./Hook");
const HookCodeFactory = require("./HookCodeFactory");
class SyncLoopHookCodeFactory extends HookCodeFactory {
content({ onError, onDone, rethrowIfPossible }) {
return this.callTapsLooping({
onError: (i, err) => onError(err),
onDone,
rethrowIfPossible
});
}
}
const factory = new SyncLoopHookCodeFactory();
const TAP_ASYNC = () => {
throw new Error("tapAsync is not supported on a SyncLoopHook");
};
const TAP_PROMISE = () => {
throw new Error("tapPromise is not supported on a SyncLoopHook");
};
function COMPILE(options) {
factory.setup(this, options);
return factory.create(options);
}
function SyncLoopHook(args = [], name = undefined) {
const hook = new Hook(args, name);
hook.constructor = SyncLoopHook;
hook.tapAsync = TAP_ASYNC;
hook.tapPromise = TAP_PROMISE;
hook.compile = COMPILE;
return hook;
}
SyncLoopHook.prototype = null;
module.exports = SyncLoopHook;
@@ -0,0 +1,41 @@
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/// <reference no-default-lib="true"/>
/// <reference lib="es2015.iterable" />
/// <reference lib="es2015.symbol" />
interface SymbolConstructor {
/**
* A regular expression method that matches the regular expression against a string. Called
* by the String.prototype.matchAll method.
*/
readonly matchAll: unique symbol;
}
interface RegExpStringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
[Symbol.iterator](): RegExpStringIterator<T>;
}
interface RegExp {
/**
* Matches a string with this regular expression, and returns an iterable of matches
* containing the results of that search.
* @param string A string to search within.
*/
[Symbol.matchAll](str: string): RegExpStringIterator<RegExpMatchArray>;
}
@@ -0,0 +1,10 @@
import { MESSAGE_TYPE } from './message-type-contract';
/**
* Check if the provided object is a proto message.
*
* Note that this is an experimental feature - it is here to stay, but
* implementation details may change without notice.
*/
export function containsMessageType(msg) {
return msg[MESSAGE_TYPE] != null;
}
@@ -0,0 +1,45 @@
name: node-gyp integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
integration:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
python: ["3.7", "3.10"]
runs-on: ${{ matrix.os }}
steps:
- name: Clone gyp-next
uses: actions/checkout@v3
with:
path: gyp-next
- name: Clone nodejs/node-gyp
uses: actions/checkout@v3
with:
repository: nodejs/node-gyp
path: node-gyp
- uses: actions/setup-node@v3
with:
node-version: 14.x
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
cd node-gyp
npm install --no-progress
- name: Replace gyp in node-gyp
shell: bash
run: |
rm -rf node-gyp/gyp
cp -r gyp-next node-gyp/gyp
- name: Run tests
run: |
cd node-gyp
npm test
@@ -0,0 +1,91 @@
<p align="center">
<img src="https://github.com/thecodrr/fdir/raw/master/assets/fdir.gif" width="75%"/>
<h1 align="center">The Fastest Directory Crawler & Globber for NodeJS</h1>
<p align="center">
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/npm/v/fdir?style=for-the-badge"/></a>
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/npm/dw/fdir?style=for-the-badge"/></a>
<a href="https://codeclimate.com/github/thecodrr/fdir/maintainability"><img src="https://img.shields.io/codeclimate/maintainability-percentage/thecodrr/fdir?style=for-the-badge"/></a>
<a href="https://coveralls.io/github/thecodrr/fdir?branch=master"><img src="https://img.shields.io/coveralls/github/thecodrr/fdir?style=for-the-badge"/></a>
<a href="https://www.npmjs.com/package/fdir"><img src="https://img.shields.io/bundlephobia/minzip/fdir?style=for-the-badge"/></a>
<a href="https://www.producthunt.com/posts/fdir-every-millisecond-matters"><img src="https://img.shields.io/badge/ProductHunt-Upvote-red?style=for-the-badge&logo=product-hunt"/></a>
<a href="https://dev.to/thecodrr/how-i-wrote-the-fastest-directory-crawler-ever-3p9c"><img src="https://img.shields.io/badge/dev.to-Read%20Blog-black?style=for-the-badge&logo=dev.to"/></a>
<a href="./LICENSE"><img src="https://img.shields.io/github/license/thecodrr/fdir?style=for-the-badge"/></a>
</p>
</p>
⚡ **The Fastest:** Nothing similar (in the NodeJS world) beats `fdir` in speed. It can easily crawl a directory containing **1 million files in < 1 second.**
💡 **Stupidly Easy:** `fdir` uses expressive Builder pattern to build the crawler increasing code readability.
🤖 **Zero Dependencies\*:** `fdir` only uses NodeJS `fs` & `path` modules.
🕺 **Astonishingly Small:** < 2KB in size gzipped & minified.
🖮 **Hackable:** Extending `fdir` is extremely simple now that the new Builder API is here. Feel free to experiment around.
_\* `picomatch` must be installed manually by the user to support globbing._
## 🚄 Quickstart
### Installation
You can install using `npm`:
```sh
$ npm i fdir
```
or Yarn:
```sh
$ yarn add fdir
```
### Usage
```ts
import { fdir } from "fdir";
// create the builder
const api = new fdir().withFullPaths().crawl("path/to/dir");
// get all files in a directory synchronously
const files = api.sync();
// or asynchronously
api.withPromise().then((files) => {
// do something with the result here.
});
```
## Documentation:
Documentation for all methods is available [here](/documentation.md).
## 📊 Benchmarks:
Please check the benchmark against the latest version [here](/BENCHMARKS.md).
## 🙏Used by:
`fdir` is downloaded over 200k+ times a week by projects around the world. Here's a list of some notable projects using `fdir` in production:
> Note: if you think your project should be here, feel free to open an issue. Notable is anything with a considerable amount of GitHub stars.
1. [rollup/plugins](https://github.com/rollup/plugins)
2. [SuperchupuDev/tinyglobby](https://github.com/SuperchupuDev/tinyglobby)
3. [pulumi/pulumi](https://github.com/pulumi/pulumi)
4. [dotenvx/dotenvx](https://github.com/dotenvx/dotenvx)
5. [mdn/yari](https://github.com/mdn/yari)
6. [streetwriters/notesnook](https://github.com/streetwriters/notesnook)
7. [imba/imba](https://github.com/imba/imba)
8. [moroshko/react-scanner](https://github.com/moroshko/react-scanner)
9. [netlify/build](https://github.com/netlify/build)
10. [yassinedoghri/astro-i18next](https://github.com/yassinedoghri/astro-i18next)
11. [selfrefactor/rambda](https://github.com/selfrefactor/rambda)
12. [whyboris/Video-Hub-App](https://github.com/whyboris/Video-Hub-App)
## 🦮 LICENSE
Copyright &copy; 2024 Abdullah Atta under MIT. [Read full text here.](https://github.com/thecodrr/fdir/raw/master/LICENSE)
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=isStackOverflowError.spec.d.ts.map
@@ -0,0 +1,30 @@
'use strict';
exports.__esModule = true;
/** @type {import('./visit').default} */
exports.default = function visit(node, keys, visitorSpec) {
if (!node || !keys) {
return;
}
const type = node.type;
const visitor = visitorSpec[type];
if (typeof visitor === 'function') {
visitor(node);
}
const childFields = keys[type];
if (!childFields) {
return;
}
childFields.forEach((fieldName) => {
// @ts-expect-error TS sucks with concat
[].concat(node[fieldName]).forEach((item) => {
visit(item, keys, visitorSpec);
});
});
const exit = visitorSpec[`${type}:Exit`];
if (typeof exit === 'function') {
exit(node);
}
};
@@ -0,0 +1,114 @@
// Copyright (c) 2011-2015 Ryan Prichard
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include "../shared/StringUtil.h"
#include "../shared/WindowsVersion.h"
#include "../shared/WinptyAssert.h"
#include "../shared/WinptyVersion.h"
#include "Agent.h"
#include "AgentCreateDesktop.h"
#include "DebugShowInput.h"
const char USAGE[] =
"Usage: %ls controlPipeName flags mouseMode cols rows\n"
"Usage: %ls controlPipeName --create-desktop\n"
"\n"
"Ordinarily, this program is launched by winpty.dll and is not directly\n"
"useful to winpty users. However, it also has options intended for\n"
"debugging winpty.\n"
"\n"
"Usage: %ls [options]\n"
"\n"
"Options:\n"
" --show-input [--with-mouse] [--escape-input]\n"
" Dump INPUT_RECORDs from the console input buffer\n"
" --with-mouse: Include MOUSE_INPUT_RECORDs in the dump\n"
" output\n"
" --escape-input: Direct the new Windows 10 console to use\n"
" escape sequences for input\n"
" --version Print the winpty version\n";
static uint64_t winpty_atoi64(const char *str) {
return strtoll(str, NULL, 10);
}
int main() {
dumpWindowsVersion();
dumpVersionToTrace();
// Technically, we should free the CommandLineToArgvW return value using
// a single call to LocalFree, but the call will never actually happen in
// the normal case.
int argc = 0;
wchar_t *cmdline = GetCommandLineW();
ASSERT(cmdline != nullptr && "GetCommandLineW returned NULL");
wchar_t **argv = CommandLineToArgvW(cmdline, &argc);
ASSERT(argv != nullptr && "CommandLineToArgvW returned NULL");
if (argc == 2 && !wcscmp(argv[1], L"--version")) {
dumpVersionToStdout();
return 0;
}
if (argc >= 2 && !wcscmp(argv[1], L"--show-input")) {
bool withMouse = false;
bool escapeInput = false;
for (int i = 2; i < argc; ++i) {
if (!wcscmp(argv[i], L"--with-mouse")) {
withMouse = true;
} else if (!wcscmp(argv[i], L"--escape-input")) {
escapeInput = true;
} else {
fprintf(stderr, "Unrecognized --show-input option: %ls\n",
argv[i]);
return 1;
}
}
debugShowInput(withMouse, escapeInput);
return 0;
}
if (argc == 3 && !wcscmp(argv[2], L"--create-desktop")) {
handleCreateDesktop(argv[1]);
return 0;
}
if (argc != 6) {
fprintf(stderr, USAGE, argv[0], argv[0], argv[0]);
return 1;
}
Agent agent(argv[1],
winpty_atoi64(utf8FromWide(argv[2]).c_str()),
atoi(utf8FromWide(argv[3]).c_str()),
atoi(utf8FromWide(argv[4]).c_str()),
atoi(utf8FromWide(argv[5]).c_str()));
agent.run();
// The Agent destructor shouldn't return, but if it does, exit
// unsuccessfully.
return 1;
}
@@ -0,0 +1 @@
{"version":3,"file":"cacheNonRootPlanServiceNode.js","sourceRoot":"","sources":["../../../../src/planning/actions/cacheNonRootPlanServiceNode.ts"],"names":[],"mappings":";;AAOA,kEAsBC;AA5BD,uEAAoE;AAMpE,SAAgB,2BAA2B,CACzC,cAA0C,EAC1C,UAAgC,EAChC,eAAgC,EAChC,OAAoC;IAEpC,IACE,cAAc,KAAK,SAAS;QAC5B,CAAC,CAAC,yCAAmB,CAAC,EAAE,CAAC,eAAe,CAAC;YACvC,CAAC,eAAe,CAAC,UAAU,EAAE,CAAC;YAC9B,eAAe,CAAC,aAAa,CAAC,EAChC,CAAC;QACD,MAAM,UAAU,GAAe;YAC7B,IAAI,EAAE;gBACJ,IAAI,EAAE,eAAe;aACtB;SACF,CAAC;QAEF,UAAU,CAAC,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;IACjD,CAAC;SAAM,CAAC;QACN,UAAU,CAAC,uBAAuB,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;AACH,CAAC"}
@@ -0,0 +1,295 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.readCodePoint = readCodePoint;
exports.readInt = readInt;
exports.readStringContents = readStringContents;
var _isDigit = function isDigit(code) {
return code >= 48 && code <= 57;
};
const forbiddenNumericSeparatorSiblings = {
decBinOct: new Set([46, 66, 69, 79, 95, 98, 101, 111]),
hex: new Set([46, 88, 95, 120])
};
const isAllowedNumericSeparatorSibling = {
bin: ch => ch === 48 || ch === 49,
oct: ch => ch >= 48 && ch <= 55,
dec: ch => ch >= 48 && ch <= 57,
hex: ch => ch >= 48 && ch <= 57 || ch >= 65 && ch <= 70 || ch >= 97 && ch <= 102
};
function readStringContents(type, input, pos, lineStart, curLine, errors) {
const initialPos = pos;
const initialLineStart = lineStart;
const initialCurLine = curLine;
let out = "";
let firstInvalidLoc = null;
let chunkStart = pos;
const {
length
} = input;
for (;;) {
if (pos >= length) {
errors.unterminated(initialPos, initialLineStart, initialCurLine);
out += input.slice(chunkStart, pos);
break;
}
const ch = input.charCodeAt(pos);
if (isStringEnd(type, ch, input, pos)) {
out += input.slice(chunkStart, pos);
break;
}
if (ch === 92) {
out += input.slice(chunkStart, pos);
const res = readEscapedChar(input, pos, lineStart, curLine, type === "template", errors);
if (res.ch === null && !firstInvalidLoc) {
firstInvalidLoc = {
pos,
lineStart,
curLine
};
} else {
out += res.ch;
}
({
pos,
lineStart,
curLine
} = res);
chunkStart = pos;
} else if (ch === 8232 || ch === 8233) {
++pos;
++curLine;
lineStart = pos;
} else if (ch === 10 || ch === 13) {
if (type === "template") {
out += input.slice(chunkStart, pos) + "\n";
++pos;
if (ch === 13 && input.charCodeAt(pos) === 10) {
++pos;
}
++curLine;
chunkStart = lineStart = pos;
} else {
errors.unterminated(initialPos, initialLineStart, initialCurLine);
}
} else {
++pos;
}
}
return {
pos,
str: out,
firstInvalidLoc,
lineStart,
curLine,
containsInvalid: !!firstInvalidLoc
};
}
function isStringEnd(type, ch, input, pos) {
if (type === "template") {
return ch === 96 || ch === 36 && input.charCodeAt(pos + 1) === 123;
}
return ch === (type === "double" ? 34 : 39);
}
function readEscapedChar(input, pos, lineStart, curLine, inTemplate, errors) {
const throwOnInvalid = !inTemplate;
pos++;
const res = ch => ({
pos,
ch,
lineStart,
curLine
});
const ch = input.charCodeAt(pos++);
switch (ch) {
case 110:
return res("\n");
case 114:
return res("\r");
case 120:
{
let code;
({
code,
pos
} = readHexChar(input, pos, lineStart, curLine, 2, false, throwOnInvalid, errors));
return res(code === null ? null : String.fromCharCode(code));
}
case 117:
{
let code;
({
code,
pos
} = readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors));
return res(code === null ? null : String.fromCodePoint(code));
}
case 116:
return res("\t");
case 98:
return res("\b");
case 118:
return res("\u000b");
case 102:
return res("\f");
case 13:
if (input.charCodeAt(pos) === 10) {
++pos;
}
case 10:
lineStart = pos;
++curLine;
case 8232:
case 8233:
return res("");
case 56:
case 57:
if (inTemplate) {
return res(null);
} else {
errors.strictNumericEscape(pos - 1, lineStart, curLine);
}
default:
if (ch >= 48 && ch <= 55) {
const startPos = pos - 1;
const match = /^[0-7]+/.exec(input.slice(startPos, pos + 2));
let octalStr = match[0];
let octal = parseInt(octalStr, 8);
if (octal > 255) {
octalStr = octalStr.slice(0, -1);
octal = parseInt(octalStr, 8);
}
pos += octalStr.length - 1;
const next = input.charCodeAt(pos);
if (octalStr !== "0" || next === 56 || next === 57) {
if (inTemplate) {
return res(null);
} else {
errors.strictNumericEscape(startPos, lineStart, curLine);
}
}
return res(String.fromCharCode(octal));
}
return res(String.fromCharCode(ch));
}
}
function readHexChar(input, pos, lineStart, curLine, len, forceLen, throwOnInvalid, errors) {
const initialPos = pos;
let n;
({
n,
pos
} = readInt(input, pos, lineStart, curLine, 16, len, forceLen, false, errors, !throwOnInvalid));
if (n === null) {
if (throwOnInvalid) {
errors.invalidEscapeSequence(initialPos, lineStart, curLine);
} else {
pos = initialPos - 1;
}
}
return {
code: n,
pos
};
}
function readInt(input, pos, lineStart, curLine, radix, len, forceLen, allowNumSeparator, errors, bailOnError) {
const start = pos;
const forbiddenSiblings = radix === 16 ? forbiddenNumericSeparatorSiblings.hex : forbiddenNumericSeparatorSiblings.decBinOct;
const isAllowedSibling = radix === 16 ? isAllowedNumericSeparatorSibling.hex : radix === 10 ? isAllowedNumericSeparatorSibling.dec : radix === 8 ? isAllowedNumericSeparatorSibling.oct : isAllowedNumericSeparatorSibling.bin;
let invalid = false;
let total = 0;
for (let i = 0, e = len == null ? Infinity : len; i < e; ++i) {
const code = input.charCodeAt(pos);
let val;
if (code === 95 && allowNumSeparator !== "bail") {
const prev = input.charCodeAt(pos - 1);
const next = input.charCodeAt(pos + 1);
if (!allowNumSeparator) {
if (bailOnError) return {
n: null,
pos
};
errors.numericSeparatorInEscapeSequence(pos, lineStart, curLine);
} else if (Number.isNaN(next) || !isAllowedSibling(next) || forbiddenSiblings.has(prev) || forbiddenSiblings.has(next)) {
if (bailOnError) return {
n: null,
pos
};
errors.unexpectedNumericSeparator(pos, lineStart, curLine);
}
++pos;
continue;
}
if (code >= 97) {
val = code - 97 + 10;
} else if (code >= 65) {
val = code - 65 + 10;
} else if (_isDigit(code)) {
val = code - 48;
} else {
val = Infinity;
}
if (val >= radix) {
if (val <= 9 && bailOnError) {
return {
n: null,
pos
};
} else if (val <= 9 && errors.invalidDigit(pos, lineStart, curLine, radix)) {
val = 0;
} else if (forceLen) {
val = 0;
invalid = true;
} else {
break;
}
}
++pos;
total = total * radix + val;
}
if (pos === start || len != null && pos - start !== len || invalid) {
return {
n: null,
pos
};
}
return {
n: total,
pos
};
}
function readCodePoint(input, pos, lineStart, curLine, throwOnInvalid, errors) {
const ch = input.charCodeAt(pos);
let code;
if (ch === 123) {
++pos;
({
code,
pos
} = readHexChar(input, pos, lineStart, curLine, input.indexOf("}", pos) - pos, true, throwOnInvalid, errors));
++pos;
if (code !== null && code > 0x10ffff) {
if (throwOnInvalid) {
errors.invalidCodePoint(pos, lineStart, curLine);
} else {
return {
code: null,
pos
};
}
}
} else {
({
code,
pos
} = readHexChar(input, pos, lineStart, curLine, 4, false, throwOnInvalid, errors));
}
return {
code,
pos
};
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1,16 @@
import {parser} from "../dist/index.js"
import {fileTests} from "@lezer/generator/dist/test"
import * as fs from "fs"
import * as path from "path"
import {fileURLToPath} from "url"
let caseDir = path.dirname(fileURLToPath(import.meta.url))
for (let file of fs.readdirSync(caseDir)) {
if (!/\.txt$/.test(file)) continue
let name = /^[^\.]*/.exec(file)[0]
describe(name, () => {
for (let {name, run} of fileTests(fs.readFileSync(path.join(caseDir, file), "utf8"), file))
it(name, () => run(parser))
})
}
@@ -0,0 +1,34 @@
'use strict';
var getIteratorMethod = require('../helpers/getIteratorMethod');
var AdvanceStringIndex = require('./AdvanceStringIndex');
var GetIterator = require('./GetIterator');
var GetMethod = require('./GetMethod');
var IteratorStep = require('./IteratorStep');
var IteratorValue = require('./IteratorValue');
var ToObject = require('./ToObject');
var ES = {
AdvanceStringIndex: AdvanceStringIndex,
GetMethod: GetMethod
};
// https://262.ecma-international.org/7.0/#sec-iterabletoarraylike
module.exports = function IterableToArrayLike(items) {
var usingIterator = getIteratorMethod(ES, items);
if (typeof usingIterator !== 'undefined') {
var iterator = GetIterator(items, usingIterator);
var values = [];
var next = true;
while (next) {
next = IteratorStep(iterator);
if (next) {
var nextValue = IteratorValue(next);
values[values.length] = nextValue;
}
}
return values;
}
return ToObject(items);
};
@@ -0,0 +1,191 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.Constructor = exports.Function = exports.ParameterList = exports.ParameterList_0 = exports.Parameter = exports.Tuple = exports.ElementList = exports.ElementList_0 = exports._Object = exports.PropertyList = exports.PropertyList_0 = exports.PropertyDelimiter = exports.Property = exports.Optional = exports.Readonly = exports.PropertyKey = exports.Type = exports.Expr = exports.ExprTail = exports.ExprTerm = exports.ExprTermTail = exports.Factor = exports.Base = exports.Extends = exports.IndexArray = exports.IndexArray_0 = exports.KeyOf = exports.Literal = exports.LiteralBoolean = exports.LiteralNumber = exports.LiteralString = exports.Keyword = exports.KeywordVoid = exports.KeywordSymbol = exports.KeywordNever = exports.KeywordAny = exports.KeywordUnknown = exports.KeywordBigInt = exports.KeywordInteger = exports.KeywordNull = exports.KeywordUndefined = exports.KeywordBoolean = exports.KeywordNumber = exports.KeywordString = exports.GenericArguments = exports.GenericArgumentsList = exports.GenericArgumentsList_0 = exports.GenericReference = exports.GenericReferenceParameterList = exports.GenericReferenceParameterList_0 = void 0;
exports.Reference = exports.Uint8Array = exports.Date = exports.Uncapitalize = exports.Capitalize = exports.Lowercase = exports.Uppercase = exports.Extract = exports.Exclude = exports.Omit = exports.Pick = exports.Required = exports.Partial = exports.ReturnType = exports.InstanceType = exports.FunctionParameters = exports.ConstructorParameters = exports.Promise = exports.Record = exports.Array = exports.Awaited = exports.Argument = exports.Iterator = exports.AsyncIterator = exports.Mapped = void 0;
const index_1 = require("../parser/index");
const S = __importStar(require("./mapping"));
const If = (result, left, right = () => []) => (result.length === 2 ? left(result) : right());
const GenericReferenceParameterList_0 = (input, context, result = []) => If(If((0, exports.Type)(input, context), ([_0, input]) => If(index_1.Runtime.Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => (0, exports.GenericReferenceParameterList_0)(input, context, [...result, _0]), () => [result, input]);
exports.GenericReferenceParameterList_0 = GenericReferenceParameterList_0;
const GenericReferenceParameterList = (input, context = {}) => If(If((0, exports.GenericReferenceParameterList_0)(input, context), ([_0, input]) => If(If(If((0, exports.Type)(input, context), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.GenericReferenceParameterListMapping(_0, context), input]);
exports.GenericReferenceParameterList = GenericReferenceParameterList;
const GenericReference = (input, context = {}) => If(If(index_1.Runtime.Token.Ident(input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.GenericReferenceParameterList)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.GenericReferenceMapping(_0, context), input]);
exports.GenericReference = GenericReference;
const GenericArgumentsList_0 = (input, context, result = []) => If(If(index_1.Runtime.Token.Ident(input), ([_0, input]) => If(index_1.Runtime.Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => (0, exports.GenericArgumentsList_0)(input, context, [...result, _0]), () => [result, input]);
exports.GenericArgumentsList_0 = GenericArgumentsList_0;
const GenericArgumentsList = (input, context = {}) => If(If((0, exports.GenericArgumentsList_0)(input, context), ([_0, input]) => If(If(If(index_1.Runtime.Token.Ident(input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.GenericArgumentsListMapping(_0, context), input]);
exports.GenericArgumentsList = GenericArgumentsList;
const GenericArguments = (input, context = {}) => If(If(index_1.Runtime.Token.Const('<', input), ([_0, input]) => If((0, exports.GenericArgumentsList)(input, context), ([_1, input]) => If(index_1.Runtime.Token.Const('>', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.GenericArgumentsMapping(_0, context), input]);
exports.GenericArguments = GenericArguments;
const KeywordString = (input, context = {}) => If(index_1.Runtime.Token.Const('string', input), ([_0, input]) => [S.KeywordStringMapping(_0, context), input]);
exports.KeywordString = KeywordString;
const KeywordNumber = (input, context = {}) => If(index_1.Runtime.Token.Const('number', input), ([_0, input]) => [S.KeywordNumberMapping(_0, context), input]);
exports.KeywordNumber = KeywordNumber;
const KeywordBoolean = (input, context = {}) => If(index_1.Runtime.Token.Const('boolean', input), ([_0, input]) => [S.KeywordBooleanMapping(_0, context), input]);
exports.KeywordBoolean = KeywordBoolean;
const KeywordUndefined = (input, context = {}) => If(index_1.Runtime.Token.Const('undefined', input), ([_0, input]) => [S.KeywordUndefinedMapping(_0, context), input]);
exports.KeywordUndefined = KeywordUndefined;
const KeywordNull = (input, context = {}) => If(index_1.Runtime.Token.Const('null', input), ([_0, input]) => [S.KeywordNullMapping(_0, context), input]);
exports.KeywordNull = KeywordNull;
const KeywordInteger = (input, context = {}) => If(index_1.Runtime.Token.Const('integer', input), ([_0, input]) => [S.KeywordIntegerMapping(_0, context), input]);
exports.KeywordInteger = KeywordInteger;
const KeywordBigInt = (input, context = {}) => If(index_1.Runtime.Token.Const('bigint', input), ([_0, input]) => [S.KeywordBigIntMapping(_0, context), input]);
exports.KeywordBigInt = KeywordBigInt;
const KeywordUnknown = (input, context = {}) => If(index_1.Runtime.Token.Const('unknown', input), ([_0, input]) => [S.KeywordUnknownMapping(_0, context), input]);
exports.KeywordUnknown = KeywordUnknown;
const KeywordAny = (input, context = {}) => If(index_1.Runtime.Token.Const('any', input), ([_0, input]) => [S.KeywordAnyMapping(_0, context), input]);
exports.KeywordAny = KeywordAny;
const KeywordNever = (input, context = {}) => If(index_1.Runtime.Token.Const('never', input), ([_0, input]) => [S.KeywordNeverMapping(_0, context), input]);
exports.KeywordNever = KeywordNever;
const KeywordSymbol = (input, context = {}) => If(index_1.Runtime.Token.Const('symbol', input), ([_0, input]) => [S.KeywordSymbolMapping(_0, context), input]);
exports.KeywordSymbol = KeywordSymbol;
const KeywordVoid = (input, context = {}) => If(index_1.Runtime.Token.Const('void', input), ([_0, input]) => [S.KeywordVoidMapping(_0, context), input]);
exports.KeywordVoid = KeywordVoid;
const Keyword = (input, context = {}) => If(If((0, exports.KeywordString)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordNumber)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordBoolean)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordUndefined)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordNull)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordInteger)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordBigInt)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordUnknown)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordAny)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordNever)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordSymbol)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.KeywordVoid)(input, context), ([_0, input]) => [_0, input], () => [])))))))))))), ([_0, input]) => [S.KeywordMapping(_0, context), input]);
exports.Keyword = Keyword;
const LiteralString = (input, context = {}) => If(index_1.Runtime.Token.String(["'", '"', '`'], input), ([_0, input]) => [S.LiteralStringMapping(_0, context), input]);
exports.LiteralString = LiteralString;
const LiteralNumber = (input, context = {}) => If(index_1.Runtime.Token.Number(input), ([_0, input]) => [S.LiteralNumberMapping(_0, context), input]);
exports.LiteralNumber = LiteralNumber;
const LiteralBoolean = (input, context = {}) => If(If(index_1.Runtime.Token.Const('true', input), ([_0, input]) => [_0, input], () => If(index_1.Runtime.Token.Const('false', input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.LiteralBooleanMapping(_0, context), input]);
exports.LiteralBoolean = LiteralBoolean;
const Literal = (input, context = {}) => If(If((0, exports.LiteralBoolean)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.LiteralNumber)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.LiteralString)(input, context), ([_0, input]) => [_0, input], () => []))), ([_0, input]) => [S.LiteralMapping(_0, context), input]);
exports.Literal = Literal;
const KeyOf = (input, context = {}) => If(If(If(index_1.Runtime.Token.Const('keyof', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.KeyOfMapping(_0, context), input]);
exports.KeyOf = KeyOf;
const IndexArray_0 = (input, context, result = []) => If(If(If(index_1.Runtime.Token.Const('[', input), ([_0, input]) => If((0, exports.Type)(input, context), ([_1, input]) => If(index_1.Runtime.Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If(If(index_1.Runtime.Token.Const('[', input), ([_0, input]) => If(index_1.Runtime.Token.Const(']', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => (0, exports.IndexArray_0)(input, context, [...result, _0]), () => [result, input]);
exports.IndexArray_0 = IndexArray_0;
const IndexArray = (input, context = {}) => If((0, exports.IndexArray_0)(input, context), ([_0, input]) => [S.IndexArrayMapping(_0, context), input]);
exports.IndexArray = IndexArray;
const Extends = (input, context = {}) => If(If(If(index_1.Runtime.Token.Const('extends', input), ([_0, input]) => If((0, exports.Type)(input, context), ([_1, input]) => If(index_1.Runtime.Token.Const('?', input), ([_2, input]) => If((0, exports.Type)(input, context), ([_3, input]) => If(index_1.Runtime.Token.Const(':', input), ([_4, input]) => If((0, exports.Type)(input, context), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExtendsMapping(_0, context), input]);
exports.Extends = Extends;
const Base = (input, context = {}) => If(If(If(index_1.Runtime.Token.Const('(', input), ([_0, input]) => If((0, exports.Type)(input, context), ([_1, input]) => If(index_1.Runtime.Token.Const(')', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If((0, exports.Keyword)(input, context), ([_0, input]) => [_0, input], () => If((0, exports._Object)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Tuple)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Literal)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Constructor)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Function)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Mapped)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.AsyncIterator)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Iterator)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.ConstructorParameters)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.FunctionParameters)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.InstanceType)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.ReturnType)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Argument)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Awaited)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Array)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Record)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Promise)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Partial)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Required)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Pick)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Omit)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Exclude)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Extract)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Uppercase)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Lowercase)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Capitalize)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Uncapitalize)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Date)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Uint8Array)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.GenericReference)(input, context), ([_0, input]) => [_0, input], () => If((0, exports.Reference)(input, context), ([_0, input]) => [_0, input], () => []))))))))))))))))))))))))))))))))), ([_0, input]) => [S.BaseMapping(_0, context), input]);
exports.Base = Base;
const Factor = (input, context = {}) => If(If((0, exports.KeyOf)(input, context), ([_0, input]) => If((0, exports.Base)(input, context), ([_1, input]) => If((0, exports.IndexArray)(input, context), ([_2, input]) => If((0, exports.Extends)(input, context), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.FactorMapping(_0, context), input]);
exports.Factor = Factor;
const ExprTermTail = (input, context = {}) => If(If(If(index_1.Runtime.Token.Const('&', input), ([_0, input]) => If((0, exports.Factor)(input, context), ([_1, input]) => If((0, exports.ExprTermTail)(input, context), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTermTailMapping(_0, context), input]);
exports.ExprTermTail = ExprTermTail;
const ExprTerm = (input, context = {}) => If(If((0, exports.Factor)(input, context), ([_0, input]) => If((0, exports.ExprTermTail)(input, context), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprTermMapping(_0, context), input]);
exports.ExprTerm = ExprTerm;
const ExprTail = (input, context = {}) => If(If(If(index_1.Runtime.Token.Const('|', input), ([_0, input]) => If((0, exports.ExprTerm)(input, context), ([_1, input]) => If((0, exports.ExprTail)(input, context), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ExprTailMapping(_0, context), input]);
exports.ExprTail = ExprTail;
const Expr = (input, context = {}) => If(If((0, exports.ExprTerm)(input, context), ([_0, input]) => If((0, exports.ExprTail)(input, context), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ExprMapping(_0, context), input]);
exports.Expr = Expr;
const Type = (input, context = {}) => If(If(If((0, exports.GenericArguments)(input, context), ([_0, input]) => (0, exports.Expr)(input, _0), () => []), ([_0, input]) => [_0, input], () => If((0, exports.Expr)(input, context), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.TypeMapping(_0, context), input]);
exports.Type = Type;
const PropertyKey = (input, context = {}) => If(If(index_1.Runtime.Token.Ident(input), ([_0, input]) => [_0, input], () => If(index_1.Runtime.Token.String(["'", '"'], input), ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.PropertyKeyMapping(_0, context), input]);
exports.PropertyKey = PropertyKey;
const Readonly = (input, context = {}) => If(If(If(index_1.Runtime.Token.Const('readonly', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.ReadonlyMapping(_0, context), input]);
exports.Readonly = Readonly;
const Optional = (input, context = {}) => If(If(If(index_1.Runtime.Token.Const('?', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_0, input]) => [S.OptionalMapping(_0, context), input]);
exports.Optional = Optional;
const Property = (input, context = {}) => If(If((0, exports.Readonly)(input, context), ([_0, input]) => If((0, exports.PropertyKey)(input, context), ([_1, input]) => If((0, exports.Optional)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const(':', input), ([_3, input]) => If((0, exports.Type)(input, context), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.PropertyMapping(_0, context), input]);
exports.Property = Property;
const PropertyDelimiter = (input, context = {}) => If(If(If(index_1.Runtime.Token.Const(',', input), ([_0, input]) => If(index_1.Runtime.Token.Const('\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(index_1.Runtime.Token.Const(';', input), ([_0, input]) => If(index_1.Runtime.Token.Const('\n', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [_0, input], () => If(If(index_1.Runtime.Token.Const(',', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(index_1.Runtime.Token.Const(';', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If(If(index_1.Runtime.Token.Const('\n', input), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => []))))), ([_0, input]) => [S.PropertyDelimiterMapping(_0, context), input]);
exports.PropertyDelimiter = PropertyDelimiter;
const PropertyList_0 = (input, context, result = []) => If(If((0, exports.Property)(input, context), ([_0, input]) => If((0, exports.PropertyDelimiter)(input, context), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => (0, exports.PropertyList_0)(input, context, [...result, _0]), () => [result, input]);
exports.PropertyList_0 = PropertyList_0;
const PropertyList = (input, context = {}) => If(If((0, exports.PropertyList_0)(input, context), ([_0, input]) => If(If(If((0, exports.Property)(input, context), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.PropertyListMapping(_0, context), input]);
exports.PropertyList = PropertyList;
const _Object = (input, context = {}) => If(If(index_1.Runtime.Token.Const('{', input), ([_0, input]) => If((0, exports.PropertyList)(input, context), ([_1, input]) => If(index_1.Runtime.Token.Const('}', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.ObjectMapping(_0, context), input]);
exports._Object = _Object;
const ElementList_0 = (input, context, result = []) => If(If((0, exports.Type)(input, context), ([_0, input]) => If(index_1.Runtime.Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => (0, exports.ElementList_0)(input, context, [...result, _0]), () => [result, input]);
exports.ElementList_0 = ElementList_0;
const ElementList = (input, context = {}) => If(If((0, exports.ElementList_0)(input, context), ([_0, input]) => If(If(If((0, exports.Type)(input, context), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ElementListMapping(_0, context), input]);
exports.ElementList = ElementList;
const Tuple = (input, context = {}) => If(If(index_1.Runtime.Token.Const('[', input), ([_0, input]) => If((0, exports.ElementList)(input, context), ([_1, input]) => If(index_1.Runtime.Token.Const(']', input), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.TupleMapping(_0, context), input]);
exports.Tuple = Tuple;
const Parameter = (input, context = {}) => If(If(index_1.Runtime.Token.Ident(input), ([_0, input]) => If(index_1.Runtime.Token.Const(':', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => [[_0, _1, _2], input]))), ([_0, input]) => [S.ParameterMapping(_0, context), input]);
exports.Parameter = Parameter;
const ParameterList_0 = (input, context, result = []) => If(If((0, exports.Parameter)(input, context), ([_0, input]) => If(index_1.Runtime.Token.Const(',', input), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => (0, exports.ParameterList_0)(input, context, [...result, _0]), () => [result, input]);
exports.ParameterList_0 = ParameterList_0;
const ParameterList = (input, context = {}) => If(If((0, exports.ParameterList_0)(input, context), ([_0, input]) => If(If(If((0, exports.Parameter)(input, context), ([_0, input]) => [[_0], input]), ([_0, input]) => [_0, input], () => If([[], input], ([_0, input]) => [_0, input], () => [])), ([_1, input]) => [[_0, _1], input])), ([_0, input]) => [S.ParameterListMapping(_0, context), input]);
exports.ParameterList = ParameterList;
const Function = (input, context = {}) => If(If(index_1.Runtime.Token.Const('(', input), ([_0, input]) => If((0, exports.ParameterList)(input, context), ([_1, input]) => If(index_1.Runtime.Token.Const(')', input), ([_2, input]) => If(index_1.Runtime.Token.Const('=>', input), ([_3, input]) => If((0, exports.Type)(input, context), ([_4, input]) => [[_0, _1, _2, _3, _4], input]))))), ([_0, input]) => [S.FunctionMapping(_0, context), input]);
exports.Function = Function;
const Constructor = (input, context = {}) => If(If(index_1.Runtime.Token.Const('new', input), ([_0, input]) => If(index_1.Runtime.Token.Const('(', input), ([_1, input]) => If((0, exports.ParameterList)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const(')', input), ([_3, input]) => If(index_1.Runtime.Token.Const('=>', input), ([_4, input]) => If((0, exports.Type)(input, context), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.ConstructorMapping(_0, context), input]);
exports.Constructor = Constructor;
const Mapped = (input, context = {}) => If(If(index_1.Runtime.Token.Const('{', input), ([_0, input]) => If(index_1.Runtime.Token.Const('[', input), ([_1, input]) => If(index_1.Runtime.Token.Ident(input), ([_2, input]) => If(index_1.Runtime.Token.Const('in', input), ([_3, input]) => If((0, exports.Type)(input, context), ([_4, input]) => If(index_1.Runtime.Token.Const(']', input), ([_5, input]) => If(index_1.Runtime.Token.Const(':', input), ([_6, input]) => If((0, exports.Type)(input, context), ([_7, input]) => If(index_1.Runtime.Token.Const('}', input), ([_8, input]) => [[_0, _1, _2, _3, _4, _5, _6, _7, _8], input]))))))))), ([_0, input]) => [S.MappedMapping(_0, context), input]);
exports.Mapped = Mapped;
const AsyncIterator = (input, context = {}) => If(If(index_1.Runtime.Token.Const('AsyncIterator', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.AsyncIteratorMapping(_0, context), input]);
exports.AsyncIterator = AsyncIterator;
const Iterator = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Iterator', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.IteratorMapping(_0, context), input]);
exports.Iterator = Iterator;
const Argument = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Argument', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ArgumentMapping(_0, context), input]);
exports.Argument = Argument;
const Awaited = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Awaited', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.AwaitedMapping(_0, context), input]);
exports.Awaited = Awaited;
const Array = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Array', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ArrayMapping(_0, context), input]);
exports.Array = Array;
const Record = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Record', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const(',', input), ([_3, input]) => If((0, exports.Type)(input, context), ([_4, input]) => If(index_1.Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.RecordMapping(_0, context), input]);
exports.Record = Record;
const Promise = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Promise', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.PromiseMapping(_0, context), input]);
exports.Promise = Promise;
const ConstructorParameters = (input, context = {}) => If(If(index_1.Runtime.Token.Const('ConstructorParameters', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ConstructorParametersMapping(_0, context), input]);
exports.ConstructorParameters = ConstructorParameters;
const FunctionParameters = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Parameters', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.FunctionParametersMapping(_0, context), input]);
exports.FunctionParameters = FunctionParameters;
const InstanceType = (input, context = {}) => If(If(index_1.Runtime.Token.Const('InstanceType', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.InstanceTypeMapping(_0, context), input]);
exports.InstanceType = InstanceType;
const ReturnType = (input, context = {}) => If(If(index_1.Runtime.Token.Const('ReturnType', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.ReturnTypeMapping(_0, context), input]);
exports.ReturnType = ReturnType;
const Partial = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Partial', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.PartialMapping(_0, context), input]);
exports.Partial = Partial;
const Required = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Required', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.RequiredMapping(_0, context), input]);
exports.Required = Required;
const Pick = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Pick', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const(',', input), ([_3, input]) => If((0, exports.Type)(input, context), ([_4, input]) => If(index_1.Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.PickMapping(_0, context), input]);
exports.Pick = Pick;
const Omit = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Omit', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const(',', input), ([_3, input]) => If((0, exports.Type)(input, context), ([_4, input]) => If(index_1.Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.OmitMapping(_0, context), input]);
exports.Omit = Omit;
const Exclude = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Exclude', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const(',', input), ([_3, input]) => If((0, exports.Type)(input, context), ([_4, input]) => If(index_1.Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.ExcludeMapping(_0, context), input]);
exports.Exclude = Exclude;
const Extract = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Extract', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const(',', input), ([_3, input]) => If((0, exports.Type)(input, context), ([_4, input]) => If(index_1.Runtime.Token.Const('>', input), ([_5, input]) => [[_0, _1, _2, _3, _4, _5], input])))))), ([_0, input]) => [S.ExtractMapping(_0, context), input]);
exports.Extract = Extract;
const Uppercase = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Uppercase', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.UppercaseMapping(_0, context), input]);
exports.Uppercase = Uppercase;
const Lowercase = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Lowercase', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.LowercaseMapping(_0, context), input]);
exports.Lowercase = Lowercase;
const Capitalize = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Capitalize', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.CapitalizeMapping(_0, context), input]);
exports.Capitalize = Capitalize;
const Uncapitalize = (input, context = {}) => If(If(index_1.Runtime.Token.Const('Uncapitalize', input), ([_0, input]) => If(index_1.Runtime.Token.Const('<', input), ([_1, input]) => If((0, exports.Type)(input, context), ([_2, input]) => If(index_1.Runtime.Token.Const('>', input), ([_3, input]) => [[_0, _1, _2, _3], input])))), ([_0, input]) => [S.UncapitalizeMapping(_0, context), input]);
exports.Uncapitalize = Uncapitalize;
const Date = (input, context = {}) => If(index_1.Runtime.Token.Const('Date', input), ([_0, input]) => [S.DateMapping(_0, context), input]);
exports.Date = Date;
const Uint8Array = (input, context = {}) => If(index_1.Runtime.Token.Const('Uint8Array', input), ([_0, input]) => [S.Uint8ArrayMapping(_0, context), input]);
exports.Uint8Array = Uint8Array;
const Reference = (input, context = {}) => If(index_1.Runtime.Token.Ident(input), ([_0, input]) => [S.ReferenceMapping(_0, context), input]);
exports.Reference = Reference;
@@ -0,0 +1,5 @@
export interface rkeyDataType {
private_rkey: string;
group_rkey: string;
online_rkey: boolean;
}
@@ -0,0 +1,22 @@
"use strict";
var parse = require("./parse");
var walk = require("./walk");
var stringify = require("./stringify");
function ValueParser(value) {
if (this instanceof ValueParser) {
this.nodes = parse(value);
return this;
}
return new ValueParser(value);
}
ValueParser.prototype.toString = function() {
return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
};
ValueParser.prototype.walk = function(cb, bubble) {
walk(this.nodes, cb, bubble);
return this;
};
ValueParser.unit = require("./unit");
ValueParser.walk = walk;
ValueParser.stringify = stringify;
module.exports = ValueParser;
@@ -0,0 +1,18 @@
/**
* @flow
*/
import IdentifierMock from './IdentifierMock';
import type { IdentifierMockType } from './IdentifierMock';
export type JSXSpreadAttributeMockType = {
type: 'JSXSpreadAttribute',
argument: IdentifierMockType,
};
export default function JSXSpreadAttributeMock(identifier: string): JSXSpreadAttributeMockType {
return {
type: 'JSXSpreadAttribute',
argument: IdentifierMock(identifier),
};
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"F A B","2":"wC","8":"K D E"},B:{"1":"0 1 2 3 4 5 C L M G N O P Q H R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R WC S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB I XC MC YC yC zC 0C 1C","8":"xC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J ZB K D E F A B C L M G N O P aB AB BB CB DB EB FB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB uB vB wB xB yB zB 0B 1B 2B 3B UC 4B VC 5B 6B 7B 8B 9B AC BC CC DC EC FC GC HC IC JC KC LC Q H R S T U V W X Y Z 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"},E:{"1":"J ZB K D E F A B C L M G 3C 4C 5C 6C aC NC OC 7C 8C 9C bC cC PC AD QC dC eC fC gC hC BD RC iC jC kC lC mC CD SC nC oC pC qC rC sC tC DD ED","8":"2C ZC"},F:{"1":"0 1 2 3 4 5 6 7 8 9 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 HD ID NC uC JD OC","8":"F FD GD"},G:{"1":"E ZC KD vC LD MD ND OD PD QD RD SD TD UD VD WD XD YD ZD aD bD cD dD bC cC PC eD QC dC eC fC gC hC fD RC iC jC kC lC mC gD SC nC oC pC qC rC sC tC"},H:{"2":"hD"},I:{"1":"TC J I iD jD kD lD vC mD nD"},J:{"1":"D A"},K:{"1":"B C H NC uC OC","8":"A"},L:{"1":"I"},M:{"1":"MC"},N:{"1":"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:{"1":"1D 2D"}},B:1,C:"Text API for Canvas",D:true};
@@ -0,0 +1,50 @@
import { type TSchema } from '../schema/index';
import { type TArgument } from '../argument/index';
import { type TUnknown } from '../unknown/index';
import { type TReadonlyOptional } from '../readonly-optional/index';
import { type TReadonly } from '../readonly/index';
import { type TOptional } from '../optional/index';
import { type TConstructor } from '../constructor/index';
import { type TFunction } from '../function/index';
import { type TIntersect } from '../intersect/index';
import { type TUnion } from '../union/index';
import { type TTuple } from '../tuple/index';
import { type TArray } from '../array/index';
import { type TAsyncIterator } from '../async-iterator/index';
import { type TIterator } from '../iterator/index';
import { type TPromise } from '../promise/index';
import { type TObject, type TProperties } from '../object/index';
import { type TRecordOrObject, type TRecord } from '../record/index';
type TFromConstructor<Args extends TSchema[], Parameters extends TSchema[], InstanceType extends TSchema, Result extends TConstructor = TConstructor<TFromTypes<Args, Parameters>, TFromType<Args, InstanceType>>> = Result;
type TFromFunction<Args extends TSchema[], Parameters extends TSchema[], ReturnType extends TSchema, Result extends TFunction = TFunction<TFromTypes<Args, Parameters>, TFromType<Args, ReturnType>>> = Result;
type TFromIntersect<Args extends TSchema[], Types extends TSchema[], Result extends TIntersect = TIntersect<TFromTypes<Args, Types>>> = Result;
type TFromUnion<Args extends TSchema[], Types extends TSchema[], Result extends TUnion = TUnion<TFromTypes<Args, Types>>> = Result;
type TFromTuple<Args extends TSchema[], Types extends TSchema[], Result extends TTuple = TTuple<TFromTypes<Args, Types>>> = Result;
type TFromArray<Args extends TSchema[], Type extends TSchema, Result extends TArray = TArray<TFromType<Args, Type>>> = Result;
type TFromAsyncIterator<Args extends TSchema[], Type extends TSchema, Result extends TAsyncIterator = TAsyncIterator<TFromType<Args, Type>>> = Result;
type TFromIterator<Args extends TSchema[], Type extends TSchema, Result extends TIterator = TIterator<TFromType<Args, Type>>> = Result;
type TFromPromise<Args extends TSchema[], Type extends TSchema, Result extends TPromise = TPromise<TFromType<Args, Type>>> = Result;
type TFromObject<Args extends TSchema[], Properties extends TProperties, MappedProperties extends TProperties = TFromProperties<Args, Properties>, Result extends TObject = TObject<MappedProperties>> = Result;
type TFromRecord<Args extends TSchema[], Key extends TSchema, Value extends TSchema, MappedKey extends TSchema = TFromType<Args, Key>, MappedValue extends TSchema = TFromType<Args, Value>, Result extends TSchema = TRecordOrObject<MappedKey, MappedValue>> = Result;
type TFromArgument<Args extends TSchema[], Index extends number, Result extends TSchema = Index extends keyof Args[Index] ? Args[Index] : TUnknown> = Result;
type TFromProperty<Args extends TSchema[], Type extends TSchema, IsReadonly extends boolean = Type extends TReadonly<Type> ? true : false, IsOptional extends boolean = Type extends TOptional<Type> ? true : false, Mapped extends TSchema = TFromType<Args, Type>, Result extends TSchema = ([
IsReadonly,
IsOptional
] extends [true, true] ? TReadonlyOptional<Mapped> : [
IsReadonly,
IsOptional
] extends [true, false] ? TReadonly<Mapped> : [
IsReadonly,
IsOptional
] extends [false, true] ? TOptional<Mapped> : Mapped)> = Result;
type TFromProperties<Args extends TSchema[], Properties extends TProperties, Result extends TProperties = {
[Key in keyof Properties]: TFromProperty<Args, Properties[Key]>;
}> = Result;
export type TFromTypes<Args extends TSchema[], Types extends TSchema[], Result extends TSchema[] = []> = (Types extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? TFromTypes<Args, Right, [...Result, TFromType<Args, Left>]> : Result);
export declare function FromTypes<Args extends TSchema[], Types extends TSchema[]>(args: [...Args], types: [...Types]): TFromTypes<Args, Types>;
export type TFromType<Args extends TSchema[], Type extends TSchema> = (Type extends TConstructor<infer Parameters extends TSchema[], infer InstanceType extends TSchema> ? TFromConstructor<Args, Parameters, InstanceType> : Type extends TFunction<infer Parameters extends TSchema[], infer ReturnType extends TSchema> ? TFromFunction<Args, Parameters, ReturnType> : Type extends TIntersect<infer Types extends TSchema[]> ? TFromIntersect<Args, Types> : Type extends TUnion<infer Types extends TSchema[]> ? TFromUnion<Args, Types> : Type extends TTuple<infer Types extends TSchema[]> ? TFromTuple<Args, Types> : Type extends TArray<infer Type extends TSchema> ? TFromArray<Args, Type> : Type extends TAsyncIterator<infer Type extends TSchema> ? TFromAsyncIterator<Args, Type> : Type extends TIterator<infer Type extends TSchema> ? TFromIterator<Args, Type> : Type extends TPromise<infer Type extends TSchema> ? TFromPromise<Args, Type> : Type extends TObject<infer Properties extends TProperties> ? TFromObject<Args, Properties> : Type extends TRecord<infer Key extends TSchema, infer Value extends TSchema> ? TFromRecord<Args, Key, Value> : Type extends TArgument<infer Index extends number> ? TFromArgument<Args, Index> : Type);
/** `[JavaScript]` Instantiates a type with the given parameters */
export type TInstantiate<Type extends TSchema, Args extends TSchema[], Result extends TSchema = TFromType<Args, Type>> = Result;
/** `[JavaScript]` Instantiates a type with the given parameters */
export declare function Instantiate<Type extends TSchema, Args extends TSchema[]>(type: Type, args: [...Args]): TInstantiate<Type, Args>;
export {};
@@ -0,0 +1,465 @@
export declare const NTV2RichMediaResp: {
respHead: import("napcat-protobuf").MessageProtoFieldType<() => {
common: import("napcat-protobuf").MessageProtoFieldType<() => {
RequestId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Command: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
retCode: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
message: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
upload: import("napcat-protobuf").MessageProtoFieldType<() => {
uKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
msgSeq: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
msgInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
MsgInfoBody: import("napcat-protobuf").MessageProtoFieldType<() => {
Index: import("napcat-protobuf").MessageProtoFieldType<() => {
Info: import("napcat-protobuf").MessageProtoFieldType<() => {
FileSize: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
FileHash: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
FileSha1: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
FileName: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
Type: import("napcat-protobuf").MessageProtoFieldType<() => {
Type: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
PicFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
VideoFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
VoiceFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
Width: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Height: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Time: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Original: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
FileUuid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
StoreId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
UploadTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Ttl: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
SubType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
Picture: import("napcat-protobuf").MessageProtoFieldType<() => {
UrlPath: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
Ext: import("napcat-protobuf").MessageProtoFieldType<() => {
OriginalParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
BigParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
ThumbParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
Domain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
Video: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
Audio: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
FileExist: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BOOL, false, false>;
HashSum: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, true>;
ExtBizInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
Pic: import("napcat-protobuf").MessageProtoFieldType<() => {
BizType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
TextSummary: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
BytesPbReserveC2c: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field8: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field10: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field12: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field18: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field19: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field20: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
BytesPbReserveTroop: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field9: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field10: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field12: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field18: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field19: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field21: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
FromScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ToScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
OldFileId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
Video: import("napcat-protobuf").MessageProtoFieldType<() => {
FromScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ToScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
BytesPbReserve: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
Ptt: import("napcat-protobuf").MessageProtoFieldType<() => {
SrcUin: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
PttScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
PttType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ChangeVoice: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Waveform: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
AutoConvertText: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
BytesReserve: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
BytesPbReserve: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
BytesGeneralFlags: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
BusiType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
}, false, false>;
ext: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
extType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
extValue: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, true>;
compatQMsg: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
subFileInfos: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
uKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
uKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
}, false, true>;
}, false, false>;
download: import("napcat-protobuf").MessageProtoFieldType<() => {
rKeyParam: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
rKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
info: import("napcat-protobuf").MessageProtoFieldType<() => {
domain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
urlPath: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
httpsPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
picUrlExtInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
OriginalParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
BigParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
ThumbParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
videoExtInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
VideoCodecFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
}, false, false>;
rKeyCreateTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
downloadRKey: import("napcat-protobuf").MessageProtoFieldType<() => {
rKeys: import("napcat-protobuf").MessageProtoFieldType<() => {
rkey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
rkeyTtlSec: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
storeId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
rkeyCreateTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
type: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
}, false, true>;
}, false, false>;
delete: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
uploadCompleted: import("napcat-protobuf").MessageProtoFieldType<() => {
msgSeq: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
}, false, false>;
msgInfoAuth: import("napcat-protobuf").MessageProtoFieldType<() => {
authCode: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
msg: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
resultTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
}, false, false>;
uploadKeyRenewal: import("napcat-protobuf").MessageProtoFieldType<() => {
ukey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
ukeyTtlSec: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
}, false, false>;
downloadSafe: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
extension: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, true, false>;
};
export declare const MultiMediaRespHead: {
common: import("napcat-protobuf").MessageProtoFieldType<() => {
RequestId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Command: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
retCode: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
message: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
};
export declare const DownloadResp: {
rKeyParam: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
rKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
info: import("napcat-protobuf").MessageProtoFieldType<() => {
domain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
urlPath: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
httpsPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
picUrlExtInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
OriginalParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
BigParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
ThumbParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
videoExtInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
VideoCodecFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
}, false, false>;
rKeyCreateTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
};
export declare const DownloadInfo: {
domain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
urlPath: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
httpsPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
picUrlExtInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
OriginalParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
BigParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
ThumbParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
videoExtInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
VideoCodecFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
};
export declare const IPv4: {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
};
export declare const IPv6: {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
};
export declare const UploadResp: {
uKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, true, false>;
uKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
msgSeq: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
msgInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
MsgInfoBody: import("napcat-protobuf").MessageProtoFieldType<() => {
Index: import("napcat-protobuf").MessageProtoFieldType<() => {
Info: import("napcat-protobuf").MessageProtoFieldType<() => {
FileSize: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
FileHash: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
FileSha1: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
FileName: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
Type: import("napcat-protobuf").MessageProtoFieldType<() => {
Type: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
PicFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
VideoFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
VoiceFormat: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
Width: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Height: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Time: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Original: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
FileUuid: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
StoreId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
UploadTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Ttl: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
SubType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
Picture: import("napcat-protobuf").MessageProtoFieldType<() => {
UrlPath: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
Ext: import("napcat-protobuf").MessageProtoFieldType<() => {
OriginalParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
BigParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
ThumbParameter: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
Domain: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
}, false, false>;
Video: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
Audio: import("napcat-protobuf").MessageProtoFieldType<() => {}, false, false>;
FileExist: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BOOL, false, false>;
HashSum: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, true>;
ExtBizInfo: import("napcat-protobuf").MessageProtoFieldType<() => {
Pic: import("napcat-protobuf").MessageProtoFieldType<() => {
BizType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
TextSummary: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
BytesPbReserveC2c: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field8: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field10: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field12: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field18: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field19: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field20: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
BytesPbReserveTroop: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field3: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field4: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field9: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field10: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
field12: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field18: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field19: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
field21: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
FromScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ToScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
OldFileId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
Video: import("napcat-protobuf").MessageProtoFieldType<() => {
FromScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ToScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
BytesPbReserve: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
Ptt: import("napcat-protobuf").MessageProtoFieldType<() => {
SrcUin: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
PttScene: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
PttType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ChangeVoice: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
Waveform: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
AutoConvertText: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
BytesReserve: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
BytesPbReserve: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
BytesGeneralFlags: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, false>;
BusiType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, false>;
}, false, false>;
ext: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
extType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
extValue: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
}, false, true>;
compatQMsg: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
subFileInfos: import("napcat-protobuf").MessageProtoFieldType<() => {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
uKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
uKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
}, false, true>;
};
export declare const RichMediaStorageTransInfo: {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
extType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
extValue: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
};
export declare const SubFileInfo: {
subType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
uKey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
uKeyTtlSecond: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipv4s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
ipv6s: import("napcat-protobuf").MessageProtoFieldType<() => {
outIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
outPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
inIP: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
inPort: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
ipType: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
}, false, true>;
};
export declare const DownloadSafeResp: {};
export declare const UploadKeyRenewalResp: {
ukey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
ukeyTtlSec: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
};
export declare const MsgInfoAuthResp: {
authCode: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
msg: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.BYTES, false, false>;
resultTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
};
export declare const UploadCompletedResp: {
msgSeq: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
};
export declare const DeleteResp: {};
export declare const DownloadRKeyResp: {
rKeys: import("napcat-protobuf").MessageProtoFieldType<() => {
rkey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
rkeyTtlSec: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
storeId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
rkeyCreateTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
type: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
}, false, true>;
};
export declare const RKeyInfo: {
rkey: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.STRING, false, false>;
rkeyTtlSec: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT64, false, false>;
storeId: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, false, false>;
rkeyCreateTime: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
type: import("napcat-protobuf").ScalarProtoFieldType<ScalarType.UINT32, true, false>;
};
@@ -0,0 +1,169 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const boundaries_1 = require("./boundaries");
// BreakTypes
// @type {BreakType}
const NotBreak = 0;
const BreakStart = 1;
const Break = 2;
const BreakLastRegional = 3;
const BreakPenultimateRegional = 4;
class GraphemerHelper {
/**
* Check if the the character at the position {pos} of the string is surrogate
* @param str {string}
* @param pos {number}
* @returns {boolean}
*/
static isSurrogate(str, pos) {
return (0xd800 <= str.charCodeAt(pos) &&
str.charCodeAt(pos) <= 0xdbff &&
0xdc00 <= str.charCodeAt(pos + 1) &&
str.charCodeAt(pos + 1) <= 0xdfff);
}
/**
* The String.prototype.codePointAt polyfill
* Private function, gets a Unicode code point from a JavaScript UTF-16 string
* handling surrogate pairs appropriately
* @param str {string}
* @param idx {number}
* @returns {number}
*/
static codePointAt(str, idx) {
if (idx === undefined) {
idx = 0;
}
const code = str.charCodeAt(idx);
// if a high surrogate
if (0xd800 <= code && code <= 0xdbff && idx < str.length - 1) {
const hi = code;
const low = str.charCodeAt(idx + 1);
if (0xdc00 <= low && low <= 0xdfff) {
return (hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000;
}
return hi;
}
// if a low surrogate
if (0xdc00 <= code && code <= 0xdfff && idx >= 1) {
const hi = str.charCodeAt(idx - 1);
const low = code;
if (0xd800 <= hi && hi <= 0xdbff) {
return (hi - 0xd800) * 0x400 + (low - 0xdc00) + 0x10000;
}
return low;
}
// just return the char if an unmatched surrogate half or a
// single-char codepoint
return code;
}
//
/**
* Private function, returns whether a break is allowed between the two given grapheme breaking classes
* Implemented the UAX #29 3.1.1 Grapheme Cluster Boundary Rules on extended grapheme clusters
* @param start {number}
* @param mid {Array<number>}
* @param end {number}
* @param startEmoji {number}
* @param midEmoji {Array<number>}
* @param endEmoji {number}
* @returns {number}
*/
static shouldBreak(start, mid, end, startEmoji, midEmoji, endEmoji) {
const all = [start].concat(mid).concat([end]);
const allEmoji = [startEmoji].concat(midEmoji).concat([endEmoji]);
const previous = all[all.length - 2];
const next = end;
const nextEmoji = endEmoji;
// Lookahead terminator for:
// GB12. ^ (RI RI)* RI ? RI
// GB13. [^RI] (RI RI)* RI ? RI
const rIIndex = all.lastIndexOf(boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR);
if (rIIndex > 0 &&
all.slice(1, rIIndex).every(function (c) {
return c === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR;
}) &&
[boundaries_1.CLUSTER_BREAK.PREPEND, boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR].indexOf(previous) === -1) {
if (all.filter(function (c) {
return c === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR;
}).length %
2 ===
1) {
return BreakLastRegional;
}
else {
return BreakPenultimateRegional;
}
}
// GB3. CR × LF
if (previous === boundaries_1.CLUSTER_BREAK.CR && next === boundaries_1.CLUSTER_BREAK.LF) {
return NotBreak;
}
// GB4. (Control|CR|LF) ÷
else if (previous === boundaries_1.CLUSTER_BREAK.CONTROL ||
previous === boundaries_1.CLUSTER_BREAK.CR ||
previous === boundaries_1.CLUSTER_BREAK.LF) {
return BreakStart;
}
// GB5. ÷ (Control|CR|LF)
else if (next === boundaries_1.CLUSTER_BREAK.CONTROL ||
next === boundaries_1.CLUSTER_BREAK.CR ||
next === boundaries_1.CLUSTER_BREAK.LF) {
return BreakStart;
}
// GB6. L × (L|V|LV|LVT)
else if (previous === boundaries_1.CLUSTER_BREAK.L &&
(next === boundaries_1.CLUSTER_BREAK.L ||
next === boundaries_1.CLUSTER_BREAK.V ||
next === boundaries_1.CLUSTER_BREAK.LV ||
next === boundaries_1.CLUSTER_BREAK.LVT)) {
return NotBreak;
}
// GB7. (LV|V) × (V|T)
else if ((previous === boundaries_1.CLUSTER_BREAK.LV || previous === boundaries_1.CLUSTER_BREAK.V) &&
(next === boundaries_1.CLUSTER_BREAK.V || next === boundaries_1.CLUSTER_BREAK.T)) {
return NotBreak;
}
// GB8. (LVT|T) × (T)
else if ((previous === boundaries_1.CLUSTER_BREAK.LVT || previous === boundaries_1.CLUSTER_BREAK.T) &&
next === boundaries_1.CLUSTER_BREAK.T) {
return NotBreak;
}
// GB9. × (Extend|ZWJ)
else if (next === boundaries_1.CLUSTER_BREAK.EXTEND || next === boundaries_1.CLUSTER_BREAK.ZWJ) {
return NotBreak;
}
// GB9a. × SpacingMark
else if (next === boundaries_1.CLUSTER_BREAK.SPACINGMARK) {
return NotBreak;
}
// GB9b. Prepend ×
else if (previous === boundaries_1.CLUSTER_BREAK.PREPEND) {
return NotBreak;
}
// GB11. \p{Extended_Pictographic} Extend* ZWJ × \p{Extended_Pictographic}
const previousNonExtendIndex = allEmoji
.slice(0, -1)
.lastIndexOf(boundaries_1.EXTENDED_PICTOGRAPHIC);
if (previousNonExtendIndex !== -1 &&
allEmoji[previousNonExtendIndex] === boundaries_1.EXTENDED_PICTOGRAPHIC &&
all.slice(previousNonExtendIndex + 1, -2).every(function (c) {
return c === boundaries_1.CLUSTER_BREAK.EXTEND;
}) &&
previous === boundaries_1.CLUSTER_BREAK.ZWJ &&
nextEmoji === boundaries_1.EXTENDED_PICTOGRAPHIC) {
return NotBreak;
}
// GB12. ^ (RI RI)* RI × RI
// GB13. [^RI] (RI RI)* RI × RI
if (mid.indexOf(boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR) !== -1) {
return Break;
}
if (previous === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR &&
next === boundaries_1.CLUSTER_BREAK.REGIONAL_INDICATOR) {
return NotBreak;
}
// GB999. Any ? Any
return BreakStart;
}
}
exports.default = GraphemerHelper;
@@ -0,0 +1,212 @@
/**
* @import {
* Code,
* InitialConstruct,
* Initializer,
* Resolver,
* State,
* TokenizeContext
* } from 'micromark-util-types'
*/
export const resolver = {
resolveAll: createResolver()
};
export const string = initializeFactory('string');
export const text = initializeFactory('text');
/**
* @param {'string' | 'text'} field
* Field.
* @returns {InitialConstruct}
* Construct.
*/
function initializeFactory(field) {
return {
resolveAll: createResolver(field === 'text' ? resolveAllLineSuffixes : undefined),
tokenize: initializeText
};
/**
* @this {TokenizeContext}
* Context.
* @type {Initializer}
*/
function initializeText(effects) {
const self = this;
const constructs = this.parser.constructs[field];
const text = effects.attempt(constructs, start, notText);
return start;
/** @type {State} */
function start(code) {
return atBreak(code) ? text(code) : notText(code);
}
/** @type {State} */
function notText(code) {
if (code === null) {
effects.consume(code);
return;
}
effects.enter("data");
effects.consume(code);
return data;
}
/** @type {State} */
function data(code) {
if (atBreak(code)) {
effects.exit("data");
return text(code);
}
// Data.
effects.consume(code);
return data;
}
/**
* @param {Code} code
* Code.
* @returns {boolean}
* Whether the code is a break.
*/
function atBreak(code) {
if (code === null) {
return true;
}
const list = constructs[code];
let index = -1;
if (list) {
// Always populated by defaults.
while (++index < list.length) {
const item = list[index];
if (!item.previous || item.previous.call(self, self.previous)) {
return true;
}
}
}
return false;
}
}
}
/**
* @param {Resolver | undefined} [extraResolver]
* Resolver.
* @returns {Resolver}
* Resolver.
*/
function createResolver(extraResolver) {
return resolveAllText;
/** @type {Resolver} */
function resolveAllText(events, context) {
let index = -1;
/** @type {number | undefined} */
let enter;
// A rather boring computation (to merge adjacent `data` events) which
// improves mm performance by 29%.
while (++index <= events.length) {
if (enter === undefined) {
if (events[index] && events[index][1].type === "data") {
enter = index;
index++;
}
} else if (!events[index] || events[index][1].type !== "data") {
// Don’t do anything if there is one data token.
if (index !== enter + 2) {
events[enter][1].end = events[index - 1][1].end;
events.splice(enter + 2, index - enter - 2);
index = enter + 2;
}
enter = undefined;
}
}
return extraResolver ? extraResolver(events, context) : events;
}
}
/**
* A rather ugly set of instructions which again looks at chunks in the input
* stream.
* The reason to do this here is that it is *much* faster to parse in reverse.
* And that we can’t hook into `null` to split the line suffix before an EOF.
* To do: figure out if we can make this into a clean utility, or even in core.
* As it will be useful for GFMs literal autolink extension (and maybe even
* tables?)
*
* @type {Resolver}
*/
function resolveAllLineSuffixes(events, context) {
let eventIndex = 0; // Skip first.
while (++eventIndex <= events.length) {
if ((eventIndex === events.length || events[eventIndex][1].type === "lineEnding") && events[eventIndex - 1][1].type === "data") {
const data = events[eventIndex - 1][1];
const chunks = context.sliceStream(data);
let index = chunks.length;
let bufferIndex = -1;
let size = 0;
/** @type {boolean | undefined} */
let tabs;
while (index--) {
const chunk = chunks[index];
if (typeof chunk === 'string') {
bufferIndex = chunk.length;
while (chunk.charCodeAt(bufferIndex - 1) === 32) {
size++;
bufferIndex--;
}
if (bufferIndex) break;
bufferIndex = -1;
}
// Number
else if (chunk === -2) {
tabs = true;
size++;
} else if (chunk === -1) {
// Empty
} else {
// Replacement character, exit.
index++;
break;
}
}
// Allow final trailing whitespace.
if (context._contentTypeTextTrailing && eventIndex === events.length) {
size = 0;
}
if (size) {
const token = {
type: eventIndex === events.length || tabs || size < 2 ? "lineSuffix" : "hardBreakTrailing",
start: {
_bufferIndex: index ? bufferIndex : data.start._bufferIndex + bufferIndex,
_index: data.start._index + index,
line: data.end.line,
column: data.end.column - size,
offset: data.end.offset - size
},
end: {
...data.end
}
};
data.end = {
...token.start
};
if (data.start.offset === data.end.offset) {
Object.assign(data, token);
} else {
events.splice(eventIndex, 0, ['enter', token, context], ['exit', token, context]);
eventIndex += 2;
}
}
eventIndex++;
}
}
return events;
}
@@ -0,0 +1,24 @@
// Talossan [tzl]
import dayjs from '../index';
var locale = {
name: 'tzl',
weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),
months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'),
weekStart: 1,
weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),
monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),
weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),
ordinal: function ordinal(n) {
return n;
},
formats: {
LT: 'HH.mm',
LTS: 'HH.mm.ss',
L: 'DD.MM.YYYY',
LL: 'D. MMMM [dallas] YYYY',
LLL: 'D. MMMM [dallas] YYYY HH.mm',
LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm'
}
};
dayjs.locale(locale, null, true);
export default locale;
@@ -0,0 +1,5 @@
'use strict';
throw new Error(
'react-dom/static is not supported in React Server Components.'
);
@@ -0,0 +1,218 @@
'use strict';
var resolveBlockScalar = require('../compose/resolve-block-scalar.js');
var resolveFlowScalar = require('../compose/resolve-flow-scalar.js');
var errors = require('../errors.js');
var stringifyString = require('../stringify/stringifyString.js');
function resolveAsScalar(token, strict = true, onError) {
if (token) {
const _onError = (pos, code, message) => {
const offset = typeof pos === 'number' ? pos : Array.isArray(pos) ? pos[0] : pos.offset;
if (onError)
onError(offset, code, message);
else
throw new errors.YAMLParseError([offset, offset + 1], code, message);
};
switch (token.type) {
case 'scalar':
case 'single-quoted-scalar':
case 'double-quoted-scalar':
return resolveFlowScalar.resolveFlowScalar(token, strict, _onError);
case 'block-scalar':
return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError);
}
}
return null;
}
/**
* Create a new scalar token with `value`
*
* Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,
* as this function does not support any schema operations and won't check for such conflicts.
*
* @param value The string representation of the value, which will have its content properly indented.
* @param context.end Comments and whitespace after the end of the value, or after the block scalar header. If undefined, a newline will be added.
* @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.
* @param context.indent The indent level of the token.
* @param context.inFlow Is this scalar within a flow collection? This may affect the resolved type of the token's value.
* @param context.offset The offset position of the token.
* @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.
*/
function createScalarToken(value, context) {
const { implicitKey = false, indent, inFlow = false, offset = -1, type = 'PLAIN' } = context;
const source = stringifyString.stringifyString({ type, value }, {
implicitKey,
indent: indent > 0 ? ' '.repeat(indent) : '',
inFlow,
options: { blockQuote: true, lineWidth: -1 }
});
const end = context.end ?? [
{ type: 'newline', offset: -1, indent, source: '\n' }
];
switch (source[0]) {
case '|':
case '>': {
const he = source.indexOf('\n');
const head = source.substring(0, he);
const body = source.substring(he + 1) + '\n';
const props = [
{ type: 'block-scalar-header', offset, indent, source: head }
];
if (!addEndtoBlockProps(props, end))
props.push({ type: 'newline', offset: -1, indent, source: '\n' });
return { type: 'block-scalar', offset, indent, props, source: body };
}
case '"':
return { type: 'double-quoted-scalar', offset, indent, source, end };
case "'":
return { type: 'single-quoted-scalar', offset, indent, source, end };
default:
return { type: 'scalar', offset, indent, source, end };
}
}
/**
* Set the value of `token` to the given string `value`, overwriting any previous contents and type that it may have.
*
* Best efforts are made to retain any comments previously associated with the `token`,
* though all contents within a collection's `items` will be overwritten.
*
* Values that represent an actual string but may be parsed as a different type should use a `type` other than `'PLAIN'`,
* as this function does not support any schema operations and won't check for such conflicts.
*
* @param token Any token. If it does not include an `indent` value, the value will be stringified as if it were an implicit key.
* @param value The string representation of the value, which will have its content properly indented.
* @param context.afterKey In most cases, values after a key should have an additional level of indentation.
* @param context.implicitKey Being within an implicit key may affect the resolved type of the token's value.
* @param context.inFlow Being within a flow collection may affect the resolved type of the token's value.
* @param context.type The preferred type of the scalar token. If undefined, the previous type of the `token` will be used, defaulting to `'PLAIN'`.
*/
function setScalarValue(token, value, context = {}) {
let { afterKey = false, implicitKey = false, inFlow = false, type } = context;
let indent = 'indent' in token ? token.indent : null;
if (afterKey && typeof indent === 'number')
indent += 2;
if (!type)
switch (token.type) {
case 'single-quoted-scalar':
type = 'QUOTE_SINGLE';
break;
case 'double-quoted-scalar':
type = 'QUOTE_DOUBLE';
break;
case 'block-scalar': {
const header = token.props[0];
if (header.type !== 'block-scalar-header')
throw new Error('Invalid block scalar header');
type = header.source[0] === '>' ? 'BLOCK_FOLDED' : 'BLOCK_LITERAL';
break;
}
default:
type = 'PLAIN';
}
const source = stringifyString.stringifyString({ type, value }, {
implicitKey: implicitKey || indent === null,
indent: indent !== null && indent > 0 ? ' '.repeat(indent) : '',
inFlow,
options: { blockQuote: true, lineWidth: -1 }
});
switch (source[0]) {
case '|':
case '>':
setBlockScalarValue(token, source);
break;
case '"':
setFlowScalarValue(token, source, 'double-quoted-scalar');
break;
case "'":
setFlowScalarValue(token, source, 'single-quoted-scalar');
break;
default:
setFlowScalarValue(token, source, 'scalar');
}
}
function setBlockScalarValue(token, source) {
const he = source.indexOf('\n');
const head = source.substring(0, he);
const body = source.substring(he + 1) + '\n';
if (token.type === 'block-scalar') {
const header = token.props[0];
if (header.type !== 'block-scalar-header')
throw new Error('Invalid block scalar header');
header.source = head;
token.source = body;
}
else {
const { offset } = token;
const indent = 'indent' in token ? token.indent : -1;
const props = [
{ type: 'block-scalar-header', offset, indent, source: head }
];
if (!addEndtoBlockProps(props, 'end' in token ? token.end : undefined))
props.push({ type: 'newline', offset: -1, indent, source: '\n' });
for (const key of Object.keys(token))
if (key !== 'type' && key !== 'offset')
delete token[key];
Object.assign(token, { type: 'block-scalar', indent, props, source: body });
}
}
/** @returns `true` if last token is a newline */
function addEndtoBlockProps(props, end) {
if (end)
for (const st of end)
switch (st.type) {
case 'space':
case 'comment':
props.push(st);
break;
case 'newline':
props.push(st);
return true;
}
return false;
}
function setFlowScalarValue(token, source, type) {
switch (token.type) {
case 'scalar':
case 'double-quoted-scalar':
case 'single-quoted-scalar':
token.type = type;
token.source = source;
break;
case 'block-scalar': {
const end = token.props.slice(1);
let oa = source.length;
if (token.props[0].type === 'block-scalar-header')
oa -= token.props[0].source.length;
for (const tok of end)
tok.offset += oa;
delete token.props;
Object.assign(token, { type, source, end });
break;
}
case 'block-map':
case 'block-seq': {
const offset = token.offset + source.length;
const nl = { type: 'newline', offset, indent: token.indent, source: '\n' };
delete token.items;
Object.assign(token, { type, source, end: [nl] });
break;
}
default: {
const indent = 'indent' in token ? token.indent : -1;
const end = 'end' in token && Array.isArray(token.end)
? token.end.filter(st => st.type === 'space' ||
st.type === 'comment' ||
st.type === 'newline')
: [];
for (const key of Object.keys(token))
if (key !== 'type' && key !== 'offset')
delete token[key];
Object.assign(token, { type, indent, source, end });
}
}
}
exports.createScalarToken = createScalarToken;
exports.resolveAsScalar = resolveAsScalar;
exports.setScalarValue = setScalarValue;
@@ -0,0 +1,16 @@
"use strict";
module.exports = function () {
return `
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.
From ESLint v9.0.0, the default configuration file is now eslint.config.js.
If you are using a .eslintrc.* file, please follow the migration guide
to update your configuration file to the new format:
https://eslint.org/docs/latest/use/configure/migration-guide
If you still have problems after following the migration guide, please stop by
https://eslint.org/chat/help to chat with the team.
`.trimStart();
};
@@ -0,0 +1,15 @@
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnIntegerArrayBufferConverter } from "@peculiar/asn1-schema";
export class ECDSASigValue {
constructor(params = {}) {
this.r = new ArrayBuffer(0);
this.s = new ArrayBuffer(0);
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
], ECDSASigValue.prototype, "r", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, converter: AsnIntegerArrayBufferConverter })
], ECDSASigValue.prototype, "s", void 0);
@@ -0,0 +1,24 @@
const { Argument } = require('./lib/argument.js');
const { Command } = require('./lib/command.js');
const { CommanderError, InvalidArgumentError } = require('./lib/error.js');
const { Help } = require('./lib/help.js');
const { Option } = require('./lib/option.js');
exports.program = new Command();
exports.createCommand = (name) => new Command(name);
exports.createOption = (flags, description) => new Option(flags, description);
exports.createArgument = (name, description) => new Argument(name, description);
/**
* Expose classes
*/
exports.Command = Command;
exports.Option = Option;
exports.Argument = Argument;
exports.Help = Help;
exports.CommanderError = CommanderError;
exports.InvalidArgumentError = InvalidArgumentError;
exports.InvalidOptionArgumentError = InvalidArgumentError; // Deprecated
@@ -0,0 +1 @@
{"version":3,"file":"lazy-value.js","sourceRoot":"","sources":["../../src/utils/lazy-value.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,IAAI,GAAG,CAAI,EAAW,EAAgB,EAAE;IACnD,IAAI,QAAQ,GAAG,KAAK,CAAA;IACpB,IAAI,MAAqB,CAAA;IAEzB,OAAO,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,QAAQ,GAAG,IAAI,CAAA;YACf,MAAM,GAAG,EAAE,EAAE,CAAA;QACf,CAAC;QAED,OAAO,MAAM,CAAA;IACf,CAAC,CAAiB,CAAA;AACpB,CAAC,CAAA;AAID,MAAM,UAAU,kBAAkB,CAKhC,MAAkB,EAClB,YAA8B,EAC9B,WAAoC;IAEpC,MAAM,MAAM,GAAG,CAAC,KAAwB,EAAE,EAAE,CAC1C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE;QAC1C,KAAK;QACL,UAAU,EAAE,IAAI;QAChB,QAAQ,EAAE,IAAI;KACf,CAAC,CAAA;IAEJ,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE;QAC1C,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,GAAG;YACD,MAAM,MAAM,GAAG,WAAW,EAAE,CAAA;YAC5B,MAAM,CAAC,MAAM,CAAC,CAAA;YACd,OAAO,MAAM,CAAA;QACf,CAAC;QACD,GAAG,CAAC,KAAK;YACP,MAAM,CAAC,KAAK,CAAC,CAAA;QACf,CAAC;KACF,CAAC,CAAA;IAEF,OAAO,MAAM,CAAA;AACf,CAAC"}
@@ -0,0 +1,10 @@
import type { Range } from '../nodes/Node';
import { Scalar } from '../nodes/Scalar';
import type { FlowScalar } from '../parse/cst';
import type { ComposeErrorHandler } from './composer';
export declare function resolveFlowScalar(scalar: FlowScalar, strict: boolean, onError: ComposeErrorHandler): {
value: string;
type: Scalar.PLAIN | Scalar.QUOTE_DOUBLE | Scalar.QUOTE_SINGLE | null;
comment: string;
range: Range;
};
@@ -0,0 +1,8 @@
import arrayWithoutHoles from "./arrayWithoutHoles.js";
import iterableToArray from "./iterableToArray.js";
import unsupportedIterableToArray from "./unsupportedIterableToArray.js";
import nonIterableSpread from "./nonIterableSpread.js";
function _toConsumableArray(r) {
return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
}
export { _toConsumableArray as default };
@@ -0,0 +1,33 @@
import {PromiseValue} from './promise-value';
import {SetReturnType} from './set-return-type';
/**
Create an async version of the given function type, by boxing the return type in `Promise` while keeping the same parameter types.
Use-case: You have two functions, one synchronous and one asynchronous that do the same thing. Instead of having to duplicate the type definition, you can use `Asyncify` to reuse the synchronous type.
@example
```
import {Asyncify} from 'type-fest';
// Synchronous function.
function getFooSync(someArg: SomeType): Foo {
// …
}
type AsyncifiedFooGetter = Asyncify<typeof getFooSync>;
//=> type AsyncifiedFooGetter = (someArg: SomeType) => Promise<Foo>;
// Same as `getFooSync` but asynchronous.
const getFooAsync: AsyncifiedFooGetter = (someArg) => {
// TypeScript now knows that `someArg` is `SomeType` automatically.
// It also knows that this function must return `Promise<Foo>`.
// If you have `@typescript-eslint/promise-function-async` linter rule enabled, it will even report that "Functions that return promises must be async.".
// …
}
```
@category Utilities
*/
export type Asyncify<Fn extends (...args: any[]) => any> = SetReturnType<Fn, Promise<PromiseValue<ReturnType<Fn>>>>;
@@ -0,0 +1,27 @@
import type { NodeIKernelBuddyListener, NodeIKernelFileAssistantListener, NodeIKernelGroupListener, NodeIKernelLoginListener, NodeIKernelMsgListener, NodeIKernelProfileListener, NodeIKernelRobotListener, NodeIKernelSessionListener, NodeIKernelStorageCleanListener, NodeIKernelTicketListener } from '.';
import { NodeIKernelSearchListener } from './NodeIKernelSearchListener';
export * from './NodeIKernelSessionListener';
export * from './NodeIKernelLoginListener';
export * from './NodeIKernelMsgListener';
export * from './NodeIKernelGroupListener';
export * from './NodeIKernelBuddyListener';
export * from './NodeIKernelProfileListener';
export * from './NodeIKernelRobotListener';
export * from './NodeIKernelProfileListener';
export * from './NodeIKernelTicketListener';
export * from './NodeIKernelStorageCleanListener';
export * from './NodeIKernelFileAssistantListener';
export * from './NodeIKernelSearchListener';
export type ListenerNamingMapping = {
NodeIKernelSessionListener: NodeIKernelSessionListener;
NodeIKernelLoginListener: NodeIKernelLoginListener;
NodeIKernelMsgListener: NodeIKernelMsgListener;
NodeIKernelGroupListener: NodeIKernelGroupListener;
NodeIKernelBuddyListener: NodeIKernelBuddyListener;
NodeIKernelProfileListener: NodeIKernelProfileListener;
NodeIKernelRobotListener: NodeIKernelRobotListener;
NodeIKernelTicketListener: NodeIKernelTicketListener;
NodeIKernelStorageCleanListener: NodeIKernelStorageCleanListener;
NodeIKernelFileAssistantListener: NodeIKernelFileAssistantListener;
NodeIKernelSearchListener: NodeIKernelSearchListener;
};
@@ -0,0 +1,49 @@
# es-define-property <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
`Object.defineProperty`, but not IE 8's broken one.
## Example
```js
const assert = require('assert');
const $defineProperty = require('es-define-property');
if ($defineProperty) {
assert.equal($defineProperty, Object.defineProperty);
} else if (Object.defineProperty) {
assert.equal($defineProperty, false, 'this is IE 8');
} else {
assert.equal($defineProperty, false, 'this is an ES3 engine');
}
```
## Tests
Simply clone the repo, `npm install`, and run `npm test`
## Security
Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
[package-url]: https://npmjs.org/package/es-define-property
[npm-version-svg]: https://versionbadg.es/ljharb/es-define-property.svg
[deps-svg]: https://david-dm.org/ljharb/es-define-property.svg
[deps-url]: https://david-dm.org/ljharb/es-define-property
[dev-deps-svg]: https://david-dm.org/ljharb/es-define-property/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/es-define-property#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/es-define-property.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/es-define-property.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/es-define-property.svg
[downloads-url]: https://npm-stat.com/charts.html?package=es-define-property
[codecov-image]: https://codecov.io/gh/ljharb/es-define-property/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/es-define-property/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-define-property
[actions-url]: https://github.com/ljharb/es-define-property/actions
@@ -0,0 +1 @@
module.exports={C:{"78":0.01003,"80":0.00334,"114":0.01337,"115":0.09026,"118":0.00334,"119":0.00669,"120":0.00669,"125":0.00334,"127":0.00334,"128":0.00334,"131":0.00334,"133":0.01337,"139":0.01003,"140":0.01003,"141":0.00334,"142":0.01672,"143":0.55494,"144":0.57165,"145":0.00334,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 116 117 121 122 123 124 126 129 130 132 134 135 136 137 138 146 147 3.5 3.6"},D:{"39":0.00334,"40":0.00334,"41":0.00334,"42":0.00334,"43":0.00334,"44":0.00334,"45":0.00334,"46":0.00334,"47":0.00334,"48":0.00334,"49":0.00334,"50":0.00669,"51":0.00334,"52":0.00334,"53":0.00334,"54":0.00334,"55":0.00334,"56":0.00334,"57":0.00334,"58":0.00334,"59":0.00334,"60":0.00334,"69":0.00334,"75":0.00334,"79":0.01672,"83":0.00334,"87":0.0234,"88":0.00334,"89":0.00669,"91":0.00669,"98":0.00334,"100":0.00334,"101":0.00334,"103":0.00334,"106":0.00669,"107":0.01337,"109":0.43459,"111":0.00669,"112":1.93225,"114":0.03677,"116":0.07689,"117":0.0468,"118":0.00334,"119":0.01003,"120":0.01337,"121":0.01003,"122":0.02674,"123":0.02006,"124":0.00669,"125":2.72455,"126":0.11032,"127":0.0234,"128":0.03343,"129":0.12035,"130":0.0702,"131":0.02674,"132":0.02006,"133":0.0468,"134":0.01672,"135":0.02674,"136":0.03009,"137":0.11032,"138":0.32761,"139":0.3577,"140":4.79386,"141":10.64077,"142":0.11366,"143":0.00334,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 61 62 63 64 65 66 67 68 70 71 72 73 74 76 77 78 80 81 84 85 86 90 92 93 94 95 96 97 99 102 104 105 108 110 113 115 144 145"},F:{"85":0.00334,"89":0.01337,"91":0.00334,"92":0.01003,"95":0.00334,"106":0.00334,"118":0.00334,"120":0.06017,"121":0.02674,"122":0.61177,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 86 87 88 90 93 94 96 97 98 99 100 101 102 103 104 105 107 108 109 110 111 112 113 114 115 116 117 119 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"17":0.00334,"92":0.00334,"109":0.00334,"110":0.00334,"114":0.01337,"116":0.00334,"118":0.00334,"119":0.00334,"120":0.00669,"122":0.00334,"124":0.00334,"125":0.00334,"129":0.01003,"130":0.00334,"131":0.00334,"132":0.00334,"134":0.00334,"135":0.00669,"136":0.00334,"137":0.01337,"138":0.02006,"139":0.03677,"140":0.44462,"141":2.49388,"142":0.01003,_:"12 13 14 15 16 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 111 112 113 115 117 121 123 126 127 128 133"},E:{_:"0 4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 16.2 26.2","13.1":0.00669,"14.1":0.01672,"15.4":0.00669,"15.5":0.00334,"15.6":0.01672,"16.0":0.00334,"16.1":0.00334,"16.3":0.00669,"16.4":0.01003,"16.5":0.00334,"16.6":0.06017,"17.0":0.00334,"17.1":0.02006,"17.2":0.00334,"17.3":0.00669,"17.4":0.02006,"17.5":0.03009,"17.6":0.10363,"18.0":0.00669,"18.1":0.01003,"18.2":0.0234,"18.3":0.03009,"18.4":0.00669,"18.5-18.6":0.06017,"26.0":0.47471,"26.1":0.0234},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00085,"5.0-5.1":0,"6.0-6.1":0.00342,"7.0-7.1":0.00256,"8.1-8.4":0,"9.0-9.2":0,"9.3":0.00769,"10.0-10.2":0.00085,"10.3":0.01452,"11.0-11.2":0.21523,"11.3-11.4":0.00512,"12.0-12.1":0.00171,"12.2-12.5":0.04185,"13.0-13.1":0,"13.2":0.00427,"13.3":0.00171,"13.4-13.7":0.00683,"14.0-14.4":0.01452,"14.5-14.8":0.01537,"15.0-15.1":0.01452,"15.2-15.3":0.0111,"15.4":0.01281,"15.5":0.01452,"15.6-15.8":0.18961,"16.0":0.02562,"16.1":0.04783,"16.2":0.02477,"16.3":0.04441,"16.4":0.0111,"16.5":0.01964,"16.6-16.7":0.25367,"17.0":0.01794,"17.1":0.02733,"17.2":0.01964,"17.3":0.02904,"17.4":0.05125,"17.5":0.08797,"17.6-17.7":0.22206,"18.0":0.05039,"18.1":0.1042,"18.2":0.05637,"18.3":0.18107,"18.4":0.0931,"18.5-18.6":4.74705,"26.0":0.58676,"26.1":0.02135},P:{"4":0.03086,"21":0.01029,"22":0.03086,"23":0.04115,"24":0.05143,"25":0.03086,"26":0.07201,"27":0.08229,"28":3.16824,"29":0.20573,_:"20 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0","7.2-7.4":0.13372,"19.0":0.01029},I:{"0":0.19278,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0.00004,"4.4":0,"4.4.3-4.4.4":0.0001},K:{"0":0.48596,_:"10 11 12 11.1 11.5 12.1"},A:{"11":0.0234,_:"6 7 8 9 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},R:{_:"0"},M:{"0":0.233},Q:{"14.9":0.00666},O:{"0":0.30622},H:{"0":0},L:{"0":56.80893}};
@@ -0,0 +1,13 @@
'use strict';
var $BooleanValueOf = require('call-bound')('Boolean.prototype.valueOf');
// https://262.ecma-international.org/15.0/#sec-properties-of-the-boolean-prototype-object
module.exports = function ThisBooleanValue(value) {
if (typeof value === 'boolean') {
return value;
}
return $BooleanValueOf(value);
};
@@ -0,0 +1,5 @@
import arrayLikeToArray from "./arrayLikeToArray.js";
function _arrayWithoutHoles(r) {
if (Array.isArray(r)) return arrayLikeToArray(r);
}
export { _arrayWithoutHoles as default };
@@ -0,0 +1,10 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// A temporary value used to identify if the loop should be broken.
// See #1064, #1293
const breakLoop = {};
exports.default = breakLoop;
module.exports = exports.default;
@@ -0,0 +1,41 @@
/**
* @fileoverview Define the cursor which ignores the first few tokens.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const DecorativeCursor = require("./decorative-cursor");
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
/**
* The decorative cursor which ignores the first few tokens.
*/
module.exports = class SkipCursor extends DecorativeCursor {
/**
* Initializes this cursor.
* @param {Cursor} cursor The cursor to be decorated.
* @param {number} count The count of tokens this cursor skips.
*/
constructor(cursor, count) {
super(cursor);
this.count = count;
}
/** @inheritdoc */
moveNext() {
while (this.count > 0) {
this.count -= 1;
if (!super.moveNext()) {
return false;
}
}
return super.moveNext();
}
};
@@ -0,0 +1,23 @@
/**
* A specialized version of `_.indexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
module.exports = strictIndexOf;
@@ -0,0 +1,30 @@
var baseGet = require('./_baseGet'),
baseSet = require('./_baseSet'),
castPath = require('./_castPath');
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @param {Function} predicate The function invoked per property.
* @returns {Object} Returns the new object.
*/
function basePickBy(object, paths, predicate) {
var index = -1,
length = paths.length,
result = {};
while (++index < length) {
var path = paths[index],
value = baseGet(object, path);
if (predicate(value, path)) {
baseSet(result, castPath(path, object), value);
}
}
return result;
}
module.exports = basePickBy;
@@ -0,0 +1 @@
{"version":3,"file":"buildFilteredServiceBindings.js","sourceRoot":"","sources":["../../../../src/planning/calculations/buildFilteredServiceBindings.ts"],"names":[],"mappings":";;AAaA,oEAoCC;AA/CD,0FAAuF;AAWvF,SAAgB,4BAA4B,CAC1C,MAAsB,EACtB,kBAAsC,EACtC,OAA6C;IAE7C,MAAM,iBAAiB,GACrB,OAAO,EAAE,uBAAuB,IAAI,kBAAkB,CAAC,iBAAiB,CAAC;IAE3E,MAAM,eAAe,GACnB,OAAO,EAAE,OAAO,KAAK,IAAI;QACvB,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;QAC9D,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;IAEpE,MAAM,gBAAgB,GAAuB,eAAe,CAAC,MAAM,CACjE,CAAC,OAAyB,EAAW,EAAE,CACrC,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAC5C,CAAC;IAEF,IACE,gBAAgB,CAAC,MAAM,KAAK,CAAC;QAC7B,MAAM,CAAC,eAAe,KAAK,SAAS;QACpC,OAAO,iBAAiB,KAAK,UAAU,EACvC,CAAC;QACD,MAAM,OAAO,GAA6B,IAAA,2CAAoB,EAC5D,MAAM,CAAC,eAAe,EACtB,iBAA4B,CAC7B,CAAC;QAEF,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEtC,IAAI,OAAO,CAAC,aAAa,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC9C,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;IAED,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,3 @@
export declare const Space_Separator: RegExp
export declare const ID_Start: RegExp
export declare const ID_Continue: RegExp
@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.resolveBindingsDeactivations = resolveBindingsDeactivations;
const isScopedBinding_1 = require("../../binding/calculations/isScopedBinding");
const BindingScope_1 = require("../../binding/models/BindingScope");
const resolveBindingDeactivations_1 = require("./resolveBindingDeactivations");
const CACHE_KEY_TYPE = 'cache';
function resolveBindingsDeactivations(params, bindings) {
if (bindings === undefined) {
return;
}
const singletonScopedBindings = filterCachedSinglentonScopedBindings(bindings);
const deactivationPromiseResults = [];
for (const binding of singletonScopedBindings) {
const deactivationResult = (0, resolveBindingDeactivations_1.resolveBindingDeactivations)(params, binding);
if (deactivationResult !== undefined) {
deactivationPromiseResults.push(deactivationResult);
}
}
if (deactivationPromiseResults.length > 0) {
return Promise.all(deactivationPromiseResults).then(() => undefined);
}
}
function filterCachedSinglentonScopedBindings(bindings) {
const filteredBindings = [];
for (const binding of bindings) {
if ((0, isScopedBinding_1.isScopedBinding)(binding) &&
binding.scope === BindingScope_1.bindingScopeValues.Singleton &&
binding.cache.isRight) {
filteredBindings.push(binding);
}
}
return filteredBindings;
}
//# sourceMappingURL=resolveBindingsDeactivations.js.map
@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=isPlanServiceRedirectionBindingNode.spec.d.ts.map
@@ -0,0 +1,156 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OneToManyMapStar = void 0;
const NOT_FOUND_INDEX = -1;
/**
* Data structure able to efficiently manage a set of models related to a set of properties in a one to many relation.
*/
class OneToManyMapStar {
#modelToRelationMap;
#relationToModelsMaps;
#spec;
constructor(spec) {
this.#modelToRelationMap = new Map();
this.#relationToModelsMaps = {};
for (const specProperty of Reflect.ownKeys(spec)) {
this.#relationToModelsMaps[specProperty] = new Map();
}
this.#spec = spec;
}
add(model, relation) {
this.#buildOrGetModelArray(model).push(relation);
for (const relationKey of Reflect.ownKeys(relation)) {
this.#buildOrGetRelationModels(relationKey, relation[relationKey]).push(model);
}
}
clone() {
const modelToCloneModelMap = this.#buildModelToCloneModelMap();
const relationToCloneRelationMap = this.#buildRelationToRelationModelMap();
const properties = Reflect.ownKeys(this.#spec);
const clone = this._buildNewInstance(this.#spec);
this.#pushRelationEntriesIntoRelationMap(this.#modelToRelationMap, clone.#modelToRelationMap, modelToCloneModelMap, relationToCloneRelationMap);
for (const property of properties) {
this.#pushModelEntriesIntoModelMap(this.#relationToModelsMaps[property], clone.#relationToModelsMaps[property], modelToCloneModelMap);
}
return clone;
}
get(key, value) {
return this.#relationToModelsMaps[key].get(value);
}
getAllKeys(key) {
return this.#relationToModelsMaps[key].keys();
}
removeByRelation(key, value) {
const models = this.get(key, value);
if (models === undefined) {
return;
}
const uniqueModelsSet = new Set(models);
for (const model of uniqueModelsSet) {
const relations = this.#modelToRelationMap.get(model);
if (relations === undefined) {
throw new Error('Expecting model relation, none found');
}
for (const relation of relations) {
if (relation[key] === value) {
this.#removeModelFromRelationMaps(model, relation);
}
}
this.#modelToRelationMap.delete(model);
}
}
_buildNewInstance(spec) {
return new OneToManyMapStar(spec);
}
_cloneModel(model) {
return model;
}
_cloneRelation(relation) {
return relation;
}
#buildModelToCloneModelMap() {
const modelToCloneModelMap = new Map();
for (const model of this.#modelToRelationMap.keys()) {
const clonedModel = this._cloneModel(model);
modelToCloneModelMap.set(model, clonedModel);
}
return modelToCloneModelMap;
}
#buildRelationToRelationModelMap() {
const relationToCloneRelationMap = new Map();
for (const relations of this.#modelToRelationMap.values()) {
for (const relation of relations) {
const clonedRelation = this._cloneRelation(relation);
relationToCloneRelationMap.set(relation, clonedRelation);
}
}
return relationToCloneRelationMap;
}
#buildOrGetModelArray(model) {
let relations = this.#modelToRelationMap.get(model);
if (relations === undefined) {
relations = [];
this.#modelToRelationMap.set(model, relations);
}
return relations;
}
#buildOrGetRelationModels(relationKey, relationValue) {
let models = this.#relationToModelsMaps[relationKey].get(relationValue);
if (models === undefined) {
models = [];
this.#relationToModelsMaps[relationKey].set(relationValue, models);
}
return models;
}
#getCloneModel(model, modelToCloneModelMap) {
const clonedModel = modelToCloneModelMap.get(model);
if (clonedModel === undefined) {
throw new Error('Expecting model to be cloned, none found');
}
return clonedModel;
}
#getCloneRelation(relation, relationToCloneRelationMap) {
const clonedRelation = relationToCloneRelationMap.get(relation);
if (clonedRelation === undefined) {
throw new Error('Expecting relation to be cloned, none found');
}
return clonedRelation;
}
#pushModelEntriesIntoModelMap(source, target, modelToCloneModelMap) {
for (const [relationValue, models] of source) {
const modelsClone = new Array();
for (const model of models) {
modelsClone.push(this.#getCloneModel(model, modelToCloneModelMap));
}
target.set(relationValue, modelsClone);
}
}
#pushRelationEntriesIntoRelationMap(source, target, modelToCloneModelMap, relationToCloneRelationMap) {
for (const [model, relations] of source) {
const relationsClone = new Array();
for (const relation of relations) {
relationsClone.push(this.#getCloneRelation(relation, relationToCloneRelationMap));
}
target.set(this.#getCloneModel(model, modelToCloneModelMap), relationsClone);
}
}
#removeModelFromRelationMaps(model, relation) {
for (const relationKey of Reflect.ownKeys(relation)) {
this.#removeModelFromRelationMap(model, relationKey, relation[relationKey]);
}
}
#removeModelFromRelationMap(model, relationKey, relationValue) {
const relationModels = this.#relationToModelsMaps[relationKey].get(relationValue);
if (relationModels !== undefined) {
const index = relationModels.indexOf(model);
if (index !== NOT_FOUND_INDEX) {
relationModels.splice(index, 1);
}
if (relationModels.length === 0) {
this.#relationToModelsMaps[relationKey].delete(relationValue);
}
}
}
}
exports.OneToManyMapStar = OneToManyMapStar;
//# sourceMappingURL=OneToManyMapStar.js.map
@@ -0,0 +1,222 @@
'use strict'
var align = require('wide-align')
var validate = require('aproba')
var wideTruncate = require('./wide-truncate')
var error = require('./error')
var TemplateItem = require('./template-item')
function renderValueWithValues (values) {
return function (item) {
return renderValue(item, values)
}
}
var renderTemplate = module.exports = function (width, template, values) {
var items = prepareItems(width, template, values)
var rendered = items.map(renderValueWithValues(values)).join('')
return align.left(wideTruncate(rendered, width), width)
}
function preType (item) {
var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1)
return 'pre' + cappedTypeName
}
function postType (item) {
var cappedTypeName = item.type[0].toUpperCase() + item.type.slice(1)
return 'post' + cappedTypeName
}
function hasPreOrPost (item, values) {
if (!item.type) {
return
}
return values[preType(item)] || values[postType(item)]
}
function generatePreAndPost (baseItem, parentValues) {
var item = Object.assign({}, baseItem)
var values = Object.create(parentValues)
var template = []
var pre = preType(item)
var post = postType(item)
if (values[pre]) {
template.push({ value: values[pre] })
values[pre] = null
}
item.minLength = null
item.length = null
item.maxLength = null
template.push(item)
values[item.type] = values[item.type]
if (values[post]) {
template.push({ value: values[post] })
values[post] = null
}
return function ($1, $2, length) {
return renderTemplate(length, template, values)
}
}
function prepareItems (width, template, values) {
function cloneAndObjectify (item, index, arr) {
var cloned = new TemplateItem(item, width)
var type = cloned.type
if (cloned.value == null) {
if (!(type in values)) {
if (cloned.default == null) {
throw new error.MissingTemplateValue(cloned, values)
} else {
cloned.value = cloned.default
}
} else {
cloned.value = values[type]
}
}
if (cloned.value == null || cloned.value === '') {
return null
}
cloned.index = index
cloned.first = index === 0
cloned.last = index === arr.length - 1
if (hasPreOrPost(cloned, values)) {
cloned.value = generatePreAndPost(cloned, values)
}
return cloned
}
var output = template.map(cloneAndObjectify).filter(function (item) {
return item != null
})
var remainingSpace = width
var variableCount = output.length
function consumeSpace (length) {
if (length > remainingSpace) {
length = remainingSpace
}
remainingSpace -= length
}
function finishSizing (item, length) {
if (item.finished) {
throw new error.Internal('Tried to finish template item that was already finished')
}
if (length === Infinity) {
throw new error.Internal('Length of template item cannot be infinity')
}
if (length != null) {
item.length = length
}
item.minLength = null
item.maxLength = null
--variableCount
item.finished = true
if (item.length == null) {
item.length = item.getBaseLength()
}
if (item.length == null) {
throw new error.Internal('Finished template items must have a length')
}
consumeSpace(item.getLength())
}
output.forEach(function (item) {
if (!item.kerning) {
return
}
var prevPadRight = item.first ? 0 : output[item.index - 1].padRight
if (!item.first && prevPadRight < item.kerning) {
item.padLeft = item.kerning - prevPadRight
}
if (!item.last) {
item.padRight = item.kerning
}
})
// Finish any that have a fixed (literal or intuited) length
output.forEach(function (item) {
if (item.getBaseLength() == null) {
return
}
finishSizing(item)
})
var resized = 0
var resizing
var hunkSize
do {
resizing = false
hunkSize = Math.round(remainingSpace / variableCount)
output.forEach(function (item) {
if (item.finished) {
return
}
if (!item.maxLength) {
return
}
if (item.getMaxLength() < hunkSize) {
finishSizing(item, item.maxLength)
resizing = true
}
})
} while (resizing && resized++ < output.length)
if (resizing) {
throw new error.Internal('Resize loop iterated too many times while determining maxLength')
}
resized = 0
do {
resizing = false
hunkSize = Math.round(remainingSpace / variableCount)
output.forEach(function (item) {
if (item.finished) {
return
}
if (!item.minLength) {
return
}
if (item.getMinLength() >= hunkSize) {
finishSizing(item, item.minLength)
resizing = true
}
})
} while (resizing && resized++ < output.length)
if (resizing) {
throw new error.Internal('Resize loop iterated too many times while determining minLength')
}
hunkSize = Math.round(remainingSpace / variableCount)
output.forEach(function (item) {
if (item.finished) {
return
}
finishSizing(item, hunkSize)
})
return output
}
function renderFunction (item, values, length) {
validate('OON', arguments)
if (item.type) {
return item.value(values, values[item.type + 'Theme'] || {}, length)
} else {
return item.value(values, {}, length)
}
}
function renderValue (item, values) {
var length = item.getBaseLength()
var value = typeof item.value === 'function' ? renderFunction(item, values, length) : item.value
if (value == null || value === '') {
return ''
}
var alignWith = align[item.align] || align.left
var leftPadding = item.padLeft ? align.left('', item.padLeft) : ''
var rightPadding = item.padRight ? align.right('', item.padRight) : ''
var truncated = wideTruncate(String(value), length)
var aligned = alignWith(truncated, length)
return leftPadding + aligned + rightPadding
}
@@ -0,0 +1,43 @@
{
"name": "map-obj",
"version": "4.3.0",
"description": "Map object keys and values into a new object",
"license": "MIT",
"repository": "sindresorhus/map-obj",
"funding": "https://github.com/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "https://sindresorhus.com"
},
"engines": {
"node": ">=8"
},
"scripts": {
"test": "xo && ava && tsd"
},
"files": [
"index.js",
"index.d.ts"
],
"keywords": [
"map",
"object",
"key",
"keys",
"value",
"values",
"iterate",
"iterator",
"rename",
"modify",
"deep",
"recurse",
"recursive"
],
"devDependencies": {
"ava": "^2.0.0",
"tsd": "^0.14.0",
"xo": "^0.24.0"
}
}
@@ -0,0 +1,8 @@
var $f9b672d9b82fa3d6$exports = {};
$f9b672d9b82fa3d6$exports = {
"longPressMessage": `\u{AE38}\u{AC8C} \u{B204}\u{B974}\u{AC70}\u{B098} Alt + \u{C544}\u{B798}\u{CABD} \u{D654}\u{C0B4}\u{D45C}\u{B97C} \u{B20C}\u{B7EC} \u{BA54}\u{B274} \u{C5F4}\u{AE30}`
};
export {$f9b672d9b82fa3d6$exports as default};
//# sourceMappingURL=ko-KR.module.js.map
@@ -0,0 +1,21 @@
The MIT License
Copyright (c) 2017 Sergey Rubanov (https://github.com/chicoxyzzy)
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,199 @@
'use strict';
var utils = require('../utils.js');
var astUtils = require('@typescript-eslint/utils/ast-utils');
require('eslint-visitor-keys');
require('espree');
require('estraverse');
function isFunctionBody(node) {
const parent = node.parent;
return node.type === "BlockStatement" && utils.isFunction(parent) && parent.body === node;
}
var _baseRule = utils.createRule({
name: "space-before-blocks",
package: "js",
meta: {
type: "layout",
docs: {
description: "Enforce consistent spacing before blocks"
},
fixable: "whitespace",
schema: [
{
oneOf: [
{
type: "string",
enum: ["always", "never"]
},
{
type: "object",
properties: {
keywords: {
type: "string",
enum: ["always", "never", "off"]
},
functions: {
type: "string",
enum: ["always", "never", "off"]
},
classes: {
type: "string",
enum: ["always", "never", "off"]
}
},
additionalProperties: false
}
]
}
],
messages: {
unexpectedSpace: "Unexpected space before opening brace.",
missingSpace: "Missing space before opening brace."
}
},
create(context) {
const config = context.options[0];
const sourceCode = context.sourceCode;
let alwaysFunctions = true;
let alwaysKeywords = true;
let alwaysClasses = true;
let neverFunctions = false;
let neverKeywords = false;
let neverClasses = false;
if (typeof config === "object") {
alwaysFunctions = config.functions === "always";
alwaysKeywords = config.keywords === "always";
alwaysClasses = config.classes === "always";
neverFunctions = config.functions === "never";
neverKeywords = config.keywords === "never";
neverClasses = config.classes === "never";
} else if (config === "never") {
alwaysFunctions = false;
alwaysKeywords = false;
alwaysClasses = false;
neverFunctions = true;
neverKeywords = true;
neverClasses = true;
}
function isConflicted(precedingToken, node) {
return utils.isArrowToken(precedingToken) || utils.isKeywordToken(precedingToken) && !isFunctionBody(node) || utils.isColonToken(precedingToken) && "parent" in node && node.parent && node.parent.type === "SwitchCase" && precedingToken === utils.getSwitchCaseColonToken(node.parent, sourceCode);
}
function checkPrecedingSpace(node) {
const precedingToken = sourceCode.getTokenBefore(node);
if (precedingToken && !isConflicted(precedingToken, node) && utils.isTokenOnSameLine(precedingToken, node)) {
const hasSpace = sourceCode.isSpaceBetweenTokens(precedingToken, node);
let requireSpace;
let requireNoSpace;
if (isFunctionBody(node)) {
requireSpace = alwaysFunctions;
requireNoSpace = neverFunctions;
} else if (node.type === "ClassBody") {
requireSpace = alwaysClasses;
requireNoSpace = neverClasses;
} else {
requireSpace = alwaysKeywords;
requireNoSpace = neverKeywords;
}
if (requireSpace && !hasSpace) {
context.report({
node,
messageId: "missingSpace",
fix(fixer) {
return fixer.insertTextBefore(node, " ");
}
});
} else if (requireNoSpace && hasSpace) {
context.report({
node,
messageId: "unexpectedSpace",
fix(fixer) {
return fixer.removeRange([precedingToken.range[1], node.range[0]]);
}
});
}
}
}
function checkSpaceBeforeCaseBlock(node) {
const cases = node.cases;
let openingBrace;
if (cases.length > 0)
openingBrace = sourceCode.getTokenBefore(cases[0]);
else
openingBrace = sourceCode.getLastToken(node, 1);
checkPrecedingSpace(openingBrace);
}
return {
BlockStatement: checkPrecedingSpace,
ClassBody: checkPrecedingSpace,
SwitchStatement: checkSpaceBeforeCaseBlock
};
}
});
const baseRule = /* @__PURE__ */ utils.castRuleModule(_baseRule);
var spaceBeforeBlocks = utils.createRule({
name: "space-before-blocks",
package: "ts",
meta: {
type: "layout",
docs: {
description: "Enforce consistent spacing before blocks"
},
fixable: baseRule.meta.fixable,
hasSuggestions: baseRule.meta.hasSuggestions,
schema: baseRule.meta.schema,
messages: baseRule.meta.messages
},
defaultOptions: ["always"],
create(context, [config]) {
const rules = baseRule.create(context);
const sourceCode = context.sourceCode;
let requireSpace = true;
if (typeof config === "object")
requireSpace = config.classes === "always";
else if (config === "never")
requireSpace = false;
function checkPrecedingSpace(node) {
const precedingToken = sourceCode.getTokenBefore(node);
if (precedingToken && astUtils.isTokenOnSameLine(precedingToken, node)) {
const hasSpace = sourceCode.isSpaceBetween(
precedingToken,
node
);
if (requireSpace && !hasSpace) {
context.report({
node,
messageId: "missingSpace",
fix(fixer) {
return fixer.insertTextBefore(node, " ");
}
});
} else if (!requireSpace && hasSpace) {
context.report({
node,
messageId: "unexpectedSpace",
fix(fixer) {
return fixer.removeRange([
precedingToken.range[1],
node.range[0]
]);
}
});
}
}
}
function checkSpaceAfterEnum(node) {
const punctuator = sourceCode.getTokenAfter(node.id);
if (punctuator)
checkPrecedingSpace(punctuator);
}
return {
...rules,
TSEnumDeclaration: checkSpaceAfterEnum,
TSInterfaceBody: checkPrecedingSpace
};
}
});
module.exports = spaceBeforeBlocks;
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAIA,oDAAsC;AAEtC,SAAS,oBAAoB,CAC5B,IAAyD;IAEzD,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;AAClC,CAAC;AAED,WAAU,oBAAoB;IAmBhB,mCAAc,GAAG,eAAe,CAAC;IAE9C,oBAAoB,CAAC,SAAS,GAAG,eAAe,CAAC,SAAS,CAAC;AAC5D,CAAC,EAtBS,oBAAoB,KAApB,oBAAoB,QAsB7B;AAED,iBAAS,oBAAoB,CAAC"}
@@ -0,0 +1 @@
{"mappings":"AAcA,aAAoB,CAAC,IAAI;IACvB,CAAC,UAAS,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC9B,CAAC;ACiDF;;;GAGG;AACH,8BAA+B,YAAW,QAAQ;IAChD,UAAU,SAAa;IAEvB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY;IA0BvC,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM;IAI1C,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM;IAK7C,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM;IAI9C,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM;IAK5C,aAAa,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM;IAI5C,OAAO;IAIP,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO;IAI5C,WAAW,CAAC,IAAI,EAAE,QAAQ,eAAe,CAAC;CAM3C;AErHD,iBAAiB,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAEjE,wGAAwG;AACxG,0BAA0B,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAG7D;AAED,4GAA4G;AAC5G,4BAA4B,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAM/D;AAED,2GAA2G;AAC3G,2BAA2B,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAK9D;AAED,kGAAkG;AAClG,2BAA2B,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAE9D;AAED,oGAAoG;AACpG,6BAA6B,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAIhE;AAED,mGAAmG;AACnG,4BAA4B,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,OAAO,CAI/D;AAED,gEAAgE;AAChE,wBAAwB,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAElE;AAED;;;;GAIG;AACH,6BAA6B,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAWpE;AAED,uDAAuD;AACvD,oBAAoB,QAAQ,EAAE,MAAM,GAAG,aAAa,CAEnD;AAED,mDAAmD;AACnD,sBAAsB,QAAQ,EAAE,MAAM,GAAG,YAAY,CAEpD;AAcD;;;GAGG;AACH,8BAA8B,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKvE;AAID,6DAA6D;AAC7D,oCAAoC,MAAM,CAOzC;AAED,8DAA8D;AAC9D,6BAA6B,IAAI,EAAE,aAAa,GAAG,aAAa,CAAC;AACjE,6BAA6B,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;AACvE,6BAA6B,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC;AAC/D,6BAA6B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;AAMzD,6DAA6D;AAC7D,2BAA2B,IAAI,EAAE,aAAa,GAAG,aAAa,CAAC;AAC/D,2BAA2B,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;AACrE,2BAA2B,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC;AAC7D,2BAA2B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;AAKvD,4DAA4D;AAC5D,4BAA4B,IAAI,EAAE,aAAa,GAAG,aAAa,CAAC;AAChE,4BAA4B,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;AACtE,4BAA4B,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC;AAC9D,4BAA4B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;AAKxD,2DAA2D;AAC3D,0BAA0B,IAAI,EAAE,aAAa,GAAG,aAAa,CAAC;AAC9D,0BAA0B,IAAI,EAAE,gBAAgB,GAAG,gBAAgB,CAAC;AACpE,0BAA0B,IAAI,EAAE,YAAY,GAAG,YAAY,CAAC;AAC5D,0BAA0B,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;AAKtD,sCAAsC,IAAI,EAAE,eAAe,UAM1D;AAED,qCAAqC,IAAI,EAAE,eAAe,UAMzD;AAED,wEAAwE;AACxE,4BAA4B,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAAC;AAChF,4BAA4B,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC;AACtF,4BAA4B,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;AAC9E,4BAA4B,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;AAMxE,uEAAuE;AACvE,0BAA0B,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,aAAa,CAAC;AAC9E,0BAA0B,IAAI,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC;AACpF,0BAA0B,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,CAAC;AAC5E,0BAA0B,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;AAsCtE,iEAAiE;AACjE,gCAAgC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGvE;AAED,oDAAoD;AACpD,wBAAwB,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAMtH;AAED,qDAAqD;AACrD,wBAAwB,CAAC,SAAS,SAAS,EAAE,CAAC,SAAS,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,SAAS,CAMtH;AAsBD,0EAA0E;AAC1E,0BAA0B,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAelE;AAED,0EAA0E;AAC1E,0BAA0B,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAElE;AC5HD;;GAEG;AACH,6BAA6B,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,CAYxE;AAED;;GAEG;AACH,yBAAyB,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,CAEpE;AAMD,mHAAmH;AACnH,+BAA+B,QAAQ,EAAE,eAAe,GAAG,YAAY,CAEtE;AAoBD;;;GAGG;AACH,mCAAmC,IAAI,EAAE,YAAY,GAAG,gBAAgB,GAAG,aAAa,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,gBAAgB,CAuB1H;AAED,4EAA4E;AAC5E,uBAAuB,QAAQ,EAAE,gBAAgB,GAAG,aAAa,GAAG,IAAI,CAEvE;AAED,2DAA2D;AAC3D,2BAA2B,CAAC,SAAS,eAAe,EAAE,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,CAAC,CAcpF;AAED;;;GAGG;AACH,wBAAwB,IAAI,EAAE,YAAY,GAAG,gBAAgB,GAAG,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,aAAa,CAW/I;AAOD,gEAAgE;AAChE,2BAA2B,IAAI,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,CAG/E;AAED,0EAA0E;AAC1E,gCAAgC,IAAI,EAAE,aAAa,GAAG,aAAa,CAElE;AEvRD,sCAAsC;AACtC,0BAA0B,KAAK,EAAE,MAAM,GAAG,IAAI,CAY7C;AAED,+DAA+D;AAC/D,0BAA0B,KAAK,EAAE,MAAM,GAAG,YAAY,CAcrD;AAED,kEAAkE;AAClE,8BAA8B,KAAK,EAAE,MAAM,GAAG,gBAAgB,CAsB7D;AAED;;;;;GAKG;AACH,mCAAmC,KAAK,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,aAAa,CA0ChG;AAED;;;GAGG;AACH,8BAA8B,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,aAAa,CA6B5E;AAED;;;GAGG;AACH,qCAAqC,KAAK,EAAE,MAAM,GAAG,aAAa,CAEjE;AA6CD;;;;GAIG;AACH,8BAA8B,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CA4DvE;ACxPD,kGAAkG;AAClG;;IAME,qEAAqE;IACrE,SAAgB,QAAQ,EAAE,QAAQ,CAAC;IACnC,yDAAyD;IACzD,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,4CAA4C;IAC5C,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B;;;;OAIG;IACH,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,SAAgB,GAAG,EAAE,MAAM,CAAC;gBAEhB,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;gBACxC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;gBACrD,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;gBAC5D,QAAQ,EAAE,QLine truncated
Loaded 100 of 35554 files, more files were not shown because too many files have changed in this diff. Show more