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,8 @@
import type { CodeKeywordDefinition, ErrorObject } from "../../types";
export type PatternError = ErrorObject<"pattern", {
pattern: string;
}, string | {
$data: string;
}>;
declare const def: CodeKeywordDefinition;
export default def;
@@ -0,0 +1,635 @@
export default `flf2a$ 6 5 18 -1 21
Figlet conversion by Kent Nassen (kentn@cyberspace.org) based on the
font designed by:
Article 2687 of rec.arts.ascii:
Path: news.itd.umich.edu!caen!math.ohio-state.edu!howland.reston.ans.net!news.sprintlink.net!sashimi.wwa.com!not-for-mail
From: dissel@nunic.nu.edu (David S. Issel)
Newsgroups: rec.arts.ascii,alt.ascii-art
Subject: Line: Smaller BLOOD font (5 line)
Date: 6 Nov 1994 15:06:30 -0600
Organization: National University
Lines: 73
Sender: boba@wwa.com
Approved: boba@wwa.com
Message-ID: <39jggm$in2@gagme.wwa.com>
NNTP-Posting-Host: gagme.wwa.com
Xref: news.itd.umich.edu rec.arts.ascii:2687 alt.ascii-art:15734
For those who thought that BLOOD was too big... I offer SBLOOD:
------------
$ $#
$ $#
$ $#
$ $#
$ $#
$ $##
$@@@#
$@@@#
$!@!#
$ #
$:.:#
$ ##
$@@ @@$#
$ @! @!#
$ $#
$ $#
$ $#
$ $##
$ @@@ @@@ #
$@@@!@@@@@#
$ @!@ !@! #
$!!!:!!!!:#
$ :: : : #
$ ##
$ @@@@@ #
$!@@!! #
$ !@@!! #
$ !!:!#
$ :.:.: #
$ ##
$ @@ @@#
$ @@!#
$ @@! #
$!!: #
$:. :: #
$ ##
$ @@@@@ #
$@@! @@@ #
$ !@!@! #
$!!: !!! #
$ :.: : .:#
$ ##
$ @@#
$!@$#
$ $#
$ $#
$ $#
$ $##
$ @@@#
$@@@ #
$!@! #
$!!! #
$ : :#
$ ##
$@@@ #
$ @@@#
$ !@!#
$ !!!#
$: : #
$ ##
$ @@@ @@@ #
$ @@!!@@ #
$!!!@@!@!!!#
$ !:::!! #
$ :.: .:: #
$ ##
$ @@@ #
$ @@@ #
$!@!@!@!#
$ !!! #
$ : : #
$ ##
$ $#
$ $#
$ $#
$ !!#
$ ::#
$.: ##
$ $#
$ $#
$@!@!@!@!#
$ $#
$ $#
$ $##
$ $#
$ $#
$ $#
$ $#
$::#
$ $##
$ @@@#
$ @@@ #
$ !!@ #
$ !!! #
$: : #
$ ##
$ @@@@@@ #
$@@! @@@#
$@!@ !@!#
$!!: !!!#
$ : : :: #
$ ##
$ @@@#
$ @@@#
$ !@!#
$ !!!#
$ : #
$ $##
$ @@@@@@ #
$@@ @@@#
$ .!!@! #
$ !!: #
$:.:: :::#
$ ##
$@@@@@@ #
$ @@!#
$ @!!!: #
$ !!:#
$::: :: #
$ ##
$@@@ @@@#
$@@! @@@#
$@!@!@!@!#
$ !!!#
$ : :#
$ ##
$@@@@@@@#
$!@@ #
$!!@@!! #
$ !:!#
$:: : : #
$ ##
$ @@@@@ #
$@@!@ #
$@!@!@!@ #
$!!: !!!#
$ : : :: #
$ ##
$@@@@@@@@#
$ @@!#
$ @!! #
$ .!!: #
$: : #
$ ##
$ @@@@@@ #
$@@! @@@#
$ !@!@!@ #
$!!: !!!#
$ :.:: : #
$ ##
$ @@@@@@ #
$@@! @@@#
$ @!@@!@!#
$ !!:#
$ : ::: #
$ ##
$ #
$@@#
$ #
$!!#
$ #
$ ##
$ #
$ @@#
$ #
$ !!#
$ ::#
$.: ##
$ #
$ @@@#
$ @@@ #
$!@! #
$ !!! #
$ :::##
$ $#
$@@@!@@@@#
$ $#
$!!!:!!!!#
$ $#
$ $##
$ #
$@@@ #
$ @@@ #
$ !@!#
$ !!! #
$::: ##
$ @@@@@@ #
$@@! @@@#
$ .!@! #
$ "" #
$ :: #
$ ##
$ @@@@@@@ #
$!@@ !@@#
$!@! @!@!@#
$:!! #
$ :: :: : #
$ ##
$ @@@@@@ #
$@@! @@@#
$@!@!@!@!#
$!!: !!!#
$ : : :#
$ ##
$@@@@@@@ #
$@@! @@@#
$@!@!@!@ #
$!!: !!!#
$:: : :: #
$ ##
$ @@@@@@@#
$!@@ #
$!@! #
$:!! #
$ :: :: :#
$ ##
$@@@@@@@ #
$@@! @@@#
$@!@ !@!#
$!!: !!!#
$:: : : #
$ ##
$@@@@@@@@#
$@@! #
$@!!!:! #
$!!: #
$: :: :::#
$ ##
$@@@@@@@@#
$@@! #
$@!!!:! #
$!!: #
$ : #
$ ##
$ @@@@@@@ #
$!@@ #
$!@! @!@!@#
$:!! !!:#
$ :: :: : #
$ ##
$@@@ @@@#
$@@! @@@#
$@!@!@!@!#
$!!: !!!#
$ : : :#
$ ##
$@@@#
$@@!#
$!!@#
$!!:#
$: #
$ ##
$ @@@#
$ @@!#
$ !!@#
$. .!! #
$::.:: #
$ ##
$@@@ @@@#
$@@! !@@#
$@!@@!@! #
$!!: :!! #
$ : :::#
$ ##
$@@@ #
$@@! #
$@!! #
$!!: #
$: ::.: :#
$ ##
$@@@@@@@@@@ #
$@@! @@! @@!#
$@!! !!@ @!@#
$!!: !!:#
$ : : #
$ ##
$@@@ @@@#
$@@!@!@@@#
$@!@@!!@!#
$!!: !!!#
$:: : #
$ ##
$ @@@@@@ #
$@@! @@@#
$@!@ !@!#
$!!: !!!#
$ : :. : #
$ ##
$@@@@@@@ #
$@@! @@@#
$@!@@!@! #
$!!: #
$ : #
$ ##
$ @@@@@@ #
$@@! @@@ #
$@!@ !@! #
$!!:!!:!: #
$ : :. :::#
$ ##
$@@@@@@@ #
$@@! @@@#
$@!@!!@! #
$!!: :!! #
$ : : :#
$ ##
$ @@@@@@#
$!@@ #
$ !@@!! #
$ !:!#
$::.: : #
$ ##
$@@@@@@@#
$ @@! #
$ @!! #
$ !!: #
$ : #
$ ##
$@@@ @@@#
$@@! @@@#
$@!@ !@!#
$!!: !!!#
$ :.:: : #
$ ##
$@@@ @@@#
$@@! @@@#
$@!@ !@!#
$ !: .:! #
$ :: #
$ ##
$@@@ @@@ @@@#
$@@! @@! @@!#
$@!! !!@ @!@#
$ !: !!: !! #
$ ::.: ::: #
$ ##
$@@@ @@@#
$@@! !@@#
$ !@@!@! #
$ !: :!! #
$::: :::#
$ ##
$@@@ @@@#
$@@! !@@#
$ !@!@! #
$ !!: #
$ .: #
$ ##
$@@@@@@@@#
$ @@!#
$ @!! #
$ !!: #
$:.::.: :#
$ ##
$@@@@@#
$@@@ #
$!!@ #
$!!! #
$: :.:#
$ ##
$@@@ #
$ @@@ #
$ !!@ #
$ !!! #
$ : :#
$ ##
$ @@@@#
$ @@@#
$ @!!#
$ !!!#
$:.: :#
$ ##
$ @@@@ #
$@!@ !@@#
$ $#
$ $#
$ $#
$ $##
$ $#
$ $#
$ $#
$ $#
$.......$#
$: :: : :##
$@@$#
$ @!#
$ $#
$ $#
$ $#
$ $##
$ @@@@@@ #
$@@! @@@#
$@!@!@!@!#
$!!: !!!#
$ : : :#
$ ##
$@@@@@@@ #
$@@! @@@#
$@!@!@!@ #
$!!: !!!#
$:: : :: #
$ ##
$ @@@@@@@#
$!@@ #
$!@! #
$:!! #
$ :: :: :#
$ ##
$@@@@@@@ #
$@@! @@@#
$@!@ !@!#
$!!: !!!#
$:: : : #
$ ##
$@@@@@@@@#
$@@! #
$@!!!:! #
$!!: #
$: :: :::#
$ ##
$@@@@@@@@#
$@@! #
$@!!!:! #
$!!: #
$ : #
$ ##
$ @@@@@@@ #
$!@@ #
$!@! @!@!@#
$:!! !!:#
$ :: :: : #
$ ##
$@@@ @@@#
$@@! @@@#
$@!@!@!@!#
$!!: !!!#
$ : : :#
$ ##
$@@@#
$@@!#
$!!@#
$!!:#
$: #
$ ##
$ @@@#
$ @@!#
$ !!@#
$. .!! #
$::.:: #
$ ##
$@@@ @@@#
$@@! !@@#
$@!@@!@! #
$!!: :!! #
$ : :::#
$ ##
$@@@ #
$@@! #
$@!! #
$!!: #
$: ::.: :#
$ ##
$@@@@@@@@@@ #
$@@! @@! @@!#
$@!! !!@ @!@#
$!!: !!:#
$ : : #
$ ##
$@@@ @@@#
$@@!@!@@@#
$@!@@!!@!#
$!!: !!!#
$:: : #
$ ##
$ @@@@@@ #
$@@! @@@#
$@!@ !@!#
$!!: !!!#
$ : :. : #
$ ##
$@@@@@@@ #
$@@! @@@#
$@!@@!@! #
$!!: #
$ : #
$ ##
$ @@@@@@ #
$@@! @@@ #
$@!@ !@! #
$!!:!!:!: #
$ : :. :::#
$ ##
$@@@@@@@ #
$@@! @@@#
$@!@!!@! #
$!!: :!! #
$ : : :#
$ ##
$ @@@@@@#
$!@@ #
$ !@@!! #
$ !:!#
$::.: : #
$ ##
$@@@@@@@#
$ @@! #
$ @!! #
$ !!: #
$ : #
$ ##
$@@@ @@@#
$@@! @@@#
$@!@ !@!#
$!!: !!!#
$ :.:: : #
$ ##
$@@@ @@@#
$@@! @@@#
$@!@ !@!#
$ !: .:! #
$ :: #
$ ##
$@@@ @@@ @@@#
$@@! @@! @@!#
$@!! !!@ @!@#
$ !: !!: !! #
$ ::.: ::: #
$ ##
$@@@ @@@#
$@@! !@@#
$ !@@!@! #
$ !: :!! #
$::: :::#
$ ##
$@@@ @@@#
$@@! !@@#
$ !@!@! #
$ !!: #
$ .: #
$ ##
$@@@@@@@@#
$ @@!#
$ @!! #
$ !!: #
$:.::.: :#
$ ##
$ @@@#
$ @@@#
$!!@ #
$ !!!#
$ : :#
$ ##
$ @@@#
$ @@@#
$ @!!#
$ !!!#
$ :.:#
$ . :##
$ @@@ #
$ @@@ #
$ @!!#
$ !!! #
$ : : #
$ ##
$ @@@ @@#
$@@ @@@$#
$ $#
$ $#
$ $#
$ $##
#
#
#
#
#
##
#
#
#
#
#
##
#
#
#
#
#
##
#
#
#
#
#
##
#
#
#
#
#
##
#
#
#
#
#
##
#
#
#
#
#
##
`
@@ -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 EarOff = createLucideIcon("EarOff", [
["path", { d: "M6 18.5a3.5 3.5 0 1 0 7 0c0-1.57.92-2.52 2.04-3.46", key: "1qngmn" }],
["path", { d: "M6 8.5c0-.75.13-1.47.36-2.14", key: "b06bma" }],
["path", { d: "M8.8 3.15A6.5 6.5 0 0 1 19 8.5c0 1.63-.44 2.81-1.09 3.76", key: "g10hsz" }],
["path", { d: "M12.5 6A2.5 2.5 0 0 1 15 8.5M10 13a2 2 0 0 0 1.82-1.18", key: "ygzou7" }],
["line", { x1: "2", x2: "22", y1: "2", y2: "22", key: "a6p6uj" }]
]);
export { EarOff as default };
//# sourceMappingURL=ear-off.js.map
@@ -0,0 +1,68 @@
'use strict'
const { promisify } = require('node:util')
const Pool = require('../dispatcher/pool')
const { buildMockDispatch } = require('./mock-utils')
const {
kDispatches,
kMockAgent,
kClose,
kOriginalClose,
kOrigin,
kOriginalDispatch,
kConnected,
kIgnoreTrailingSlash
} = require('./mock-symbols')
const { MockInterceptor } = require('./mock-interceptor')
const Symbols = require('../core/symbols')
const { InvalidArgumentError } = require('../core/errors')
/**
* MockPool provides an API that extends the Pool to influence the mockDispatches.
*/
class MockPool extends Pool {
constructor (origin, opts) {
if (!opts || !opts.agent || typeof opts.agent.dispatch !== 'function') {
throw new InvalidArgumentError('Argument opts.agent must implement Agent')
}
super(origin, opts)
this[kMockAgent] = opts.agent
this[kOrigin] = origin
this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false
this[kDispatches] = []
this[kConnected] = 1
this[kOriginalDispatch] = this.dispatch
this[kOriginalClose] = this.close.bind(this)
this.dispatch = buildMockDispatch.call(this)
this.close = this[kClose]
}
get [Symbols.kConnected] () {
return this[kConnected]
}
/**
* Sets up the base interceptor for mocking replies from undici.
*/
intercept (opts) {
return new MockInterceptor(
opts && { ignoreTrailingSlash: this[kIgnoreTrailingSlash], ...opts },
this[kDispatches]
)
}
cleanMocks () {
this[kDispatches] = []
}
async [kClose] () {
await promisify(this[kOriginalClose])()
this[kConnected] = 0
this[kMockAgent][Symbols.kClients].delete(this[kOrigin])
}
}
module.exports = MockPool
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["export * from '@tanstack/store'\n\nexport { useStore } from './useStore'\n\nexport function shallow<T>(objA: T, objB: T) {\n if (Object.is(objA, objB)) {\n return true\n }\n\n if (\n typeof objA !== 'object' ||\n objA === null ||\n typeof objB !== 'object' ||\n objB === null\n ) {\n return false\n }\n\n if (objA instanceof Map && objB instanceof Map) {\n if (objA.size !== objB.size) return false\n for (const [k, v] of objA) {\n if (!objB.has(k) || !Object.is(v, objB.get(k))) return false\n }\n return true\n }\n\n if (objA instanceof Set && objB instanceof Set) {\n if (objA.size !== objB.size) return false\n for (const v of objA) {\n if (!objB.has(v)) return false\n }\n return true\n }\n\n if (objA instanceof Date && objB instanceof Date) {\n if (objA.getTime() !== objB.getTime()) return false\n return true\n }\n\n const keysA = getOwnKeys(objA)\n if (keysA.length !== getOwnKeys(objB).length) {\n return false\n }\n\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < keysA.length; i++) {\n if (\n !Object.prototype.hasOwnProperty.call(objB, keysA[i] as string) ||\n !Object.is(objA[keysA[i] as keyof T], objB[keysA[i] as keyof T])\n ) {\n return false\n }\n }\n return true\n}\n\nfunction getOwnKeys(obj: object): Array<string | symbol> {\n return (Object.keys(obj) as Array<string | symbol>).concat(\n Object.getOwnPropertySymbols(obj),\n )\n}\n"],"names":[],"mappings":";;AAIO,SAAS,QAAW,MAAS,MAAS;AAC3C,MAAI,OAAO,GAAG,MAAM,IAAI,GAAG;AACzB,WAAO;AAAA,EACT;AAEA,MACE,OAAO,SAAS,YAChB,SAAS,QACT,OAAO,SAAS,YAChB,SAAS,MACT;AACA,WAAO;AAAA,EACT;AAEA,MAAI,gBAAgB,OAAO,gBAAgB,KAAK;AAC9C,QAAI,KAAK,SAAS,KAAK,KAAM,QAAO;AACpC,eAAW,CAAC,GAAG,CAAC,KAAK,MAAM;AACzB,UAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,KAAK,IAAI,CAAC,CAAC,EAAG,QAAO;AAAA,IACzD;AACA,WAAO;AAAA,EACT;AAEA,MAAI,gBAAgB,OAAO,gBAAgB,KAAK;AAC9C,QAAI,KAAK,SAAS,KAAK,KAAM,QAAO;AACpC,eAAW,KAAK,MAAM;AACpB,UAAI,CAAC,KAAK,IAAI,CAAC,EAAG,QAAO;AAAA,IAC3B;AACA,WAAO;AAAA,EACT;AAEA,MAAI,gBAAgB,QAAQ,gBAAgB,MAAM;AAChD,QAAI,KAAK,QAAA,MAAc,KAAK,QAAA,EAAW,QAAO;AAC9C,WAAO;AAAA,EACT;AAEA,QAAM,QAAQ,WAAW,IAAI;AAC7B,MAAI,MAAM,WAAW,WAAW,IAAI,EAAE,QAAQ;AAC5C,WAAO;AAAA,EACT;AAGA,WAAS,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK;AACrC,QACE,CAAC,OAAO,UAAU,eAAe,KAAK,MAAM,MAAM,CAAC,CAAW,KAC9D,CAAC,OAAO,GAAG,KAAK,MAAM,CAAC,CAAY,GAAG,KAAK,MAAM,CAAC,CAAY,CAAC,GAC/D;AACA,aAAO;AAAA,IACT;AAAA,EACF;AACA,SAAO;AACT;AAEA,SAAS,WAAW,KAAqC;AACvD,SAAQ,OAAO,KAAK,GAAG,EAA6B;AAAA,IAClD,OAAO,sBAAsB,GAAG;AAAA,EAAA;AAEpC;"}
@@ -0,0 +1,32 @@
export { compactDecrypt } from './jwe/compact/decrypt.js';
export { flattenedDecrypt } from './jwe/flattened/decrypt.js';
export { generalDecrypt } from './jwe/general/decrypt.js';
export { GeneralEncrypt } from './jwe/general/encrypt.js';
export { compactVerify } from './jws/compact/verify.js';
export { flattenedVerify } from './jws/flattened/verify.js';
export { generalVerify } from './jws/general/verify.js';
export { jwtVerify } from './jwt/verify.js';
export { jwtDecrypt } from './jwt/decrypt.js';
export { CompactEncrypt } from './jwe/compact/encrypt.js';
export { FlattenedEncrypt } from './jwe/flattened/encrypt.js';
export { CompactSign } from './jws/compact/sign.js';
export { FlattenedSign } from './jws/flattened/sign.js';
export { GeneralSign } from './jws/general/sign.js';
export { SignJWT } from './jwt/sign.js';
export { EncryptJWT } from './jwt/encrypt.js';
export { calculateJwkThumbprint, calculateJwkThumbprintUri } from './jwk/thumbprint.js';
export { EmbeddedJWK } from './jwk/embedded.js';
export { createLocalJWKSet } from './jwks/local.js';
export { createRemoteJWKSet, jwksCache, customFetch } from './jwks/remote.js';
export { UnsecuredJWT } from './jwt/unsecured.js';
export { exportPKCS8, exportSPKI, exportJWK } from './key/export.js';
export { importSPKI, importPKCS8, importX509, importJWK } from './key/import.js';
export { decodeProtectedHeader } from './util/decode_protected_header.js';
export { decodeJwt } from './util/decode_jwt.js';
import * as errors from './util/errors.js';
export { errors };
export { generateKeyPair } from './key/generate_key_pair.js';
export { generateSecret } from './key/generate_secret.js';
import * as base64url from './util/base64url.js';
export { base64url };
export const cryptoRuntime = 'WebCryptoAPI';
@@ -0,0 +1,180 @@
'use strict'
const fs = require('../fs')
const path = require('path')
const { mkdirs } = require('../mkdirs')
const { pathExists } = require('../path-exists')
const { utimesMillis } = require('../util/utimes')
const stat = require('../util/stat')
const { asyncIteratorConcurrentProcess } = require('../util/async')
async function copy (src, dest, opts = {}) {
if (typeof opts === 'function') {
opts = { filter: opts }
}
opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
// Warn about using preserveTimestamps on 32-bit node
if (opts.preserveTimestamps && process.arch === 'ia32') {
process.emitWarning(
'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
'\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
'Warning', 'fs-extra-WARN0001'
)
}
const { srcStat, destStat } = await stat.checkPaths(src, dest, 'copy', opts)
await stat.checkParentPaths(src, srcStat, dest, 'copy')
const include = await runFilter(src, dest, opts)
if (!include) return
// check if the parent of dest exists, and create it if it doesn't exist
const destParent = path.dirname(dest)
const dirExists = await pathExists(destParent)
if (!dirExists) {
await mkdirs(destParent)
}
await getStatsAndPerformCopy(destStat, src, dest, opts)
}
async function runFilter (src, dest, opts) {
if (!opts.filter) return true
return opts.filter(src, dest)
}
async function getStatsAndPerformCopy (destStat, src, dest, opts) {
const statFn = opts.dereference ? fs.stat : fs.lstat
const srcStat = await statFn(src)
if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
if (
srcStat.isFile() ||
srcStat.isCharacterDevice() ||
srcStat.isBlockDevice()
) return onFile(srcStat, destStat, src, dest, opts)
if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
throw new Error(`Unknown file: ${src}`)
}
async function onFile (srcStat, destStat, src, dest, opts) {
if (!destStat) return copyFile(srcStat, src, dest, opts)
if (opts.overwrite) {
await fs.unlink(dest)
return copyFile(srcStat, src, dest, opts)
}
if (opts.errorOnExist) {
throw new Error(`'${dest}' already exists`)
}
}
async function copyFile (srcStat, src, dest, opts) {
await fs.copyFile(src, dest)
if (opts.preserveTimestamps) {
// Make sure the file is writable before setting the timestamp
// otherwise open fails with EPERM when invoked with 'r+'
// (through utimes call)
if (fileIsNotWritable(srcStat.mode)) {
await makeFileWritable(dest, srcStat.mode)
}
// Set timestamps and mode correspondingly
// Note that The initial srcStat.atime cannot be trusted
// because it is modified by the read(2) system call
// (See https://nodejs.org/api/fs.html#fs_stat_time_values)
const updatedSrcStat = await fs.stat(src)
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
}
return fs.chmod(dest, srcStat.mode)
}
function fileIsNotWritable (srcMode) {
return (srcMode & 0o200) === 0
}
function makeFileWritable (dest, srcMode) {
return fs.chmod(dest, srcMode | 0o200)
}
async function onDir (srcStat, destStat, src, dest, opts) {
// the dest directory might not exist, create it
if (!destStat) {
await fs.mkdir(dest)
}
// iterate through the files in the current directory to copy everything
await asyncIteratorConcurrentProcess(await fs.opendir(src), async (item) => {
const srcItem = path.join(src, item.name)
const destItem = path.join(dest, item.name)
const include = await runFilter(srcItem, destItem, opts)
// only copy the item if it matches the filter function
if (include) {
const { destStat } = await stat.checkPaths(srcItem, destItem, 'copy', opts)
// If the item is a copyable file, `getStatsAndPerformCopy` will copy it
// If the item is a directory, `getStatsAndPerformCopy` will call `onDir` recursively
await getStatsAndPerformCopy(destStat, srcItem, destItem, opts)
}
})
if (!destStat) {
await fs.chmod(dest, srcStat.mode)
}
}
async function onLink (destStat, src, dest, opts) {
let resolvedSrc = await fs.readlink(src)
if (opts.dereference) {
resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
}
if (!destStat) {
return fs.symlink(resolvedSrc, dest)
}
let resolvedDest = null
try {
resolvedDest = await fs.readlink(dest)
} catch (e) {
// dest exists and is a regular file or directory,
// Windows may throw UNKNOWN error. If dest already exists,
// fs throws error anyway, so no need to guard against it here.
if (e.code === 'EINVAL' || e.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest)
throw e
}
if (opts.dereference) {
resolvedDest = path.resolve(process.cwd(), resolvedDest)
}
// If both symlinks resolve to the same target, they are still distinct symlinks
// that can be copied/overwritten. Only check subdirectory constraints when
// the resolved paths are different.
if (resolvedSrc !== resolvedDest) {
if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
}
// do not copy if src is a subdir of dest since unlinking
// dest in this case would result in removing src contents
// and therefore a broken symlink would be created.
if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
}
}
// copy the link
await fs.unlink(dest)
return fs.symlink(resolvedSrc, dest)
}
module.exports = copy
@@ -0,0 +1 @@
{"version":3,"file":"token.d.ts","sourceRoot":"","sources":["../../../../../src/server/auth/handlers/token.ts"],"names":[],"mappings":"AACA,OAAgB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIrD,OAAO,EAAa,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAW5E,MAAM,MAAM,mBAAmB,GAAG;IAC9B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,KAAK,CAAC;CACjD,CAAC;AAmBF,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,EAAE,mBAAmB,GAAG,cAAc,CA+G1G"}
@@ -0,0 +1,15 @@
import type { MapSource as MapSourceType } from './source-map-tree.mts';
import type { SourceMapInput, SourceMapLoader } from './types.mts';
/**
* Recursively builds a tree structure out of sourcemap files, with each node
* being either an `OriginalSource` "leaf" or a `SourceMapTree` composed of
* `OriginalSource`s and `SourceMapTree`s.
*
* Every sourcemap is composed of a collection of source files and mappings
* into locations of those source files. When we generate a `SourceMapTree` for
* the sourcemap, we attempt to load each source file's own sourcemap. If it
* does not have an associated sourcemap, it is considered an original,
* unmodified source file.
*/
export default function buildSourceMapTree(input: SourceMapInput | SourceMapInput[], loader: SourceMapLoader): MapSourceType;
//# sourceMappingURL=build-source-map-tree.d.ts.map
@@ -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 FolderGit = createLucideIcon("FolderGit", [
["circle", { cx: "12", cy: "13", r: "2", key: "1c1ljs" }],
[
"path",
{
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
key: "1kt360"
}
],
["path", { d: "M14 13h3", key: "1dgedf" }],
["path", { d: "M7 13h3", key: "1pygq7" }]
]);
export { FolderGit as default };
//# sourceMappingURL=folder-git.js.map
@@ -0,0 +1,8 @@
'use strict';
var bruteforceMatcher = () => {
return null;
};
module.exports = bruteforceMatcher;
//# sourceMappingURL=feedback.cjs.map
@@ -0,0 +1,916 @@
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _tokenizer = require('../parser/tokenizer');
var _keywords = require('../parser/tokenizer/keywords');
var _types = require('../parser/tokenizer/types');
var _elideImportEquals = require('../util/elideImportEquals'); var _elideImportEquals2 = _interopRequireDefault(_elideImportEquals);
var _getDeclarationInfo = require('../util/getDeclarationInfo'); var _getDeclarationInfo2 = _interopRequireDefault(_getDeclarationInfo);
var _getImportExportSpecifierInfo = require('../util/getImportExportSpecifierInfo'); var _getImportExportSpecifierInfo2 = _interopRequireDefault(_getImportExportSpecifierInfo);
var _isExportFrom = require('../util/isExportFrom'); var _isExportFrom2 = _interopRequireDefault(_isExportFrom);
var _removeMaybeImportAttributes = require('../util/removeMaybeImportAttributes');
var _shouldElideDefaultExport = require('../util/shouldElideDefaultExport'); var _shouldElideDefaultExport2 = _interopRequireDefault(_shouldElideDefaultExport);
var _Transformer = require('./Transformer'); var _Transformer2 = _interopRequireDefault(_Transformer);
/**
* Class for editing import statements when we are transforming to commonjs.
*/
class CJSImportTransformer extends _Transformer2.default {
__init() {this.hadExport = false}
__init2() {this.hadNamedExport = false}
__init3() {this.hadDefaultExport = false}
constructor(
rootTransformer,
tokens,
importProcessor,
nameManager,
helperManager,
reactHotLoaderTransformer,
enableLegacyBabel5ModuleInterop,
enableLegacyTypeScriptModuleInterop,
isTypeScriptTransformEnabled,
isFlowTransformEnabled,
preserveDynamicImport,
keepUnusedImports,
) {
super();this.rootTransformer = rootTransformer;this.tokens = tokens;this.importProcessor = importProcessor;this.nameManager = nameManager;this.helperManager = helperManager;this.reactHotLoaderTransformer = reactHotLoaderTransformer;this.enableLegacyBabel5ModuleInterop = enableLegacyBabel5ModuleInterop;this.enableLegacyTypeScriptModuleInterop = enableLegacyTypeScriptModuleInterop;this.isTypeScriptTransformEnabled = isTypeScriptTransformEnabled;this.isFlowTransformEnabled = isFlowTransformEnabled;this.preserveDynamicImport = preserveDynamicImport;this.keepUnusedImports = keepUnusedImports;CJSImportTransformer.prototype.__init.call(this);CJSImportTransformer.prototype.__init2.call(this);CJSImportTransformer.prototype.__init3.call(this);;
this.declarationInfo = isTypeScriptTransformEnabled
? _getDeclarationInfo2.default.call(void 0, tokens)
: _getDeclarationInfo.EMPTY_DECLARATION_INFO;
}
getPrefixCode() {
let prefix = "";
if (this.hadExport) {
prefix += 'Object.defineProperty(exports, "__esModule", {value: true});';
}
return prefix;
}
getSuffixCode() {
if (this.enableLegacyBabel5ModuleInterop && this.hadDefaultExport && !this.hadNamedExport) {
return "\nmodule.exports = exports.default;\n";
}
return "";
}
process() {
// TypeScript `import foo = require('foo');` should always just be translated to plain require.
if (this.tokens.matches3(_types.TokenType._import, _types.TokenType.name, _types.TokenType.eq)) {
return this.processImportEquals();
}
if (this.tokens.matches1(_types.TokenType._import)) {
this.processImport();
return true;
}
if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.eq)) {
this.tokens.replaceToken("module.exports");
return true;
}
if (this.tokens.matches1(_types.TokenType._export) && !this.tokens.currentToken().isType) {
this.hadExport = true;
return this.processExport();
}
if (this.tokens.matches2(_types.TokenType.name, _types.TokenType.postIncDec)) {
// Fall through to normal identifier matching if this doesn't apply.
if (this.processPostIncDec()) {
return true;
}
}
if (this.tokens.matches1(_types.TokenType.name) || this.tokens.matches1(_types.TokenType.jsxName)) {
return this.processIdentifier();
}
if (this.tokens.matches1(_types.TokenType.eq)) {
return this.processAssignment();
}
if (this.tokens.matches1(_types.TokenType.assign)) {
return this.processComplexAssignment();
}
if (this.tokens.matches1(_types.TokenType.preIncDec)) {
return this.processPreIncDec();
}
return false;
}
processImportEquals() {
const importName = this.tokens.identifierNameAtIndex(this.tokens.currentIndex() + 1);
if (this.importProcessor.shouldAutomaticallyElideImportedName(importName)) {
// If this name is only used as a type, elide the whole import.
_elideImportEquals2.default.call(void 0, this.tokens);
} else {
// Otherwise, switch `import` to `const`.
this.tokens.replaceToken("const");
}
return true;
}
/**
* Transform this:
* import foo, {bar} from 'baz';
* into
* var _baz = require('baz'); var _baz2 = _interopRequireDefault(_baz);
*
* The import code was already generated in the import preprocessing step, so
* we just need to look it up.
*/
processImport() {
if (this.tokens.matches2(_types.TokenType._import, _types.TokenType.parenL)) {
if (this.preserveDynamicImport) {
// Bail out, only making progress for this one token.
this.tokens.copyToken();
return;
}
const requireWrapper = this.enableLegacyTypeScriptModuleInterop
? ""
: `${this.helperManager.getHelperName("interopRequireWildcard")}(`;
this.tokens.replaceToken(`Promise.resolve().then(() => ${requireWrapper}require`);
const contextId = this.tokens.currentToken().contextId;
if (contextId == null) {
throw new Error("Expected context ID on dynamic import invocation.");
}
this.tokens.copyToken();
while (!this.tokens.matchesContextIdAndLabel(_types.TokenType.parenR, contextId)) {
this.rootTransformer.processToken();
}
this.tokens.replaceToken(requireWrapper ? ")))" : "))");
return;
}
const shouldElideImport = this.removeImportAndDetectIfShouldElide();
if (shouldElideImport) {
this.tokens.removeToken();
} else {
const path = this.tokens.stringValue();
this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path));
this.tokens.appendCode(this.importProcessor.claimImportCode(path));
}
_removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens);
if (this.tokens.matches1(_types.TokenType.semi)) {
this.tokens.removeToken();
}
}
/**
* Erase this import (since any CJS output would be completely different), and
* return true if this import is should be elided due to being a type-only
* import. Such imports will not be emitted at all to avoid side effects.
*
* Import elision only happens with the TypeScript or Flow transforms enabled.
*
* TODO: This function has some awkward overlap with
* CJSImportProcessor.pruneTypeOnlyImports , and the two should be unified.
* That function handles TypeScript implicit import name elision, and removes
* an import if all typical imported names (without `type`) are removed due
* to being type-only imports. This function handles Flow import removal and
* properly distinguishes `import 'foo'` from `import {} from 'foo'` for TS
* purposes.
*
* The position should end at the import string.
*/
removeImportAndDetectIfShouldElide() {
this.tokens.removeInitialToken();
if (
this.tokens.matchesContextual(_keywords.ContextualKeyword._type) &&
!this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.comma) &&
!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._from)
) {
// This is an "import type" statement, so exit early.
this.removeRemainingImport();
return true;
}
if (this.tokens.matches1(_types.TokenType.name) || this.tokens.matches1(_types.TokenType.star)) {
// We have a default import or namespace import, so there must be some
// non-type import.
this.removeRemainingImport();
return false;
}
if (this.tokens.matches1(_types.TokenType.string)) {
// This is a bare import, so we should proceed with the import.
return false;
}
let foundNonTypeImport = false;
let foundAnyNamedImport = false;
while (!this.tokens.matches1(_types.TokenType.string)) {
// Check if any named imports are of the form "foo" or "foo as bar", with
// no leading "type".
if (
(!foundNonTypeImport && this.tokens.matches1(_types.TokenType.braceL)) ||
this.tokens.matches1(_types.TokenType.comma)
) {
this.tokens.removeToken();
if (!this.tokens.matches1(_types.TokenType.braceR)) {
foundAnyNamedImport = true;
}
if (
this.tokens.matches2(_types.TokenType.name, _types.TokenType.comma) ||
this.tokens.matches2(_types.TokenType.name, _types.TokenType.braceR) ||
this.tokens.matches4(_types.TokenType.name, _types.TokenType.name, _types.TokenType.name, _types.TokenType.comma) ||
this.tokens.matches4(_types.TokenType.name, _types.TokenType.name, _types.TokenType.name, _types.TokenType.braceR)
) {
foundNonTypeImport = true;
}
}
this.tokens.removeToken();
}
if (this.keepUnusedImports) {
return false;
}
if (this.isTypeScriptTransformEnabled) {
return !foundNonTypeImport;
} else if (this.isFlowTransformEnabled) {
// In Flow, unlike TS, `import {} from 'foo';` preserves the import.
return foundAnyNamedImport && !foundNonTypeImport;
} else {
return false;
}
}
removeRemainingImport() {
while (!this.tokens.matches1(_types.TokenType.string)) {
this.tokens.removeToken();
}
}
processIdentifier() {
const token = this.tokens.currentToken();
if (token.shadowsGlobal) {
return false;
}
if (token.identifierRole === _tokenizer.IdentifierRole.ObjectShorthand) {
return this.processObjectShorthand();
}
if (token.identifierRole !== _tokenizer.IdentifierRole.Access) {
return false;
}
const replacement = this.importProcessor.getIdentifierReplacement(
this.tokens.identifierNameForToken(token),
);
if (!replacement) {
return false;
}
// Tolerate any number of closing parens while looking for an opening paren
// that indicates a function call.
let possibleOpenParenIndex = this.tokens.currentIndex() + 1;
while (
possibleOpenParenIndex < this.tokens.tokens.length &&
this.tokens.tokens[possibleOpenParenIndex].type === _types.TokenType.parenR
) {
possibleOpenParenIndex++;
}
// Avoid treating imported functions as methods of their `exports` object
// by using `(0, f)` when the identifier is in a paren expression. Else
// use `Function.prototype.call` when the identifier is a guaranteed
// function call. When using `call`, pass undefined as the context.
if (this.tokens.tokens[possibleOpenParenIndex].type === _types.TokenType.parenL) {
if (
this.tokens.tokenAtRelativeIndex(1).type === _types.TokenType.parenL &&
this.tokens.tokenAtRelativeIndex(-1).type !== _types.TokenType._new
) {
this.tokens.replaceToken(`${replacement}.call(void 0, `);
// Remove the old paren.
this.tokens.removeToken();
// Balance out the new paren.
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(_types.TokenType.parenR);
} else {
// See here: http://2ality.com/2015/12/references.html
this.tokens.replaceToken(`(0, ${replacement})`);
}
} else {
this.tokens.replaceToken(replacement);
}
return true;
}
processObjectShorthand() {
const identifier = this.tokens.identifierName();
const replacement = this.importProcessor.getIdentifierReplacement(identifier);
if (!replacement) {
return false;
}
this.tokens.replaceToken(`${identifier}: ${replacement}`);
return true;
}
processExport() {
if (
this.tokens.matches2(_types.TokenType._export, _types.TokenType._enum) ||
this.tokens.matches3(_types.TokenType._export, _types.TokenType._const, _types.TokenType._enum)
) {
this.hadNamedExport = true;
// Let the TypeScript transform handle it.
return false;
}
if (this.tokens.matches2(_types.TokenType._export, _types.TokenType._default)) {
if (this.tokens.matches3(_types.TokenType._export, _types.TokenType._default, _types.TokenType._enum)) {
this.hadDefaultExport = true;
// Flow export default enums need some special handling, so handle them
// in that tranform rather than this one.
return false;
}
this.processExportDefault();
return true;
} else if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.braceL)) {
this.processExportBindings();
return true;
} else if (
this.tokens.matches2(_types.TokenType._export, _types.TokenType.name) &&
this.tokens.matchesContextualAtIndex(this.tokens.currentIndex() + 1, _keywords.ContextualKeyword._type)
) {
// export type {a};
// export type {a as b};
// export type {a} from './b';
// export type * from './b';
// export type * as ns from './b';
this.tokens.removeInitialToken();
this.tokens.removeToken();
if (this.tokens.matches1(_types.TokenType.braceL)) {
while (!this.tokens.matches1(_types.TokenType.braceR)) {
this.tokens.removeToken();
}
this.tokens.removeToken();
} else {
// *
this.tokens.removeToken();
if (this.tokens.matches1(_types.TokenType._as)) {
// as
this.tokens.removeToken();
// ns
this.tokens.removeToken();
}
}
// Remove type re-export `... } from './T'`
if (
this.tokens.matchesContextual(_keywords.ContextualKeyword._from) &&
this.tokens.matches1AtIndex(this.tokens.currentIndex() + 1, _types.TokenType.string)
) {
this.tokens.removeToken();
this.tokens.removeToken();
_removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens);
}
return true;
}
this.hadNamedExport = true;
if (
this.tokens.matches2(_types.TokenType._export, _types.TokenType._var) ||
this.tokens.matches2(_types.TokenType._export, _types.TokenType._let) ||
this.tokens.matches2(_types.TokenType._export, _types.TokenType._const)
) {
this.processExportVar();
return true;
} else if (
this.tokens.matches2(_types.TokenType._export, _types.TokenType._function) ||
// export async function
this.tokens.matches3(_types.TokenType._export, _types.TokenType.name, _types.TokenType._function)
) {
this.processExportFunction();
return true;
} else if (
this.tokens.matches2(_types.TokenType._export, _types.TokenType._class) ||
this.tokens.matches3(_types.TokenType._export, _types.TokenType._abstract, _types.TokenType._class) ||
this.tokens.matches2(_types.TokenType._export, _types.TokenType.at)
) {
this.processExportClass();
return true;
} else if (this.tokens.matches2(_types.TokenType._export, _types.TokenType.star)) {
this.processExportStar();
return true;
} else {
throw new Error("Unrecognized export syntax.");
}
}
processAssignment() {
const index = this.tokens.currentIndex();
const identifierToken = this.tokens.tokens[index - 1];
// If the LHS is a type identifier, this must be a declaration like `let a: b = c;`,
// with `b` as the identifier, so nothing needs to be done in that case.
if (identifierToken.isType || identifierToken.type !== _types.TokenType.name) {
return false;
}
if (identifierToken.shadowsGlobal) {
return false;
}
if (index >= 2 && this.tokens.matches1AtIndex(index - 2, _types.TokenType.dot)) {
return false;
}
if (index >= 2 && [_types.TokenType._var, _types.TokenType._let, _types.TokenType._const].includes(this.tokens.tokens[index - 2].type)) {
// Declarations don't need an extra assignment. This doesn't avoid the
// assignment for comma-separated declarations, but it's still correct
// since the assignment is just redundant.
return false;
}
const assignmentSnippet = this.importProcessor.resolveExportBinding(
this.tokens.identifierNameForToken(identifierToken),
);
if (!assignmentSnippet) {
return false;
}
this.tokens.copyToken();
this.tokens.appendCode(` ${assignmentSnippet} =`);
return true;
}
/**
* Process something like `a += 3`, where `a` might be an exported value.
*/
processComplexAssignment() {
const index = this.tokens.currentIndex();
const identifierToken = this.tokens.tokens[index - 1];
if (identifierToken.type !== _types.TokenType.name) {
return false;
}
if (identifierToken.shadowsGlobal) {
return false;
}
if (index >= 2 && this.tokens.matches1AtIndex(index - 2, _types.TokenType.dot)) {
return false;
}
const assignmentSnippet = this.importProcessor.resolveExportBinding(
this.tokens.identifierNameForToken(identifierToken),
);
if (!assignmentSnippet) {
return false;
}
this.tokens.appendCode(` = ${assignmentSnippet}`);
this.tokens.copyToken();
return true;
}
/**
* Process something like `++a`, where `a` might be an exported value.
*/
processPreIncDec() {
const index = this.tokens.currentIndex();
const identifierToken = this.tokens.tokens[index + 1];
if (identifierToken.type !== _types.TokenType.name) {
return false;
}
if (identifierToken.shadowsGlobal) {
return false;
}
// Ignore things like ++a.b and ++a[b] and ++a().b.
if (
index + 2 < this.tokens.tokens.length &&
(this.tokens.matches1AtIndex(index + 2, _types.TokenType.dot) ||
this.tokens.matches1AtIndex(index + 2, _types.TokenType.bracketL) ||
this.tokens.matches1AtIndex(index + 2, _types.TokenType.parenL))
) {
return false;
}
const identifierName = this.tokens.identifierNameForToken(identifierToken);
const assignmentSnippet = this.importProcessor.resolveExportBinding(identifierName);
if (!assignmentSnippet) {
return false;
}
this.tokens.appendCode(`${assignmentSnippet} = `);
this.tokens.copyToken();
return true;
}
/**
* Process something like `a++`, where `a` might be an exported value.
* This starts at the `a`, not at the `++`.
*/
processPostIncDec() {
const index = this.tokens.currentIndex();
const identifierToken = this.tokens.tokens[index];
const operatorToken = this.tokens.tokens[index + 1];
if (identifierToken.type !== _types.TokenType.name) {
return false;
}
if (identifierToken.shadowsGlobal) {
return false;
}
if (index >= 1 && this.tokens.matches1AtIndex(index - 1, _types.TokenType.dot)) {
return false;
}
const identifierName = this.tokens.identifierNameForToken(identifierToken);
const assignmentSnippet = this.importProcessor.resolveExportBinding(identifierName);
if (!assignmentSnippet) {
return false;
}
const operatorCode = this.tokens.rawCodeForToken(operatorToken);
// We might also replace the identifier with something like exports.x, so
// do that replacement here as well.
const base = this.importProcessor.getIdentifierReplacement(identifierName) || identifierName;
if (operatorCode === "++") {
this.tokens.replaceToken(`(${base} = ${assignmentSnippet} = ${base} + 1, ${base} - 1)`);
} else if (operatorCode === "--") {
this.tokens.replaceToken(`(${base} = ${assignmentSnippet} = ${base} - 1, ${base} + 1)`);
} else {
throw new Error(`Unexpected operator: ${operatorCode}`);
}
this.tokens.removeToken();
return true;
}
processExportDefault() {
let exportedRuntimeValue = true;
if (
this.tokens.matches4(_types.TokenType._export, _types.TokenType._default, _types.TokenType._function, _types.TokenType.name) ||
// export default async function
(this.tokens.matches5(_types.TokenType._export, _types.TokenType._default, _types.TokenType.name, _types.TokenType._function, _types.TokenType.name) &&
this.tokens.matchesContextualAtIndex(
this.tokens.currentIndex() + 2,
_keywords.ContextualKeyword._async,
))
) {
this.tokens.removeInitialToken();
this.tokens.removeToken();
// Named function export case: change it to a top-level function
// declaration followed by exports statement.
const name = this.processNamedFunction();
this.tokens.appendCode(` exports.default = ${name};`);
} else if (
this.tokens.matches4(_types.TokenType._export, _types.TokenType._default, _types.TokenType._class, _types.TokenType.name) ||
this.tokens.matches5(_types.TokenType._export, _types.TokenType._default, _types.TokenType._abstract, _types.TokenType._class, _types.TokenType.name) ||
this.tokens.matches3(_types.TokenType._export, _types.TokenType._default, _types.TokenType.at)
) {
this.tokens.removeInitialToken();
this.tokens.removeToken();
this.copyDecorators();
if (this.tokens.matches1(_types.TokenType._abstract)) {
this.tokens.removeToken();
}
const name = this.rootTransformer.processNamedClass();
this.tokens.appendCode(` exports.default = ${name};`);
// After this point, this is a plain "export default E" statement.
} else if (
_shouldElideDefaultExport2.default.call(void 0,
this.isTypeScriptTransformEnabled,
this.keepUnusedImports,
this.tokens,
this.declarationInfo,
)
) {
// If the exported value is just an identifier and should be elided by TypeScript
// rules, then remove it entirely. It will always have the form `export default e`,
// where `e` is an identifier.
exportedRuntimeValue = false;
this.tokens.removeInitialToken();
this.tokens.removeToken();
this.tokens.removeToken();
} else if (this.reactHotLoaderTransformer) {
// We need to assign E to a variable. Change "export default E" to
// "let _default; exports.default = _default = E"
const defaultVarName = this.nameManager.claimFreeName("_default");
this.tokens.replaceToken(`let ${defaultVarName}; exports.`);
this.tokens.copyToken();
this.tokens.appendCode(` = ${defaultVarName} =`);
this.reactHotLoaderTransformer.setExtractedDefaultExportName(defaultVarName);
} else {
// Change "export default E" to "exports.default = E"
this.tokens.replaceToken("exports.");
this.tokens.copyToken();
this.tokens.appendCode(" =");
}
if (exportedRuntimeValue) {
this.hadDefaultExport = true;
}
}
copyDecorators() {
while (this.tokens.matches1(_types.TokenType.at)) {
this.tokens.copyToken();
if (this.tokens.matches1(_types.TokenType.parenL)) {
this.tokens.copyExpectedToken(_types.TokenType.parenL);
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(_types.TokenType.parenR);
} else {
this.tokens.copyExpectedToken(_types.TokenType.name);
while (this.tokens.matches1(_types.TokenType.dot)) {
this.tokens.copyExpectedToken(_types.TokenType.dot);
this.tokens.copyExpectedToken(_types.TokenType.name);
}
if (this.tokens.matches1(_types.TokenType.parenL)) {
this.tokens.copyExpectedToken(_types.TokenType.parenL);
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(_types.TokenType.parenR);
}
}
}
}
/**
* Transform a declaration like `export var`, `export let`, or `export const`.
*/
processExportVar() {
if (this.isSimpleExportVar()) {
this.processSimpleExportVar();
} else {
this.processComplexExportVar();
}
}
/**
* Determine if the export is of the form:
* export var/let/const [varName] = [expr];
* In other words, determine if function name inference might apply.
*/
isSimpleExportVar() {
let tokenIndex = this.tokens.currentIndex();
// export
tokenIndex++;
// var/let/const
tokenIndex++;
if (!this.tokens.matches1AtIndex(tokenIndex, _types.TokenType.name)) {
return false;
}
tokenIndex++;
while (tokenIndex < this.tokens.tokens.length && this.tokens.tokens[tokenIndex].isType) {
tokenIndex++;
}
if (!this.tokens.matches1AtIndex(tokenIndex, _types.TokenType.eq)) {
return false;
}
return true;
}
/**
* Transform an `export var` declaration initializing a single variable.
*
* For example, this:
* export const f = () => {};
* becomes this:
* const f = () => {}; exports.f = f;
*
* The variable is unused (e.g. exports.f has the true value of the export).
* We need to produce an assignment of this form so that the function will
* have an inferred name of "f", which wouldn't happen in the more general
* case below.
*/
processSimpleExportVar() {
// export
this.tokens.removeInitialToken();
// var/let/const
this.tokens.copyToken();
const varName = this.tokens.identifierName();
// x: number -> x
while (!this.tokens.matches1(_types.TokenType.eq)) {
this.rootTransformer.processToken();
}
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
while (this.tokens.currentIndex() < endIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(`; exports.${varName} = ${varName}`);
}
/**
* Transform normal declaration exports, including handling destructuring.
* For example, this:
* export const {x: [a = 2, b], c} = d;
* becomes this:
* ({x: [exports.a = 2, exports.b], c: exports.c} = d;)
*/
processComplexExportVar() {
this.tokens.removeInitialToken();
this.tokens.removeToken();
const needsParens = this.tokens.matches1(_types.TokenType.braceL);
if (needsParens) {
this.tokens.appendCode("(");
}
let depth = 0;
while (true) {
if (
this.tokens.matches1(_types.TokenType.braceL) ||
this.tokens.matches1(_types.TokenType.dollarBraceL) ||
this.tokens.matches1(_types.TokenType.bracketL)
) {
depth++;
this.tokens.copyToken();
} else if (this.tokens.matches1(_types.TokenType.braceR) || this.tokens.matches1(_types.TokenType.bracketR)) {
depth--;
this.tokens.copyToken();
} else if (
depth === 0 &&
!this.tokens.matches1(_types.TokenType.name) &&
!this.tokens.currentToken().isType
) {
break;
} else if (this.tokens.matches1(_types.TokenType.eq)) {
// Default values might have assignments in the RHS that we want to ignore, so skip past
// them.
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
while (this.tokens.currentIndex() < endIndex) {
this.rootTransformer.processToken();
}
} else {
const token = this.tokens.currentToken();
if (_tokenizer.isDeclaration.call(void 0, token)) {
const name = this.tokens.identifierName();
let replacement = this.importProcessor.getIdentifierReplacement(name);
if (replacement === null) {
throw new Error(`Expected a replacement for ${name} in \`export var\` syntax.`);
}
if (_tokenizer.isObjectShorthandDeclaration.call(void 0, token)) {
replacement = `${name}: ${replacement}`;
}
this.tokens.replaceToken(replacement);
} else {
this.rootTransformer.processToken();
}
}
}
if (needsParens) {
// Seek to the end of the RHS.
const endIndex = this.tokens.currentToken().rhsEndIndex;
if (endIndex == null) {
throw new Error("Expected = token with an end index.");
}
while (this.tokens.currentIndex() < endIndex) {
this.rootTransformer.processToken();
}
this.tokens.appendCode(")");
}
}
/**
* Transform this:
* export function foo() {}
* into this:
* function foo() {} exports.foo = foo;
*/
processExportFunction() {
this.tokens.replaceToken("");
const name = this.processNamedFunction();
this.tokens.appendCode(` exports.${name} = ${name};`);
}
/**
* Skip past a function with a name and return that name.
*/
processNamedFunction() {
if (this.tokens.matches1(_types.TokenType._function)) {
this.tokens.copyToken();
} else if (this.tokens.matches2(_types.TokenType.name, _types.TokenType._function)) {
if (!this.tokens.matchesContextual(_keywords.ContextualKeyword._async)) {
throw new Error("Expected async keyword in function export.");
}
this.tokens.copyToken();
this.tokens.copyToken();
}
if (this.tokens.matches1(_types.TokenType.star)) {
this.tokens.copyToken();
}
if (!this.tokens.matches1(_types.TokenType.name)) {
throw new Error("Expected identifier for exported function name.");
}
const name = this.tokens.identifierName();
this.tokens.copyToken();
if (this.tokens.currentToken().isType) {
this.tokens.removeInitialToken();
while (this.tokens.currentToken().isType) {
this.tokens.removeToken();
}
}
this.tokens.copyExpectedToken(_types.TokenType.parenL);
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(_types.TokenType.parenR);
this.rootTransformer.processPossibleTypeRange();
this.tokens.copyExpectedToken(_types.TokenType.braceL);
this.rootTransformer.processBalancedCode();
this.tokens.copyExpectedToken(_types.TokenType.braceR);
return name;
}
/**
* Transform this:
* export class A {}
* into this:
* class A {} exports.A = A;
*/
processExportClass() {
this.tokens.removeInitialToken();
this.copyDecorators();
if (this.tokens.matches1(_types.TokenType._abstract)) {
this.tokens.removeToken();
}
const name = this.rootTransformer.processNamedClass();
this.tokens.appendCode(` exports.${name} = ${name};`);
}
/**
* Transform this:
* export {a, b as c};
* into this:
* exports.a = a; exports.c = b;
*
* OR
*
* Transform this:
* export {a, b as c} from './foo';
* into the pre-generated Object.defineProperty code from the ImportProcessor.
*
* For the first case, if the TypeScript transform is enabled, we need to skip
* exports that are only defined as types.
*/
processExportBindings() {
this.tokens.removeInitialToken();
this.tokens.removeToken();
const isReExport = _isExportFrom2.default.call(void 0, this.tokens);
const exportStatements = [];
while (true) {
if (this.tokens.matches1(_types.TokenType.braceR)) {
this.tokens.removeToken();
break;
}
const specifierInfo = _getImportExportSpecifierInfo2.default.call(void 0, this.tokens);
while (this.tokens.currentIndex() < specifierInfo.endIndex) {
this.tokens.removeToken();
}
const shouldRemoveExport =
specifierInfo.isType ||
(!isReExport && this.shouldElideExportedIdentifier(specifierInfo.leftName));
if (!shouldRemoveExport) {
const exportedName = specifierInfo.rightName;
if (exportedName === "default") {
this.hadDefaultExport = true;
} else {
this.hadNamedExport = true;
}
const localName = specifierInfo.leftName;
const newLocalName = this.importProcessor.getIdentifierReplacement(localName);
exportStatements.push(`exports.${exportedName} = ${newLocalName || localName};`);
}
if (this.tokens.matches1(_types.TokenType.braceR)) {
this.tokens.removeToken();
break;
}
if (this.tokens.matches2(_types.TokenType.comma, _types.TokenType.braceR)) {
this.tokens.removeToken();
this.tokens.removeToken();
break;
} else if (this.tokens.matches1(_types.TokenType.comma)) {
this.tokens.removeToken();
} else {
throw new Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`);
}
}
if (this.tokens.matchesContextual(_keywords.ContextualKeyword._from)) {
// This is an export...from, so throw away the normal named export code
// and use the Object.defineProperty code from ImportProcessor.
this.tokens.removeToken();
const path = this.tokens.stringValue();
this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path));
_removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens);
} else {
// This is a normal named export, so use that.
this.tokens.appendCode(exportStatements.join(" "));
}
if (this.tokens.matches1(_types.TokenType.semi)) {
this.tokens.removeToken();
}
}
processExportStar() {
this.tokens.removeInitialToken();
while (!this.tokens.matches1(_types.TokenType.string)) {
this.tokens.removeToken();
}
const path = this.tokens.stringValue();
this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(path));
_removeMaybeImportAttributes.removeMaybeImportAttributes.call(void 0, this.tokens);
if (this.tokens.matches1(_types.TokenType.semi)) {
this.tokens.removeToken();
}
}
shouldElideExportedIdentifier(name) {
return (
this.isTypeScriptTransformEnabled &&
!this.keepUnusedImports &&
!this.declarationInfo.valueDeclarations.has(name)
);
}
} exports.default = CJSImportTransformer;
@@ -0,0 +1 @@
{"version":3,"file":"transformStreamWithRouter.js","names":[],"sources":["../../../src/ssr/transformStreamWithRouter.ts"],"sourcesContent":["import { ReadableStream } from 'node:stream/web'\nimport { Readable } from 'node:stream'\nimport { TSR_SCRIPT_BARRIER_ID } from './constants'\nimport type { AnyRouter } from '../router'\n\nexport function transformReadableStreamWithRouter(\n router: AnyRouter,\n routerStream: ReadableStream,\n) {\n return transformStreamWithRouter(router, routerStream)\n}\n\nexport function transformPipeableStreamWithRouter(\n router: AnyRouter,\n routerStream: Readable,\n) {\n return Readable.fromWeb(\n transformStreamWithRouter(router, Readable.toWeb(routerStream)),\n )\n}\n\n// Use string constants for simple indexOf matching\nconst BODY_END_TAG = '</body>'\nconst HTML_END_TAG = '</html>'\n\n// Minimum length of a valid closing tag: </a> = 4 characters\nconst MIN_CLOSING_TAG_LENGTH = 4\n\n// Default timeout values (in milliseconds)\nconst DEFAULT_SERIALIZATION_TIMEOUT_MS = 60000\nconst DEFAULT_LIFETIME_TIMEOUT_MS = 60000\n\n// Module-level encoder (stateless, safe to reuse)\nconst textEncoder = new TextEncoder()\n\n/**\n * Finds the position just after the last valid HTML closing tag in the string.\n *\n * Valid closing tags match the pattern: </[a-zA-Z][\\w:.-]*>\n * Examples: </div>, </my-component>, </slot:name.nested>\n *\n * @returns Position after the last closing tag, or -1 if none found\n */\nfunction findLastClosingTagEnd(str: string): number {\n const len = str.length\n if (len < MIN_CLOSING_TAG_LENGTH) return -1\n\n let i = len - 1\n\n while (i >= MIN_CLOSING_TAG_LENGTH - 1) {\n // Look for > (charCode 62)\n if (str.charCodeAt(i) === 62) {\n // Look backwards for valid tag name characters\n let j = i - 1\n\n // Skip through valid tag name characters\n while (j >= 1) {\n const code = str.charCodeAt(j)\n // Check if it's a valid tag name char: [a-zA-Z0-9_:.-]\n if (\n (code >= 97 && code <= 122) || // a-z\n (code >= 65 && code <= 90) || // A-Z\n (code >= 48 && code <= 57) || // 0-9\n code === 95 || // _\n code === 58 || // :\n code === 46 || // .\n code === 45 // -\n ) {\n j--\n } else {\n break\n }\n }\n\n // Check if the first char after </ is a valid start char (letter only)\n const tagNameStart = j + 1\n if (tagNameStart < i) {\n const startCode = str.charCodeAt(tagNameStart)\n // Tag name must start with a letter (a-z or A-Z)\n if (\n (startCode >= 97 && startCode <= 122) ||\n (startCode >= 65 && startCode <= 90)\n ) {\n // Check for </ (charCodes: < = 60, / = 47)\n if (\n j >= 1 &&\n str.charCodeAt(j) === 47 &&\n str.charCodeAt(j - 1) === 60\n ) {\n return i + 1 // Return position after the closing >\n }\n }\n }\n }\n i--\n }\n return -1\n}\n\nexport function transformStreamWithRouter(\n router: AnyRouter,\n appStream: ReadableStream,\n opts?: {\n /** Timeout for serialization to complete after app render finishes (default: 60000ms) */\n timeoutMs?: number\n /** Maximum lifetime of the stream transform (default: 60000ms). Safety net for cleanup. */\n lifetimeMs?: number\n },\n) {\n // Check upfront if serialization already finished synchronously\n // This is the fast path for routes with no deferred data\n const serializationAlreadyFinished =\n router.serverSsr?.isSerializationFinished() ?? false\n\n // Take any HTML that was buffered before we started listening\n const initialBufferedHtml = router.serverSsr?.takeBufferedHtml()\n\n // True passthrough: if serialization already finished and nothing buffered,\n // we can avoid any decoding/scanning while still honoring cleanup + setRenderFinished.\n if (serializationAlreadyFinished && !initialBufferedHtml) {\n let cleanedUp = false\n let controller: ReadableStreamDefaultController<Uint8Array> | undefined\n let isStreamClosed = false\n let lifetimeTimeoutHandle: ReturnType<typeof setTimeout> | undefined\n\n const cleanup = () => {\n if (cleanedUp) return\n cleanedUp = true\n\n if (lifetimeTimeoutHandle !== undefined) {\n clearTimeout(lifetimeTimeoutHandle)\n lifetimeTimeoutHandle = undefined\n }\n\n router.serverSsr?.cleanup()\n }\n\n const safeClose = () => {\n if (isStreamClosed) return\n isStreamClosed = true\n try {\n controller?.close()\n } catch {\n // ignore\n }\n }\n\n const safeError = (error: unknown) => {\n if (isStreamClosed) return\n isStreamClosed = true\n try {\n controller?.error(error)\n } catch {\n // ignore\n }\n }\n\n const lifetimeMs = opts?.lifetimeMs ?? DEFAULT_LIFETIME_TIMEOUT_MS\n lifetimeTimeoutLine truncated
@@ -0,0 +1 @@
module.exports={C:{"115":0.07288,"120":0.10412,"121":0.20824,"123":0.01041,"124":0.00521,"136":0.00521,"140":0.01041,"148":0.00521,"150":0.00521,"151":0.00521,"152":0.01562,"153":0.03124,"154":0.13015,"155":0.51539,"156":0.56225,"157":0.01562,_:"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 125 126 127 128 129 130 131 132 133 134 135 137 138 139 141 142 143 144 145 146 147 149 158 159 160 3.5 3.6"},D:{"70":0.00521,"75":0.00521,"76":0.00521,"79":0.00521,"80":0.00521,"87":0.00521,"91":0.01562,"93":0.03644,"96":0.00521,"98":0.01562,"99":0.00521,"101":0.00521,"102":0.00521,"103":1.68154,"104":0.10412,"105":0.10933,"106":0.10412,"107":0.10933,"108":0.10412,"109":0.81214,"110":0.09891,"111":0.11453,"112":0.09891,"114":0.03644,"115":0.00521,"116":0.29674,"117":0.10412,"118":0.20824,"119":0.21865,"120":0.32277,"121":0.01041,"122":0.04165,"123":0.01562,"124":0.12494,"125":0.01562,"126":0.15097,"127":0.01562,"128":0.07809,"129":0.02082,"130":0.02082,"131":0.2603,"132":0.01041,"133":0.22386,"134":0.05727,"135":0.05206,"136":0.0885,"137":0.12494,"138":0.22386,"139":0.06247,"140":0.07288,"141":0.06768,"142":0.16139,"143":0.04165,"144":0.19262,"145":0.07288,"146":0.0885,"147":0.07809,"148":0.23948,"149":0.23948,"150":0.66116,"151":4.26371,"152":12.22889,"153":12.90047,"154":2.29585,"155":0.02603,"156":0.00521,_:"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 71 72 73 74 77 78 81 83 84 85 86 88 89 90 92 94 95 97 100 113 157"},F:{"72":0.00521,"95":0.02082,"100":0.00521,"101":0.01562,"106":0.00521,"133":0.00521,"134":0.05727,"135":0.40086,_:"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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 96 97 98 99 102 103 104 105 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:{"109":0.00521,"119":0.09891,"120":0.10933,"122":0.00521,"132":0.00521,"135":0.00521,"140":0.00521,"142":0.00521,"143":0.00521,"145":0.00521,"146":0.00521,"147":0.00521,"148":0.01041,"149":0.01562,"150":0.04685,"151":0.20824,"152":1.50974,"153":1.97828,"154":0.44772,_:"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 110 111 112 113 114 115 116 117 118 121 123 124 125 126 127 128 129 130 131 133 134 136 137 138 139 141 144"},E:{"27":0.14056,_:"4 5 6 7 8 9 10 11 12 13 14 15 3.1 3.2 5.1 6.1 7.1 9.1 10.1 11.1 12.1 15.1 15.2-15.3 15.4 15.5 16.0 16.2 16.4 17.0 27.1 27.2 TP","13.1":0.00521,"14.1":0.02082,"15.6":0.02082,"16.1":0.00521,"16.3":0.00521,"16.5":0.00521,"16.6":0.02603,"17.1":0.04165,"17.2":0.00521,"17.3":0.00521,"17.4":0.01041,"17.5":0.02082,"17.6":0.09371,"18.0":0.01041,"18.1":0.02082,"18.2":0.00521,"18.3":0.02603,"18.4":0.01041,"18.5-18.7":0.04685,"26.0":0.03644,"26.1":0.03124,"26.2":0.10412,"26.3":0.0833,"26.4":0.09371,"26.5":0.51539,"26.6":1.53056},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00184,"5.0-5.1":0.00184,"6.0-6.1":0,"7.0-7.1":0.00368,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.01838,"11.0-11.2":0.00184,"11.3-11.4":0.00368,"12.0-12.1":0,"12.2-12.5":0.04778,"13.0-13.1":0,"13.2":0.00919,"13.3":0,"13.4-13.7":0.00184,"14.0-14.4":0.00735,"14.5-14.8":0.01103,"15.0-15.1":0.01103,"15.2-15.3":0.00735,"15.4":0.00919,"15.5":0.01103,"15.6-15.8":0.23888,"16.0":0.01838,"16.1":0.03308,"16.2":0.01838,"16.3":0.04043,"16.4":0.00919,"16.5":0.0147,"16.6-16.7":0.33259,"17.0":0.01286,"17.1":0.01838,"17.2":0.01838,"17.3":0.02756,"17.4":0.03859,"17.5":0.07534,"17.6-17.7":0.19478,"18.0":0.04043,"18.1":0.08085,"18.2":0.11025,"18.3":0.1911,"18.4":0.11944,"18.5-18.7":2.46782,"26.0":0.11944,"26.1":0.12128,"26.2":0.31606,"26.3":0.34178,"26.4":0.24991,"26.5":1.674,"26.6":10.32881,"27.0":0.79198,"27.1":0,"27.2":0.02021},P:{"26":0.00859,"27":0.00859,"28":0.02578,"29":0.03437,"30":0.83352,_:"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.00958,"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.46981,_:"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.74936},R:{_:"0"},M:{"0":0.18217},Q:{"14.9":0.00479},O:{"0":0.4794},H:{all:0}};
@@ -0,0 +1,40 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [v2.0.2](https://github.com/inspect-js/hasOwn/compare/v2.0.1...v2.0.2) - 2024-03-10
### Commits
- [types] use shared config [`68e9d4d`](https://github.com/inspect-js/hasOwn/commit/68e9d4dab6facb4f05f02c6baea94a3f2a4e44b2)
- [actions] remove redundant finisher; use reusable workflow [`241a68e`](https://github.com/inspect-js/hasOwn/commit/241a68e13ea1fe52bec5ba7f74144befc31fae7b)
- [Tests] increase coverage [`4125c0d`](https://github.com/inspect-js/hasOwn/commit/4125c0d6121db56ae30e38346dfb0c000b04f0a7)
- [Tests] skip `npm ls` in old node due to TS [`01b9282`](https://github.com/inspect-js/hasOwn/commit/01b92822f9971dea031eafdd14767df41d61c202)
- [types] improve predicate type [`d340f85`](https://github.com/inspect-js/hasOwn/commit/d340f85ce02e286ef61096cbbb6697081d40a12b)
- [Dev Deps] update `tape` [`70089fc`](https://github.com/inspect-js/hasOwn/commit/70089fcf544e64acc024cbe60f5a9b00acad86de)
- [Tests] use `@arethetypeswrong/cli` [`50b272c`](https://github.com/inspect-js/hasOwn/commit/50b272c829f40d053a3dd91c9796e0ac0b2af084)
## [v2.0.1](https://github.com/inspect-js/hasOwn/compare/v2.0.0...v2.0.1) - 2024-02-10
### Commits
- [types] use a handwritten d.ts file; fix exported type [`012b989`](https://github.com/inspect-js/hasOwn/commit/012b9898ccf91dc441e2ebf594ff70270a5fda58)
- [Dev Deps] update `@types/function-bind`, `@types/mock-property`, `@types/tape`, `aud`, `mock-property`, `npmignore`, `tape`, `typescript` [`977a56f`](https://github.com/inspect-js/hasOwn/commit/977a56f51a1f8b20566f3c471612137894644025)
- [meta] add `sideEffects` flag [`3a60b7b`](https://github.com/inspect-js/hasOwn/commit/3a60b7bf42fccd8c605e5f145a6fcc83b13cb46f)
## [v2.0.0](https://github.com/inspect-js/hasOwn/compare/v1.0.1...v2.0.0) - 2023-10-19
### Commits
- revamped implementation, tests, readme [`72bf8b3`](https://github.com/inspect-js/hasOwn/commit/72bf8b338e77a638f0a290c63ffaed18339c36b4)
- [meta] revamp package.json [`079775f`](https://github.com/inspect-js/hasOwn/commit/079775fb1ec72c1c6334069593617a0be3847458)
- Only apps should have lockfiles [`6640e23`](https://github.com/inspect-js/hasOwn/commit/6640e233d1bb8b65260880f90787637db157d215)
## v1.0.1 - 2023-10-10
### Commits
- Initial commit [`8dbfde6`](https://github.com/inspect-js/hasOwn/commit/8dbfde6e8fb0ebb076fab38d138f2984eb340a62)
@@ -0,0 +1,101 @@
/**
* gridstack-item.component.ts 12.6.0
* Copyright (c) 2022-2024 Alain Dumesny - see GridStack root license
*/
import { Component, Input, ViewChild, ViewContainerRef } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Angular component wrapper for individual GridStack items.
*
* This component represents a single grid item and handles:
* - Dynamic content creation and management
* - Integration with parent GridStack component
* - Component lifecycle and cleanup
* - Widget options and configuration
*
* Use in combination with GridstackComponent for the parent grid.
*
* @example
* ```html
* <gridstack>
* <gridstack-item [options]="{x: 0, y: 0, w: 2, h: 1}">
* <my-widget-component></my-widget-component>
* </gridstack-item>
* </gridstack>
* ```
*/
export class GridstackItemComponent {
constructor(elementRef) {
this.elementRef = elementRef;
this.el._gridItemComp = this;
}
/**
* Grid item configuration options.
* Defines position, size, and behavior of this grid item.
*
* @example
* ```typescript
* itemOptions: GridStackNode = {
* x: 0, y: 0, w: 2, h: 1,
* noResize: true,
* content: 'Item content'
* };
* ```
*/
set options(val) {
const grid = this.el.gridstackNode?.grid;
if (grid) {
// already built, do an update...
grid.update(this.el, val);
}
else {
// store our custom element in options so we can update it and not re-create a generic div!
this._options = { ...val, el: this.el };
}
}
/** return the latest grid options (from GS once built, otherwise initial values) */
get options() {
return this.el.gridstackNode || this._options || { el: this.el };
}
/** return the native element that contains grid specific fields as well */
get el() { return this.elementRef.nativeElement; }
/** clears the initial options now that we've built */
clearOptions() {
delete this._options;
}
ngOnDestroy() {
this.clearOptions();
delete this.childWidget;
delete this.el._gridItemComp;
delete this.container;
delete this.ref;
}
}
GridstackItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackItemComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
GridstackItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: GridstackItemComponent, isStandalone: true, selector: "gridstack-item", inputs: { options: "options" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
<div class="grid-stack-item-content">
<!-- where dynamic items go based on component selector (recommended way), or sub-grids, etc...) -->
<ng-template #container></ng-template>
<!-- any static (defined in DOM - not recommended) content goes here -->
<ng-content></ng-content>
<!-- fallback HTML content from GridStackWidget.content if used instead (not recommended) -->
{{options.content}}
</div>`, isInline: true, styles: [":host{display:block}\n"] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: GridstackItemComponent, decorators: [{
type: Component,
args: [{ selector: 'gridstack-item', template: `
<div class="grid-stack-item-content">
<!-- where dynamic items go based on component selector (recommended way), or sub-grids, etc...) -->
<ng-template #container></ng-template>
<!-- any static (defined in DOM - not recommended) content goes here -->
<ng-content></ng-content>
<!-- fallback HTML content from GridStackWidget.content if used instead (not recommended) -->
{{options.content}}
</div>`, standalone: true, styles: [":host{display:block}\n"] }]
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { container: [{
type: ViewChild,
args: ['container', { read: ViewContainerRef, static: true }]
}], options: [{
type: Input
}] } });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZHN0YWNrLWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vYW5ndWxhci9wcm9qZWN0cy9saWIvc3JjL2xpYi9ncmlkc3RhY2staXRlbS5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7OztHQUdHO0FBRUgsT0FBTyxFQUFFLFNBQVMsRUFBYyxLQUFLLEVBQUUsU0FBUyxFQUFFLGdCQUFnQixFQUEyQixNQUFNLGVBQWUsQ0FBQzs7QUFhbkg7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FtQkc7QUFrQkgsTUFBTSxPQUFPLHNCQUFzQjtJQTBEakMsWUFBK0IsVUFBK0M7UUFBL0MsZUFBVSxHQUFWLFVBQVUsQ0FBcUM7UUFDNUUsSUFBSSxDQUFDLEVBQUUsQ0FBQyxhQUFhLEdBQUcsSUFBSSxDQUFDO0lBQy9CLENBQUM7SUF4Q0Q7Ozs7Ozs7Ozs7OztPQVlHO0lBQ0gsSUFBb0IsT0FBTyxDQUFDLEdBQWtCO1FBQzVDLE1BQU0sSUFBSSxHQUFHLElBQUksQ0FBQyxFQUFFLENBQUMsYUFBYSxFQUFFLElBQUksQ0FBQztRQUN6QyxJQUFJLElBQUksRUFBRTtZQUNSLGlDQUFpQztZQUNqQyxJQUFJLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxFQUFFLEVBQUUsR0FBRyxDQUFDLENBQUM7U0FDM0I7YUFBTTtZQUNMLDJGQUEyRjtZQUMzRixJQUFJLENBQUMsUUFBUSxHQUFHLEVBQUMsR0FBRyxHQUFHLEVBQUUsRUFBRSxFQUFFLElBQUksQ0FBQyxFQUFFLEVBQUMsQ0FBQztTQUN2QztJQUNILENBQUM7SUFDRCxvRkFBb0Y7SUFDcEYsSUFBVyxPQUFPO1FBQ2hCLE9BQU8sSUFBSSxDQUFDLEVBQUUsQ0FBQyxhQUFhLElBQUksSUFBSSxDQUFDLFFBQVEsSUFBSSxFQUFDLEVBQUUsRUFBRSxJQUFJLENBQUMsRUFBRSxFQUFDLENBQUM7SUFDakUsQ0FBQztJQUlELDJFQUEyRTtJQUMzRSxJQUFXLEVBQUUsS0FBOEIsT0FBTyxJQUFJLENBQUMsVUFBVSxDQUFDLGFBQWEsQ0FBQyxDQUFDLENBQUM7SUFFbEYsc0RBQXNEO0lBQy9DLFlBQVk7UUFDakIsT0FBTyxJQUFJLENBQUMsUUFBUSxDQUFDO0lBQ3ZCLENBQUM7SUFNTSxXQUFXO1FBQ2hCLElBQUksQ0FBQyxZQUFZLEVBQUUsQ0FBQztRQUNwQixPQUFPLElBQUksQ0FBQyxXQUFXLENBQUE7UUFDdkIsT0FBTyxJQUFJLENBQUMsRUFBRSxDQUFDLGFBQWEsQ0FBQztRQUM3QixPQUFPLElBQUksQ0FBQyxTQUFTLENBQUM7UUFDdEIsT0FBTyxJQUFJLENBQUMsR0FBRyxDQUFDO0lBQ2xCLENBQUM7O21IQXBFVSxzQkFBc0I7dUdBQXRCLHNCQUFzQiw2TEFNRCxnQkFBZ0IsMkNBckJ0Qzs7Ozs7Ozs7V0FRRDsyRkFPRSxzQkFBc0I7a0JBakJsQyxTQUFTOytCQUNFLGdCQUFnQixZQUNoQjs7Ozs7Ozs7V0FRRCxjQUlHLElBQUk7aUdBU3dELFNBQVM7c0JBQWhGLFNBQVM7dUJBQUMsV0FBVyxFQUFFLEVBQUUsSUFBSSxFQUFFLGdCQUFnQixFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQUM7Z0JBMkIzQyxPQUFPO3NCQUExQixLQUFLIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBncmlkc3RhY2staXRlbS5jb21wb25lbnQudHMgMTIuNi4wXG4gKiBDb3B5cmlnaHQgKGMpIDIwMjItMjAyNCBBbGFpbiBEdW1lc255IC0gc2VlIEdyaWRTdGFjayByb290IGxpY2Vuc2VcbiAqL1xuXG5pbXBvcnQgeyBDb21wb25lbnQsIEVsZW1lbnRSZWYsIElucHV0LCBWaWV3Q2hpbGQsIFZpZXdDb250YWluZXJSZWYsIE9uRGVzdHJveSwgQ29tcG9uZW50UmVmIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBHcmlkSXRlbUhUTUxFbGVtZW50LCBHcmlkU3RhY2tOb2RlIH0gZnJvbSAnZ3JpZHN0YWNrJztcbmltcG9ydCB7IEJhc2VXaWRnZXQgfSBmcm9tICcuL2Jhc2Utd2lkZ2V0JztcblxuLyoqXG4gKiBFeHRlbmRlZCBIVE1MRWxlbWVudCBpbnRlcmZhY2UgZm9yIGdyaWQgaXRlbXMuXG4gKiBTdG9yZXMgYSBiYWNrLXJlZmVyZW5jZSB0byB0aGUgQW5ndWxhciBjb21wb25lbnQgZm9yIGludGVncmF0aW9uLlxuICovXG5leHBvcnQgaW50ZXJmYWNlIEdyaWRJdGVtQ29tcEhUTUxFbGVtZW50IGV4dGVuZHMgR3JpZEl0ZW1IVE1MRWxlbWVudCB7XG4gIC8qKiBCYWNrLXJlZmVyZW5jZSB0byB0aGUgQW5ndWxhciBHcmlkU3RhY2tJdGVtIGNvbXBvbmVudCAqL1xuICBfZ3JpZEl0ZW1Db21wPzogR3JpZHN0YWNrSXRlbUNvbXBvbmVudDtcbn1cblxuLyoqXG4gKiBBbmd1bGFyIGNvbXBvbmVudCB3cmFwcGVyIGZvciBpbmRpdmlkdWFsIEdyaWRTdGFjayBpdGVtcy5cbiAqXG4gKiBUaGlzIGNvbXBvbmVudCByZXByZXNlbnRzIGEgc2luZ2xlIGdyaWQgaXRlbSBhbmQgaGFuZGxlczpcbiAqIC0gRHluYW1pYyBjb250ZW50IGNyZWF0aW9uIGFuZCBtYW5hZ2VtZW50XG4gKiAtIEludGVncmF0aW9uIHdpdGggcGFyZW50IEdyaWRTdGFjayBjb21wb25lbnRcbiAqIC0gQ29tcG9uZW50IGxpZmVjeWNsZSBhbmQgY2xlYW51cFxuICogLSBXaWRnZXQgb3B0aW9ucyBhbmQgY29uZmlndXJhdGlvblxuICpcbiAqIFVzZSBpbiBjb21iaW5hdGlvbiB3aXRoIEdyaWRzdGFja0NvbXBvbmVudCBmb3IgdGhlIHBhcmVudCBncmlkLlxuICpcbiAqIEBleGFtcGxlXG4gKiBgYGBodG1sXG4gKiA8Z3JpZHN0YWNrPlxuICogICA8Z3JpZHN0YWNrLWl0ZW0gW29wdGlvbnNdPVwie3g6IDAsIHk6IDAsIHc6IDIsIGg6IDF9XCI+XG4gKiAgICAgPG15LXdpZGdldC1jb21wb25lbnQ+PC9teS13aWRnZXQtY29tcG9uZW50PlxuICogICA8L2dyaWRzdGFjay1pdGVtPlxuICogPC9ncmlkc3RhY2s+XG4gKiBgYGBcbiAqL1xuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9yOiAnZ3JpZHN0YWNrLWl0ZW0nLFxuICB0ZW1wbGF0ZTogYFxuICAgIDxkaXYgY2xhc3M9XCJncmlkLXN0YWNrLWl0ZW0tY29udGVudFwiPlxuICAgICAgPCEtLSB3aGVyZSBkeW5hbWljIGl0ZW1zIGdvIGJhc2VkIG9uIGNvbXBvbmVudCBzZWxlY3RvciAocmVjb21tZW5kZWQgd2F5KSwgb3Igc3ViLWdyaWRzLCBldGMuLi4pIC0tPlxuICAgICAgPG5nLXRlbXBsYXRlICNjb250YWluZXI+PC9uZy10ZW1wbGF0ZT5cbiAgICAgIDwhLS0gYW55IHN0YXRpYyAoZGVmaW5lZCBpbiBET00gLSBub3QgcmVjb21tZW5kZWQpIGNvbnRlbnQgZ29lcyBoZXJlIC0tPlxuICAgICAgPG5nLWNvbnRlbnQ+PC9uZy1jb250ZW50PlxuICAgICAgPCEtLSBmYWxsYmFjayBIVE1MIGNvbnRlbnQgZnJvbSBHcmlkU3RhY2tXaWRnZXQuY29udGVudCBpZiB1c2VkIGluc3RlYWQgKG5vdCByZWNvbW1lbmRlZCkgLS0+XG4gICAgICB7e29wdGlvbnMuY29udGVudH19XG4gICAgPC9kaXY+YCxcbiAgc3R5bGVzOiBbYFxuICAgIDpob3N0IHsgZGlzcGxheTogYmxvY2s7IH1cbiAgYF0sXG4gIHN0YW5kYWxvbmU6IHRydWUsXG4gIC8vIGNoYW5nZURldGVjdGlvbjogQ2hhbmdlRGV0ZWN0aW9uU3RyYXRlZ3kuT25QdXNoLCAvLyBJRkYgeW91IHdhbnQgdG8gb3B0aW1pemUgYW5kIGNvbnRyb2wgd2hlbiBDaGFuZ2VEZXRlY3Rpb24gbmVlZHMgdG8gaGFwcGVuLi4uXG59KVxuZXhwb3J0IGNsYXNzIEdyaWRzdGFja0l0ZW1Db21wb25lbnQgaW1wbGVtZW50cyBPbkRlc3Ryb3kge1xuXG4gIC8qKlxuICAgKiBDb250YWluZXIgZm9yIGR5bmFtaWMgY29tcG9uZW50IGNyZWF0aW9uIHdpdGhpbiB0aGlzIGdyaWQgaXRlbS5cbiAgICogVXNlZCB0byBhcHBlbmQgY2hpbGQgY29tcG9uZW50cyBwcm9ncmFtbWF0aWNhbGx5LlxuICAgKi9cbiAgQFZpZXdDaGlsZCgnY29udGFpbmVyJywgeyByZWFkOiBWaWV3Q29udGFpbmVyUmVmLCBzdGF0aLine truncated
@@ -0,0 +1,242 @@
/*!
* router
* Copyright(c) 2013 Roman Shtylman
* Copyright(c) 2014-2022 Douglas Christopher Wilson
* MIT Licensed
*/
'use strict'
/**
* Module dependencies.
* @private
*/
const debug = require('debug')('router:route')
const Layer = require('./layer')
const { METHODS } = require('node:http')
/**
* Module variables.
* @private
*/
const slice = Array.prototype.slice
const flatten = Array.prototype.flat
const methods = METHODS.map((method) => method.toLowerCase())
/**
* Expose `Route`.
*/
module.exports = Route
/**
* Initialize `Route` with the given `path`,
*
* @param {String} path
* @api private
*/
function Route (path) {
debug('new %o', path)
this.path = path
this.stack = []
// route handlers for various http methods
this.methods = Object.create(null)
}
/**
* @private
*/
Route.prototype._handlesMethod = function _handlesMethod (method) {
if (this.methods._all) {
return true
}
// normalize name
let name = typeof method === 'string'
? method.toLowerCase()
: method
if (name === 'head' && !this.methods.head) {
name = 'get'
}
return Boolean(this.methods[name])
}
/**
* @return {array} supported HTTP methods
* @private
*/
Route.prototype._methods = function _methods () {
const methods = Object.keys(this.methods)
// append automatic head
if (this.methods.get && !this.methods.head) {
methods.push('head')
}
for (let i = 0; i < methods.length; i++) {
// make upper case
methods[i] = methods[i].toUpperCase()
}
return methods
}
/**
* dispatch req, res into this route
*
* @private
*/
Route.prototype.dispatch = function dispatch (req, res, done) {
let idx = 0
const stack = this.stack
let sync = 0
if (stack.length === 0) {
return done()
}
let method = typeof req.method === 'string'
? req.method.toLowerCase()
: req.method
if (method === 'head' && !this.methods.head) {
method = 'get'
}
req.route = this
next()
function next (err) {
// signal to exit route
if (err && err === 'route') {
return done()
}
// signal to exit router
if (err && err === 'router') {
return done(err)
}
// no more matching layers
if (idx >= stack.length) {
return done(err)
}
// max sync stack
if (++sync > 100) {
return setImmediate(next, err)
}
let layer
let match
// find next matching layer
while (match !== true && idx < stack.length) {
layer = stack[idx++]
match = !layer.method || layer.method === method
}
// no match
if (match !== true) {
return done(err)
}
if (err) {
layer.handleError(err, req, res, next)
} else {
layer.handleRequest(req, res, next)
}
sync = 0
}
}
/**
* Add a handler for all HTTP verbs to this route.
*
* Behaves just like middleware and can respond or call `next`
* to continue processing.
*
* You can use multiple `.all` call to add multiple handlers.
*
* function check_something(req, res, next){
* next()
* }
*
* function validate_user(req, res, next){
* next()
* }
*
* route
* .all(validate_user)
* .all(check_something)
* .get(function(req, res, next){
* res.send('hello world')
* })
*
* @param {array|function} handler
* @return {Route} for chaining
* @api public
*/
Route.prototype.all = function all (handler) {
const callbacks = flatten.call(slice.call(arguments), Infinity)
if (callbacks.length === 0) {
throw new TypeError('argument handler is required')
}
for (let i = 0; i < callbacks.length; i++) {
const fn = callbacks[i]
if (typeof fn !== 'function') {
throw new TypeError('argument handler must be a function')
}
const layer = Layer('/', {}, fn)
layer.method = undefined
this.methods._all = true
this.stack.push(layer)
}
return this
}
methods.forEach(function (method) {
Route.prototype[method] = function (handler) {
const callbacks = flatten.call(slice.call(arguments), Infinity)
if (callbacks.length === 0) {
throw new TypeError('argument handler is required')
}
for (let i = 0; i < callbacks.length; i++) {
const fn = callbacks[i]
if (typeof fn !== 'function') {
throw new TypeError('argument handler must be a function')
}
debug('%s %s', method, this.path)
const layer = Layer('/', {}, fn)
layer.method = method
this.methods[method] = true
this.stack.push(layer)
}
return this
}
})
@@ -0,0 +1,13 @@
import { motionComponentSymbol } from './symbol.mjs';
/**
* Checks if a component is a `motion` component.
*/
function isMotionComponent(component) {
return (component !== null &&
typeof component === "object" &&
motionComponentSymbol in component);
}
export { isMotionComponent };
//# sourceMappingURL=is-motion-component.mjs.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 ChartNoAxesGantt = createLucideIcon("ChartNoAxesGantt", [
["path", { d: "M8 6h10", key: "9lnwnk" }],
["path", { d: "M6 12h9", key: "1g9pqf" }],
["path", { d: "M11 18h7", key: "c8dzvl" }]
]);
export { ChartNoAxesGantt as default };
//# sourceMappingURL=chart-no-axes-gantt.js.map
@@ -0,0 +1 @@
{"version":3,"file":"sse.d.ts","sourceRoot":"","sources":["../../../src/client/sse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EACH,SAAS,EACT,SAAS,EAMZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AACnE,OAAO,EAAkD,mBAAmB,EAAqB,MAAM,WAAW,CAAC;AAEnH,qBAAa,QAAS,SAAQ,KAAK;aAEX,IAAI,EAAE,MAAM,GAAG,SAAS;aAExB,KAAK,EAAE,UAAU;gBAFjB,IAAI,EAAE,MAAM,GAAG,SAAS,EACxC,OAAO,EAAE,MAAM,GAAG,SAAS,EACX,KAAK,EAAE,UAAU;CAIxC;AAED;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACpC;;;;;;;;;;;;;OAaG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAElC;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAElB;;;;;;;;OAQG;IACH,cAAc,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,qBAAa,kBAAmB,YAAW,SAAS;IAChD,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,OAAO,CAAC,SAAS,CAAC,CAAM;IACxB,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAC3C,OAAO,CAAC,IAAI,CAAM;IAClB,OAAO,CAAC,oBAAoB,CAAC,CAAM;IACnC,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAC3C,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,OAAO,CAAC,aAAa,CAAC,CAAsB;IAC5C,OAAO,CAAC,MAAM,CAAC,CAAY;IAC3B,OAAO,CAAC,cAAc,CAAY;IAClC,OAAO,CAAC,gBAAgB,CAAU;IAClC,OAAO,CAAC,gBAAgB,CAAC,CAAS;IAElC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;gBAElC,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,yBAAyB;IAgBtD,yGAAyG;IACzG,OAAO,CAAC,mBAAmB;YAKb,cAAc;YAyBd,cAAc;IAoB5B,OAAO,CAAC,YAAY;IA4Ed,KAAK;IAQX;;OAEG;IACG,UAAU,CAAC,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBpD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAoDlD,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAG5C"}
@@ -0,0 +1,29 @@
import * as React from 'react';
declare module 'react' {
interface ReactElement {
$$typeof?: symbol | string;
}
}
type SlotProps<Elem extends Element = HTMLElement, Props = React.HTMLAttributes<Elem>> = Props & {
children?: React.ReactNode;
};
declare function createSlot<Elem extends Element = HTMLElement, Props = React.HTMLAttributes<Elem>>(ownerName: string): React.ForwardRefExoticComponent<React.PropsWithoutRef<SlotProps<Elem, Props>> & React.RefAttributes<Elem>>;
declare const Slot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & {
children?: React.ReactNode;
} & React.RefAttributes<HTMLElement>>;
type SlottableChildrenProps = {
children: React.ReactNode;
};
type SlottableRenderFnProps = {
child: React.ReactNode;
children: (slottable: React.ReactNode) => React.ReactNode;
};
type SlottableProps = SlottableRenderFnProps | SlottableChildrenProps;
interface SlottableComponent extends React.FC<SlottableProps> {
__radixId: symbol;
}
declare function createSlottable(ownerName: string): SlottableComponent;
declare const Slottable: SlottableComponent;
export { Slot as Root, Slot, type SlotProps, Slottable, createSlot, createSlottable };
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _classPrivateMethodGet;
var _assertClassBrand = require("assertClassBrand");
function _classPrivateMethodGet(receiver, privateSet, fn) {
_assertClassBrand(privateSet, receiver);
return fn;
}
//# sourceMappingURL=classPrivateMethodGet.js.map
@@ -0,0 +1,3 @@
declare function isFinite(x: unknown): x is number | bigint;
export = isFinite;
@@ -0,0 +1,855 @@
import { Client } from '../../client/index.js';
import { StreamableHTTPClientTransport } from '../../client/streamableHttp.js';
import { createInterface } from 'node:readline';
import { ListToolsResultSchema, CallToolResultSchema, ListPromptsResultSchema, GetPromptResultSchema, ListResourcesResultSchema, LoggingMessageNotificationSchema, ResourceListChangedNotificationSchema, ElicitRequestSchema, ReadResourceResultSchema, RELATED_TASK_META_KEY, ErrorCode, McpError } from '../../types.js';
import { InMemoryTaskStore } from '../../experimental/tasks/stores/in-memory.js';
import { getDisplayName } from '../../shared/metadataUtils.js';
import { Ajv } from 'ajv';
// Create readline interface for user input
const readline = createInterface({
input: process.stdin,
output: process.stdout
});
// Track received notifications for debugging resumability
let notificationCount = 0;
// Global client and transport for interactive commands
let client = null;
let transport = null;
let serverUrl = 'http://localhost:3000/mcp';
let notificationsToolLastEventId = undefined;
let sessionId = undefined;
async function main() {
console.log('MCP Interactive Client');
console.log('=====================');
// Connect to server immediately with default settings
await connect();
// Print help and start the command loop
printHelp();
commandLoop();
}
function printHelp() {
console.log('\nAvailable commands:');
console.log(' connect [url] - Connect to MCP server (default: http://localhost:3000/mcp)');
console.log(' disconnect - Disconnect from server');
console.log(' terminate-session - Terminate the current session');
console.log(' reconnect - Reconnect to the server');
console.log(' list-tools - List available tools');
console.log(' call-tool <name> [args] - Call a tool with optional JSON arguments');
console.log(' call-tool-task <name> [args] - Call a tool with task-based execution (example: call-tool-task delay {"duration":3000})');
console.log(' greet [name] - Call the greet tool');
console.log(' multi-greet [name] - Call the multi-greet tool with notifications');
console.log(' collect-info [type] - Test form elicitation with collect-user-info tool (contact/preferences/feedback)');
console.log(' collect-info-task [type] - Test bidirectional task support (server+client tasks) with elicitation');
console.log(' start-notifications [interval] [count] - Start periodic notifications');
console.log(' run-notifications-tool-with-resumability [interval] [count] - Run notification tool with resumability');
console.log(' list-prompts - List available prompts');
console.log(' get-prompt [name] [args] - Get a prompt with optional JSON arguments');
console.log(' list-resources - List available resources');
console.log(' read-resource <uri> - Read a specific resource by URI');
console.log(' help - Show this help');
console.log(' quit - Exit the program');
}
function commandLoop() {
readline.question('\n> ', async (input) => {
const args = input.trim().split(/\s+/);
const command = args[0]?.toLowerCase();
try {
switch (command) {
case 'connect':
await connect(args[1]);
break;
case 'disconnect':
await disconnect();
break;
case 'terminate-session':
await terminateSession();
break;
case 'reconnect':
await reconnect();
break;
case 'list-tools':
await listTools();
break;
case 'call-tool':
if (args.length < 2) {
console.log('Usage: call-tool <name> [args]');
}
else {
const toolName = args[1];
let toolArgs = {};
if (args.length > 2) {
try {
toolArgs = JSON.parse(args.slice(2).join(' '));
}
catch {
console.log('Invalid JSON arguments. Using empty args.');
}
}
await callTool(toolName, toolArgs);
}
break;
case 'greet':
await callGreetTool(args[1] || 'MCP User');
break;
case 'multi-greet':
await callMultiGreetTool(args[1] || 'MCP User');
break;
case 'collect-info':
await callCollectInfoTool(args[1] || 'contact');
break;
case 'collect-info-task': {
await callCollectInfoWithTask(args[1] || 'contact');
break;
}
case 'start-notifications': {
const interval = args[1] ? parseInt(args[1], 10) : 2000;
const count = args[2] ? parseInt(args[2], 10) : 10;
await startNotifications(interval, count);
break;
}
case 'run-notifications-tool-with-resumability': {
const interval = args[1] ? parseInt(args[1], 10) : 2000;
const count = args[2] ? parseInt(args[2], 10) : 10;
await runNotificationsToolWithResumability(interval, count);
break;
}
case 'call-tool-task':
if (args.length < 2) {
console.log('Usage: call-tool-task <name> [args]');
}
else {
const toolName = args[1];
let toolArgs = {};
if (args.length > 2) {
try {
toolArgs = JSON.parse(args.slice(2).join(' '));
}
catch {
console.log('Invalid JSON arguments. Using empty args.');
}
}
await callToolTask(toolName, toolArgs);
}
break;
case 'list-prompts':
await listPrompts();
break;
case 'get-prompt':
if (args.length < 2) {
console.log('Usage: get-prompt <name> [args]');
}
else {
const promptName = args[1];
let promptArgs = {};
if (args.length > 2) {
try {
promptArgs = JSON.parse(args.slice(2).join(' '));
}
catch {
console.log('Invalid JSON arguments. Using empty args.');
}
}
await getPrompt(promptName, promptArgs);
}
break;
case 'list-resources':
await listResources();
break;
case 'read-resource':
if (args.length < 2) {
console.log('Usage: read-resource <uri>');
}
else {
await readResource(args[1]);
}
break;
case 'help':
printHelp();
break;
case 'quit':
case 'exit':
await cleanup();
return;
default:
if (command) {
console.log(`Unknown command: ${command}`);
}
break;
}
}
catch (error) {
console.error(`Error executing command: ${error}`);
}
// Continue the command loop
commandLoop();
});
}
async function connect(url) {
if (client) {
console.log('Already connected. Disconnect first.');
return;
}
if (url) {
serverUrl = url;
}
console.log(`Connecting to ${serverUrl}...`);
try {
// Create task store for client-side task support
const clientTaskStore = new InMemoryTaskStore();
// Create a new client with form elicitation capability and task support
client = new Client({
name: 'example-client',
version: '1.0.0'
}, {
capabilities: {
elicitation: {
form: {}
},
tasks: {
requests: {
elicitation: {
create: {}
}
}
}
},
taskStore: clientTaskStore
});
client.onerror = error => {
console.error('\x1b[31mClient error:', error, '\x1b[0m');
};
// Set up elicitation request handler with proper validation and task support
client.setRequestHandler(ElicitRequestSchema, async (request, extra) => {
if (request.params.mode !== 'form') {
throw new McpError(ErrorCode.InvalidParams, `Unsupported elicitation mode: ${request.params.mode}`);
}
console.log('\n🔔 Elicitation (form) Request Received:');
console.log(`Message: ${request.params.message}`);
console.log(`Related Task: ${request.params._meta?.[RELATED_TASK_META_KEY]?.taskId}`);
console.log(`Task Creation Requested: ${request.params.task ? 'yes' : 'no'}`);
console.log('Requested Schema:');
console.log(JSON.stringify(request.params.requestedSchema, null, 2));
// Helper to return result, optionally creating a task if requested
const returnResult = async (result) => {
if (request.params.task && extra.taskStore) {
// Create a task and store the result
const task = await extra.taskStore.createTask({ ttl: extra.taskRequestedTtl });
await extra.taskStore.storeTaskResult(task.taskId, 'completed', result);
console.log(`📋 Created client-side task: ${task.taskId}`);
return { task };
}
return result;
};
const schema = request.params.requestedSchema;
const properties = schema.properties;
const required = schema.required || [];
// Set up AJV validator for the requested schema
const ajv = new Ajv();
const validate = ajv.compile(schema);
let attempts = 0;
const maxAttempts = 3;
while (attempts < maxAttempts) {
attempts++;
console.log(`\nPlease provide the following information (attempt ${attempts}/${maxAttempts}):`);
const content = {};
let inputCancelled = false;
// Collect input for each field
for (const [fieldName, fieldSchema] of Object.entries(properties)) {
const field = fieldSchema;
const isRequired = required.includes(fieldName);
let prompt = `${field.title || fieldName}`;
// Add helpful information to the prompt
if (field.description) {
prompt += ` (${field.description})`;
}
if (field.enum) {
prompt += ` [options: ${field.enum.join(', ')}]`;
}
if (field.type === 'number' || field.type === 'integer') {
if (field.minimum !== undefined && field.maximum !== undefined) {
prompt += ` [${field.minimum}-${field.maximum}]`;
}
else if (field.minimum !== undefined) {
prompt += ` [min: ${field.minimum}]`;
}
else if (field.maximum !== undefined) {
prompt += ` [max: ${field.maximum}]`;
}
}
if (field.type === 'string' && field.format) {
prompt += ` [format: ${field.format}]`;
}
if (isRequired) {
prompt += ' *required*';
}
if (field.default !== undefined) {
prompt += ` [default: ${field.default}]`;
}
prompt += ': ';
const answer = await new Promise(resolve => {
readline.question(prompt, input => {
resolve(input.trim());
});
});
// Check for cancellation
if (answer.toLowerCase() === 'cancel' || answer.toLowerCase() === 'c') {
inputCancelled = true;
break;
}
// Parse and validate the input
try {
if (answer === '' && field.default !== undefined) {
content[fieldName] = field.default;
}
else if (answer === '' && !isRequired) {
// Skip optional empty fields
continue;
}
else if (answer === '') {
throw new Error(`${fieldName} is required`);
}
else {
// Parse the value based on type
let parsedValue;
if (field.type === 'boolean') {
parsedValue = answer.toLowerCase() === 'true' || answer.toLowerCase() === 'yes' || answer === '1';
}
else if (field.type === 'number') {
parsedValue = parseFloat(answer);
if (isNaN(parsedValue)) {
throw new Error(`${fieldName} must be a valid number`);
}
}
else if (field.type === 'integer') {
parsedValue = parseInt(answer, 10);
if (isNaN(parsedValue)) {
throw new Error(`${fieldName} must be a valid integer`);
}
}
else if (field.enum) {
if (!field.enum.includes(answer)) {
throw new Error(`${fieldName} must be one of: ${field.enum.join(', ')}`);
}
parsedValue = answer;
}
else {
parsedValue = answer;
}
content[fieldName] = parsedValue;
}
}
catch (error) {
console.log(`❌ Error: ${error}`);
// Continue to next attempt
break;
}
}
if (inputCancelled) {
return returnResult({ action: 'cancel' });
}
// If we didn't complete all fields due to an error, try again
if (Object.keys(content).length !==
Object.keys(properties).filter(name => required.includes(name) || content[name] !== undefined).length) {
if (attempts < maxAttempts) {
console.log('Please try again...');
continue;
}
else {
console.log('Maximum attempts reached. Declining request.');
return returnResult({ action: 'decline' });
}
}
// Validate the complete object against the schema
const isValid = validate(content);
if (!isValid) {
console.log('❌ Validation errors:');
validate.errors?.forEach(error => {
console.log(` - ${error.instancePath || 'root'}: ${error.message}`);
});
if (attempts < maxAttempts) {
console.log('Please correct the errors and try again...');
continue;
}
else {
console.log('Maximum attempts reached. Declining request.');
return returnResult({ action: 'decline' });
}
}
// Show the collected data and ask for confirmation
console.log('\n✅ Collected data:');
console.log(JSON.stringify(content, null, 2));
const confirmAnswer = await new Promise(resolve => {
readline.question('\nSubmit this information? (yes/no/cancel): ', input => {
resolve(input.trim().toLowerCase());
});
});
switch (confirmAnswer) {
case 'yes':
case 'y': {
return returnResult({
action: 'accept',
content: content
});
}
case 'cancel':
case 'c': {
return returnResult({ action: 'cancel' });
}
case 'no':
case 'n': {
if (attempts < maxAttempts) {
console.log('Please re-enter the information...');
continue;
}
else {
return returnResult({ action: 'decline' });
}
break;
}
}
}
console.log('Maximum attempts reached. Declining request.');
return returnResult({ action: 'decline' });
});
transport = new StreamableHTTPClientTransport(new URL(serverUrl), {
sessionId: sessionId
});
// Set up notification handlers
client.setNotificationHandler(LoggingMessageNotificationSchema, notification => {
notificationCount++;
console.log(`\nNotification #${notificationCount}: ${notification.params.level} - ${notification.params.data}`);
// Re-display the prompt
process.stdout.write('> ');
});
client.setNotificationHandler(ResourceListChangedNotificationSchema, async (_) => {
console.log(`\nResource list changed notification received!`);
try {
if (!client) {
console.log('Client disconnected, cannot fetch resources');
return;
}
const resourcesResult = await client.request({
method: 'resources/list',
params: {}
}, ListResourcesResultSchema);
console.log('Available resources count:', resourcesResult.resources.length);
}
catch {
console.log('Failed to list resources after change notification');
}
// Re-display the prompt
process.stdout.write('> ');
});
// Connect the client
await client.connect(transport);
sessionId = transport.sessionId;
console.log('Transport created with session ID:', sessionId);
console.log('Connected to MCP server');
}
catch (error) {
console.error('Failed to connect:', error);
client = null;
transport = null;
}
}
async function disconnect() {
if (!client || !transport) {
console.log('Not connected.');
return;
}
try {
await transport.close();
console.log('Disconnected from MCP server');
client = null;
transport = null;
}
catch (error) {
console.error('Error disconnecting:', error);
}
}
async function terminateSession() {
if (!client || !transport) {
console.log('Not connected.');
return;
}
try {
console.log('Terminating session with ID:', transport.sessionId);
await transport.terminateSession();
console.log('Session terminated successfully');
// Check if sessionId was cleared after termination
if (!transport.sessionId) {
console.log('Session ID has been cleared');
sessionId = undefined;
// Also close the transport and clear client objects
await transport.close();
console.log('Transport closed after session termination');
client = null;
transport = null;
}
else {
console.log('Server responded with 405 Method Not Allowed (session termination not supported)');
console.log('Session ID is still active:', transport.sessionId);
}
}
catch (error) {
console.error('Error terminating session:', error);
}
}
async function reconnect() {
if (client) {
await disconnect();
}
await connect();
}
async function listTools() {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const toolsRequest = {
method: 'tools/list',
params: {}
};
const toolsResult = await client.request(toolsRequest, ListToolsResultSchema);
console.log('Available tools:');
if (toolsResult.tools.length === 0) {
console.log(' No tools available');
}
else {
for (const tool of toolsResult.tools) {
console.log(` - id: ${tool.name}, name: ${getDisplayName(tool)}, description: ${tool.description}`);
}
}
}
catch (error) {
console.log(`Tools not supported by this server (${error})`);
}
}
async function callTool(name, args) {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const request = {
method: 'tools/call',
params: {
name,
arguments: args
}
};
console.log(`Calling tool '${name}' with args:`, args);
const result = await client.request(request, CallToolResultSchema);
console.log('Tool result:');
const resourceLinks = [];
result.content.forEach(item => {
if (item.type === 'text') {
console.log(` ${item.text}`);
}
else if (item.type === 'resource_link') {
const resourceLink = item;
resourceLinks.push(resourceLink);
console.log(` 📁 Resource Link: ${resourceLink.name}`);
console.log(` URI: ${resourceLink.uri}`);
if (resourceLink.mimeType) {
console.log(` Type: ${resourceLink.mimeType}`);
}
if (resourceLink.description) {
console.log(` Description: ${resourceLink.description}`);
}
}
else if (item.type === 'resource') {
console.log(` [Embedded Resource: ${item.resource.uri}]`);
}
else if (item.type === 'image') {
console.log(` [Image: ${item.mimeType}]`);
}
else if (item.type === 'audio') {
console.log(` [Audio: ${item.mimeType}]`);
}
else {
console.log(` [Unknown content type]:`, item);
}
});
// Offer to read resource links
if (resourceLinks.length > 0) {
console.log(`\nFound ${resourceLinks.length} resource link(s). Use 'read-resource <uri>' to read their content.`);
}
}
catch (error) {
console.log(`Error calling tool ${name}: ${error}`);
}
}
async function callGreetTool(name) {
await callTool('greet', { name });
}
async function callMultiGreetTool(name) {
console.log('Calling multi-greet tool with notifications...');
await callTool('multi-greet', { name });
}
async function callCollectInfoTool(infoType) {
console.log(`Testing form elicitation with collect-user-info tool (${infoType})...`);
await callTool('collect-user-info', { infoType });
}
async function callCollectInfoWithTask(infoType) {
console.log(`\n🔄 Testing bidirectional task support with collect-user-info-task tool (${infoType})...`);
console.log('This will create a task on the server, which will elicit input and create a task on the client.\n');
await callToolTask('collect-user-info-task', { infoType });
}
async function startNotifications(interval, count) {
console.log(`Starting notification stream: interval=${interval}ms, count=${count || 'unlimited'}`);
await callTool('start-notification-stream', { interval, count });
}
async function runNotificationsToolWithResumability(interval, count) {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
console.log(`Starting notification stream with resumability: interval=${interval}ms, count=${count || 'unlimited'}`);
console.log(`Using resumption token: ${notificationsToolLastEventId || 'none'}`);
const request = {
method: 'tools/call',
params: {
name: 'start-notification-stream',
arguments: { interval, count }
}
};
const onLastEventIdUpdate = (event) => {
notificationsToolLastEventId = event;
console.log(`Updated resumption token: ${event}`);
};
const result = await client.request(request, CallToolResultSchema, {
resumptionToken: notificationsToolLastEventId,
onresumptiontoken: onLastEventIdUpdate
});
console.log('Tool result:');
result.content.forEach(item => {
if (item.type === 'text') {
console.log(` ${item.text}`);
}
else {
console.log(` ${item.type} content:`, item);
}
});
}
catch (error) {
console.log(`Error starting notification stream: ${error}`);
}
}
async function listPrompts() {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const promptsRequest = {
method: 'prompts/list',
params: {}
};
const promptsResult = await client.request(promptsRequest, ListPromptsResultSchema);
console.log('Available prompts:');
if (promptsResult.prompts.length === 0) {
console.log(' No prompts available');
}
else {
for (const prompt of promptsResult.prompts) {
console.log(` - id: ${prompt.name}, name: ${getDisplayName(prompt)}, description: ${prompt.description}`);
}
}
}
catch (error) {
console.log(`Prompts not supported by this server (${error})`);
}
}
async function getPrompt(name, args) {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const promptRequest = {
method: 'prompts/get',
params: {
name,
arguments: args
}
};
const promptResult = await client.request(promptRequest, GetPromptResultSchema);
console.log('Prompt template:');
promptResult.messages.forEach((msg, index) => {
console.log(` [${index + 1}] ${msg.role}: ${msg.content.type === 'text' ? msg.content.text : JSON.stringify(msg.content)}`);
});
}
catch (error) {
console.log(`Error getting prompt ${name}: ${error}`);
}
}
async function listResources() {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const resourcesRequest = {
method: 'resources/list',
params: {}
};
const resourcesResult = await client.request(resourcesRequest, ListResourcesResultSchema);
console.log('Available resources:');
if (resourcesResult.resources.length === 0) {
console.log(' No resources available');
}
else {
for (const resource of resourcesResult.resources) {
console.log(` - id: ${resource.name}, name: ${getDisplayName(resource)}, description: ${resource.uri}`);
}
}
}
catch (error) {
console.log(`Resources not supported by this server (${error})`);
}
}
async function readResource(uri) {
if (!client) {
console.log('Not connected to server.');
return;
}
try {
const request = {
method: 'resources/read',
params: { uri }
};
console.log(`Reading resource: ${uri}`);
const result = await client.request(request, ReadResourceResultSchema);
console.log('Resource contents:');
for (const content of result.contents) {
console.log(` URI: ${content.uri}`);
if (content.mimeType) {
console.log(` Type: ${content.mimeType}`);
}
if ('text' in content && typeof content.text === 'string') {
console.log(' Content:');
console.log(' ---');
console.log(content.text
.split('\n')
.map((line) => ' ' + line)
.join('\n'));
console.log(' ---');
}
else if ('blob' in content && typeof content.blob === 'string') {
console.log(` [Binary data: ${content.blob.length} bytes]`);
}
}
}
catch (error) {
console.log(`Error reading resource ${uri}: ${error}`);
}
}
async function callToolTask(name, args) {
if (!client) {
console.log('Not connected to server.');
return;
}
console.log(`Calling tool '${name}' with task-based execution...`);
console.log('Arguments:', args);
// Use task-based execution - call now, fetch later
// Using the experimental tasks API - WARNING: may change without notice
console.log('This will return immediately while processing continues in the background...');
try {
// Call the tool with task metadata using streaming API
const stream = client.experimental.tasks.callToolStream({
name,
arguments: args
}, CallToolResultSchema, {
task: {
ttl: 60000 // Keep results for 60 seconds
}
});
console.log('Waiting for task completion...');
let lastStatus = '';
for await (const message of stream) {
switch (message.type) {
case 'taskCreated':
console.log('Task created successfully with ID:', message.task.taskId);
break;
case 'taskStatus':
if (lastStatus !== message.task.status) {
console.log(` ${message.task.status}${message.task.statusMessage ? ` - ${message.task.statusMessage}` : ''}`);
}
lastStatus = message.task.status;
break;
case 'result':
console.log('Task completed!');
console.log('Tool result:');
message.result.content.forEach(item => {
if (item.type === 'text') {
console.log(` ${item.text}`);
}
});
break;
case 'error':
throw message.error;
}
}
}
catch (error) {
console.log(`Error with task-based execution: ${error}`);
}
}
async function cleanup() {
if (client && transport) {
try {
// First try to terminate the session gracefully
if (transport.sessionId) {
try {
console.log('Terminating session before exit...');
await transport.terminateSession();
console.log('Session terminated successfully');
}
catch (error) {
console.error('Error terminating session:', error);
}
}
// Then close the transport
await transport.close();
}
catch (error) {
console.error('Error closing transport:', error);
}
}
process.stdin.setRawMode(false);
readline.close();
console.log('\nGoodbye!');
process.exit(0);
}
// Set up raw mode for keyboard input to capture Escape key
process.stdin.setRawMode(true);
process.stdin.on('data', async (data) => {
// Check for Escape key (27)
if (data.length === 1 && data[0] === 27) {
console.log('\nESC key pressed. Disconnecting from server...');
// Abort current operation and disconnect from server
if (client && transport) {
await disconnect();
console.log('Disconnected. Press Enter to continue.');
}
else {
console.log('Not connected to server.');
}
// Re-display the prompt
process.stdout.write('> ');
}
});
// Handle Ctrl+C
process.on('SIGINT', async () => {
console.log('\nReceived SIGINT. Cleaning up...');
await cleanup();
});
// Start the interactive client
main().catch((error) => {
console.error('Error running MCP client:', error);
process.exit(1);
});
//# sourceMappingURL=simpleStreamableHttp.js.map
@@ -0,0 +1,22 @@
Copyright (c) 2013 Dominic Tarr
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,17 @@
import type { SourceMapOptions } from "./index";
import type { Token } from "./parser/tokenizer";
import type { RootTransformerResult } from "./transformers/RootTransformer";
export interface RawSourceMap {
version: number;
file: string;
sources: Array<string>;
sourceRoot?: string;
sourcesContent?: Array<string>;
mappings: string;
names: Array<string>;
}
/**
* Generate a source map indicating that each line maps directly to the original line,
* with the tokens in their new positions.
*/
export default function computeSourceMap({ code: generatedCode, mappings: rawMappings }: RootTransformerResult, filePath: string, options: SourceMapOptions, source: string, tokens: Array<Token>): RawSourceMap;
@@ -0,0 +1 @@
{"version":3,"file":"l33tTableToTrieNode.mjs","sources":["../../../../../../src/matcher/dictionary/variants/matching/unmunger/l33tTableToTrieNode.ts"],"sourcesContent":[null],"names":["l33tTable","triNode","Object","entries","forEach","letter","substitutions","substitution","addSub"],"mappings":"AAGA,0BAAe,CAACA,SAA2B,EAAEC,OAAiB,KAAI;AAChEC,EAAAA,MAAM,CAACC,OAAO,CAACH,SAAS,CAAC,CAACI,OAAO,CAAC,CAAC,CAACC,MAAM,EAAEC,aAAa,CAAC,KAAI;AAC5DA,IAAAA,aAAa,CAACF,OAAO,CAAEG,YAAY,IAAI;AACrCN,MAAAA,OAAO,CAACO,MAAM,CAACD,YAAY,EAAEF,MAAM,CAAC;AACtC,IAAA,CAAC,CAAC;AACJ,EAAA,CAAC,CAAC;AACF,EAAA,OAAOJ,OAAO;AAChB,CAAC;;;;"}
@@ -0,0 +1,183 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("@typescript-eslint/utils");
const tsutils = __importStar(require("ts-api-utils"));
const util_1 = require("../util");
var State;
(function (State) {
State[State["Unsafe"] = 1] = "Unsafe";
State[State["Safe"] = 2] = "Safe";
State[State["Chained"] = 3] = "Chained";
})(State || (State = {}));
exports.default = (0, util_1.createRule)({
name: 'no-unsafe-member-access',
meta: {
type: 'problem',
docs: {
description: 'Disallow member access on a value with type `any`',
recommended: 'recommended',
requiresTypeChecking: true,
},
messages: {
errorComputedMemberAccess: 'The type of computed name {{property}} cannot be resolved.',
errorMemberExpression: 'Unsafe member access {{property}} on a type that cannot be resolved.',
errorThisMemberExpression: [
'Unsafe member access {{property}}. The type of `this` cannot be resolved.',
'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.',
].join('\n'),
unsafeComputedMemberAccess: 'Computed name {{property}} resolves to an `any` value.',
unsafeMemberExpression: 'Unsafe member access {{property}} on an `any` value.',
unsafeThisMemberExpression: [
'Unsafe member access {{property}} on an `any` value. `this` is typed as `any`.',
'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.',
].join('\n'),
},
schema: [
{
type: 'object',
additionalProperties: false,
properties: {
allowOptionalChaining: {
type: 'boolean',
description: 'Whether to allow `?.` optional chains on `any` values.',
},
},
},
],
},
defaultOptions: [
{
allowOptionalChaining: false,
},
],
create(context, [{ allowOptionalChaining }]) {
const services = (0, util_1.getParserServices)(context);
const compilerOptions = services.program.getCompilerOptions();
const isNoImplicitThis = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'noImplicitThis');
const stateCache = new Map();
// Case notes:
// value?.outer.middle.inner
// The ChainExpression is a child of the root expression, and a parent of all the MemberExpressions.
// But the left-most expression is what we want to report on: the inner-most expressions.
// In fact, this is true even if the chain is on the inside!
// value.outer.middle?.inner;
// It was already true that every `object` (MemberExpression) has optional: boolean
function checkMemberExpression(node) {
if (allowOptionalChaining && node.optional) {
stateCache.set(node, State.Chained);
return State.Chained;
}
const cachedState = stateCache.get(node);
if (cachedState) {
return cachedState;
}
if (node.object.type === utils_1.AST_NODE_TYPES.MemberExpression) {
const objectState = checkMemberExpression(node.object);
if (objectState === State.Unsafe) {
// if the object is unsafe, we know this will be unsafe as well
// we don't need to report, as we have already reported on the inner member expr
stateCache.set(node, objectState);
return objectState;
}
}
const type = services.getTypeAtLocation(node.object);
const state = (0, util_1.isTypeAnyType)(type) ? State.Unsafe : State.Safe;
stateCache.set(node, state);
if (state === State.Unsafe) {
const propertyName = context.sourceCode.getText(node.property);
let messageId;
if (!isNoImplicitThis) {
// `this.foo` or `this.foo[bar]`
const thisExpression = (0, util_1.getThisExpression)(node);
if (thisExpression) {
const thisType = (0, util_1.getConstrainedTypeAtLocation)(services, thisExpression);
if ((0, util_1.isTypeAnyType)(thisType)) {
messageId = tsutils.isIntrinsicErrorType(thisType)
? 'errorThisMemberExpression'
: 'unsafeThisMemberExpression';
}
}
}
if (!messageId) {
messageId = tsutils.isIntrinsicErrorType(type)
? 'errorMemberExpression'
: 'unsafeMemberExpression';
}
context.report({
node: node.property,
messageId,
data: {
property: node.computed ? `[${propertyName}]` : `.${propertyName}`,
},
});
}
return state;
}
return {
// ignore MemberExpressions with ancestors of type `TSClassImplements` or `TSInterfaceHeritage`
'MemberExpression:not(TSClassImplements MemberExpression, TSInterfaceHeritage MemberExpression)': checkMemberExpression,
'MemberExpression[computed = true] > *.property'(node) {
if (allowOptionalChaining &&
node.parent.optional) {
return;
}
if (
// x[1]
node.type === utils_1.AST_NODE_TYPES.Literal ||
// x[1++] x[++x] etc
// FUN FACT - **all** update expressions return type number, regardless of the argument's type,
// because JS engines return NaN if there the argument is not a number.
node.type === utils_1.AST_NODE_TYPES.UpdateExpression) {
// perf optimizations - literals can obviously never be `any`
return;
}
const type = services.getTypeAtLocation(node);
if ((0, util_1.isTypeAnyType)(type)) {
const propertyName = context.sourceCode.getText(node);
context.report({
node,
messageId: tsutils.isIntrinsicErrorType(type)
? 'errorComputedMemberAccess'
: 'unsafeComputedMemberAccess',
data: {
property: `[${propertyName}]`,
},
});
}
},
};
},
});
@@ -0,0 +1 @@
{"version":3,"names":["TargetNames","exports","node","deno","chrome","opera","edge","firefox","safari","ie","ios","android","electron","samsung","rhino","opera_mobile"],"sources":["../src/options.ts"],"sourcesContent":["export const TargetNames = {\n node: \"node\",\n deno: \"deno\",\n chrome: \"chrome\",\n opera: \"opera\",\n edge: \"edge\",\n firefox: \"firefox\",\n safari: \"safari\",\n ie: \"ie\",\n ios: \"ios\",\n android: \"android\",\n electron: \"electron\",\n samsung: \"samsung\",\n rhino: \"rhino\",\n opera_mobile: \"opera_mobile\",\n};\n"],"mappings":";;;;;;AAAO,MAAMA,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG;EACzBE,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,MAAM;EACZC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,EAAE,EAAE,IAAI;EACRC,GAAG,EAAE,KAAK;EACVC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE,UAAU;EACpBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE,OAAO;EACdC,YAAY,EAAE;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1 @@
{"version":3,"names":["_isNativeReflectConstruct","result","Boolean","prototype","valueOf","call","Reflect","construct","_","exports","default"],"sources":["../../src/helpers/isNativeReflectConstruct.ts"],"sourcesContent":["/* @minVersion 7.9.0 */\n\nexport default function _isNativeReflectConstruct() {\n // Since Reflect.construct can't be properly polyfilled, some\n // implementations (e.g. core-js@2) don't set the correct internal slots.\n // Those polyfills don't allow us to subclass built-ins, so we need to\n // use our fallback implementation.\n try {\n // If the internal slots aren't set, this throws an error similar to\n // TypeError: this is not a Boolean object.\n var result = !Boolean.prototype.valueOf.call(\n Reflect.construct(Boolean, [], function () {}),\n );\n } catch (_) {}\n // @ts-expect-error assign to function\n return (_isNativeReflectConstruct = function () {\n return !!result;\n })();\n}\n"],"mappings":";;;;;;AAEe,SAASA,yBAAyBA,CAAA,EAAG;EAKlD,IAAI;IAGF,IAAIC,MAAM,GAAG,CAACC,OAAO,CAACC,SAAS,CAACC,OAAO,CAACC,IAAI,CAC1CC,OAAO,CAACC,SAAS,CAACL,OAAO,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC,CAC/C,CAAC;EACH,CAAC,CAAC,OAAOM,CAAC,EAAE,CAAC;EAEb,OAAO,CAAAC,OAAA,CAAAC,OAAA,GAACV,yBAAyB,GAAG,SAAAA,CAAA,EAAY;IAC9C,OAAO,CAAC,CAACC,MAAM;EACjB,CAAC,EAAE,CAAC;AACN","ignoreList":[]}
@@ -0,0 +1,22 @@
import { useRouter } from "./useRouter.js";
import { getElementScrollRestorationEntry, setupScrollRestoration } from "@tanstack/router-core";
//#region src/ScrollRestoration.tsx
function useScrollRestoration() {
setupScrollRestoration(useRouter(), true);
}
/**
* @deprecated Use the `scrollRestoration` router option instead.
*/
function ScrollRestoration(_props) {
useScrollRestoration();
if (process.env.NODE_ENV === "development") console.warn("The ScrollRestoration component is deprecated. Use createRouter's `scrollRestoration` option instead.");
return null;
}
function useElementScrollRestoration(options) {
useScrollRestoration();
return getElementScrollRestorationEntry(useRouter(), options);
}
//#endregion
export { ScrollRestoration, useElementScrollRestoration };
//# sourceMappingURL=ScrollRestoration.js.map
@@ -0,0 +1 @@
module.exports={C:{"78":0.12941,"120":0.41518,"121":0.97595,"136":0.01078,"140":0.01078,"147":0.01078,"150":0.01078,"153":0.0647,"154":0.0647,"155":0.2696,"156":0.12941,_:"2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 137 138 139 141 142 143 144 145 146 148 149 151 152 157 158 159 160 3.5 3.6"},D:{"49":0.01078,"65":0.01078,"75":0.02696,"81":0.03235,"83":0.03235,"92":0.14558,"103":0.08088,"104":0.07549,"105":0.08088,"106":0.10784,"107":0.07549,"108":0.16176,"109":0.19411,"110":0.05931,"111":0.0647,"112":0.12941,"116":0.2049,"117":0.09706,"118":2.3563,"119":0.90586,"120":1.15389,"122":0.01618,"124":0.11323,"126":0.0647,"128":0.09706,"129":0.05931,"131":0.31274,"132":0.19411,"133":0.22646,"134":0.01078,"135":0.03235,"136":0.09166,"137":0.02696,"138":0.15637,"139":0.01618,"140":0.01618,"141":0.01078,"142":0.09706,"143":0.01078,"144":0.91664,"145":0.01078,"146":0.29656,"147":0.01078,"148":0.0647,"149":0.31813,"150":0.70635,"151":24.81398,"152":4.82584,"153":2.78227,"154":0.64704,_:"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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 66 67 68 69 70 71 72 73 74 76 77 78 79 80 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 113 114 115 121 123 125 127 130 155 156 157"},F:{"46":0.01618,"100":0.0647,"131":0.01078,"134":0.28578,"135":0.69557,_:"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 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 132 133 9.5-9.6 10.0-10.1 10.5 10.6 11.1 11.5 11.6 12.1"},B:{"92":0.01618,"109":0.01078,"119":0.45832,"120":0.46371,"135":0.01078,"136":0.01618,"148":0.01618,"149":0.02696,"150":0.11323,"151":0.04314,"152":1.04066,"153":1.22938,"154":0.12941,_:"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 121 122 123 124 125 126 127 128 129 130 131 132 133 134 137 138 139 140 141 142 143 144 145 146 147"},E:{_:"4 5 6 7 8 9 10 11 12 13 14 15 27 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 16.5 16.6 17.0 17.1 17.2 17.3 17.4 17.5 18.0 18.2 18.4 18.5-18.7 26.0 26.1 26.2 26.3 26.4 26.5 27.1 27.2 TP","15.6":0.17254,"17.6":0.01078,"18.1":0.01078,"18.3":0.01078,"26.6":0.0647},G:{"8":0,"3.2":0,"4.0-4.1":0,"4.2-4.3":0.00022,"5.0-5.1":0.00022,"6.0-6.1":0,"7.0-7.1":0.00045,"8.1-8.4":0,"9.0-9.2":0,"9.3":0,"10.0-10.2":0,"10.3":0.00225,"11.0-11.2":0.00022,"11.3-11.4":0.00045,"12.0-12.1":0,"12.2-12.5":0.00585,"13.0-13.1":0,"13.2":0.00112,"13.3":0,"13.4-13.7":0.00022,"14.0-14.4":0.0009,"14.5-14.8":0.00135,"15.0-15.1":0.00135,"15.2-15.3":0.0009,"15.4":0.00112,"15.5":0.00135,"15.6-15.8":0.02923,"16.0":0.00225,"16.1":0.00405,"16.2":0.00225,"16.3":0.00495,"16.4":0.00112,"16.5":0.0018,"16.6-16.7":0.0407,"17.0":0.00157,"17.1":0.00225,"17.2":0.00225,"17.3":0.00337,"17.4":0.00472,"17.5":0.00922,"17.6-17.7":0.02384,"18.0":0.00495,"18.1":0.00989,"18.2":0.01349,"18.3":0.02339,"18.4":0.01462,"18.5-18.7":0.302,"26.0":0.01462,"26.1":0.01484,"26.2":0.03868,"26.3":0.04183,"26.4":0.03058,"26.5":0.20486,"26.6":1.264,"27.0":0.09692,"27.1":0,"27.2":0.00247},P:{"27":0.00946,"28":0.01892,"30":0.45401,_:"4 20 21 22 23 24 25 26 29 5.0-5.4 6.2-6.4 8.2 9.2 10.1 11.1-11.2 12.0 13.0 14.0 15.0 16.0 17.0 18.0 19.0","7.2-7.4":0.05675},I:{"0":0.06907,"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.00003},K:{"0":0.16128,_:"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":45.76339},R:{_:"0"},M:{"0":0.01843},Q:{_:"14.9"},O:{"0":0.7465},H:{all:0}};
@@ -0,0 +1,5 @@
"use strict";
function isLeapYear(year) {
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
}
exports.isLeapYear = isLeapYear;
@@ -0,0 +1,25 @@
{
"name": "@rollup/rollup-linux-x64-gnu",
"version": "4.60.4",
"os": [
"linux"
],
"cpu": [
"x64"
],
"files": [
"rollup.linux-x64-gnu.node"
],
"description": "Native bindings for Rollup",
"author": "Lukas Taegert-Atkinson",
"homepage": "https://rollupjs.org/",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/rollup/rollup.git"
},
"libc": [
"glibc"
],
"main": "./rollup.linux-x64-gnu.node"
}
@@ -0,0 +1,17 @@
'use strict';
var adjacencyGraphs$1 = require('./adjacencyGraphs.json.cjs');
var diceware = require('./diceware.json.cjs');
var passwords = require('./passwords.json.cjs');
// This file is auto generated by data-scripts/_helpers/runtime.ts
const dictionary = {
'diceware-common': diceware,
'passwords-common': passwords
};
// reinit the variable because the typescript compile will otherwise just reexport the json file which will break as it's a json file
const adjacencyGraphs = adjacencyGraphs$1;
exports.adjacencyGraphs = adjacencyGraphs;
exports.dictionary = dictionary;
//# sourceMappingURL=index.cjs.map
@@ -0,0 +1,120 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeHeaders = normalizeHeaders;
exports.createFetchWithInit = createFetchWithInit;
exports.isWithinOrigin = isWithinOrigin;
exports.followWithinOrigin = followWithinOrigin;
exports.fetchLeavingRedirects = fetchLeavingRedirects;
exports.fetchWithinOrigin = fetchWithinOrigin;
exports.unfollowedRedirect = unfollowedRedirect;
/**
* Normalizes HeadersInit to a plain Record<string, string> for manipulation.
* Handles Headers objects, arrays of tuples, and plain objects.
*/
function normalizeHeaders(headers) {
if (!headers)
return {};
if (headers instanceof Headers) {
return Object.fromEntries(headers.entries());
}
if (Array.isArray(headers)) {
return Object.fromEntries(headers);
}
return { ...headers };
}
/**
* Creates a fetch function that includes base RequestInit options.
* This ensures requests inherit settings like credentials, mode, headers, etc. from the base init.
*
* @param baseFetch - The base fetch function to wrap (defaults to global fetch)
* @param baseInit - The base RequestInit to merge with each request
* @returns A wrapped fetch function that merges base options with call-specific options
*/
function createFetchWithInit(baseFetch = fetch, baseInit) {
if (!baseInit) {
return baseFetch;
}
// Return a wrapped fetch that merges base RequestInit with call-specific init
return async (url, init) => {
const mergedInit = {
...baseInit,
...init,
// Headers need special handling - merge instead of replace
headers: init?.headers ? { ...normalizeHeaders(baseInit.headers), ...normalizeHeaders(init.headers) } : baseInit.headers
};
return baseFetch(url, mergedInit);
};
}
const MAX_REDIRECTS = 5;
const REDIRECT_STATUSES = [301, 302, 303, 307, 308];
/** @internal Whether `to` has the scheme, host and port of `from`, or is its https form with both on default ports. */
function isWithinOrigin(from, to) {
if (from.protocol === to.protocol && from.hostname === to.hostname && from.port === to.port) {
return true;
}
return from.hostname === to.hostname && from.protocol === 'http:' && from.port === '' && to.protocol === 'https:' && to.port === '';
}
function redirectTarget(response, requestUrl) {
const location = REDIRECT_STATUSES.includes(response.status) ? response.headers.get('location') : null;
try {
return location ? new URL(location, requestUrl) : undefined;
}
catch {
return undefined;
}
}
/** @internal Follows the redirect in `response` while it stays within the origin of `url`; undefined when `response` is to be used as is. */
function followWithinOrigin(baseFetch, url, init, response, followed = 0) {
const target = redirectTarget(response, url);
// 301, 302 and 303 turn a request with a body into a GET, so only 307 and 308 are followed for those.
const keepsMethod = response.status === 307 || response.status === 308 || (init?.method ?? 'GET').toUpperCase() === 'GET';
if (!target || followed === MAX_REDIRECTS || !keepsMethod) {
return undefined;
}
const from = new URL(url);
const addsUserinfo = (target.username || target.password) && (target.username !== from.username || target.password !== from.password);
if (addsUserinfo || !isWithinOrigin(from, target)) {
return undefined;
}
return Promise.resolve(response.body?.cancel())
.then(() => baseFetch(target, { ...init, redirect: 'manual' }))
.then(next => followWithinOrigin(baseFetch, target, init, next, followed + 1) ?? next);
}
const followingFetches = new WeakSet();
/** @internal Wraps a fetch for `redirectPolicy: 'follow'`: `fetchWithinOrigin` returns the result as it is, so redirects are left to the fetch. */
function fetchLeavingRedirects(baseFetch) {
const following = (url, init) => (baseFetch ?? fetch)(url, init);
followingFetches.add(following);
return following;
}
/** @internal Wraps a fetch so it follows a redirect only within the request's origin; any other redirect response is returned as is. */
function fetchWithinOrigin(baseFetch = fetch) {
if (followingFetches.has(baseFetch)) {
return baseFetch;
}
return (url, init) => {
if (init?.redirect === 'error' || init?.redirect === 'manual') {
return baseFetch(url, init);
}
// Browsers answer a manual redirect with an opaque response: it is returned and nothing is followed.
return Promise.resolve(baseFetch(url, { ...init, redirect: 'manual' })).then(response => followWithinOrigin(baseFetch, url, init, response) ?? response);
};
}
/** @internal Describes a redirect that `fetchWithinOrigin` returned unfollowed, naming its target without userinfo, query or fragment. */
function unfollowedRedirect(response, requestUrl) {
if (response.type === 'opaqueredirect') {
return 'Redirect not followed: this runtime does not expose the redirect target';
}
const from = response.url || requestUrl;
const target = redirectTarget(response, from);
if (!target) {
return undefined;
}
target.username = target.password = target.search = target.hash = '';
if (target.protocol === 'http:' && new URL(from).protocol === 'https:') {
target.protocol = 'https:';
return `Redirect to plain http not followed; try ${target.href} instead`;
}
return `Redirect to ${target.href} not followed`;
}
//# sourceMappingURL=transport.js.map
@@ -0,0 +1,168 @@
/**
* @fileoverview enforce `for` loop update clause moving the counter in the right direction.(for-direction)
* @author Aladdin-ADD<hh_2013@foxmail.com>
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const { getStaticValue } = require("@eslint-community/eslint-utils");
//------------------------------------------------------------------------------
// Rule Definition
//------------------------------------------------------------------------------
/** @type {import('../types').Rule.RuleModule} */
module.exports = {
meta: {
type: "problem",
docs: {
description:
"Enforce `for` loop update clause moving the counter in the right direction",
recommended: true,
url: "https://eslint.org/docs/latest/rules/for-direction",
},
fixable: null,
schema: [],
messages: {
incorrectDirection:
"The update clause in this loop moves the variable in the wrong direction.",
},
},
create(context) {
const { sourceCode } = context;
/**
* report an error.
* @param {ASTNode} node the node to report.
* @returns {void}
*/
function report(node) {
context.report({
loc: {
start: node.loc.start,
end: sourceCode.getTokenBefore(node.body).loc.end,
},
messageId: "incorrectDirection",
});
}
/**
* check the right side of the assignment
* @param {ASTNode} update UpdateExpression to check
* @param {number} dir expected direction that could either be turned around or invalidated
* @returns {number} return dir, the negated dir, or zero if the counter does not change or the direction is not clear
*/
function getRightDirection(update, dir) {
const staticValue = getStaticValue(
update.right,
sourceCode.getScope(update),
);
if (
staticValue &&
["bigint", "boolean", "number"].includes(
typeof staticValue.value,
)
) {
const sign = Math.sign(Number(staticValue.value)) || 0; // convert NaN to 0
return dir * sign;
}
return 0;
}
/**
* check UpdateExpression add/sub the counter
* @param {ASTNode} update UpdateExpression to check
* @param {string} counter variable name to check
* @returns {number} if add return 1, if sub return -1, if nochange, return 0
*/
function getUpdateDirection(update, counter) {
if (
update.argument.type === "Identifier" &&
update.argument.name === counter
) {
if (update.operator === "++") {
return 1;
}
if (update.operator === "--") {
return -1;
}
}
return 0;
}
/**
* check AssignmentExpression add/sub the counter
* @param {ASTNode} update AssignmentExpression to check
* @param {string} counter variable name to check
* @returns {number} if add return 1, if sub return -1, if nochange, return 0
*/
function getAssignmentDirection(update, counter) {
if (update.left.name === counter) {
if (update.operator === "+=") {
return getRightDirection(update, 1);
}
if (update.operator === "-=") {
return getRightDirection(update, -1);
}
}
return 0;
}
return {
ForStatement(node) {
if (
node.test &&
node.test.type === "BinaryExpression" &&
node.update
) {
for (const counterPosition of ["left", "right"]) {
if (node.test[counterPosition].type !== "Identifier") {
continue;
}
const counter = node.test[counterPosition].name;
const operator = node.test.operator;
const update = node.update;
let wrongDirection;
if (operator === "<" || operator === "<=") {
wrongDirection =
counterPosition === "left" ? -1 : 1;
} else if (operator === ">" || operator === ">=") {
wrongDirection =
counterPosition === "left" ? 1 : -1;
} else {
return;
}
if (update.type === "UpdateExpression") {
if (
getUpdateDirection(update, counter) ===
wrongDirection
) {
report(node);
}
} else if (
update.type === "AssignmentExpression" &&
getAssignmentDirection(update, counter) ===
wrongDirection
) {
report(node);
}
}
}
},
};
},
};
@@ -0,0 +1,722 @@
flf2a$ 7 7 13 -1 7 0 0 0
Font Author: ?
More Info:
https://web.archive.org/web/20120819044459/http://www.roysac.com/thedrawfonts-tdf.asp
FIGFont created with: http://patorjk.com/figlet-editor
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
██ @
██ @
██ @
@
██ @
@
@@
@
@
@
@
@
@
@@
██ ██ @
████████ @
██ ██ @
████████ @
██ ██ @
@
@@
▄▄███▄▄·@
██ @
███████ @
██ @
███████ @
▀▀▀ @
@@
██ ██ @
██ @
██ @
██ @
██ ██ @
@
@@
██ @
██ @
████████ @
██ ██ @
██████ @
@
@@
@
@
@
@
@
@
@@
██ @
██ @
██ @
██ @
██ @
@
@@
██ @
██ @
██ @
██ @
██ @
@
@@
@
▄ ██ ▄@
████ @
▀ ██ ▀@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
▄█ @
@
@@
@
@
█████ @
@
@
@
@@
@
@
@
@
██ @
@
@@
██ @
██ @
██ @
██ @
██ @
@
@@
██████ @
██ ████ @
██ ██ ██ @
████ ██ @
██████ @
@
@@
██ @
███ @
██ @
██ @
██ @
@
@@
██████ @
██ @
█████ @
██ @
███████ @
@
@@
██████ @
██ @
█████ @
██ @
██████ @
@
@@
██ ██ @
██ ██ @
███████ @
██ @
██ @
@
@@
███████ @
██ @
███████ @
██ @
███████ @
@
@@
██████ @
██ @
███████ @
██ ██ @
██████ @
@
@@
███████ @
██ @
██ @
██ @
██ @
@
@@
█████ @
██ ██ @
█████ @
██ ██ @
█████ @
@
@@
█████ @
██ ██ @
██████ @
██ @
█████ @
@
@@
@
██ @
@
██ @
@
@
@@
@
██ @
@
▄█ @
▀ @
@
@@
██ @
██ @
██ @
██ @
██ @
@
@@
@
@
@
@
@
@
@@
██ @
██ @
██ @
██ @
██ @
@
@@
██████ @
██ @
▄███ @
▀▀ @
██ @
@
@@
██████ @
██ ██ @
██ ██ ██ @
██ ██ ██ @
█ ████ @
@
@@
█████ @
██ ██ @
███████ @
██ ██ @
██ ██ @
@
@@
██████ @
██ ██ @
██████ @
██ ██ @
██████ @
@
@@
██████ @
██ @
██ @
██ @
██████ @
@
@@
██████ @
██ ██ @
██ ██ @
██ ██ @
██████ @
@
@@
███████ @
██ @
█████ @
██ @
███████ @
@
@@
███████ @
██ @
█████ @
██ @
██ @
@
@@
██████ @
██ @
██ ███ @
██ ██ @
██████ @
@
@@
██ ██ @
██ ██ @
███████ @
██ ██ @
██ ██ @
@
@@
██ @
██ @
██ @
██ @
██ @
@
@@
██ @
██ @
██ @
██ ██ @
█████ @
@
@@
██ ██ @
██ ██ @
█████ @
██ ██ @
██ ██ @
@
@@
██ @
██ @
██ @
██ @
███████ @
@
@@
███ ███ @
████ ████ @
██ ████ ██ @
██ ██ ██ @
██ ██ @
@
@@
███ ██ @
████ ██ @
██ ██ ██ @
██ ██ ██ @
██ ████ @
@
@@
██████ @
██ ██ @
██ ██ @
██ ██ @
██████ @
@
@@
██████ @
██ ██ @
██████ @
██ @
██ @
@
@@
██████ @
██ ██ @
██ ██ @
██ ▄▄ ██ @
██████ @
▀▀ @
@@
██████ @
██ ██ @
██████ @
██ ██ @
██ ██ @
@
@@
███████ @
██ @
███████ @
██ @
███████ @
@
@@
████████ @
██ @
██ @
██ @
██ @
@
@@
██ ██ @
██ ██ @
██ ██ @
██ ██ @
██████ @
@
@@
██ ██ @
██ ██ @
██ ██ @
██ ██ @
████ @
@
@@
██ ██ @
██ ██ @
██ █ ██ @
██ ███ ██ @
███ ███ @
@
@@
██ ██ @
██ ██ @
███ @
██ ██ @
██ ██ @
@
@@
██ ██ @
██ ██ @
████ @
██ @
██ @
@
@@
███████ @
███ @
███ @
███ @
███████ @
@
@@
███ @
██ @
██ @
██ @
███ @
@
@@
@
@
@
@
@
@
@@
███ @
██ @
██ @
██ @
███ @
@
@@
███ @
██ ██ @
@
@
@
@
@@
@
@
@
@
███████ @
@
@@
@
@
@
@
@
@
@@
█████ @
██ ██ @
███████ @
██ ██ @
██ ██ @
@
@@
██████ @
██ ██ @
██████ @
██ ██ @
██████ @
@
@@
██████ @
██ @
██ @
██ @
██████ @
@
@@
██████ @
██ ██ @
██ ██ @
██ ██ @
██████ @
@
@@
███████ @
██ @
█████ @
██ @
███████ @
@
@@
███████ @
██ @
█████ @
██ @
██ @
@
@@
██████ @
██ @
██ ███ @
██ ██ @
██████ @
@
@@
██ ██ @
██ ██ @
███████ @
██ ██ @
██ ██ @
@
@@
██ @
██ @
██ @
██ @
██ @
@
@@
██ @
██ @
██ @
██ ██ @
█████ @
@
@@
██ ██ @
██ ██ @
█████ @
██ ██ @
██ ██ @
@
@@
██ @
██ @
██ @
██ @
███████ @
@
@@
███ ███ @
████ ████ @
██ ████ ██ @
██ ██ ██ @
██ ██ @
@
@@
███ ██ @
████ ██ @
██ ██ ██ @
██ ██ ██ @
██ ████ @
@
@@
██████ @
██ ██ @
██ ██ @
██ ██ @
██████ @
@
@@
██████ @
██ ██ @
██████ @
██ @
██ @
@
@@
██████ @
██ ██ @
██ ██ @
██ ▄▄ ██ @
██████ @
▀▀ @
@@
██████ @
██ ██ @
██████ @
██ ██ @
██ ██ @
@
@@
███████ @
██ @
███████ @
██ @
███████ @
@
@@
████████ @
██ @
██ @
██ @
██ @
@
@@
██ ██ @
██ ██ @
██ ██ @
██ ██ @
██████ @
@
@@
██ ██ @
██ ██ @
██ ██ @
██ ██ @
████ @
@
@@
██ ██ @
██ ██ @
██ █ ██ @
██ ███ ██ @
███ ███ @
@
@@
██ ██ @
██ ██ @
███ @
██ ██ @
██ ██ @
@
@@
██ ██ @
██ ██ @
████ @
██ @
██ @
@
@@
███████ @
███ @
███ @
███ @
███████ @
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@
@
@
@
@
@
@@
@@ -0,0 +1 @@
module.exports={A:{A:{"1":"_A","2":"_Z"},B:{"1":"_J"},C:{"1":"_5J","2":"_KM"},D:{"1":"_4G","2":"_qG"},E:{"1":"_pB","2":"_qB"},F:{"1":"_a","2":"_T"},G:{"1":"_AB","2":"_XB"},H:{"2":"1D"},I:{"1":"_X","2":"_W"},J:{"2":"_B"},K:{"1":"H","2":"_D"},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:2,C:"User Timing API",D:true};
@@ -0,0 +1,13 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TSEnumMemberDefinition = void 0;
const DefinitionBase_1 = require("./DefinitionBase");
const DefinitionType_1 = require("./DefinitionType");
class TSEnumMemberDefinition extends DefinitionBase_1.DefinitionBase {
isTypeDefinition = true;
isVariableDefinition = true;
constructor(name, node) {
super(DefinitionType_1.DefinitionType.TSEnumMember, name, node, null);
}
}
exports.TSEnumMemberDefinition = TSEnumMemberDefinition;
@@ -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 AppWindow = createLucideIcon("AppWindow", [
["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }],
["path", { d: "M10 4v4", key: "pp8u80" }],
["path", { d: "M2 8h20", key: "d11cs7" }],
["path", { d: "M6 4v4", key: "1svtjw" }]
]);
export { AppWindow as default };
//# sourceMappingURL=app-window.js.map
@@ -0,0 +1,19 @@
'use strict'
const RetryHandler = require('../handler/retry-handler')
module.exports = globalOpts => {
return dispatch => {
return function retryInterceptor (opts, handler) {
return dispatch(
opts,
new RetryHandler(
{ ...opts, retryOptions: { ...globalOpts, ...opts.retryOptions } },
{
handler,
dispatch
}
)
)
}
}
}
@@ -0,0 +1,23 @@
/**
* @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 Keyboard = createLucideIcon("Keyboard", [
["path", { d: "M10 8h.01", key: "1r9ogq" }],
["path", { d: "M12 12h.01", key: "1mp3jc" }],
["path", { d: "M14 8h.01", key: "1primd" }],
["path", { d: "M16 12h.01", key: "1l6xoz" }],
["path", { d: "M18 8h.01", key: "emo2bl" }],
["path", { d: "M6 8h.01", key: "x9i8wu" }],
["path", { d: "M7 16h10", key: "wp8him" }],
["path", { d: "M8 12h.01", key: "czm47f" }],
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }]
]);
export { Keyboard as default };
//# sourceMappingURL=keyboard.js.map
@@ -0,0 +1 @@
{"version":3,"file":"graduation-cap.js","sources":["../../../src/icons/graduation-cap.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name GraduationCap\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMjEuNDIgMTAuOTIyYTEgMSAwIDAgMC0uMDE5LTEuODM4TDEyLjgzIDUuMThhMiAyIDAgMCAwLTEuNjYgMEwyLjYgOS4wOGExIDEgMCAwIDAgMCAxLjgzMmw4LjU3IDMuOTA4YTIgMiAwIDAgMCAxLjY2IDB6IiAvPgogIDxwYXRoIGQ9Ik0yMiAxMHY2IiAvPgogIDxwYXRoIGQ9Ik02IDEyLjVWMTZhNiAzIDAgMCAwIDEyIDB2LTMuNSIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/graduation-cap\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 GraduationCap = createLucideIcon('GraduationCap', [\n [\n 'path',\n {\n d: 'M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z',\n key: 'j76jl0',\n },\n ],\n ['path', { d: 'M22 10v6', key: '1lu8f3' }],\n ['path', { d: 'M6 12.5V16a6 3 0 0 0 12 0v-3.5', key: '1r8lef' }],\n]);\n\nexport default GraduationCap;\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,CAAgB,iBAAiB,eAAiB,CAAA,CAAA,CAAA;AAAA,CACtD,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,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,CAAkC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACjE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,90 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.zodToJsonSchema = void 0;
const parseDef_js_1 = require("./parseDef.js");
const Refs_js_1 = require("./Refs.js");
const any_js_1 = require("./parsers/any.js");
const zodToJsonSchema = (schema, options) => {
const refs = (0, Refs_js_1.getRefs)(options);
let definitions = typeof options === "object" && options.definitions
? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({
...acc,
[name]: (0, parseDef_js_1.parseDef)(schema._def, {
...refs,
currentPath: [...refs.basePath, refs.definitionPath, name],
}, true) ?? (0, any_js_1.parseAnyDef)(refs),
}), {})
: undefined;
const name = typeof options === "string"
? options
: options?.nameStrategy === "title"
? undefined
: options?.name;
const main = (0, parseDef_js_1.parseDef)(schema._def, name === undefined
? refs
: {
...refs,
currentPath: [...refs.basePath, refs.definitionPath, name],
}, false) ?? (0, any_js_1.parseAnyDef)(refs);
const title = typeof options === "object" &&
options.name !== undefined &&
options.nameStrategy === "title"
? options.name
: undefined;
if (title !== undefined) {
main.title = title;
}
if (refs.flags.hasReferencedOpenAiAnyType) {
if (!definitions) {
definitions = {};
}
if (!definitions[refs.openAiAnyTypeName]) {
definitions[refs.openAiAnyTypeName] = {
// Skipping "object" as no properties can be defined and additionalProperties must be "false"
type: ["string", "number", "integer", "boolean", "array", "null"],
items: {
$ref: refs.$refStrategy === "relative"
? "1"
: [
...refs.basePath,
refs.definitionPath,
refs.openAiAnyTypeName,
].join("/"),
},
};
}
}
const combined = name === undefined
? definitions
? {
...main,
[refs.definitionPath]: definitions,
}
: main
: {
$ref: [
...(refs.$refStrategy === "relative" ? [] : refs.basePath),
refs.definitionPath,
name,
].join("/"),
[refs.definitionPath]: {
...definitions,
[name]: main,
},
};
if (refs.target === "jsonSchema7") {
combined.$schema = "http://json-schema.org/draft-07/schema#";
}
else if (refs.target === "jsonSchema2019-09" || refs.target === "openAi") {
combined.$schema = "https://json-schema.org/draft/2019-09/schema#";
}
if (refs.target === "openAi" &&
("anyOf" in combined ||
"oneOf" in combined ||
"allOf" in combined ||
("type" in combined && Array.isArray(combined.type)))) {
console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.");
}
return combined;
};
exports.zodToJsonSchema = zodToJsonSchema;
@@ -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 Captions = createLucideIcon("Captions", [
["rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2", key: "12ruh7" }],
["path", { d: "M7 15h4M15 15h2M7 11h2M13 11h4", key: "1ueiar" }]
]);
export { Captions as default };
//# sourceMappingURL=captions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"useBlocker.js","names":[],"sources":["../../src/useBlocker.tsx"],"sourcesContent":["'use client'\n\nimport * as React from 'react'\nimport { useRouter } from './useRouter'\nimport type {\n BlockerFnArgs,\n HistoryAction,\n HistoryLocation,\n} from '@tanstack/history'\nimport type {\n AnyRoute,\n AnyRouter,\n ParseRoute,\n RegisteredRouter,\n} from '@tanstack/router-core'\n\ntype ShouldBlockFnLocation<\n out TRouteId,\n out TFullPath,\n out TAllParams,\n out TFullSearchSchema,\n> = {\n routeId: TRouteId\n fullPath: TFullPath\n pathname: string\n params: TAllParams\n search: TFullSearchSchema\n}\n\ntype AnyShouldBlockFnLocation = ShouldBlockFnLocation<any, any, any, any>\ntype MakeShouldBlockFnLocationUnion<\n TRouter extends AnyRouter = RegisteredRouter,\n TRoute extends AnyRoute = ParseRoute<TRouter['routeTree']>,\n> = TRoute extends any\n ? ShouldBlockFnLocation<\n TRoute['id'],\n TRoute['fullPath'],\n TRoute['types']['allParams'],\n TRoute['types']['fullSearchSchema']\n >\n : never\n\ntype BlockerResolver<TRouter extends AnyRouter = RegisteredRouter> =\n | {\n status: 'blocked'\n current: MakeShouldBlockFnLocationUnion<TRouter>\n next: MakeShouldBlockFnLocationUnion<TRouter>\n action: HistoryAction\n proceed: () => void\n reset: () => void\n }\n | {\n status: 'idle'\n current: undefined\n next: undefined\n action: undefined\n proceed: undefined\n reset: undefined\n }\n\ntype ShouldBlockFnArgs<TRouter extends AnyRouter = RegisteredRouter> = {\n current: MakeShouldBlockFnLocationUnion<TRouter>\n next: MakeShouldBlockFnLocationUnion<TRouter>\n action: HistoryAction\n}\n\nexport type ShouldBlockFn<TRouter extends AnyRouter = RegisteredRouter> = (\n args: ShouldBlockFnArgs<TRouter>,\n) => boolean | Promise<boolean>\nexport type UseBlockerOpts<\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = boolean,\n> = {\n shouldBlockFn: ShouldBlockFn<TRouter>\n enableBeforeUnload?: boolean | (() => boolean)\n disabled?: boolean\n withResolver?: TWithResolver\n}\n\ntype LegacyBlockerFn = () => Promise<any> | any\ntype LegacyBlockerOpts = {\n blockerFn?: LegacyBlockerFn\n condition?: boolean | any\n}\n\nfunction _resolveBlockerOpts(\n opts?: UseBlockerOpts | LegacyBlockerOpts | LegacyBlockerFn,\n condition?: boolean | any,\n): UseBlockerOpts {\n if (opts === undefined) {\n return {\n shouldBlockFn: () => true,\n withResolver: false,\n }\n }\n\n if ('shouldBlockFn' in opts) {\n return opts\n }\n\n if (typeof opts === 'function') {\n const shouldBlock = Boolean(condition ?? true)\n\n const _customBlockerFn = async () => {\n if (shouldBlock) return await opts()\n return false\n }\n\n return {\n shouldBlockFn: _customBlockerFn,\n enableBeforeUnload: shouldBlock,\n withResolver: false,\n }\n }\n\n const shouldBlock = Boolean(opts.condition ?? true)\n const fn = opts.blockerFn\n\n const _customBlockerFn = async () => {\n if (shouldBlock && fn !== undefined) {\n return await fn()\n }\n return shouldBlock\n }\n\n return {\n shouldBlockFn: _customBlockerFn,\n enableBeforeUnload: shouldBlock,\n withResolver: fn === undefined,\n }\n}\n\nexport function useBlocker<\n TRouter extends AnyRouter = RegisteredRouter,\n TWithResolver extends boolean = false,\n>(\n opts: UseBlockerOpts<TRouter, TWithResolver>,\n): TWithResolver extends true ? BlockerResolver<TRouter> : void\n\n/**\n * @deprecated Use the shouldBlockFn property instead\n */\nexport function useBlocker(blockerFnOrOpts?: LegacyBlockerOpts): BlockerResolver\n\n/**\n * @deprecated Use the UseBlockerOpts object syntax instead\n */\nexport function useBlocker(\n blockerFn?: LegacyBlockerFn,\n condition?: boolean | any,\n): BlockerResolver\n\nexport function useBlocker(\n opts?: UseBlockerOpts | LegacyBlockerOpts | LegacyBlockerFn,\n condition?: boolean | any,\n): BlockerResolver | void {\n const {\n shouldBlockFn,\n enableBeforeUnload = true,\n disabled = false,\n withResolver = false,\n } = _resolveBlockerOpts(opts, condition)\n\n const router = useRouter()\n const { history } = router\n\n const [resolver, setResolver] = React.useState<BlockerResolver>({\n status: 'idle',\n current: undefined,\n next: undefined,\n action: undefined,\n proceed: undefined,\n reset: undefined,\n })\n\n React.useEffect(() => {\n const blockerFnComposed = async (blockerFnArgs: BlockerFnArgs) => {\n function getLocation(\n location: HistoryLocation,\n ): AnyShouldBlockFnLocation {\n const parsedLocation = router.parseLocation(location)\n const matchedRoutes = router.getMatchedRoutes(parsedLocation.pathname)\n if (matchedRoutes.foundRoute === undefined) {\n return {\n routeId: '__notFound__',\n fullPath: parsedLocation.pathLine truncated
@@ -0,0 +1,40 @@
import { defaultSerializeError } from "./router.js";
//#region src/defer.ts
/**
* Well-known symbol used by {@link defer} to tag a promise with
* its deferred state. Consumers can read `promise[TSR_DEFERRED_PROMISE]`
* to access `status`, `data`, or `error`.
*/
const TSR_DEFERRED_PROMISE = Symbol.for("TSR_DEFERRED_PROMISE");
/**
* Wrap a promise with a deferred state for use with `<Await>` and `useAwaited`.
*
* The returned promise is augmented with internal state (status/data/error)
* so UI can read progress or suspend until it settles.
*
* @param _promise The promise to wrap.
* @param options Optional config. Provide `serializeError` to customize how
* errors are serialized for transfer.
* @returns The same promise with attached deferred metadata.
* @link https://tanstack.com/router/latest/docs/framework/react/api/router/deferFunction
*/
function defer(_promise, options) {
const promise = _promise;
if (promise[TSR_DEFERRED_PROMISE]) return promise;
promise[TSR_DEFERRED_PROMISE] = { status: "pending" };
promise.then((data) => {
promise[TSR_DEFERRED_PROMISE].status = "success";
promise[TSR_DEFERRED_PROMISE].data = data;
}).catch((error) => {
promise[TSR_DEFERRED_PROMISE].status = "error";
promise[TSR_DEFERRED_PROMISE].error = {
data: (options?.serializeError ?? defaultSerializeError)(error),
__isServerError: true
};
});
return promise;
}
//#endregion
export { TSR_DEFERRED_PROMISE, defer };
//# sourceMappingURL=defer.js.map
@@ -0,0 +1,195 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TokenMap = void 0;
var _t = require("@babel/types");
const {
traverseFast,
VISITOR_KEYS
} = _t;
class TokenMap {
constructor(ast, tokens, source) {
this._tokens = void 0;
this._source = void 0;
this._nodesToTokenIndexes = new Map();
this._nodesOccurrencesCountCache = new Map();
this._tokensCache = new Map();
this._tokens = tokens;
this._source = source;
traverseFast(ast, node => {
const indexes = this._getTokensIndexesOfNode(node);
if (indexes.length > 0) this._nodesToTokenIndexes.set(node, indexes);
});
this._tokensCache.clear();
}
has(node) {
return this._nodesToTokenIndexes.has(node);
}
getIndexes(node) {
return this._nodesToTokenIndexes.get(node);
}
find(node, condition) {
const indexes = this._nodesToTokenIndexes.get(node);
if (indexes) {
for (let k = 0; k < indexes.length; k++) {
const index = indexes[k];
const tok = this._tokens[index];
if (condition(tok, index)) return tok;
}
}
return null;
}
findLastIndex(node, condition) {
const indexes = this._nodesToTokenIndexes.get(node);
if (indexes) {
for (let k = indexes.length - 1; k >= 0; k--) {
const index = indexes[k];
const tok = this._tokens[index];
if (condition(tok, index)) return index;
}
}
return -1;
}
findMatching(node, test, occurrenceCount = 0) {
const indexes = this._nodesToTokenIndexes.get(node);
if (indexes) {
if (typeof test === "number") {
test = String.fromCharCode(test);
}
let i = 0;
const count = occurrenceCount;
if (count > 1) {
const cache = this._nodesOccurrencesCountCache.get(node);
if ((cache == null ? void 0 : cache.test) === test && cache.count < count) {
i = cache.i + 1;
occurrenceCount -= cache.count + 1;
}
}
for (; i < indexes.length; i++) {
const tok = this._tokens[indexes[i]];
if (this.matchesOriginal(tok, test)) {
if (occurrenceCount === 0) {
if (count > 0) {
this._nodesOccurrencesCountCache.set(node, {
test,
count,
i
});
}
return tok;
}
occurrenceCount--;
}
}
}
return null;
}
matchesOriginal(token, test) {
if (token.end - token.start !== test.length) return false;
if (token.value != null) return token.value === test;
return this._source.startsWith(test, token.start);
}
startMatches(node, test) {
const indexes = this._nodesToTokenIndexes.get(node);
if (!indexes) return false;
const tok = this._tokens[indexes[0]];
if (tok.start !== node.start) return false;
return this.matchesOriginal(tok, test);
}
endMatches(node, test) {
const indexes = this._nodesToTokenIndexes.get(node);
if (!indexes) return false;
const tok = this._tokens[indexes[indexes.length - 1]];
if (tok.end !== node.end) return false;
return this.matchesOriginal(tok, test);
}
_getTokensIndexesOfNode(node) {
var _node$declaration;
if (node.start == null || node.end == null) return [];
const {
first,
last
} = this._findTokensOfNode(node, 0, this._tokens.length - 1);
let low = first;
const children = childrenIterator(node);
if ((node.type === "ExportNamedDeclaration" || node.type === "ExportDefaultDeclaration") && ((_node$declaration = node.declaration) == null ? void 0 : _node$declaration.type) === "ClassDeclaration") {
children.next();
}
const indexes = [];
for (const child of children) {
if (child == null) continue;
if (child.start == null || child.end == null) continue;
const childTok = this._findTokensOfNode(child, low, last);
const high = childTok.first;
for (let k = low; k < high; k++) indexes.push(k);
low = childTok.last + 1;
}
for (let k = low; k <= last; k++) indexes.push(k);
return indexes;
}
_findTokensOfNode(node, low, high) {
const cached = this._tokensCache.get(node);
if (cached) return cached;
const first = this._findFirstTokenOfNode(node.start, low, high);
const last = this._findLastTokenOfNode(node.end, first, high);
this._tokensCache.set(node, {
first,
last
});
return {
first,
last
};
}
_findFirstTokenOfNode(start, low, high) {
while (low <= high) {
const mid = high + low >> 1;
if (start < this._tokens[mid].start) {
high = mid - 1;
} else if (start > this._tokens[mid].start) {
low = mid + 1;
} else {
return mid;
}
}
return low;
}
_findLastTokenOfNode(end, low, high) {
while (low <= high) {
const mid = high + low >> 1;
if (end < this._tokens[mid].end) {
high = mid - 1;
} else if (end > this._tokens[mid].end) {
low = mid + 1;
} else {
return mid;
}
}
return high;
}
}
exports.TokenMap = TokenMap;
function* childrenIterator(node) {
if (node.type === "TemplateLiteral") {
yield node.quasis[0];
for (let i = 1; i < node.quasis.length; i++) {
yield node.expressions[i - 1];
yield node.quasis[i];
}
return;
}
const keys = VISITOR_KEYS[node.type];
for (const key of keys) {
const child = node[key];
if (!child) continue;
if (Array.isArray(child)) {
yield* child;
} else {
yield child;
}
}
}
//# sourceMappingURL=token-map.js.map
@@ -0,0 +1 @@
{"version":3,"file":"braces.js","sources":["../../../src/icons/braces.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Braces\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNOCAzSDdhMiAyIDAgMCAwLTIgMnY1YTIgMiAwIDAgMS0yIDIgMiAyIDAgMCAxIDIgMnY1YzAgMS4xLjkgMiAyIDJoMSIgLz4KICA8cGF0aCBkPSJNMTYgMjFoMWEyIDIgMCAwIDAgMi0ydi01YzAtMS4xLjktMiAyLTJhMiAyIDAgMCAxLTItMlY1YTIgMiAwIDAgMC0yLTJoLTEiIC8+Cjwvc3ZnPgo=) - https://lucide.dev/icons/braces\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 Braces = createLucideIcon('Braces', [\n [\n 'path',\n { d: 'M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1', key: 'ezmyqa' },\n ],\n [\n 'path',\n {\n d: 'M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1',\n key: 'e1hn23',\n },\n ],\n]);\n\nexport default Braces;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,iBAAiB,QAAU,CAAA,CAAA,CAAA;AAAA,CACxC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwE,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,QAAS,CAAA,CAAA;AAAA,CAC7F,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA;AACF,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1 @@
{"version":3,"file":"annoyed.js","sources":["../../../src/icons/annoyed.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Annoyed\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgLz4KICA8cGF0aCBkPSJNOCAxNWg4IiAvPgogIDxwYXRoIGQ9Ik04IDloMiIgLz4KICA8cGF0aCBkPSJNMTQgOWgyIiAvPgo8L3N2Zz4K) - https://lucide.dev/icons/annoyed\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 Annoyed = createLucideIcon('Annoyed', [\n ['circle', { cx: '12', cy: '12', r: '10', key: '1mglay' }],\n ['path', { d: 'M8 15h8', key: '45n4r' }],\n ['path', { d: 'M8 9h2', key: '1g203m' }],\n ['path', { d: 'M14 9h2', key: '116p9w' }],\n]);\n\nexport default Annoyed;\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,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,CAAA,CAAA;AAAA,CAAA,CACzD,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,SAAS,CAAA,CAAA;AAAA,CAAA,CACvC,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,CAAA;AAAA,CAAA,CACvC,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,142 @@
'use strict';
const SECOND = 1;
const MINUTE = SECOND * 60;
const HOUR = MINUTE * 60;
const DAY = HOUR * 24;
const MONTH = DAY * 31;
const YEAR = MONTH * 12;
const CENTURY = YEAR * 100;
const times = {
second: SECOND,
minute: MINUTE,
hour: HOUR,
day: DAY,
month: MONTH,
year: YEAR,
century: CENTURY
};
const timeEstimationValuesDefaults = {
scoring: {
0: 1e3,
1: 1e6,
2: 1e8,
3: 1e10
},
attackTime: {
onlineThrottlingXPerHour: 100,
onlineNoThrottlingXPerSecond: 10,
offlineSlowHashingXPerSecond: 1e4,
offlineFastHashingXPerSecond: 1e10
}
};
const checkTimeEstimationValues = timeEstimationValues => {
Object.entries(timeEstimationValues).forEach(([key, data]) => {
Object.entries(data).forEach(([subKey, value]) => {
// @ts-expect-error for testing purposes
if (value < timeEstimationValuesDefaults[key][subKey]) {
throw new Error('Time estimation values are not to be allowed to be less than default');
}
});
});
};
/*
* -------------------------------------------------------------------------------
* Estimates time for an attacker ---------------------------------------------------------------
* -------------------------------------------------------------------------------
*/
class TimeEstimates {
constructor(options) {
this.options = options;
}
estimateAttackTimes(guesses) {
const crackTimesSeconds = this.calculateCrackTimesSeconds(guesses);
const crackTimes = {};
Object.keys(crackTimesSeconds).forEach(crackTime => {
const usedScenario = crackTime;
const seconds = crackTimesSeconds[usedScenario];
const {
base,
displayStr
} = this.displayTime(seconds);
crackTimes[usedScenario] = {
base,
seconds,
display: this.translate(displayStr, base)
};
});
return {
crackTimes,
score: this.guessesToScore(guesses)
};
}
calculateCrackTimesSeconds(guesses) {
const attackTimesOptions = this.options.timeEstimationValues.attackTime;
return {
onlineThrottlingXPerHour: guesses / (attackTimesOptions.onlineThrottlingXPerHour / 3600),
onlineNoThrottlingXPerSecond: guesses / attackTimesOptions.onlineNoThrottlingXPerSecond,
offlineSlowHashingXPerSecond: guesses / attackTimesOptions.offlineSlowHashingXPerSecond,
offlineFastHashingXPerSecond: guesses / attackTimesOptions.offlineFastHashingXPerSecond
};
}
guessesToScore(guesses) {
const scoringOptions = this.options.timeEstimationValues.scoring;
const DELTA = 5;
if (guesses < scoringOptions[0] + DELTA) {
// risky password: "too guessable"
return 0;
}
if (guesses < scoringOptions[1] + DELTA) {
// modest protection from throttled online attacks: "very guessable"
return 1;
}
if (guesses < scoringOptions[2] + DELTA) {
// modest protection from unthrottled online attacks: "somewhat guessable"
return 2;
}
if (guesses < scoringOptions[3] + DELTA) {
// modest protection from offline attacks: "safely unguessable"
// assuming a salted, slow hash function like bcrypt, scrypt, PBKDF2, argon, etc
return 3;
}
// strong protection from offline attacks under same scenario: "very unguessable"
return 4;
}
displayTime(seconds) {
let displayStr = 'centuries';
let base = null;
const timeKeys = Object.keys(times);
const foundIndex = timeKeys.findIndex(time => seconds < times[time]);
if (foundIndex > -1) {
displayStr = timeKeys[foundIndex - 1];
if (foundIndex !== 0) {
base = Math.round(seconds / times[displayStr]);
} else {
displayStr = 'ltSecond';
}
}
return {
base,
displayStr
};
}
translate(displayStr, value) {
let key = displayStr;
if (value !== null && value !== 1) {
key += 's';
}
const {
timeEstimation
} = this.options.translations;
const translation = timeEstimation[key];
if (typeof translation === 'function') {
return translation(value);
}
return translation.replace('{base}', `${value}`);
}
}
exports.TimeEstimates = TimeEstimates;
exports.checkTimeEstimationValues = checkTimeEstimationValues;
exports.timeEstimationValuesDefaults = timeEstimationValuesDefaults;
//# sourceMappingURL=TimeEstimates.cjs.map
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 - present, Yusuke Wada and Hono contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -0,0 +1,27 @@
/**
* @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 NotepadTextDashed = createLucideIcon("NotepadTextDashed", [
["path", { d: "M8 2v4", key: "1cmpym" }],
["path", { d: "M12 2v4", key: "3427ic" }],
["path", { d: "M16 2v4", key: "4m81vk" }],
["path", { d: "M16 4h2a2 2 0 0 1 2 2v2", key: "j91f56" }],
["path", { d: "M20 12v2", key: "w8o0tu" }],
["path", { d: "M20 18v2a2 2 0 0 1-2 2h-1", key: "1c9ggx" }],
["path", { d: "M13 22h-2", key: "191ugt" }],
["path", { d: "M7 22H6a2 2 0 0 1-2-2v-2", key: "1rt9px" }],
["path", { d: "M4 14v-2", key: "1v0sqh" }],
["path", { d: "M4 8V6a2 2 0 0 1 2-2h2", key: "1mwabg" }],
["path", { d: "M8 10h6", key: "3oa6kw" }],
["path", { d: "M8 14h8", key: "1fgep2" }],
["path", { d: "M8 18h5", key: "17enja" }]
]);
export { NotepadTextDashed as default };
//# sourceMappingURL=notepad-text-dashed.js.map
@@ -0,0 +1 @@
{"version":3,"file":"use-computed.mjs","sources":["../../../src/value/use-computed.ts"],"sourcesContent":["\"use client\"\n\nimport { collectMotionValues, type MotionValue } from \"motion-dom\"\nimport { useCombineMotionValues } from \"./use-combine-values\"\n\nexport function useComputed<O>(compute: () => O): MotionValue<O> {\n /**\n * Open session of collectMotionValues. Any MotionValue that calls get()\n * will be saved into this array.\n */\n collectMotionValues.current = []\n\n compute()\n\n const value = useCombineMotionValues(collectMotionValues.current, compute)\n\n /**\n * Synchronously close session of collectMotionValues.\n */\n collectMotionValues.current = undefined\n\n return value\n}\n"],"names":[],"mappings":";;;;AAKM;AACF;;;AAGG;AACH;AAEA;;AAIA;;AAEG;AACH;AAEA;AACJ;;"}
@@ -0,0 +1,25 @@
var Nr=Object.defineProperty;var Dr=e=>{throw TypeError(e)};var es=(e,t,r)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ir=(e,t)=>{for(var r in t)Nr(e,r,{get:t[r],enumerable:!0})};var Wt=(e,t,r)=>es(e,typeof t!="symbol"?t+"":t,r),ts=(e,t,r)=>t.has(e)||Dr("Cannot "+r);var qe=(e,t,r)=>(ts(e,t,"read from private field"),r?r.call(e):t.get(e)),Rr=(e,t,r)=>t.has(e)?Dr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var Zi={};Ir(Zi,{languages:()=>Ui,options:()=>zi,parsers:()=>Pr,printers:()=>$o});var ke=(e,t)=>(r,n,...i)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,i);var rs=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},ns=ke("replaceAll",function(){if(typeof this=="string")return rs}),T=ns;function is(e){return this[e<0?this.length+e:e]}var ss=ke("at",function(){if(Array.isArray(this)||typeof this=="string")return is}),I=ss;var as=()=>{},He=as;var Fe="string",Ve="array",ot="cursor",be="indent",we="align",lt="trim",Te="group",ye="fill",Ee="if-break",xe="indent-if-break",ct="line-suffix",ut="line-suffix-boundary",z="line",pt="label",Le="break-parent",ht=new Set([ot,be,we,lt,Te,ye,Ee,xe,ct,ut,z,pt,Le]);function mt(e,t,r){if(!e.has(t)){let n=r(t);e.set(t,n)}return e.get(t)}function os(e){if(typeof e=="string")return Fe;if(Array.isArray(e))return Ve;if(!e)return;let{type:t}=e;if(ht.has(t))return t}var ft=os;var ls=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);function cs(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
Expected it to be 'string' or 'object'.`;if(ft(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ls([...ht].map(i=>`'${i}'`));return`Unexpected doc.type '${e.type}'.
Expected it to be ${n}.`}var zt=class extends Error{name="InvalidDocError";constructor(t){super(cs(t)),this.doc=t}},Or=zt;function Gt(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(s){return mt(r,s,i)}function i(s){switch(ft(s)){case Ve:return t(s.map(n));case ye:return t({...s,parts:s.parts.map(n)});case Ee:return t({...s,breakContents:n(s.breakContents),flatContents:n(s.flatContents)});case Te:{let{expandedStates:a,contents:o}=s;return a?(a=a.map(n),o=a[0]):o=n(o),t({...s,contents:o,expandedStates:a})}case we:case be:case xe:case pt:case ct:return t({...s,contents:n(s.contents)});case Fe:case ot:case lt:case ut:case z:case Le:return t(s);default:throw new Or(s)}}}function L(e,t=Mr){return Gt(e,r=>typeof r=="string"?R(t,r.split(`
`)):r)}var D=He,dt=He,Br=He,qr=He;function A(e){return D(e),{type:be,contents:e}}function us(e,t){return qr(e),D(t),{type:we,contents:t,n:e}}function Hr(e){return us(Number.NEGATIVE_INFINITY,e)}var G={type:Le};function gt(e){return Br(e),{type:ye,parts:e}}function C(e,t={}){return D(e),dt(t.expandedStates,!0),{type:Te,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function $(e,t="",r={}){return D(e),t!==""&&D(t),{type:Ee,breakContents:e,flatContents:t,groupId:r.groupId}}function Fr(e,t){return D(e),{type:xe,contents:e,groupId:t.groupId,negate:t.negate}}function R(e,t){D(e),dt(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}var S={type:z},y={type:z,soft:!0},ps={type:z,hard:!0},k=[ps,G],hs={type:z,hard:!0,literal:!0},Mr=[hs,G];var Vr=Object.freeze({character:"'",codePoint:39}),Ur=Object.freeze({character:'"',codePoint:34}),ms=Object.freeze({preferred:Vr,alternate:Ur}),fs=Object.freeze({preferred:Ur,alternate:Vr});function Wr(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?ms:fs,{length:i}=e,s=0,a=0;for(let o=0;o<i;o++){let l=e.charCodeAt(o);l===r.codePoint?s++:l===n.codePoint&&a++}return(s>a?n:r).character}function $t(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var jt=class{#e;constructor(t){this.#e=new Set(t)}getLeadingWhitespaceCount(t){let r=this.#e,n=0;for(let i=0;i<t.length&&r.has(t.charAt(i));i++)n++;return n}getTrailingWhitespaceCount(t){let r=this.#e,n=0;for(let i=t.length-1;i>=0&&r.has(t.charAt(i));i--)n++;return n}getLeadingWhitespace(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(0,r)}getTrailingWhitespace(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(t.length-r)}hasLeadingWhitespace(t){return this.#e.has(t.charAt(0))}hasTrailingWhitespace(t){return this.#e.has(I(0,t,-1))}trimStart(t){let r=this.getLeadingWhitespaceCount(t);return t.slice(r)}trimEnd(t){let r=this.getTrailingWhitespaceCount(t);return t.slice(0,t.length-r)}trim(t){return this.trimEnd(this.trimStart(t))}split(t,r=!1){let n=`[${$t([...this.#e].join(""))}]+`,i=new RegExp(r?`(${n})`:n);return t.split(i)}hasWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>r.has(n))}hasNonWhitespaceCharacter(t){let r=this.#e;return Array.prototype.some.call(t,n=>!r.has(n))}isWhitespaceOnly(t){let r=this.#e;return Array.prototype.every.call(t,n=>r.has(n))}#t(t){let r=Number.POSITIVE_INFINITY;for(let n of t.split(`
`)){if(n.length===0)continue;let i=this.getLeadingWhitespaceCount(n);if(i===0)return 0;n.length!==i&&i<r&&(r=i)}return r===Number.POSITIVE_INFINITY?0:r}dedentString(t){let r=this.#t(t);return r===0?t:t.split(`
`).map(n=>n.slice(r)).join(`
`)}},zr=jt;var ds=[" ",`
`,"\f","\r"," "],gs=new zr(ds),P=gs;var Yt=class extends Error{name="UnexpectedNodeError";constructor(t,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(t[n])}.`),this.node=t}},Gr=Yt;function j(e,t=!0){return[A([y,e]),t?y:""]}function q(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression"||t.parser==="__ng_binding"||t.parser==="__ng_directive")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function E(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let i=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{i=n(a,o)});let s=await t(e,r,t);return i?C(s):j(s)}function _s(e,t,r,n){let{node:i}=r,s=n.originalText.slice(i.sourceSpan.start.offset,i.sourceSpan.end.offset);return/^\s*$/.test(s)?"":E(s,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},q)}var $r=_s;var Ss=Object.hasOwn??Function.prototype.call.bind(Object.prototype.hasOwnProperty),Y=Ss;var vs=Array.prototype.toReversed??function(){return[...this].reverse()},Cs=ke("toReversed",function(){if(Array.isArray(this))return vs}),jr=Cs;function ks(){let e=globalThis,t=e.process?.platform;if(typeof t=="string")return t.startsWith("win");let r=e.Deno?.build?.os;return typeof r=="string"?r==="windows":e.navigator?.platform?.startsWith("Win")??!1}var bs=ks();function Yr(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function ws(e){return e=Yr(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Ts(e){e=Yr(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function Kt(e){return bs?Ts(e):ws(e)}var Kr=e=>String(e).split(/[/\\]/).pop(),Qr=e=>String(e).startsWith("file:");function ys(e){return Array.isArray(e)&&e.length>0}var J=ys;function Xr(e,t){if(!t)return;let r=Kr(t).toLowerCase();return e.find(({filenames:n})=>n?.some(i=>i.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(i=>r.endsWith(i)))}function Es(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}var xs=void 0;function Jr(e,t){if(t){if(Qr(t))try{t=Kt(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function Ls(e,t){let r=jr(0,e.plugins).flatMap(i=>i.languages??[]);return(Es(r,t.language)??Xr(r,t.physicalFile)??Xr(r,t.file)??Jr(r,t.physicalFile)??Jr(r,t.file)??xs?.(r,t.physicalFile))?.parsers[0]}var _t=Ls;var St=Symbol.for("PRETTIER_IS_FRONT_MATTER");function As(e){return!!e?.[St]}var ae=As;function Ps(e){return T(0,e,/[^\n]/g," ")}var vt=Ps;var Ue=3;function Ns(e){let t=e.slice(0,Ue);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
`,Ue);if(r===-1)return;let n=e.slice(Ue,r).trim(),i=e.indexOf(`
${t}`,r),s=n;if(s||(s=t==="+++"?"toml":"yaml"),i===-1&&t==="---"&&s==="yaml"&&(i=e.indexOf(`
...`,r)),i===-1)return;let a=i+1+Ue,o=e.charAt(a+1);if(!/\s?/.test(o))return;let l=e.slice(0,a),c;return{language:s,explicitLanguage:n||null,value:e.slice(r+1,i),startDelimiter:t,endDelimiter:l.slice(-Ue),raw:l,start:{line:1,column:0,index:0},end:{index:l.length,get line(){return c??(c=l.split(`
`)),c.length},get column(){return c??(c=l.split(`
`)),I(0,c,-1).length}},[St]:!0}}function Ds(e){let t=Ns(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return vt(r)+e.slice(r.length)}}:{content:e}}var Qt=Ds;var Zr="inline",Xt={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",details:"block",summary:"block",marquee:"inline-block",option:"block",optgroup:"block",select:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block"},en="normal",Jt={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function Is(e){return e.kind==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}var oe=Is;var Rs=e=>T(0,e,/^[\t\f\r ]*\n/g,""),Zt=e=>Rs(P.trimEnd(e)),tn=e=>{let t=e,r=P.getLeadingWhitespace(t);r&&(t=t.slice(r.length));let n=P.getTrailingWhitespace(t);return n&&(t=t.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:t}};function Ct(e,t){return!!(e.kind==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.kind==="ieConditionalComment"&&!e.complete||K(e)&&e.children.some(r=>r.kind!=="text"&&r.kind!=="interpolation")||wt(e,t)&&!O(e,t)&&e.kind!=="interpolation")}function le(e){return e.kind==="attribute"||!e.parent||!e.prev?!1:Os(e.prev)}function Os(e){return e.kind==="comment"&&e.value.trim()==="prettier-ignore"}function N(e){return e.kind==="text"||e.kind==="comment"}function O(e,t){return e.kind==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||e.fullName==="mj-style"&&t.parser==="mjml"||oe(e)&&(e.name==="script"||e.name==="style"))}function rn(e,t){return e.children&&!O(e,t)}function nn(e,t){return O(e,t)||e.kind==="interpolation"||er(e)}function er(e){return dn(e).startsWith("pre")}function sn(e,t){let r=n();if(r&&!e.prev&&e.parent?.tagDefinition?.ignoreFirstLf)return e.kind==="interpolation";return r;function n(){return ae(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.prev&&(e.prev.kind==="text"||e.prev.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:K(e.parent)?!0:!(!e.prev&&(e.parent.kind==="root"||K(e)&&e.parent||O(e.parent,t)||Ge(e.parent,t)||!Vs(e.parent.cssDisplay))||e.prev&&!zs(e.prev.cssDisplay))}}function an(e,t){return ae(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.next&&(e.next.kind==="text"||e.next.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:K(e.parent)?!0:!(!e.next&&(e.parent.kind==="root"||K(e)&&e.parent||O(e.parent,t)||Ge(e.parent,t)||!Us(e.parent.cssDisplay))||e.next&&!Ws(e.next.cssDisplay))}function on(e,t){return Gs(e.cssDisplay)&&!O(e,t)}function We(e){return ae(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line}function ln(e){return tr(e)||e.kind==="element"&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some(t=>Bs(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.kind!=="text"&&un(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||pn(e.lastChild))}function tr(e){return e.kind==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function kt(e){return hn(e)||e.prev&&Ms(e.prev)||cn(e)}function Ms(e){return hn(e)||e.kind==="element"&&e.fullName==="br"||cn(e)}function cn(e){return un(e)&&pn(e)}function un(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:e.parent.kind==="root"||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function pn(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:e.parent.kind==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function hn(e){switch(e.kind){case"ieConditionalComment":case"comment":case"directive":rLine truncated
`||e==="\f"||e==="\r"||e===" "}var ea=/^[ \t\n\r\u000c]+/,ta=/^[, \t\n\r\u000c]+/,ra=/^[^ \t\n\r\u000c]+/,na=/[,]+$/,Pn=/^\d+$/,ia=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function sa(e){let t=e.length,r,n,i,s,a,o=0,l;function c(h){let f,g=h.exec(e.substring(o));if(g)return[f]=g,o+=f.length,f}let u=[];for(;;){if(c(ta),o>=t){if(u.length===0)throw new Error("Must contain one or more image candidate strings.");return u}l=o,r=c(ra),n=[],r.slice(-1)===","?(r=r.replace(na,""),_()):d()}function d(){for(c(ea),i="",s="in descriptor";;){if(a=e.charAt(o),s==="in descriptor")if(An(a))i&&(n.push(i),i="",s="after descriptor");else if(a===","){o+=1,i&&n.push(i),_();return}else if(a==="(")i+=a,s="in parens";else if(a===""){i&&n.push(i),_();return}else i+=a;else if(s==="in parens")if(a===")")i+=a,s="in descriptor";else if(a===""){n.push(i),_();return}else i+=a;else if(s==="after descriptor"&&!An(a))if(a===""){_();return}else s="in descriptor",o-=1;o+=1}}function _(){let h=!1,f,g,v,W,se={},X,at,Ce,Be,Ut;for(W=0;W<n.length;W++)X=n[W],at=X[X.length-1],Ce=X.substring(0,X.length-1),Be=parseInt(Ce,10),Ut=parseFloat(Ce),Pn.test(Ce)&&at==="w"?((f||g)&&(h=!0),Be===0?h=!0:f=Be):ia.test(Ce)&&at==="x"?((f||g||v)&&(h=!0),Ut<0?h=!0:g=Ut):Pn.test(Ce)&&at==="h"?((v||g)&&(h=!0),Be===0?h=!0:v=Be):h=!0;if(!h)se.source={value:r,startOffset:l},f&&(se.width={value:f}),g&&(se.density={value:g}),v&&(se.height={value:v}),u.push(se);else throw new Error(`Invalid srcset descriptor found in "${e}" at "${X}".`)}}var Nn=sa;var Dn=e=>e.node.fullName==="srcset"&&(e.parent.fullName==="img"||e.parent.fullName==="source"),In={width:"w",height:"h",density:"x"},aa=Object.keys(In);function Rn(e,t,r){let n=w(r.node),i=Nn(n),s=aa.filter(h=>i.some(f=>Y(f,h)));if(s.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[a]=s,o=In[a],l=i.map(h=>h.source.value),c=Math.max(...l.map(h=>h.length)),u=i.map(h=>h[a]?String(h[a].value):""),d=u.map(h=>{let f=h.indexOf(".");return f===-1?h.length:f}),_=Math.max(...d);return j(R([",",S],l.map((h,f)=>{let g=[h],v=u[f];if(v){let W=c-h.length+1,se=_-d[f],X=" ".repeat(W+se);g.push($(X," "),v+o)}return g})))}var On=({node:e},t)=>e.fullName==="style"&&!t.parentParser&&!e.value.includes("{{"),Mn=async(e,t,r)=>j(await e(w(r.node),{parser:"css",__isHTMLStyleAttribute:!0}));var oa=new WeakMap;function la(e,t){return mt(oa,e.root,r=>r.children.some(n=>yt(n,t)&&["ts","typescript"].includes(n.attrMap.lang)))}var H=la;function Bn(e,t,r){let n=w(r.node);return E(`type T<${n}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},q)}function qn(e,t,r,n){let i=w(r.node),s=H(r,n)?"babel-ts":"babel";return E(`function _(${i}) {}`,e,{parser:s,__isVueBindings:!0})}async function Hn(e,t,r,n){let i=w(r.node),{left:s,operator:a,right:o}=ca(i),l=H(r,n);return[C(await E(`function _(${s}) {}`,e,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await E(o,e,{parser:l?"__ts_expression":"__js_expression"})]}function ca(e){let t=/(.*?)\s+(in|of)\s+(.*)/s,r=e.match(t);if(!r)return;let n={for:r[3].trim()};if(!n.for)return;let i=/,([^,\]}]*)(?:,([^,\]}]*))?$/,s=/^\(|\)$/g,a=T(0,r[1].trim(),s,""),o=a.match(i);o?(n.alias=a.replace(i,""),n.iterator1=o[1].trim(),o[2]&&(n.iterator2=o[2].trim())):n.alias=a;let l=[n.alias,n.iterator1,n.iterator2];if(!l.some((c,u)=>!c&&(u===0||l.slice(u+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:r[2],right:n.for}}var ua=[{test:e=>e.node.fullName==="v-for",print:Hn},{test:(e,t)=>e.node.fullName==="generic"&&yt(e.parent,t),print:Bn},{test:({node:e},t)=>gn(e)||_n(e,t),print:qn},{test(e){let t=e.node.fullName;return t.startsWith("@")||t.startsWith("v-on:")},print:pa},{test(e){let t=e.node.fullName;return t.startsWith(":")||t.startsWith(".")||t.startsWith("v-bind:")},print:ha},{test:e=>e.node.fullName.startsWith("v-"),print:Fn}].map(({test:e,print:t})=>({test:(r,n)=>n.parser==="vue"&&e(r,n),print:t}));async function pa(e,t,r,n){try{return await Fn(e,t,r,n)}catch(a){if(a.cause?.code!=="BABEL_PARSER_SYNTAX_ERROR")throw a}let i=w(r.node),s=H(r,n)?"__vue_ts_event_binding":"__vue_event_binding";return E(i,e,{parser:s},q)}function ha(e,t,r,n){let i=w(r.node),s=H(r,n)?"__vue_ts_expression":"__vue_expression";return E(i,e,{parser:s},q)}function Fn(e,t,r,n){let i=w(r.node),s=H(r,n)?"__ts_expression":"__js_expression";return E(i,e,{parser:s},q)}var Vn=ua;var ma=[{test:Dn,print:Rn},{test:On,print:Mn},{test:Tn,print:yn},{test:bn,print:wn},{test:xn,print:Ln},...Vn,...kn].map(({test:e,print:t})=>({test:e,print:da(t)}));function fa(e,t){let{node:r}=e,{value:n}=r;if(n)return Et(r,t)?[r.rawName,"=",n]:ma.find(({test:i})=>i(e,t))?.print}function da(e){return async(t,r,n,i)=>{let s=await e(t,r,n,i);if(s)return s=Gt(s,a=>typeof a=="string"?T(0,a,'"',"&quot;"):a),[n.node.rawName,'="',C(s),'"']}}var Un=fa;var F=e=>e.sourceSpan.start.offset,Z=e=>e.sourceSpan.end.offset;function $e(e,t){return[e.isSelfClosing?"":ga(e,t),ue(e,t)]}function ga(e,t){return e.lastChild&&Q(e.lastLine truncated
${e}`;var ti=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])],["boundary",new Set(["error"])]]);function ri(e){let t=Z(e);return e.kind==="element"&&!e.endSourceSpan&&J(e.children)?Math.max(t,ri(I(0,e.children,-1))):t}function Ze(e,t,r){let n=e.node;if(le(n)){let i=ri(n);return[B(n,t),L(P.trimEnd(t.originalText.slice(F(n)+(n.prev&&je(n.prev)?Lt(n).length:0),i-(n.next&&V(n.next)?pe(n,t).length:0)))),M(n,t)]}return r()}function Nt(e,t){return N(e)&&N(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?kt(t)?k:S:"":kt(t)?k:y:je(e)&&(le(t)||t.firstChild||t.isSelfClosing||t.kind==="element"&&t.attrs.length>0)||e.kind==="element"&&e.isSelfClosing&&V(t)?"":t.kind==="comment"&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces?y:!t.isLeadingSpaceSensitive||kt(t)||V(t)&&e.lastChild&&Q(e.lastChild)&&e.lastChild.lastChild&&Q(e.lastChild.lastChild)?k:t.hasLeadingSpaces?S:y}function Ae(e,t,r){let{node:n}=e;if(tr(n))return[G,...e.map(()=>{let s=e.node,a=s.prev?Nt(s.prev,s):"";return[a?[a,We(s.prev)?k:""]:"",Ze(e,t,r)]},"children")];let i=n.children.map(()=>Symbol(""));return e.map(({node:s,index:a})=>{if(N(s)){if(s.prev&&N(s.prev)){let h=Nt(s.prev,s);if(h)return We(s.prev)?[k,k,Ze(e,t,r)]:[h,Ze(e,t,r)]}return Ze(e,t,r)}let o=[],l=[],c=[],u=[],d=s.prev?Nt(s.prev,s):"",_=s.next?Nt(s,s.next):"";return d&&(We(s.prev)?o.push(k,k):d===k?o.push(k):N(s.prev)?l.push(d):l.push($("",y,{groupId:i[a-1]}))),_&&(We(s)?N(s.next)&&u.push(k,k):_===k?N(s.next)&&u.push(k):c.push(_)),[...o,C([...l,C([Ze(e,t,r),...c],{id:i[a]})]),...u]},"children")}function ni(e,t,r){let{node:n}=e,i=[];Da(e)&&i.push("} "),i.push("@",n.name);let s=Pa(n);if(n.parameters&&(s||i.push(" "),i.push("(",C(r("parameters")),")")),s)return i.push(";"),i;if(!Na(n)){i.push(" {");let a=ii(n);n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,i.push(A([k,Ae(e,t,r)])),a&&i.push(k,"}")):a&&i.push("}")}return C(i,{shouldBreak:!0})}function ii(e){return!(e.next?.kind==="angularControlFlowBlock"&&ti.get(e.name)?.has(e.next.name))}var Aa=e=>e?.kind==="angularControlFlowBlock"&&(e.name==="case"||e.name==="default"),Pa=e=>e?.kind==="angularControlFlowBlock"&&e.name==="default never";function Na(e){return Aa(e)&&e.endSourceSpan&&e.endSourceSpan.start.offset===e.endSourceSpan.end.offset}function Da(e){let{previous:t}=e;return t?.kind==="angularControlFlowBlock"&&!le(t)&&!ii(t)}function si(e,t,r){return[A([y,R([";",S],e.map(r,"children"))]),y]}function ai(e,t,r){let{node:n}=e;return[me(n,t),C([n.switchValue.trim(),", ",n.type,n.cases.length>0?[",",A([S,R(S,e.map(r,"cases"))])]:"",y]),ue(n,t)]}function oi(e,t,r){let{node:n}=e;return[n.value," {",C([A([y,e.map(({node:i,isLast:s})=>{let a=[r()];return i.kind==="text"&&(i.hasLeadingSpaces&&a.unshift(S),i.hasTrailingSpaces&&!s&&a.push(S)),a},"expression")]),y]),"}"]}function li(e,t,r){let{node:n}=e;if(Ct(n,t))return[B(n,t),C(Ke(e,t,r)),L(Pt(n,t)),...$e(n,t),M(n,t)];let i=n.children.length===1&&(n.firstChild.kind==="interpolation"||n.firstChild.kind==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,s=Symbol("element-attr-group-id"),a=u=>C([C(Ke(e,t,r),{id:s}),u,$e(n,t)]);if(n.children.length===0)return a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?S:"");let o=u=>i?Fr(u,{groupId:s}):(O(n,t)||Ge(n,t))&&n.parent.kind==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?u:A(u),l=()=>i?$(y,"",{groupId:s}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?S:n.firstChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?Hr(y):y,c=()=>(n.next?V(n.next):he(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":K(n)&&Q(n.lastChild)?"":i?$(y,"",{groupId:s}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?S:(n.lastChild.kind==="comment"||n.lastChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`).test(n.lastChild.value)?"":y;return a([ln(n)?G:"",o([l(),Ae(e,t,r)]),c()])}function ci(e){let{node:{value:t,type:r}}=e;return r==="single"?`//${t.trimEnd()}`:["/*",L(t),"*/"]}var lr=(function(e){return e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA",e})({});function ee(e,t=!0){if(e[0]!=":")return[null,e];let r=e.indexOf(":",1);if(r===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,r),e.slice(r+1)]}function cr(e){return ee(e)[1]==="ng-container"}function ur(e){return ee(e)[1]==="ng-content"}function Pe(e){return e===null?null:ee(e)[0]}function fLine truncated
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let t=Dt(e),r=this._schema.get(t)||this._schema.get("unknown");return Array.from(r.keys()).map(n=>Va.get(n)??n)}allKnownEventsOfElement(e){let t=Dt(e);return Array.from(this._eventSchema.get(t)??[])}normalizeAnimationStyleProperty(e){return pi(e)}normalizeAnimationStyleValue(e,t,r){let n="",i=r.toString().trim(),s=null;if(Ua(e)&&r!==0&&r!=="0")if(typeof r=="number")n="px";else{let a=r.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&(s=`Please provide a CSS unit value for ${t}:${r}`)}return{error:s,value:i+n}}};function Ua(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var m=class{closedByChildren={};contentType;closedByParent=!1;implicitNamespacePrefix;isVoid;ignoreFirstLf;canSelfClose;preventNamespaceInheritance;constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=2,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1,preventNamespaceInheritance:a=!1,canSelfClose:o=!1}={}){e&&e.length>0&&e.forEach(l=>this.closedByChildren[l]=!0),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s,this.preventNamespaceInheritance=a,this.canSelfClose=o??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},di,tt;function Ne(e){return tt||(di=new m({canSelfClose:!0}),tt=Object.assign(Object.create(null),{base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:0}),script:new m({contentType:0}),title:new m({contentType:{default:1,svg:2}}),textarea:new m({contentType:1,ignoreFirstLf:!0})}),new fi().allKnownElementNames().forEach(t=>{!tt[t]&&Pe(t)===null&&(tt[t]=new m({canSelfClose:!1}))})),tt[e]??di}var De=class gi{file;offset;line;col;constructor(t,r,n,i){this.file=t,this.offset=r,this.line=n,this.col=i}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(t){let r=this.file.content,n=r.length,i=this.offset,s=this.line,a=this.col;for(;i>0&&t<0;)if(i--,t++,r.charCodeAt(i)==10){s--;let o=r.substring(0,i-1).lastIndexOf(`
`);a=o>0?i-o:i}else a--;for(;i<n&&t>0;){let o=r.charCodeAt(i);i++,t--,o==10?(s++,a=0):a++}return new gi(this.file,i,s,a)}getContext(t,r){let n=this.file.content,i=this.offset;if(i!=null){i>n.length-1&&(i=n.length-1);let s=i,a=0,o=0;for(;a<t&&i>0&&(i--,a++,!(n[i]==`
`&&++o==r)););for(a=0,o=0;a<t&&s<n.length-1&&(s++,a++,!(n[s]==`
`&&++o==r)););return{before:n.substring(i,this.offset),after:n.substring(this.offset,s+1)}}return null}},rt=class{content;url;constructor(e,t){this.content=e,this.url=t}},p=class{start;end;fullStart;details;constructor(e,t,r=e,n=null){this.start=e,this.end=t,this.fullStart=r,this.details=n}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},Wa=(function(e){return e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR",e})({}),re=class extends Error{span;msg;level;relatedError;constructor(e,t,r=1,n){super(t),this.span=e,this.msg=t,this.level=r,this.relatedError=n,Object.setPrototypeOf(this,new.target.prototype)}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Wa[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var de=class{sourceSpan;i18n;constructor(e,t){this.sourceSpan=e,this.i18n=t}},_i=class extends de{value;tokens;constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r}visit(e,t){return e.visitText(this,t)}kind="text"},Si=class extends de{value;tokens;constructor(e,t,r,n){super(t,n),this.value=e,this.tokens=r}visit(e,t){return e.visitCdata(this,t)}kind="cdata"},vi=class extends de{switchValue;type;cases;switchValueSourceSpan;constructor(e,t,r,n,i,s){super(n,s),this.switchValue=e,this.type=t,this.cases=r,this.switchValueSourceSpan=i}visit(e,t){return e.visitExpansion(this,t)}kind="expansion"},Ci=class{value;expression;sourceSpan;valueSourceSpan;expSourceSpan;constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}visit(e,t){return e.visitExpansionCase(this,t)}kind="expansionCase"},ki=class extends de{name;value;keySpan;valueSpan;valueTokens;constructor(e,t,r,n,i,s,a){super(r,a),this.name=e,this.value=t,this.keySpan=n,this.valueSpan=i,this.valueTokens=s}visit(e,t){return e.visitAttribute(this,t)}kind="attribute";get nameSpan(){return this.keySpan}},bi=class{value;type;sourceSpan;constructor(e,t,r){this.value=e,this.type=t,this.sourceSpan=r}visit(e,t){return e.visitStartTagComment?e.visitStartTagComment(this,t):void 0}kind="startTagComment"},ne=class extends de{name;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;nameSpan;isVoid;comments;constructor(e,t,r,n,i,s,a,o=null,l=null,c,u,d=[]){super(s,u),this.name=e,this.attrs=t,this.directives=r,this.children=n,this.isSelfClosing=i,this.startSourceSpan=a,this.endSourceSpan=o,this.nameSpan=l,this.isVoid=c,this.comments=d}visit(e,t){return e.visitElement(this,t)}kind="element"},wi=class{value;sourceSpan;constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}kind="comment"},Ti=class{value;sourceSpan;constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitDocType(this,t)}kind="docType"},ge=class extends de{name;parameters;children;nameSpan;startSourceSpan;endSourceSpan;constructor(e,t,r,n,i,s,a=null,o){super(n,o),this.name=e,this.parameters=t,this.children=r,this.nameSpan=i,this.startSourceSpan=s,this.endSourceSpan=a}visit(e,t){return e.visitBlock(this,t)}kind="block"},U=class extends de{componentName;tagName;fullName;attrs;directives;children;isSelfClosing;startSourceSpan;endSourceSpan;comments;constructor(e,t,r,n,i,s,a,o,l,c=null,u,d=[]){super(o,u),this.componentName=e,this.tagName=t,this.fullName=r,this.attrs=n,this.directives=i,this.children=s,this.isSelfClosing=a,this.startSourceSpan=l,this.endSourceSpan=c,this.comments=d}visit(e,t){return e.visitComponent(this,t)}kind="component"},yi=class{name;attrs;sourceSpan;startSourceSpan;endSourceSpan;constructor(e,t,r,n,i=null){this.name=e,this.attrs=t,this.sourceSpan=r,this.startSourceSpan=n,this.endSourceSpan=i}visit(e,t){return e.visitDirective(this,t)}kind="directive"},fr=class{expression;sourceSpan;constructor(e,t){this.expression=e,this.sourceSpan=t}visit(e,t){return e.visitBlockParameter(this,t)}kind="blockParameter";startSourceSpan=null;endSourceSpan=null},dr=class{name;value;sourceSpan;nameSpan;valueSpan;constructor(e,t,r,n,i){this.name=e,this.value=t,this.sourceSpan=r,this.nameSpan=n,this.valueSpan=i}visit(e,t){return e.visitLetDeclaration(this,t)}kind="letDeclaration";startSourceSpan=null;endSourceSpan=null};function It(e,t,r=null){let n=[],i=e.visit?s=>e.visit(s,r)||s.visit(e,r):s=>s.visit(e,r);return t.forEach(s=>{let a=i(s);a&&n.push(a)}),n}var gr=class{constructor(){}visitElement(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.directives),r(e.comments),r(e.children)})}visitAttribute(e,t){}visitStartTagComment(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,r=>{r(e.cases)})}visitExpansionCase(e,t){}visitBlock(e,t){this.visitChildren(t,r=>{r(e.parameters),r(e.children)})}visitBlockParameter(e,t){}visitLetDeclaration(e,t){}visitComponent(e,t){this.visitChildren(t,r=>{r(e.attrs),r(e.comments),r(e.children)})}visitDLine truncated
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",Rfr:"\u211C",real:"\u211C",realpart:"\u211C",ReverseElement:"\u220B",SuchThat:"\u220B",ni:"\u220B",niv:"\u220B",ReverseEquilibrium:"\u21CB",leftrightharpoons:"\u21CB",lrhar:"\u21CB",ReverseUpEquilibrium:"\u296F",duhar:"\u296F",Rho:"\u03A1",RightAngleBracket:"\u27E9",rang:"\u27E9",rangle:"\u27E9",RightArrow:"\u2192",ShortRightArrow:"\u2192",rarr:"\u2192",rightarrow:"\u2192",srarr:"\u2192",RightArrowBar:"\u21E5",rarrb:"\u21E5",RightArrowLeftArrow:"\u21C4",rightleftarrows:"\u21C4",rlarr:"\u21C4",RightCeiling:"\u2309",rceil:"\u2309",RightDoubleBracket:"\u27E7",robrk:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",dharr:"\u21C2",downharpoonright:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rfloor:"\u230B",RightTee:"\u22A2",vdash:"\u22A2",RightTeeArrow:"\u21A6",map:"\u21A6",mapsto:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",vartriangleright:"\u22B3",vLine truncated
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let t=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._isLetStart()?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._isBlockStart()?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(t){this.handleError(t)}}this._beginToken(44),this._endToken([])}_getBlockName(){let e=!1,t=this._cursor.clone();this._attemptCharCodeUntilFn(n=>nt(n)?!e:ro(n)?(e=!0,!1):!0);let r=this._cursor.getChars(t).trim();return Ka.test(r)?r="else if":Ya.test(r)&&(r="default never"),r}_consumeBlockStart(e){this._requireCharCode(64),this._beginToken(26,e);let t=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{t.type=30;return}if(t.parts[0]==="default never"&&this._attemptCharCode(59)){this._beginToken(27),this._endToken([]),this._beginToken(28),this._endToken([]);return}this._attemptCharCode(123)?(this._beginToken(27),this._endToken([])):this._isBlockStart()&&(t.parts[0]==="case"||t.parts[0]==="default")?(this._beginToken(27),this._endToken([]),this._beginToken(28),this._endToken([])):t.type=30}_consumeBlockEnd(e){this._beginToken(28,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(Ai);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(29);let e=this._cursor.clone(),t=null,r=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||t!==null;){let n=this._cursor.peek();if(n===92)this._cursor.advance();else if(n===t)t=null;else if(t===null&&Rt(n))t=n;else if(n===40&&t===null)r++;else if(n===41&&t===null){if(r===0)break;r>0&&r--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(Ai)}}_consumeLetDeclaration(e){if(this._requireStr("@let"),this._beginToken(31,e),nt(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let r=this._endToken([this._cursor.getChars(e)]);r.type=34;return}let t=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){t.type=34;return}this._attemptCharCodeUntilFn(r=>b(r)&&!Oe(r)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(33),this._cursor.advance(),this._endToken([])):(t.type=34,t.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),t=!1;return this._attemptCharCodeUntilFn(r=>Re(r)||r===36||r===95||t&&Ie(r)?(t=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();this._beginToken(32,e),this._attemptUntilIgnoreQuotes(t=>t===59),this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(eo(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t){if(this._currentTokenStart===null)throw new re(this._cursor.getSpan(t),"Programming error - attempted to end a token when there was no start to the token");if(this._currentTokenType===null)throw new re(this._cursor.getSpan(this._currentTokenStart),"Programming error - attempted to end a token which has no token type");let r={type:this._currentTokenType,parts:e,sourceSpan:(t??this._cursor).getSpan(this._currentTokenStart,this._leadingTriviaCodePoints)};return this.tokens.push(r),this._currentTokenStart=null,this._currentTokenType=null,r}_createError(e,t){this._isInExpansionForm()&&(e+=` (Do you have an unescaped "{" in your template? Use "{{ '{' }}") to escape it.)`);let r=new re(t,e);return this._currentTokenStart=null,this._currentTokenType=null,r}handleError(e){if(e instanceof Cr&&(e=this._createError(e.msg,this._cursor.getSpan(e.cursor))),e instanceof re)this.errors.push(e);else throw e}_attemptCharCode(e){return this._cursor.peek()===e?(this._cursor.advance(),!0):!1}_attemptCharCodeCaseInsensitive(e){return to(this._cursor.peek(),e)?(this._cursorLine truncated
`){var n;let i=this._getClosestElementLikeParent();i!=null&&i.children.length==0&&(!((n=this._getTagDefinition(i))===null||n===void 0)&&n.ignoreFirstLf)&&(r=r.substring(1))}return r}_consumeText(t){let r=[t],n=t.sourceSpan,i=t.parts[0];if(i.length>0&&i[0]===`
`){var s;let a=this._getContainer();a!=null&&a.children.length===0&&(!((s=this._getTagDefinition(a))===null||s===void 0)&&s.ignoreFirstLf)&&(i=i.substring(1),r[0]={type:t.type,sourceSpan:t.sourceSpan,parts:[i]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)t=this._advance(),r.push(t),t.type===8?i+=t.parts.join("").replace(/&([^;]+);/g,Oi):t.type===9?i+=t.parts[0]:i+=t.parts.join("");if(i.length>0){let a=t.sourceSpan;this._addToParent(new _i(i,new p(n.start,a.end,n.fullStart,n.details),r))}}_closeVoidElement(){var t;let r=this._getContainer();r!==null&&(!((t=this._getTagDefinition(r))===null||t===void 0)&&t.isVoid)&&this._containerStack.pop()}_consumeElementStartTag(t){var r;let n=[],i=[],s=[];this._consumeAttributesAndDirectives(n,i,s);let a=this._getElementFullName(t,this._getClosestElementLikeParent()),o=this._getTagDefinition(a),l=!1;if(this._peek.type===2){this._advance(),l=!0;let v=this._getTagDefinition(a);this.canSelfClose||v?.canSelfClose||Pe(a)!==null||v?.isVoid||this.errors.push(x.create(a,t.sourceSpan,`Only void, custom and foreign elements can be self closed "${t.parts[1]}"`))}else this._peek.type===1&&(this._advance(),l=!1);let c=this._peek.sourceSpan.fullStart,u=new p(t.sourceSpan.start,c,t.sourceSpan.fullStart),d=new p(t.sourceSpan.start,c,t.sourceSpan.fullStart),_=new p(t.sourceSpan.start.moveBy(1),t.sourceSpan.end),h=new ne(a,n,i,[],l,u,d,void 0,_,o?.isVoid??!1,void 0,s),f=this._getContainer(),g=f!==null&&!!(!((r=this._getTagDefinition(f))===null||r===void 0)&&r.isClosedByChild(h.name));this._pushContainer(h,g),l?this._popContainer(a,ne,u):t.type===4&&(this._popContainer(a,ne,null),this.errors.push(x.create(a,u,`Opening tag "${a}" not terminated.`)))}_consumeComponentStartTag(t){var r;let n=t.parts[0],i=[],s=[],a=[];this._consumeAttributesAndDirectives(i,s,a);let o=this._getClosestElementLikeParent(),l=this._getComponentTagName(t,o),c=this._getComponentFullName(t,o),u=this._peek.type===37;this._advance();let d=this._peek.sourceSpan.fullStart,_=new p(t.sourceSpan.start,d,t.sourceSpan.fullStart),h=new p(t.sourceSpan.start,d,t.sourceSpan.fullStart),f=new U(n,l,c,i,s,[],u,_,h,void 0,void 0,a),g=this._getContainer(),v=g!==null&&f.tagName!==null&&!!(!((r=this._getTagDefinition(g))===null||r===void 0)&&r.isClosedByChild(f.tagName));this._pushContainer(f,v),u?this._popContainer(c,U,_):t.type===39&&(this._popContainer(c,U,null),this.errors.push(x.create(c,_,`Opening tag "${c}" not terminated.`)))}_consumeAttributesAndDirectives(t,r,n){for(;this._peek.type===15||this._peek.type===40||this._peek.type===12;)if(this._peek.type===40)r.push(this._consumeDirective(this._peek));else if(this._peek.type===15)t.push(this._consumeAttr(this._advance()));else{let i=this._advance();n.push(new bi(i.parts[0],i.parts[1],i.sourceSpan))}}_consumeComponentEndTag(t){let r=this._getComponentFullName(t,this._getClosestElementLikeParent());if(!this._popContainer(r,U,t.sourceSpan)){let n=this._containerStack[this._containerStack.length-1],i;n instanceof U&&n.componentName===t.parts[0]?i=`, did you mean "${n.fullName}"?`:i=". It may happen when the tag has already been closed by another tag.";let s=`Unexpected closing tag "${r}"${i}`;this.errors.push(x.create(r,t.sourceSpan,s))}}_getTagDefinition(t){return typeof t=="string"?this.tagDefinitionResolver(t):t instanceof ne?this.tagDefinitionResolver(t.name):t instanceof U&&t.tagName!==null?this.tagDefinitionResolver(t.tagName):null}_pushContainer(t,r){r&&this._containerStack.pop(),this._addToParent(t),this._containerStack.push(t)}_consumeElementEndTag(t){var r;let n=this.allowHtmComponentClosingTags&&t.parts.length===0?null:this._getElementFullName(t,this._getClosestElementLikeParent());if(n&&(!((r=this._getTagDefinition(n))===null||r===void 0)&&r.isVoid))this.errors.push(x.create(n,t.sourceSpan,`Void elements do not have end tags "${t.parts[1]}"`));else if(!this._popContainer(n,ne,t.sourceSpan)){let i=`Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(x.create(n,t.sourceSpan,i))}}_popContainer(t,r,n){let i=!1;for(let a=this._containerStack.length-1;a>=0;a--){var s;let o=this._containerStack[a],l=o instanceof U?o.fullName:o.name;if(Pe(l)?l===t:(l===t||t===null)&&o instanceof r)return o.endSourceSpan=n,o.sourceSpan.end=n!==null?n.end:o.sourceSpan.end,this._containerStack.splice(a,this._containerStack.length-a),!i;(o instanceof ge||!(!((s=this._getTagDefinition(o))===null||s===void 0)&&s.closedByParent))&&(i=!0)}return!1}_consumeAttr(t){let r=fe(t.parts[0],t.parts[1]),n=t.sourceSpan.end,i;this._peek.type===16&&(i=this._advance());let s="",a=[],o,l;if(this._peek.type===17)for(o=this._peek.sourceSpan,l=this._peek.sourceSpan.end;this._peek.type===17||this._peek.type===18||this._peek.type===9;){let u=this._advance();a.push(u),u.type===18?s+=u.parts.join("").replace(/&([^;]+);/g,Oi):u.type===9?s+=Line truncated
`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function uo(e){let t=r=>r.kind==="element"&&r.prev?.kind==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&r.firstChild?.kind==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset;e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.firstChild;r.removeChild(s),n--;let o=new p(s.sourceSpan.start,a.sourceSpan.end),l=new p(o.start,i.sourceSpan.end);i.condition=s.condition,i.sourceSpan=l,i.startSourceSpan=o,i.removeChild(a)}})}function po(e,t,r){e.walk(n=>{if(n.children)for(let i=0;i<n.children.length;i++){let s=n.children[i];if(s.kind!=="text"&&!t(s))continue;s.kind!=="text"&&(s.kind="text",s.value=r(s));let a=s.prev;!a||a.kind!=="text"||(a.value+=s.value,a.sourceSpan=new p(a.sourceSpan.start,s.sourceSpan.end),n.removeChild(s),i--)}})}function ho(e){return po(e,t=>t.kind==="cdata",t=>`<![CDATA[${t.value}]]>`)}function mo(e){let t=r=>r.kind==="element"&&r.attrs.length===0&&!J(r.startTagComments)&&r.children.length===1&&r.firstChild.kind==="text"&&!P.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&r.prev?.kind==="text"&&r.next?.kind==="text";e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let i=r.children[n];if(!t(i))continue;let s=i.prev,a=i.next;s.value+=`<${i.rawName}>`+i.firstChild.value+`</${i.rawName}>`+a.value,s.sourceSpan=new p(s.sourceSpan.start,a.sourceSpan.end),s.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,s.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(i),n--,r.removeChild(a)}})}function fo(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/s;e.walk(n=>{if(rn(n,t))for(let i of n.children){if(i.kind!=="text")continue;let s=i.sourceSpan.start,a,o=i.value.split(r);for(let l=0;l<o.length;l++,s=a){let c=o[l];if(l%2===0){a=s.moveBy(c.length),c.length>0&&n.insertChildBefore(i,{kind:"text",value:c,sourceSpan:new p(s,a)});continue}a=s.moveBy(c.length+4),n.insertChildBefore(i,{kind:"interpolation",sourceSpan:new p(s,a),children:c.length===0?[]:[{kind:"text",value:c,sourceSpan:new p(s.moveBy(2),a.moveBy(-2))}]})}n.removeChild(i)}})}function go(e,t){e.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].kind==="text"&&P.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let i=nn(r,t),s=er(r);if(!i)for(let a=0;a<n.length;a++){let o=n[a];if(o.kind!=="text")continue;let{leadingWhitespace:l,text:c,trailingWhitespace:u}=tn(o.value),d=o.prev,_=o.next;c?(o.value=c,o.sourceSpan=new p(o.sourceSpan.start.moveBy(l.length),o.sourceSpan.end.moveBy(-u.length)),l&&(d&&(d.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),u&&(o.hasTrailingSpaces=!0,_&&(_.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(l||u)&&(d&&(d.hasTrailingSpaces=!0),_&&(_.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=i,r.isIndentationSensitive=s})}function _o(e){e.walk(t=>{t.isSelfClosing=!t.children||t.kind==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function So(e,t){e.walk(r=>{r.kind==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function vo(e,t){e.walk(r=>{r.cssDisplay=fn(r,t)})}function Co(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=on(r,t);return}for(let i of n)i.isLeadingSpaceSensitive=sn(i,t),i.isTrailingSpaceSensitive=an(i,t);for(let i=0;i<n.length;i++){let s=n[i];s.isLeadingSpaceSensitive=(i===0||s.prev.isTrailingSpaceSensitive)&&s.isLeadingSpaceSensitive,s.isTrailingSpaceSensitive=(i===n.length-1||s.next.isLeadingSpaceSensitive)&&s.isTrailingSpaceSensitive}}})}var Fi=lo;function ko(e,t,r){let{node:n}=e;switch(n.kind){case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(n),[C(Ae(e,t,r)),k];case"element":case"ieConditionalComment":return li(e,t,r);case"angularControlFlowBlock":return ni(e,t,r);case"angularControlFlowBlockParameters":return si(e,t,r);case"angularControlFlowBlockParameter":return P.trim(n.expression);case"angularLetDeclaration":return C(["@let ",C([n.id," =",C(A([S,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return ai(e,t,r);case"angularIcuCase":return oi(e,t,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[me(n),ue(n)];case"interpolation":return[me(n,t),...e.map(r,"children"),ue(n,t)];case"text":{if(n.parent.kind==="interpolation"){let o=/\n[^\S\n]*$/,l=o.test(n.value),c=l?n.value.replace(o,""):n.value;return[L(c),l?k:""]}let i=B(n,t),s=Tt(n),a=M(n,t);return s[0]=[i,s[0]],s.push([s.pop(),a]),gt(s)}case"docType":return[C([me(n,t),Line truncated
@@ -0,0 +1,17 @@
export namespace enumUtil {
type UnionToIntersectionFn<T> = (T extends unknown ? (k: () => T) => void : never) extends (
k: infer Intersection
) => void
? Intersection
: never;
type GetUnionLast<T> = UnionToIntersectionFn<T> extends () => infer Last ? Last : never;
type UnionToTuple<T, Tuple extends unknown[] = []> = [T] extends [never]
? Tuple
: UnionToTuple<Exclude<T, GetUnionLast<T>>, [GetUnionLast<T>, ...Tuple]>;
type CastToStringTuple<T> = T extends [string, ...string[]] ? T : never;
export type UnionToTupleString<T> = CastToStringTuple<UnionToTuple<T>>;
}
@@ -0,0 +1,13 @@
"use strict";
// THIS CODE WAS AUTOMATICALLY GENERATED
// DO NOT EDIT THIS CODE BY HAND
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE:
// npx nx generate-lib repo
Object.defineProperty(exports, "__esModule", { value: true });
exports.es2020_intl = void 0;
const base_config_1 = require("./base-config");
const es2018_intl_1 = require("./es2018.intl");
exports.es2020_intl = {
libs: [es2018_intl_1.es2018_intl],
variables: [['Intl', base_config_1.TYPE_VALUE]],
};
@@ -0,0 +1 @@
{"version":3,"file":"simpleTaskInteractive.d.ts","sourceRoot":"","sources":["../../../../src/examples/server/simpleTaskInteractive.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG"}
@@ -0,0 +1 @@
{"version":3,"file":"package-minus.js","sources":["../../../src/icons/package-minus.ts"],"sourcesContent":["import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name PackageMinus\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview ![img](data:image/svg+xml;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogIHdpZHRoPSIyNCIKICBoZWlnaHQ9IjI0IgogIHZpZXdCb3g9IjAgMCAyNCAyNCIKICBmaWxsPSJub25lIgogIHN0cm9rZT0iIzAwMCIgc3R5bGU9ImJhY2tncm91bmQtY29sb3I6ICNmZmY7IGJvcmRlci1yYWRpdXM6IDJweCIKICBzdHJva2Utd2lkdGg9IjIiCiAgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIgogIHN0cm9rZS1saW5lam9pbj0icm91bmQiCj4KICA8cGF0aCBkPSJNMTYgMTZoNiIgLz4KICA8cGF0aCBkPSJNMjEgMTBWOGEyIDIgMCAwIDAtMS0xLjczbC03LTRhMiAyIDAgMCAwLTIgMGwtNyA0QTIgMiAwIDAgMCAzIDh2OGEyIDIgMCAwIDAgMSAxLjczbDcgNGEyIDIgMCAwIDAgMiAwbDItMS4xNCIgLz4KICA8cGF0aCBkPSJtNy41IDQuMjcgOSA1LjE1IiAvPgogIDxwb2x5bGluZSBwb2ludHM9IjMuMjkgNyAxMiAxMiAyMC43MSA3IiAvPgogIDxsaW5lIHgxPSIxMiIgeDI9IjEyIiB5MT0iMjIiIHkyPSIxMiIgLz4KPC9zdmc+Cg==) - https://lucide.dev/icons/package-minus\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 PackageMinus = createLucideIcon('PackageMinus', [\n ['path', { d: 'M16 16h6', key: '100bgy' }],\n [\n 'path',\n {\n d: 'M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14',\n key: 'e7tb2h',\n },\n ],\n ['path', { d: 'm7.5 4.27 9 5.15', key: '1c824w' }],\n ['polyline', { points: '3.29 7 12 12 20.71 7', key: 'ousv84' }],\n ['line', { x1: '12', x2: '12', y1: '22', y2: '12', key: 'a4e8g8' }],\n]);\n\nexport default PackageMinus;\n"],"names":[],"mappings":";;;;;;;;;AAaM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,iBAAiB,cAAgB,CAAA,CAAA,CAAA;AAAA,CAAA,CACpD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CACzC,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACA,CAAA,CAAA,CAAA,CAAA;AAAA,CACE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAG,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACH,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CACP,CAAA,CAAA,CAAA,CAAA;AAAA,CACF,CAAA,CAAA,CAAA;AAAA,CAAA,CACA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAE,GAAG,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAAA,CACjD,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAwB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA,CAAA;AAAA,CAC9D,CAAA,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAE,CAAA,CAAA,CAAA,EAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAM,EAAA,CAAA,CAAA,CAAA,CAAA,CAAK,UAAU,CAAA;AACpE,CAAC,CAAA,CAAA;;"}
@@ -0,0 +1,52 @@
<h1>react-remove-scroll-bar</h1>
[![npm](https://img.shields.io/npm/v/react-remove-scroll-bar.svg)](https://www.npmjs.com/package/react-remove-scroll-bar)
[![bundle size](https://badgen.net/bundlephobia/minzip/react-remove-scroll-bar)](https://bundlephobia.com/result?p=react-remove-scroll-bar)
[![downloads](https://badgen.net/npm/dm/react-remove-scroll-bar)](https://www.npmtrends.com/react-remove-scroll-bar)
<hr />
> v1+ for React 15, v2+ requires React 16.8+
Removes scroll bar (by setting `overflow: hidden` on body), and preserves the scroll bar "gap".
Read - it just makes scroll bar invisible.
Does nothing if scroll bar does not consume any space.
# Usage
```js
import {RemoveScrollBar} from 'react-remove-scroll-bar';
<RemoveScrollBar /> -> no scroll bar
```
### The Right Border
To prevent content jumps __position:fixed__ elements with `right:0` should have additional classname applied.
It will just provide a _non-zero_ right, when it needed, to maintain the right "gap".
```js
import {zeroRightClassName,fullWidthClassName, noScrollbarsClassName} from 'react-remove-scroll-bar';
// to set `right:0` on an element
<div className={zeroRightClassName} />
// to set `width:100%` on an element
<div className={fullWidthClassName} />
// to remove scrollbar from an element
<div className={noScrollbarsClassName} />
```
# Size
500b after compression (excluding tslib).
# Scroll-Locky
All code is a result of a [react-scroll-locky](https://github.com/theKashey/react-scroll-locky) refactoring.
# Article
There is a medium article about preventing the body scroll - [How to fight the <body> scroll](https://medium.com/@antonkorzunov/how-to-fight-the-body-scroll-2b00267b37ac)
# License
MIT