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,105 @@
import type { SerovalNode } from 'seroval';
import { createPlugin } from 'seroval';
import FilePlugin from './file';
type FormDataInit = [key: string, value: FormDataEntryValue][];
function convertFormData(instance: FormData): FormDataInit {
const items: FormDataInit = [];
instance.forEach((value, key) => {
items.push([key, value]);
});
return items;
}
const FORM_DATA_FACTORY = {};
const FORM_DATA_FACTORY_CONSTRUCTOR = (
e: [key: string, value: FormDataEntryValue][],
f = new FormData(),
i = 0,
s = e.length,
t?: [key: string, value: FormDataEntryValue],
) => {
for (; i < s; i++) {
t = e[i];
f.append(t[0], t[1]);
}
return f;
};
const FormDataFactoryPlugin = /* @__PURE__ */ createPlugin<object, {}>({
tag: 'seroval-plugins/web/FormDataFactory',
test(value) {
return value === FORM_DATA_FACTORY;
},
parse: {
sync() {
return FORM_DATA_FACTORY;
},
async async() {
return await Promise.resolve(FORM_DATA_FACTORY);
},
stream() {
return FORM_DATA_FACTORY;
},
},
serialize() {
return FORM_DATA_FACTORY_CONSTRUCTOR.toString();
},
deserialize() {
return FORM_DATA_FACTORY;
},
});
type FormDataNode = {
factory: SerovalNode;
entries: SerovalNode;
};
const FormDataPlugin = /* @__PURE__ */ createPlugin<FormData, FormDataNode>({
tag: 'seroval-plugins/web/FormData',
extends: [FilePlugin, FormDataFactoryPlugin],
test(value) {
if (typeof FormData === 'undefined') {
return false;
}
return value instanceof FormData;
},
parse: {
sync(value, ctx) {
return {
factory: ctx.parse(FORM_DATA_FACTORY),
entries: ctx.parse(convertFormData(value)),
};
},
async async(value, ctx) {
return {
factory: await ctx.parse(FORM_DATA_FACTORY),
entries: await ctx.parse(convertFormData(value)),
};
},
stream(value, ctx) {
return {
factory: ctx.parse(FORM_DATA_FACTORY),
entries: ctx.parse(convertFormData(value)),
};
},
},
serialize(node, ctx) {
return (
'(' +
ctx.serialize(node.factory) +
')(' +
ctx.serialize(node.entries) +
')'
);
},
deserialize(node, ctx) {
return FORM_DATA_FACTORY_CONSTRUCTOR(
ctx.deserialize(node.entries) as FormDataInit,
);
},
});
export default FormDataPlugin;
@@ -0,0 +1,105 @@
import type * as core from "./core.js";
import type { $ZodType } from "./schemas.js";
export const $output: unique symbol = /*@__PURE__*/ Symbol("ZodOutput");
export type $output = typeof $output;
export const $input: unique symbol = /*@__PURE__*/ Symbol("ZodInput");
export type $input = typeof $input;
export type $replace<Meta, S extends $ZodType> = Meta extends $output
? core.output<S>
: Meta extends $input
? core.input<S>
: Meta extends (infer M)[]
? $replace<M, S>[]
: Meta extends (...args: infer P) => infer R
? (
...args: {
[K in keyof P]: $replace<P[K], S>; // tuple
}
) => $replace<R, S>
: // handle objects
Meta extends object
? { [K in keyof Meta]: $replace<Meta[K], S> }
: Meta;
type MetadataType = object | undefined;
export class $ZodRegistry<Meta extends MetadataType = MetadataType, Schema extends $ZodType = $ZodType> {
_meta!: Meta;
_schema!: Schema;
_map: WeakMap<Schema, $replace<Meta, Schema>> = new WeakMap();
_idmap: Map<string, Schema> = new Map();
add<S extends Schema>(
schema: S,
..._meta: undefined extends Meta ? [$replace<Meta, S>?] : [$replace<Meta, S>]
): this {
const meta: any = _meta[0];
this._map.set(schema, meta!);
if (meta && typeof meta === "object" && "id" in meta) {
this._idmap.set(meta.id!, schema);
}
return this as any;
}
clear(): this {
this._map = new WeakMap();
this._idmap = new Map();
return this;
}
remove(schema: Schema): this {
const meta: any = this._map.get(schema);
if (meta && typeof meta === "object" && "id" in meta) {
this._idmap.delete(meta.id!);
}
this._map.delete(schema);
return this;
}
get<S extends Schema>(schema: S): $replace<Meta, S> | undefined {
// return this._map.get(schema) as any;
// inherit metadata
const p = schema._zod.parent as Schema;
if (p) {
const pm: any = { ...(this.get(p) ?? {}) };
delete pm.id; // do not inherit id
const f = { ...pm, ...this._map.get(schema) } as any;
return Object.keys(f).length ? f : undefined;
}
return this._map.get(schema) as any;
}
has(schema: Schema): boolean {
return this._map.has(schema);
}
}
export interface JSONSchemaMeta {
id?: string | undefined;
title?: string | undefined;
description?: string | undefined;
deprecated?: boolean | undefined;
[k: string]: unknown;
}
export interface GlobalMeta extends JSONSchemaMeta {}
// registries
export function registry<T extends MetadataType = MetadataType, S extends $ZodType = $ZodType>(): $ZodRegistry<T, S> {
return new $ZodRegistry<T, S>();
}
interface GlobalThisWithRegistry {
/**
* The globalRegistry instance shared across both CommonJS and ESM builds.
* By attaching the registry to `globalThis`, this property ensures a single, deduplicated instance
* is used regardless of whether the package is loaded via `require` (CJS) or `import` (ESM).
* This prevents dual package hazards and keeps registry state consistent.
*/
__zod_globalRegistry?: $ZodRegistry<GlobalMeta>;
}
(globalThis as GlobalThisWithRegistry).__zod_globalRegistry ??= registry<GlobalMeta>();
export const globalRegistry: $ZodRegistry<GlobalMeta> = (globalThis as GlobalThisWithRegistry).__zod_globalRegistry!;
@@ -0,0 +1,109 @@
export type NoInfer<A extends any> = [A][A extends any ? 0 : never]
export type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>
export function memo<TDeps extends ReadonlyArray<any>, TResult>(
getDeps: () => [...TDeps],
fn: (...args: NoInfer<[...TDeps]>) => TResult,
opts: {
key: false | string
debug?: () => boolean
onChange?: (result: TResult) => void
initialDeps?: TDeps
skipInitialOnChange?: boolean
},
) {
let deps = opts.initialDeps ?? []
let result: TResult | undefined
let isInitial = true
function memoizedFunction(): TResult {
// Debug-only timing. In production builds, `process.env.NODE_ENV !==
// 'production'` is constant-folded to `false` by downstream minifiers
// (Terser/esbuild/swc with `define`), which DCEs the entire block.
const debugEnabled =
process.env.NODE_ENV !== 'production' && !!opts.key && !!opts.debug?.()
let depTime = 0
if (debugEnabled) depTime = Date.now()
const newDeps = getDeps()
const depsChanged =
newDeps.length !== deps.length ||
newDeps.some((dep: any, index: number) => deps[index] !== dep)
if (!depsChanged) {
return result!
}
deps = newDeps
let resultTime = 0
if (debugEnabled) resultTime = Date.now()
result = fn(...newDeps)
if (debugEnabled) {
const depEndTime = Math.round((Date.now() - depTime) * 100) / 100
const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100
const resultFpsPercentage = resultEndTime / 16
const pad = (str: number | string, num: number) => {
str = String(str)
while (str.length < num) {
str = ' ' + str
}
return str
}
console.info(
`%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(
0,
Math.min(120 - 120 * resultFpsPercentage, 120),
)}deg 100% 31%);`,
opts?.key,
)
}
if (opts?.onChange && !(isInitial && opts.skipInitialOnChange)) {
opts.onChange(result)
}
isInitial = false
return result
}
// Attach updateDeps to the function itself
memoizedFunction.updateDeps = (newDeps: [...TDeps]) => {
deps = newDeps
}
return memoizedFunction
}
export function notUndefined<T>(value: T | undefined, msg?: string): T {
if (value === undefined) {
throw new Error(`Unexpected undefined${msg ? `: ${msg}` : ''}`)
} else {
return value
}
}
export const approxEqual = (a: number, b: number) => Math.abs(a - b) < 1.01
export const debounce = (
targetWindow: Window & typeof globalThis,
fn: Function,
ms: number,
) => {
let timeoutId: number
return function (this: any, ...args: Array<any>) {
targetWindow.clearTimeout(timeoutId)
timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms)
}
}
@@ -0,0 +1,40 @@
import { splitSetCookieString } from 'cookie-es'
import type { OutgoingHttpHeaders } from 'node:http2'
export type AnyHeaders =
| Headers
| HeadersInit
| Record<string, string>
| Array<[string, string]>
| OutgoingHttpHeaders
| undefined
// Helper function to convert various HeaderInit types to a Headers instance
function toHeadersInstance(init: AnyHeaders) {
if (init instanceof Headers) {
return init
} else if (Array.isArray(init)) {
return new Headers(init)
} else if (typeof init === 'object') {
return new Headers(init as HeadersInit)
} else {
return null
}
}
// Function to merge headers with proper overrides
export function mergeHeaders(...headers: Array<AnyHeaders>) {
return headers.reduce((acc: Headers, header) => {
const headersInstance = toHeadersInstance(header)
if (!headersInstance) return acc
for (const [key, value] of headersInstance.entries()) {
if (key === 'set-cookie') {
const splitCookies = splitSetCookieString(value)
splitCookies.forEach((cookie) => acc.append('set-cookie', cookie))
} else {
acc.set(key, value)
}
}
return acc
}, new Headers())
}
@@ -0,0 +1 @@
{"version":3,"file":"mountain.js","sources":["../../../src/icons/mountain.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Mountain\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJtOCAzIDQgOCA1LTUgNSAxNUgyTDggM3oiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/mountain\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 Mountain = createLucideIcon('Mountain', [\n ['path', { d: 'm8 3 4 8 5-5 5 15H2L8 3z', key: 'otkl63' }],\n]);\n\nexport default Mountain;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,iBAAiB,UAAY,CAAA,CAAA,CAAA;AAAA,CAAA,CAC5C,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA4B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AAC3D,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,9 @@
/**
* @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.
*/
export { default } from './rectangle-ellipsis.js';
//# sourceMappingURL=form-input.js.map
@@ -0,0 +1,239 @@
'use strict';
module.exports = {
copy: copy,
checkDataType: checkDataType,
checkDataTypes: checkDataTypes,
coerceToTypes: coerceToTypes,
toHash: toHash,
getProperty: getProperty,
escapeQuotes: escapeQuotes,
equal: require('fast-deep-equal'),
ucs2length: require('./ucs2length'),
varOccurences: varOccurences,
varReplace: varReplace,
schemaHasRules: schemaHasRules,
schemaHasRulesExcept: schemaHasRulesExcept,
schemaUnknownRules: schemaUnknownRules,
toQuotedString: toQuotedString,
getPathExpr: getPathExpr,
getPath: getPath,
getData: getData,
unescapeFragment: unescapeFragment,
unescapeJsonPointer: unescapeJsonPointer,
escapeFragment: escapeFragment,
escapeJsonPointer: escapeJsonPointer
};
function copy(o, to) {
to = to || {};
for (var key in o) to[key] = o[key];
return to;
}
function checkDataType(dataType, data, strictNumbers, negate) {
var EQUAL = negate ? ' !== ' : ' === '
, AND = negate ? ' || ' : ' && '
, OK = negate ? '!' : ''
, NOT = negate ? '' : '!';
switch (dataType) {
case 'null': return data + EQUAL + 'null';
case 'array': return OK + 'Array.isArray(' + data + ')';
case 'object': return '(' + OK + data + AND +
'typeof ' + data + EQUAL + '"object"' + AND +
NOT + 'Array.isArray(' + data + '))';
case 'integer': return '(typeof ' + data + EQUAL + '"number"' + AND +
NOT + '(' + data + ' % 1)' +
AND + data + EQUAL + data +
(strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
case 'number': return '(typeof ' + data + EQUAL + '"' + dataType + '"' +
(strictNumbers ? (AND + OK + 'isFinite(' + data + ')') : '') + ')';
default: return 'typeof ' + data + EQUAL + '"' + dataType + '"';
}
}
function checkDataTypes(dataTypes, data, strictNumbers) {
switch (dataTypes.length) {
case 1: return checkDataType(dataTypes[0], data, strictNumbers, true);
default:
var code = '';
var types = toHash(dataTypes);
if (types.array && types.object) {
code = types.null ? '(': '(!' + data + ' || ';
code += 'typeof ' + data + ' !== "object")';
delete types.null;
delete types.array;
delete types.object;
}
if (types.number) delete types.integer;
for (var t in types)
code += (code ? ' && ' : '' ) + checkDataType(t, data, strictNumbers, true);
return code;
}
}
var COERCE_TO_TYPES = toHash([ 'string', 'number', 'integer', 'boolean', 'null' ]);
function coerceToTypes(optionCoerceTypes, dataTypes) {
if (Array.isArray(dataTypes)) {
var types = [];
for (var i=0; i<dataTypes.length; i++) {
var t = dataTypes[i];
if (COERCE_TO_TYPES[t]) types[types.length] = t;
else if (optionCoerceTypes === 'array' && t === 'array') types[types.length] = t;
}
if (types.length) return types;
} else if (COERCE_TO_TYPES[dataTypes]) {
return [dataTypes];
} else if (optionCoerceTypes === 'array' && dataTypes === 'array') {
return ['array'];
}
}
function toHash(arr) {
var hash = {};
for (var i=0; i<arr.length; i++) hash[arr[i]] = true;
return hash;
}
var IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;
var SINGLE_QUOTE = /'|\\/g;
function getProperty(key) {
return typeof key == 'number'
? '[' + key + ']'
: IDENTIFIER.test(key)
? '.' + key
: "['" + escapeQuotes(key) + "']";
}
function escapeQuotes(str) {
return str.replace(SINGLE_QUOTE, '\\$&')
.replace(/\n/g, '\\n')
.replace(/\r/g, '\\r')
.replace(/\f/g, '\\f')
.replace(/\t/g, '\\t');
}
function varOccurences(str, dataVar) {
dataVar += '[^0-9]';
var matches = str.match(new RegExp(dataVar, 'g'));
return matches ? matches.length : 0;
}
function varReplace(str, dataVar, expr) {
dataVar += '([^0-9])';
expr = expr.replace(/\$/g, '$$$$');
return str.replace(new RegExp(dataVar, 'g'), expr + '$1');
}
function schemaHasRules(schema, rules) {
if (typeof schema == 'boolean') return !schema;
for (var key in schema) if (rules[key]) return true;
}
function schemaHasRulesExcept(schema, rules, exceptKeyword) {
if (typeof schema == 'boolean') return !schema && exceptKeyword != 'not';
for (var key in schema) if (key != exceptKeyword && rules[key]) return true;
}
function schemaUnknownRules(schema, rules) {
if (typeof schema == 'boolean') return;
for (var key in schema) if (!rules[key]) return key;
}
function toQuotedString(str) {
return '\'' + escapeQuotes(str) + '\'';
}
function getPathExpr(currentPath, expr, jsonPointers, isNumber) {
var path = jsonPointers // false by default
? '\'/\' + ' + expr + (isNumber ? '' : '.replace(/~/g, \'~0\').replace(/\\//g, \'~1\')')
: (isNumber ? '\'[\' + ' + expr + ' + \']\'' : '\'[\\\'\' + ' + expr + ' + \'\\\']\'');
return joinPaths(currentPath, path);
}
function getPath(currentPath, prop, jsonPointers) {
var path = jsonPointers // false by default
? toQuotedString('/' + escapeJsonPointer(prop))
: toQuotedString(getProperty(prop));
return joinPaths(currentPath, path);
}
var JSON_POINTER = /^\/(?:[^~]|~0|~1)*$/;
var RELATIVE_JSON_POINTER = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
function getData($data, lvl, paths) {
var up, jsonPointer, data, matches;
if ($data === '') return 'rootData';
if ($data[0] == '/') {
if (!JSON_POINTER.test($data)) throw new Error('Invalid JSON-pointer: ' + $data);
jsonPointer = $data;
data = 'rootData';
} else {
matches = $data.match(RELATIVE_JSON_POINTER);
if (!matches) throw new Error('Invalid JSON-pointer: ' + $data);
up = +matches[1];
jsonPointer = matches[2];
if (jsonPointer == '#') {
if (up >= lvl) throw new Error('Cannot access property/index ' + up + ' levels up, current level is ' + lvl);
return paths[lvl - up];
}
if (up > lvl) throw new Error('Cannot access data ' + up + ' levels up, current level is ' + lvl);
data = 'data' + ((lvl - up) || '');
if (!jsonPointer) return data;
}
var expr = data;
var segments = jsonPointer.split('/');
for (var i=0; i<segments.length; i++) {
var segment = segments[i];
if (segment) {
data += getProperty(unescapeJsonPointer(segment));
expr += ' && ' + data;
}
}
return expr;
}
function joinPaths (a, b) {
if (a == '""') return b;
return (a + ' + ' + b).replace(/([^\\])' \+ '/g, '$1');
}
function unescapeFragment(str) {
return unescapeJsonPointer(decodeURIComponent(str));
}
function escapeFragment(str) {
return encodeURIComponent(escapeJsonPointer(str));
}
function escapeJsonPointer(str) {
return str.replace(/~/g, '~0').replace(/\//g, '~1');
}
function unescapeJsonPointer(str) {
return str.replace(/~1/g, '/').replace(/~0/g, '~');
}
@@ -0,0 +1 @@
{"version":3,"file":"presets.mjs","sources":["../../../../../../src/render/dom/scroll/offsets/presets.ts"],"sourcesContent":["import { ProgressIntersection } from \"../types\"\n\nexport const ScrollOffset: Record<string, ProgressIntersection[]> = {\n Enter: [\n [0, 1],\n [1, 1],\n ],\n Exit: [\n [0, 0],\n [1, 0],\n ],\n Any: [\n [1, 0],\n [0, 1],\n ],\n All: [\n [0, 0],\n [1, 1],\n ],\n}\n"],"names":[],"mappings":"AAEO,MAAM,YAAY,GAA2C;AAClE,IAAA,KAAK,EAAE;QACL,CAAC,CAAC,EAAE,CAAC,CAAC;QACN,CAAC,CAAC,EAAE,CAAC,CAAC;AACP,KAAA;AACD,IAAA,IAAI,EAAE;QACJ,CAAC,CAAC,EAAE,CAAC,CAAC;QACN,CAAC,CAAC,EAAE,CAAC,CAAC;AACP,KAAA;AACD,IAAA,GAAG,EAAE;QACH,CAAC,CAAC,EAAE,CAAC,CAAC;QACN,CAAC,CAAC,EAAE,CAAC,CAAC;AACP,KAAA;AACD,IAAA,GAAG,EAAE;QACH,CAAC,CAAC,EAAE,CAAC,CAAC;QACN,CAAC,CAAC,EAAE,CAAC,CAAC;AACP,KAAA;;;;;"}
@@ -0,0 +1,14 @@
"use strict";var Bt=Object.defineProperty;var f=(s,e)=>Bt(s,"name",{value:e,configurable:!0});var Ne=require("node:url"),ne=require("esbuild"),Jt=require("node:crypto"),j=require("node:fs"),X=require("node:path"),Gt=require("node:os"),zt=require("./temporary-directory-B83uKxJF.cjs");const Ie=f(s=>Jt.createHash("sha1").update(s).digest("hex"),"sha1"),Me=44,Ht=59,Ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",je=new Uint8Array(64),$e=new Uint8Array(128);for(let s=0;s<Ue.length;s++){const e=Ue.charCodeAt(s);je[s]=e,$e[e]=s}const ke=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(s){return Buffer.from(s.buffer,s.byteOffset,s.byteLength).toString()}}:{decode(s){let e="";for(let r=0;r<s.length;r++)e+=String.fromCharCode(s[r]);return e}};function Xt(s){const e=new Int32Array(5),r=[];let i=0;do{const o=Kt(s,i),c=[];let u=!0,p=0;e[0]=0;for(let g=i;g<o;g++){let b;g=K(s,g,e,0);const d=e[0];d<p&&(u=!1),p=d,De(s,g,o)?(g=K(s,g,e,1),g=K(s,g,e,2),g=K(s,g,e,3),De(s,g,o)?(g=K(s,g,e,4),b=[d,e[1],e[2],e[3],e[4]]):b=[d,e[1],e[2],e[3]]):b=[d],c.push(b)}u||Yt(c),r.push(c),i=o+1}while(i<=s.length);return r}f(Xt,"decode");function Kt(s,e){const r=s.indexOf(";",e);return r===-1?s.length:r}f(Kt,"indexOf");function K(s,e,r,i){let o=0,c=0,u=0;do{const g=s.charCodeAt(e++);u=$e[g],o|=(u&31)<<c,c+=5}while(u&32);const p=o&1;return o>>>=1,p&&(o=-2147483648|-o),r[i]+=o,e}f(K,"decodeInteger");function De(s,e,r){return e>=r?!1:s.charCodeAt(e)!==Me}f(De,"hasMoreVlq");function Yt(s){s.sort(Qt)}f(Yt,"sort");function Qt(s,e){return s[0]-e[0]}f(Qt,"sortComparator$1");function Te(s){const e=new Int32Array(5),r=1024*16,i=r-36,o=new Uint8Array(r),c=o.subarray(0,i);let u=0,p="";for(let g=0;g<s.length;g++){const b=s[g];if(g>0&&(u===r&&(p+=ke.decode(o),u=0),o[u++]=Ht),b.length!==0){e[0]=0;for(let d=0;d<b.length;d++){const n=b[d];u>i&&(p+=ke.decode(c),o.copyWithin(0,i,u),u-=i),d>0&&(o[u++]=Me),u=Y(o,u,e,n,0),n.length!==1&&(u=Y(o,u,e,n,1),u=Y(o,u,e,n,2),u=Y(o,u,e,n,3),n.length!==4&&(u=Y(o,u,e,n,4)))}}}return p+ke.decode(o.subarray(0,u))}f(Te,"encode");function Y(s,e,r,i,o){const c=i[o];let u=c-r[o];r[o]=c,u=u<0?-u<<1|1:u<<1;do{let p=u&31;u>>>=5,u>0&&(p|=32),s[e++]=je[p]}while(u>0);return e}f(Y,"encodeInteger");class ce{static{f(this,"BitSet")}constructor(e){this.bits=e instanceof ce?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class ee{static{f(this,"Chunk")}constructor(e,r,i){this.start=e,this.end=r,this.original=i,this.intro="",this.outro="",this.content=i,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new ee(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let r=this;for(;r;)e(r),r=r.next}eachPrevious(e){let r=this;for(;r;)e(r),r=r.previous}edit(e,r,i){return this.content=e,i||(this.intro="",this.outro=""),this.storeName=r,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(e){const r=e-this.start,i=this.original.slice(0,r),o=this.original.slice(r);this.original=i;const c=new ee(e,this.end,o);return c.outro=this.outro,this.outro="",this.end=e,this.edited?(c.edit("",!1),this.content=""):this.content=i,c.next=this.next,c.next&&(c.next.previous=c),c.previous=this,this.next=c,c}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const r=this.content.replace(e,"");if(r.length)return r!==this.content&&(this.split(this.start+r.length).edit("",void 0,!0),this.edited&&this.edit(r,this.storeName,!0)),!0;if(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),this.intro.length)return!0}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const r=this.content.replace(e,"");if(r.length){if(r!==this.content){const i=this.split(this.end-r.length);this.edited&&i.edit(r,this.storeName,!0),this.edit("",void 0,!0)}return!0}else if(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),this.outro.length)return!0}}function Zt(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?s=>globalThis.btoa(unescape(encodeURIComponent(s))):typeof Buffer=="function"?s=>Buffer.from(s,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}f(Zt,"getBtoa");const Vt=Zt();let er=class{static{f(this,"SourceMap")}constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=Te(e.mappings),typeof e.x_google_ignoreList<"u"&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toULine truncated
`),r=e.filter(c=>/^\t+/.test(c)),i=e.filter(c=>/^ {2,}/.test(c));if(r.length===0&&i.length===0)return null;if(r.length>=i.length)return" ";const o=i.reduce((c,u)=>{const p=/^ +/.exec(u)[0].length;return Math.min(p,c)},1/0);return new Array(o+1).join(" ")}f(tr,"guessIndent");function rr(s,e){const r=s.split(/[/\\]/),i=e.split(/[/\\]/);for(r.pop();r[0]===i[0];)r.shift(),i.shift();if(r.length){let o=r.length;for(;o--;)r[o]=".."}return r.concat(i).join("/")}f(rr,"getRelativePath");const nr=Object.prototype.toString;function ir(s){return nr.call(s)==="[object Object]"}f(ir,"isObject");function Fe(s){const e=s.split(`
`),r=[];for(let i=0,o=0;i<e.length;i++)r.push(o),o+=e[i].length+1;return f(function(o){let c=0,u=r.length;for(;c<u;){const b=c+u>>1;o<r[b]?u=b:c=b+1}const p=c-1,g=o-r[p];return{line:p,column:g}},"locate")}f(Fe,"getLocator");const sr=/\w/;class or{static{f(this,"Mappings")}constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,r,i,o){if(r.length){const c=r.length-1;let u=r.indexOf(`
`,0),p=-1;for(;u>=0&&c>u;){const b=[this.generatedCodeColumn,e,i.line,i.column];o>=0&&b.push(o),this.rawSegments.push(b),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,p=u,u=r.indexOf(`
`,u+1)}const g=[this.generatedCodeColumn,e,i.line,i.column];o>=0&&g.push(o),this.rawSegments.push(g),this.advance(r.slice(p+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(r));this.pending=null}addUneditedChunk(e,r,i,o,c){let u=r.start,p=!0,g=!1;for(;u<r.end;){if(this.hires||p||c.has(u)){const b=[this.generatedCodeColumn,e,o.line,o.column];this.hires==="boundary"?sr.test(i[u])?g||(this.rawSegments.push(b),g=!0):(this.rawSegments.push(b),g=!1):this.rawSegments.push(b)}i[u]===`
`?(o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,p=!0):(o.column+=1,this.generatedCodeColumn+=1,p=!1),u+=1}this.pending=null}advance(e){if(!e)return;const r=e.split(`
`);if(r.length>1){for(let i=0;i<r.length-1;i++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=r[r.length-1].length}}const Q=`
`,B={insertLeft:!1,insertRight:!1,storeName:!1};class Ee{static{f(this,"MagicString")}constructor(e,r={}){const i=new ee(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:i},lastChunk:{writable:!0,value:i},lastSearchedChunk:{writable:!0,value:i},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:r.filename},indentExclusionRanges:{writable:!0,value:r.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new ce},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:r.ignoreList}}),this.byStart[0]=i,this.byEnd[e.length]=i}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.appendLeft(r):this.intro+=r,this}appendRight(e,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.appendRight(r):this.outro+=r,this}clone(){const e=new Ee(this.original,{filename:this.filename});let r=this.firstChunk,i=e.firstChunk=e.lastSearchedChunk=r.clone();for(;r;){e.byStart[i.start]=i,e.byEnd[i.end]=i;const o=r.next,c=o&&o.clone();c&&(i.next=c,c.previous=i,i=c),r=o}return e.lastChunk=i,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new ce(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const r=0,i=Object.keys(this.storedNames),o=new or(e.hires),c=Fe(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(u=>{const p=c(u.start);u.intro.length&&o.advance(u.intro),u.edited?o.addEdit(r,u.content,p,u.storeName?i.indexOf(u.original):-1):o.addUneditedChunk(r,u,this.original,p,this.sourcemapLocations),u.outro.length&&o.advance(u.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?rr(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:i,mappings:o.raw,x_google_ignoreList:this.ignoreList?[r]:void 0}}generateMap(e){return new er(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=tr(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,r){const i=/^[^\r\n]/gm;if(ir(e)&&(r=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;r=r||{};const o={};r.exclude&&(typeof r.exclude[0]=="number"?[r.exclude]:r.exclude).forEach(d=>{for(let n=d[0];n<d[1];n+=1)o[n]=!0});let c=r.indentStart!==!1;const u=f(b=>c?`${e}${b}`:(c=!0,b),"replacer");this.intro=this.intro.replace(i,u);let p=0,g=this.firstChunk;for(;g;){const b=g.end;if(g.edited)o[p]||(g.content=g.content.replace(i,u),g.content.length&&(c=g.content[g.content.length-1]===`
`));else for(p=g.start;p<b;){if(!o[p]){const d=this.original[p];d===`
`?c=!0:d!=="\r"&&c&&(c=!1,p===g.start||(this._splitChunk(g,p),g=g.next),g.prependRight(e))}p+=1}p=g.end,g=g.next}return this.outro=this.outro.replace(i,u),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,r){return B.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),B.insertLeft=!0),this.appendLeft(e,r)}insertRight(e,r){return B.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),B.insertRight=!0),this.prependRight(e,r)}move(e,r,i){if(i>=e&&i<=r)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(r),this._split(i);const o=this.byStart[e],c=this.byEnd[r],u=o.previous,p=c.next,g=this.byStart[i];if(!g&&c===this.lastChunk)return this;const b=g?g.previous:this.lastChunk;return u&&(u.next=p),p&&(p.previous=u),b&&(b.next=o),g&&(g.previous=c),o.previous||(this.firstChunk=c.next),c.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=b,c.next=g||null,b||(this.firstChunk=o),g||(this.lastChunk=c),this}overwrite(e,r,i,o){return o=o||{},this.update(e,r,i,{...o,overwrite:!o.contentOnly})}update(e,r,i,o){if(typeof i!="string")throw new TypeError("replacement content must be a string");for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(r>this.original.length)throw new Error("end is out of bounds");if(e===r)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(e),this._split(r),o===!0&&(B.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),B.storeName=!0),o={storeName:!0});const c=o!==void 0?o.storeName:!1,u=o!==void 0?o.overwrite:!1;if(c){const b=this.original.slice(e,r);Object.defineProperty(this.storedNames,b,{writable:!0,value:!0,enumerable:!0})}const p=this.byStart[e],g=this.byEnd[r];if(p){let b=p;for(;b!==g;){if(b.next!==this.byStart[b.end])throw new Error("Cannot overwrite across a split point");b=b.next,b.edit("",!1)}p.edit(i,c,!u)}else{const b=new ee(e,r,"").edit(i,c);g.next=b,b.previous=g}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];return i?i.prependLeft(r):this.intro=r+this.intro,this}prependRight(e,r){if(typeof r!="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];return i?i.prependRight(r):this.outro=r+this.outro,this}remove(e,r){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let i=this.byStart[e];for(;i;)i.intro="",i.outro="",i.edit(""),i=r>i.end?this.byStart[i.end]:null;return this}reset(e,r){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;if(e===r)return this;if(e<0||r>this.original.length)throw new Error("Character is out of bounds");if(e>r)throw new Error("end must be greater than start");this._split(e),this._split(r);let i=this.byStart[e];for(;i;)i.reset(),i=r>i.end?this.byStart[i.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(Q);if(e!==-1)return this.outro.substr(e+1);let r=this.outro,i=this.lastChunk;do{if(i.outro.length>0){if(e=i.outro.lastIndexOf(Q),e!==-1)return i.outro.substr(e+1)+r;r=i.outro+r}if(i.content.length>0){if(e=i.content.lastIndexOf(Q),e!==-1)return i.content.substr(e+1)+r;r=i.content+r}if(i.intro.length>0){if(e=i.intro.lastIndexOf(Q),e!==-1)return i.intro.substr(e+1)+r;r=i.intro+r}}while(i=i.previous);return e=this.intro.lastIndexOf(Q),e!==-1?this.intro.substr(e+1)+r:this.intro+r}slice(e=0,r=this.original.length){for(;e<0;)e+=this.original.length;for(;r<0;)r+=this.original.length;let i="",o=this.firstChunk;for(;o&&(o.start>e||o.end<=e);){if(o.start<r&&o.end>=r)return i;o=o.next}if(o&&o.edited&&o.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const c=o;for(;o;){o.intro&&(c!==o||o.start===e)&&(i+=o.intro);const u=o.start<r&&o.end>=r;if(u&&o.edited&&o.end!==r)throw new Error(`Cannot use replaced character ${r} as slice end anchor.`);const p=c===o?e-o.start:0,g=u?o.content.length+r-o.end:o.content.length;if(i+=o.content.slice(p,g),o.outro&&(!u||o.end===r)&&(i+=o.outro),u)break;o=o.next}retuLine truncated
`;case 114:return"\r";case 120:return String.fromCharCode(Se(2));case 117:return function(){const e=_.charCodeAt(y);let r;return e===123?(++y,r=Se(_.indexOf("}",y)-y),++y,r>1114111&&D()):r=Se(4),r<=65535?String.fromCharCode(r):(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r)))}();case 116:return" ";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:_.charCodeAt(y)===10&&++y;case 10:return"";case 56:case 57:D();default:if(s>=48&&s<=55){let e=_.substr(y-1,3).match(/^[0-7]+/)[0],r=parseInt(e,8);return r>255&&(e=e.slice(0,-1),r=parseInt(e,8)),y+=e.length-1,s=_.charCodeAt(y),e==="0"&&s!==56&&s!==57||D(),String.fromCharCode(r)}return qe(s)?"":String.fromCharCode(s)}}f(ur,"k");function Se(s){const e=y;let r=0,i=0;for(let o=0;o<s;++o,++y){let c,u=_.charCodeAt(y);if(u!==95){if(u>=97)c=u-97+10;else if(u>=65)c=u-65+10;else{if(!(u>=48&&u<=57))break;c=u-48}if(c>=16)break;i=u,r=16*r+c}else i!==95&&o!==0||D(),i=u}return i!==95&&y-e===s||D(),r}f(Se,"l");function qe(s){return s===13||s===10}f(qe,"u");function D(){throw Object.assign(Error(`Parse error ${We}:${_.slice(0,y).split(`
`).length}:${y-_.lastIndexOf(`
`,y-1)}`),{idx:y})}f(D,"o");let ve;typeof WebAssembly<"u"&&(async()=>{const{parse:s,init:e}=await Promise.resolve().then(function(){return require("./lexer-DgIbo0BU.cjs")});await e,ve=s})();const Be=f((s,e)=>ve?ve(s,e):cr(s,e),"parseEsm"),lr=f(s=>{if(!s.includes("import")&&!s.includes("export"))return!1;try{return Be(s)[3]}catch{return!0}},"isESM"),Je="2",hr=(s=>{const e="default";return s[e]&&typeof s[e]=="object"&&"__esModule"in s[e]?s[e]:s}).toString(),fr=`.then(${hr})`,xe=f((s,e,r)=>{if(r){if(!e.includes("import("))return}else if(!e.includes("import"))return;const o=Be(e,s)[0].filter(g=>g.d>-1);if(o.length===0)return;const c=new Ee(e);for(const g of o)c.appendRight(g.se,fr);const u=c.toString(),p=c.generateMap({source:s,includeContent:!1,hires:"boundary"});return{code:u,map:p}},"transformDynamicImport"),Ge=f(s=>{try{const e=j.readFileSync(s,"utf8");return JSON.parse(e)}catch{}},"readJsonFile"),ze=f(()=>{},"noop"),He=f(()=>Math.floor(Date.now()/1e8),"getTime");class dr extends Map{static{f(this,"FileCache")}cacheDirectory=zt.tmpdir;oldCacheDirectory=X.join(Gt.tmpdir(),"tsx");cacheFiles;constructor(){super(),j.mkdirSync(this.cacheDirectory,{recursive:!0}),this.cacheFiles=j.readdirSync(this.cacheDirectory).map(e=>{const[r,i]=e.split("-");return{time:Number(r),key:i,fileName:e}}),setImmediate(()=>{this.expireDiskCache(),this.removeOldCacheDirectory()})}get(e){const r=super.get(e);if(r)return r;const i=this.cacheFiles.find(u=>u.key===e);if(!i)return;const o=X.join(this.cacheDirectory,i.fileName),c=Ge(o);if(!c){j.promises.unlink(o).then(()=>{const u=this.cacheFiles.indexOf(i);this.cacheFiles.splice(u,1)},()=>{});return}return super.set(e,c),c}set(e,r){if(super.set(e,r),r){const i=He();j.promises.writeFile(X.join(this.cacheDirectory,`${i}-${e}`),JSON.stringify(r)).catch(ze)}return this}expireDiskCache(){const e=He();for(const r of this.cacheFiles)e-r.time>7&&j.promises.unlink(X.join(this.cacheDirectory,r.fileName)).catch(ze)}async removeOldCacheDirectory(){try{await j.promises.access(this.oldCacheDirectory).then(()=>!0)&&("rm"in j.promises?await j.promises.rm(this.oldCacheDirectory,{recursive:!0,force:!0}):await j.promises.rmdir(this.oldCacheDirectory,{recursive:!0}))}catch{}}}var se=process.env.TSX_DISABLE_CACHE?new Map:new dr;const gr=/^[\w+.-]+:\/\//,br=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,pr=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;function wr(s){return gr.test(s)}f(wr,"isAbsoluteUrl");function mr(s){return s.startsWith("//")}f(mr,"isSchemeRelativeUrl");function Xe(s){return s.startsWith("/")}f(Xe,"isAbsolutePath");function kr(s){return s.startsWith("file:")}f(kr,"isFileUrl");function Ke(s){return/^[.?#]/.test(s)}f(Ke,"isRelative");function oe(s){const e=br.exec(s);return Ye(e[1],e[2]||"",e[3],e[4]||"",e[5]||"/",e[6]||"",e[7]||"")}f(oe,"parseAbsoluteUrl");function yr(s){const e=pr.exec(s),r=e[2];return Ye("file:","",e[1]||"","",Xe(r)?r:"/"+r,e[3]||"",e[4]||"")}f(yr,"parseFileUrl");function Ye(s,e,r,i,o,c,u){return{scheme:s,user:e,host:r,port:i,path:o,query:c,hash:u,type:7}}f(Ye,"makeUrl");function Qe(s){if(mr(s)){const r=oe("http:"+s);return r.scheme="",r.type=6,r}if(Xe(s)){const r=oe("http://foo.com"+s);return r.scheme="",r.host="",r.type=5,r}if(kr(s))return yr(s);if(wr(s))return oe(s);const e=oe("http://foo.com/"+s);return e.scheme="",e.host="",e.type=s?s.startsWith("?")?3:s.startsWith("#")?2:4:1,e}f(Qe,"parseUrl");function Cr(s){if(s.endsWith("/.."))return s;const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(Cr,"stripPathFilename");function Sr(s,e){Ze(e,e.type),s.path==="/"?s.path=e.path:s.path=Cr(e.path)+s.path}f(Sr,"mergePaths");function Ze(s,e){const r=e<=4,i=s.path.split("/");let o=1,c=0,u=!1;for(let g=1;g<i.length;g++){const b=i[g];if(!b){u=!0;continue}if(u=!1,b!=="."){if(b===".."){c?(u=!0,c--,o--):r&&(i[o++]=b);continue}i[o++]=b,c++}}let p="";for(let g=1;g<o;g++)p+="/"+i[g];(!p||u&&!p.endsWith("/.."))&&(p+="/"),s.path=p}f(Ze,"normalizePath");function vr(s,e){if(!s&&!e)return"";const r=Qe(s);let i=r.type;if(e&&i!==7){const c=Qe(e),u=c.type;switch(i){case 1:r.hash=c.hash;case 2:r.query=c.query;case 3:case 4:Sr(r,c);case 5:r.user=c.user,r.host=c.host,r.port=c.port;case 6:r.scheme=c.scheme}u>i&&(i=u)}Ze(r,i);const o=r.query+r.hash;switch(i){case 2:case 3:return o;case 4:{const c=r.path.slice(1);return c?Ke(e||s)&&!Ke(c)?"./"+c+o:c+o:o||"."}case 5:return r.path+o;default:return r.scheme+"//"+r.user+r.host+r.port+r.path+o}}f(vr,"resolve$1");function Ve(s,e){return e&&!e.endsWith("/")&&(e+="/"),vr(s,e)}f(Ve,"resolve");function xr(s){if(!s)return"";const e=s.lastIndexOf("/");return s.slice(0,e+1)}f(xr,"stripFilename");const F=0;function _r(s,e){const r=et(s,0);if(r===s.length)return s;e||(s=s.slice());for(let i=r;i<s.length;i=et(s,i+1))s[i]=Lr(s[i],e);return s}f(_r,"maybeSort");function et(s,e){for(let r=e;r<s.length;r++)if(!Er(s[r]))return r;return s.length}f(et,"nextUnsortedSegmentLine");function Er(s){for(let e=1;e<s.length;e++)if(s[e][F]<Line truncated
Did you specify these with the most recent transformation maps first?`);let o=ft(i,e,"",0);for(let c=r.length-1;c>=0;c--)o=lt(r[c],[o]);return o}f(rn,"buildSourceMapTree");function ft(s,e,r,i){const{resolvedSources:o,sourcesContent:c,ignoreList:u}=s,p=i+1,g=o.map((b,d)=>{const n={importer:r,depth:p,source:b||"",content:void 0,ignore:void 0},R=e(n.source,n),{source:L,content:E,ignore:N}=n;if(R)return ft(new tt(R,L),e,L,p);const U=E!==void 0?E:c?c[d]:null,P=N!==void 0?N:u?u.includes(d):!1;return Vr(L,U,P)});return lt(s,g)}f(ft,"build");class nn{static{f(this,"SourceMap")}constructor(e,r){const i=r.decodedMappings?st(e):Gr(e);this.version=i.version,this.file=i.file,this.mappings=i.mappings,this.names=i.names,this.ignoreList=i.ignoreList,this.sourceRoot=i.sourceRoot,this.sources=i.sources,r.excludeContent||(this.sourcesContent=i.sourcesContent)}toString(){return JSON.stringify(this)}}function dt(s,e,r){const i={excludeContent:!!r,decodedMappings:!1},o=rn(s,e);return new nn(en(o),i)}f(dt,"remapping");const sn=f((s,e,r)=>{const i=[],o={code:e};for(const c of r){const u=c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:dt(i,()=>null)}},"applyTransformersSync"),on=f(async(s,e,r)=>{const i=[],o={code:e};for(const c of r){const u=await c(s,o.code);u&&(Object.assign(o,u),i.unshift(u.map))}return{...o,map:dt(i,()=>null)}},"applyTransformers"),an=Object.freeze({target:`node${process.versions.node}`,loader:"default"}),cn=/^--inspect(?:-brk|-port|-publish-uid|-wait)?(?:=|$)/,un=process.execArgv.some(s=>cn.test(s)),gt={...an,sourcemap:!0,sourcesContent:!!process.env.NODE_V8_COVERAGE||un,minifyWhitespace:!0,keepNames:!0},bt=f(s=>{const e=s.sourcefile;if(e){const r=X.extname(e.split("?")[0]);r?r===".cts"||r===".mts"?s.sourcefile=`${e.slice(0,-3)}ts`:r===".mjs"&&(s.sourcefile=`${e.slice(0,-3)}js`):s.sourcefile+=".js"}return r=>(r.map&&(s.sourcefile!==e&&(r.map=r.map.replace(JSON.stringify(s.sourcefile),JSON.stringify(e))),r.map=JSON.parse(r.map)),r)},"patchOptions"),pt=f(s=>{throw s.name="TransformError",delete s.errors,delete s.warnings,s},"formatEsbuildError"),ln=f((s,e,r)=>{const i={};let o,c,u;if(e.startsWith("file://")){o=e;const d=new URL(e);c=Ne.fileURLToPath(d)}else[c,u]=e.split("?"),o=Ne.pathToFileURL(c)+(u?`?${u}`:"");c.endsWith(".cjs")||c.endsWith(".cts")||(i["import.meta.url"]=JSON.stringify(o));const p={...gt,format:"cjs",sourcefile:c,define:i,banner:`__filename=${JSON.stringify(c)};(()=>{`,footer:"})()",platform:"node",...r},g=Ie([s,JSON.stringify(p),ne.version,Je].join("-"));let b=se.get(g);return b||(b=sn(e,s,[(d,n)=>{const R=bt(p);let L;try{L=ne.transformSync(n,p)}catch(E){throw pt(E)}return R(L)},(d,n)=>xe(d,n,!0)]),se.set(g,b)),b},"transformSync"),hn=f(async(s,e,r)=>{const i={...gt,format:"esm",sourcefile:e,...r},o=Ie([s,JSON.stringify(i),ne.version,Je].join("-"));let c=se.get(o);return c||(c=await on(e,s,[async(u,p)=>{const g=bt(i);let b;try{b=await ne.transform(p,i)}catch(d){throw pt(d)}return g(b)},(u,p)=>xe(u,p,!0)]),se.set(o,c)),c},"transform");exports.isESM=lr,exports.readJsonFile=Ge,exports.transform=hn,exports.transformDynamicImport=xe,exports.transformSync=ln;
@@ -0,0 +1,223 @@
/**
* @fileoverview Rule that warns when identifier names that are
* specified in the configuration are used.
* @author Keith Cirkel (http://keithcirkel.co.uk)
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const astUtils = require("./utils/ast-utils");
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Checks whether the given node represents assignment target in a normal assignment or destructuring.
* @param {ASTNode} node The node to check.
* @returns {boolean} `true` if the node is assignment target.
*/
function isAssignmentTarget(node) {
const parent = node.parent;
return (
// normal assignment
(parent.type === "AssignmentExpression" && parent.left === node) ||
// destructuring
parent.type === "ArrayPattern" ||
parent.type === "RestElement" ||
(parent.type === "Property" &&
parent.value === node &&
parent.parent.type === "ObjectPattern") ||
(parent.type === "AssignmentPattern" && parent.left === node)
);
}
/**
* Checks whether the given node represents an imported name that is renamed in the same import/export specifier.
*
* Examples:
* import { a as b } from 'mod'; // node `a` is renamed import
* export { a as b } from 'mod'; // node `a` is renamed import
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a renamed import.
*/
function isRenamedImport(node) {
const parent = node.parent;
return (
(parent.type === "ImportSpecifier" &&
parent.imported !== parent.local &&
parent.imported === node) ||
(parent.type === "ExportSpecifier" &&
parent.parent.source && // re-export
parent.local !== parent.exported &&
parent.local === node)
);
}
/**
* Checks whether the given node is an ObjectPattern destructuring.
*
* Examples:
* const { a : b } = foo;
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is in an ObjectPattern destructuring.
*/
function isPropertyNameInDestructuring(node) {
const parent = node.parent;
return (
!parent.computed &&
parent.type === "Property" &&
parent.parent.type === "ObjectPattern" &&
parent.key === node
);
}
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "suggestion",
defaultOptions: [],
docs: {
description: "Disallow specified identifiers",
recommended: false,
frozen: true,
url: "https://eslint.org/docs/latest/rules/id-denylist",
},
schema: {
type: "array",
items: {
type: "string",
},
uniqueItems: true,
},
messages: {
restricted: "Identifier '{{name}}' is restricted.",
restrictedPrivate: "Identifier '#{{name}}' is restricted.",
},
},
create(context) {
const denyList = new Set(context.options);
const reportedNodes = new Set();
const sourceCode = context.sourceCode;
let globalScope;
/**
* Checks whether the given name is restricted.
* @param {string} name The name to check.
* @returns {boolean} `true` if the name is restricted.
* @private
*/
function isRestricted(name) {
return denyList.has(name);
}
/**
* Checks whether the given node represents a reference to a global variable that is not declared in the source code.
* These identifiers will be allowed, as it is assumed that user has no control over the names of external global variables.
* @param {ASTNode} node `Identifier` node to check.
* @returns {boolean} `true` if the node is a reference to a global variable.
*/
function isReferenceToGlobalVariable(node) {
const variable = globalScope.set.get(node.name);
return (
variable &&
variable.defs.length === 0 &&
variable.references.some(ref => ref.identifier === node)
);
}
/**
* Determines whether the given node should be checked.
* @param {ASTNode} node `Identifier` node.
* @returns {boolean} `true` if the node should be checked.
*/
function shouldCheck(node) {
// Import attributes are defined by environments, so naming conventions shouldn't apply to them
if (astUtils.isImportAttributeKey(node)) {
return false;
}
const parent = node.parent;
/*
* Member access has special rules for checking property names.
* Read access to a property with a restricted name is allowed, because it can be on an object that user has no control over.
* Write access isn't allowed, because it potentially creates a new property with a restricted name.
*/
if (
parent.type === "MemberExpression" &&
parent.property === node &&
!parent.computed
) {
return isAssignmentTarget(parent);
}
return (
parent.type !== "CallExpression" &&
parent.type !== "NewExpression" &&
!isRenamedImport(node) &&
!isPropertyNameInDestructuring(node) &&
!isReferenceToGlobalVariable(node)
);
}
/**
* Reports an AST node as a rule violation.
* @param {ASTNode} node The node to report.
* @returns {void}
* @private
*/
function report(node) {
/*
* We used the range instead of the node because it's possible
* for the same identifier to be represented by two different
* nodes, with the most clear example being shorthand properties:
* { foo }
* In this case, "foo" is represented by one node for the name
* and one for the value. The only way to know they are the same
* is to look at the range.
*/
if (!reportedNodes.has(node.range.toString())) {
const isPrivate = node.type === "PrivateIdentifier";
context.report({
node,
messageId: isPrivate ? "restrictedPrivate" : "restricted",
data: {
name: node.name,
},
});
reportedNodes.add(node.range.toString());
}
}
return {
Program(node) {
globalScope = sourceCode.getScope(node);
},
[["Identifier", "PrivateIdentifier"]](node) {
if (isRestricted(node.name) && shouldCheck(node)) {
report(node);
}
},
};
},
};
@@ -0,0 +1 @@
{"version":3,"file":"token.js","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/token.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,oCA+GC;AA1JD,0CAA4B;AAC5B,sDAAkD;AAElD,gDAAwB;AACxB,mDAAiD;AACjD,+DAAiE;AACjE,2DAA4E;AAC5E,uEAAiE;AACjE,4CAOsB;AAWtB,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAEH,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CACxC,CAAC,CAAC;AAEH,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,aAAa,EAAE,CAAC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AAK,EAAE,CAAC;YACb,IAAI,KAAK,YAAY,sBAAU,EAAE,CAAC;gBAC9B,MAAM,MAAM,GAAG,KAAK,YAAY,uBAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;gBACxD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACtD,CAAC;iBAAM,CAAC;gBACJ,MAAM,WAAW,GAAG,IAAI,uBAAW,CAAC,uBAAuB,CAAC,CAAC;gBAC7D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC,CAAC;YACzD,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAClB,CAAC"}
@@ -0,0 +1,13 @@
import type { NavigateOptions } from './link'
import type { RegisteredRouter } from './router'
export type UseNavigateResult<TDefaultFrom extends string> = <
TRouter extends RegisteredRouter,
TTo extends string | undefined,
TFrom extends string = TDefaultFrom,
TMaskFrom extends string = TFrom,
TMaskTo extends string = '',
>({
from,
...rest
}: NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>) => Promise<void>
@@ -0,0 +1,3 @@
export declare const encode: (s: string) => string;
export declare const decode: (s: string) => string;
//# sourceMappingURL=winchars.d.ts.map
@@ -0,0 +1,16 @@
export default class Transformer {
// Return true if anything was processed, false otherwise.
getPrefixCode() {
return "";
}
getHoistedCode() {
return "";
}
getSuffixCode() {
return "";
}
}
@@ -0,0 +1,105 @@
import { useMatch } from './useMatch'
import type {
StructuralSharingOption,
ValidateSelected,
} from './structuralSharing'
import type {
AnyRouter,
RegisteredRouter,
ResolveUseSearch,
StrictOrFrom,
ThrowConstraint,
ThrowOrOptional,
UseSearchResult,
} from '@tanstack/router-core'
export interface UseSearchBaseOptions<
TRouter extends AnyRouter,
TFrom,
TStrict extends boolean,
TThrow extends boolean,
TSelected,
TStructuralSharing,
> {
select?: (
state: ResolveUseSearch<TRouter, TFrom, TStrict>,
) => ValidateSelected<TRouter, TSelected, TStructuralSharing>
shouldThrow?: TThrow
}
export type UseSearchOptions<
TRouter extends AnyRouter,
TFrom,
TStrict extends boolean,
TThrow extends boolean,
TSelected,
TStructuralSharing,
> = StrictOrFrom<TRouter, TFrom, TStrict> &
UseSearchBaseOptions<
TRouter,
TFrom,
TStrict,
TThrow,
TSelected,
TStructuralSharing
> &
StructuralSharingOption<TRouter, TSelected, TStructuralSharing>
export type UseSearchRoute<out TFrom> = <
TRouter extends AnyRouter = RegisteredRouter,
TSelected = unknown,
TStructuralSharing extends boolean = boolean,
>(
opts?: UseSearchBaseOptions<
TRouter,
TFrom,
/* TStrict */ true,
/* TThrow */ true,
TSelected,
TStructuralSharing
> &
StructuralSharingOption<TRouter, TSelected, TStructuralSharing>,
) => UseSearchResult<TRouter, TFrom, true, TSelected>
/**
* Read and select the current route's search parameters with type-safety.
*
* Options:
* - `from`/`strict`: Control which route's search is read and how strictly it's typed
* - `select`: Map the search object to a derived value for render optimization
* - `structuralSharing`: Enable structural sharing for stable references
* - `shouldThrow`: Throw when the route is not found (strict contexts)
*
* @returns The search object (or selected value) for the matched route.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/useSearchHook
*/
export function useSearch<
TRouter extends AnyRouter = RegisteredRouter,
const TFrom extends string | undefined = undefined,
TStrict extends boolean = true,
TThrow extends boolean = true,
TSelected = unknown,
TStructuralSharing extends boolean = boolean,
>(
opts: UseSearchOptions<
TRouter,
TFrom,
TStrict,
ThrowConstraint<TStrict, TThrow>,
TSelected,
TStructuralSharing
>,
): ThrowOrOptional<
UseSearchResult<TRouter, TFrom, TStrict, TSelected>,
TThrow
> {
return useMatch({
from: opts.from!,
strict: opts.strict,
shouldThrow: opts.shouldThrow,
structuralSharing: opts.structuralSharing,
select: (match: any) => {
return opts.select ? opts.select(match.search) : match.search
},
}) as any
}
@@ -0,0 +1,19 @@
/**
* @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 ImagePlus = createLucideIcon("ImagePlus", [
["path", { d: "M16 5h6", key: "1vod17" }],
["path", { d: "M19 2v6", key: "4bpg5p" }],
["path", { d: "M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5", key: "1ue2ih" }],
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }],
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }]
]);
export { ImagePlus as default };
//# sourceMappingURL=image-plus.js.map
@@ -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 ThumbsDown = createLucideIcon("ThumbsDown", [
["path", { d: "M17 14V2", key: "8ymqnk" }],
[
"path",
{
d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",
key: "m61m77"
}
]
]);
export { ThumbsDown as default };
//# sourceMappingURL=thumbs-down.js.map
@@ -0,0 +1 @@
{"version":3,"file":"smile.js","sources":["../../../src/icons/smile.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Smile\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNOCAxNHMxLjUgMiA0IDIgNC0yIDQtMiIgLz4KICA8bGluZSB4MT0iOSIgeDI9IjkuMDEiIHkxPSI5IiB5Mj0iOSIgLz4KICA8bGluZSB4MT0iMTUiIHgyPSIxNS4wMSIgeTE9IjkiIHkyPSI5IiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/smile\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 Smile = createLucideIcon('Smile', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M8 14s1.5 2 4 2 4-2 4-2', key: '1y1vjs' }],\n ['line', { x1: '9', x2: '9.01', y1: '9', y2: '9', key: 'yxxnd0' }],\n ['line', { x1: '15', x2: '15.01', y1: '9', y2: '9', key: '1p4y9e' }],\n]);\n\nexport default Smile;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,iBAAiB,OAAS,CAAA,CAAA,CAAA;AAAA,CACtC,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAM,CAAI,CAAA,CAAA,CAAA,IAAA,CAAM,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU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:]":["\\p{Nd}"],"[:graph:]":["\\p{Z}\\p{C}",!0],"[:lower:]":["\\p{Ll}"],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}\\p{S}"],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f"],"[:upper:]":["\\p{Lu}"],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}"],"[:xdigit:]":["A-Fa-f0-9"]},y=i=>i.replace(/[[\]\\-]/g,"\\$&"),A=/$./,E=(i,t,e=!1,s)=>{let h=p=>{let m=s?p.normalize(s):p;return[...m].length===1?m:p},n=t;if(i.charAt(n)!=="[")throw new Error("not in a brace expression");let o=[],a=[],r=n+1,l=!1,c=!1,u=!1,g=n,d="";t:for(;r<i.length;){let p=String.fromCodePoint(i.codePointAt(r));if((p==="!"||p==="^")&&r===n+1){u=!0,r++;continue}if(p==="]"&&l&&!c){g=r+1;break}if(l=!0,p==="\\"&&!c){c=!0,r++;continue}if(p==="["&&!c){for(let[z,[R,B]]of Object.entries(D))if(i.startsWith(z,r)){if(d)return[A,i.length-n];r+=z.length,B?a.push(R):o.push(R);continue t}}c=!1;let m=h(p);if(d){m.codePointAt(0)>d.codePointAt(0)?o.push(y(d)+"-"+y(m)):m===d&&o.push(y(m)),d="",r+=p.length;continue}if(i.startsWith("-]",r+p.length)){o.push(y(m+"-")),r+=p.length+1;continue}if(i.startsWith("-",r+p.length)){d=m,r+=p.length+1;continue}o.push(y(m)),r+=p.length}if(g<r)return[A,0];if(!o.length&&!a.length)return[A,i.length-n];let f="["+(u?"^":"")+o.join("")+"]",w="["+(u?"":"^")+a.join("")+"]",q="^"+(o.length&&a.length?"("+f+"|"+w+")":o.length?f:w);return[new RegExp(q,e?"iu":"u"),g-n]};var C={t:"match",id:0},G="!?+*@",x=i=>({t:"lit",ch:i}),H=i=>i.replace(/[\\^$.*+?()[\]{}|/]/g,"\\$&"),W=i=>new RegExp(`^${H(i)}$`,"iu"),S=new Map,v=i=>{let t=S.get(i);return t||(t=W(i),S.size>=1e3&&S.clear(),S.set(i,t)),t},P=(i,t)=>{if(t===i.ch)return!0;if(!i.re)return!1;let e=t.charCodeAt(0);if(e>=128)return i.re.test(t);let s=i.ascii??=new Uint8Array(128);return s[e]||=i.re.test(t)?1:2,s[e]===1},J=(i,t,e,s)=>{let h=[];for(let n=0;n<i.length;){let o=String.fromCodePoint(i.codePointAt(n));if(o==="\\"){let a=i.codePointAt(n+1),r=a===void 0?o:String.fromCodePoint(a);h.push(x(r)),n+=1+r.length;continue}if(o==="["){let[a,r]=E(i,n,t,s);if(r){h.push({t:"class",re:a}),n+=r;continue}}if(!e&&G.includes(o)&&i[n+1]==="("){h.push({t:"open",type:o}),n+=2;continue}h.push(!e&&o==="|"?{t:"bar"}:!e&&o===")"?{t:"close"}:o==="*"?{t:"star"}:o==="?"?{t:"any"}:x(o)),n+=o.length}return h},K=i=>{let t=new Map,e=[];return i.forEach((s,h)=>{s.t==="open"?e.push(h):s.t==="close"&&e.length&&t.set(e.pop(),h)}),t},I=(i,t,e,s,h)=>{let n=[],o=[n];for(let a=e;a<s;a++){let r=i[a],l=t.get(a);if(r.t==="open"&&l!==void 0){let c=I(i,t,a+1,l,!1);n.push({t:"ext",type:r.type,alts:c}),a=l}else r.t==="bar"&&!h?o.push(n=[]):r.t==="open"?n.push(x(r.type),x("(")):r.t==="bar"?n.push(x("|")):r.t==="close"?n.push(x(")")):n.push(r)}return o},T=(i,t)=>{let e=[],s="",h=()=>{for(let n of s.normalize(t))e.push(x(n));s=""};for(let n of i){if(n.t==="lit"){s+=n.ch;continue}h(),e.push(n.t==="ext"?{...n,alts:n.alts.map(o=>T(o,t))}:n)}return h(),e},_=(i,t)=>{let e=1,s=a=>({t:"split",id:e++,out:a}),h=(a,r)=>a.reduceRight((l,c)=>n(c,l),r),n=(a,r)=>{switch(a.t){case"lit":let g=t?v(a.ch):void 0;return{t:"lit",id:e++,ch:a.ch,re:g,next:r};case"any":case"star":return{t:a.t,id:e++,next:r};case"class":return{t:"class",id:e++,re:a.re,next:r}}let l=g=>a.alts.map(d=>h(d,g));switch(a.type){case"@":return s(l(r));case"?":return s([r,...l(r)]);case"!":return{t:"neg",id:e++,sub:s(l(C)),next:r}}let c=s([]),u=s(l(c));return c.out.push(r,u),a.type==="*"?c:u};return[h(i,C),e]},Q=i=>{let t=[],e=new Set,s=n=>n.t==="match"?"match":String(n.id),h=(n,o)=>{if(n.t==="match"||e.has(n))return;e.add(n);let a=r=>t.push(`${o}${n.id}: ${r}`);switch(n.t){case"split":a(`split -> ${n.out.map(s).join(", ")}`);for(let r of n.out)h(r,o);return;case"neg":return a(`!(${s(n.sub)}) -> ${s(n.next)}`),h(n.sub,o+" "),h(n.next,o);case"lit":a(`${JSON.stringify(n.ch)} -> ${s(n.next)}`);break;case"class":a(`${n.re} -> ${s(n.next)}`);break;default:a(`${n.t==="any"?"?":"*"} -> ${s(n.next)}`)}h(n.next,o)};return h(i,""),[`start -> ${s(i)}`,...t].join(`
`)},b=class{gen;threads=[];match=!1;runs=[];ids=[];constructor(t){this.gen=t}get dead(){return!this.threads.length&&!this.match&&!this.runs.length}},O=(i,t)=>i.ids.length!==t.ids.length||i.runs.length!==t.runs.length||i.ids.some((e,s)=>e!==t.ids[s])?!1:i.runs.every(e=>t.runs.some(s=>s.neg===e.neg&&O(s.state,e.state))),N=i=>({has:new Float64Array(i),seen:new Float64Array(i),gen:0}),$=class{dots;dotStart;#t;constructor(t,e,s){this.dots=t,this.dotStart=e,this.#t=s}state(){return new b(++this.#t.gen)}done(t){return t.ids=t.threads.map(e=>e.id).sort((e,s)=>e-s),t.match&&t.ids.unshift(C.id),t}#s(t,e){let{seen:s}=this.#t;return s[e.id]===t.gen?!1:(s[e.id]=t.gen,!0)}#e(t,e){let{has:s}=this.#t;return s[e.id]===t.gen?!1:(s[e.id]=t.gen,t.threads.push(e),!0)}restricted(t,e){return e&&(this.dots||this.dotStart&&t===0)}add(t,e,s,h){switch(e.t){case"split":if(!this.#s(t,e))return;for(let o of e.out)this.add(t,o,s,h);return;case"neg":if(!this.#s(t,e))return;let n=this.state();return this.add(n,e.sub,s,!1),this.done(n),this.addRun(t,{t:"run",neg:e,state:n},s,h);case"star":if(this.restricted(s,h))return;this.#e(t,e)&&this.add(t,e.next,s,h);return;case"match":t.match=!0;return;default:this.#e(t,e)}}addRun(t,e,s,h){for(let n of t.runs)if(n.neg===e.neg&&O(n.state,e.state))return;t.runs.push(e),e.state.match||this.add(t,e.neg.next,s,h)}step(t,e,s,h){let n=this.state();for(let o of t.threads)switch(o.t){case"lit":P(o,e)&&this.add(n,o.next,s+1,h);break;case"any":this.restricted(s,h)||this.add(n,o.next,s+1,h);break;case"class":!this.restricted(s,h)&&o.re.test(e)&&this.add(n,o.next,s+1,h);break;case"star":this.restricted(s,h)||this.add(n,o,s+1,h)}if(!this.restricted(s,h))for(let o of t.runs){if(o.state.dead){this.addRun(n,o,s+1,h);continue}let a=this.step(o.state,e,s,!1);this.addRun(n,{t:"run",neg:o.neg,state:a},s+1,h)}return this.done(n)}},U=i=>{let t=i.ids.join();if(!i.runs.length)return t;let e=i.runs.map(s=>`${s.neg.id}(${U(s.state)})`);return`${t}|${e.sort().join("|")}`},V=1<<18,j=class{#t;#s=new Map;#e=0;#c;#n;#i;#h;constructor(t,e){this.#t=t,this.#i=new $(!1,!1,e),this.#h=new $(!1,!0,e)}#o(t){return{state:t,match:t.match,dead:t.dead,next:new Map}}#u(t){let e=U(t),s=this.#s.get(e);if(s)return s;this.#e>V&&this.#f();let h=this.#o(t);return this.#s.set(e,h),this.#e+=e.length+1,h}#f(){this.#s.clear(),this.#e=0,this.#c=void 0,this.#n=void 0}start(t){if(t){if(this.#n)return this.#n;let s=this.#h.state();return this.#h.add(s,this.#t,0,!0),this.#n=this.#o(this.#h.done(s))}if(this.#c)return this.#c;let e=this.#i.state();return this.#i.add(e,this.#t,0,!0),this.#c=this.#u(this.#i.done(e))}next(t,e){let s=e.charCodeAt(0),h=s<128?void 0:t.next.get(e);if(h)return h;let n=t===this.#n?this.#u(this.#h.step(t.state,e,0,!0)):this.#u(this.#i.step(t.state,e,1,!0));return s<128?(t.ascii||(t.ascii=new Array(128),this.#e+=128),t.ascii[s]=n):t.next.set(e,n),this.#e++,n}},X=i=>{let t=[];for(let e=i;e.t!=="match";e=e.next){if(e.t==="split"||e.t==="neg")return;t.push(e)}return t},Y=(i,t,e,s)=>{let h=0,n=e,o=-1,a=0;for(;n<s;){let r=i[h];if(r?.t==="star"){o=h++,a=n;continue}let l=t[n];if(r&&(r.t==="any"||r.t==="lit"&&P(r,l)||r.t==="class"&&r.re.test(l))){h++,n++;continue}if(o===-1)return!1;h=o+1,n=++a}for(;i[h]?.t==="star";)h++;return h===i.length},Z=i=>{let t=0,e=0;for(let s of i){let[h,n]=tt(s);t+=h,e+=n}return[t,e]},tt=i=>{if(i.t==="star")return[0,1/0];if(i.t!=="ext")return[1,1];if(i.type==="!")return[0,1/0];let t=i.alts.map(Z),e=Math.min(...t.map(n=>n[0])),s=Math.max(...t.map(n=>n[1])),h=s===0?0:1/0;return i.type==="@"?[e,s]:i.type==="?"?[0,s]:i.type==="*"?[0,h]:[e,h]},M=(i,t,e)=>{for(let s=0;s<i.length;s++)if(!P(i[s],t[e+s]))return!1;return!0},et=/[/\ud800-\udfff]/,st=/[\ud800-\udfff]/,k=i=>st.test(i)?[...i]:i,F=i=>{if(i.includes("/"))throw new Error("can only match a single path portion, got: "+i)},L=class{pattern;options;#t;#s;#e;#c;#n;#i=!1;#h;#o;#u=!1;#f=0;#m=1/0;#l=[];#a=[];#p;#g;#w=!1;#x;#r;constructor(t,e={}){if(t.includes("/"))throw new Error("can only match a single path portion, got pattern: "+t);this.pattern=t,this.options=e;let{nocase:s=!1,noext:h=!1,normalize:n}=e;this.#r=n===!0?"NFC":n||void 0;let o=/^[?*+@]\(\)$/.test(t),a=J(t,s,h||o,this.#r),[r]=I(a,K(a),0,a.length,!0);this.#r&&(r=T(r,this.#r));let[l,c]=_(r,s);if(this.#t=l,this.#s=c,r.every(u=>u.t==="lit"))this.#n=r.map(u=>u.ch).join(""),this.#i=s;else{let u=f=>f.t!=="lit"?void 0:s?{ch:f.ch,re:v(f.ch)}:{ch:f.ch};for(let f of r){let w=u(f);if(!w)break;this.#l.push(w)}for(let f=r.length-1;f>=0;f--){let w=u(r[f]);if(!w)break;this.#a.unshift(w)}this.#w=!!(this.#l.length||this.#a.length),s||(this.#p=this.#l.map(f=>f.ch).join(""),this.#g=this.#a.map(f=>f.ch).join("")),this.#o=X(this.#t)?.slice(this.#l.length,-this.#a.length||void 0),this.#u=!!this.#o?.every(f=>f.t==="star"||f.t==="any");let[g,d]=Z(r);this.#f=g,this.#m=d}}test(t){return this.#r?(F(t),this.#d(t.normalize(this.#r))):et.test(t)?(F(t),this.#d(t,[...t])):this.#d(t,t)}testUnchecked(t){return this.#d(this.#r?t.normalize(this.#r):tLine truncated
//# sourceMappingURL=index.min.js.map
@@ -0,0 +1 @@
{"version":3,"names":["unreleasedLabels","exports","safari","browserNameMap","and_chr","and_ff","android","chrome","edge","firefox","ie","ie_mob","ios_saf","node","deno","op_mob","opera","samsung"],"sources":["../src/targets.ts"],"sourcesContent":["export const unreleasedLabels = {\n safari: \"tp\",\n} as const;\n\n// Map from browserslist|@mdn/browser-compat-data browser names to @kangax/compat-table browser names\nexport const browserNameMap = {\n and_chr: \"chrome\",\n and_ff: \"firefox\",\n android: \"android\",\n chrome: \"chrome\",\n edge: \"edge\",\n firefox: \"firefox\",\n ie: \"ie\",\n ie_mob: \"ie\",\n ios_saf: \"ios\",\n node: \"node\",\n deno: \"deno\",\n op_mob: \"opera_mobile\",\n opera: \"opera\",\n safari: \"safari\",\n samsung: \"samsung\",\n} as const;\n\nexport type BrowserslistBrowserName = keyof typeof browserNameMap;\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9BE,MAAM,EAAE;AACV,CAAU;AAGH,MAAMC,cAAc,GAAAF,OAAA,CAAAE,cAAA,GAAG;EAC5BC,OAAO,EAAE,QAAQ;EACjBC,MAAM,EAAE,SAAS;EACjBC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,EAAE,EAAE,IAAI;EACRC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE,KAAK;EACdC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,cAAc;EACtBC,KAAK,EAAE,OAAO;EACdd,MAAM,EAAE,QAAQ;EAChBe,OAAO,EAAE;AACX,CAAU","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={C:{"115":0.00537,"120":0.07792,"121":0.12629,"122":0.00269,"123":0.00537,"124":0.01075,"126":0.00269,"127":0.00537,"130":0.00269,"132":0.00269,"133":0.00269,"140":0.00806,"146":0.00269,"148":0.00269,"150":0.00537,"151":0.06718,"152":0.00806,"153":0.00537,"154":0.04837,"155":0.27676,"156":0.24452,"157":0.02687,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 125 128 129 131 134 135 136 137 138 139 141 142 143 144 145 147 149 158 159 160 3.5 3.6"},D:{"67":0.00269,"77":0.00269,"78":0.00269,"87":0.00269,"92":0.00269,"94":0.00269,"95":0.00269,"101":0.00269,"103":0.02956,"104":0.00806,"105":0.00806,"106":0.01075,"107":0.00806,"108":0.00537,"109":0.09136,"110":0.00806,"111":0.01075,"112":0.01344,"114":0.00537,"116":0.01881,"117":0.00537,"118":0.18272,"119":0.18272,"120":0.12898,"121":0.00806,"122":0.01612,"123":0.01344,"124":0.01344,"125":0.00269,"126":0.00269,"127":0.00269,"128":0.09673,"130":0.08598,"131":0.0215,"133":0.05643,"134":0.05105,"135":0.05105,"136":0.05911,"137":0.07255,"138":0.07255,"139":0.10479,"140":0.05105,"141":0.05374,"142":0.16659,"143":0.01075,"144":0.02687,"145":0.02687,"146":0.10748,"147":0.02956,"148":0.04299,"149":0.11554,"150":0.2284,"151":1.99913,"152":7.07218,"153":5.71794,"154":1.19303,"155":0.02418,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 68 69 70 71 72 73 74 75 76 79 80 81 83 84 85 86 88 89 90 91 93 96 97 98 99 100 102 113 115 129 132 156 157"},F:{"67":0.00269,"72":0.00269,"100":0.00269,"101":0.00269,"105":0.00269,"106":0.00537,"107":0.00269,"114":0.00537,"118":0.00269,"121":0.00269,"122":0.00269,"133":0.01612,"134":0.05911,"135":0.25527,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 102 103 104 108 109 110 111 112 113 115 116 117 119 120 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"16":0.00537,"92":0.00269,"109":0.00269,"118":0.00269,"119":0.08061,"120":0.07524,"121":0.02418,"122":0.00806,"123":0.00537,"126":0.00269,"130":0.00269,"131":0.00269,"132":0.00269,"136":0.00269,"141":0.00269,"142":0.13704,"143":0.00806,"144":0.00537,"145":0.00269,"146":0.01881,"147":0.00537,"148":0.0215,"149":0.0215,"150":0.02687,"151":0.22571,"152":1.01837,"153":1.26558,"154":0.28482,_:"12 13 14 15 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 124 125 127 128 129 133 134 135 137 138 139 140"},E:{"27":0.06986,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 15.1 15.4 16.2 27.1 27.2 TP","14.1":0.00537,"15.2-15.3":0.00269,"15.5":0.00269,"15.6":0.00806,"16.0":0.00806,"16.1":0.00806,"16.3":0.02687,"16.4":0.00269,"16.5":0.00537,"16.6":0.0618,"17.0":0.00537,"17.1":0.07792,"17.2":0.00269,"17.3":0.01075,"17.4":0.00537,"17.5":0.04837,"17.6":0.06986,"18.0":0.00269,"18.1":0.02418,"18.2":0.00269,"18.3":0.01881,"18.4":0.00269,"18.5-18.7":0.02687,"26.0":0.01075,"26.1":0.00537,"26.2":0.04031,"26.3":0.02687,"26.4":0.01344,"26.5":0.16391,"26.6":0.55352},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00227,"5.0-5.1":0.00227,"6.0-6.1":0,"7.0-7.1":0.00455,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.02274,"11.0-11.2":0.00227,"11.3-11.4":0.00455,"12.0-12.1":0,"12.2-12.5":0.05912,"13.0-13.1":0,"13.2":0.01137,"13.3":0,"13.4-13.7":0.00227,"14.0-14.4":0.0091,"14.5-14.8":0.01364,"15.0-15.1":0.01364,"15.2-15.3":0.0091,"15.4":0.01137,"15.5":0.01364,"15.6-15.8":0.29562,"16.0":0.02274,"16.1":0.04093,"16.2":0.02274,"16.3":0.05003,"16.4":0.01137,"16.5":0.01819,"16.6-16.7":0.4116,"17.0":0.01592,"17.1":0.02274,"17.2":0.02274,"17.3":0.03411,"17.4":0.04775,"17.5":0.09324,"17.6-17.7":0.24105,"18.0":0.05003,"18.1":0.10006,"18.2":0.13644,"18.3":0.2365,"18.4":0.14781,"18.5-18.7":3.05402,"26.0":0.14781,"26.1":0.15009,"26.2":0.39113,"26.3":0.42297,"26.4":0.30927,"26.5":2.07164,"26.6":12.78233,"27.0":0.98011,"27.1":0,"27.2":0.02501},P:{"26":0.00888,"28":0.01775,"29":0.02663,"30":1.23366,_:"4 20 21 22 23 24 25 27 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.00731,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.58496,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":49.44172},R:{_:"0"},M:{"0":0.3071},Q:{_:"14.9"},O:{"0":0.39485},H:{all:0}};
@@ -0,0 +1,8 @@
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
module.exports = {};
@@ -0,0 +1,49 @@
"use client";
import { wrap } from 'motion-utils';
import { useRef, useState, useCallback } from 'react';
/**
* Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.
*
* An index value can be passed to the returned `cycle` function to cycle to a specific index.
*
* ```jsx
* import * as React from "react"
* import { motion, useCycle } from "framer-motion"
*
* export const MyComponent = () => {
* const [x, cycleX] = useCycle(0, 50, 100)
*
* return (
* <motion.div
* animate={{ x: x }}
* onTap={() => cycleX()}
* />
* )
* }
* ```
*
* @param items - items to cycle through
* @returns [currentState, cycleState]
*
* @public
*/
function useCycle(...items) {
const index = useRef(0);
const [item, setItem] = useState(items[index.current]);
const runCycle = useCallback((next) => {
index.current =
typeof next !== "number"
? wrap(0, items.length, index.current + 1)
: next;
setItem(items[index.current]);
},
// The array will change on each call, but by putting items.length at
// the front of this array, we guarantee the dependency comparison will match up
// eslint-disable-next-line react-hooks/exhaustive-deps
[items.length, ...items]);
return [item, runCycle];
}
export { useCycle };
//# sourceMappingURL=use-cycle.mjs.map
@@ -0,0 +1 @@
{"version":3,"names":["_arrayLikeToArray","require","_unsupportedIterableToArray","o","minLen","arrayLikeToArray","name","Object","prototype","toString","call","slice","constructor","Array","from","test"],"sources":["../../src/helpers/unsupportedIterableToArray.ts"],"sourcesContent":["/* @minVersion 7.9.0 */\n\nimport arrayLikeToArray from \"./arrayLikeToArray.ts\";\n\ntype NonArrayIterable<V, T extends Iterable<V> = Iterable<V>> = T extends any[]\n ? never\n : Iterable<V>;\n\nexport default function _unsupportedIterableToArray<T>(\n o: RelativeIndexable<T> /* string | typedarray */ | ArrayLike<T> | Set<T>,\n minLen?: number | null,\n): T[];\nexport default function _unsupportedIterableToArray<T, K>(\n o: Map<K, T>,\n minLen?: number | null,\n): [K, T][];\n// This is a specific overload added specifically for createForOfIteratorHelpers.ts\nexport default function _unsupportedIterableToArray<T>(\n o: NonArrayIterable<T>,\n minLen?: number | null,\n): undefined;\nexport default function _unsupportedIterableToArray(\n o: any,\n minLen?: number | null,\n): any[] | undefined {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray<string>(o, minLen);\n var name = Object.prototype.toString.call(o).slice(8, -1);\n if (name === \"Object\" && o.constructor) name = o.constructor.name;\n if (name === \"Map\" || name === \"Set\") return Array.from(o);\n if (\n name === \"Arguments\" ||\n /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(name)\n ) {\n return arrayLikeToArray(o, minLen);\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,iBAAA,GAAAC,OAAA;AAmBe,SAASC,2BAA2BA,CACjDC,CAAM,EACNC,MAAsB,EACH;EACnB,IAAI,CAACD,CAAC,EAAE;EACR,IAAI,OAAOA,CAAC,KAAK,QAAQ,EAAE,OAAO,IAAAE,yBAAgB,EAASF,CAAC,EAAEC,MAAM,CAAC;EACrE,IAAIE,IAAI,GAAGC,MAAM,CAACC,SAAS,CAACC,QAAQ,CAACC,IAAI,CAACP,CAAC,CAAC,CAACQ,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EACzD,IAAIL,IAAI,KAAK,QAAQ,IAAIH,CAAC,CAACS,WAAW,EAAEN,IAAI,GAAGH,CAAC,CAACS,WAAW,CAACN,IAAI;EACjE,IAAIA,IAAI,KAAK,KAAK,IAAIA,IAAI,KAAK,KAAK,EAAE,OAAOO,KAAK,CAACC,IAAI,CAACX,CAAC,CAAC;EAC1D,IACEG,IAAI,KAAK,WAAW,IACpB,0CAA0C,CAACS,IAAI,CAACT,IAAI,CAAC,EACrD;IACA,OAAO,IAAAD,yBAAgB,EAACF,CAAC,EAAEC,MAAM,CAAC;EACpC;AACF","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"useNavigate.js","names":[],"sources":["../../src/useNavigate.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { useLayoutEffect } from './utils'\nimport { useRouter } from './useRouter'\nimport type {\n AnyRouter,\n FromPathOption,\n NavigateOptions,\n RegisteredRouter,\n UseNavigateResult,\n} from '@tanstack/router-core'\n\n/**\n * Imperative navigation hook.\n *\n * Returns a stable `navigate(options)` function to change the current location\n * programmatically. Prefer the `Link` component for user-initiated navigation,\n * and use this hook from effects, callbacks, or handlers where imperative\n * navigation is required.\n *\n * Options:\n * - `from`: Optional route base used to resolve relative `to` paths.\n *\n * @returns A function that accepts `NavigateOptions`.\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/useNavigateHook\n */\nexport function useNavigate<\n TRouter extends AnyRouter = RegisteredRouter,\n TDefaultFrom extends string = string,\n>(_defaultOpts?: {\n from?: FromPathOption<TRouter, TDefaultFrom>\n}): UseNavigateResult<TDefaultFrom> {\n const router = useRouter()\n\n return React.useCallback(\n (options: NavigateOptions) => {\n return router.navigate({\n ...options,\n from: options.from ?? _defaultOpts?.from,\n })\n },\n [_defaultOpts?.from, router],\n ) as UseNavigateResult<TDefaultFrom>\n}\n\n/**\n * Component that triggers a navigation when rendered. Navigation executes\n * in an effect after mount/update.\n *\n * Props are the same as `NavigateOptions` used by `navigate()`.\n *\n * @returns null\n * @link https://tanstack.com/router/latest/docs/framework/react/api/router/navigateComponent\n */\nexport function Navigate<\n TRouter extends AnyRouter = RegisteredRouter,\n const TFrom extends string = string,\n const TTo extends string | undefined = undefined,\n const TMaskFrom extends string = TFrom,\n const TMaskTo extends string = '',\n>(props: NavigateOptions<TRouter, TFrom, TTo, TMaskFrom, TMaskTo>): null {\n const router = useRouter()\n const navigate = useNavigate()\n\n const previousPropsRef = React.useRef<NavigateOptions<\n TRouter,\n TFrom,\n TTo,\n TMaskFrom,\n TMaskTo\n > | null>(null)\n useLayoutEffect(() => {\n if (previousPropsRef.current !== props) {\n navigate(props)\n previousPropsRef.current = props\n }\n }, [router, props, navigate])\n return null\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2BA,SAAgB,YAGd,cAEkC;CAClC,MAAM,SAAS,WAAW;AAE1B,QAAO,QAAM,aACV,YAA6B;AAC5B,SAAO,OAAO,SAAS;GACrB,GAAG;GACH,MAAM,QAAQ,QAAQ,cAAc;GACrC,CAAC;IAEJ,CAAC,cAAc,MAAM,OAAO,CAC7B;;;;;;;;;;;AAYH,SAAgB,SAMd,OAAuE;CACvE,MAAM,SAAS,WAAW;CAC1B,MAAM,WAAW,aAAa;CAE9B,MAAM,mBAAmB,QAAM,OAMrB,KAAK;AACf,uBAAsB;AACpB,MAAI,iBAAiB,YAAY,OAAO;AACtC,YAAS,MAAM;AACf,oBAAiB,UAAU;;IAE5B;EAAC;EAAQ;EAAO;EAAS,CAAC;AAC7B,QAAO"}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_Z","33":"_A"},B:{"1":"_5O","33":"_I","132":"_mG _OF","260":"Y _dI _xH"},C:{"1":"_lQ","2":"_2C","33":"_fC _CE"},D:{"1":"_4O","2":"_MO","132":"_nD _eC _XR"},E:{"1":"_6D","2":"_4","33":"_fJ _UD _xE _7E"},F:{"1":"_jO","2":"_HM","132":"zB _mE _HG _MB"},G:{"1":"_UE","2":"_sC","33":"_0O _5K _aG"},H:{"2":"1D"},I:{"1":"I","2":"_G"},J:{"2":"_B"},K:{"1":"H","2":"_D"},L:{"1":"I"},M:{"1":"YC"},N:{"2":"_A"},O:{"1":"bC"},P:{"1":"_hB","2":"J","132":"8D"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:4,C:"CSS Hyphenation",D:true};
@@ -0,0 +1,36 @@
/**
* @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 PackageOpen = createLucideIcon("PackageOpen", [
["path", { d: "M12 22v-9", key: "x3hkom" }],
[
"path",
{
d: "M15.17 2.21a1.67 1.67 0 0 1 1.63 0L21 4.57a1.93 1.93 0 0 1 0 3.36L8.82 14.79a1.655 1.655 0 0 1-1.64 0L3 12.43a1.93 1.93 0 0 1 0-3.36z",
key: "2ntwy6"
}
],
[
"path",
{
d: "M20 13v3.87a2.06 2.06 0 0 1-1.11 1.83l-6 3.08a1.93 1.93 0 0 1-1.78 0l-6-3.08A2.06 2.06 0 0 1 4 16.87V13",
key: "1pmm1c"
}
],
[
"path",
{
d: "M21 12.43a1.93 1.93 0 0 0 0-3.36L8.83 2.2a1.64 1.64 0 0 0-1.63 0L3 4.57a1.93 1.93 0 0 0 0 3.36l12.18 6.86a1.636 1.636 0 0 0 1.63 0z",
key: "12ttoo"
}
]
]);
export { PackageOpen as default };
//# sourceMappingURL=package-open.js.map
@@ -0,0 +1 @@
module.exports={C:{"115":0.06193,"120":0.00516,"121":0.01548,"131":0.01032,"140":0.04129,"150":0.02064,"153":0.00516,"154":0.05161,"155":0.32514,"156":0.30966,"157":0.02581,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 123 124 125 126 127 128 129 130 132 133 134 135 136 137 138 139 141 142 143 144 145 146 147 148 149 151 152 158 159 160 3.5 3.6"},D:{"101":0.00516,"102":0.00516,"103":0.00516,"104":0.00516,"105":0.00516,"107":0.00516,"109":0.00516,"110":0.00516,"111":0.00516,"112":0.00516,"118":0.02064,"119":0.01032,"120":0.02581,"122":0.01032,"126":0.08258,"128":0.00516,"131":0.00516,"133":0.01548,"134":0.01032,"135":0.01548,"136":0.01548,"137":0.01548,"138":0.03613,"139":0.01548,"140":0.01548,"141":0.02064,"142":0.04129,"144":0.00516,"145":0.0929,"146":0.00516,"147":0.05677,"148":0.10322,"149":0.12386,"150":0.32514,"151":2.93145,"152":21.70717,"153":11.66386,"154":5.31583,"155":0.00516,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 106 108 113 114 115 116 117 121 123 124 125 127 129 130 132 143 156 157"},F:{"133":0.00516,"134":0.00516,"135":0.01032,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"119":0.00516,"120":0.00516,"137":0.01032,"145":0.00516,"146":0.03097,"147":0.00516,"148":0.01032,"150":0.02064,"151":0.09806,"152":2.02827,"153":2.70953,"154":0.73286,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 138 139 140 141 142 143 144 149"},E:{"27":0.02581,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 13.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 17.0 17.2 17.3 18.2 26.1 27.1 27.2 TP","15.6":0.00516,"16.5":0.00516,"16.6":0.02064,"17.1":0.03097,"17.4":0.00516,"17.5":0.00516,"17.6":0.01032,"18.0":0.00516,"18.1":0.00516,"18.3":0.01032,"18.4":0.00516,"18.5-18.7":0.00516,"26.0":0.00516,"26.2":0.01548,"26.3":0.00516,"26.4":0.04129,"26.5":0.10322,"26.6":0.4903},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00159,"5.0-5.1":0.00159,"6.0-6.1":0,"7.0-7.1":0.00319,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01593,"11.0-11.2":0.00159,"11.3-11.4":0.00319,"12.0-12.1":0,"12.2-12.5":0.04143,"13.0-13.1":0,"13.2":0.00797,"13.3":0,"13.4-13.7":0.00159,"14.0-14.4":0.00637,"14.5-14.8":0.00956,"15.0-15.1":0.00956,"15.2-15.3":0.00637,"15.4":0.00797,"15.5":0.00956,"15.6-15.8":0.20715,"16.0":0.01593,"16.1":0.02868,"16.2":0.01593,"16.3":0.03506,"16.4":0.00797,"16.5":0.01275,"16.6-16.7":0.28842,"17.0":0.01115,"17.1":0.01593,"17.2":0.01593,"17.3":0.0239,"17.4":0.03346,"17.5":0.06533,"17.6-17.7":0.16891,"18.0":0.03506,"18.1":0.07011,"18.2":0.09561,"18.3":0.16572,"18.4":0.10358,"18.5-18.7":2.14005,"26.0":0.10358,"26.1":0.10517,"26.2":0.27408,"26.3":0.29639,"26.4":0.21671,"26.5":1.45166,"26.6":8.95697,"27.0":0.68679,"27.1":0,"27.2":0.01753},P:{"26":0.01886,"27":0.16028,"28":0.23571,"29":0.198,"30":3.59224,_:"4 20 21 22 23 24 25 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0"},I:{"0":0.01451,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.01936,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":28.6445},R:{_:"0"},M:{"0":0.28066},Q:{_:"14.9"},O:{"0":0.00484},H:{all:0}};
@@ -0,0 +1,231 @@
"use client";
// src/roving-focus-group.tsx
import * as React from "react";
import { composeEventHandlers } from "@radix-ui/primitive";
import { createCollection } from "@radix-ui/react-collection";
import { useComposedRefs } from "@radix-ui/react-compose-refs";
import { createContextScope } from "@radix-ui/react-context";
import { useId } from "@radix-ui/react-id";
import { Primitive } from "@radix-ui/react-primitive";
import { useCallbackRef } from "@radix-ui/react-use-callback-ref";
import { useControllableState } from "@radix-ui/react-use-controllable-state";
import { useDirection } from "@radix-ui/react-direction";
import { jsx } from "react/jsx-runtime";
var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
var GROUP_NAME = "RovingFocusGroup";
var [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);
var [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(
GROUP_NAME,
[createCollectionScope]
);
var [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);
var RovingFocusGroup = React.forwardRef(
(props, forwardedRef) => {
return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });
}
);
RovingFocusGroup.displayName = GROUP_NAME;
var RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {
const {
__scopeRovingFocusGroup,
orientation,
loop = false,
dir,
currentTabStopId: currentTabStopIdProp,
defaultCurrentTabStopId,
onCurrentTabStopIdChange,
onEntryFocus,
preventScrollOnEntryFocus = false,
...groupProps
} = props;
const ref = React.useRef(null);
const composedRefs = useComposedRefs(forwardedRef, ref);
const direction = useDirection(dir);
const [currentTabStopId, setCurrentTabStopId] = useControllableState({
prop: currentTabStopIdProp,
defaultProp: defaultCurrentTabStopId ?? null,
onChange: onCurrentTabStopIdChange,
caller: GROUP_NAME
});
const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
const handleEntryFocus = useCallbackRef(onEntryFocus);
const getItems = useCollection(__scopeRovingFocusGroup);
const isClickFocusRef = React.useRef(false);
const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);
React.useEffect(() => {
const node = ref.current;
if (node) {
node.addEventListener(ENTRY_FOCUS, handleEntryFocus);
return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);
}
}, [handleEntryFocus]);
return /* @__PURE__ */ jsx(
RovingFocusProvider,
{
scope: __scopeRovingFocusGroup,
orientation,
dir: direction,
loop,
currentTabStopId,
onItemFocus: React.useCallback(
(tabStopId) => setCurrentTabStopId(tabStopId),
[setCurrentTabStopId]
),
onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),
onFocusableItemAdd: React.useCallback(
() => setFocusableItemsCount((prevCount) => prevCount + 1),
[]
),
onFocusableItemRemove: React.useCallback(
() => setFocusableItemsCount((prevCount) => prevCount - 1),
[]
),
children: /* @__PURE__ */ jsx(
Primitive.div,
{
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
"data-orientation": orientation,
...groupProps,
ref: composedRefs,
style: { outline: "none", ...props.style },
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
isClickFocusRef.current = true;
}),
onFocus: composeEventHandlers(props.onFocus, (event) => {
const isKeyboardFocus = !isClickFocusRef.current;
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
event.currentTarget.dispatchEvent(entryFocusEvent);
if (!entryFocusEvent.defaultPrevented) {
const items = getItems().filter((item) => item.focusable);
const activeItem = items.find((item) => item.active);
const currentItem = items.find((item) => item.id === currentTabStopId);
const candidateItems = [activeItem, currentItem, ...items].filter(
Boolean
);
const candidateNodes = candidateItems.map((item) => item.ref.current);
focusFirst(candidateNodes, preventScrollOnEntryFocus);
}
}
isClickFocusRef.current = false;
}),
onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))
}
)
}
);
});
var ITEM_NAME = "RovingFocusGroupItem";
var RovingFocusGroupItem = React.forwardRef(
(props, forwardedRef) => {
const {
__scopeRovingFocusGroup,
focusable = true,
active = false,
tabStopId,
children,
...itemProps
} = props;
const autoId = useId();
const id = tabStopId || autoId;
const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
const isCurrentTabStop = context.currentTabStopId === id;
const getItems = useCollection(__scopeRovingFocusGroup);
const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;
React.useEffect(() => {
if (focusable) {
onFocusableItemAdd();
return () => onFocusableItemRemove();
}
}, [focusable, onFocusableItemAdd, onFocusableItemRemove]);
return /* @__PURE__ */ jsx(
Collection.ItemSlot,
{
scope: __scopeRovingFocusGroup,
id,
focusable,
active,
children: /* @__PURE__ */ jsx(
Primitive.span,
{
tabIndex: isCurrentTabStop ? 0 : -1,
"data-orientation": context.orientation,
...itemProps,
ref: forwardedRef,
onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {
if (!focusable) event.preventDefault();
else context.onItemFocus(id);
}),
onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),
onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {
if (event.key === "Tab" && event.shiftKey) {
context.onItemShiftTab();
return;
}
if (event.target !== event.currentTarget) return;
const focusIntent = getFocusIntent(event, context.orientation, context.dir);
if (focusIntent !== void 0) {
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
event.preventDefault();
const items = getItems().filter((item) => item.focusable);
let candidateNodes = items.map((item) => item.ref.current);
if (focusIntent === "last") candidateNodes.reverse();
else if (focusIntent === "prev" || focusIntent === "next") {
if (focusIntent === "prev") candidateNodes.reverse();
const currentIndex = candidateNodes.indexOf(event.currentTarget);
candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
}
setTimeout(() => focusFirst(candidateNodes));
}
}),
children: typeof children === "function" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children
}
)
}
);
}
);
RovingFocusGroupItem.displayName = ITEM_NAME;
var MAP_KEY_TO_FOCUS_INTENT = {
ArrowLeft: "prev",
ArrowUp: "prev",
ArrowRight: "next",
ArrowDown: "next",
PageUp: "first",
Home: "first",
PageDown: "last",
End: "last"
};
function getDirectionAwareKey(key, dir) {
if (dir !== "rtl") return key;
return key === "ArrowLeft" ? "ArrowRight" : key === "ArrowRight" ? "ArrowLeft" : key;
}
function getFocusIntent(event, orientation, dir) {
const key = getDirectionAwareKey(event.key, dir);
if (orientation === "vertical" && ["ArrowLeft", "ArrowRight"].includes(key)) return void 0;
if (orientation === "horizontal" && ["ArrowUp", "ArrowDown"].includes(key)) return void 0;
return MAP_KEY_TO_FOCUS_INTENT[key];
}
function focusFirst(candidates, preventScroll = false) {
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
for (const candidate of candidates) {
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
candidate.focus({ preventScroll });
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
}
}
function wrapArray(array, startIndex) {
return array.map((_, index) => array[(startIndex + index) % array.length]);
}
var Root = RovingFocusGroup;
var Item = RovingFocusGroupItem;
export {
Item,
Root,
RovingFocusGroup,
RovingFocusGroupItem,
createRovingFocusGroupScope
};
//# sourceMappingURL=index.mjs.map
@@ -0,0 +1,9 @@
import { Result, Router } from "../../router.js";
//#region src/router/linear-router/router.d.ts
export declare class LinearRouter<T> implements Router<T> {
name: string;
add(method: string, path: string, handler: T): void;
match(method: string, path: string): Result<T>;
}
//#endregion
@@ -0,0 +1,60 @@
{
"name": "@radix-ui/react-compose-refs",
"version": "1.1.3",
"license": "MIT",
"source": "./src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"files": [
"dist",
"README.md"
],
"sideEffects": false,
"devDependencies": {
"@types/react": "^19.2.2",
"@types/react-dom": "^19.2.2",
"react": "^19.2.0",
"react-dom": "^19.2.0",
"typescript": "^5.9.3",
"@repo/builder": "0.0.0",
"@repo/typescript-config": "0.0.0"
},
"peerDependencies": {
"@types/react": "*",
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
}
},
"homepage": "https://radix-ui.com/primitives",
"repository": {
"type": "git",
"url": "git+https://github.com/radix-ui/primitives.git",
"directory": "packages/react/compose-refs"
},
"bugs": {
"url": "https://github.com/radix-ui/primitives/issues"
},
"scripts": {
"lint": "oxlint --max-warnings 0 src",
"clean": "rm -rf dist",
"reset": "rm -rf dist node_modules",
"typecheck": "tsc --noEmit",
"build": "radix-build"
},
"types": "./dist/index.d.ts",
"exports": {
".": {
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
}
}
}
@@ -0,0 +1 @@
{"version":3,"names":["_classCheckPrivateStaticFieldDescriptor","descriptor","action","undefined","TypeError"],"sources":["../../src/helpers/classCheckPrivateStaticFieldDescriptor.js"],"sourcesContent":["/* @minVersion 7.13.10 */\n/* @onlyBabel7 */\n\nexport default function _classCheckPrivateStaticFieldDescriptor(\n descriptor,\n action,\n) {\n if (descriptor === undefined) {\n throw new TypeError(\n \"attempted to \" + action + \" private static field before its declaration\",\n );\n }\n}\n"],"mappings":";;;;;;AAGe,SAASA,uCAAuCA,CAC7DC,UAAU,EACVC,MAAM,EACN;EACA,IAAID,UAAU,KAAKE,SAAS,EAAE;IAC5B,MAAM,IAAIC,SAAS,CACjB,eAAe,GAAGF,MAAM,GAAG,8CAC7B,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,IAAI,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAA;AAE9B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAS,EAAsB,EAAE,CACtD,IAAI,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAA;AAiD9B;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,GAAG,CAAgB;IAClD,GAAG;IACH,EAAE;IACF,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;IACH,GAAG;CACJ,CAAC,CAAA;AAEF,4CAA4C;AAC5C,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,GAAG,CAA+B;IACxD,CAAC,GAAG,EAAE,MAAM,CAAC;IAC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\n name.has(c as EntryTypeCode)\n\nexport const isName = (c: string): c is EntryTypeName =>\n code.has(c as EntryTypeName)\n\nexport type EntryTypeCode =\n | '0'\n | ''\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | '7'\n | 'g'\n | 'x'\n | 'A'\n | 'D'\n | 'I'\n | 'K'\n | 'L'\n | 'M'\n | 'N'\n | 'S'\n | 'V'\n | 'X'\n\nexport type EntryTypeName =\n | 'File'\n | 'OldFile'\n | 'Link'\n | 'SymbolicLink'\n | 'CharacterDevice'\n | 'BlockDevice'\n | 'Directory'\n | 'FIFO'\n | 'ContiguousFile'\n | 'GlobalExtendedHeader'\n | 'ExtendedHeader'\n | 'SolarisACL'\n | 'GNUDumpDir'\n | 'Inode'\n | 'NextFileHasLongLinkpath'\n | 'NextFileHasLongPath'\n | 'ContinuationFile'\n | 'OldGnuLongPath'\n | 'SparseFile'\n | 'TapeVolumeHeader'\n | 'OldExtendedHeader'\n | 'Unsupported'\n\n/**\n * types that are a normal file system entry, not metadata.\n *\n * These can be the subject of extended/globalExtended headers, long path\n * names, long linkpath names, etc.\n *\n * Any other types are meta, and cannot be targetted by extended PAX headers.\n */\nexport const normalFsTypes = new Set<EntryTypeCode>([\n '0',\n '',\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n 'D',\n])\n\n// map types from key to human-friendly name\nexport const name = new Map<EntryTypeCode, EntryTypeName>([\n ['0', 'File'],\n // same as File\n ['', 'OldFile'],\n ['1', 'Link'],\n ['2', 'SymbolicLink'],\n // Devices and FIFOs aren't fully supported\n // they are parsed, but skipped when unpacking\n ['3', 'CharacterDevice'],\n ['4', 'BlockDevice'],\n ['5', 'Directory'],\n ['6', 'FIFO'],\n // same as File\n ['7', 'ContiguousFile'],\n // pax headers\n ['g', 'GlobalExtendedHeader'],\n ['x', 'ExtendedHeader'],\n // vendor-specific stuff\n // skip\n ['A', 'SolarisACL'],\n // like 5, but with data, which should be skipped\n ['D', 'GNUDumpDir'],\n // metadata only, skip\n ['I', 'Inode'],\n // data = link path of next file\n ['K', 'NextFileHasLongLinkpath'],\n // data = path of next file\n ['L', 'NextFileHasLongPath'],\n // skip\n ['M', 'ContinuationFile'],\n // like L\n ['N', 'OldGnuLongPath'],\n // skip\n ['S', 'SparseFile'],\n // skip\n ['V', 'TapeVolumeHeader'],\n // like x\n ['X', 'OldExtendedHeader'],\n])\n\n// map the other direction\nexport const code = new Map<EntryTypeName, EntryTypeCode>(\n Array.from(name).map(kv => [kv[1], kv[0]]),\n)\n"]}
@@ -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 ChevronsDownUp = createLucideIcon("ChevronsDownUp", [
["path", { d: "m7 20 5-5 5 5", key: "13a0gw" }],
["path", { d: "m7 4 5 5 5-5", key: "1kwcof" }]
]);
export { ChevronsDownUp as default };
//# sourceMappingURL=chevrons-down-up.js.map
@@ -0,0 +1 @@
{"version":3,"names":["_cloneNode","require","clone","node","cloneNode"],"sources":["../../src/clone/clone.ts"],"sourcesContent":["import cloneNode from \"./cloneNode.ts\";\nimport type * as t from \"../index.ts\";\n\n/**\n * Create a shallow clone of a `node`, including only\n * properties belonging to the node.\n * @deprecated Use t.cloneNode instead.\n */\nexport default function clone<T extends t.Node>(node: T): T {\n return cloneNode(node, /* deep */ false);\n}\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAQe,SAASC,KAAKA,CAAmBC,IAAO,EAAK;EAC1D,OAAO,IAAAC,kBAAS,EAACD,IAAI,EAAa,KAAK,CAAC;AAC1C","ignoreList":[]}
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_E"},B:{"2":"_I","33":"_K"},C:{"2":"_S"},D:{"2":"_6N","33":"_uP _sL"},E:{"1":"_QB","2":"_4","33":"_RC _UD"},F:{"2":"_T","33":"_a"},G:{"1":"_BB","2":"_d","33":"_wD _gC"},H:{"2":"1D"},I:{"2":"_W","33":"_X"},J:{"2":"_B"},K:{"2":"_D","33":"H"},L:{"33":"I"},M:{"2":"YC"},N:{"2":"_A"},O:{"33":"bC"},P:{"33":"_F"},Q:{"33":"JE"},R:{"33":"KE"},S:{"2":"_C"}},B:4,C:"CSS Cross-Fade Function",D:true};
@@ -0,0 +1,125 @@
[Build]: http://img.shields.io/travis/litejs/natural-compare-lite.png
[Coverage]: http://img.shields.io/coveralls/litejs/natural-compare-lite.png
[1]: https://travis-ci.org/litejs/natural-compare-lite
[2]: https://coveralls.io/r/litejs/natural-compare-lite
[npm package]: https://npmjs.org/package/natural-compare-lite
[GitHub repo]: https://github.com/litejs/natural-compare-lite
@version 1.4.0
@date 2015-10-26
@stability 3 - Stable
Natural Compare &ndash; [![Build][]][1] [![Coverage][]][2]
===============
Compare strings containing a mix of letters and numbers
in the way a human being would in sort order.
This is described as a "natural ordering".
```text
Standard sorting: Natural order sorting:
img1.png img1.png
img10.png img2.png
img12.png img10.png
img2.png img12.png
```
String.naturalCompare returns a number indicating
whether a reference string comes before or after or is the same
as the given string in sort order.
Use it with builtin sort() function.
### Installation
- In browser
```html
<script src=min.natural-compare.js></script>
```
- In node.js: `npm install natural-compare-lite`
```javascript
require("natural-compare-lite")
```
### Usage
```javascript
// Simple case sensitive example
var a = ["z1.doc", "z10.doc", "z17.doc", "z2.doc", "z23.doc", "z3.doc"];
a.sort(String.naturalCompare);
// ["z1.doc", "z2.doc", "z3.doc", "z10.doc", "z17.doc", "z23.doc"]
// Use wrapper function for case insensitivity
a.sort(function(a, b){
return String.naturalCompare(a.toLowerCase(), b.toLowerCase());
})
// In most cases we want to sort an array of objects
var a = [ {"street":"350 5th Ave", "room":"A-1021"}
, {"street":"350 5th Ave", "room":"A-21046-b"} ];
// sort by street, then by room
a.sort(function(a, b){
return String.naturalCompare(a.street, b.street) || String.naturalCompare(a.room, b.room);
})
// When text transformation is needed (eg toLowerCase()),
// it is best for performance to keep
// transformed key in that object.
// There are no need to do text transformation
// on each comparision when sorting.
var a = [ {"make":"Audi", "model":"A6"}
, {"make":"Kia", "model":"Rio"} ];
// sort by make, then by model
a.map(function(car){
car.sort_key = (car.make + " " + car.model).toLowerCase();
})
a.sort(function(a, b){
return String.naturalCompare(a.sort_key, b.sort_key);
})
```
- Works well with dates in ISO format eg "Rev 2012-07-26.doc".
### Custom alphabet
It is possible to configure a custom alphabet
to achieve a desired order.
```javascript
// Estonian alphabet
String.alphabet = "ABDEFGHIJKLMNOPRSŠZŽTUVÕÄÖÜXYabdefghijklmnoprsšzžtuvõäöüxy"
["t", "z", "x", "õ"].sort(String.naturalCompare)
// ["z", "t", "õ", "x"]
// Russian alphabet
String.alphabet = "АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя"
["Ё", "А", "Б"].sort(String.naturalCompare)
// ["А", "Б", "Ё"]
```
External links
--------------
- [GitHub repo][https://github.com/litejs/natural-compare-lite]
- [jsperf test](http://jsperf.com/natural-sort-2/12)
Licence
-------
Copyright (c) 2012-2015 Lauri Rooden &lt;lauri@rooden.ee&gt;
[The MIT License](http://lauri.rooden.ee/mit-license.txt)
@@ -0,0 +1,222 @@
# eslint-plugin-react-refresh [![npm](https://img.shields.io/npm/v/eslint-plugin-react-refresh)](https://www.npmjs.com/package/eslint-plugin-react-refresh)
Validate that your components can safely be updated with Fast Refresh.
## Explainer
"Fast Refresh", also known as "hot reloading", is a feature in many modern bundlers.
If you update some React component(s) on disk, then the bundler will know to update only the impacted parts of your page -- without a full page reload.
`eslint-plugin-react-refresh` enforces that your components are structured in a way that integrations such as [react-refresh](https://www.npmjs.com/package/react-refresh) expect.
### Limitations
⚠️ To avoid false positives, by default this plugin is only applied on `tsx` & `jsx` files. See [Options](#options) to run on JS files. ⚠️
The plugin relies on naming conventions (i.e. use PascalCase for components, camelCase for util functions). This is why there are some limitations:
- `export *` are not supported and will be reported as an error
- Anonymous function are not supported (i.e `export default function() {}`)
- Class components are not supported
- All-uppercase function export is considered an error when not using direct named export (ex `const CMS = () => <></>; export { CMS }`)
## Installation
```sh
npm i -D eslint-plugin-react-refresh
```
## Usage
This plugin provides a single rule, `react-refresh/only-export-components`. There are multiple ways to enable it.
### Recommended config
```js
import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";
export default defineConfig(
/* Main config */
reactRefresh.configs.recommended(),
);
```
### Vite config
This enables the `allowConstantExport` option which is supported by Vite React plugins.
```js
import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";
export default defineConfig(
/* Main config */
reactRefresh.configs.vite(),
);
```
### Next config
This allows exports like `fetchCache` and `revalidate` which are used in Page or Layout components and don't trigger a full page reload.
```js
import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";
export default defineConfig(
/* Main config */
reactRefresh.configs.next(),
);
```
### Without config
```js
import { defineConfig } from "eslint/config";
import { reactRefresh } from "eslint-plugin-react-refresh";
export default defineConfig({
// in main config for TSX/JSX source files
plugins: {
"react-refresh": reactRefresh.plugin,
},
rules: {
"react-refresh/only-export-components": "error",
},
});
```
## Examples
These examples are from enabling `react-refresh/only-exports-components`.
### Fail
```jsx
export const foo = () => {};
export const Bar = () => <></>;
```
```jsx
export default function () {}
export default compose()(MainComponent)
```
```jsx
export * from "./foo";
```
```jsx
const Tab = () => {};
export const tabs = [<Tab />, <Tab />];
```
```jsx
const App = () => {};
createRoot(document.getElementById("root")).render(<App />);
```
### Pass
```jsx
export default function Foo() {
return <></>;
}
```
```jsx
const foo = () => {};
export const Bar = () => <></>;
```
```jsx
import { App } from "./App";
createRoot(document.getElementById("root")).render(<App />);
```
## Options
These options are all present on `react-refresh/only-exports-components`.
```ts
interface Options {
extraHOCs?: string[];
allowExportNames?: string[];
allowConstantExport?: boolean;
checkJS?: boolean;
}
const defaultOptions: Options = {
extraHOCs: [],
allowExportNames: [],
allowConstantExport: false,
checkJS: false,
};
```
### extraHOCs <small>(v0.5.0)</small>
If you're exporting components wrapped in non built-in React HOC (memo, forwardRef, lazy), you can use this option to avoid false positives.
```json
{
"react-refresh/only-export-components": [
"error",
{ "extraHOCs": ["observer", "withAuth"] }
]
}
```
### allowExportNames <small>(v0.4.4)</small>
> Default: `[]`
If you use a framework that handles HMR of some specific exports, you can use this option to avoid warning for them.
Example for [Remix](https://remix.run/docs/en/main/discussion/hot-module-replacement#supported-exports):
```json
{
"react-refresh/only-export-components": [
"error",
{ "allowExportNames": ["meta", "links", "headers", "loader", "action"] }
]
}
```
### allowConstantExport <small>(v0.4.0)</small>
> Default: `false` (`true` in `vite` config)
Don't warn when a constant (string, number, boolean, templateLiteral) is exported aside one or more components.
This should be enabled if the fast refresh implementation correctly handles this case (HMR when the constant doesn't change, propagate update to importers when the constant changes.). Vite supports it, PR welcome if you notice other integrations works well.
```json
{
"react-refresh/only-export-components": [
"error",
{ "allowConstantExport": true }
]
}
```
Enabling this option allows code such as the following:
```jsx
export const CONSTANT = 3;
export const Foo = () => <></>;
```
### checkJS <small>(v0.3.3)</small>
> Default: `false`
If you're using JSX inside `.js` files (which I don't recommend because it forces you to configure every tool you use to switch the parser), you can still use the plugin by enabling this option. To reduce the number of false positive, only files importing `react` are checked.
```json
{
"react-refresh/only-export-components": ["error", { "checkJS": true }]
}
```
@@ -0,0 +1,32 @@
/*! *****************************************************************************
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 PromiseConstructor {
/**
* Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result
* in a Promise.
*
* @param callbackFn A function that is called synchronously. It can do anything: either return
* a value, throw an error, or return a promise.
* @param args Additional arguments, that will be passed to the callback.
*
* @returns A Promise that is:
* - Already fulfilled, if the callback synchronously returns a value.
* - Already rejected, if the callback synchronously throws an error.
* - Asynchronously fulfilled or rejected, if the callback returns a promise.
*/
try<T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U): Promise<Awaited<T>>;
}
@@ -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 FileCode2 = createLucideIcon("FileCode2", [
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
["path", { d: "m5 12-3 3 3 3", key: "oke12k" }],
["path", { d: "m9 18 3-3-3-3", key: "112psh" }]
]);
export { FileCode2 as default };
//# sourceMappingURL=file-code-2.js.map
@@ -0,0 +1,20 @@
(The MIT License)
Copyright (c) 2014-2017 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2018-2021 Josh Junon
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,27 @@
import type { TSESTree } from '@typescript-eslint/types';
import type { VisitorOptions } from './VisitorBase';
import { VisitorBase } from './VisitorBase';
export type PatternVisitorCallback = (pattern: TSESTree.Identifier, info: {
assignments: (TSESTree.AssignmentExpression | TSESTree.AssignmentPattern)[];
rest: boolean;
topLevel: boolean;
}) => void;
export type PatternVisitorOptions = VisitorOptions;
export declare class PatternVisitor extends VisitorBase {
#private;
readonly rightHandNodes: TSESTree.Node[];
constructor(options: PatternVisitorOptions, rootPattern: TSESTree.Node, callback: PatternVisitorCallback);
static isPattern(node: TSESTree.Node): node is TSESTree.ArrayPattern | TSESTree.AssignmentPattern | TSESTree.Identifier | TSESTree.ObjectPattern | TSESTree.RestElement | TSESTree.SpreadElement;
protected ArrayExpression(node: TSESTree.ArrayExpression): void;
protected ArrayPattern(pattern: TSESTree.ArrayPattern): void;
protected AssignmentExpression(node: TSESTree.AssignmentExpression): void;
protected AssignmentPattern(pattern: TSESTree.AssignmentPattern): void;
protected CallExpression(node: TSESTree.CallExpression): void;
protected Decorator(): void;
protected Identifier(pattern: TSESTree.Identifier): void;
protected MemberExpression(node: TSESTree.MemberExpression): void;
protected Property(property: TSESTree.Property): void;
protected RestElement(pattern: TSESTree.RestElement): void;
protected SpreadElement(node: TSESTree.SpreadElement): void;
protected TSTypeAnnotation(): void;
}
@@ -0,0 +1,297 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
JS_EXT_RE: () => JS_EXT_RE,
bundleRequire: () => bundleRequire,
dynamicImport: () => dynamicImport,
externalPlugin: () => externalPlugin,
injectFileScopePlugin: () => injectFileScopePlugin,
loadTsConfig: () => import_load_tsconfig.loadTsConfig,
match: () => match,
tsconfigPathsToRegExp: () => tsconfigPathsToRegExp
});
module.exports = __toCommonJS(src_exports);
var import_fs2 = __toESM(require("fs"), 1);
var import_path2 = __toESM(require("path"), 1);
var import_url = require("url");
var import_esbuild = require("esbuild");
var import_load_tsconfig = require("load-tsconfig");
// src/utils.ts
var import_fs = __toESM(require("fs"), 1);
var import_path = __toESM(require("path"), 1);
var getPkgType = () => {
try {
const pkg = JSON.parse(
import_fs.default.readFileSync(import_path.default.resolve("package.json"), "utf-8")
);
return pkg.type;
} catch (error) {
}
};
function guessFormat(inputFile) {
if (!usingDynamicImport)
return "cjs";
const ext = import_path.default.extname(inputFile);
const type = getPkgType();
if (ext === ".js") {
return type === "module" ? "esm" : "cjs";
} else if (ext === ".ts" || ext === ".mts") {
return "esm";
} else if (ext === ".mjs") {
return "esm";
}
return "cjs";
}
var usingDynamicImport = typeof jest === "undefined";
var dynamicImport = async (id, { format }) => {
const fn = format === "esm" ? (file) => import(file) : false ? createRequire(import_meta.url) : require;
return fn(id);
};
var getRandomId = () => {
return Math.random().toString(36).substring(2, 15);
};
// src/index.ts
var DIRNAME_VAR_NAME = "__injected_dirname__";
var FILENAME_VAR_NAME = "__injected_filename__";
var IMPORT_META_URL_VAR_NAME = "__injected_import_meta_url__";
var JS_EXT_RE = /\.([mc]?[tj]s|[tj]sx)$/;
var PATH_NODE_MODULES_RE = /[\/\\]node_modules[\/\\]/;
function inferLoader(ext) {
if (ext === ".mjs" || ext === ".cjs")
return "js";
if (ext === ".mts" || ext === ".cts")
return "ts";
return ext.slice(1);
}
var defaultReadFile = (filepath) => import_fs2.default.readFileSync(filepath, "utf-8");
var defaultGetOutputFile = (filepath, format) => filepath.replace(
JS_EXT_RE,
`.bundled_${getRandomId()}.${format === "esm" ? "mjs" : "cjs"}`
);
var tsconfigPathsToRegExp = (paths) => {
return Object.keys(paths || {}).map((key) => {
return new RegExp(`^${key.replace(/\*/, ".*")}$`);
});
};
var match = (id, patterns) => {
if (!patterns)
return false;
return patterns.some((p) => {
if (p instanceof RegExp) {
return p.test(id);
}
return id === p || id.startsWith(p + "/");
});
};
var externalPlugin = ({
external,
notExternal,
externalNodeModules = true
} = {}) => {
return {
name: "bundle-require:external",
setup(ctx) {
ctx.onResolve({ filter: /.*/ }, async (args) => {
if (match(args.path, external)) {
return {
external: true
};
}
if (match(args.path, notExternal)) {
return;
}
if (externalNodeModules && args.path.match(PATH_NODE_MODULES_RE)) {
const resolved = args.path[0] === "." ? import_path2.default.resolve(args.resolveDir, args.path) : args.path;
return {
path: (0, import_url.pathToFileURL)(resolved).toString(),
external: true
};
}
if (args.path[0] === "." || import_path2.default.isAbsolute(args.path)) {
return;
}
return {
external: true
};
});
}
};
};
var injectFileScopePlugin = ({
readFile = defaultReadFile
} = {}) => {
return {
name: "bundle-require:inject-file-scope",
setup(ctx) {
ctx.initialOptions.define = {
...ctx.initialOptions.define,
__dirname: DIRNAME_VAR_NAME,
__filename: FILENAME_VAR_NAME,
"import.meta.url": IMPORT_META_URL_VAR_NAME
};
ctx.onLoad({ filter: JS_EXT_RE }, (args) => {
const contents = readFile(args.path);
const injectLines = [
`const ${FILENAME_VAR_NAME} = ${JSON.stringify(args.path)};`,
`const ${DIRNAME_VAR_NAME} = ${JSON.stringify(
import_path2.default.dirname(args.path)
)};`,
`const ${IMPORT_META_URL_VAR_NAME} = ${JSON.stringify(
(0, import_url.pathToFileURL)(args.path).href
)};`
];
return {
contents: injectLines.join("") + contents,
loader: inferLoader(import_path2.default.extname(args.path))
};
});
}
};
};
function bundleRequire(options) {
return new Promise((resolve, reject) => {
var _a, _b, _c, _d, _e;
if (!JS_EXT_RE.test(options.filepath)) {
throw new Error(`${options.filepath} is not a valid JS file`);
}
const preserveTemporaryFile = (_a = options.preserveTemporaryFile) != null ? _a : !!process.env.BUNDLE_REQUIRE_PRESERVE;
const cwd = options.cwd || process.cwd();
const format = (_b = options.format) != null ? _b : guessFormat(options.filepath);
const tsconfig = options.tsconfig === false ? void 0 : typeof options.tsconfig === "string" || !options.tsconfig ? (0, import_load_tsconfig.loadTsConfig)(cwd, options.tsconfig) : { data: options.tsconfig, path: void 0 };
const resolvePaths = tsconfigPathsToRegExp(
((_c = tsconfig == null ? void 0 : tsconfig.data.compilerOptions) == null ? void 0 : _c.paths) || {}
);
const extractResult = async (result) => {
if (!result.outputFiles) {
throw new Error(`[bundle-require] no output files`);
}
const { text } = result.outputFiles[0];
const getOutputFile = options.getOutputFile || defaultGetOutputFile;
const outfile = getOutputFile(options.filepath, format);
await import_fs2.default.promises.writeFile(outfile, text, "utf8");
let mod;
const req = options.require || dynamicImport;
try {
mod = await req(
format === "esm" ? (0, import_url.pathToFileURL)(outfile).href : outfile,
{ format }
);
} finally {
if (!preserveTemporaryFile) {
await import_fs2.default.promises.unlink(outfile);
}
}
return {
mod,
dependencies: result.metafile ? Object.keys(result.metafile.inputs) : []
};
};
const { watch: watchMode, ...restEsbuildOptions } = options.esbuildOptions || {};
const esbuildOptions = {
...restEsbuildOptions,
entryPoints: [options.filepath],
absWorkingDir: cwd,
outfile: "out.js",
format,
platform: "node",
sourcemap: "inline",
bundle: true,
metafile: true,
write: false,
...(tsconfig == null ? void 0 : tsconfig.path) ? { tsconfig: tsconfig.path } : { tsconfigRaw: (tsconfig == null ? void 0 : tsconfig.data) || {} },
plugins: [
...((_d = options.esbuildOptions) == null ? void 0 : _d.plugins) || [],
externalPlugin({
external: options.external,
notExternal: [...options.notExternal || [], ...resolvePaths],
externalNodeModules: (_e = options.externalNodeModules) != null ? _e : !options.filepath.match(PATH_NODE_MODULES_RE)
}),
injectFileScopePlugin({
readFile: options.readFile
})
]
};
const run = async () => {
if (!(watchMode || options.onRebuild)) {
const result = await (0, import_esbuild.build)(esbuildOptions);
resolve(await extractResult(result));
} else {
const rebuildCallback = typeof watchMode === "object" && typeof watchMode.onRebuild === "function" ? watchMode.onRebuild : async (error, result) => {
var _a2, _b2;
if (error) {
(_a2 = options.onRebuild) == null ? void 0 : _a2.call(options, { err: error });
}
if (result) {
(_b2 = options.onRebuild) == null ? void 0 : _b2.call(options, await extractResult(result));
}
};
const onRebuildPlugin = () => {
return {
name: "bundle-require:on-rebuild",
setup(ctx2) {
let count = 0;
ctx2.onEnd(async (result) => {
if (count++ === 0) {
if (result.errors.length === 0)
resolve(await extractResult(result));
} else {
if (result.errors.length > 0) {
return rebuildCallback(
{ errors: result.errors, warnings: result.warnings },
null
);
}
if (result) {
rebuildCallback(null, result);
}
}
});
}
};
};
esbuildOptions.plugins.push(onRebuildPlugin());
const ctx = await (0, import_esbuild.context)(esbuildOptions);
await ctx.watch();
}
};
run().catch(reject);
});
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
JS_EXT_RE,
bundleRequire,
dynamicImport,
externalPlugin,
injectFileScopePlugin,
loadTsConfig,
match,
tsconfigPathsToRegExp
});
@@ -0,0 +1 @@
{"version":3,"file":"notepad-text.js","sources":["../../../src/icons/notepad-text.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name NotepadText\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAydjQiIC8+CiAgPHBhdGggZD0iTTEyIDJ2NCIgLz4KICA8cGF0aCBkPSJNMTYgMnY0IiAvPgogIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxOCIgeD0iNCIgeT0iNCIgcng9IjIiIC8+CiAgPHBhdGggZD0iTTggMTBoNiIgLz4KICA8cGF0aCBkPSJNOCAxNGg4IiAvPgogIDxwYXRoIGQ9Ik04IDE4aDUiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/notepad-text\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 NotepadText = createLucideIcon('NotepadText', [\n ['path', { d: 'M8 2v4', key: '1cmpym' }],\n ['path', { d: 'M12 2v4', key: '3427ic' }],\n ['path', { d: 'M16 2v4', key: '4m81vk' }],\n ['rect', { width: '16', height: '18', x: '4', y: '4', rx: '2', key: '1u9h20' }],\n ['path', { d: 'M8 10h6', key: '3oa6kw' }],\n ['path', { d: 'M8 14h8', key: '1fgep2' }],\n ['path', { d: 'M8 18h5', key: '17enja' }],\n]);\n\nexport default NotepadText;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,C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AAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,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,130 @@
/**
* @fileoverview Define utility functions for token store.
* @author Toru Nagashima
*/
"use strict";
//------------------------------------------------------------------------------
// Helpers
//------------------------------------------------------------------------------
/**
* Finds the index of the first token which is after the given location.
* If it was not found, this returns `tokens.length`.
* @param {(Token|Comment)[]} tokens It searches the token in this list.
* @param {number} location The location to search.
* @returns {number} The found index or `tokens.length`.
*/
function search(tokens, location) {
for (
let minIndex = 0, maxIndex = tokens.length - 1;
minIndex <= maxIndex;
) {
/*
* Calculate the index in the middle between minIndex and maxIndex.
* `| 0` is used to round a fractional value down to the nearest integer: this is similar to
* using `Math.trunc()` or `Math.floor()`, but performance tests have shown this method to
* be faster.
*/
const index = ((minIndex + maxIndex) / 2) | 0;
const token = tokens[index];
const tokenStartLocation = token.range[0];
if (location <= tokenStartLocation) {
if (index === minIndex) {
return index;
}
maxIndex = index;
} else {
minIndex = index + 1;
}
}
return tokens.length;
}
/**
* Gets the index of the `startLoc` in `tokens`.
* `startLoc` can be the value of `node.range[1]`, so this checks about `startLoc - 1` as well.
* @param {(Token|Comment)[]} tokens The tokens to find an index.
* @param {Object} indexMap The map from locations to indices.
* @param {number} startLoc The location to get an index.
* @returns {number} The index.
*/
function getFirstIndex(tokens, indexMap, startLoc) {
if (startLoc === -1) {
return 0;
}
if (startLoc in indexMap) {
return indexMap[startLoc];
}
if (startLoc - 1 in indexMap) {
const index = indexMap[startLoc - 1];
const token = tokens[index];
// If the mapped index is out of bounds, the returned cursor index will point after the end of the tokens array.
if (!token) {
return tokens.length;
}
/*
* For the map of "comment's location -> token's index", it points the next token of a comment.
* In that case, +1 is unnecessary.
*/
if (token.range[0] >= startLoc) {
return index;
}
return index + 1;
}
// Program node that doesn't start/end with a token or comment
if (startLoc === 0) {
return 0;
}
return tokens.length;
}
/**
* Gets the index of the `endLoc` in `tokens`.
* The information of end locations are recorded at `endLoc - 1` in `indexMap`, so this checks about `endLoc - 1` as well.
* @param {(Token|Comment)[]} tokens The tokens to find an index.
* @param {Object} indexMap The map from locations to indices.
* @param {number} endLoc The location to get an index.
* @returns {number} The index.
*/
function getLastIndex(tokens, indexMap, endLoc) {
if (endLoc === -1) {
return tokens.length - 1;
}
if (endLoc in indexMap) {
return indexMap[endLoc] - 1;
}
if (endLoc - 1 in indexMap) {
const index = indexMap[endLoc - 1];
const token = tokens[index];
// If the mapped index is out of bounds, the returned cursor index will point before the end of the tokens array.
if (!token) {
return tokens.length - 1;
}
/*
* For the map of "comment's location -> token's index", it points the next token of a comment.
* In that case, -1 is necessary.
*/
if (token.range[1] > endLoc) {
return index - 1;
}
return index;
}
// Program node that doesn't start/end with a token or comment
if (endLoc === 0) {
return -1;
}
return tokens.length - 1;
}
//------------------------------------------------------------------------------
// Exports
//------------------------------------------------------------------------------
module.exports = { search, getFirstIndex, getLastIndex };
@@ -0,0 +1,120 @@
"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, {
createContext: () => createContext2,
createContextScope: () => createContextScope
});
module.exports = __toCommonJS(index_exports);
// src/create-context.tsx
var React = __toESM(require("react"));
var import_jsx_runtime = require("react/jsx-runtime");
function createContext2(rootComponentName, defaultContext) {
const Context = React.createContext(defaultContext);
Context.displayName = rootComponentName + "Context";
const Provider = (props) => {
const { children, ...context } = props;
const value = React.useMemo(() => context, Object.values(context));
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
};
Provider.displayName = rootComponentName + "Provider";
function useContext2(consumerName, options = {}) {
const { optional = false } = options;
const context = React.useContext(Context);
if (context) return context;
if (defaultContext !== void 0) return defaultContext;
if (optional) return void 0;
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
}
return [Provider, useContext2];
}
function createContextScope(scopeName, createContextScopeDeps = []) {
let defaultContexts = [];
function createContext3(rootComponentName, defaultContext) {
const BaseContext = React.createContext(defaultContext);
BaseContext.displayName = rootComponentName + "Context";
const index = defaultContexts.length;
defaultContexts = [...defaultContexts, defaultContext];
const Provider = (props) => {
const { scope, children, ...context } = props;
const Context = scope?.[scopeName]?.[index] || BaseContext;
const value = React.useMemo(() => context, Object.values(context));
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
};
Provider.displayName = rootComponentName + "Provider";
function useContext2(consumerName, scope, options = {}) {
const { optional = false } = options;
const Context = scope?.[scopeName]?.[index] || BaseContext;
const context = React.useContext(Context);
if (context) return context;
if (defaultContext !== void 0) return defaultContext;
if (optional) return void 0;
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
}
return [Provider, useContext2];
}
const createScope = () => {
const scopeContexts = defaultContexts.map((defaultContext) => {
return React.createContext(defaultContext);
});
return function useScope(scope) {
const contexts = scope?.[scopeName] || scopeContexts;
return React.useMemo(
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
[scope, contexts]
);
};
};
createScope.scopeName = scopeName;
return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];
}
function composeContextScopes(...scopes) {
const baseScope = scopes[0];
if (scopes.length === 1) return baseScope;
const createScope = () => {
const scopeHooks = scopes.map((createScope2) => ({
useScope: createScope2(),
scopeName: createScope2.scopeName
}));
return function useComposedScopes(overrideScopes) {
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
const scopeProps = useScope(overrideScopes);
const currentScope = scopeProps[`__scope${scopeName}`];
return { ...nextScopes2, ...currentScope };
}, {});
return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
};
};
createScope.scopeName = baseScope.scopeName;
return createScope;
}
//# sourceMappingURL=index.js.map
@@ -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 Trello = createLucideIcon("Trello", [
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
["rect", { width: "3", height: "9", x: "7", y: "7", key: "14n3xi" }],
["rect", { width: "3", height: "5", x: "14", y: "7", key: "s4azjd" }]
]);
export { Trello as default };
//# sourceMappingURL=trello.js.map
@@ -0,0 +1 @@
{"version":3,"names":["_objectWithoutPropertiesLoose","require","_objectWithoutProperties","source","excluded","target","objectWithoutPropertiesLoose","key","i","Object","getOwnPropertySymbols","sourceSymbolKeys","length","indexOf","prototype","propertyIsEnumerable","call"],"sources":["../../src/helpers/objectWithoutProperties.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.ts\";\n\nexport default function _objectWithoutProperties(\n source: null | undefined,\n excluded: PropertyKey[],\n): Record<string, never>;\nexport default function _objectWithoutProperties<\n T extends object,\n K extends PropertyKey[],\n>(\n source: T | null | undefined,\n excluded: K,\n): Pick<T, Exclude<keyof T, K[number]>>;\nexport default function _objectWithoutProperties<\n T extends object,\n K extends PropertyKey[],\n>(\n source: T | null | undefined,\n excluded: K,\n): Pick<T, Exclude<keyof T, K[number]>> | Record<string, never> {\n if (source == null) return {};\n\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i] as keyof typeof source & keyof typeof target;\n if (excluded.indexOf(key) !== -1) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,6BAAA,GAAAC,OAAA;AAae,SAASC,wBAAwBA,CAI9CC,MAA4B,EAC5BC,QAAW,EACmD;EAC9D,IAAID,MAAM,IAAI,IAAI,EAAE,OAAO,CAAC,CAAC;EAE7B,IAAIE,MAAM,GAAG,IAAAC,qCAA4B,EAACH,MAAM,EAAEC,QAAQ,CAAC;EAC3D,IAAIG,GAAG,EAAEC,CAAC;EAEV,IAAIC,MAAM,CAACC,qBAAqB,EAAE;IAChC,IAAIC,gBAAgB,GAAGF,MAAM,CAACC,qBAAqB,CAACP,MAAM,CAAC;IAC3D,KAAKK,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGG,gBAAgB,CAACC,MAAM,EAAEJ,CAAC,EAAE,EAAE;MAC5CD,GAAG,GAAGI,gBAAgB,CAACH,CAAC,CAA8C;MACtE,IAAIJ,QAAQ,CAACS,OAAO,CAACN,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE;MAClC,IAAI,CAACE,MAAM,CAACK,SAAS,CAACC,oBAAoB,CAACC,IAAI,CAACb,MAAM,EAAEI,GAAG,CAAC,EAAE;MAC9DF,MAAM,CAACE,GAAG,CAAC,GAAGJ,MAAM,CAACI,GAAG,CAAC;IAC3B;EACF;EAEA,OAAOF,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"file":"volume-1.js","sources":["../../../src/icons/volume-1.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Volume1\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTEgNC43MDJhLjcwNS43MDUgMCAwIDAtMS4yMDMtLjQ5OEw2LjQxMyA3LjU4N0ExLjQgMS40IDAgMCAxIDUuNDE2IDhIM2ExIDEgMCAwIDAtMSAxdjZhMSAxIDAgMCAwIDEgMWgyLjQxNmExLjQgMS40IDAgMCAxIC45OTcuNDEzbDMuMzgzIDMuMzg0QS43MDUuNzA1IDAgMCAwIDExIDE5LjI5OHoiIC8+CiAgPHBhdGggZD0iTTE2IDlhNSA1IDAgMCAxIDAgNiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/volume-1\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 Volume1 = createLucideIcon('Volume1', [\n [\n 'path',\n {\n d: 'M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z',\n key: 'uqj9uw',\n },\n ],\n ['path', { d: 'M16 9a5 5 0 0 1 0 6', key: '1q6k2b' }],\n]);\n\nexport default Volume1;\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,CAC1C,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,C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}
@@ -0,0 +1 @@
module.exports={C:{"4":0.00883,"115":0.07066,"120":0.18106,"121":0.36211,"122":0.01766,"123":0.00883,"124":0.00442,"125":0.00442,"127":0.00442,"131":0.00442,"137":0.00442,"138":0.00442,"140":0.0265,"142":0.00442,"143":0.00883,"149":0.00883,"150":0.00442,"151":0.00883,"152":0.15014,"153":0.04416,"154":0.18547,"155":0.5255,"156":0.49018,"157":0.01766,_:"2 3 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 126 128 129 130 132 133 134 135 136 139 141 144 145 146 147 148 158 159 160 3.5 3.6"},D:{"70":0.00442,"71":0.00442,"74":0.00442,"79":0.00442,"84":0.00442,"86":0.00442,"87":0.00442,"95":0.00442,"98":0.00442,"101":0.00883,"103":0.14131,"104":0.07949,"105":0.07949,"106":0.07507,"107":0.07949,"108":0.07507,"109":0.43718,"110":0.07507,"111":0.07949,"112":0.07949,"113":0.00883,"114":0.00442,"116":0.16339,"117":0.07949,"118":0.3047,"119":0.37978,"120":0.49459,"121":0.00442,"122":0.01766,"123":0.01325,"124":0.0839,"125":0.00442,"126":0.01325,"128":0.03533,"129":0.00442,"130":0.00883,"131":0.15456,"132":0.00442,"133":0.20755,"134":0.05741,"135":0.05741,"136":0.05741,"137":0.06182,"138":0.17222,"139":0.06182,"140":0.0839,"141":0.06182,"142":0.2208,"143":0.02208,"144":0.07949,"145":0.09715,"146":0.09715,"147":0.0265,"148":0.18989,"149":0.38861,"150":1.14374,"151":1.62509,"152":6.45178,"153":5.06957,"154":1.4352,"155":0.01325,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 72 73 75 76 77 78 80 81 83 85 88 89 90 91 92 93 94 96 97 99 100 102 115 127 156 157"},F:{"54":0.00442,"73":0.00442,"89":0.00442,"91":0.00442,"101":0.0265,"105":0.00442,"106":0.00883,"107":0.00442,"116":0.00442,"119":0.00442,"120":0.00442,"122":0.00442,"133":0.00442,"134":0.15456,"135":0.65357,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 90 92 93 94 95 96 97 98 99 100 102 103 104 108 109 110 111 112 113 114 115 117 118 121 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.02208,"109":0.01325,"119":0.18989,"120":0.17664,"121":0.00442,"122":0.03533,"124":0.00442,"128":0.00442,"132":0.00442,"133":0.00442,"134":0.01766,"135":0.01325,"136":0.00442,"137":0.00883,"138":0.00883,"139":0.01325,"140":0.00883,"141":0.00442,"142":0.00442,"143":0.03974,"144":0.00883,"145":0.02208,"146":0.02208,"147":0.10157,"148":0.0265,"149":0.04416,"150":0.2473,"151":0.39302,"152":3.3385,"153":3.90374,"154":1.02893,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 110 111 112 113 114 115 116 117 118 123 125 126 127 129 130 131"},E:{"13":0.00442,"14":0.00883,"27":0.2208,_:"4 5 6 7 8 9 10 11 12 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 27.1 27.2 TP","12.1":0.00442,"13.1":0.03091,"14.1":0.00442,"15.6":0.0265,"16.1":0.01325,"16.3":0.03091,"16.4":0.00442,"16.5":0.01325,"16.6":0.11923,"17.0":0.00883,"17.1":0.03533,"17.2":0.00883,"17.3":0.01325,"17.4":0.06182,"17.5":0.01325,"17.6":0.1369,"18.0":0.00883,"18.1":0.01325,"18.2":0.00883,"18.3":0.01766,"18.4":0.00883,"18.5-18.7":0.05299,"26.0":0.01766,"26.1":0.02208,"26.2":0.07066,"26.3":0.17222,"26.4":0.07066,"26.5":0.4416,"26.6":2.28307},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00235,"5.0-5.1":0.00235,"6.0-6.1":0,"7.0-7.1":0.0047,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.02348,"11.0-11.2":0.00235,"11.3-11.4":0.0047,"12.0-12.1":0,"12.2-12.5":0.06104,"13.0-13.1":0,"13.2":0.01174,"13.3":0,"13.4-13.7":0.00235,"14.0-14.4":0.00939,"14.5-14.8":0.01409,"15.0-15.1":0.01409,"15.2-15.3":0.00939,"15.4":0.01174,"15.5":0.01409,"15.6-15.8":0.30519,"16.0":0.02348,"16.1":0.04226,"16.2":0.02348,"16.3":0.05165,"16.4":0.01174,"16.5":0.01878,"16.6-16.7":0.42492,"17.0":0.01643,"17.1":0.02348,"17.2":0.02348,"17.3":0.03521,"17.4":0.0493,"17.5":0.09625,"17.6-17.7":0.24885,"18.0":0.05165,"18.1":0.1033,"18.2":0.14086,"18.3":0.24416,"18.4":0.1526,"18.5-18.7":3.1529,"26.0":0.1526,"26.1":0.15494,"26.2":0.4038,"26.3":0.43666,"26.4":0.31928,"26.5":2.13871,"26.6":13.19615,"27.0":1.01184,"27.1":0,"27.2":0.02582},P:{"4":0.02731,"20":0.0091,"25":0.0182,"26":0.0091,"28":0.0091,"29":0.15473,"30":2.32097,_:"21 22 23 24 27 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","11.1-11.2":0.03641},I:{"0":0.01116,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.15074,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},NLine truncated
@@ -0,0 +1 @@
{"version":3,"file":"in-memory.js","sourceRoot":"","sources":["../../../../../src/experimental/tasks/stores/in-memory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAa,UAAU,EAAsD,MAAM,kBAAkB,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAU1C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,iBAAiB;IAA9B;QACY,UAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;QACtC,kBAAa,GAAG,IAAI,GAAG,EAAyC,CAAC;IAmM7E,CAAC;IAjMG;;;OAGG;IACK,cAAc;QAClB,OAAO,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACK,MAAM,CAAC,MAAc,EAAE,SAAkB;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,MAAM,IAAI,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YACxG,OAAO,SAAS,CAAC;QACrB,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,UAA6B,EAAE,SAAoB,EAAE,OAAgB,EAAE,SAAkB;QACtG,4BAA4B;QAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAErC,oBAAoB;QACpB,IAAI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[],"mappings":";;;AAAA,0EAA0E;AAC1E,yCAAiC;AACjC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,iBAAK,CAAA;AAEnC,2BAA2B;AAC3B,4EAA4E;AAC5E,yEAAyE;AACzE,0CAA0C;AAC1C,4EAA4E;AAC5E,uEAAuE;AAChE,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAoB,EAAE;IAClE,IAAI,CAAC,GAAG,EAAE,CAAA;IAEV,IAAI,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACxB,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;QACvC,yDAAyD;QACzD,2CAA2C;QAC3C,MAAM,IAAI,GACR,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC;YACrD,GAAG;YACL,CAAC,CAAC,MAAM,CAAC,IAAI,CAAA;QACf,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAC9B,CAAC,IAAI,IAAI,CAAA;QACT,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,CAAA;IACtB,CAAC;IACD,OAAO,CAAC,CAAC,EAAE,IAAI,CAAC,CAAA;AAClB,CAAC,CAAA;AAhBY,QAAA,iBAAiB,qBAgB7B","sourcesContent":["// unix absolute paths are also absolute on win32, so we use this for both\nimport { win32 } from 'node:path'\nconst { isAbsolute, parse } = win32\n\n// returns [root, stripped]\n// Note that windows will think that //x/y/z/a has a \"root\" of //x/y, and in\n// those cases, we want to sanitize it to x/y/z/a, not z/a, so we strip /\n// explicitly if it's the first character.\n// drive-specific relative paths on Windows get their root stripped off even\n// though they are not absolute, so `c:../foo` becomes ['c:', '../foo']\nexport const stripAbsolutePath = (path: string): [string, string] => {\n let r = ''\n\n let parsed = parse(path)\n while (isAbsolute(path) || parsed.root) {\n // windows will think that //x/y/z has a \"root\" of //x/y/\n // but strip the //?/C:/ off of //?/C:/path\n const root =\n path.charAt(0) === '/' && path.slice(0, 4) !== '//?/' ?\n '/'\n : parsed.root\n path = path.slice(root.length)\n r += root\n parsed = parse(path)\n }\n return [r, path]\n}\n"]}
@@ -0,0 +1,12 @@
import type { TSESLint } from '@typescript-eslint/utils';
export type Options = [
{
fixToUnknown?: boolean;
ignoreRestArgs?: boolean;
}
];
export type MessageIds = 'suggestNever' | 'suggestPropertyKey' | 'suggestUnknown' | 'unexpectedAny';
declare const _default: TSESLint.RuleModule<MessageIds, Options, import("../../rules").ESLintPluginDocs, TSESLint.RuleListener> & {
name: string;
};
export default _default;
@@ -0,0 +1 @@
{"version":3,"file":"image.js","sources":["../../../src/icons/image.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Image\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iMTgiIGhlaWdodD0iMTgiIHg9IjMiIHk9IjMiIHJ4PSIyIiByeT0iMiIgLz4KICA8Y2lyY2xlIGN4PSI5IiBjeT0iOSIgcj0iMiIgLz4KICA8cGF0aCBkPSJtMjEgMTUtMy4wODYtMy4wODZhMiAyIDAgMCAwLTIuODI4IDBMNiAyMSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/image\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 Image = createLucideIcon('Image', [\n ['rect', { width: '18', height: '18', x: '3', y: '3', rx: '2', ry: '2', key: '1m3agn' }],\n ['circle', { cx: '9', cy: '9', r: '2', key: 'af1f0g' }],\n ['path', { d: 'm21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21', key: '1xmnt7' }],\n]);\n\nexport default Image;\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,KAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,EAAG,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,KAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA;AAAA,CACvF,CAAA,CAAC,QAAU,CAAA,CAAA,CAAA,CAAE,EAAI,CAAA,CAAA,CAAA,CAAA,CAAA,EAAK,CAAI,CAAA,CAAA,CAAA,GAAA,CAAK,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,GAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAA;AAAA,CAAA,CACtD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAA6C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAC5E,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,21 @@
/**
* @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 Infinity = createLucideIcon("Infinity", [
[
"path",
{
d: "M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",
key: "1z0uae"
}
]
]);
export { Infinity as default };
//# sourceMappingURL=infinity.js.map
@@ -0,0 +1,28 @@
"use client";
import { isMotionValue } from 'motion-dom';
import { Fragment, useMemo, createElement } from 'react';
import { useHTMLProps } from '../html/use-props.mjs';
import { useSVGProps } from '../svg/use-props.mjs';
import { filterProps } from './utils/filter-props.mjs';
import { isSVGComponent } from './utils/is-svg-component.mjs';
function useRender(Component, props, ref, { latestValues, }, isStatic, forwardMotionProps = false, isSVG) {
const useVisualProps = (isSVG ?? isSVGComponent(Component)) ? useSVGProps : useHTMLProps;
const visualProps = useVisualProps(props, latestValues, isStatic, Component);
const filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps);
const elementProps = Component !== Fragment ? { ...filteredProps, ...visualProps, ref } : {};
/**
* If component has been handed a motion value as its child,
* memoise its initial value and render that. Subsequent updates
* will be handled by the onChange handler
*/
const { children } = props;
const renderedChildren = useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);
return createElement(Component, {
...elementProps,
children: renderedChildren,
});
}
export { useRender };
//# sourceMappingURL=use-render.mjs.map
@@ -0,0 +1 @@
{"version":3,"file":"align-horizontal-distribute-center.js","sources":["../../../src/icons/align-horizontal-distribute-center.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name AlignHorizontalDistributeCenter\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cmVjdCB3aWR0aD0iNiIgaGVpZ2h0PSIxNCIgeD0iNCIgeT0iNSIgcng9IjIiIC8+CiAgPHJlY3Qgd2lkdGg9IjYiIGhlaWdodD0iMTAiIHg9IjE0IiB5PSI3IiByeD0iMiIgLz4KICA8cGF0aCBkPSJNMTcgMjJ2LTUiIC8+CiAgPHBhdGggZD0iTTE3IDdWMiIgLz4KICA8cGF0aCBkPSJNNyAyMnYtMyIgLz4KICA8cGF0aCBkPSJNNyA1VjIiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/align-horizontal-distribute-center\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 AlignHorizontalDistributeCenter = createLucideIcon('AlignHorizontalDistributeCenter', [\n ['rect', { width: '6', height: '14', x: '4', y: '5', rx: '2', key: '1wwnby' }],\n ['rect', { width: '6', height: '10', x: '14', y: '7', rx: '2', key: '1fe6j6' }],\n ['path', { d: 'M17 22v-5', key: '4b6g73' }],\n ['path', { d: 'M17 7V2', key: 'hnrr36' }],\n ['path', { d: 'M7 22v-3', key: '1r4jpn' }],\n ['path', { d: 'M7 5V2', key: 'liy1u9' }],\n]);\n\nexport default AlignHorizontalDistributeCenter;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkC,iBAAiB,iCAAmC,CAAA,CAAA,CAAA;AAAA,CAAA,CAC1F,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,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,CAC7E,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,KAAK,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,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,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,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACxC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACzC,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACzC,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"rabbit.js","sources":["../../../src/icons/rabbit.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Rabbit\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTMgMTZhMyAzIDAgMCAxIDIuMjQgNSIgLz4KICA8cGF0aCBkPSJNMTggMTJoLjAxIiAvPgogIDxwYXRoIGQ9Ik0xOCAyMWgtOGE0IDQgMCAwIDEtNC00IDcgNyAwIDAgMSA3LTdoLjJMOS42IDYuNGExIDEgMCAxIDEgMi44LTIuOEwxNS44IDdoLjJjMy4zIDAgNiAyLjcgNiA2djFhMiAyIDAgMCAxLTIgMmgtMWEzIDMgMCAwIDAtMyAzIiAvPgogIDxwYXRoIGQ9Ik0yMCA4LjU0VjRhMiAyIDAgMSAwLTQgMHYzIiAvPgogIDxwYXRoIGQ9Ik03LjYxMiAxMi41MjRhMyAzIDAgMSAwLTEuNiA0LjMiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/rabbit\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 Rabbit = createLucideIcon('Rabbit', [\n ['path', { d: 'M13 16a3 3 0 0 1 2.24 5', key: '1epib5' }],\n ['path', { d: 'M18 12h.01', key: 'yjnet6' }],\n [\n 'path',\n {\n d: 'M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,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;AAClE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_V","2":"_b"},B:{"1":"_J"},C:{"1":"_zF","2":"_OC"},D:{"1":"_Q"},E:{"1":"_R"},F:{"1":"_dD","2":"_fB"},G:{"1":"_M"},H:{"1":"1D"},I:{"1":"_P"},J:{"1":"_B"},K:{"1":"_N"},L:{"1":"I"},M:{"1":"YC"},N:{"1":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:4,C:"CSS3 Multiple backgrounds",D:true};
@@ -0,0 +1 @@
module.exports={A:{A:{"2":"_b","132":"_V"},B:{"1":"_J"},C:{"1":"_oQ _XC","2":"_2C","132":"_3E"},D:{"1":"_ZD","2":"J","16":"mB _HB _CC","388":"F _FE"},E:{"1":"_jB","2":"_k","16":"mB L","388":"ND"},F:{"1":"_eD","2":"_qC","132":"_hG"},G:{"1":"_8C","2":"dD","16":"lC ED","388":"eD"},H:{"1":"1D"},I:{"1":"_X","2":"_n","388":"_GF"},J:{"1":"A","388":"D"},K:{"1":"_XD","2":"A","132":"_hG"},L:{"1":"I"},M:{"1":"YC"},N:{"132":"_A"},O:{"1":"bC"},P:{"1":"_F"},Q:{"1":"JE"},R:{"1":"KE"},S:{"1":"_C"}},B:1,C:"CustomEvent",D:true};
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright Michael Ciniawsky <michael.ciniawsky@gmail.com>
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,608 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.arrowFunctionToExpression = arrowFunctionToExpression;
exports.ensureBlock = ensureBlock;
exports.ensureFunctionName = ensureFunctionName;
exports.splitExportDeclaration = splitExportDeclaration;
exports.toComputedKey = toComputedKey;
exports.unwrapFunctionEnvironment = unwrapFunctionEnvironment;
var _t = require("@babel/types");
var _template = require("@babel/template");
var _visitors = require("../visitors.js");
var _context = require("./context.js");
const {
arrowFunctionExpression,
assignmentExpression,
binaryExpression,
blockStatement,
callExpression,
conditionalExpression,
expressionStatement,
identifier,
isIdentifier,
jsxIdentifier,
logicalExpression,
LOGICAL_OPERATORS,
memberExpression,
metaProperty,
numericLiteral,
objectExpression,
restElement,
returnStatement,
sequenceExpression,
spreadElement,
stringLiteral,
super: _super,
thisExpression,
toExpression,
unaryExpression,
toBindingIdentifierName,
isFunction,
isAssignmentPattern,
isRestElement,
getFunctionName,
cloneNode,
variableDeclaration,
variableDeclarator,
exportNamedDeclaration,
exportSpecifier,
inherits
} = _t;
function toComputedKey() {
let key;
if (this.isMemberExpression()) {
key = this.node.property;
} else if (this.isProperty() || this.isMethod()) {
key = this.node.key;
} else {
throw new ReferenceError("todo");
}
if (!this.node.computed) {
if (isIdentifier(key)) key = stringLiteral(key.name);
}
return key;
}
function ensureBlock() {
const body = this.get("body");
const bodyNode = body.node;
if (Array.isArray(body)) {
throw new Error("Can't convert array path to a block statement");
}
if (!bodyNode) {
throw new Error("Can't convert node without a body");
}
if (body.isBlockStatement()) {
return bodyNode;
}
const statements = [];
let stringPath = "body";
let key;
let listKey;
if (body.isStatement()) {
listKey = "body";
key = 0;
statements.push(body.node);
} else {
stringPath += ".body.0";
if (this.isFunction()) {
key = "argument";
statements.push(returnStatement(body.node));
} else {
key = "expression";
statements.push(expressionStatement(body.node));
}
}
this.node.body = blockStatement(statements);
const parentPath = this.get(stringPath);
_context.setup.call(body, parentPath, listKey ? parentPath.node[listKey] : parentPath.node, listKey, key);
return this.node;
}
exports.arrowFunctionToShadowed = function () {
if (!this.isArrowFunctionExpression()) return;
this.arrowFunctionToExpression();
};
function unwrapFunctionEnvironment() {
if (!this.isArrowFunctionExpression() && !this.isFunctionExpression() && !this.isFunctionDeclaration()) {
throw this.buildCodeFrameError("Can only unwrap the environment of a function.");
}
hoistFunctionEnvironment(this);
}
function setType(path, type) {
path.node.type = type;
}
function arrowFunctionToExpression({
allowInsertArrow = true,
allowInsertArrowWithRest = allowInsertArrow,
noNewArrows = !(_arguments$ => (_arguments$ = arguments[0]) == null ? void 0 : _arguments$.specCompliant)()
} = {}) {
if (!this.isArrowFunctionExpression()) {
throw this.buildCodeFrameError("Cannot convert non-arrow function to a function expression.");
}
let self = this;
if (!noNewArrows) {
var _self$ensureFunctionN;
self = (_self$ensureFunctionN = self.ensureFunctionName(false)) != null ? _self$ensureFunctionN : self;
}
const {
thisBinding,
fnPath: fn
} = hoistFunctionEnvironment(self, noNewArrows, allowInsertArrow, allowInsertArrowWithRest);
fn.ensureBlock();
setType(fn, "FunctionExpression");
if (!noNewArrows) {
const checkBinding = thisBinding ? null : fn.scope.generateUidIdentifier("arrowCheckId");
if (checkBinding) {
fn.parentPath.scope.push({
id: checkBinding,
init: objectExpression([])
});
}
fn.get("body").unshiftContainer("body", expressionStatement(callExpression(this.hub.addHelper("newArrowCheck"), [thisExpression(), checkBinding ? identifier(checkBinding.name) : identifier(thisBinding)])));
fn.replaceWith(callExpression(memberExpression(fn.node, identifier("bind")), [checkBinding ? identifier(checkBinding.name) : thisExpression()]));
return fn.get("callee.object");
}
return fn;
}
const getSuperCallsVisitor = (0, _visitors.environmentVisitor)({
CallExpression(child, {
allSuperCalls
}) {
if (!child.get("callee").isSuper()) return;
allSuperCalls.push(child);
}
});
function hoistFunctionEnvironment(fnPath, noNewArrows = true, allowInsertArrow = true, allowInsertArrowWithRest = true) {
let arrowParent;
let thisEnvFn = fnPath.findParent(p => {
if (p.isArrowFunctionExpression()) {
arrowParent != null ? arrowParent : arrowParent = p;
return false;
}
return p.isFunction() || p.isProgram() || p.isClassProperty({
static: false
}) || p.isClassPrivateProperty({
static: false
});
});
const inConstructor = thisEnvFn.isClassMethod({
kind: "constructor"
});
if (thisEnvFn.isClassProperty() || thisEnvFn.isClassPrivateProperty()) {
if (arrowParent) {
thisEnvFn = arrowParent;
} else if (allowInsertArrow) {
fnPath.replaceWith(callExpression(arrowFunctionExpression([], toExpression(fnPath.node)), []));
thisEnvFn = fnPath.get("callee");
fnPath = thisEnvFn.get("body");
} else {
throw fnPath.buildCodeFrameError("Unable to transform arrow inside class property");
}
}
const {
thisPaths,
argumentsPaths,
newTargetPaths,
superProps,
superCalls
} = getScopeInformation(fnPath);
if (inConstructor && superCalls.length > 0) {
if (!allowInsertArrow) {
throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', " + "it's not possible to compile `super()` in an arrow function without compiling classes.\n" + "Please add '@babel/plugin-transform-classes' to your Babel configuration.");
}
if (!allowInsertArrowWithRest) {
throw superCalls[0].buildCodeFrameError("When using '@babel/plugin-transform-parameters', " + "it's not possible to compile `super()` in an arrow function with default or rest parameters without compiling classes.\n" + "Please add '@babel/plugin-transform-classes' to your Babel configuration.");
}
const allSuperCalls = [];
thisEnvFn.traverse(getSuperCallsVisitor, {
allSuperCalls
});
const superBinding = getSuperBinding(thisEnvFn);
allSuperCalls.forEach(superCall => {
const callee = identifier(superBinding);
callee.loc = superCall.node.callee.loc;
superCall.get("callee").replaceWith(callee);
});
}
if (argumentsPaths.length > 0) {
const argumentsBinding = getBinding(thisEnvFn, "arguments", () => {
const args = () => identifier("arguments");
if (thisEnvFn.scope.path.isProgram()) {
return conditionalExpression(binaryExpression("===", unaryExpression("typeof", args()), stringLiteral("undefined")), thisEnvFn.scope.buildUndefinedNode(), args());
} else {
return args();
}
});
argumentsPaths.forEach(argumentsChild => {
const argsRef = identifier(argumentsBinding);
argsRef.loc = argumentsChild.node.loc;
argumentsChild.replaceWith(argsRef);
});
}
if (newTargetPaths.length > 0) {
const newTargetBinding = getBinding(thisEnvFn, "newtarget", () => metaProperty(identifier("new"), identifier("target")));
newTargetPaths.forEach(targetChild => {
const targetRef = identifier(newTargetBinding);
targetRef.loc = targetChild.node.loc;
targetChild.replaceWith(targetRef);
});
}
if (superProps.length > 0) {
if (!allowInsertArrow) {
throw superProps[0].buildCodeFrameError("When using '@babel/plugin-transform-arrow-functions', " + "it's not possible to compile `super.prop` in an arrow function without compiling classes.\n" + "Please add '@babel/plugin-transform-classes' to your Babel configuration.");
}
const flatSuperProps = superProps.reduce((acc, superProp) => acc.concat(standardizeSuperProperty(superProp)), []);
flatSuperProps.forEach(superProp => {
const key = superProp.node.computed ? "" : superProp.get("property").node.name;
const superParentPath = superProp.parentPath;
const isAssignment = superParentPath.isAssignmentExpression({
left: superProp.node
});
const isCall = superParentPath.isCallExpression({
callee: superProp.node
});
const isTaggedTemplate = superParentPath.isTaggedTemplateExpression({
tag: superProp.node
});
const superBinding = getSuperPropBinding(thisEnvFn, isAssignment, key);
const args = [];
if (superProp.node.computed) {
args.push(superProp.get("property").node);
}
if (isAssignment) {
const value = superParentPath.node.right;
args.push(value);
}
const call = callExpression(identifier(superBinding), args);
if (isCall) {
superParentPath.unshiftContainer("arguments", thisExpression());
superProp.replaceWith(memberExpression(call, identifier("call")));
thisPaths.push(superParentPath.get("arguments.0"));
} else if (isAssignment) {
superParentPath.replaceWith(call);
} else if (isTaggedTemplate) {
superProp.replaceWith(callExpression(memberExpression(call, identifier("bind"), false), [thisExpression()]));
thisPaths.push(superProp.get("arguments.0"));
} else {
superProp.replaceWith(call);
}
});
}
let thisBinding;
if (thisPaths.length > 0 || !noNewArrows) {
thisBinding = getThisBinding(thisEnvFn, inConstructor);
if (noNewArrows || inConstructor && hasSuperClass(thisEnvFn)) {
thisPaths.forEach(thisChild => {
const thisRef = thisChild.isJSX() ? jsxIdentifier(thisBinding) : identifier(thisBinding);
thisRef.loc = thisChild.node.loc;
thisChild.replaceWith(thisRef);
});
if (!noNewArrows) thisBinding = null;
}
}
return {
thisBinding: thisBinding,
fnPath
};
}
function isLogicalOp(op) {
return LOGICAL_OPERATORS.includes(op);
}
function standardizeSuperProperty(superProp) {
if (superProp.parentPath.isAssignmentExpression() && superProp.parentPath.node.operator !== "=") {
const assignmentPath = superProp.parentPath;
const op = assignmentPath.node.operator.slice(0, -1);
const value = assignmentPath.node.right;
const isLogicalAssignment = isLogicalOp(op);
if (superProp.node.computed) {
const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
const {
object,
property
} = superProp.node;
assignmentPath.get("left").replaceWith(memberExpression(object, assignmentExpression("=", tmp, property), true));
assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object, identifier(tmp.name), true), value));
} else {
const object = superProp.node.object;
const property = superProp.node.property;
assignmentPath.get("left").replaceWith(memberExpression(object, property));
assignmentPath.get("right").replaceWith(rightExpression(isLogicalAssignment ? "=" : op, memberExpression(object, identifier(property.name)), value));
}
if (isLogicalAssignment) {
assignmentPath.replaceWith(logicalExpression(op, assignmentPath.node.left, assignmentPath.node.right));
} else {
assignmentPath.node.operator = "=";
}
return [assignmentPath.get("left"), assignmentPath.get("right").get("left")];
} else if (superProp.parentPath.isUpdateExpression()) {
const updateExpr = superProp.parentPath;
const tmp = superProp.scope.generateDeclaredUidIdentifier("tmp");
const computedKey = superProp.node.computed ? superProp.scope.generateDeclaredUidIdentifier("prop") : null;
const parts = [assignmentExpression("=", tmp, memberExpression(superProp.node.object, computedKey ? assignmentExpression("=", computedKey, superProp.node.property) : superProp.node.property, superProp.node.computed)), assignmentExpression("=", memberExpression(superProp.node.object, computedKey ? identifier(computedKey.name) : superProp.node.property, superProp.node.computed), binaryExpression(superProp.parentPath.node.operator[0], identifier(tmp.name), numericLiteral(1)))];
if (!superProp.parentPath.node.prefix) {
parts.push(identifier(tmp.name));
}
updateExpr.replaceWith(sequenceExpression(parts));
const left = updateExpr.get("expressions.0.right");
const right = updateExpr.get("expressions.1.left");
return [left, right];
}
return [superProp];
function rightExpression(op, left, right) {
if (op === "=") {
return assignmentExpression("=", left, right);
} else {
return binaryExpression(op, left, right);
}
}
}
function hasSuperClass(thisEnvFn) {
return thisEnvFn.isClassMethod() && !!thisEnvFn.parentPath.parentPath.node.superClass;
}
const assignSuperThisVisitor = (0, _visitors.environmentVisitor)({
CallExpression(child, {
supers,
thisBinding
}) {
if (!child.get("callee").isSuper()) return;
if (supers.has(child.node)) return;
supers.add(child.node);
child.replaceWithMultiple([child.node, assignmentExpression("=", identifier(thisBinding), identifier("this"))]);
}
});
function getThisBinding(thisEnvFn, inConstructor) {
return getBinding(thisEnvFn, "this", thisBinding => {
if (!inConstructor || !hasSuperClass(thisEnvFn)) return thisExpression();
thisEnvFn.traverse(assignSuperThisVisitor, {
supers: new WeakSet(),
thisBinding
});
});
}
function getSuperBinding(thisEnvFn) {
return getBinding(thisEnvFn, "supercall", () => {
const argsBinding = thisEnvFn.scope.generateUidIdentifier("args");
return arrowFunctionExpression([restElement(argsBinding)], callExpression(_super(), [spreadElement(identifier(argsBinding.name))]));
});
}
function getSuperPropBinding(thisEnvFn, isAssignment, propName) {
const op = isAssignment ? "set" : "get";
return getBinding(thisEnvFn, `superprop_${op}:${propName || ""}`, () => {
const argsList = [];
let fnBody;
if (propName) {
fnBody = memberExpression(_super(), identifier(propName));
} else {
const method = thisEnvFn.scope.generateUidIdentifier("prop");
argsList.unshift(method);
fnBody = memberExpression(_super(), identifier(method.name), true);
}
if (isAssignment) {
const valueIdent = thisEnvFn.scope.generateUidIdentifier("value");
argsList.push(valueIdent);
fnBody = assignmentExpression("=", fnBody, identifier(valueIdent.name));
}
return arrowFunctionExpression(argsList, fnBody);
});
}
function getBinding(thisEnvFn, key, init) {
const cacheKey = "binding:" + key;
let data = thisEnvFn.getData(cacheKey);
if (!data) {
const id = thisEnvFn.scope.generateUidIdentifier(key);
data = id.name;
thisEnvFn.setData(cacheKey, data);
thisEnvFn.scope.push({
id: id,
init: init(data)
});
}
return data;
}
const getScopeInformationVisitor = (0, _visitors.environmentVisitor)({
ThisExpression(child, {
thisPaths
}) {
thisPaths.push(child);
},
JSXIdentifier(child, {
thisPaths
}) {
if (child.node.name !== "this") return;
if (!child.parentPath.isJSXMemberExpression({
object: child.node
}) && !child.parentPath.isJSXOpeningElement({
name: child.node
})) {
return;
}
thisPaths.push(child);
},
CallExpression(child, {
superCalls
}) {
if (child.get("callee").isSuper()) superCalls.push(child);
},
MemberExpression(child, {
superProps
}) {
if (child.get("object").isSuper()) superProps.push(child);
},
Identifier(child, {
argumentsPaths
}) {
if (!child.isReferencedIdentifier({
name: "arguments"
})) return;
let curr = child.scope;
do {
if (curr.hasOwnBinding("arguments")) {
curr.rename("arguments");
return;
}
if (curr.path.isFunction() && !curr.path.isArrowFunctionExpression()) {
break;
}
} while (curr = curr.parent);
argumentsPaths.push(child);
},
MetaProperty(child, {
newTargetPaths
}) {
if (!child.get("meta").isIdentifier({
name: "new"
})) return;
if (!child.get("property").isIdentifier({
name: "target"
})) return;
newTargetPaths.push(child);
}
});
function getScopeInformation(fnPath) {
const thisPaths = [];
const argumentsPaths = [];
const newTargetPaths = [];
const superProps = [];
const superCalls = [];
fnPath.traverse(getScopeInformationVisitor, {
thisPaths,
argumentsPaths,
newTargetPaths,
superProps,
superCalls
});
return {
thisPaths,
argumentsPaths,
newTargetPaths,
superProps,
superCalls
};
}
function splitExportDeclaration() {
if (!this.isExportDeclaration() || this.isExportAllDeclaration()) {
throw new Error("Only default and named export declarations can be split.");
}
if (this.isExportNamedDeclaration() && this.get("specifiers").length > 0) {
throw new Error("It doesn't make sense to split exported specifiers.");
}
const declaration = this.get("declaration");
if (this.isExportDefaultDeclaration()) {
const standaloneDeclaration = declaration.isFunctionDeclaration() || declaration.isClassDeclaration();
const exportExpr = declaration.isFunctionExpression() || declaration.isClassExpression();
const scope = declaration.isScope() ? declaration.scope.parent : declaration.scope;
let id = declaration.node.id;
let needBindingRegistration = false;
if (!id) {
needBindingRegistration = true;
id = scope.generateUidIdentifier("default");
if (standaloneDeclaration || exportExpr) {
declaration.node.id = cloneNode(id);
}
} else if (exportExpr && scope.hasBinding(id.name)) {
needBindingRegistration = true;
id = scope.generateUidIdentifier(id.name);
}
const updatedDeclaration = standaloneDeclaration ? declaration.node : variableDeclaration("var", [variableDeclarator(cloneNode(id), declaration.node)]);
const updatedExportDeclaration = exportNamedDeclaration(null, [exportSpecifier(cloneNode(id), identifier("default"))]);
this.insertAfter(updatedExportDeclaration);
this.replaceWith(updatedDeclaration);
if (needBindingRegistration) {
scope.registerDeclaration(this);
}
return this;
} else if (this.get("specifiers").length > 0) {
throw new Error("It doesn't make sense to split exported specifiers.");
}
const bindingIdentifiers = declaration.getOuterBindingIdentifiers();
const specifiers = Object.keys(bindingIdentifiers).map(name => {
return exportSpecifier(identifier(name), identifier(name));
});
const aliasDeclar = exportNamedDeclaration(null, specifiers);
this.insertAfter(aliasDeclar);
this.replaceWith(declaration.node);
return this;
}
const refersOuterBindingVisitor = {
"ReferencedIdentifier|BindingIdentifier"(path, state) {
if (path.node.name !== state.name) return;
state.needsRename = true;
path.stop();
},
Scope(path, state) {
if (path.scope.hasOwnBinding(state.name)) {
path.skip();
}
}
};
function ensureFunctionName(supportUnicodeId) {
if (this.node.id) return this;
const res = getFunctionName(this.node, this.parent);
if (res == null) return this;
let {
name
} = res;
if (!supportUnicodeId && /[\uD800-\uDFFF]/.test(name)) {
return null;
}
if (name.startsWith("get ") || name.startsWith("set ")) {
return null;
}
name = toBindingIdentifierName(name.replace(/[/ ]/g, "_"));
const id = identifier(name);
inherits(id, res.originalNode);
const state = {
needsRename: false,
name
};
const {
scope
} = this;
const binding = scope.getOwnBinding(name);
if (binding) {
if (binding.kind === "param") {
state.needsRename = true;
} else {}
} else if (scope.parent.hasBinding(name) || scope.hasGlobal(name)) {
this.traverse(refersOuterBindingVisitor, state);
}
if (!state.needsRename) {
this.node.id = id;
scope.getProgramParent().references[id.name] = true;
return this;
}
if (scope.hasBinding(id.name) && !scope.hasGlobal(id.name)) {
scope.rename(id.name);
this.node.id = id;
scope.getProgramParent().references[id.name] = true;
return this;
}
if (!isFunction(this.node)) return null;
const key = scope.generateUidIdentifier(id.name);
const params = [];
for (let i = 0, len = getFunctionArity(this.node); i < len; i++) {
params.push(scope.generateUidIdentifier("x"));
}
const call = _template.default.expression.ast`
(function (${key}) {
function ${id}(${params}) {
return ${cloneNode(key)}.apply(this, arguments);
}
${cloneNode(id)}.toString = function () {
return ${cloneNode(key)}.toString();
}
return ${cloneNode(id)};
})(${toExpression(this.node)})
`;
return this.replaceWith(call)[0].get("arguments.0");
}
function getFunctionArity(node) {
const count = node.params.findIndex(param => isAssignmentPattern(param) || isRestElement(param));
return count === -1 ? node.params.length : count;
}
//# sourceMappingURL=conversion.js.map
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
function isError(value) {
if (value == null) {
return false;
}
if (value instanceof Error) {
return true;
}
const { name } = value;
return typeof name === "string" && name.endsWith("Error");
}
exports.isError = isError;
@@ -0,0 +1,104 @@
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import os
import gyp
import gyp.common
import gyp.msvs_emulation
generator_supports_multiple_toolsets = True
generator_wants_static_library_dependencies_adjusted = False
generator_filelist_paths = {}
generator_default_variables = {}
for dirname in [
"INTERMEDIATE_DIR",
"SHARED_INTERMEDIATE_DIR",
"PRODUCT_DIR",
"LIB_DIR",
"SHARED_LIB_DIR",
]:
# Some gyp steps fail if these are empty(!).
generator_default_variables[dirname] = "dir"
for unused in [
"RULE_INPUT_PATH",
"RULE_INPUT_ROOT",
"RULE_INPUT_NAME",
"RULE_INPUT_DIRNAME",
"RULE_INPUT_EXT",
"EXECUTABLE_PREFIX",
"EXECUTABLE_SUFFIX",
"STATIC_LIB_PREFIX",
"STATIC_LIB_SUFFIX",
"SHARED_LIB_PREFIX",
"SHARED_LIB_SUFFIX",
"CONFIGURATION_NAME",
]:
generator_default_variables[unused] = ""
def CalculateVariables(default_variables, params):
generator_flags = params.get("generator_flags", {})
for key, val in generator_flags.items():
default_variables.setdefault(key, val)
default_variables.setdefault("OS", gyp.common.GetFlavor(params))
flavor = gyp.common.GetFlavor(params)
if flavor == "win":
gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
def CalculateGeneratorInputInfo(params):
"""Calculate the generator specific info that gets fed to input (called by
gyp)."""
generator_flags = params.get("generator_flags", {})
if generator_flags.get("adjust_static_libraries", False):
global generator_wants_static_library_dependencies_adjusted
generator_wants_static_library_dependencies_adjusted = True
toplevel = params["options"].toplevel_dir
generator_dir = os.path.relpath(params["options"].generator_output or ".")
# output_dir: relative path from generator_dir to the build directory.
output_dir = generator_flags.get("output_dir", "out")
qualified_out_dir = os.path.normpath(
os.path.join(toplevel, generator_dir, output_dir, "gypfiles")
)
global generator_filelist_paths
generator_filelist_paths = {
"toplevel": toplevel,
"qualified_out_dir": qualified_out_dir,
}
def GenerateOutput(target_list, target_dicts, data, params):
# Map of target -> list of targets it depends on.
edges = {}
# Queue of targets to visit.
targets_to_visit = target_list[:]
while len(targets_to_visit) > 0:
target = targets_to_visit.pop()
if target in edges:
continue
edges[target] = []
for dep in target_dicts[target].get("dependencies", []):
edges[target].append(dep)
targets_to_visit.append(dep)
try:
filepath = params["generator_flags"]["output_dir"]
except KeyError:
filepath = "."
filename = os.path.join(filepath, "dump.json")
f = open(filename, "w")
json.dump(edges, f)
f.close()
print("Wrote json to %s." % filename)
@@ -0,0 +1,3 @@
import { $ as EmbeddedResourceSchema, $n as TaskMetadataSchema, $t as PrimitiveSchemaDefinitionSchema, A as ClientRequestSchema, An as SamplingContentSchema, At as ListResourceTemplatesRequestSchema, B as CreateMessageResultSchema, Bn as SingleSelectEnumSchemaSchema, Bt as LoggingLevelSchema, C as CallToolResultSchema, Cn as ResourceUpdatedNotificationParamsSchema, Ct as JSONRPCResponseSchema, D as CancelledNotificationSchema, Dn as RoleSchema, E as CancelledNotificationParamsSchema, En as ResultSchema, Et as LegacyTitledEnumSchemaSchema, F as CompleteRequestSchema, Fn as ServerRequestSchema, Ft as ListRootsResultSchema, G as DiscoverResultSchema, Gn as SubscriptionsAcknowledgedNotificationParamsSchema, Gt as MultiSelectEnumSchemaSchema, H as CreateTaskResultSchema, Hn as SubscribeRequestParamsSchema, Ht as LoggingMessageNotificationSchema, I as CompleteResultSchema, In as ServerResultSchema, It as ListTasksRequestSchema, J as ElicitRequestSchema, Jn as SubscriptionsListenRequestSchema, Jt as NumberSchemaSchema, K as ElicitRequestFormParamsSchema, Kn as SubscriptionsAcknowledgedNotificationSchema, Kt as NotificationSchema, L as ContentBlockSchema, Lt as ListTasksResultSchema, Mn as SamplingMessageSchema, Mt as ListResourcesRequestSchema, N as CompatibilityCallToolResultSchema, Nn as ServerCapabilitiesSchema, Nt as ListResourcesResultSchema, O as ClientCapabilitiesSchema, On as RootSchema, Ot as ListPromptsRequestSchema, P as CompleteRequestParamsSchema, Pn as ServerNotificationSchema, Pt as ListRootsRequestSchema, Q as ElicitationCompleteNotificationSchema, Qn as TaskCreationParamsSchema, Qt as PingRequestSchema, R as CreateMessageRequestParamsSchema, Rn as SetLevelRequestParamsSchema, Rt as ListToolsRequestSchema, S as CallToolRequestSchema, Sn as ResourceTemplateSchema, St as JSONRPCRequestSchema, T as CancelTaskResultSchema, Tn as ResultMetaObjectSchema, Tt as JSONValueSchema, U as CursorSchema, Un as SubscribeRequestSchema, Ut as ModelHintSchema, V as CreateMessageResultWithToolsSchema, Vn as StringSchemaSchema, Vt as LoggingMessageNotificationParamsSchema, W as DiscoverRequestSchema, Wn as SubscriptionFilterSchema, Wt as ModelPreferencesSchema, X as ElicitResultSchema, Xn as SubscriptionsListenResultSchema, Xt as PaginatedRequestSchema, Y as ElicitRequestURLParamsSchema, Yn as SubscriptionsListenResultMetaSchema, Yt as PaginatedRequestParamsSchema, Z as ElicitationCompleteNotificationParamsSchema, Zn as TaskAugmentedRequestParamsSchema, Zt as PaginatedResultSchema, _ as BaseMetadataSchema, _n as ResourceLinkSchema, _r as UntitledMultiSelectEnumSchemaSchema, _t as JSONArraySchema, a as OAuthClientRegistrationErrorSchema, an as PromptListChangedNotificationSchema, ar as TextResourceContentsSchema, at as GetTaskPayloadRequestSchema, b as BooleanSchemaSchema, bn as ResourceSchema, bt as JSONRPCMessageSchema, c as OAuthProtectedResourceMetadataSchema, cn as PromptSchema, cr as ToolAnnotationsSchema, ct as GetTaskResultSchema, d as OpenIdProviderDiscoveryMetadataSchema, dn as ReadResourceResultSchema, dr as ToolListChangedNotificationSchema, dt as ImageContentSchema, en as ProgressNotificationParamsSchema, er as TaskSchema, et as EmptyResultSchema, f as OpenIdProviderMetadataSchema, fn as RelatedTaskMetadataSchema, fr as ToolResultContentSchema, ft as ImplementationSchema, g as AudioContentSchema, gn as ResourceContentsSchema, gr as UnsubscribeRequestSchema, gt as InitializedNotificationSchema, h as AnnotationsSchema, hn as RequestSchema, hr as UnsubscribeRequestParamsSchema, ht as InitializeResultSchema, i as OAuthClientMetadataSchema, in as PromptArgumentSchema, ir as TextContentSchema, it as GetPromptResultSchema, j as ClientResultSchema, jn as SamplingMessageContentBlockSchema, jt as ListResourceTemplatesResultSchema, k as ClientNotificationSchema, kn as RootsListChangedNotificationSchema, kt as ListPromptsResultSchema, l as OAuthTokenRevocationRequestSchema, ln as ReadResourceRequestParamsSchema, lr as ToolChoiceSchema, lt as IconSchema, mn as RequestMetaSchema, mr as ToolUseContentSchema, mt as InitializeRequestSchema, n as OAuthClientInformationFullSchema, nn as ProgressSchema, nr as TaskStatusNotificationSchema, nt as GetPromptRequestParamsSchema, o as OAuthErrorResponseSchema, on as PromptMessageSchema, or as TitledMultiSelectEnumSchemaSchema, ot as GetTaskPayloadResultSchema, pn as RequestIdSchema, pr as ToolSchema, pt as InitializeRequestParamsSchema, q as ElicitRequestParamsSchema, qn as SubscriptionsListenRequestParamsSchema, r as OAuthClientInformationSchema, rn as ProgressTokenSchema, rr as TaskStatusSchema, rt as GetPromptRequestSchema, s as OAuthMetadataSchema, sn as PromptReferenceSchema, sr as TitledSingleSelectEnumSchemaSchema, st as GetTaskRequestSchema, t as IdJagTokenExchangeResponseSchema, tn as ProgressNotificationSchema, tr as TaskStatusNotificationParamsSchema, tt as EnumSchemaSchema, u as OAuthTokensSchema, un as ReadResourceRequestSchema, ur as ToolExecutionSchema, ut as IconsScLine truncated
export { AnnotationsSchema, AudioContentSchema, BaseMetadataSchema, BlobResourceContentsSchema, BooleanSchemaSchema, CallToolRequestParamsSchema, CallToolRequestSchema, CallToolResultSchema, CancelTaskRequestSchema, CancelTaskResultSchema, CancelledNotificationParamsSchema, CancelledNotificationSchema, ClientCapabilitiesSchema, ClientNotificationSchema, ClientRequestSchema, ClientResultSchema, CompatibilityCallToolResultSchema, CompleteRequestParamsSchema, CompleteRequestSchema, CompleteResultSchema, ContentBlockSchema, CreateMessageRequestParamsSchema, CreateMessageRequestSchema, CreateMessageResultSchema, CreateMessageResultWithToolsSchema, CreateTaskResultSchema, CursorSchema, DiscoverRequestSchema, DiscoverResultSchema, ElicitRequestFormParamsSchema, ElicitRequestParamsSchema, ElicitRequestSchema, ElicitRequestURLParamsSchema, ElicitResultSchema, ElicitationCompleteNotificationParamsSchema, ElicitationCompleteNotificationSchema, EmbeddedResourceSchema, EmptyResultSchema, EnumSchemaSchema, GetPromptRequestParamsSchema, GetPromptRequestSchema, GetPromptResultSchema, GetTaskPayloadRequestSchema, GetTaskPayloadResultSchema, GetTaskRequestSchema, GetTaskResultSchema, IconSchema, IconsSchema, IdJagTokenExchangeResponseSchema, ImageContentSchema, ImplementationSchema, InitializeRequestParamsSchema, InitializeRequestSchema, InitializeResultSchema, InitializedNotificationSchema, JSONArraySchema, JSONObjectSchema, JSONRPCErrorResponseSchema, JSONRPCMessageSchema, JSONRPCNotificationSchema, JSONRPCRequestSchema, JSONRPCResponseSchema, JSONRPCResultResponseSchema, JSONValueSchema, LegacyTitledEnumSchemaSchema, ListPromptsRequestSchema, ListPromptsResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListRootsRequestSchema, ListRootsResultSchema, ListTasksRequestSchema, ListTasksResultSchema, ListToolsRequestSchema, ListToolsResultSchema, LoggingLevelSchema, LoggingMessageNotificationParamsSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, MultiSelectEnumSchemaSchema, NotificationSchema, NumberSchemaSchema, OAuthClientInformationFullSchema, OAuthClientInformationSchema, OAuthClientMetadataSchema, OAuthClientRegistrationErrorSchema, OAuthErrorResponseSchema, OAuthMetadataSchema, OAuthProtectedResourceMetadataSchema, OAuthTokenRevocationRequestSchema, OAuthTokensSchema, OpenIdProviderDiscoveryMetadataSchema, OpenIdProviderMetadataSchema, PaginatedRequestParamsSchema, PaginatedRequestSchema, PaginatedResultSchema, PingRequestSchema, PrimitiveSchemaDefinitionSchema, ProgressNotificationParamsSchema, ProgressNotificationSchema, ProgressSchema, ProgressTokenSchema, PromptArgumentSchema, PromptListChangedNotificationSchema, PromptMessageSchema, PromptReferenceSchema, PromptSchema, ReadResourceRequestParamsSchema, ReadResourceRequestSchema, ReadResourceResultSchema, RelatedTaskMetadataSchema, RequestIdSchema, RequestMetaSchema, RequestSchema, ResourceContentsSchema, ResourceLinkSchema, ResourceListChangedNotificationSchema, ResourceRequestParamsSchema, ResourceSchema, ResourceTemplateReferenceSchema, ResourceTemplateSchema, ResourceUpdatedNotificationParamsSchema, ResourceUpdatedNotificationSchema, ResultMetaObjectSchema, ResultSchema, RoleSchema, RootSchema, RootsListChangedNotificationSchema, SamplingContentSchema, SamplingMessageContentBlockSchema, SamplingMessageSchema, ServerCapabilitiesSchema, ServerNotificationSchema, ServerRequestSchema, ServerResultSchema, SetLevelRequestParamsSchema, SetLevelRequestSchema, SingleSelectEnumSchemaSchema, StringSchemaSchema, SubscribeRequestParamsSchema, SubscribeRequestSchema, SubscriptionFilterSchema, SubscriptionsAcknowledgedNotificationParamsSchema, SubscriptionsAcknowledgedNotificationSchema, SubscriptionsListenRequestParamsSchema, SubscriptionsListenRequestSchema, SubscriptionsListenResultMetaSchema, SubscriptionsListenResultSchema, TaskAugmentedRequestParamsSchema, TaskCreationParamsSchema, TaskMetadataSchema, TaskSchema, TaskStatusNotificationParamsSchema, TaskStatusNotificationSchema, TaskStatusSchema, TextContentSchema, TextResourceContentsSchema, TitledMultiSelectEnumSchemaSchema, TitledSingleSelectEnumSchemaSchema, ToolAnnotationsSchema, ToolChoiceSchema, ToolExecutionSchema, ToolListChangedNotificationSchema, ToolResultContentSchema, ToolSchema, ToolUseContentSchema, UnsubscribeRequestParamsSchema, UnsubscribeRequestSchema, UntitledMultiSelectEnumSchemaSchema, UntitledSingleSelectEnumSchemaSchema };
@@ -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 Haze = createLucideIcon("Haze", [
["path", { d: "m5.2 6.2 1.4 1.4", key: "17imol" }],
["path", { d: "M2 13h2", key: "13gyu8" }],
["path", { d: "M20 13h2", key: "16rner" }],
["path", { d: "m17.4 7.6 1.4-1.4", key: "t4xlah" }],
["path", { d: "M22 17H2", key: "1gtaj3" }],
["path", { d: "M22 21H2", key: "1gy6en" }],
["path", { d: "M16 13a4 4 0 0 0-8 0", key: "1dyczq" }],
["path", { d: "M12 5V2.5", key: "1vytko" }]
]);
export { Haze as default };
//# sourceMappingURL=haze.js.map
@@ -0,0 +1 @@
module.exports={C:{"52":0.01049,"100":0.00525,"115":0.01049,"120":0.59269,"121":1.20111,"123":0.00525,"127":0.00525,"136":0.00525,"140":0.01049,"143":0.00525,"147":0.01049,"150":0.02098,"152":0.01049,"153":0.04196,"154":0.04721,"155":0.29897,"156":0.13113,"157":0.01049,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 124 125 126 128 129 130 131 132 133 134 135 137 138 139 141 142 144 145 146 148 149 151 158 159 160 3.5 3.6"},D:{"59":0.00525,"68":0.01574,"73":0.01049,"74":0.01049,"76":0.01049,"79":0.00525,"81":0.02098,"83":0.00525,"86":0.02098,"87":0.00525,"92":0.03672,"93":0.04196,"95":0.01049,"101":0.01049,"103":0.22029,"104":0.09966,"105":0.1626,"106":0.12588,"107":0.14162,"108":0.14162,"109":0.44583,"110":0.12588,"111":0.11539,"112":0.13113,"114":0.00525,"116":0.24127,"117":0.14162,"118":1.64693,"119":1.08047,"120":1.24307,"121":0.00525,"122":0.02098,"124":0.13637,"128":0.02098,"129":0.00525,"130":0.01574,"131":0.32519,"132":0.02623,"133":0.53499,"134":0.30421,"135":0.30421,"136":0.27799,"137":0.29372,"138":0.50877,"139":0.36715,"140":0.38813,"141":0.29372,"142":1.06998,"144":0.40911,"145":0.03147,"146":0.22029,"147":0.02098,"148":0.2098,"149":0.22029,"150":1.24307,"151":7.95667,"152":9.14204,"153":4.73624,"154":1.29552,"155":0.02098,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 60 61 62 63 64 65 66 67 69 70 71 72 75 77 78 80 84 85 88 89 90 91 94 96 97 98 99 100 102 113 115 123 125 126 127 143 156 157"},F:{"46":0.04196,"101":0.00525,"133":0.00525,"134":0.08392,"135":0.61891,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 60 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.02623,"98":0.00525,"100":0.00525,"102":0.01049,"114":0.00525,"119":0.81822,"120":0.69759,"121":0.00525,"122":0.02098,"129":0.00525,"133":0.00525,"134":0.03147,"138":0.00525,"139":0.00525,"141":0.00525,"145":0.00525,"146":0.04196,"147":0.01574,"148":0.02098,"149":0.02098,"150":0.13637,"151":0.49303,"152":2.38123,"153":2.12947,"154":0.91788,_:"12 13 14 15 16 17 18 79 80 81 83 84 85 86 87 88 89 90 91 93 94 95 96 97 99 101 103 104 105 106 107 108 109 110 111 112 113 115 116 117 118 123 124 125 126 127 128 130 131 132 135 136 137 140 142 143 144"},E:{"4":0.00525,"27":0.02098,_:"5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.2 17.4 18.2 18.4 18.5-18.7 26.1 26.2 27.1 27.2 TP","13.1":0.01049,"14.1":0.01049,"15.6":0.05245,"16.6":0.02623,"17.0":0.02098,"17.1":0.02098,"17.3":0.00525,"17.5":0.00525,"17.6":0.11539,"18.0":0.00525,"18.1":0.00525,"18.3":0.01049,"26.0":0.01574,"26.3":0.50352,"26.4":0.02098,"26.5":0.75528,"26.6":0.13113},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00093,"5.0-5.1":0.00093,"6.0-6.1":0,"7.0-7.1":0.00185,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00927,"11.0-11.2":0.00093,"11.3-11.4":0.00185,"12.0-12.1":0,"12.2-12.5":0.02409,"13.0-13.1":0,"13.2":0.00463,"13.3":0,"13.4-13.7":0.00093,"14.0-14.4":0.00371,"14.5-14.8":0.00556,"15.0-15.1":0.00556,"15.2-15.3":0.00371,"15.4":0.00463,"15.5":0.00556,"15.6-15.8":0.12045,"16.0":0.00927,"16.1":0.01668,"16.2":0.00927,"16.3":0.02038,"16.4":0.00463,"16.5":0.00741,"16.6-16.7":0.16771,"17.0":0.00649,"17.1":0.00927,"17.2":0.00927,"17.3":0.0139,"17.4":0.01946,"17.5":0.03799,"17.6-17.7":0.09821,"18.0":0.02038,"18.1":0.04077,"18.2":0.05559,"18.3":0.09636,"18.4":0.06023,"18.5-18.7":1.24436,"26.0":0.06023,"26.1":0.06115,"26.2":0.15937,"26.3":0.17234,"26.4":0.12601,"26.5":0.84409,"26.6":5.20816,"27.0":0.39935,"27.1":0,"27.2":0.01019},P:{"22":0.00905,"23":0.00905,"24":0.00905,"25":0.00905,"27":0.02715,"28":0.15387,"29":0.07241,"30":1.23099,_:"4 20 21 26 5.0-5.4 6.2-6.4 9.2 10.1 11.1-11.2 13.0 14.0 15.0 16.0 17.0 18.0","7.2-7.4":0.05431,"8.2":0.00905,"12.0":0.00905,"19.0":0.00905},I:{"0":0.0095,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0},K:{"0":0.34229,_:"10 11 12 11.1 11.5 12.1"},A:{"9":0.00525,"11":0.00525,_:"6 7 8 10 5.5"},S:{_:"2.5 3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":37.38982},R:{_:"0"},M:{"0":0.25672},Q:{_:"14.9"},O:{"0":0.05229},H:{all:0}};
@@ -0,0 +1 @@
module.exports={C:{"48":0.01251,"50":0.01251,"52":0.00626,"54":0.00626,"55":0.00626,"56":0.00626,"57":0.00626,"58":0.00626,"59":0.00626,"60":0.00626,"61":0.00626,"62":0.00626,"63":0.00626,"66":0.00626,"67":0.00626,"115":0.0563,"120":1.73889,"121":3.5028,"127":0.00626,"140":0.00626,"146":0.00626,"150":0.01251,"152":0.01877,"153":0.01877,"154":0.08132,"155":0.24395,"156":0.40658,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 51 53 64 65 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 116 117 118 119 122 123 124 125 126 128 129 130 131 132 133 134 135 136 137 138 139 141 142 143 144 145 147 148 149 151 157 158 159 160 3.5 3.6"},D:{"56":0.01877,"60":0.01251,"61":0.01251,"62":0.01251,"63":0.02502,"64":0.01251,"65":0.00626,"66":0.01877,"67":0.01251,"68":0.01251,"69":0.01877,"70":0.01251,"71":0.00626,"72":0.06255,"73":0.05004,"74":0.01251,"75":0.01251,"77":0.00626,"78":0.00626,"79":0.01877,"81":0.0563,"83":0.03128,"86":0.01877,"87":0.03753,"88":0.00626,"91":0.00626,"92":0.09383,"93":0.00626,"95":0.01877,"98":0.21893,"101":0.11885,"102":0.01251,"103":0.46913,"104":0.44411,"105":0.41909,"106":0.45036,"107":0.41283,"108":0.4316,"109":0.63801,"110":0.4316,"111":0.45662,"112":0.41909,"113":0.00626,"114":0.03128,"115":0.00626,"116":0.86945,"117":0.42534,"118":2.3769,"119":3.47778,"120":3.90938,"122":0.01251,"124":0.4316,"125":0.01251,"128":0.01251,"131":0.88821,"132":0.03753,"133":1.0008,"134":0.18765,"135":0.16263,"136":0.20642,"137":0.24395,"138":0.27522,"139":0.1814,"140":0.20016,"141":0.17514,"142":0.61925,"143":0.00626,"144":0.88196,"145":0.07506,"146":0.33152,"147":0.01251,"148":0.06255,"149":0.73809,"150":0.91949,"151":13.10423,"152":2.6271,"153":1.93905,"154":0.50666,"155":0.02502,_:"4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 76 80 84 85 89 90 94 96 97 99 100 121 123 126 127 129 130 156 157"},F:{"46":0.00626,"50":0.00626,"51":0.00626,"52":0.00626,"53":0.01251,"54":0.02502,"55":0.01251,"56":0.03128,"57":0.01251,"58":0.00626,"60":0.00626,"79":0.01251,"95":0.03128,"100":0.00626,"101":0.01877,"102":0.01251,"123":0.02502,"126":0.01877,"133":0.01251,"134":0.08132,"135":1.17594,_:"9 11 12 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 124 125 127 131 132 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"18":0.01251,"90":0.00626,"92":0.03753,"100":0.00626,"105":0.00626,"109":0.00626,"119":1.70762,"120":1.76391,"140":0.00626,"144":0.08757,"145":0.01251,"147":0.01251,"148":0.01251,"149":0.00626,"150":0.01877,"151":0.08132,"152":0.86945,"153":0.96327,"154":0.31275,_:"12 13 14 15 16 17 79 80 81 83 84 85 86 87 88 89 91 93 94 95 96 97 98 99 101 102 103 104 106 107 108 110 111 112 113 114 115 116 117 118 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 141 142 143 146"},E:{"27":0.00626,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 14.1 15.1 15.2-15.3 15.4 15.5 16.0 16.1 16.2 16.3 16.4 16.5 17.0 17.1 17.2 17.3 17.4 17.5 18.0 18.1 18.2 18.3 18.4 18.5-18.7 26.0 26.1 26.2 26.3 26.4 27.1 27.2 TP","13.1":0.00626,"15.6":0.02502,"16.6":0.04379,"17.6":0.0563,"26.5":0.01251,"26.6":0.13136},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00046,"5.0-5.1":0.00046,"6.0-6.1":0,"7.0-7.1":0.00092,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00462,"11.0-11.2":0.00046,"11.3-11.4":0.00092,"12.0-12.1":0,"12.2-12.5":0.01201,"13.0-13.1":0,"13.2":0.00231,"13.3":0,"13.4-13.7":0.00046,"14.0-14.4":0.00185,"14.5-14.8":0.00277,"15.0-15.1":0.00277,"15.2-15.3":0.00185,"15.4":0.00231,"15.5":0.00277,"15.6-15.8":0.06003,"16.0":0.00462,"16.1":0.00831,"16.2":0.00462,"16.3":0.01016,"16.4":0.00231,"16.5":0.00369,"16.6-16.7":0.08358,"17.0":0.00323,"17.1":0.00462,"17.2":0.00462,"17.3":0.00693,"17.4":0.0097,"17.5":0.01893,"17.6-17.7":0.04895,"18.0":0.01016,"18.1":0.02032,"18.2":0.02771,"18.3":0.04802,"18.4":0.03001,"18.5-18.7":0.62014,"26.0":0.03001,"26.1":0.03048,"26.2":0.07942,"26.3":0.08589,"26.4":0.0628,"26.5":0.42066,"26.6":2.59554,"27.0":0.19902,"27.1":0,"27.2":0.00508},P:{"26":0.00936,"28":0.00936,"29":0.00936,"30":0.51494,_:"4 20 21 22 23 24 25 27 5.0-5.4 6.2-6.4 7.2-7.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 17.0 18.0 19.0","16.0":0.01873},I:{"0":0.03742,"3":0,"4":0,"2.1":0,"2.2":0,"2.3":0,"4.1":0,"4.2-4.3":0,"4.4":0,"4.4.3-4.4.4":0.00001},K:{"0":0.96247,_:"10 11 12 11.1 11.5 12.1"},A:{_:"6 7 8 9 10 11 5.5"},S:{"2.5":0.00749,_:"3.0-3.1"},J:{_:"7 10"},N:{_:"10 11"},L:{"0":36.21077},R:{_:"0"},M:{"0":0.05243},Q:{_:"14.9"},O:{"0":0.11235},H:{all:0}};
@@ -0,0 +1 @@
{"version":3,"names":["_getPrototypeOf","require","_superPropBase","object","property","Object","prototype","hasOwnProperty","call","getPrototypeOf"],"sources":["../../src/helpers/superPropBase.ts"],"sourcesContent":["/* @minVersion 7.0.0-beta.0 */\n\nimport getPrototypeOf from \"./getPrototypeOf.ts\";\n\nexport default function _superPropBase(object: object, property: PropertyKey) {\n // Yes, this throws if object is null to being with, that's on purpose.\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n return object;\n}\n"],"mappings":";;;;;;AAEA,IAAAA,eAAA,GAAAC,OAAA;AAEe,SAASC,cAAcA,CAACC,MAAc,EAAEC,QAAqB,EAAE;EAE5E,OAAO,CAACC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACL,MAAM,EAAEC,QAAQ,CAAC,EAAE;IAC9DD,MAAM,GAAG,IAAAM,uBAAc,EAACN,MAAM,CAAC;IAC/B,IAAIA,MAAM,KAAK,IAAI,EAAE;EACvB;EACA,OAAOA,MAAM;AACf","ignoreList":[]}
@@ -0,0 +1,24 @@
/**
* @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 BadgeSwissFranc = createLucideIcon("BadgeSwissFranc", [
[
"path",
{
d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",
key: "3c2336"
}
],
["path", { d: "M11 17V8h4", key: "1bfq6y" }],
["path", { d: "M11 12h3", key: "2eqnfz" }],
["path", { d: "M9 16h4", key: "1skf3a" }]
]);
export { BadgeSwissFranc as default };
//# sourceMappingURL=badge-swiss-franc.js.map
@@ -0,0 +1,12 @@
/**
* Example: Progress notifications over stdio.
*
* Demonstrates a tool that reports progress to the client while processing.
*
* Run:
* npx tsx src/examples/server/progressExample.ts
*
* Then connect a client with an `onprogress` callback (see docs/protocol.md).
*/
export {};
//# sourceMappingURL=progressExample.d.ts.map
@@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const util_1 = require("../util");
const getESLintCoreRule_1 = require("../util/getESLintCoreRule");
const baseRule = (0, getESLintCoreRule_1.getESLintCoreRule)('no-invalid-this');
const defaultOptions = [{ capIsConstructor: true }];
exports.default = (0, util_1.createRule)({
name: 'no-invalid-this',
meta: {
type: 'suggestion',
defaultOptions,
docs: {
description: 'Disallow `this` keywords outside of classes or class-like objects',
extendsBaseRule: true,
},
hasSuggestions: baseRule.meta.hasSuggestions,
messages: baseRule.meta.messages,
schema: baseRule.meta.schema,
},
defaultOptions,
create(context) {
const rules = baseRule.create(context);
/**
* Since function definitions can be nested we use a stack storing if "this" is valid in the current context.
*
* Example:
*
* function a(this: number) { // valid "this"
* function b() {
* console.log(this); // invalid "this"
* }
* }
*
* When parsing the function declaration of "a" the stack will be: [true]
* When parsing the function declaration of "b" the stack will be: [true, false]
*/
const thisIsValidStack = [];
return {
...rules,
AccessorProperty() {
thisIsValidStack.push(true);
},
'AccessorProperty:exit'() {
thisIsValidStack.pop();
},
FunctionDeclaration(node) {
thisIsValidStack.push(node.params.some(param => param.type === utils_1.AST_NODE_TYPES.Identifier && param.name === 'this'));
},
'FunctionDeclaration:exit'() {
thisIsValidStack.pop();
},
FunctionExpression(node) {
thisIsValidStack.push(node.params.some(param => param.type === utils_1.AST_NODE_TYPES.Identifier && param.name === 'this'));
},
'FunctionExpression:exit'() {
thisIsValidStack.pop();
},
PropertyDefinition() {
thisIsValidStack.push(true);
},
'PropertyDefinition:exit'() {
thisIsValidStack.pop();
},
ThisExpression(node) {
const thisIsValidHere = thisIsValidStack[thisIsValidStack.length - 1];
if (thisIsValidHere) {
return;
}
// baseRule's work
rules.ThisExpression(node);
},
};
},
});
@@ -0,0 +1,38 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.typescriptVersionIsAtLeast = exports.getModifiers = exports.getDecorators = void 0;
__exportStar(require("./builtinSymbolLikes"), exports);
__exportStar(require("./containsAllTypesByName"), exports);
__exportStar(require("./getConstrainedTypeAtLocation"), exports);
__exportStar(require("./getContextualType"), exports);
__exportStar(require("./getDeclaration"), exports);
__exportStar(require("./getSourceFileOfNode"), exports);
__exportStar(require("./getTypeName"), exports);
__exportStar(require("./isSymbolFromDefaultLibrary"), exports);
__exportStar(require("./isTypeBrandedLiteralLike"), exports);
__exportStar(require("./isTypeReadonly"), exports);
__exportStar(require("./isUnsafeAssignment"), exports);
__exportStar(require("./predicates"), exports);
__exportStar(require("./propertyTypes"), exports);
__exportStar(require("./requiresQuoting"), exports);
__exportStar(require("./typeFlagUtils"), exports);
__exportStar(require("./TypeOrValueSpecifier"), exports);
__exportStar(require("./discriminateAnyType"), exports);
var typescript_estree_1 = require("@typescript-eslint/typescript-estree");
Object.defineProperty(exports, "getDecorators", { enumerable: true, get: function () { return typescript_estree_1.getDecorators; } });
Object.defineProperty(exports, "getModifiers", { enumerable: true, get: function () { return typescript_estree_1.getModifiers; } });
Object.defineProperty(exports, "typescriptVersionIsAtLeast", { enumerable: true, get: function () { return typescript_estree_1.typescriptVersionIsAtLeast; } });