docs: 仓库链接指向本镜像仓库
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run

This commit is contained in:
TanTan committed 2026-11-13 09:27:07 +08:00
1 parent fa9c73363d
commit 2a69b23b47
18210 files changed
+5101211 -16

No files matched your search

@@ -0,0 +1 @@
{"version":3,"file":"tsrScript.cjs","names":[],"sources":["../../../src/ssr/tsrScript.ts?script-string"],"sourcesContent":["self.$_TSR = {\n h() {\n this.hydrated = true\n this.c()\n },\n e() {\n this.streamEnded = true\n this.c()\n },\n c() {\n if (this.hydrated && this.streamEnded) {\n delete self.$_TSR\n delete self.$R['tsr']\n }\n },\n p(script) {\n !this.initialized ? this.buffer.push(script) : script()\n },\n buffer: [],\n}\n"],"mappings":";AAAA,IAAA,oBAAa"}
@@ -0,0 +1,91 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v1.1.0](https://github.com/inspect-js/has-symbols/compare/v1.0.3...v1.1.0) - 2024-12-02
### Commits
- [actions] update workflows [`548c0bf`](https://github.com/inspect-js/has-symbols/commit/548c0bf8c9b1235458df7a1c0490b0064647a282)
- [actions] further shard; update action deps [`bec56bb`](https://github.com/inspect-js/has-symbols/commit/bec56bb0fb44b43a786686b944875a3175cf3ff3)
- [meta] use `npmignore` to autogenerate an npmignore file [`ac81032`](https://github.com/inspect-js/has-symbols/commit/ac81032809157e0a079e5264e9ce9b6f1275777e)
- [New] add types [`6469cbf`](https://github.com/inspect-js/has-symbols/commit/6469cbff1866cfe367b2b3d181d9296ec14b2a3d)
- [actions] update rebase action to use reusable workflow [`9c9d4d0`](https://github.com/inspect-js/has-symbols/commit/9c9d4d0d8938e4b267acdf8e421f4e92d1716d72)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`adb5887`](https://github.com/inspect-js/has-symbols/commit/adb5887ca9444849b08beb5caaa9e1d42320cdfb)
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`13ec198`](https://github.com/inspect-js/has-symbols/commit/13ec198ec80f1993a87710af1606a1970b22c7cb)
- [Dev Deps] update `auto-changelog`, `core-js`, `tape` [`941be52`](https://github.com/inspect-js/has-symbols/commit/941be5248387cab1da72509b22acf3fdb223f057)
- [Tests] replace `aud` with `npm audit` [`74f49e9`](https://github.com/inspect-js/has-symbols/commit/74f49e9a9d17a443020784234a1c53ce765b3559)
- [Dev Deps] update `npmignore` [`9c0ac04`](https://github.com/inspect-js/has-symbols/commit/9c0ac0452a834f4c2a4b54044f2d6a89f17e9a70)
- [Dev Deps] add missing peer dep [`52337a5`](https://github.com/inspect-js/has-symbols/commit/52337a5621cced61f846f2afdab7707a8132cc12)
## [v1.0.3](https://github.com/inspect-js/has-symbols/compare/v1.0.2...v1.0.3) - 2022-03-01
### Commits
- [actions] use `node/install` instead of `node/run`; use `codecov` action [`518b28f`](https://github.com/inspect-js/has-symbols/commit/518b28f6c5a516cbccae30794e40aa9f738b1693)
- [meta] add `bugs` and `homepage` fields; reorder package.json [`c480b13`](https://github.com/inspect-js/has-symbols/commit/c480b13fd6802b557e1cef9749872cb5fdeef744)
- [actions] reuse common workflows [`01d0ee0`](https://github.com/inspect-js/has-symbols/commit/01d0ee0a8d97c0947f5edb73eb722027a77b2b07)
- [actions] update codecov uploader [`6424ebe`](https://github.com/inspect-js/has-symbols/commit/6424ebe86b2c9c7c3d2e9bd4413a4e4f168cb275)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`dfa7e7f`](https://github.com/inspect-js/has-symbols/commit/dfa7e7ff38b594645d8c8222aab895157fa7e282)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `tape` [`0c8d436`](https://github.com/inspect-js/has-symbols/commit/0c8d43685c45189cea9018191d4fd7eca91c9d02)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`9026554`](https://github.com/inspect-js/has-symbols/commit/902655442a1bf88e72b42345494ef0c60f5d36ab)
- [readme] add actions and codecov badges [`eaa9682`](https://github.com/inspect-js/has-symbols/commit/eaa9682f990f481d3acf7a1c7600bec36f7b3adc)
- [Dev Deps] update `eslint`, `tape` [`bc7a3ba`](https://github.com/inspect-js/has-symbols/commit/bc7a3ba46f27b7743f8a2579732d59d1b9ac791e)
- [Dev Deps] update `eslint`, `auto-changelog` [`0ace00a`](https://github.com/inspect-js/has-symbols/commit/0ace00af08a88cdd1e6ce0d60357d941c60c2d9f)
- [meta] use `prepublishOnly` script for npm 7+ [`093f72b`](https://github.com/inspect-js/has-symbols/commit/093f72bc2b0ed00c781f444922a5034257bf561d)
- [Tests] test on all 16 minors [`9b80d3d`](https://github.com/inspect-js/has-symbols/commit/9b80d3d9102529f04c20ec5b1fcc6e38426c6b03)
## [v1.0.2](https://github.com/inspect-js/has-symbols/compare/v1.0.1...v1.0.2) - 2021-02-27
### Fixed
- [Fix] use a universal way to get the original Symbol [`#11`](https://github.com/inspect-js/has-symbols/issues/11)
### Commits
- [Tests] migrate tests to Github Actions [`90ae798`](https://github.com/inspect-js/has-symbols/commit/90ae79820bdfe7bc703d67f5f3c5e205f98556d3)
- [meta] do not publish github action workflow files [`29e60a1`](https://github.com/inspect-js/has-symbols/commit/29e60a1b7c25c7f1acf7acff4a9320d0d10c49b4)
- [Tests] run `nyc` on all tests [`8476b91`](https://github.com/inspect-js/has-symbols/commit/8476b915650d360915abe2522505abf4b0e8f0ae)
- [readme] fix repo URLs, remove defunct badges [`126288e`](https://github.com/inspect-js/has-symbols/commit/126288ecc1797c0a40247a6b78bcb2e0bc5d7036)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `core-js`, `get-own-property-symbols` [`d84bdfa`](https://github.com/inspect-js/has-symbols/commit/d84bdfa48ac5188abbb4904b42614cd6c030940a)
- [Tests] fix linting errors [`0df3070`](https://github.com/inspect-js/has-symbols/commit/0df3070b981b6c9f2ee530c09189a7f5c6def839)
- [actions] add "Allow Edits" workflow [`1e6bc29`](https://github.com/inspect-js/has-symbols/commit/1e6bc29b188f32b9648657b07eda08504be5aa9c)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `tape` [`36cea2a`](https://github.com/inspect-js/has-symbols/commit/36cea2addd4e6ec435f35a2656b4e9ef82498e9b)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1278338`](https://github.com/inspect-js/has-symbols/commit/127833801865fbc2cc8979beb9ca869c7bfe8222)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`1493254`](https://github.com/inspect-js/has-symbols/commit/1493254eda13db5fb8fc5e4a3e8324b3d196029d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js` [`b090bf2`](https://github.com/inspect-js/has-symbols/commit/b090bf214d3679a30edc1e2d729d466ab5183e1d)
- [actions] switch Automatic Rebase workflow to `pull_request_target` event [`4addb7a`](https://github.com/inspect-js/has-symbols/commit/4addb7ab4dc73f927ae99928d68817554fc21dc0)
- [Dev Deps] update `auto-changelog`, `tape` [`81d0baf`](https://github.com/inspect-js/has-symbols/commit/81d0baf3816096a89a8558e8043895f7a7d10d8b)
- [Dev Deps] update `auto-changelog`; add `aud` [`1a4e561`](https://github.com/inspect-js/has-symbols/commit/1a4e5612c25d91c3a03d509721d02630bc4fe3da)
- [readme] remove unused testling URLs [`3000941`](https://github.com/inspect-js/has-symbols/commit/3000941f958046e923ed8152edb1ef4a599e6fcc)
- [Tests] only audit prod deps [`692e974`](https://github.com/inspect-js/has-symbols/commit/692e9743c912410e9440207631a643a34b4741a1)
- [Dev Deps] update `@ljharb/eslint-config` [`51c946c`](https://github.com/inspect-js/has-symbols/commit/51c946c7f6baa793ec5390bb5a45cdce16b4ba76)
## [v1.0.1](https://github.com/inspect-js/has-symbols/compare/v1.0.0...v1.0.1) - 2019-11-16
### Commits
- [Tests] use shared travis-ci configs [`ce396c9`](https://github.com/inspect-js/has-symbols/commit/ce396c9419ff11c43d0da5d05cdbb79f7fb42229)
- [Tests] up to `node` `v12.4`, `v11.15`, `v10.15`, `v9.11`, `v8.15`, `v7.10`, `v6.17`, `v4.9`; use `nvm install-latest-npm` [`0690732`](https://github.com/inspect-js/has-symbols/commit/0690732801f47ab429f39ba1962f522d5c462d6b)
- [meta] add `auto-changelog` [`2163d0b`](https://github.com/inspect-js/has-symbols/commit/2163d0b7f36343076b8f947cd1667dd1750f26fc)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `core-js`, `safe-publish-latest`, `tape` [`8e0951f`](https://github.com/inspect-js/has-symbols/commit/8e0951f1a7a2e52068222b7bb73511761e6e4d9c)
- [actions] add automatic rebasing / merge commit blocking [`b09cdb7`](https://github.com/inspect-js/has-symbols/commit/b09cdb7cd7ee39e7a769878f56e2d6066f5ccd1d)
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `safe-publish-latest`, `core-js`, `get-own-property-symbols`, `tape` [`1dd42cd`](https://github.com/inspect-js/has-symbols/commit/1dd42cd86183ed0c50f99b1062345c458babca91)
- [meta] create FUNDING.yml [`aa57a17`](https://github.com/inspect-js/has-symbols/commit/aa57a17b19708906d1927f821ea8e73394d84ca4)
- Only apps should have lockfiles [`a2d8bea`](https://github.com/inspect-js/has-symbols/commit/a2d8bea23a97d15c09eaf60f5b107fcf9a4d57aa)
- [Tests] use `npx aud` instead of `nsp` or `npm audit` with hoops [`9e96cb7`](https://github.com/inspect-js/has-symbols/commit/9e96cb783746cbed0c10ef78e599a8eaa7ebe193)
- [meta] add `funding` field [`a0b32cf`](https://github.com/inspect-js/has-symbols/commit/a0b32cf68e803f963c1639b6d47b0a9d6440bab0)
- [Dev Deps] update `safe-publish-latest` [`cb9f0a5`](https://github.com/inspect-js/has-symbols/commit/cb9f0a521a3a1790f1064d437edd33bb6c3d6af0)
## v1.0.0 - 2016-09-19
### Commits
- Tests. [`ecb6eb9`](https://github.com/inspect-js/has-symbols/commit/ecb6eb934e4883137f3f93b965ba5e0a98df430d)
- package.json [`88a337c`](https://github.com/inspect-js/has-symbols/commit/88a337cee0864a0da35f5d19e69ff0ef0150e46a)
- Initial commit [`42e1e55`](https://github.com/inspect-js/has-symbols/commit/42e1e5502536a2b8ac529c9443984acd14836b1c)
- Initial implementation. [`33f5cc6`](https://github.com/inspect-js/has-symbols/commit/33f5cc6cdff86e2194b081ee842bfdc63caf43fb)
- read me [`01f1170`](https://github.com/inspect-js/has-symbols/commit/01f1170188ff7cb1558aa297f6ba5b516c6d7b0c)
@@ -0,0 +1,169 @@
"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(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
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 index_exports = {};
__export(index_exports, {
useControllableState: () => useControllableState,
useControllableStateReducer: () => useControllableStateReducer
});
module.exports = __toCommonJS(index_exports);
// src/use-controllable-state.tsx
var React = __toESM(require("react"));
var import_react_use_layout_effect = require("@radix-ui/react-use-layout-effect");
var useInsertionEffect = React[" useInsertionEffect ".trim().toString()] || import_react_use_layout_effect.useLayoutEffect;
function useControllableState({
prop,
defaultProp,
onChange = () => {
},
caller
}) {
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({
defaultProp,
onChange
});
const isControlled = prop !== void 0;
const value = isControlled ? prop : uncontrolledProp;
if (true) {
const isControlledRef = React.useRef(prop !== void 0);
React.useEffect(() => {
const wasControlled = isControlledRef.current;
if (wasControlled !== isControlled) {
const from = wasControlled ? "controlled" : "uncontrolled";
const to = isControlled ? "controlled" : "uncontrolled";
console.warn(
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
);
}
isControlledRef.current = isControlled;
}, [isControlled, caller]);
}
const setValue = React.useCallback(
(nextValue) => {
if (isControlled) {
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
if (value2 !== prop) {
onChangeRef.current?.(value2);
}
} else {
setUncontrolledProp(nextValue);
}
},
[isControlled, prop, setUncontrolledProp, onChangeRef]
);
return [value, setValue];
}
function useUncontrolledState({
defaultProp,
onChange
}) {
const [value, setValue] = React.useState(defaultProp);
const prevValueRef = React.useRef(value);
const onChangeRef = React.useRef(onChange);
useInsertionEffect(() => {
onChangeRef.current = onChange;
}, [onChange]);
React.useEffect(() => {
if (prevValueRef.current !== value) {
onChangeRef.current?.(value);
prevValueRef.current = value;
}
}, [value, prevValueRef]);
return [value, setValue, onChangeRef];
}
function isFunction(value) {
return typeof value === "function";
}
// src/use-controllable-state-reducer.tsx
var React2 = __toESM(require("react"));
var import_react_use_effect_event = require("@radix-ui/react-use-effect-event");
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
function useControllableStateReducer(reducer, userArgs, initialArg, init) {
const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;
const isControlled = controlledState !== void 0;
const onChange = (0, import_react_use_effect_event.useEffectEvent)(onChangeProp);
if (true) {
const isControlledRef = React2.useRef(controlledState !== void 0);
React2.useEffect(() => {
const wasControlled = isControlledRef.current;
if (wasControlled !== isControlled) {
const from = wasControlled ? "controlled" : "uncontrolled";
const to = isControlled ? "controlled" : "uncontrolled";
console.warn(
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
);
}
isControlledRef.current = isControlled;
}, [isControlled, caller]);
}
const args = [{ ...initialArg, state: defaultProp }];
if (init) {
args.push(init);
}
const [internalState, dispatch] = React2.useReducer(
(state2, action) => {
if (action.type === SYNC_STATE) {
return { ...state2, state: action.state };
}
const next = reducer(state2, action);
if (isControlled && !Object.is(next.state, state2.state)) {
onChange(next.state);
}
return next;
},
...args
);
const uncontrolledState = internalState.state;
const prevValueRef = React2.useRef(uncontrolledState);
React2.useEffect(() => {
if (prevValueRef.current !== uncontrolledState) {
prevValueRef.current = uncontrolledState;
if (!isControlled) {
onChange(uncontrolledState);
}
}
}, [onChange, uncontrolledState, prevValueRef, isControlled]);
const state = React2.useMemo(() => {
const isControlled2 = controlledState !== void 0;
if (isControlled2) {
return { ...internalState, state: controlledState };
}
return internalState;
}, [internalState, controlledState]);
React2.useEffect(() => {
if (isControlled && !Object.is(controlledState, internalState.state)) {
dispatch({ type: SYNC_STATE, state: controlledState });
}
}, [controlledState, internalState.state, isControlled]);
return [state, dispatch];
}
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"get-as-type.mjs","sources":["../../../../../src/value/types/utils/get-as-type.ts"],"sourcesContent":["import { ValueType } from \"../types\"\n\n/**\n * Provided a value and a ValueType, returns the value as that value type.\n */\nexport const getValueAsType = (value: any, type?: ValueType) => {\n return type && typeof value === \"number\"\n ? (type as any).transform(value)\n : value\n}\n"],"names":[],"mappings":"AAEA;;AAEG;MACU,cAAc,GAAG,CAAC,KAAU,EAAE,IAAgB,KAAI;AAC3D,IAAA,OAAO,IAAI,IAAI,OAAO,KAAK,KAAK;AAC5B,UAAG,IAAY,CAAC,SAAS,CAAC,KAAK;UAC7B,KAAK;AACf;;;;"}
@@ -0,0 +1,263 @@
/**
* Module dependencies.
*/
const tty = require('tty');
const util = require('util');
/**
* This is the Node.js implementation of `debug()`.
*/
exports.init = init;
exports.log = log;
exports.formatArgs = formatArgs;
exports.save = save;
exports.load = load;
exports.useColors = useColors;
exports.destroy = util.deprecate(
() => {},
'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'
);
/**
* Colors.
*/
exports.colors = [6, 2, 3, 4, 5, 1];
try {
// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)
// eslint-disable-next-line import/no-extraneous-dependencies
const supportsColor = require('supports-color');
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
exports.colors = [
20,
21,
26,
27,
32,
33,
38,
39,
40,
41,
42,
43,
44,
45,
56,
57,
62,
63,
68,
69,
74,
75,
76,
77,
78,
79,
80,
81,
92,
93,
98,
99,
112,
113,
128,
129,
134,
135,
148,
149,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
178,
179,
184,
185,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
214,
215,
220,
221
];
}
} catch (error) {
// Swallow - we only care if `supports-color` is available; it doesn't have to be.
}
/**
* Build up the default `inspectOpts` object from the environment variables.
*
* $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js
*/
exports.inspectOpts = Object.keys(process.env).filter(key => {
return /^debug_/i.test(key);
}).reduce((obj, key) => {
// Camel-case
const prop = key
.substring(6)
.toLowerCase()
.replace(/_([a-z])/g, (_, k) => {
return k.toUpperCase();
});
// Coerce string value into JS value
let val = process.env[key];
if (/^(yes|on|true|enabled)$/i.test(val)) {
val = true;
} else if (/^(no|off|false|disabled)$/i.test(val)) {
val = false;
} else if (val === 'null') {
val = null;
} else {
val = Number(val);
}
obj[prop] = val;
return obj;
}, {});
/**
* Is stdout a TTY? Colored output is enabled when `true`.
*/
function useColors() {
return 'colors' in exports.inspectOpts ?
Boolean(exports.inspectOpts.colors) :
tty.isatty(process.stderr.fd);
}
/**
* Adds ANSI color escape codes if enabled.
*
* @api public
*/
function formatArgs(args) {
const {namespace: name, useColors} = this;
if (useColors) {
const c = this.color;
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
const prefix = ` ${colorCode};1m${name} \u001B[0m`;
args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
} else {
args[0] = getDate() + name + ' ' + args[0];
}
}
function getDate() {
if (exports.inspectOpts.hideDate) {
return '';
}
return new Date().toISOString() + ' ';
}
/**
* Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.
*/
function log(...args) {
return process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\n');
}
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
/**
* Load `namespaces`.
*
* @return {String} returns the previously persisted debug modes
* @api private
*/
function load() {
return process.env.DEBUG;
}
/**
* Init logic for `debug` instances.
*
* Create a new `inspectOpts` object in case `useColors` is set
* differently for a particular `debug` instance.
*/
function init(debug) {
debug.inspectOpts = {};
const keys = Object.keys(exports.inspectOpts);
for (let i = 0; i < keys.length; i++) {
debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
}
}
module.exports = require('./common')(exports);
const {formatters} = module.exports;
/**
* Map %o to `util.inspect()`, all on a single line.
*/
formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(str => str.trim())
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
*/
formatters.O = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts);
};
@@ -0,0 +1 @@
{"version":3,"file":"inertia.mjs","sources":["../../../../src/animation/generators/inertia.ts"],"sourcesContent":["import {\n AnimationState,\n KeyframeGenerator,\n ValueAnimationOptions,\n} from \"../types\"\nimport { spring as createSpring } from \"./spring\"\nimport { getGeneratorVelocity } from \"./utils/velocity\"\n\nexport function inertia({\n keyframes,\n velocity = 0.0,\n power = 0.8,\n timeConstant = 325,\n bounceDamping = 10,\n bounceStiffness = 500,\n modifyTarget,\n min,\n max,\n restDelta = 0.5,\n restSpeed,\n}: ValueAnimationOptions<number>): KeyframeGenerator<number> {\n const origin = keyframes[0]\n\n const state: AnimationState<number> = {\n done: false,\n value: origin,\n }\n\n const isOutOfBounds = (v: number) =>\n (min !== undefined && v < min) || (max !== undefined && v > max)\n\n const nearestBoundary = (v: number) => {\n if (min === undefined) return max\n if (max === undefined) return min\n\n return Math.abs(min - v) < Math.abs(max - v) ? min : max\n }\n\n let amplitude = power * velocity\n const ideal = origin + amplitude\n const target = modifyTarget === undefined ? ideal : modifyTarget(ideal)\n\n /**\n * If the target has changed we need to re-calculate the amplitude, otherwise\n * the animation will start from the wrong position.\n */\n if (target !== ideal) amplitude = target - origin\n\n const calcDelta = (t: number) => -amplitude * Math.exp(-t / timeConstant)\n\n const calcLatest = (t: number) => target + calcDelta(t)\n\n const applyFriction = (t: number) => {\n const delta = calcDelta(t)\n const latest = calcLatest(t)\n state.done = Math.abs(delta) <= restDelta\n state.value = state.done ? target : latest\n }\n\n /**\n * Ideally this would resolve for t in a stateless way, we could\n * do that by always precalculating the animation but as we know\n * this will be done anyway we can assume that spring will\n * be discovered during that.\n */\n let timeReachedBoundary: number | undefined\n let spring: KeyframeGenerator<number> | undefined\n\n const checkCatchBoundary = (t: number) => {\n if (!isOutOfBounds(state.value)) return\n\n timeReachedBoundary = t\n\n spring = createSpring({\n keyframes: [state.value, nearestBoundary(state.value)!],\n velocity: getGeneratorVelocity(calcLatest, t, state.value), // TODO: This should be passing * 1000\n damping: bounceDamping,\n stiffness: bounceStiffness,\n restDelta,\n restSpeed,\n })\n }\n\n checkCatchBoundary(0)\n\n return {\n calculatedDuration: null,\n next: (t: number) => {\n /**\n * We need to resolve the friction to figure out if we need a\n * spring but we don't want to do this twice per frame. So here\n * we flag if we updated for this frame and later if we did\n * we can skip doing it again.\n */\n let hasUpdatedFrame = false\n if (!spring && timeReachedBoundary === undefined) {\n hasUpdatedFrame = true\n applyFriction(t)\n checkCatchBoundary(t)\n }\n\n /**\n * If we have a spring and the provided t is beyond the moment the friction\n * animation crossed the min/max boundary, use the spring.\n */\n if (timeReachedBoundary !== undefined && t >= timeReachedBoundary) {\n return spring!.next(t - timeReachedBoundary)\n } else {\n !hasUpdatedFrame && applyFriction(t)\n return state\n }\n },\n }\n}\n"],"names":["spring","createSpring"],"mappings":";;;SAQgB,OAAO,CAAC,EACpB,SAAS,EACT,QAAQ,GAAG,GAAG,EACd,KAAK,GAAG,GAAG,EACX,YAAY,GAAG,GAAG,EAClB,aAAa,GAAG,EAAE,EAClB,eAAe,GAAG,GAAG,EACrB,YAAY,EACZ,GAAG,EACH,GAAG,EACH,SAAS,GAAG,GAAG,EACf,SAAS,GACmB,EAAA;AAC5B,IAAA,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC;AAE3B,IAAA,MAAM,KAAK,GAA2B;AAClC,QAAA,IAAI,EAAE,KAAK;AACX,QAAA,KAAK,EAAE,MAAM;KAChB;IAED,MAAM,aAAa,GAAG,CAAC,CAAS,KAC5B,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,GAAG,GAAG,MAAM,GAAG,KAAK,SAAS,IAAI,CAAC,GAAG,GAAG,CAAC;AAEpE,IAAA,MAAM,eAAe,GAAG,CAAC,CAAS,KAAI;QAClC,IAAI,GAAG,KAAK,SAAS;AAAE,YAAA,OAAO,GAAG;QACjC,IAAI,GAAG,KAAK,SAAS;AAAE,YAAA,OAAO,GAAG;QAEjC,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG;AAC5D,IAAA,CAAC;AAED,IAAA,IAAI,SAAS,GAAG,KAAK,GAAG,QAAQ;AAChC,IAAA,MAAM,KAAK,GAAG,MAAM,GAAG,SAAS;AAChC,IAAA,MAAM,MAAM,GAAG,YAAY,KAAK,SAAS,GAAG,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;AAEvE;;;AAGG;IACH,IAAI,MAAM,KAAK,KAAK;AAAE,QAAA,SAAS,GAAG,MAAM,GAAG,MAAM;AAEjD,IAAA,MAAM,SAAS,GAAG,CAAC,CAAS,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC;AAEzE,IAAA,MAAM,UAAU,GAAG,CAAC,CAAS,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC,CLine truncated
@@ -0,0 +1,29 @@
/*! *****************************************************************************
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,
MERCHANTABILITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
interface DateConstructor {
/**
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
* @param monthIndex The month as a number between 0 and 11 (January to December).
* @param date The date as a number between 1 and 31.
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
* @param ms A number from 0 to 999 that specifies the milliseconds.
*/
UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
}
@@ -0,0 +1,8 @@
'use strict'
const parse = require('./parse')
const clean = (version, options) => {
const s = parse(version.trim().replace(/^[=v]+/, ''), options)
return s ? s.version : null
}
module.exports = clean
@@ -0,0 +1,62 @@
import { decode, encode } from "./qss.js";
//#region src/searchParams.ts
/** Default `parseSearch` that strips leading '?' and JSON-parses values. */
const defaultParseSearch = parseSearchWith(JSON.parse);
/** Default `stringifySearch` using JSON.stringify for complex values. */
const defaultStringifySearch = stringifySearchWith(JSON.stringify, JSON.parse);
/**
* Build a `parseSearch` function using a provided JSON-like parser.
*
* The returned function strips a leading `?`, decodes values, and attempts to
* JSON-parse string values using the given `parser`.
*
* @param parser Function to parse a string value (e.g. `JSON.parse`).
* @returns A `parseSearch` function compatible with `Router` options.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization
*/
function parseSearchWith(parser) {
return (searchStr) => {
if (searchStr[0] === "?") searchStr = searchStr.substring(1);
const query = decode(searchStr);
for (const key in query) {
const value = query[key];
if (typeof value === "string") try {
query[key] = parser(value);
} catch (_err) {}
}
return query;
};
}
/**
* Build a `stringifySearch` function using a provided serializer.
*
* Non-primitive values are serialized with `stringify`. If a `parser` is
* supplied, string values that are parseable are re-serialized to ensure
* symmetry with `parseSearch`.
*
* @param stringify Function to serialize a value (e.g. `JSON.stringify`).
* @param parser Optional parser to detect parseable strings.
* @returns A `stringifySearch` function compatible with `Router` options.
* @link https://tanstack.com/router/latest/docs/framework/react/guide/custom-search-param-serialization
*/
function stringifySearchWith(stringify, parser) {
const hasParser = typeof parser === "function";
function stringifyValue(val) {
if (typeof val === "object" && val !== null) try {
return stringify(val);
} catch (_err) {}
else if (hasParser && typeof val === "string") try {
parser(val);
return stringify(val);
} catch (_err) {}
return val;
}
return (search) => {
const searchStr = encode(search, stringifyValue);
return searchStr ? `?${searchStr}` : "";
};
}
//#endregion
export { defaultParseSearch, defaultStringifySearch, parseSearchWith, stringifySearchWith };
//# sourceMappingURL=searchParams.js.map
@@ -0,0 +1,70 @@
"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.typeDeclaredInPackageDeclarationFile = typeDeclaredInPackageDeclarationFile;
const ts = __importStar(require("typescript"));
function findParentModuleDeclaration(node) {
switch (node.kind) {
case ts.SyntaxKind.ModuleDeclaration:
// "namespace x {...}" should be ignored here
if (node.flags & ts.NodeFlags.Namespace) {
break;
}
return ts.isStringLiteral(node.name)
? node
: undefined;
case ts.SyntaxKind.SourceFile:
return undefined;
}
return findParentModuleDeclaration(node.parent);
}
function typeDeclaredInDeclareModule(packageName, declarations) {
return declarations.some(declaration => findParentModuleDeclaration(declaration)?.name.text === packageName);
}
function typeDeclaredInDeclarationFile(packageName, declarationFiles, program) {
// Handle scoped packages: if the name starts with @, remove it and replace / with __
const typesPackageName = packageName.replace(/^@([^/]+)\//, '$1__');
const matcher = new RegExp(`${packageName}|${typesPackageName}`);
return declarationFiles.some(declaration => {
const packageIdName = program.sourceFileToPackageName.get(declaration.path);
return (packageIdName != null &&
matcher.test(packageIdName) &&
program.isSourceFileFromExternalLibrary(declaration));
});
}
function typeDeclaredInPackageDeclarationFile(packageName, declarations, declarationFiles, program) {
return (typeDeclaredInDeclareModule(packageName, declarations) ||
typeDeclaredInDeclarationFile(packageName, declarationFiles, program));
}
@@ -0,0 +1 @@
{"version":3,"file":"matching.cjs","sources":["../../../src/matcher/date/matching.ts"],"sourcesContent":[null],"names":["MatchDate","MatcherBaseClass","match","password","matches","getMatchesWithoutSeparator","getMatchesWithSeparator","filteredMatches","filterNoise","sorted","maybeDateWithSeparator","i","Math","abs","length","j","token","slice","regexMatch","exec","dmy","mapIntegersToDayMonthYear","parseInt","push","pattern","separator","year","month","day","maybeDateNoSeparator","metric","candidate","REFERENCE_YEAR","candidates","index","splittedDates","DATE_SPLITS","forEach","k","l","bestCandidate","minDistance","distance","filter","isSubmatch","matchesLength","o","otherMatch","integers","over12","over31","under1","len1","int","DATE_MIN_YEAR","DATE_MAX_YEAR","getDayMonth","possibleYearSplits","possibleYearSplitsLength","y","rest","dm","mapIntegersToDayMonth","twoToFourDigitYear","temp","reverse","data"],"mappings":";;;;;;AAWA;;;;AAIG;AACH,MAAMA,SAAU,SAAQC,sBAAgB,CAAA;AACtC;;;;;;;;;;;;;;;;;;;AAmBG;AACHC,EAAAA,KAAKA,CAAC;AAAEC,IAAAA;AAAQ,GAAoB,EAAA;AAClC,IAAA,MAAMC,OAAO,GAAgB,CAC3B,GAAG,IAAI,CAACC,0BAA0B,CAACF,QAAQ,CAAC,EAC5C,GAAG,IAAI,CAACG,uBAAuB,CAACH,QAAQ,CAAC,CAC1C;AAED,IAAA,MAAMI,eAAe,GAAG,IAAI,CAACC,WAAW,CAACJ,OAAO,CAAC;IACjD,OAAOK,aAAM,CAACF,eAAe,CAAC;AAChC,EAAA;EAEAD,uBAAuBA,CAACH,QAAgB,EAAA;IACtC,MAAMC,OAAO,GAAgB,EAAE;IAC/B,MAAMM,sBAAsB,GAAG,6CAA6C;AAC5E;IACA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIC,IAAI,CAACC,GAAG,CAACV,QAAQ,CAACW,MAAM,GAAG,CAAC,CAAC,EAAEH,CAAC,IAAI,CAAC,EAAE;AAC1D,MAAA,KAAK,IAAII,CAAC,GAAGJ,CAAC,GAAG,CAAC,EAAEI,CAAC,IAAIJ,CAAC,GAAG,CAAC,EAAEI,CAAC,IAAI,CAAC,EAAE;AACtC,QAAA,IAAIA,CAAC,IAAIZ,QAAQ,CAACW,MAAM,EAAE;AACxB,UAAA;AACF,QAAA;AACA,QAAA,MAAME,KAAK,GAAGb,QAAQ,CAACc,KAAK,CAACN,CAAC,EAAEI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;AAC7C,QAAA,MAAMG,UAAU,GAAGR,sBAAsB,CAACS,IAAI,CAACH,KAAK,CAAC;QACrD,IAAIE,UAAU,IAAI,IAAI,EAAE;AACtB,UAAA,MAAME,GAAG,GAAG,IAAI,CAACC,yBAAyB,CAAC,CACzCC,QAAQ,CAACJ,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAC3BI,QAAQ,CAACJ,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAC3BI,QAAQ,CAACJ,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAC5B,CAAC;UACF,IAAIE,GAAG,IAAI,IAAI,EAAE;YACfhB,OAAO,CAACmB,IAAI,CAAC;AACXC,cAAAA,OAAO,EAAE,MAAM;cACfR,KAAK;cACLL,CAAC;cACDI,CAAC;AACDU,cAAAA,SAAS,EAAEP,UAAU,CAAC,CAAC,CAAC;cACxBQ,IAAI,EAAEN,GAAG,CAACM,IAAI;cACdC,KAAK,EAAEP,GAAG,CAACO,KAAK;cAChBC,GAAG,EAAER,GAAG,CAACQ;AACV,aAAA,CAAC;AACJ,UAAA;AACF,QAAA;AACF,MAAA;AACF,IAAA;AACA,IAAA,OAAOxB,OAAO;AAChB,EAAA;AAEA;EACAC,0BAA0BA,CAACF,QAAgB,EAAA;IACzC,MAAMC,OAAO,GAAgB,EAAE;IAC/B,MAAMyB,oBAAoB,GAAG,WAAW;AACxC,IAAA,MAAMC,MAAM,GAAIC,SAAoB,IAClCnB,IAAI,CAACC,GAAG,CAACkB,SAAS,CAACL,IAAI,GAAGM,qBAAc,CAAC;AAC3C;IACA,KAAK,IAAIrB,CAAC,GAAG,CAAC,EAAEA,CAAC,IAAIC,IAAI,CAACC,GAAG,CAACV,QAAQ,CAACW,MAAM,GAAG,CAAC,CAAC,EAAEH,CAAC,IAAI,CAAC,EAAE;AAC1D,MAAA,KAAK,IAAII,CAAC,GAAGJ,CAAC,GAAG,CAAC,EAAEI,CAAC,IAAIJ,CAAC,GAAG,CAAC,EAAEI,CAAC,IAAI,CAAC,EAAE;AACtC,QAAA,IAAIA,CAAC,IAAIZ,QAAQ,CAACW,MAAM,EAAE;AACxB,UAAA;AACF,QAAA;AACA,QAAA,MAAME,KAAK,GAAGb,QAAQ,CAACc,KAAK,CAACN,CAAC,EAAEI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC;AAC7C,QAAA,IAAIc,oBAAoB,CAACV,IAAI,CAACH,KAAK,CAAC,EAAE;UACpC,MAAMiB,UAAU,GAAU,EAAE;AAC5B,UAAA,MAAMC,KAAK,GAAGlB,KAAK,CAACF,MAAM;AAC1B,UAAA,MAAMqB,aAAa,GAAGC,kBAAW,CAACF,KAAiC,CAAC;UACpEC,aAAa,CAACE,OAAO,CAAC,CAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,KAAI;YAC/B,MAAMnB,GAAG,GAAG,IAAI,CAACC,yBAAyB,CAAC,CACzCC,QAAQ,CAACN,KAAK,CAACC,KAAK,CAAC,CAAC,EAAEqB,CAAC,CAAC,EAAE,EAAE,CAAC,EAC/BhB,QAAQ,CAACN,KAAK,CAACC,KAAK,CAACqB,CAAC,EAAEC,CAAC,CAAC,EAAE,EAAE,CAAC,EAC/BjB,QAAQ,CAACN,KAAK,CAACC,KAAK,CAACsB,CAAC,CAAC,EAAE,EAAE,CAAC,CAC7B,CAAC;YACF,IAAInB,GAAG,IAAI,IAAI,EAAE;AACfa,cAAAA,UAAU,CAACV,IAAI,CAACH,GAAG,CAAC;AACtB,YAAA;AACF,UAAA,CAAC,CAAC;AACF,UAAA,IAAIa,UAAU,CAACnB,MAAM,GAAG,CAAC,EAAE;AACzB;;;;;;;;AAQG;AACH,YAAA,IAAI0B,aAAa,GAAGP,UAAU,CAAC,CAAC,CAAC;YACjC,IAAIQ,WAAW,GAAGX,MAAM,CAACG,UAAU,CAAC,CAAC,CAAC,CAAC;YACvCA,UAAU,CAAChB,KAAK,CAAC,CAAC,CAAC,CAACoB,OAAO,CAAEN,SAAS,IAAI;AACxC,cAAA,MAAMW,QAAQ,GAAGZ,MAAM,CAACC,SAAS,CAAC;cAClC,IAAIW,QAAQ,GAAGD,WAAW,EAAE;AAC1BD,gBAAAA,aAAa,GAAGT,SAAS;AACzBU,gBAAAA,WAAW,GAAGC,QAAQ;AACxB,cAAA;AACF,YAAA,CAAC,CAAC;YACFtC,OAAO,CAACmB,IAAI,CAAC;AACXC,cAAAA,OAAO,EAAE,MAAM;cACfR,KAAK;cACLL,CAAC;cACDI,CAAC;AACDU,cAAAA,SAAS,EAAE,EAAE;cACbC,IAAI,EAAEc,aAAa,CAACd,IAAI;cACxBC,KAAK,EAAEa,aAAa,CAACb,KAAK;cAC1BC,GAAG,EAAEY,aAAa,CAACZ;AACpB,aAAA,CAAC;AACJ,UAAA;AACF,QAAA;AACF,MAAA;AACF,IAAA;AACA,IAAA,OAAOxB,OAAO;AAChB,EAAA;AAEA;;;;;;;;AAQG;EACHI,WAAWA,CAACJ,OAAoB,EAAA;AAC9B,IAAA,OAAOA,OAAO,CAACuC,MAAM,CAAEzC,KAAK,IAAI;MAC9B,IAAI0C,UAAU,GAAG,KAAK;AACtB,MAAA,MAAMC,aAAa,GAAGzC,OAAO,CAACU,MAAM;AACpC,MAAA,KAAK,IAAIgC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGD,aAAa,EAAEC,CAAC,IAAI,CAAC,EAAE;AACzC,QAAA,MAAMC,UAAU,GAAG3C,OAAO,CAAC0C,CAAC,CAAC;QAC7B,IAAI5C,KAAK,KAAK6C,UAAU,EAAE;AACxB,UAAA,IAAIA,UAAU,CAACpC,CAAC,IAAIT,KAAK,CAACS,CAAC,IAAIoC,UAAU,CAAChC,CAAC,IAAIb,KAAK,CAACa,CAAC,EAAE;AACtD6B,YAAAA,UAAU,GAAG,IAAI;AACjB,YAAA;AACF,UAAA;AACF,QAAA;AACF,MAAA;AACA,MAAA,OAAO,CAACA,UAAU;AACpB,IAAA,CAAC,CAAC;AACJ,EAAA;AAEA;;;;;;;;;AASG;AACH;EACAvB,yBAAyBA,CAAC2B,Line truncated
@@ -0,0 +1 @@
{"version":3,"file":"bundle-mjs.mjs","sources":["../src/lib/utils.ts","../src/lib/class-group-utils.ts","../src/lib/lru-cache.ts","../src/lib/parse-class-name.ts","../src/lib/sort-modifiers.ts","../src/lib/config-utils.ts","../src/lib/merge-classlist.ts","../src/lib/tw-join.ts","../src/lib/create-tailwind-merge.ts","../src/lib/from-theme.ts","../src/lib/validators.ts","../src/lib/default-config.ts","../src/lib/merge-configs.ts","../src/lib/extend-tailwind-merge.ts","../src/lib/tw-merge.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":["concatArrays","array1","array2","combinedArray","Array","length","i","createClassValidatorObject","classGroupId","validator","createClassPartObject","nextPart","Map","validators","CLASS_PART_SEPARATOR","EMPTY_CONFLICTS","ARBITRARY_PROPERTY_PREFIX","createClassGroupUtils","config","classMap","createClassMap","conflictingClassGroups","conflictingClassGroupModifiers","getClassGroupId","className","startsWith","endsWith","getGroupIdForArbitraryProperty","classParts","split","startIndex","getGroupRecursive","getConflictingClassGroupIds","hasPostfixModifier","modifierConflicts","baseConflicts","classPartObject","classPathsLength","currentClassPart","nextClassPartObject","get","result","undefined","classRest","join","slice","validatorsLength","validatorObj","indexOf","content","colonIndex","property","theme","classGroups","processClassGroups","group","processClassesRecursively","classGroup","len","classDefinition","processClassDefinition","processStringDefinition","processFunctionDefinition","processObjectDefinition","classPartObjectToEdit","getPart","isThemeGetter","push","entries","Object","key","value","path","current","parts","part","next","set","func","createLruCache","maxCacheSize","cacheSize","cache","create","previousCache","update","IMPORTANT_MODIFIER","MODIFIER_SEPARATOR","EMPTY_MODIFIERS","createResultObject","modifiers","hasImportantModifier","baseClassName","maybePostfixModifierPosition","isExternal","createParseClassName","prefix","experimentalParseClassName","parseClassName","bracketDepth","parenDepth","modifierStart","postfixModifierPosition","index","currentCharacter","baseClassNameWithImportantModifier","fullPrefix","parseClassNameOriginal","createSortModifiers","modifierWeights","orderSensitiveModifiers","forEach","mod","currentSegment","modifier","isArbitrary","isOrderSensitive","has","sort","createConfigUtils","sortModifiers","SPLIT_CLASSES_REGEX","mergeClassList","classList","configUtils","classGroupsInConflict","classNames","trim","originalClassName","substring","variantModifier","modifierId","classId","conflictGroups","twJoin","classLists","argument","resolvedValue","string","toValue","mix","k","createTailwindMerge","createConfigFirst","createConfigRest","cacheGet","cacheSet","functionToCall","initTailwindMerge","reduce","previousConfig","createConfigCurrent","tailwindMerge","cachedResult","args","fallbackThemeArr","fromTheme","themeGetter","arbitraryValueRegex","arbitraryVariableRegex","fractionRegex","tshirtUnitRegex","lengthUnitRegex","colorFunctionRegex","shadowRegex","imageRegex","isFraction","test","isNumber","Number","isNaN","isInteger","isPercent","isTshirtSize","isAny","isLengthOnly","isNever","isShadow","isImage","isAnyNonArbitrary","isArbitraryValue","isArbitraryVariable","isArbitrarySize","getIsArbitraryValue","isLabelSize","isArbitraryLength","isLabelLength","isArbitraryNumber","isLabelNumber","isArbitraryWeight","isLabelWeight","isArbitraryFamilyName","isLabelFamilyName","isArbitraryPosition","isLabelPosition","isArbitraryImage","isLabelImage","isArbitraryShadow","isLabelShadow","isArbitraryVariableLength","getIsArbitraryVariable","isArbitraryVariableFamilyName","isArbitraryVariablePosition","isArbitraryVariableSize","isArbitraryVariableImage","isArbitraryVariableShadow","isArbitraryVariableWeight","testLabel","testValue","exec","shouldMatchNoLabel","label","getDefaultConfig","themeColor","themeFont","themeText","themeFontWeight","themeTracking","themeLeading","themeBreakpoint","themeContainer","themeSpacing","themeRadius","themeShadow","themeInsetShadow","themeTextShadow","themeDropShadow","themeBlur","themePerspective","themeAspect","themeEase","themeAnimate","scaleBreak","scalePosition","scalePositionWithArbitrary","scaleOverflow","scaleOverscroll","scaleUnambiguousSpacing","scaleInset","scaleGridTemplateColsRows","scaleGridColRowStartAndEnd","span","scaleGridColRowStartOrEnd","scaleGridAutoColsRows","scaleAlignPrimaryAxis","scaleAlignSecondaryAxis","scaleMargin","scaleSizing","scaleSizingInline","scaleSizingBlock","scaleColor","scaleBgPosition","position","scaleBgRepeat","repeat","scaleBgSize","size","scaleGradientStopPosition","scaleRadius","scaleBorderWidth","scaleLineStyle","scaleBlendMode","scaleMaskImagePosition","scaleBlur","scaleRotate","scaleScale","scaleSkew","scaleTranslate","animate","aspect","blur","breakpoint","color","container","ease","font","leading","perspective","raLine truncated
@@ -0,0 +1,93 @@
import { joinPaths, trimPath } from './path'
import type { LocationRewrite } from './router'
/** Compose multiple rewrite pairs into a single in/out rewrite. */
/** Compose multiple rewrite pairs into a single in/out rewrite. */
export function composeRewrites(rewrites: Array<LocationRewrite>) {
return {
input: ({ url }) => {
for (const rewrite of rewrites) {
url = executeRewriteInput(rewrite, url)
}
return url
},
output: ({ url }) => {
for (let i = rewrites.length - 1; i >= 0; i--) {
url = executeRewriteOutput(rewrites[i], url)
}
return url
},
} satisfies LocationRewrite
}
/** Create a rewrite pair that strips/adds a basepath on input/output. */
/** Create a rewrite pair that strips/adds a basepath on input/output. */
export function rewriteBasepath(opts: {
basepath: string
caseSensitive?: boolean
}) {
const trimmedBasepath = trimPath(opts.basepath)
const normalizedBasepath = `/${trimmedBasepath}`
const normalizedBasepathWithSlash = `${normalizedBasepath}/`
const checkBasepath = opts.caseSensitive
? normalizedBasepath
: normalizedBasepath.toLowerCase()
const checkBasepathWithSlash = opts.caseSensitive
? normalizedBasepathWithSlash
: normalizedBasepathWithSlash.toLowerCase()
return {
input: ({ url }) => {
const pathname = opts.caseSensitive
? url.pathname
: url.pathname.toLowerCase()
// Handle exact basepath match (e.g., /my-app -> /)
if (pathname === checkBasepath) {
url.pathname = '/'
} else if (pathname.startsWith(checkBasepathWithSlash)) {
// Handle basepath with trailing content (e.g., /my-app/users -> /users)
url.pathname = url.pathname.slice(normalizedBasepath.length)
}
return url
},
output: ({ url }) => {
url.pathname = joinPaths(['/', trimmedBasepath, url.pathname])
return url
},
} satisfies LocationRewrite
}
/** Execute a location input rewrite if provided. */
/** Execute a location input rewrite if provided. */
export function executeRewriteInput(
rewrite: LocationRewrite | undefined,
url: URL,
): URL {
const res = rewrite?.input?.({ url })
if (res) {
if (typeof res === 'string') {
return new URL(res)
} else if (res instanceof URL) {
return res
}
}
return url
}
/** Execute a location output rewrite if provided. */
/** Execute a location output rewrite if provided. */
export function executeRewriteOutput(
rewrite: LocationRewrite | undefined,
url: URL,
): URL {
const res = rewrite?.output?.({ url })
if (res) {
if (typeof res === 'string') {
return new URL(res)
} else if (res instanceof URL) {
return res
}
}
return url
}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"1":"_GI","2":"_aB","164":"_QC _vH","3138":"P","12292":"Q"},C:{"1":"_AM","2":"_g","260":"_IC _dU"},D:{"1":"_2G","164":"_QC _xG"},E:{"1":"_uC","2":"_e","164":"_FC _UD _dN"},F:{"1":"_OK","2":"_T","164":"_MC _7K"},G:{"1":"_7B","164":"_XE"},H:{"2":"1D"},I:{"1":"I","164":"_y","676":"_W"},J:{"164":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"164":"bC"},P:{"1":"_NB","164":"_JM"},Q:{"164":"JE"},R:{"164":"KE"},S:{"1":"ME","260":"LE"}},B:4,C:"CSS Masks",D:true};
@@ -0,0 +1 @@
{"version":3,"file":"elements.mjs","sources":["../../../../../src/render/components/motion/elements.ts"],"sourcesContent":["\"use client\"\n\nimport { createMotionComponentWithFeatures as createMotionComponent } from \"./create\"\n\n/**\n * HTML components\n */\nexport const MotionA = /*@__PURE__*/ createMotionComponent(\"a\")\nexport const MotionAbbr = /*@__PURE__*/ createMotionComponent(\"abbr\")\nexport const MotionAddress = /*@__PURE__*/ createMotionComponent(\"address\")\nexport const MotionArea = /*@__PURE__*/ createMotionComponent(\"area\")\nexport const MotionArticle = /*@__PURE__*/ createMotionComponent(\"article\")\nexport const MotionAside = /*@__PURE__*/ createMotionComponent(\"aside\")\nexport const MotionAudio = /*@__PURE__*/ createMotionComponent(\"audio\")\nexport const MotionB = /*@__PURE__*/ createMotionComponent(\"b\")\nexport const MotionBase = /*@__PURE__*/ createMotionComponent(\"base\")\nexport const MotionBdi = /*@__PURE__*/ createMotionComponent(\"bdi\")\nexport const MotionBdo = /*@__PURE__*/ createMotionComponent(\"bdo\")\nexport const MotionBig = /*@__PURE__*/ createMotionComponent(\"big\")\nexport const MotionBlockquote =\n /*@__PURE__*/ createMotionComponent(\"blockquote\")\nexport const MotionBody = /*@__PURE__*/ createMotionComponent(\"body\")\nexport const MotionButton = /*@__PURE__*/ createMotionComponent(\"button\")\nexport const MotionCanvas = /*@__PURE__*/ createMotionComponent(\"canvas\")\nexport const MotionCaption = /*@__PURE__*/ createMotionComponent(\"caption\")\nexport const MotionCite = /*@__PURE__*/ createMotionComponent(\"cite\")\nexport const MotionCode = /*@__PURE__*/ createMotionComponent(\"code\")\nexport const MotionCol = /*@__PURE__*/ createMotionComponent(\"col\")\nexport const MotionColgroup = /*@__PURE__*/ createMotionComponent(\"colgroup\")\nexport const MotionData = /*@__PURE__*/ createMotionComponent(\"data\")\nexport const MotionDatalist = /*@__PURE__*/ createMotionComponent(\"datalist\")\nexport const MotionDd = /*@__PURE__*/ createMotionComponent(\"dd\")\nexport const MotionDel = /*@__PURE__*/ createMotionComponent(\"del\")\nexport const MotionDetails = /*@__PURE__*/ createMotionComponent(\"details\")\nexport const MotionDfn = /*@__PURE__*/ createMotionComponent(\"dfn\")\nexport const MotionDialog = /*@__PURE__*/ createMotionComponent(\"dialog\")\nexport const MotionDiv = /*@__PURE__*/ createMotionComponent(\"div\")\nexport const MotionDl = /*@__PURE__*/ createMotionComponent(\"dl\")\nexport const MotionDt = /*@__PURE__*/ createMotionComponent(\"dt\")\nexport const MotionEm = /*@__PURE__*/ createMotionComponent(\"em\")\nexport const MotionEmbed = /*@__PURE__*/ createMotionComponent(\"embed\")\nexport const MotionFieldset = /*@__PURE__*/ createMotionComponent(\"fieldset\")\nexport const MotionFigcaption =\n /*@__PURE__*/ createMotionComponent(\"figcaption\")\nexport const MotionFigure = /*@__PURE__*/ createMotionComponent(\"figure\")\nexport const MotionFooter = /*@__PURE__*/ createMotionComponent(\"footer\")\nexport const MotionForm = /*@__PURE__*/ createMotionComponent(\"form\")\nexport const MotionH1 = /*@__PURE__*/ createMotionComponent(\"h1\")\nexport const MotionH2 = /*@__PURE__*/ createMotionComponent(\"h2\")\nexport const MotionH3 = /*@__PURE__*/ createMotionComponent(\"h3\")\nexport const MotionH4 = /*@__PURE__*/ createMotionComponent(\"h4\")\nexport const MotionH5 = /*@__PURE__*/ createMotionComponent(\"h5\")\nexport const MotionH6 = /*@__PURE__*/ createMotionComponent(\"h6\")\nexport const MotionHead = /*@__PURE__*/ createMotionComponent(\"head\")\nexport const MotionHeader = /*@__PURE__*/ createMotionComponent(\"header\")\nexport const MotionHgroup = /*@__PURE__*/ createMotionComponent(\"hgroup\")\nexport const MotionHr = /*@__PURE__*/ createMotionComponent(\"hr\")\nexport const MotionHtml = /*@__PURE__*/ createMotionComponent(\"html\")\nexport const MotionI = /*@__PURE__*/ createMotionComponent(\"i\")\nexport const MotionIframe = /*@__PURE__*/ createMotionComponent(\"iframe\")\nexport const MotionImg = /*@__PURE__*/ createMotionComponent(\"img\")\nexport const MotionInput = /*@__PURE__*/ createMotionComponent(\"input\")\nexport const MotionIns = /*@__PURE__*/ createMotionComponent(\"ins\")\nexport const MotionKbd = /*@__PURE__*/ createMotionComponent(\"kbd\")\nexport const MotionKeygen = /*@__PURE__*/ createMotionComponent(\"keygen\")\nexport const MotionLabel = /*@__PURE__*/ createMotionComponent(\"label\")\nexport const MotionLegend = /*@__PURE__*/ createMotionComponent(\"legend\")\nexport const MotionLi = /*@__PURE__*/ createMotionComponent(\"li\")\nexport const MotionLink = /*@__PURE__*/ createMotionComponent(\"link\")\nexport const MotionMain = /*@__PURE__*/ createMotionComponent(\"main\")\nexport const MotionMap = /*@__PURE__*/ createMotionComponent(\"map\")\nexport const MotionMark = /*@__PURE__*/ createMotionComponent(\"mark\")\nexport const MotionMenu = /*@__PURE__*/ createMotionComponent(\"menu\")\nexport const MotionMLine truncated
@@ -0,0 +1,107 @@
# is-extglob [![NPM version](https://img.shields.io/npm/v/is-extglob.svg?style=flat)](https://www.npmjs.com/package/is-extglob) [![NPM downloads](https://img.shields.io/npm/dm/is-extglob.svg?style=flat)](https://npmjs.org/package/is-extglob) [![Build Status](https://img.shields.io/travis/jonschlinkert/is-extglob.svg?style=flat)](https://travis-ci.org/jonschlinkert/is-extglob)
> Returns true if a string has an extglob.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save is-extglob
```
## Usage
```js
var isExtglob = require('is-extglob');
```
**True**
```js
isExtglob('?(abc)');
isExtglob('@(abc)');
isExtglob('!(abc)');
isExtglob('*(abc)');
isExtglob('+(abc)');
```
**False**
Escaped extglobs:
```js
isExtglob('\\?(abc)');
isExtglob('\\@(abc)');
isExtglob('\\!(abc)');
isExtglob('\\*(abc)');
isExtglob('\\+(abc)');
```
Everything else...
```js
isExtglob('foo.js');
isExtglob('!foo.js');
isExtglob('*.js');
isExtglob('**/abc.js');
isExtglob('abc/*.js');
isExtglob('abc/(aaa|bbb).js');
isExtglob('abc/[a-z].js');
isExtglob('abc/{a,b}.js');
isExtglob('abc/?.js');
isExtglob('abc.js');
isExtglob('abc/def/ghi.js');
```
## History
**v2.0**
Adds support for escaping. Escaped exglobs no longer return true.
## About
### Related projects
* [has-glob](https://www.npmjs.com/package/has-glob): Returns `true` if an array has a glob pattern. | [homepage](https://github.com/jonschlinkert/has-glob "Returns `true` if an array has a glob pattern.")
* [is-glob](https://www.npmjs.com/package/is-glob): Returns `true` if the given string looks like a glob pattern or an extglob pattern… [more](https://github.com/jonschlinkert/is-glob) | [homepage](https://github.com/jonschlinkert/is-glob "Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a bet")
* [micromatch](https://www.npmjs.com/package/micromatch): Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. | [homepage](https://github.com/jonschlinkert/micromatch "Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch.")
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Building docs
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
```sh
$ npm install -g verb verb-generate-readme && verb
```
### Running tests
Install dev dependencies:
```sh
$ npm install -d && npm test
```
### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
### License
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT license](https://github.com/jonschlinkert/is-extglob/blob/master/LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.31, on October 12, 2016._
@@ -0,0 +1 @@
{"version":3,"file":"clock-alert.js","sources":["../../../src/icons/clock-alert.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ClockAlert\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgNnY2bDQgMiIgLz4KICA8cGF0aCBkPSJNMTYgMjEuMTZhMTAgMTAgMCAxIDEgNS0xMy41MTYiIC8+CiAgPHBhdGggZD0iTTIwIDExLjV2NiIgLz4KICA8cGF0aCBkPSJNMjAgMjEuNWguMDEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/clock-alert\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ClockAlert = createLucideIcon('ClockAlert', [\n ['path', { d: 'M12 6v6l4 2', key: 'mmk7yg' }],\n ['path', { d: 'M16 21.16a10 10 0 1 1 5-13.516', key: 'cxo92l' }],\n ['path', { d: 'M20 11.5v6', key: '2ei3xq' }],\n ['path', { d: 'M20 21.5h.01', key: '1r2dzp' }],\n]);\n\nexport default ClockAlert;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC/C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"magic-string.es.mjs","sources":["../src/BitSet.js","../src/Chunk.js","../src/SourceMap.js","../src/utils/guessIndent.js","../src/utils/getRelativePath.js","../src/utils/isObject.js","../src/utils/getLocator.js","../src/utils/Mappings.js","../src/MagicString.js","../src/Bundle.js"],"sourcesContent":["export default class BitSet {\n\tconstructor(arg) {\n\t\tthis.bits = arg instanceof BitSet ? arg.bits.slice() : [];\n\t}\n\n\tadd(n) {\n\t\tthis.bits[n >> 5] |= 1 << (n & 31);\n\t}\n\n\thas(n) {\n\t\treturn !!(this.bits[n >> 5] & (1 << (n & 31)));\n\t}\n}\n","export default class Chunk {\n\tconstructor(start, end, content) {\n\t\tthis.start = start;\n\t\tthis.end = end;\n\t\tthis.original = content;\n\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\n\t\tthis.content = content;\n\t\tthis.storeName = false;\n\t\tthis.edited = false;\n\n\t\tif (DEBUG) {\n\t\t\t// we make these non-enumerable, for sanity while debugging\n\t\t\tObject.defineProperties(this, {\n\t\t\t\tprevious: { writable: true, value: null },\n\t\t\t\tnext: { writable: true, value: null },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.previous = null;\n\t\t\tthis.next = null;\n\t\t}\n\t}\n\n\tappendLeft(content) {\n\t\tthis.outro += content;\n\t}\n\n\tappendRight(content) {\n\t\tthis.intro = this.intro + content;\n\t}\n\n\tclone() {\n\t\tconst chunk = new Chunk(this.start, this.end, this.original);\n\n\t\tchunk.intro = this.intro;\n\t\tchunk.outro = this.outro;\n\t\tchunk.content = this.content;\n\t\tchunk.storeName = this.storeName;\n\t\tchunk.edited = this.edited;\n\n\t\treturn chunk;\n\t}\n\n\tcontains(index) {\n\t\treturn this.start < index && index < this.end;\n\t}\n\n\teachNext(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.next;\n\t\t}\n\t}\n\n\teachPrevious(fn) {\n\t\tlet chunk = this;\n\t\twhile (chunk) {\n\t\t\tfn(chunk);\n\t\t\tchunk = chunk.previous;\n\t\t}\n\t}\n\n\tedit(content, storeName, contentOnly) {\n\t\tthis.content = content;\n\t\tif (!contentOnly) {\n\t\t\tthis.intro = '';\n\t\t\tthis.outro = '';\n\t\t}\n\t\tthis.storeName = storeName;\n\n\t\tthis.edited = true;\n\n\t\treturn this;\n\t}\n\n\tprependLeft(content) {\n\t\tthis.outro = content + this.outro;\n\t}\n\n\tprependRight(content) {\n\t\tthis.intro = content + this.intro;\n\t}\n\n\treset() {\n\t\tthis.intro = '';\n\t\tthis.outro = '';\n\t\tif (this.edited) {\n\t\t\tthis.content = this.original;\n\t\t\tthis.storeName = false;\n\t\t\tthis.edited = false;\n\t\t}\n\t}\n\n\tsplit(index) {\n\t\tconst sliceIndex = index - this.start;\n\n\t\tconst originalBefore = this.original.slice(0, sliceIndex);\n\t\tconst originalAfter = this.original.slice(sliceIndex);\n\n\t\tthis.original = originalBefore;\n\n\t\tconst newChunk = new Chunk(index, this.end, originalAfter);\n\t\tnewChunk.outro = this.outro;\n\t\tthis.outro = '';\n\n\t\tthis.end = index;\n\n\t\tif (this.edited) {\n\t\t\t// after split we should save the edit content record into the correct chunk\n\t\t\t// to make sure sourcemap correct\n\t\t\t// For example:\n\t\t\t// ' test'.trim()\n\t\t\t// split -> ' ' + 'test'\n\t\t\t// ✔️ edit -> '' + 'test'\n\t\t\t// ✖️ edit -> 'test' + ''\n\t\t\t// TODO is this block necessary?...\n\t\t\tnewChunk.edit('', false);\n\t\t\tthis.content = '';\n\t\t} else {\n\t\t\tthis.content = originalBefore;\n\t\t}\n\n\t\tnewChunk.next = this.next;\n\t\tif (newChunk.next) newChunk.next.previous = newChunk;\n\t\tnewChunk.previous = this;\n\t\tthis.next = newChunk;\n\n\t\treturn newChunk;\n\t}\n\n\ttoString() {\n\t\treturn this.intro + this.content + this.outro;\n\t}\n\n\ttrimEnd(rx) {\n\t\tthis.outro = this.outro.replace(rx, '');\n\t\tif (this.outro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tthis.split(this.start + trimmed.length).edit('', undefined, true);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tthis.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.intro = this.intro.replace(rx, '');\n\t\t\tif (this.intro.length) return true;\n\t\t}\n\t}\n\n\ttrimStart(rx) {\n\t\tthis.intro = this.intro.replace(rx, '');\n\t\tif (this.intro.length) return true;\n\n\t\tconst trimmed = this.content.replace(rx, '');\n\n\t\tif (trimmed.length) {\n\t\t\tif (trimmed !== this.content) {\n\t\t\t\tconst newChunk = this.split(this.end - trimmed.length);\n\t\t\t\tif (this.edited) {\n\t\t\t\t\t// save the change, if it has been edited\n\t\t\t\t\tnewChunk.edit(trimmed, this.storeName, true);\n\t\t\t\t}\n\t\t\t\tthis.edit('', undefined, true);\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthis.edit('', undefined, true);\n\n\t\t\tthis.outro = this.outro.replace(rx, '');\n\t\t\tif (this.outro.length) return true;\n\t\t}\n\t}\n}\n","import { encode } from '@jridgewell/sourcemap-codec';\n\nfunction getBtoa() {Line truncated
@@ -0,0 +1,50 @@
import type {
CodeKeywordDefinition,
ErrorObject,
KeywordErrorDefinition,
AnySchema,
} from "../../types"
import type {KeywordCxt} from "../../compile/validate"
import {_, not} from "../../compile/codegen"
import {alwaysValidSchema} from "../../compile/util"
export type PropertyNamesError = ErrorObject<"propertyNames", {propertyName: string}, AnySchema>
const error: KeywordErrorDefinition = {
message: "property name must be valid",
params: ({params}) => _`{propertyName: ${params.propertyName}}`,
}
const def: CodeKeywordDefinition = {
keyword: "propertyNames",
type: "object",
schemaType: ["object", "boolean"],
error,
code(cxt: KeywordCxt) {
const {gen, schema, data, it} = cxt
if (alwaysValidSchema(it, schema)) return
const valid = gen.name("valid")
gen.forIn("key", data, (key) => {
cxt.setParams({propertyName: key})
cxt.subschema(
{
keyword: "propertyNames",
data: key,
dataTypes: ["string"],
propertyName: key,
compositeRule: true,
},
valid
)
gen.if(not(valid), () => {
cxt.error(true)
if (!it.allErrors) gen.break()
})
})
cxt.ok(valid)
},
}
export default def
@@ -0,0 +1,17 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Key = createLucideIcon("Key", [
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
]);
export { Key as default };
//# sourceMappingURL=key.js.map
@@ -0,0 +1,75 @@
"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.hasBaseTypes = hasBaseTypes;
exports.matchesTypeOrBaseType = matchesTypeOrBaseType;
const ts_api_utils_1 = require("ts-api-utils");
const tsutils = __importStar(require("ts-api-utils"));
const ts = __importStar(require("typescript"));
function getBaseTypesForType(checker, type) {
if (!tsutils.isObjectType(type)) {
return [];
}
const interfaceTarget = tsutils.isTypeReference(type) ? type.target : type;
const interfaceType = tsutils.isObjectFlagSet(interfaceTarget, ts.ObjectFlags.Interface | ts.ObjectFlags.Class) && interfaceTarget;
if (!interfaceType) {
return [];
}
return checker.getBaseTypes(interfaceType);
}
function hasBaseTypes(type) {
return ((0, ts_api_utils_1.isObjectType)(type) &&
(0, ts_api_utils_1.isObjectFlagSet)(type, ts.ObjectFlags.Interface | ts.ObjectFlags.Class));
}
/**
* Recursively checks if a type or any of its base types matches the provided
* matcher function.
* @param services Parser services with type information
* @param matcher Function to test if a type matches the desired criteria
* @param type The type to check
* @param seen Set of already visited types to prevent infinite recursion
* @returns `true` if the type or any of its base types match the matcher
*/
function matchesTypeOrBaseType(services, matcher, type, seen = new Set()) {
if (seen.has(type)) {
return false;
}
seen.add(type);
if (matcher(type)) {
return true;
}
const checker = services.program.getTypeChecker();
return getBaseTypesForType(checker, type).some(base => matchesTypeOrBaseType(services, matcher, base, seen));
}
@@ -0,0 +1,28 @@
type VisitorKeys$1 = {
readonly [type: string]: ReadonlyArray<string>;
};
/**
* @typedef {{ readonly [type: string]: ReadonlyArray<string> }} VisitorKeys
*/
/**
* @type {VisitorKeys}
*/
declare const KEYS: VisitorKeys$1;
/**
* Get visitor keys of a given node.
* @param {Object} node The AST node to get keys.
* @returns {readonly string[]} Visitor keys of the node.
*/
declare function getKeys(node: Object): readonly string[];
/**
* Make the union set with `KEYS` and given keys.
* @param {VisitorKeys} additionalKeys The additional keys.
* @returns {VisitorKeys} The union set.
*/
declare function unionWith(additionalKeys: VisitorKeys): VisitorKeys;
type VisitorKeys = VisitorKeys$1;
export { KEYS, getKeys, unionWith };
export type { VisitorKeys };
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const CircleDivide = createLucideIcon("CircleDivide", [
["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }],
["line", { x1: "12", x2: "12", y1: "16", y2: "16", key: "aqc6ln" }],
["line", { x1: "12", x2: "12", y1: "8", y2: "8", key: "1mkcni" }],
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
]);
export { CircleDivide as default };
//# sourceMappingURL=circle-divide.js.map
@@ -0,0 +1,140 @@
# accepts
[![NPM Version][npm-version-image]][npm-url]
[![NPM Downloads][npm-downloads-image]][npm-url]
[![Node.js Version][node-version-image]][node-version-url]
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
[![Test Coverage][coveralls-image]][coveralls-url]
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
In addition to negotiator, it allows:
- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
as well as `('text/html', 'application/json')`.
- Allows type shorthands such as `json`.
- Returns `false` when no types match
- Treats non-existent headers as `*`
## Installation
This is a [Node.js](https://nodejs.org/en/) module available through the
[npm registry](https://www.npmjs.com/). Installation is done using the
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
```sh
$ npm install accepts
```
## API
```js
var accepts = require('accepts')
```
### accepts(req)
Create a new `Accepts` object for the given `req`.
#### .charset(charsets)
Return the first accepted charset. If nothing in `charsets` is accepted,
then `false` is returned.
#### .charsets()
Return the charsets that the request accepts, in the order of the client's
preference (most preferred first).
#### .encoding(encodings)
Return the first accepted encoding. If nothing in `encodings` is accepted,
then `false` is returned.
#### .encodings()
Return the encodings that the request accepts, in the order of the client's
preference (most preferred first).
#### .language(languages)
Return the first accepted language. If nothing in `languages` is accepted,
then `false` is returned.
#### .languages()
Return the languages that the request accepts, in the order of the client's
preference (most preferred first).
#### .type(types)
Return the first accepted type (and it is returned as the same text as what
appears in the `types` array). If nothing in `types` is accepted, then `false`
is returned.
The `types` array can contain full MIME types or file extensions. Any value
that is not a full MIME type is passed to `require('mime-types').lookup`.
#### .types()
Return the types that the request accepts, in the order of the client's
preference (most preferred first).
## Examples
### Simple type negotiation
This simple example shows how to use `accepts` to return a different typed
respond body based on what the client wants to accept. The server lists it's
preferences in order and will get back the best match between the client and
server.
```js
var accepts = require('accepts')
var http = require('http')
function app (req, res) {
var accept = accepts(req)
// the order of this list is significant; should be server preferred order
switch (accept.type(['json', 'html'])) {
case 'json':
res.setHeader('Content-Type', 'application/json')
res.write('{"hello":"world!"}')
break
case 'html':
res.setHeader('Content-Type', 'text/html')
res.write('<b>hello, world!</b>')
break
default:
// the fallback is text/plain, so no need to specify it above
res.setHeader('Content-Type', 'text/plain')
res.write('hello, world!')
break
}
res.end()
}
http.createServer(app).listen(3000)
```
You can test this out with the cURL program:
```sh
curl -I -H'Accept: text/html' http://localhost:3000/
```
## License
[MIT](LICENSE)
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
[node-version-image]: https://badgen.net/npm/node/accepts
[node-version-url]: https://nodejs.org/en/download
[npm-downloads-image]: https://badgen.net/npm/dm/accepts
[npm-url]: https://npmjs.org/package/accepts
[npm-version-image]: https://badgen.net/npm/v/accepts
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","16":"FD","132":"_3E"},B:{"1":"_J"},C:{"1":"_7F","132":"_5D"},D:{"1":"_5L","132":"_uF"},E:{"1":"_QB","132":"_TB"},F:{"1":"_a","16":"_VE","132":"aC"},G:{"1":"_BB","132":"_OB"},H:{"132":"1D"},I:{"1":"_X","132":"_W"},J:{"132":"_B"},K:{"1":"H","16":"_cB","132":"aC"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"B","132":"A"},O:{"1":"bC"},P:{"1":"_U","132":"J"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"ME","4":"LE"}},B:6,C:"localeCompare()",D:true};
@@ -0,0 +1 @@
{"version":3,"names":["ErrorToString","Function","call","bind","Error","prototype","toString","SUPPORTED","captureStackTrace","_Object$getOwnPropert","Object","getOwnPropertyDescriptor","writable","START_HIDING","STOP_HIDING","expectedErrors","WeakSet","virtualFrames","WeakMap","CallSite","filename","create","isNative","isConstructor","isToplevel","getFileName","getLineNumber","undefined","getColumnNumber","getFunctionName","getMethodName","getTypeName","injectVirtualStackFrame","error","frames","get","set","push","expectedError","add","beginHiddenCallStack","fn","defineProperty","args","setupPrepareStackTrace","value","endHiddenCallStack","prepareStackTrace","defaultPrepareStackTrace","MIN_STACK_TRACE_LIMIT","stackTraceLimit","Math","max","stackTraceRewriter","err","trace","newTrace","isExpected","has","status","i","length","name","unshift","join"],"sources":["../../src/errors/rewrite-stack-trace.ts"],"sourcesContent":["/**\n * This file uses the internal V8 Stack Trace API (https://v8.dev/docs/stack-trace-api)\n * to provide utilities to rewrite the stack trace.\n * When this API is not present, all the functions in this file become noops.\n *\n * beginHiddenCallStack(fn) and endHiddenCallStack(fn) wrap their parameter to\n * mark an hidden portion of the stack trace. The function passed to\n * beginHiddenCallStack is the first hidden function, while the function passed\n * to endHiddenCallStack is the first shown function.\n *\n * When an error is thrown _outside_ of the hidden zone, everything between\n * beginHiddenCallStack and endHiddenCallStack will not be shown.\n * If an error is thrown _inside_ the hidden zone, then the whole stack trace\n * will be visible: this is to avoid hiding real bugs.\n * However, if an error inside the hidden zone is expected, it can be marked\n * with the expectedError(error) function to keep the hidden frames hidden.\n *\n * Consider this call stack (the outer function is the bottom one):\n *\n * 1. a()\n * 2. endHiddenCallStack(b)()\n * 3. c()\n * 4. beginHiddenCallStack(d)()\n * 5. e()\n * 6. f()\n *\n * - If a() throws an error, then its shown call stack will be \"a, b, e, f\"\n * - If b() throws an error, then its shown call stack will be \"b, e, f\"\n * - If c() throws an expected error, then its shown call stack will be \"e, f\"\n * - If c() throws an unexpected error, then its shown call stack will be \"c, d, e, f\"\n * - If d() throws an expected error, then its shown call stack will be \"e, f\"\n * - If d() throws an unexpected error, then its shown call stack will be \"d, e, f\"\n * - If e() throws an error, then its shown call stack will be \"e, f\"\n *\n * Additionally, an error can inject additional \"virtual\" stack frames using the\n * injectVirtualStackFrame(error, filename) function: those are injected as a\n * replacement of the hidden frames.\n * In the example above, if we called injectVirtualStackFrame(err, \"h\") and\n * injectVirtualStackFrame(err, \"i\") on the expected error thrown by c(), its\n * shown call stack would have been \"h, i, e, f\".\n * This can be useful, for example, to report config validation errors as if they\n * were directly thrown in the config file.\n */\n\nconst ErrorToString = Function.call.bind(Error.prototype.toString);\n\nconst SUPPORTED =\n !!Error.captureStackTrace &&\n Object.getOwnPropertyDescriptor(Error, \"stackTraceLimit\")?.writable === true;\n\nconst START_HIDING = \"startHiding - secret - don't use this - v1\";\nconst STOP_HIDING = \"stopHiding - secret - don't use this - v1\";\n\ntype CallSite = NodeJS.CallSite;\n\nconst expectedErrors = new WeakSet<Error>();\nconst virtualFrames = new WeakMap<Error, CallSite[]>();\n\nfunction CallSite(filename: string): CallSite {\n // We need to use a prototype otherwise it breaks source-map-support's internals\n return Object.create({\n isNative: () => false,\n isConstructor: () => false,\n isToplevel: () => true,\n getFileName: () => filename,\n getLineNumber: () => undefined,\n getColumnNumber: () => undefined,\n getFunctionName: () => undefined,\n getMethodName: () => undefined,\n getTypeName: () => undefined,\n toString: () => filename,\n } as CallSite);\n}\n\nexport function injectVirtualStackFrame(error: Error, filename: string) {\n if (!SUPPORTED) return;\n\n let frames = virtualFrames.get(error);\n if (!frames) virtualFrames.set(error, (frames = []));\n frames.push(CallSite(filename));\n\n return error;\n}\n\nexport function expectedError(error: Error) {\n if (!SUPPORTED) return;\n expectedErrors.add(error);\n return error;\n}\n\nexport function beginHiddenCallStack<A extends unknown[], R>(\n fn: (...args: A) => R,\n) {\n if (!SUPPORTED) return fn;\n\n return Object.defineProperty(\n function (...args: A) {\n setupPrepareStackTrace();\n return fn(...args);\n },\n \"name\",\n { value: STOP_HIDING },\n );\n}\n\nexport function endHiddenCallStack<A extends unknown[], R>(\n fn: (...argLine truncated
@@ -0,0 +1,57 @@
import Matching from './Matching.mjs';
import { TimeEstimates } from './TimeEstimates.mjs';
import Feedback from './Feedback.mjs';
import Options from './Options.mjs';
export { default as debounce } from './utils/debounce.mjs';
import Scoring from './scoring/index.mjs';
export { MatcherBaseClass } from './types.mjs';
const time = () => new Date().getTime();
class ZxcvbnFactory {
constructor(options = {}, customMatchers = {}) {
this.options = new Options(options, customMatchers);
this.scoring = new Scoring(this.options);
this.matching = new Matching(this.options);
this.feedback = new Feedback(this.options);
this.timeEstimates = new TimeEstimates(this.options);
}
estimateAttackTimes(guesses) {
return this.timeEstimates.estimateAttackTimes(guesses);
}
getFeedback(score, sequence) {
return this.feedback.getFeedback(score, sequence);
}
createReturnValue(resolvedMatches, password, start) {
const matchSequence = this.scoring.mostGuessableMatchSequence(password, resolvedMatches);
const calcTime = time() - start;
const attackTimes = this.estimateAttackTimes(matchSequence.guesses);
return {
calcTime,
...matchSequence,
...attackTimes,
feedback: this.getFeedback(attackTimes.score, matchSequence.sequence)
};
}
main(password, userInputs) {
const userInputsOptions = this.options.getUserInputsOptions(userInputs);
return this.matching.match(password, userInputsOptions);
}
check(password, userInputs) {
const reducedPassword = password.substring(0, this.options.maxLength);
const start = time();
const matches = this.main(reducedPassword, userInputs);
if (matches instanceof Promise) {
throw new Error('You are using a Promised matcher, please use `zxcvbnAsync` for it.');
}
return this.createReturnValue(matches, reducedPassword, start);
}
async checkAsync(password, userInputs) {
const reducedPassword = password.substring(0, this.options.maxLength);
const start = time();
const matches = await this.main(reducedPassword, userInputs);
return this.createReturnValue(matches, reducedPassword, start);
}
}
export { Options, ZxcvbnFactory };
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,16 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Power = createLucideIcon("Power", [
["path", { d: "M12 2v10", key: "mnfbl" }],
["path", { d: "M18.4 6.6a9 9 0 1 1-12.77.04", key: "obofu9" }]
]);
export { Power as default };
//# sourceMappingURL=power.js.map
@@ -0,0 +1 @@
{"version":3,"file":"useLoaderData.js","names":[],"sources":["../../src/useLoaderData.tsx"],"sourcesContent":["import { useMatch } from './useMatch'\nimport type {\n StructuralSharingOption,\n ValidateSelected,\n} from './structuralSharing'\nimport type {\n AnyRouter,\n RegisteredRouter,\n ResolveUseLoaderData,\n StrictOrFrom,\n UseLoaderDataResult,\n} from '@tanstack/router-core'\n\nexport interface UseLoaderDataBaseOptions<\n TRouter extends AnyRouter,\n TFrom,\n TStrict extends boolean,\n TSelected,\n TStructuralSharing,\n> {\n select?: (\n match: ResolveUseLoaderData<TRouter, TFrom, TStrict>,\n ) => ValidateSelected<TRouter, TSelected, TStructuralSharing>\n}\n\nexport type UseLoaderDataOptions<\n TRouter extends AnyRouter,\n TFrom extends string | undefined,\n TStrict extends boolean,\n TSelected,\n TStructuralSharing,\n> = StrictOrFrom<TRouter, TFrom, TStrict> &\n UseLoaderDataBaseOptions<\n TRouter,\n TFrom,\n TStrict,\n TSelected,\n TStructuralSharing\n > &\n StructuralSharingOption<TRouter, TSelected, TStructuralSharing>\n\nexport type UseLoaderDataRoute<out TId> = <\n TRouter extends AnyRouter = RegisteredRouter,\n TSelected = unknown,\n TStructuralSharing extends boolean = boolean,\n>(\n opts?: UseLoaderDataBaseOptions<\n TRouter,\n TId,\n true,\n TSelected,\n TStructuralSharing\n > &\n StructuralSharingOption<TRouter, TSelected, TStructuralSharing>,\n) => UseLoaderDataResult<TRouter, TId, true, TSelected>\n\n/**\n * Read and select the current route's loader data with type‑safety.\n *\n * Options:\n * - `from`/`strict`: Choose which route's data to read and strictness\n * - `select`: Map the loader data to a derived value\n * - `structuralSharing`: Enable structural sharing for stable references\n *\n * @returns The loader data (or selected value) for the matched route.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useLoaderDataHook\n */\nexport function useLoaderData<\n TRouter extends AnyRouter = RegisteredRouter,\n const TFrom extends string | undefined = undefined,\n TStrict extends boolean = true,\n TSelected = unknown,\n TStructuralSharing extends boolean = boolean,\n>(\n opts: UseLoaderDataOptions<\n TRouter,\n TFrom,\n TStrict,\n TSelected,\n TStructuralSharing\n >,\n): UseLoaderDataResult<TRouter, TFrom, TStrict, TSelected> {\n return useMatch({\n from: opts.from!,\n strict: opts.strict,\n structuralSharing: opts.structuralSharing,\n select: (s: any) => {\n return opts.select ? opts.select(s.loaderData) : s.loaderData\n },\n } as any) as UseLoaderDataResult<TRouter, TFrom, TStrict, TSelected>\n}\n"],"mappings":";;;;;;;;;;;;;AAmEA,SAAgB,cAOd,MAOyD;AACzD,QAAO,SAAS;EACd,MAAM,KAAK;EACX,QAAQ,KAAK;EACb,mBAAmB,KAAK;EACxB,SAAS,MAAW;AAClB,UAAO,KAAK,SAAS,KAAK,OAAO,EAAE,WAAW,GAAG,EAAE;;EAEtD,CAAQ"}
@@ -0,0 +1,27 @@
import Client from './client'
import Dispatcher from './dispatcher'
import MockAgent from './mock-agent'
import { MockInterceptor, Interceptable } from './mock-interceptor'
export default MockClient
/** MockClient extends the Client API and allows one to mock requests. */
declare class MockClient extends Client implements Interceptable {
constructor (origin: string, options: MockClient.Options)
/** Intercepts any matching requests that use the same origin as this mock client. */
intercept (options: MockInterceptor.Options): MockInterceptor
/** Dispatches a mocked request. */
dispatch (options: Dispatcher.DispatchOptions, handlers: Dispatcher.DispatchHandler): boolean
/** Closes the mock client and gracefully waits for enqueued requests to complete. */
close (): Promise<void>
/** Clean up all the prepared mocks. */
cleanMocks (): void
}
declare namespace MockClient {
/** MockClient options. */
export interface Options extends Client.Options {
/** The agent to associate this MockClient with. */
agent: MockAgent;
}
}
@@ -0,0 +1,45 @@
import { isCSSVariableName } from '../../animation/utils/is-css-variable.mjs';
import { transformProps } from '../utils/keys-transform.mjs';
import { defaultTransformValue, readTransformValue } from '../dom/parse-transform.mjs';
import { measureViewportBox } from '../../projection/utils/measure.mjs';
import { DOMVisualElement } from '../dom/DOMVisualElement.mjs';
import { buildHTMLStyles } from './utils/build-styles.mjs';
import { renderHTML } from './utils/render.mjs';
import { scrapeMotionValuesFromProps } from './utils/scrape-motion-values.mjs';
function getComputedStyle(element) {
return window.getComputedStyle(element);
}
class HTMLVisualElement extends DOMVisualElement {
constructor() {
super(...arguments);
this.type = "html";
this.renderInstance = renderHTML;
}
readValueFromInstance(instance, key) {
if (transformProps.has(key)) {
return this.projection?.isProjecting
? defaultTransformValue(key)
: readTransformValue(instance, key);
}
else {
const computedStyle = getComputedStyle(instance);
const value = (isCSSVariableName(key)
? computedStyle.getPropertyValue(key)
: computedStyle[key]) || 0;
return typeof value === "string" ? value.trim() : value;
}
}
measureInstanceViewportBox(instance, { transformPagePoint }) {
return measureViewportBox(instance, transformPagePoint);
}
build(renderState, latestValues, props) {
buildHTMLStyles(renderState, latestValues, props.transformTemplate);
}
scrapeMotionValuesFromProps(props, prevProps, visualElement) {
return scrapeMotionValuesFromProps(props, prevProps, visualElement);
}
}
export { HTMLVisualElement, getComputedStyle };
//# sourceMappingURL=HTMLVisualElement.mjs.map
@@ -0,0 +1,50 @@
#include <string>
// weird error on linux
#ifdef __THROW
#undef __THROW
#endif
#define __THROW
#include <fts.h>
#include <sys/stat.h>
#include "../DirTree.hh"
#include "../shared/BruteForceBackend.hh"
#define CONVERT_TIME(ts) ((uint64_t)ts.tv_sec * 1000000000 + ts.tv_nsec)
#if __APPLE__
#define st_mtim st_mtimespec
#endif
void BruteForceBackend::readTree(WatcherRef watcher, std::shared_ptr<DirTree> tree) {
char *paths[2] {(char *)watcher->mDir.c_str(), NULL};
FTS *fts = fts_open(paths, FTS_NOCHDIR | FTS_PHYSICAL, NULL);
if (!fts) {
throw WatcherError(strerror(errno), watcher);
}
FTSENT *node;
bool isRoot = true;
while ((node = fts_read(fts)) != NULL) {
if (node->fts_errno) {
fts_close(fts);
throw WatcherError(strerror(node->fts_errno), watcher);
}
if (isRoot && !(node->fts_info & FTS_D)) {
fts_close(fts);
throw WatcherError(strerror(ENOTDIR), watcher);
}
if (watcher->isIgnored(std::string(node->fts_path))) {
fts_set(fts, node, FTS_SKIP);
continue;
}
tree->add(node->fts_path, CONVERT_TIME(node->fts_statp->st_mtim), (node->fts_info & FTS_D) == FTS_D);
isRoot = false;
}
fts_close(fts);
}
@@ -0,0 +1,8 @@
type EncodeTrieNode = string | {
v?: string;
n: number | Map<number, EncodeTrieNode>;
o?: string;
};
export declare const htmlTrie: Map<number, EncodeTrieNode>;
export {};
//# sourceMappingURL=encode-html.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"legacy.d.ts","sourceRoot":"https://raw.githubusercontent.com/fb55/domutils/0ab8bcf1ecfc70dfc93291a4cb2496578ac25e9c/src/","sources":["legacy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAKlD;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;IACrD,CAAC,aAAa,EAAE,MAAM,GAChB,SAAS,GACT,MAAM,GACN,CAAC,CAAC,cAAc,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC;CAC/C;AAkFD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAG5E;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACvB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,EAAE,OAAO,EAChB,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAGX;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAC1B,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,EACtC,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,GACf,OAAO,GAAG,IAAI,CAGhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAChC,OAAO,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAC7C,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAOX;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAClC,SAAS,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,EAC/C,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAOX;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAChC,IAAI,EAAE,WAAW,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,EACpD,KAAK,EAAE,OAAO,GAAG,OAAO,EAAE,EAC1B,OAAO,UAAO,EACd,KAAK,GAAE,MAAiB,GACzB,OAAO,EAAE,CAEX"}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../src/index.ts", "../src/observe-element-rect.ts"],
"sourcesContent": ["export { observeElementRect } from './observe-element-rect';\nexport type { Measurable } from './observe-element-rect';\n", "type Measurable = { getBoundingClientRect(): DOMRect };\n\n/**\n * Observes an element's rectangle on screen (getBoundingClientRect)\n * This is useful to track elements on the screen and attach other elements\n * that might be in different layers, etc.\n */\nfunction observeElementRect(\n /** The element whose rect to observe */\n elementToObserve: Measurable,\n /** The callback which will be called when the rect changes */\n callback: CallbackFn\n) {\n const observedData = observedElements.get(elementToObserve);\n\n if (observedData === undefined) {\n // add the element to the map of observed elements with its first callback\n // because this is the first time this element is observed\n observedElements.set(elementToObserve, { rect: {} as DOMRect, callbacks: [callback] });\n\n if (observedElements.size === 1) {\n // start the internal loop once at least 1 element is observed\n rafId = requestAnimationFrame(runLoop);\n }\n } else {\n // only add a callback for this element as it's already observed\n observedData.callbacks.push(callback);\n callback(elementToObserve.getBoundingClientRect());\n }\n\n return () => {\n const observedData = observedElements.get(elementToObserve);\n if (observedData === undefined) return;\n\n // start by removing the callback\n const index = observedData.callbacks.indexOf(callback);\n if (index > -1) {\n observedData.callbacks.splice(index, 1);\n }\n\n if (observedData.callbacks.length === 0) {\n // stop observing this element because there are no\n // callbacks registered for it anymore\n observedElements.delete(elementToObserve);\n\n if (observedElements.size === 0) {\n // stop the internal loop once no elements are observed anymore\n cancelAnimationFrame(rafId);\n }\n }\n };\n}\n\n// ========================================================================\n// module internals\n\ntype CallbackFn = (rect: DOMRect) => void;\n\ntype ObservedData = {\n rect: DOMRect;\n callbacks: Array<CallbackFn>;\n};\n\nlet rafId: number;\nconst observedElements: Map<Measurable, ObservedData> = new Map();\n\nfunction runLoop() {\n const changedRectsData: Array<ObservedData> = [];\n\n // process all DOM reads first (getBoundingClientRect)\n observedElements.forEach((data, element) => {\n const newRect = element.getBoundingClientRect();\n\n // gather all the data for elements whose rects have changed\n if (!rectEquals(data.rect, newRect)) {\n data.rect = newRect;\n changedRectsData.push(data);\n }\n });\n\n // group DOM writes here after the DOM reads (getBoundingClientRect)\n // as DOM writes will most likely happen with the callbacks\n changedRectsData.forEach((data) => {\n data.callbacks.forEach((callback) => callback(data.rect));\n });\n\n rafId = requestAnimationFrame(runLoop);\n}\n// ========================================================================\n\n/**\n * Returns whether 2 rects are equal in values\n */\nfunction rectEquals(rect1: DOMRect, rect2: DOMRect) {\n return (\n rect1.width === rect2.width &&\n rect1.height === rect2.height &&\n rect1.top === rect2.top &&\n rect1.right === rect2.right &&\n rect1.bottom === rect2.bottom &&\n rect1.left === rect2.left\n );\n}\n\nexport { observeElementRect };\nexport type { Measurable };\n"],
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,SAAS,mBAEP,kBAEA,UACA;AACA,QAAM,eAAe,iBAAiB,IAAI,gBAAgB;AAE1D,MAAI,iBAAiB,QAAW;AAG9B,qBAAiB,IAAI,kBAAkB,EAAE,MAAM,CAAC,GAAc,WAAW,CAAC,QAAQ,EAAE,CAAC;AAErF,QAAI,iBAAiB,SAAS,GAAG;AAE/B,cAAQ,sBAAsB,OAAO;AAAA,IACvC;AAAA,EACF,OAAO;AAEL,iBAAa,UAAU,KAAK,QAAQ;AACpC,aAAS,iBAAiB,sBAAsB,CAAC;AAAA,EACnD;AAEA,SAAO,MAAM;AACX,UAAMA,gBAAe,iBAAiB,IAAI,gBAAgB;AAC1D,QAAIA,kBAAiB,OAAW;AAGhC,UAAM,QAAQA,cAAa,UAAU,QAAQ,QAAQ;AACrD,QAAI,QAAQ,IAAI;AACd,MAAAA,cAAa,UAAU,OAAO,OAAO,CAAC;AAAA,IACxC;AAEA,QAAIA,cAAa,UAAU,WAAW,GAAG;AAGvC,uBAAiB,OAAO,gBAAgB;AAExC,UAAI,iBAAiB,SAAS,GAAG;AAE/B,6BAAqB,KAAK;AAAA,MAC5B;AAAA,IACF;AAAA,EACF;AACF;AAYA,IAAI;AACJ,IAAM,mBAAkD,oBAAI,IAAI;AAEhE,SAAS,UAAU;AACjB,QAAM,mBAAwC,CAAC;AAG/C,mBAAiB,QAAQ,CAAC,MAAM,YAAY;AAC1C,UAAM,UAAU,QAAQ,sBAAsB;AAG9C,QAAI,CAAC,WAAW,KAAK,MAAM,OAAO,GAAG;AACnC,WAAK,OAAO;AACZ,uBAAiB,KAAK,IAAI;AAAA,IAC5B;AAAA,EACF,CAAC;AAID,mBAAiB,QAAQ,CAAC,SAAS;AACjC,SAAK,UAAU,QAAQ,CAAC,aAAa,SAAS,KAAK,IAAI,CAAC;AAAA,EAC1D,CAAC;AAED,UAAQ,sBAAsB,OAAO;AACvC;AAMA,SAAS,WAAW,OAAgB,OAAgB;AAClD,SACE,MAAM,UAAU,MAAM,SACtB,MAAM,WAAW,MAAM,UACvB,MAAM,QAAQ,MAAM,OACpB,MAAM,UAAU,MAAM,SACtB,MAAM,WAAW,MAAM,UACvB,MAAM,SAAS,MAAM;AAEzB;",
"names": ["observedData"]
}
@@ -0,0 +1,152 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const util = __importStar(require("../core/util.cjs"));
const error = () => {
const Sizable = {
string: { unit: "characters", verb: "to have" },
file: { unit: "bytes", verb: "to have" },
array: { unit: "items", verb: "to have" },
set: { unit: "items", verb: "to have" },
map: { unit: "entries", verb: "to have" },
};
function getSizing(origin) {
return Sizable[origin] ?? null;
}
const FormatDictionary = {
regex: "input",
email: "email address",
url: "URL",
emoji: "emoji",
uuid: "UUID",
uuidv4: "UUIDv4",
uuidv6: "UUIDv6",
nanoid: "nanoid",
guid: "GUID",
cuid: "cuid",
cuid2: "cuid2",
ulid: "ULID",
xid: "XID",
ksuid: "KSUID",
datetime: "ISO datetime",
date: "ISO date",
time: "ISO time",
duration: "ISO duration",
ipv4: "IPv4 address",
ipv6: "IPv6 address",
mac: "MAC address",
cidrv4: "IPv4 range",
cidrv6: "IPv6 range",
base64: "base64-encoded string",
base64url: "base64url-encoded string",
json_string: "JSON string",
e164: "E.164 number",
currency_code: "currency code",
credit_card: "credit card number",
iban: "IBAN",
jwt: "JWT",
template_literal: "input",
};
// type names: missing keys = do not translate (use raw value via ?? fallback)
const TypeDictionary = {
// Compatibility: "nan" -> "NaN" for display
nan: "NaN",
// All other type names omitted - they fall back to raw values via ?? operator
};
function getTypeName(type, input) {
if (type === "number" && typeof input === "number" && !Number.isFinite(input)) {
return String(input);
}
return TypeDictionary[type] ?? type;
}
return (issue) => {
switch (issue.code) {
case "invalid_type": {
const expected = getTypeName(issue.expected);
const receivedType = util.parsedType(issue.input);
const received = getTypeName(receivedType, issue.input);
return `Invalid input: expected ${expected}, received ${received}`;
}
case "invalid_value":
if (issue.values.length === 1)
return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;
return `Invalid option: expected one of ${util.joinValues(issue.values, "|")}`;
case "too_big": {
const adj = issue.exact ? "exactly " : issue.inclusive ? "<=" : "<";
const sizing = getSizing(issue.origin);
if (sizing)
return `Too big: expected ${issue.origin ?? "value"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
return `Too big: expected ${issue.origin ?? "value"} to be ${adj}${issue.maximum.toString()}`;
}
case "too_small": {
const adj = issue.exact ? "exactly " : issue.inclusive ? ">=" : ">";
const sizing = getSizing(issue.origin);
if (sizing) {
return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;
}
return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;
}
case "invalid_format": {
const _issue = issue;
if (_issue.format === "starts_with") {
return `Invalid string: must start with "${_issue.prefix}"`;
}
if (_issue.format === "ends_with")
return `Invalid string: must end with "${_issue.suffix}"`;
if (_issue.format === "includes")
return `Invalid string: must include "${_issue.includes}"`;
if (_issue.format === "regex")
return `Invalid string: must match pattern ${_issue.pattern}`;
return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;
}
case "not_multiple_of":
return `Invalid number: must be a multiple of ${issue.divisor}`;
case "unrecognized_keys":
return `Unrecognized key${issue.keys.length > 1 ? "s" : ""}: ${util.joinValues(issue.keys, ", ")}`;
case "invalid_key":
return `Invalid key in ${issue.origin}`;
case "invalid_union":
if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {
const opts = issue.options.map((o) => `'${o}'`).join(" | ");
return `Invalid discriminator value. Expected ${opts}`;
}
if (issue.inclusive === false) {
return "Invalid input: more than one option matched";
}
return "Invalid input";
case "invalid_element":
return `Invalid value in ${issue.origin}`;
default:
return `Invalid input`;
}
};
};
function default_1() {
return {
localeError: error(),
};
}
module.exports = exports.default;
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_Z","420":"_A"},B:{"2":"_K","420":"_I"},C:{"2":"_S"},D:{"2":"_H _Y sB _SG","36":"_VB","66":"_jC _7H"},E:{"2":"_wB _pK _UH _3S","33":"_qJ _FR"},F:{"2":"_c"},G:{"2":"_r _NC","33":"_JC _pT"},H:{"2":"1D"},I:{"2":"_P"},J:{"2":"_B"},K:{"2":"_N"},L:{"2":"I"},M:{"2":"YC"},N:{"420":"_A"},O:{"2":"bC"},P:{"2":"_F"},Q:{"2":"JE"},R:{"2":"KE"},S:{"2":"_C"}},B:5,C:"CSS Regions",D:true};
@@ -0,0 +1,40 @@
/// <reference types="node" />
declare namespace pathKey {
interface Options {
/**
Use a custom environment variables object. Default: [`process.env`](https://nodejs.org/api/process.html#process_process_env).
*/
readonly env?: {[key: string]: string | undefined};
/**
Get the PATH key for a specific platform. Default: [`process.platform`](https://nodejs.org/api/process.html#process_process_platform).
*/
readonly platform?: NodeJS.Platform;
}
}
declare const pathKey: {
/**
Get the [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) environment variable key cross-platform.
@example
```
import pathKey = require('path-key');
const key = pathKey();
//=> 'PATH'
const PATH = process.env[key];
//=> '/usr/local/bin:/usr/bin:/bin'
```
*/
(options?: pathKey.Options): string;
// TODO: Remove this for the next major release, refactor the whole definition to:
// declare function pathKey(options?: pathKey.Options): string;
// export = pathKey;
default: typeof pathKey;
};
export = pathKey;
@@ -0,0 +1,78 @@
import { f as createRule } from "../utils.js";
const INLINE_ELEMENTS = new Set([
"a",
"abbr",
"acronym",
"b",
"bdo",
"big",
"button",
"cite",
"code",
"dfn",
"em",
"i",
"img",
"input",
"kbd",
"label",
"map",
"object",
"q",
"samp",
"script",
"select",
"small",
"span",
"strong",
"sub",
"sup",
"textarea",
"tt",
"var"
]);
var jsx_child_element_spacing_default = createRule({
name: "jsx-child-element-spacing",
meta: {
type: "layout",
docs: { description: "Enforce or disallow spaces inside of curly braces in JSX attributes and expressions" },
schema: [],
messages: {
spacingAfterPrev: "Ambiguous spacing after previous element {{element}}",
spacingBeforeNext: "Ambiguous spacing before next element {{element}}"
}
},
create(context) {
const TEXT_FOLLOWING_ELEMENT_PATTERN = /^[\t\v\f\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\n\s*\S/;
const TEXT_PRECEDING_ELEMENT_PATTERN = /\S[\t\v\f\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\n\s*$/;
const elementName = (node) => node.openingElement && node.openingElement.name && node.openingElement.name.type === "JSXIdentifier" && node.openingElement.name.name || "";
const isInlineElement = (node) => node.type === "JSXElement" && INLINE_ELEMENTS.has(elementName(node));
const handleJSX = (node) => {
let lastChild = null;
let child = null;
[...node.children, null].forEach((nextChild) => {
if ((lastChild || nextChild) && (!lastChild || isInlineElement(lastChild)) && child && (child.type === "Literal" || child.type === "JSXText") && (!nextChild || isInlineElement(nextChild)) && true) {
if (lastChild && String(child.value).match(TEXT_FOLLOWING_ELEMENT_PATTERN)) context.report({
messageId: "spacingAfterPrev",
node: lastChild,
loc: lastChild.loc.end,
data: { element: elementName(lastChild) }
});
else if (nextChild && String(child.value).match(TEXT_PRECEDING_ELEMENT_PATTERN)) context.report({
messageId: "spacingBeforeNext",
node: nextChild,
loc: nextChild.loc.start,
data: { element: elementName(nextChild) }
});
}
lastChild = child;
child = nextChild;
});
};
return {
JSXElement: handleJSX,
JSXFragment: handleJSX
};
}
});
export { jsx_child_element_spacing_default as t };
@@ -0,0 +1,139 @@
"use client";
// src/presence.tsx
import * as React2 from "react";
import { useComposedRefs } from "@radix-ui/react-compose-refs";
import { useLayoutEffect } from "@radix-ui/react-use-layout-effect";
// src/use-state-machine.tsx
import * as React from "react";
function useStateMachine(initialState, machine) {
return React.useReducer((state, event) => {
const nextState = machine[state][event];
return nextState ?? state;
}, initialState);
}
// src/presence.tsx
var Presence = (props) => {
const { present, children } = props;
const presence = usePresence(present);
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React2.Children.only(children);
const ref = useComposedRefs(presence.ref, getElementRef(child));
const forceMount = typeof children === "function";
return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;
};
Presence.displayName = "Presence";
function usePresence(present) {
const [node, setNode] = React2.useState();
const stylesRef = React2.useRef(null);
const prevPresentRef = React2.useRef(present);
const prevAnimationNameRef = React2.useRef("none");
const initialState = present ? "mounted" : "unmounted";
const [state, send] = useStateMachine(initialState, {
mounted: {
UNMOUNT: "unmounted",
ANIMATION_OUT: "unmountSuspended"
},
unmountSuspended: {
MOUNT: "mounted",
ANIMATION_END: "unmounted"
},
unmounted: {
MOUNT: "mounted"
}
});
React2.useEffect(() => {
const currentAnimationName = getAnimationName(stylesRef.current);
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
}, [state]);
useLayoutEffect(() => {
const styles = stylesRef.current;
const wasPresent = prevPresentRef.current;
const hasPresentChanged = wasPresent !== present;
if (hasPresentChanged) {
const prevAnimationName = prevAnimationNameRef.current;
const currentAnimationName = getAnimationName(styles);
if (present) {
send("MOUNT");
} else if (currentAnimationName === "none" || styles?.display === "none") {
send("UNMOUNT");
} else {
const isAnimating = prevAnimationName !== currentAnimationName;
if (wasPresent && isAnimating) {
send("ANIMATION_OUT");
} else {
send("UNMOUNT");
}
}
prevPresentRef.current = present;
}
}, [present, send]);
useLayoutEffect(() => {
if (node) {
let timeoutId;
const ownerWindow = node.ownerDocument.defaultView ?? window;
const handleAnimationEnd = (event) => {
const currentAnimationName = getAnimationName(stylesRef.current);
const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));
if (event.target === node && isCurrentAnimation) {
send("ANIMATION_END");
if (!prevPresentRef.current) {
const currentFillMode = node.style.animationFillMode;
node.style.animationFillMode = "forwards";
timeoutId = ownerWindow.setTimeout(() => {
if (node.style.animationFillMode === "forwards") {
node.style.animationFillMode = currentFillMode;
}
});
}
}
};
const handleAnimationStart = (event) => {
if (event.target === node) {
prevAnimationNameRef.current = getAnimationName(stylesRef.current);
}
};
node.addEventListener("animationstart", handleAnimationStart);
node.addEventListener("animationcancel", handleAnimationEnd);
node.addEventListener("animationend", handleAnimationEnd);
return () => {
ownerWindow.clearTimeout(timeoutId);
node.removeEventListener("animationstart", handleAnimationStart);
node.removeEventListener("animationcancel", handleAnimationEnd);
node.removeEventListener("animationend", handleAnimationEnd);
};
} else {
send("ANIMATION_END");
}
}, [node, send]);
return {
isPresent: ["mounted", "unmountSuspended"].includes(state),
ref: React2.useCallback((node2) => {
stylesRef.current = node2 ? getComputedStyle(node2) : null;
setNode(node2);
}, [])
};
}
function getAnimationName(styles) {
return styles?.animationName || "none";
}
function getElementRef(element) {
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.ref;
}
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
if (mayWarn) {
return element.props.ref;
}
return element.props.ref || element.ref;
}
var Root = Presence;
export {
Presence,
Root
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
"use strict";var r=require("../register-D46fvsV_.cjs");require("../get-pipe-path-BoR10qr8.cjs"),require("module"),require("node:path"),require("../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:module"),require("node:url"),require("get-tsconfig"),require("node:fs"),require("../index-gckBtVBf.cjs"),require("esbuild"),require("node:crypto"),require("../client-D6NvIMSC.cjs"),require("node:net"),require("node:util"),require("../index-BWFBUo6r.cjs"),r.register();
@@ -0,0 +1 @@
{"version":3,"file":"file-pen.js","sources":["../../../src/icons/file-pen.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name FilePen\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIuNSAyMkgxOGEyIDIgMCAwIDAgMi0yVjdsLTUtNUg2YTIgMiAwIDAgMC0yIDJ2OS41IiAvPgogIDxwYXRoIGQ9Ik0xNCAydjRhMiAyIDAgMCAwIDIgMmg0IiAvPgogIDxwYXRoIGQ9Ik0xMy4zNzggMTUuNjI2YTEgMSAwIDEgMC0zLjAwNC0zLjAwNGwtNS4wMSA1LjAxMmEyIDIgMCAwIDAtLjUwNi44NTRsLS44MzcgMi44N2EuNS41IDAgMCAwIC42Mi42MmwyLjg3LS44MzdhMiAyIDAgMCAwIC44NTQtLjUwNnoiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/file-pen\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst FilePen = createLucideIcon('FilePen', [\n ['path', { d: 'M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5', key: '1couwa' }],\n ['path', { d: 'M14 2v4a2 2 0 0 0 2 2h4', key: 'tnqrlb' }],\n [\n 'path',\n {\n d: 'M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z',\n key: '1y4qbx',\n },\n ],\n]);\n\nexport default FilePen;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,iBAAiB,SAAW,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAwD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACrF,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACxD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"battery-warning.js","sources":["../../../src/icons/battery-warning.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name BatteryWarning\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTAgMTdoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xMCA3djYiIC8+CiAgPHBhdGggZD0iTTE0IDdoMmEyIDIgMCAwIDEgMiAydjZhMiAyIDAgMCAxLTIgMmgtMiIgLz4KICA8cGF0aCBkPSJNMjIgMTF2MiIgLz4KICA8cGF0aCBkPSJNNiA3SDRhMiAyIDAgMCAwLTIgMnY2YTIgMiAwIDAgMCAyIDJoMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/battery-warning\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst BatteryWarning = createLucideIcon('BatteryWarning', [\n ['path', { d: 'M10 17h.01', key: 'nbq80n' }],\n ['path', { d: 'M10 7v6', key: 'nne03l' }],\n ['path', { d: 'M14 7h2a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2h-2', key: '1x5o8m' }],\n ['path', { d: 'M22 11v2', key: '1wo06k' }],\n ['path', { d: 'M6 7H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2', key: '1mdjgh' }],\n]);\n\nexport default BatteryWarning;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,iBAAiB,gBAAkB,CAAA,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC3C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"scan-qr-code.js","sources":["../../../src/icons/scan-qr-code.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name ScanQrCode\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTcgMTJ2NGExIDEgMCAwIDEtMSAxaC00IiAvPgogIDxwYXRoIGQ9Ik0xNyAzaDJhMiAyIDAgMCAxIDIgMnYyIiAvPgogIDxwYXRoIGQ9Ik0xNyA4VjciIC8+CiAgPHBhdGggZD0iTTIxIDE3djJhMiAyIDAgMCAxLTIgMmgtMiIgLz4KICA8cGF0aCBkPSJNMyA3VjVhMiAyIDAgMCAxIDItMmgyIiAvPgogIDxwYXRoIGQ9Ik03IDE3aC4wMSIgLz4KICA8cGF0aCBkPSJNNyAyMUg1YTIgMiAwIDAgMS0yLTJ2LTIiIC8+CiAgPHJlY3QgeD0iNyIgeT0iNyIgd2lkdGg9IjUiIGhlaWdodD0iNSIgcng9IjEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/scan-qr-code\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst ScanQrCode = createLucideIcon('ScanQrCode', [\n ['path', { d: 'M17 12v4a1 1 0 0 1-1 1h-4', key: 'uk4fdo' }],\n ['path', { d: 'M17 3h2a2 2 0 0 1 2 2v2', key: '4qcy5o' }],\n ['path', { d: 'M17 8V7', key: 'q2g9wo' }],\n ['path', { d: 'M21 17v2a2 2 0 0 1-2 2h-2', key: '6vwrx8' }],\n ['path', { d: 'M3 7V5a2 2 0 0 1 2-2h2', key: 'aa7l1z' }],\n ['path', { d: 'M7 17h.01', key: '19xn7k' }],\n ['path', { d: 'M7 21H5a2 2 0 0 1-2-2v-2', key: 'ioqczr' }],\n ['rect', { x: '7', y: '7', width: '5', height: '5', rx: '1', key: 'm9kyts' }],\n]);\n\nexport default ScanQrCode;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,iBAAiB,YAAc,CAAA,CAAA,CAAA;AAAA,CAAA,CAChD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1D,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA0B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACvD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC1C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAG,KAAK,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAQ,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC9E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,44 @@
{
"name": "@eslint/js",
"version": "10.0.1",
"description": "ESLint JavaScript language implementation",
"funding": "https://eslint.org/donate",
"main": "./src/index.js",
"types": "./types/index.d.ts",
"scripts": {
"test:types": "tsc -p tests/types/tsconfig.json"
},
"files": [
"LICENSE",
"README.md",
"src",
"types"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/eslint/eslint.git",
"directory": "packages/js"
},
"homepage": "https://eslint.org",
"bugs": "https://github.com/eslint/eslint/issues/",
"keywords": [
"javascript",
"eslint-plugin",
"eslint"
],
"license": "MIT",
"peerDependencies": {
"eslint": "^10.0.0"
},
"peerDependenciesMeta": {
"eslint": {
"optional": true
}
},
"engines": {
"node": "^20.19.0 || ^22.13.0 || >=24"
}
}
@@ -0,0 +1,50 @@
declare var debug: debug.Debug & { debug: debug.Debug; default: debug.Debug };
export = debug;
export as namespace debug;
declare namespace debug {
interface Debug {
(namespace: string): Debugger;
coerce: (val: any) => any;
disable: () => string;
enable: (namespaces: string) => void;
enabled: (namespaces: string) => boolean;
formatArgs: (this: Debugger, args: any[]) => void;
log: (...args: any[]) => any;
selectColor: (namespace: string) => string | number;
humanize: typeof import("ms");
names: string[];
skips: string[];
formatters: Formatters;
inspectOpts?: {
hideDate?: boolean | number | null;
colors?: boolean | number | null;
depth?: boolean | number | null;
showHidden?: boolean | number | null;
};
}
type IDebug = Debug;
interface Formatters {
[formatter: string]: (v: any) => string;
}
type IDebugger = Debugger;
interface Debugger {
(formatter: any, ...args: any[]): void;
color: string;
diff: number;
enabled: boolean;
log: (...args: any[]) => any;
namespace: string;
destroy: () => boolean;
extend: (namespace: string, delimiter?: string) => Debugger;
}
}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"B","2":"_b","8":"_AL"},B:{"1":"_J"},C:{"1":"_CN _XC","2":"_g _6E _L"},D:{"1":"_7P _GC","2":"_dL","33":"Q _TJ _iN"},E:{"1":"_jB","2":"_u","33":"L"},F:{"1":"_a","2":"_T"},G:{"1":"_2","2":"_1","33":"fD"},H:{"2":"1D"},I:{"1":"_X","2":"_LB","8":"_oF"},J:{"1":"A","2":"D"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"B","8":"A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"Mutation Observer",D:true};
@@ -0,0 +1,28 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2017 = void 0;
const es2016_1 = require("./es2016");
const es2017_arraybuffer_1 = require("./es2017.arraybuffer");
const es2017_date_1 = require("./es2017.date");
const es2017_intl_1 = require("./es2017.intl");
const es2017_object_1 = require("./es2017.object");
const es2017_sharedmemory_1 = require("./es2017.sharedmemory");
const es2017_string_1 = require("./es2017.string");
const es2017_typedarrays_1 = require("./es2017.typedarrays");
exports.es2017 = {
libs: [
es2016_1.es2016,
es2017_arraybuffer_1.es2017_arraybuffer,
es2017_date_1.es2017_date,
es2017_intl_1.es2017_intl,
es2017_object_1.es2017_object,
es2017_sharedmemory_1.es2017_sharedmemory,
es2017_string_1.es2017_string,
es2017_typedarrays_1.es2017_typedarrays,
],
variables: [],
};
@@ -0,0 +1,22 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const PlaneLanding = createLucideIcon("PlaneLanding", [
["path", { d: "M2 22h20", key: "272qi7" }],
[
"path",
{
d: "M3.77 10.77 2 9l2-4.5 1.1.55c.55.28.9.84.9 1.45s.35 1.17.9 1.45L8 8.5l3-6 1.05.53a2 2 0 0 1 1.09 1.52l.72 5.4a2 2 0 0 0 1.09 1.52l4.4 2.2c.42.22.78.55 1.01.96l.6 1.03c.49.88-.06 1.98-1.06 2.1l-1.18.15c-.47.06-.95-.02-1.37-.24L4.29 11.15a2 2 0 0 1-.52-.38Z",
key: "1ma21e"
}
]
]);
export { PlaneLanding as default };
//# sourceMappingURL=plane-landing.js.map
@@ -0,0 +1 @@
{"version":3,"file":"trash.js","sources":["../../../src/icons/trash.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Trash\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMyA2aDE4IiAvPgogIDxwYXRoIGQ9Ik0xOSA2djE0YzAgMS0xIDItMiAySDdjLTEgMC0yLTEtMi0yVjYiIC8+CiAgPHBhdGggZD0iTTggNlY0YzAtMSAxLTIgMi0yaDRjMSAwIDIgMSAyIDJ2MiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/trash\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Trash = createLucideIcon('Trash', [\n ['path', { d: 'M3 6h18', key: 'd0wm0j' }],\n ['path', { d: 'M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6', key: '4alrt4' }],\n ['path', { d: 'M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2', key: 'v07s0e' }],\n]);\n\nexport default Trash;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CAAA,CACtC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAyC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACtE,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAsC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACrE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,717 @@
/**
* @fileoverview A rule to control the use of single variable declarations.
* @author Ian Christian Myers
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Determines whether the given node is in a statement list.
* @param {ASTNode} node node to check
* @returns {boolean} `true` if the given node is in a statement list
*/
function isInStatementList(node) {
return astUtils.STATEMENT_LIST_PARENTS.has(node.parent.type);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
docs: {
description:
"Enforce variables to be declared either together or separately in functions",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/one-var",
},
fixable: "code",
schema: [
{
oneOf: [
{
enum: ["always", "never", "consecutive"],
},
{
type: "object",
properties: {
separateRequires: {
type: "boolean",
},
var: {
enum: ["always", "never", "consecutive"],
},
let: {
enum: ["always", "never", "consecutive"],
},
const: {
enum: ["always", "never", "consecutive"],
},
using: {
enum: ["always", "never", "consecutive"],
},
awaitUsing: {
enum: ["always", "never", "consecutive"],
},
},
additionalProperties: false,
},
{
type: "object",
properties: {
initialized: {
enum: ["always", "never", "consecutive"],
},
uninitialized: {
enum: ["always", "never", "consecutive"],
},
},
additionalProperties: false,
},
],
},
],
messages: {
combineUninitialized:
"Combine this with the previous '{{type}}' statement with uninitialized variables.",
combineInitialized:
"Combine this with the previous '{{type}}' statement with initialized variables.",
splitUninitialized:
"Split uninitialized '{{type}}' declarations into multiple statements.",
splitInitialized:
"Split initialized '{{type}}' declarations into multiple statements.",
splitRequires:
"Split requires to be separated into a single block.",
combine: "Combine this with the previous '{{type}}' statement.",
split: "Split '{{type}}' declarations into multiple statements.",
},
},
create(context) {
const MODE_ALWAYS = "always";
const MODE_NEVER = "never";
const MODE_CONSECUTIVE = "consecutive";
const mode = context.options[0] || MODE_ALWAYS;
const options = {};
if (typeof mode === "string") {
// simple options configuration with just a string
options.var = { uninitialized: mode, initialized: mode };
options.let = { uninitialized: mode, initialized: mode };
options.const = { uninitialized: mode, initialized: mode };
options.using = { uninitialized: mode, initialized: mode };
options.awaitUsing = { uninitialized: mode, initialized: mode };
} else if (typeof mode === "object") {
// options configuration is an object
options.separateRequires = !!mode.separateRequires;
options.var = { uninitialized: mode.var, initialized: mode.var };
options.let = { uninitialized: mode.let, initialized: mode.let };
options.const = {
uninitialized: mode.const,
initialized: mode.const,
};
options.using = {
uninitialized: mode.using,
initialized: mode.using,
};
options.awaitUsing = {
uninitialized: mode.awaitUsing,
initialized: mode.awaitUsing,
};
if (Object.hasOwn(mode, "uninitialized")) {
options.var.uninitialized = mode.uninitialized;
options.let.uninitialized = mode.uninitialized;
options.const.uninitialized = mode.uninitialized;
options.using.uninitialized = mode.uninitialized;
options.awaitUsing.uninitialized = mode.uninitialized;
}
if (Object.hasOwn(mode, "initialized")) {
options.var.initialized = mode.initialized;
options.let.initialized = mode.initialized;
options.const.initialized = mode.initialized;
options.using.initialized = mode.initialized;
options.awaitUsing.initialized = mode.initialized;
}
}
const sourceCode = context.sourceCode;
//--------------------------------------------------------------------------
// Helpers
//--------------------------------------------------------------------------
const functionStack = [];
const blockStack = [];
/**
* Increments the blockStack counter.
* @returns {void}
* @private
*/
function startBlock() {
blockStack.push({
let: { initialized: false, uninitialized: false },
const: { initialized: false, uninitialized: false },
using: { initialized: false, uninitialized: false },
awaitUsing: { initialized: false, uninitialized: false },
});
}
/**
* Increments the functionStack counter.
* @returns {void}
* @private
*/
function startFunction() {
functionStack.push({ initialized: false, uninitialized: false });
startBlock();
}
/**
* Decrements the blockStack counter.
* @returns {void}
* @private
*/
function endBlock() {
blockStack.pop();
}
/**
* Decrements the functionStack counter.
* @returns {void}
* @private
*/
function endFunction() {
functionStack.pop();
endBlock();
}
/**
* Check if a variable declaration is a require.
* @param {ASTNode} decl variable declaration Node
* @returns {bool} if decl is a require, return true; else return false.
* @private
*/
function isRequire(decl) {
return (
decl.init &&
decl.init.type === "CallExpression" &&
decl.init.callee.name === "require"
);
}
/**
* Records whether initialized/uninitialized/required variables are defined in current scope.
* @param {string} statementType one of: "var", "let", "const", "using", or "awaitUsing"
* @param {ASTNode[]} declarations List of declarations
* @param {Object} currentScope The scope being investigated
* @returns {void}
* @private
*/
function recordTypes(statementType, declarations, currentScope) {
for (let i = 0; i < declarations.length; i++) {
if (declarations[i].init === null) {
if (
options[statementType] &&
options[statementType].uninitialized === MODE_ALWAYS
) {
currentScope.uninitialized = true;
}
} else {
if (
options[statementType] &&
options[statementType].initialized === MODE_ALWAYS
) {
if (
options.separateRequires &&
isRequire(declarations[i])
) {
currentScope.required = true;
} else {
currentScope.initialized = true;
}
}
}
}
}
/**
* Determines the current scope (function or block)
* @param {string} statementType one of: "var", "let", "const", "using", or "awaitUsing"
* @returns {Object} The scope associated with statementType
*/
function getCurrentScope(statementType) {
let currentScope;
if (statementType === "var") {
currentScope = functionStack.at(-1);
} else if (statementType === "let") {
currentScope = blockStack.at(-1).let;
} else if (statementType === "const") {
currentScope = blockStack.at(-1).const;
} else if (statementType === "using") {
currentScope = blockStack.at(-1).using;
} else if (statementType === "awaitUsing") {
currentScope = blockStack.at(-1).awaitUsing;
}
return currentScope;
}
/**
* Counts the number of initialized and uninitialized declarations in a list of declarations
* @param {ASTNode[]} declarations List of declarations
* @returns {Object} Counts of 'uninitialized' and 'initialized' declarations
* @private
*/
function countDeclarations(declarations) {
const counts = { uninitialized: 0, initialized: 0 };
for (let i = 0; i < declarations.length; i++) {
if (declarations[i].init === null) {
counts.uninitialized++;
} else {
counts.initialized++;
}
}
return counts;
}
/**
* Determines if there is more than one var statement in the current scope.
* @param {string} statementType one of: "var", "let", "const", "using", or "awaitUsing"
* @param {ASTNode[]} declarations List of declarations
* @returns {boolean} Returns true if it is the first var declaration, false if not.
* @private
*/
function hasOnlyOneStatement(statementType, declarations) {
const declarationCounts = countDeclarations(declarations);
const currentOptions = options[statementType] || {};
const currentScope = getCurrentScope(statementType);
const hasRequires = declarations.some(isRequire);
if (
currentOptions.uninitialized === MODE_ALWAYS &&
currentOptions.initialized === MODE_ALWAYS
) {
if (currentScope.uninitialized || currentScope.initialized) {
if (!hasRequires) {
return false;
}
}
}
if (declarationCounts.uninitialized > 0) {
if (
currentOptions.uninitialized === MODE_ALWAYS &&
currentScope.uninitialized
) {
return false;
}
}
if (declarationCounts.initialized > 0) {
if (
currentOptions.initialized === MODE_ALWAYS &&
currentScope.initialized
) {
if (!hasRequires) {
return false;
}
}
}
if (currentScope.required && hasRequires) {
return false;
}
recordTypes(statementType, declarations, currentScope);
return true;
}
/**
* Fixer to join VariableDeclaration's into a single declaration
* @param {VariableDeclarator[]} declarations The `VariableDeclaration` to join
* @returns {Function} The fixer function
*/
function joinDeclarations(declarations) {
const declaration = declarations[0];
const body = Array.isArray(declaration.parent.parent.body)
? declaration.parent.parent.body
: [];
const currentIndex = body.findIndex(
node => node.range[0] === declaration.parent.range[0],
);
const previousNode = body[currentIndex - 1];
return function* joinDeclarationsFixer(fixer) {
const type = sourceCode.getFirstToken(declaration.parent);
const beforeType = sourceCode.getTokenBefore(type);
if (
previousNode &&
previousNode.kind === declaration.parent.kind
) {
if (beforeType.value === ";") {
yield fixer.replaceText(beforeType, ",");
} else {
yield fixer.insertTextAfter(beforeType, ",");
}
if (declaration.parent.kind === "await using") {
const usingToken = sourceCode.getTokenAfter(type);
yield fixer.remove(usingToken);
}
yield fixer.replaceText(type, "");
}
};
}
/**
* Fixer to split a VariableDeclaration into individual declarations
* @param {VariableDeclaration} declaration The `VariableDeclaration` to split
* @returns {Function|null} The fixer function
*/
function splitDeclarations(declaration) {
const { parent } = declaration;
// don't autofix code such as: if (foo) var x, y;
if (
!isInStatementList(
parent.type === "ExportNamedDeclaration"
? parent
: declaration,
)
) {
return null;
}
return fixer =>
declaration.declarations
.map(declarator => {
const tokenAfterDeclarator =
sourceCode.getTokenAfter(declarator);
if (tokenAfterDeclarator === null) {
return null;
}
const afterComma = sourceCode.getTokenAfter(
tokenAfterDeclarator,
{ includeComments: true },
);
if (tokenAfterDeclarator.value !== ",") {
return null;
}
const exportPlacement =
declaration.parent.type === "ExportNamedDeclaration"
? "export "
: "";
/*
* `var x,y`
* tokenAfterDeclarator ^^ afterComma
*/
if (
afterComma.range[0] ===
tokenAfterDeclarator.range[1]
) {
return fixer.replaceText(
tokenAfterDeclarator,
`; ${exportPlacement}${declaration.kind} `,
);
}
/*
* `var x,
* tokenAfterDeclarator ^
* y`
* ^ afterComma
*/
if (
afterComma.loc.start.line >
tokenAfterDeclarator.loc.end.line ||
afterComma.type === "Line" ||
afterComma.type === "Block"
) {
let lastComment = afterComma;
while (
lastComment.type === "Line" ||
lastComment.type === "Block"
) {
lastComment = sourceCode.getTokenAfter(
lastComment,
{ includeComments: true },
);
}
return fixer.replaceTextRange(
[
tokenAfterDeclarator.range[0],
lastComment.range[0],
],
`;${sourceCode.text.slice(
tokenAfterDeclarator.range[1],
lastComment.range[0],
)}${exportPlacement}${declaration.kind} `,
);
}
return fixer.replaceText(
tokenAfterDeclarator,
`; ${exportPlacement}${declaration.kind}`,
);
})
.filter(x => x);
}
/**
* Checks a given VariableDeclaration node for errors.
* @param {ASTNode} node The VariableDeclaration node to check
* @returns {void}
* @private
*/
function checkVariableDeclaration(node) {
const parent = node.parent;
const type = node.kind;
const key = type === "await using" ? "awaitUsing" : type;
if (!options[key]) {
return;
}
const declarations = node.declarations;
const declarationCounts = countDeclarations(declarations);
const mixedRequires =
declarations.some(isRequire) && !declarations.every(isRequire);
if (options[key].initialized === MODE_ALWAYS) {
if (options.separateRequires && mixedRequires) {
context.report({
node,
messageId: "splitRequires",
});
}
}
// consecutive
const nodeIndex =
(parent.body &&
parent.body.length > 0 &&
parent.body.indexOf(node)) ||
0;
if (nodeIndex > 0) {
const previousNode = parent.body[nodeIndex - 1];
const isPreviousNodeDeclaration =
previousNode.type === "VariableDeclaration";
const declarationsWithPrevious = declarations.concat(
previousNode.declarations || [],
);
if (
isPreviousNodeDeclaration &&
previousNode.kind === type &&
!(
declarationsWithPrevious.some(isRequire) &&
!declarationsWithPrevious.every(isRequire)
)
) {
const previousDeclCounts = countDeclarations(
previousNode.declarations,
);
if (
options[key].initialized === MODE_CONSECUTIVE &&
options[key].uninitialized === MODE_CONSECUTIVE
) {
context.report({
node,
messageId: "combine",
data: {
type,
},
fix: joinDeclarations(declarations),
});
} else if (
options[key].initialized === MODE_CONSECUTIVE &&
declarationCounts.initialized > 0 &&
previousDeclCounts.initialized > 0
) {
context.report({
node,
messageId: "combineInitialized",
data: {
type,
},
fix: joinDeclarations(declarations),
});
} else if (
options[key].uninitialized === MODE_CONSECUTIVE &&
declarationCounts.uninitialized > 0 &&
previousDeclCounts.uninitialized > 0
) {
context.report({
node,
messageId: "combineUninitialized",
data: {
type,
},
fix: joinDeclarations(declarations),
});
}
}
}
// always
if (!hasOnlyOneStatement(key, declarations)) {
if (
options[key].initialized === MODE_ALWAYS &&
options[key].uninitialized === MODE_ALWAYS
) {
context.report({
node,
messageId: "combine",
data: {
type,
},
fix: joinDeclarations(declarations),
});
} else {
if (
options[key].initialized === MODE_ALWAYS &&
declarationCounts.initialized > 0
) {
context.report({
node,
messageId: "combineInitialized",
data: {
type,
},
fix: joinDeclarations(declarations),
});
}
if (
options[key].uninitialized === MODE_ALWAYS &&
declarationCounts.uninitialized > 0
) {
if (
node.parent.left === node &&
(node.parent.type === "ForInStatement" ||
node.parent.type === "ForOfStatement")
) {
return;
}
context.report({
node,
messageId: "combineUninitialized",
data: {
type,
},
fix: joinDeclarations(declarations),
});
}
}
}
// never
if (parent.type !== "ForStatement" || parent.init !== node) {
const totalDeclarations =
declarationCounts.uninitialized +
declarationCounts.initialized;
if (totalDeclarations > 1) {
if (
options[key].initialized === MODE_NEVER &&
options[key].uninitialized === MODE_NEVER
) {
// both initialized and uninitialized
context.report({
node,
messageId: "split",
data: {
type,
},
fix: splitDeclarations(node),
});
} else if (
options[key].initialized === MODE_NEVER &&
declarationCounts.initialized > 0
) {
// initialized
context.report({
node,
messageId: "splitInitialized",
data: {
type,
},
fix: splitDeclarations(node),
});
} else if (
options[key].uninitialized === MODE_NEVER &&
declarationCounts.uninitialized > 0
) {
// uninitialized
context.report({
node,
messageId: "splitUninitialized",
data: {
type,
},
fix: splitDeclarations(node),
});
}
}
}
}
//--------------------------------------------------------------------------
// Public API
//--------------------------------------------------------------------------
return {
Program: startFunction,
FunctionDeclaration: startFunction,
FunctionExpression: startFunction,
ArrowFunctionExpression: startFunction,
StaticBlock: startFunction, // StaticBlock creates a new scope for `var` variables
BlockStatement: startBlock,
ForStatement: startBlock,
ForInStatement: startBlock,
ForOfStatement: startBlock,
SwitchStatement: startBlock,
VariableDeclaration: checkVariableDeclaration,
"ForStatement:exit": endBlock,
"ForOfStatement:exit": endBlock,
"ForInStatement:exit": endBlock,
"SwitchStatement:exit": endBlock,
"BlockStatement:exit": endBlock,
"Program:exit": endFunction,
"FunctionDeclaration:exit": endFunction,
"FunctionExpression:exit": endFunction,
"ArrowFunctionExpression:exit": endFunction,
"StaticBlock:exit": endFunction,
};
},
};
@@ -0,0 +1,21 @@
import { ConsolaInstance, ConsolaOptions } from './core.mjs';
export { ConfirmPromptOptions, Consola, ConsolaReporter, FormatOptions, InputLogObject, LogLevel, LogLevels, LogObject, LogType, LogTypes, MultiSelectOptions, PromptOptions, SelectPromptOptions, TextPromptOptions } from './core.mjs';
/**
* Factory function to create a new Consola instance
*
* @param {Partial<ConsolaOptions & { fancy: boolean }>} [options={}] - Optional configuration options. See {@link ConsolaOptions}.
* @returns {ConsolaInstance} A new Consola instance configured with the given options.
*/
declare function createConsola(options?: Partial<ConsolaOptions & {
fancy: boolean;
}>): ConsolaInstance;
/**
* Creates and exports a standard instance of Consola with the default configuration.
* This instance can be used directly for logging throughout the application.
*
* @type {ConsolaInstance} consola - The default instance of Consola.
*/
declare const consola: ConsolaInstance;
export { ConsolaInstance, ConsolaOptions, consola, createConsola, consola as default };
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Rows4 = createLucideIcon("Rows4", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
["path", { d: "M21 7.5H3", key: "1hm9pq" }],
["path", { d: "M21 12H3", key: "2avoz0" }],
["path", { d: "M21 16.5H3", key: "n7jzkj" }]
]);
export { Rows4 as default };
//# sourceMappingURL=rows-4.js.map
@@ -0,0 +1 @@
{"version":3,"file":"move-down-left.js","sources":["../../../src/icons/move-down-left.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MoveDownLeft\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgMTlINVYxMyIgLz4KICA8cGF0aCBkPSJNMTkgNUw1IDE5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/move-down-left\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst MoveDownLeft = createLucideIcon('MoveDownLeft', [\n ['path', { d: 'M11 19H5V13', key: '1akmht' }],\n ['path', { d: 'M19 5L5 19', key: '72u4yj' }],\n]);\n\nexport default MoveDownLeft;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAe,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAc,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC7C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,71 @@
# get-intrinsic <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
[![github actions][actions-image]][actions-url]
[![coverage][codecov-image]][codecov-url]
[![dependency status][deps-svg]][deps-url]
[![dev dependency status][dev-deps-svg]][dev-deps-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url]
[![npm badge][npm-badge-png]][package-url]
Get and robustly cache all JS language-level intrinsics at first require time.
See the syntax described [in the JS spec](https://tc39.es/ecma262/#sec-well-known-intrinsic-objects) for reference.
## Example
```js
var GetIntrinsic = require('get-intrinsic');
var assert = require('assert');
// static methods
assert.equal(GetIntrinsic('%Math.pow%'), Math.pow);
assert.equal(Math.pow(2, 3), 8);
assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8);
delete Math.pow;
assert.equal(GetIntrinsic('%Math.pow%')(2, 3), 8);
// instance methods
var arr = [1];
assert.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push);
assert.deepEqual(arr, [1]);
arr.push(2);
assert.deepEqual(arr, [1, 2]);
GetIntrinsic('%Array.prototype.push%').call(arr, 3);
assert.deepEqual(arr, [1, 2, 3]);
delete Array.prototype.push;
GetIntrinsic('%Array.prototype.push%').call(arr, 4);
assert.deepEqual(arr, [1, 2, 3, 4]);
// missing features
delete JSON.parse; // to simulate a real intrinsic that is missing in the environment
assert.throws(() => GetIntrinsic('%JSON.parse%'));
assert.equal(undefined, GetIntrinsic('%JSON.parse%', true));
```
## 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/get-intrinsic
[npm-version-svg]: https://versionbadg.es/ljharb/get-intrinsic.svg
[deps-svg]: https://david-dm.org/ljharb/get-intrinsic.svg
[deps-url]: https://david-dm.org/ljharb/get-intrinsic
[dev-deps-svg]: https://david-dm.org/ljharb/get-intrinsic/dev-status.svg
[dev-deps-url]: https://david-dm.org/ljharb/get-intrinsic#info=devDependencies
[npm-badge-png]: https://nodei.co/npm/get-intrinsic.png?downloads=true&stars=true
[license-image]: https://img.shields.io/npm/l/get-intrinsic.svg
[license-url]: LICENSE
[downloads-image]: https://img.shields.io/npm/dm/get-intrinsic.svg
[downloads-url]: https://npm-stat.com/charts.html?package=get-intrinsic
[codecov-image]: https://codecov.io/gh/ljharb/get-intrinsic/branch/main/graphs/badge.svg
[codecov-url]: https://app.codecov.io/gh/ljharb/get-intrinsic/
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/get-intrinsic
[actions-url]: https://github.com/ljharb/get-intrinsic/actions
@@ -0,0 +1,8 @@
type AnyFunction = (...args: any[]) => any;
/**
* Designed to approximate the behavior on `experimental_useEffectEvent` as best
* as possible until its stable release, and back-fill it as a shim as needed.
*/
declare function useEffectEvent<T extends AnyFunction>(callback?: T): T;
export { useEffectEvent };
@@ -0,0 +1,147 @@
import { MatcherBaseClass, MatchOptions, RepeatMatch } from '../../types'
import Scoring from '../../scoring'
import Matching from '../../Matching'
import Options from '../../Options'
import { MaybePromise } from 'rollup'
/*
*-------------------------------------------------------------------------------
* repeats (aaa, abcabcabc) ------------------------------
*-------------------------------------------------------------------------------
*/
class MatchRepeat extends MatcherBaseClass {
private scoring: Scoring
constructor(options: Options) {
super(options)
this.scoring = new Scoring(options)
}
// eslint-disable-next-line max-statements
match({ password, omniMatch }: MatchOptions) {
const matches: (RepeatMatch | Promise<RepeatMatch>)[] = []
let lastIndex = 0
while (lastIndex < password.length) {
const greedyMatch = this.getGreedyMatch(password, lastIndex)
const lazyMatch = this.getLazyMatch(password, lastIndex)
if (greedyMatch == null) {
break
}
const { match, baseToken } = this.setMatchToken(greedyMatch, lazyMatch)
if (match) {
const j = match.index + match[0].length - 1
const baseGuesses = this.getBaseGuesses(baseToken, omniMatch)
matches.push(this.normalizeMatch(baseToken, j, match, baseGuesses))
lastIndex = j + 1
}
}
const hasPromises = matches.some((match) => {
return match instanceof Promise
})
if (hasPromises) {
// eslint-disable-next-line @typescript-eslint/await-thenable
return Promise.all(matches)
}
return matches as RepeatMatch[]
}
// eslint-disable-next-line max-params
normalizeMatch(
baseToken: string,
j: number,
match: RegExpExecArray,
baseGuesses: number | Promise<number>,
): MaybePromise<RepeatMatch> {
const baseMatch: RepeatMatch = {
pattern: 'repeat',
i: match.index,
j,
token: match[0],
baseToken,
baseGuesses: 0,
repeatCount: match[0].length / baseToken.length,
}
if (baseGuesses instanceof Promise) {
return baseGuesses.then((resolvedBaseGuesses) => {
return {
...baseMatch,
baseGuesses: resolvedBaseGuesses,
}
})
}
return {
...baseMatch,
baseGuesses,
}
}
getGreedyMatch(password: string, lastIndex: number) {
const greedy = /(.+)\1+/g
greedy.lastIndex = lastIndex
return greedy.exec(password)
}
getLazyMatch(password: string, lastIndex: number) {
const lazy = /(.+?)\1+/g
lazy.lastIndex = lastIndex
return lazy.exec(password)
}
setMatchToken(
greedyMatch: RegExpExecArray,
lazyMatch: RegExpExecArray | null,
) {
const lazyAnchored = /^(.+?)\1+$/
let match
let baseToken = ''
if (lazyMatch && greedyMatch[0].length > lazyMatch[0].length) {
// greedy beats lazy for 'aabaab'
// greedy: [aabaab, aab]
// lazy: [aa, a]
match = greedyMatch
// greedy's repeated string might itself be repeated, eg.
// aabaab in aabaabaabaab.
// run an anchored lazy match on greedy's repeated string
// to find the shortest repeated string
const temp = lazyAnchored.exec(match[0])
if (temp) {
baseToken = temp[1]
}
} else {
// lazy beats greedy for 'aaaaa'
// greedy: [aaaa, aa]
// lazy: [aaaaa, a]
match = lazyMatch
if (match) {
baseToken = match[1]
}
}
return {
match,
baseToken,
}
}
getBaseGuesses(baseToken: string, omniMatch: Matching) {
const matches = omniMatch.match(baseToken)
if (matches instanceof Promise) {
return matches.then((resolvedMatches) => {
const baseAnalysis = this.scoring.mostGuessableMatchSequence(
baseToken,
resolvedMatches,
)
return baseAnalysis.guesses
})
}
const baseAnalysis = this.scoring.mostGuessableMatchSequence(
baseToken,
matches,
)
return baseAnalysis.guesses
}
}
export default MatchRepeat
@@ -0,0 +1,118 @@
'use strict';
var childProcess = require('child_process');
var spawn = childProcess.spawn;
var exec = childProcess.exec;
module.exports = function (pid, signal, callback) {
if (typeof signal === 'function' && callback === undefined) {
callback = signal;
signal = undefined;
}
pid = parseInt(pid);
if (Number.isNaN(pid)) {
if (callback) {
return callback(new Error("pid must be a number"));
} else {
throw new Error("pid must be a number");
}
}
var tree = {};
var pidsToProcess = {};
tree[pid] = [];
pidsToProcess[pid] = 1;
switch (process.platform) {
case 'win32':
exec('taskkill /pid ' + pid + ' /T /F', callback);
break;
case 'darwin':
buildProcessTree(pid, tree, pidsToProcess, function (parentPid) {
return spawn('pgrep', ['-P', parentPid]);
}, function () {
killAll(tree, signal, callback);
});
break;
// case 'sunos':
// buildProcessTreeSunOS(pid, tree, pidsToProcess, function () {
// killAll(tree, signal, callback);
// });
// break;
default: // Linux
buildProcessTree(pid, tree, pidsToProcess, function (parentPid) {
return spawn('ps', ['-o', 'pid', '--no-headers', '--ppid', parentPid]);
}, function () {
killAll(tree, signal, callback);
});
break;
}
};
function killAll (tree, signal, callback) {
var killed = {};
try {
Object.keys(tree).forEach(function (pid) {
tree[pid].forEach(function (pidpid) {
if (!killed[pidpid]) {
killPid(pidpid, signal);
killed[pidpid] = 1;
}
});
if (!killed[pid]) {
killPid(pid, signal);
killed[pid] = 1;
}
});
} catch (err) {
if (callback) {
return callback(err);
} else {
throw err;
}
}
if (callback) {
return callback();
}
}
function killPid(pid, signal) {
try {
process.kill(parseInt(pid, 10), signal);
}
catch (err) {
if (err.code !== 'ESRCH') throw err;
}
}
function buildProcessTree (parentPid, tree, pidsToProcess, spawnChildProcessesList, cb) {
var ps = spawnChildProcessesList(parentPid);
var allData = '';
ps.stdout.on('data', function (data) {
var data = data.toString('ascii');
allData += data;
});
var onClose = function (code) {
delete pidsToProcess[parentPid];
if (code != 0) {
// no more parent processes
if (Object.keys(pidsToProcess).length == 0) {
cb();
}
return;
}
allData.match(/\d+/g).forEach(function (pid) {
pid = parseInt(pid, 10);
tree[parentPid].push(pid);
tree[pid] = [];
pidsToProcess[pid] = 1;
buildProcessTree(pid, tree, pidsToProcess, spawnChildProcessesList, cb);
});
};
ps.on('close', onClose);
}
@@ -0,0 +1,24 @@
'use strict'
exports.fromCallback = function (fn) {
return Object.defineProperty(function (...args) {
if (typeof args[args.length - 1] === 'function') fn.apply(this, args)
else {
return new Promise((resolve, reject) => {
args.push((err, res) => (err != null) ? reject(err) : resolve(res))
fn.apply(this, args)
})
}
}, 'name', { value: fn.name })
}
exports.fromPromise = function (fn) {
return Object.defineProperty(function (...args) {
const cb = args[args.length - 1]
if (typeof cb !== 'function') return fn.apply(this, args)
else {
args.pop()
fn.apply(this, args).then(r => cb(null, r), cb)
}
}, 'name', { value: fn.name })
}
@@ -0,0 +1,62 @@
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const require_utils_url = require("../../utils/url.js");
const require_utils_compress = require("../../utils/compress.js");
const require_utils_mime = require("../../utils/mime.js");
const require_middleware_serve_static_path = require("./path.js");
//#region src/middleware/serve-static/index.ts
const ENCODINGS = {
br: ".br",
zstd: ".zst",
gzip: ".gz"
};
const ENCODINGS_ORDERED_KEYS = Object.keys(ENCODINGS);
const DEFAULT_DOCUMENT = "index.html";
/**
* This middleware is not directly used by the user. Create a wrapper specifying `getContent()` by the environment such as Deno or Bun.
*/
const serveStatic = (options) => {
const root = options.root ?? "./";
const optionPath = options.path;
const join = options.join ?? require_middleware_serve_static_path.defaultJoin;
return async (c, next) => {
if (c.finalized) return next();
let filename;
if (options.path) filename = options.path;
else try {
if (!options.allowPercentInPath && c.req.path.includes("%")) throw new Error();
filename = require_utils_url.tryDecodeURI(c.req.path);
if (/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(filename)) throw new Error();
} catch {
await options.onNotFound?.(c.req.path, c);
return next();
}
let path = join(root, !optionPath && options.rewriteRequestPath ? options.rewriteRequestPath(filename) : filename);
if (options.isDir && await options.isDir(path)) path = join(path, DEFAULT_DOCUMENT);
const getContent = options.getContent;
let content = await getContent(path, c);
if (content instanceof Response) return c.newResponse(content.body, content);
if (content != null) {
const mimeType = options.mimes && require_utils_mime.getMimeType(path, options.mimes) || require_utils_mime.getMimeType(path);
c.header("Content-Type", mimeType || "application/octet-stream");
if (options.precompressed && (!mimeType || require_utils_compress.COMPRESSIBLE_CONTENT_TYPE_REGEX.test(mimeType))) {
const acceptEncodingSet = new Set(c.req.header("Accept-Encoding")?.split(",").map((encoding) => encoding.trim()));
for (const encoding of ENCODINGS_ORDERED_KEYS) {
if (!acceptEncodingSet.has(encoding)) continue;
const compressedContent = await getContent(path + ENCODINGS[encoding], c);
if (compressedContent) {
content = compressedContent;
c.header("Content-Encoding", encoding);
c.header("Vary", "Accept-Encoding", { append: true });
break;
}
}
}
await options.onFound?.(path, c);
return c.body(content);
}
await options.onNotFound?.(path, c);
await next();
};
};
//#endregion
exports.serveStatic = serveStatic;
@@ -0,0 +1,47 @@
import { InspectOptions } from "node:util";
//#region src/types.d.ts
interface InspectOptions$1 extends InspectOptions {
hideDate?: boolean;
}
/**
* Map of special "%n" handling functions, for the debug "format" argument.
*
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
*/
interface Formatters {
[formatter: string]: (this: Debugger, v: any) => string;
}
interface Debugger extends Required<DebugOptions> {
(formatter: any, ...args: any[]): void;
namespace: string;
enabled: boolean;
extend: (namespace: string, delimiter?: string) => Debugger;
}
interface DebugOptions {
useColors?: boolean;
color?: string | number;
formatArgs?: (this: Debugger, diff: number, args: [string, ...any[]]) => void;
formatters?: Formatters;
/** Node.js only */
inspectOpts?: InspectOptions$1;
/** Humanize a duration in milliseconds */
humanize?: (value: number) => string;
log?: (this: Debugger, ...args: any[]) => void;
}
//#endregion
//#region src/core.d.ts
/**
* Returns a string of the currently enabled debug namespaces.
*/
declare function namespaces(): string;
/**
* Disable debug output.
*/
declare function disable(): string;
/**
* Returns true if the given mode name is enabled, false otherwise.
*/
declare function enabled(name: string): boolean;
//#endregion
export { Debugger as a, DebugOptions as i, enabled as n, Formatters as o, namespaces as r, InspectOptions$1 as s, disable as t };
@@ -0,0 +1 @@
"use strict";var q=Object.defineProperty;var r=(i,u)=>q(i,"name",{value:u,configurable:!0});var t=require("./get-pipe-path-BoR10qr8.cjs"),e=require("./esm/index.cjs");require("module"),require("node:path"),require("./temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:worker_threads"),require("./node-features-roYmp9jK.cjs"),require("./register-2sWVXuRQ.cjs"),require("node:module"),require("./register-D46fvsV_.cjs"),require("node:url"),require("get-tsconfig"),require("node:fs"),require("./index-gckBtVBf.cjs"),require("esbuild"),require("node:crypto"),require("./client-D6NvIMSC.cjs"),require("node:net"),require("node:util"),require("./index-BWFBUo6r.cjs"),require("./require-D4F1Lv60.cjs"),require("node:fs/promises"),t.require("./cjs/index.cjs"),exports.globalPreload=e.globalPreload,exports.initialize=e.initialize,Object.defineProperty(exports,"load",{enumerable:!0,get:r(function(){return e.load},"get")}),Object.defineProperty(exports,"resolve",{enumerable:!0,get:r(function(){return e.resolve},"get")});
@@ -0,0 +1,18 @@
/**
* @license lucide-react v0.469.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/
import createLucideIcon from '../createLucideIcon.js';
const Computer = createLucideIcon("Computer", [
["rect", { width: "14", height: "8", x: "5", y: "2", rx: "2", key: "wc9tft" }],
["rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", key: "w68u3i" }],
["path", { d: "M6 18h2", key: "rwmk9e" }],
["path", { d: "M12 18h6", key: "aqd8w3" }]
]);
export { Computer as default };
//# sourceMappingURL=computer.js.map
@@ -0,0 +1 @@
{"version":3,"file":"RawStream.cjs","names":[],"sources":["../../../../src/ssr/serializer/RawStream.ts"],"sourcesContent":["import { createPlugin, createStream } from 'seroval'\nimport type { PluginData, PluginInfo, SerovalNode } from 'seroval'\n\n/**\n * Hint for RawStream encoding strategy during SSR serialization.\n * - 'binary': Always use base64 encoding (best for binary data like files, images)\n * - 'text': Try UTF-8 first, fallback to base64 (best for text-heavy data like RSC payloads)\n */\nexport type RawStreamHint = 'binary' | 'text'\n\n/**\n * Options for RawStream configuration.\n */\nexport interface RawStreamOptions {\n /**\n * Encoding hint for SSR serialization.\n * - 'binary' (default): Always use base64 encoding\n * - 'text': Try UTF-8 first, fallback to base64 for invalid UTF-8 chunks\n */\n hint?: RawStreamHint\n}\n\n/**\n * Marker class for ReadableStream<Uint8Array> that should be serialized\n * with base64 encoding (SSR) or binary framing (server functions).\n *\n * Wrap your binary streams with this to get efficient serialization:\n * ```ts\n * // For binary data (files, images, etc.)\n * return { data: new RawStream(file.stream()) }\n *\n * // For text-heavy data (RSC payloads, etc.)\n * return { data: new RawStream(rscStream, { hint: 'text' }) }\n * ```\n */\nexport class RawStream {\n public readonly hint: RawStreamHint\n\n constructor(\n public readonly stream: ReadableStream<Uint8Array>,\n options?: RawStreamOptions,\n ) {\n this.hint = options?.hint ?? 'binary'\n }\n}\n\n/**\n * Callback type for RPC plugin to register raw streams with multiplexer\n */\nexport type OnRawStreamCallback = (\n streamId: number,\n stream: ReadableStream<Uint8Array>,\n) => void\n\n// Base64 helpers used in both Node and browser.\n// In Node-like runtimes, prefer Buffer for speed and compatibility.\nconst BufferCtor: any = (globalThis as any).Buffer\nconst hasNodeBuffer = !!BufferCtor && typeof BufferCtor.from === 'function'\n\nfunction uint8ArrayToBase64(bytes: Uint8Array): string {\n if (bytes.length === 0) return ''\n\n if (hasNodeBuffer) {\n return BufferCtor.from(bytes).toString('base64')\n }\n\n // Browser fallback: chunked String.fromCharCode + btoa\n const CHUNK_SIZE = 0x8000 // 32KB chunks to avoid stack overflow\n const chunks: Array<string> = []\n for (let i = 0; i < bytes.length; i += CHUNK_SIZE) {\n const chunk = bytes.subarray(i, i + CHUNK_SIZE)\n chunks.push(String.fromCharCode.apply(null, chunk as any))\n }\n return btoa(chunks.join(''))\n}\n\nfunction base64ToUint8Array(base64: string): Uint8Array {\n if (base64.length === 0) return new Uint8Array(0)\n\n if (hasNodeBuffer) {\n const buf = BufferCtor.from(base64, 'base64')\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength)\n }\n\n const binary = atob(base64)\n const bytes = new Uint8Array(binary.length)\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i)\n }\n return bytes\n}\n\n// Factory sentinels - use null-proto objects to avoid prototype surprises\nconst RAW_STREAM_FACTORY_BINARY: Record<string, never> = Object.create(null)\nconst RAW_STREAM_FACTORY_TEXT: Record<string, never> = Object.create(null)\n\n// Factory constructor for binary mode - converts seroval stream to ReadableStream<Uint8Array>\n// All chunks are base64 encoded strings\nconst RAW_STREAM_FACTORY_CONSTRUCTOR_BINARY = (\n stream: ReturnType<typeof createStream>,\n) =>\n new ReadableStream<Uint8Array>({\n start(controller) {\n stream.on({\n next(base64: string) {\n try {\n controller.enqueue(base64ToUint8Array(base64))\n } catch {\n // Stream may be closed\n }\n },\n throw(error: unknown) {\n controller.error(error)\n },\n return() {\n try {\n controller.close()\n } catch {\n // Stream may already be closed\n }\n },\n })\n },\n })\n\n// Factory constructor for text mode - converts seroval stream to ReadableStream<Uint8Array>\n// Chunks are either strings (UTF-8) or { $b64: string } (base64 fallback)\n// Use module-level TextEncoder to avoid per-factory allocation\nconst textEncoderForFactory = new TextEncoder()\nconst RAW_STREAM_FACTORY_CONSTRUCTOR_TEXT = (\n stream: ReturnType<typeof createStream>,\n) => {\n return new ReadableStream<Uint8Array>({\n start(controller) {\n stream.on({\n next(value: string | { $b64: string }) {\n try {\n if (typeof value === 'string') {\n controller.enqueue(textEncoderForFactory.encode(value))\n } else {\n controller.enqueue(base64ToUint8Array(value.$b64))\n }\n } catch {\n // Stream may be closed\n }\n },\n throw(error: unknown) {\n controller.error(error)\n },\n return() {\n try {\n controller.closLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"auth-utils.js","sourceRoot":"","sources":["../../../src/shared/auth-utils.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAOH,4DAIC;AAWD,oDA8BC;AAlDD;;;;GAIG;AACH,SAAgB,wBAAwB,CAAC,GAAiB;IACtD,MAAM,WAAW,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC/E,WAAW,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC,kBAAkB;IACzC,OAAO,WAAW,CAAC;AACvB,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAAC,EACjC,iBAAiB,EACjB,kBAAkB,EAIrB;IACG,MAAM,SAAS,GAAG,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACvH,MAAM,UAAU,GAAG,OAAO,kBAAkB,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAE3H,gDAAgD;IAChD,IAAI,SAAS,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,wDAAwD;IACxD,IAAI,SAAS,CAAC,QAAQ,CAAC,MAAM,GAAG,UAAU,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACzD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,8DAA8D;IAC9D,qDAAqD;IACrD,mEAAmE;IACnE,8DAA8D;IAC9D,kEAAkE;IAClE,4DAA4D;IAC5D,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,GAAG,GAAG,CAAC;IACvG,MAAM,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,GAAG,GAAG,CAAC;IAE3G,OAAO,aAAa,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,2 @@
import type { LibDefinition } from '../variable';
export declare const es2022_array: LibDefinition;
@@ -0,0 +1 @@
{"version":3,"file":"monitor-down.js","sources":["../../../src/icons/monitor-down.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name MonitorDown\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTIgMTNWNyIgLz4KICA8cGF0aCBkPSJtMTUgMTAtMyAzLTMtMyIgLz4KICA8cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTQiIHg9IjIiIHk9IjMiIHJ4PSIyIiAvPgogIDxwYXRoIGQ9Ik0xMiAxN3Y0IiAvPgogIDxwYXRoIGQ9Ik04IDIxaDgiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/monitor-down\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst MonitorDown = createLucideIcon('MonitorDown', [\n ['path', { d: 'M12 13V7', key: 'h0r20n' }],\n ['path', { d: 'm15 10-3 3-3-3', key: 'lzhmyn' }],\n ['rect', { width: '20', height: '14', x: '2', y: '3', rx: '2', key: '48i651' }],\n ['path', { d: 'M12 17v4', key: '1riwvh' }],\n ['path', { d: 'M8 21h8', key: '1ev6f3' }],\n]);\n\nexport default MonitorDown;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,iBAAiB,aAAe,CAAA,CAAA,CAAA;AAAA,CAAA,CAClD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC/C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,MAAM,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CAC9E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC1C,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"names":["_objectDestructuringEmpty","obj","TypeError"],"sources":["../../src/helpers/objectDestructuringEmpty.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nexport default function _objectDestructuringEmpty<T>(\n obj: T | null | undefined,\n): asserts obj is T {\n if (obj == null) throw new TypeError(\"Cannot destructure \" + obj);\n}\n"],"mappings":";;;;;;AAEe,SAASA,yBAAyBA,CAC/CC,GAAyB,EACP;EAClB,IAAIA,GAAG,IAAI,IAAI,EAAE,MAAM,IAAIC,SAAS,CAAC,qBAAqB,GAAGD,GAAG,CAAC;AACnE","ignoreList":[]}
@@ -0,0 +1,51 @@
import * as _radix_ui_react_context from '@radix-ui/react-context';
import * as React from 'react';
import * as DialogPrimitive from '@radix-ui/react-dialog';
declare const createAlertDialogScope: _radix_ui_react_context.CreateScope;
type DialogProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Root>;
interface AlertDialogProps extends Omit<DialogProps, 'modal'> {
}
declare const AlertDialog: React.FC<AlertDialogProps>;
type DialogTriggerProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Trigger>;
interface AlertDialogTriggerProps extends DialogTriggerProps {
}
declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
type DialogPortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
interface AlertDialogPortalProps extends DialogPortalProps {
}
declare const AlertDialogPortal: React.FC<AlertDialogPortalProps>;
type DialogOverlayProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>;
interface AlertDialogOverlayProps extends DialogOverlayProps {
}
declare const AlertDialogOverlay: React.ForwardRefExoticComponent<AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
type DialogContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>;
interface AlertDialogContentProps extends Omit<DialogContentProps, 'onPointerDownOutside' | 'onInteractOutside'> {
}
declare const AlertDialogContent: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
type DialogTitleProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>;
interface AlertDialogTitleProps extends DialogTitleProps {
}
declare const AlertDialogTitle: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
type DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>;
interface AlertDialogDescriptionProps extends DialogDescriptionProps {
}
declare const AlertDialogDescription: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
type DialogCloseProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Close>;
interface AlertDialogActionProps extends DialogCloseProps {
}
declare const AlertDialogAction: React.ForwardRefExoticComponent<AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
interface AlertDialogCancelProps extends DialogCloseProps {
}
declare const AlertDialogCancel: React.ForwardRefExoticComponent<AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
declare const Root: React.FC<AlertDialogProps>;
declare const Trigger: React.ForwardRefExoticComponent<AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
declare const Portal: React.FC<AlertDialogPortalProps>;
declare const Overlay: React.ForwardRefExoticComponent<AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>>;
declare const Content: React.ForwardRefExoticComponent<AlertDialogContentProps & React.RefAttributes<HTMLDivElement>>;
declare const Action: React.ForwardRefExoticComponent<AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>>;
declare const Cancel: React.ForwardRefExoticComponent<AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>>;
declare const Title: React.ForwardRefExoticComponent<AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
declare const Description: React.ForwardRefExoticComponent<AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
export { Action, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, type AlertDialogPortalProps, type AlertDialogProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, Cancel, Content, Description, Overlay, Portal, Root, Title, Trigger, createAlertDialogScope };
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const PROTOCOL = /^([a-z][a-z\d+\-.]*:)?\/\//i;
function isAbsoluteURL(value) {
return PROTOCOL.test(value);
}
exports.isAbsoluteURL = isAbsoluteURL;
@@ -0,0 +1 @@
{"version":3,"file":"cfWorkerProvider-BylNJ1R5.mjs","names":["regex","keywordLocation"],"sources":["../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/pointer.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/dereference.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/format.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/ucs2-length.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validate.js","../../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/validator.js","../../core-internal/src/validators/cfWorkerProvider.ts"],"sourcesContent":["export function deepCompareStrict(a, b) {\n const typeofa = typeof a;\n if (typeofa !== typeof b) {\n return false;\n }\n if (Array.isArray(a)) {\n if (!Array.isArray(b)) {\n return false;\n }\n const length = a.length;\n if (length !== b.length) {\n return false;\n }\n for (let i = 0; i < length; i++) {\n if (!deepCompareStrict(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n if (typeofa === 'object') {\n if (!a || !b) {\n return a === b;\n }\n const aKeys = Object.keys(a);\n const bKeys = Object.keys(b);\n const length = aKeys.length;\n if (length !== bKeys.length) {\n return false;\n }\n for (const k of aKeys) {\n if (!deepCompareStrict(a[k], b[k])) {\n return false;\n }\n }\n return true;\n }\n return a === b;\n}\n","export function encodePointer(p) {\n return encodeURI(escapePointer(p));\n}\nexport function escapePointer(p) {\n return p.replace(/~/g, '~0').replace(/\\//g, '~1');\n}\n","import { encodePointer } from './pointer.js';\nexport const schemaKeyword = {\n additionalItems: true,\n unevaluatedItems: true,\n items: true,\n contains: true,\n additionalProperties: true,\n unevaluatedProperties: true,\n propertyNames: true,\n not: true,\n if: true,\n then: true,\n else: true\n};\nexport const schemaArrayKeyword = {\n prefixItems: true,\n items: true,\n allOf: true,\n anyOf: true,\n oneOf: true\n};\nexport const schemaMapKeyword = {\n $defs: true,\n definitions: true,\n properties: true,\n patternProperties: true,\n dependentSchemas: true\n};\nexport const ignoredKeyword = {\n id: true,\n $id: true,\n $ref: true,\n $schema: true,\n $anchor: true,\n $vocabulary: true,\n $comment: true,\n default: true,\n enum: true,\n const: true,\n required: true,\n type: true,\n maximum: true,\n minimum: true,\n exclusiveMaximum: true,\n exclusiveMinimum: true,\n multipleOf: true,\n maxLength: true,\n minLength: true,\n pattern: true,\n format: true,\n maxItems: true,\n minItems: true,\n uniqueItems: true,\n maxProperties: true,\n minProperties: true\n};\nexport let initialBaseURI = typeof self !== 'undefined' &&\n self.location &&\n self.location.origin !== 'null'\n ?\n new URL(self.location.origin + self.location.pathname + location.search)\n : new URL('https://github.com/cfworker');\nexport function dereference(schema, lookup = Object.create(null), baseURI = initialBaseURI, basePointer = '') {\n if (schema && typeof schema === 'object' && !Array.isArray(schema)) {\n const id = schema.$id || schema.id;\n if (id) {\n const url = new URL(id, baseURI.href);\n if (url.hash.length > 1) {\n lookup[url.href] = schema;\n }\n else {\n url.hash = '';\n if (basePointer === '') {\n baseURI = url;\n }\n else {\n dereference(schema, lookup, baseURI);\n }\n }\n }\n }\n else if (schema !== true && schema !== false) {\n return lookup;\n }\n const schemaURI = baseURI.href + (basePointer ? '#' + basePointer : '');\n if (lookup[schemaURI] !== undefined) {\n throw new Error(`Duplicate schema URI \"${schemaURI}\".`);\n }\n lookup[schemaURI] = schema;\n if (schema === true || schema === false) {\n return lookup;\n }\n if (schema.__absolute_uri__ === undefined) {\n Object.defineProperty(schema, '__absolute_uri__', {\n enumerable: false,\n value: schemaURI\n });\n }\n if (schema.$ref && schema.__absolute_ref__ === undefined) {\n Line truncated
@@ -0,0 +1,22 @@
The MIT License
Copyright (c) EventSource GitHub organisation
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 @@
module.exports={A:{D:{"1":"_qF","2":"_kF"},L:{"1":"I"},B:{"1":"_K","2":"_I"},C:{"1":"_EM","2":"_2C"},M:{"1":"YC"},A:{"2":"_E"},F:{"1":"_MF","2":"_XI"},K:{"1":"H","2":"_D"},E:{"1":"K _jM _fP _iM","2":"_5R","33":"_jH G QD _lL _5Q"},G:{"1":"_jM _fL","2":"_EB","33":"_lC _UI _5Q"},P:{"1":"_xB","2":"_3B"},I:{"1":"I","2":"_G"}},B:6,C:"text-decoration shorthand property",D:undefined};