the latest code

This commit is contained in:
ghassan committed 2026-01-26 01:40:48 +03:00
1 parent d28bc1ed43
commit 9bbb24a52b
12226 files changed
+1455579 -21

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
import { ResolveHook } from 'node:module';
declare let resolve: ResolveHook;
export { resolve };
+1
View File
@@ -0,0 +1 @@
import{isBuiltin as i}from"module";var o=async(a,e,u)=>{let r=await u(a,e);if(r.url===import.meta.url||i(r.url)||!e.parentURL)return r;let t=new URL(e.parentURL).searchParams.get("id");if(t===null)return r;let l=new URL(r.url);return l.searchParams.set("id",t),{...r,url:`${l}`}};export{o as resolve};
+255
View File
@@ -0,0 +1,255 @@
import { AstNode as AstNode$1 } from './ast';
import { Candidate, Variant } from './candidate';
import { compileAstNodes } from './compile';
import { ClassEntry, VariantEntry, CanonicalizeOptions } from './intellisense';
import { Theme } from './theme';
import { Utilities } from './utilities';
import { Variants } from './variants';
import * as tailwindcss from 'tailwindcss';
import { Polyfills, Features } from 'tailwindcss';
export { Features, Polyfills } from 'tailwindcss';
declare const DEBUG: boolean;
declare const env_DEBUG: typeof DEBUG;
declare namespace env {
export { env_DEBUG as DEBUG };
}
declare const enum CompileAstFlags {
None = 0,
RespectImportant = 1
}
type DesignSystem = {
theme: Theme;
utilities: Utilities;
variants: Variants;
invalidCandidates: Set<string>;
important: boolean;
getClassOrder(classes: string[]): [string, bigint | null][];
getClassList(): ClassEntry[];
getVariants(): VariantEntry[];
parseCandidate(candidate: string): Readonly<Candidate>[];
parseVariant(variant: string): Readonly<Variant> | null;
compileAstNodes(candidate: Candidate, flags?: CompileAstFlags): ReturnType<typeof compileAstNodes>;
printCandidate(candidate: Candidate): string;
printVariant(variant: Variant): string;
getVariantOrder(): Map<Variant, number>;
resolveThemeValue(path: string, forceInline?: boolean): string | undefined;
trackUsedVariables(raw: string): void;
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
candidatesToCss(classes: string[]): (string | null)[];
candidatesToAst(classes: string[]): AstNode$1[][];
storage: Record<symbol, unknown>;
};
/**
* The source code for one or more nodes in the AST
*
* This generally corresponds to a stylesheet
*/
interface Source {
/**
* The path to the file that contains the referenced source code
*
* If this references the *output* source code, this is `null`.
*/
file: string | null;
/**
* The referenced source code
*/
code: string;
}
/**
* The file and offsets within it that this node covers
*
* This can represent either:
* - A location in the original CSS which caused this node to be created
* - A location in the output CSS where this node resides
*/
type SourceLocation = [source: Source, start: number, end: number];
/**
* Line offset tables are the key to generating our source maps. They allow us
* to store indexes with our AST nodes and later convert them into positions as
* when given the source that the indexes refer to.
*/
/**
* A position in source code
*
* https://tc39.es/ecma426/#sec-position-record-type
*/
interface Position {
/** The line number, one-based */
line: number;
/** The column/character number, one-based */
column: number;
}
interface OriginalPosition extends Position {
source: DecodedSource;
}
/**
* A "decoded" sourcemap
*
* @see https://tc39.es/ecma426/#decoded-source-map-record
*/
interface DecodedSourceMap {
file: string | null;
sources: DecodedSource[];
mappings: DecodedMapping[];
}
/**
* A "decoded" source
*
* @see https://tc39.es/ecma426/#decoded-source-record
*/
interface DecodedSource {
url: string | null;
content: string | null;
ignore: boolean;
}
/**
* A "decoded" mapping
*
* @see https://tc39.es/ecma426/#decoded-mapping-record
*/
interface DecodedMapping {
originalPosition: OriginalPosition | null;
generatedPosition: Position;
name: string | null;
}
type StyleRule = {
kind: 'rule';
selector: string;
nodes: AstNode[];
src?: SourceLocation;
dst?: SourceLocation;
};
type AtRule = {
kind: 'at-rule';
name: string;
params: string;
nodes: AstNode[];
src?: SourceLocation;
dst?: SourceLocation;
};
type Declaration = {
kind: 'declaration';
property: string;
value: string | undefined;
important: boolean;
src?: SourceLocation;
dst?: SourceLocation;
};
type Comment = {
kind: 'comment';
value: string;
src?: SourceLocation;
dst?: SourceLocation;
};
type Context = {
kind: 'context';
context: Record<string, string | boolean>;
nodes: AstNode[];
src?: undefined;
dst?: undefined;
};
type AtRoot = {
kind: 'at-root';
nodes: AstNode[];
src?: undefined;
dst?: undefined;
};
type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot;
type Resolver = (id: string, base: string) => Promise<string | false | undefined>;
interface CompileOptions {
base: string;
from?: string;
onDependency: (path: string) => void;
shouldRewriteUrls?: boolean;
polyfills?: Polyfills;
customCssResolver?: Resolver;
customJsResolver?: Resolver;
}
declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{
sources: {
base: string;
pattern: string;
negated: boolean;
}[];
root: "none" | {
base: string;
pattern: string;
} | null;
features: Features;
build(candidates: string[]): AstNode[];
}>;
declare function compile(css: string, options: CompileOptions): Promise<{
sources: {
base: string;
pattern: string;
negated: boolean;
}[];
root: "none" | {
base: string;
pattern: string;
} | null;
features: Features;
build(candidates: string[]): string;
buildSourceMap(): tailwindcss.DecodedSourceMap;
}>;
declare function __unstable__loadDesignSystem(css: string, { base }: {
base: string;
}): Promise<DesignSystem>;
declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{
path: string;
base: string;
module: any;
}>;
declare class Instrumentation implements Disposable {
#private;
private defaultFlush;
constructor(defaultFlush?: (message: string) => undefined);
hit(label: string): void;
start(label: string): void;
end(label: string): void;
reset(): void;
report(flush?: (message: string) => undefined): void;
[Symbol.dispose](): void;
}
declare function normalizePath(originalPath: string): string;
interface OptimizeOptions {
/**
* The file being transformed
*/
file?: string;
/**
* Enabled minified output
*/
minify?: boolean;
/**
* The output source map before optimization
*
* If omitted a resulting source map will not be available
*/
map?: string;
}
interface TransformResult {
code: string;
map: string | undefined;
}
declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult;
interface SourceMap {
readonly raw: string;
readonly inline: string;
}
declare function toSourceMap(map: DecodedSourceMap | string): SourceMap;
export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap };
+255
View File
@@ -0,0 +1,255 @@
import { AstNode as AstNode$1 } from './ast';
import { Candidate, Variant } from './candidate';
import { compileAstNodes } from './compile';
import { ClassEntry, VariantEntry, CanonicalizeOptions } from './intellisense';
import { Theme } from './theme';
import { Utilities } from './utilities';
import { Variants } from './variants';
import * as tailwindcss from 'tailwindcss';
import { Polyfills, Features } from 'tailwindcss';
export { Features, Polyfills } from 'tailwindcss';
declare const DEBUG: boolean;
declare const env_DEBUG: typeof DEBUG;
declare namespace env {
export { env_DEBUG as DEBUG };
}
declare const enum CompileAstFlags {
None = 0,
RespectImportant = 1
}
type DesignSystem = {
theme: Theme;
utilities: Utilities;
variants: Variants;
invalidCandidates: Set<string>;
important: boolean;
getClassOrder(classes: string[]): [string, bigint | null][];
getClassList(): ClassEntry[];
getVariants(): VariantEntry[];
parseCandidate(candidate: string): Readonly<Candidate>[];
parseVariant(variant: string): Readonly<Variant> | null;
compileAstNodes(candidate: Candidate, flags?: CompileAstFlags): ReturnType<typeof compileAstNodes>;
printCandidate(candidate: Candidate): string;
printVariant(variant: Variant): string;
getVariantOrder(): Map<Variant, number>;
resolveThemeValue(path: string, forceInline?: boolean): string | undefined;
trackUsedVariables(raw: string): void;
canonicalizeCandidates(candidates: string[], options?: CanonicalizeOptions): string[];
candidatesToCss(classes: string[]): (string | null)[];
candidatesToAst(classes: string[]): AstNode$1[][];
storage: Record<symbol, unknown>;
};
/**
* The source code for one or more nodes in the AST
*
* This generally corresponds to a stylesheet
*/
interface Source {
/**
* The path to the file that contains the referenced source code
*
* If this references the *output* source code, this is `null`.
*/
file: string | null;
/**
* The referenced source code
*/
code: string;
}
/**
* The file and offsets within it that this node covers
*
* This can represent either:
* - A location in the original CSS which caused this node to be created
* - A location in the output CSS where this node resides
*/
type SourceLocation = [source: Source, start: number, end: number];
/**
* Line offset tables are the key to generating our source maps. They allow us
* to store indexes with our AST nodes and later convert them into positions as
* when given the source that the indexes refer to.
*/
/**
* A position in source code
*
* https://tc39.es/ecma426/#sec-position-record-type
*/
interface Position {
/** The line number, one-based */
line: number;
/** The column/character number, one-based */
column: number;
}
interface OriginalPosition extends Position {
source: DecodedSource;
}
/**
* A "decoded" sourcemap
*
* @see https://tc39.es/ecma426/#decoded-source-map-record
*/
interface DecodedSourceMap {
file: string | null;
sources: DecodedSource[];
mappings: DecodedMapping[];
}
/**
* A "decoded" source
*
* @see https://tc39.es/ecma426/#decoded-source-record
*/
interface DecodedSource {
url: string | null;
content: string | null;
ignore: boolean;
}
/**
* A "decoded" mapping
*
* @see https://tc39.es/ecma426/#decoded-mapping-record
*/
interface DecodedMapping {
originalPosition: OriginalPosition | null;
generatedPosition: Position;
name: string | null;
}
type StyleRule = {
kind: 'rule';
selector: string;
nodes: AstNode[];
src?: SourceLocation;
dst?: SourceLocation;
};
type AtRule = {
kind: 'at-rule';
name: string;
params: string;
nodes: AstNode[];
src?: SourceLocation;
dst?: SourceLocation;
};
type Declaration = {
kind: 'declaration';
property: string;
value: string | undefined;
important: boolean;
src?: SourceLocation;
dst?: SourceLocation;
};
type Comment = {
kind: 'comment';
value: string;
src?: SourceLocation;
dst?: SourceLocation;
};
type Context = {
kind: 'context';
context: Record<string, string | boolean>;
nodes: AstNode[];
src?: undefined;
dst?: undefined;
};
type AtRoot = {
kind: 'at-root';
nodes: AstNode[];
src?: undefined;
dst?: undefined;
};
type AstNode = StyleRule | AtRule | Declaration | Comment | Context | AtRoot;
type Resolver = (id: string, base: string) => Promise<string | false | undefined>;
interface CompileOptions {
base: string;
from?: string;
onDependency: (path: string) => void;
shouldRewriteUrls?: boolean;
polyfills?: Polyfills;
customCssResolver?: Resolver;
customJsResolver?: Resolver;
}
declare function compileAst(ast: AstNode[], options: CompileOptions): Promise<{
sources: {
base: string;
pattern: string;
negated: boolean;
}[];
root: "none" | {
base: string;
pattern: string;
} | null;
features: Features;
build(candidates: string[]): AstNode[];
}>;
declare function compile(css: string, options: CompileOptions): Promise<{
sources: {
base: string;
pattern: string;
negated: boolean;
}[];
root: "none" | {
base: string;
pattern: string;
} | null;
features: Features;
build(candidates: string[]): string;
buildSourceMap(): tailwindcss.DecodedSourceMap;
}>;
declare function __unstable__loadDesignSystem(css: string, { base }: {
base: string;
}): Promise<DesignSystem>;
declare function loadModule(id: string, base: string, onDependency: (path: string) => void, customJsResolver?: Resolver): Promise<{
path: string;
base: string;
module: any;
}>;
declare class Instrumentation implements Disposable {
#private;
private defaultFlush;
constructor(defaultFlush?: (message: string) => undefined);
hit(label: string): void;
start(label: string): void;
end(label: string): void;
reset(): void;
report(flush?: (message: string) => undefined): void;
[Symbol.dispose](): void;
}
declare function normalizePath(originalPath: string): string;
interface OptimizeOptions {
/**
* The file being transformed
*/
file?: string;
/**
* Enabled minified output
*/
minify?: boolean;
/**
* The output source map before optimization
*
* If omitted a resulting source map will not be available
*/
map?: string;
}
interface TransformResult {
code: string;
map: string | undefined;
}
declare function optimize(input: string, { file, minify, map }?: OptimizeOptions): TransformResult;
interface SourceMap {
readonly raw: string;
readonly inline: string;
}
declare function toSourceMap(map: DecodedSourceMap | string): SourceMap;
export { type CompileOptions, type DecodedSource, type DecodedSourceMap, Instrumentation, type OptimizeOptions, type Resolver, type SourceMap, type TransformResult, __unstable__loadDesignSystem, compile, compileAst, env, loadModule, normalizePath, optimize, toSourceMap };
+18
View File
@@ -0,0 +1,18 @@
"use strict";var It=Object.create;var ne=Object.defineProperty;var Dt=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var Lt=Object.getPrototypeOf,Kt=Object.prototype.hasOwnProperty;var Le=(e,r)=>{for(var t in r)ne(e,t,{get:r[t],enumerable:!0})},Ke=(e,r,t,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of Ut(r))!Kt.call(e,o)&&o!==t&&ne(e,o,{get:()=>r[o],enumerable:!(i=Dt(r,o))||i.enumerable});return e};var T=(e,r,t)=>(t=e!=null?It(Lt(e)):{},Ke(r||!e||!e.__esModule?ne(t,"default",{value:e,enumerable:!0}):t,e)),zt=e=>Ke(ne({},"__esModule",{value:!0}),e);var ci={};Le(ci,{Features:()=>O.Features,Instrumentation:()=>Ue,Polyfills:()=>O.Polyfills,__unstable__loadDesignSystem:()=>ti,compile:()=>ei,compileAst:()=>Xr,env:()=>oe,loadModule:()=>Ie,normalizePath:()=>me,optimize:()=>li,toSourceMap:()=>fi});module.exports=zt(ci);var Pt=T(require("module")),_t=require("url");var oe={};Le(oe,{DEBUG:()=>ve});var ve=Mt(process.env.DEBUG);function Mt(e){if(typeof e=="boolean")return e;if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}var j=T(require("enhanced-resolve")),St=require("jiti"),ge=T(require("fs")),_e=T(require("fs/promises")),re=T(require("path")),Oe=require("url"),O=require("tailwindcss");var ae=T(require("fs/promises")),B=T(require("path")),Ft=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],jt=[".js",".cjs",".mjs"],Wt=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Bt=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function Yt(e,r){for(let t of r){let i=`${e}${t}`;if((await ae.default.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await ae.default.access(i).then(()=>!0,()=>!1))return i}return null}async function ze(e,r,t,i){let o=jt.includes(i)?Wt:Bt,a=await Yt(B.default.resolve(t,r),o);if(a===null||e.has(a))return;e.add(a),t=B.default.dirname(a),i=B.default.extname(a);let n=await ae.default.readFile(a,"utf-8"),s=[];for(let l of Ft)for(let u of n.matchAll(l))u[1].startsWith(".")&&s.push(ze(e,u[1],t,i));await Promise.all(s)}async function Me(e){let r=new Set;return await ze(r,e,B.default.dirname(e),B.default.extname(e)),Array.from(r)}var Ve=T(require("path"));function Y(e){return{kind:"word",value:e}}function Gt(e,r){return{kind:"function",value:e,nodes:r}}function Ht(e){return{kind:"separator",value:e}}function S(e){let r="";for(let t of e)switch(t.kind){case"word":case"separator":{r+=t.value;break}case"function":r+=t.value+"("+S(t.nodes)+")"}return r}var Fe=92,qt=41,je=58,We=44,Zt=34,Be=61,Ye=62,Ge=60,He=10,Qt=40,Jt=39,Xt=47,qe=32,Ze=9;function A(e){e=e.replaceAll(`\r
`,`
`);let r=[],t=[],i=null,o="",a;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);switch(s){case Fe:{o+=e[n]+e[n+1],n++;break}case Xt:{if(o.length>0){let u=Y(o);i?i.nodes.push(u):r.push(u),o=""}let l=Y(e[n]);i?i.nodes.push(l):r.push(l);break}case je:case We:case Be:case Ye:case Ge:case He:case qe:case Ze:{if(o.length>0){let c=Y(o);i?i.nodes.push(c):r.push(c),o=""}let l=n,u=n+1;for(;u<e.length&&(a=e.charCodeAt(u),!(a!==je&&a!==We&&a!==Be&&a!==Ye&&a!==Ge&&a!==He&&a!==qe&&a!==Ze));u++);n=u-1;let p=Ht(e.slice(l,u));i?i.nodes.push(p):r.push(p);break}case Jt:case Zt:{let l=n;for(let u=n+1;u<e.length;u++)if(a=e.charCodeAt(u),a===Fe)u+=1;else if(a===s){n=u;break}o+=e.slice(l,n+1);break}case Qt:{let l=Gt(o,[]);o="",i?i.nodes.push(l):r.push(l),t.push(l),i=l;break}case qt:{let l=t.pop();if(o.length>0){let u=Y(o);l?.nodes.push(u),o=""}t.length>0?i=t[t.length-1]:i=null;break}default:o+=String.fromCharCode(s)}}return o.length>0&&r.push(Y(o)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var yi=new Uint8Array(256);var le=new Uint8Array(256);function y(e,r){let t=0,i=[],o=0,a=e.length,n=r.charCodeAt(0);for(let s=0;s<a;s++){let l=e.charCodeAt(s);if(t===0&&l===n){i.push(e.slice(o,s)),o=s+1;continue}switch(l){case 92:s+=1;break;case 39:case 34:for(;++s<a;){let u=e.charCodeAt(s);if(u===92){s+=1;continue}if(u===l)break}break;case 40:le[t]=41,t++;break;case 91:le[t]=93,t++;break;case 123:le[t]=125,t++;break;case 93:case 125:case 41:t>0&&l===le[t-1]&&t--;break}}return i.push(e.slice(o)),i}var we=(n=>(n[n.Continue=0]="Continue",n[n.Skip=1]="Skip",n[n.Stop=2]="Stop",n[n.Replace=3]="Replace",n[n.ReplaceSkip=4]="ReplaceSkip",n[n.ReplaceStop=5]="ReplaceStop",n))(we||{}),w={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function v(e,r){typeof r=="function"?Qe(e,r):Qe(e,r.enter,r.exit)}function Qe(e,r=()=>w.Continue,t=()=>w.Continue){let i=[[e,0,null]],o={parent:null,depth:0,path(){let a=[];for(let n=1;n<i.length;n++){let s=i[n][2];s&&a.push(s)}return a}};for(;i.length>0;){let a=i.length-1,n=i[a],s=n[0],l=n[1],u=n[2];if(l>=s.length){i.pop();continue}if(o.parent=u,o.depth=a,l>=0){let m=s[l],d=r(m,o)??w.Continue;switch(d.kind){case 0:{m.nodes&&m.nodes.length>0&&i.push([m.nodes,0,m]),n[1]=~l;continue}case 2:return;case 1:{n[1]=~l;continue}case 3:{s.splice(l,1,...d.nodes);continue}case 5:{s.splice(l,1,...d.nodes);return}case 4:{s.splice(l,1,...d.nodes),n[1]+=d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${we[d.kind]??`Unknown(${d.kind})`}\` in enter.`)}}let p=~l,c=s[p],f=t(c,o)??w.Continue;switch(f.kind){case 0:n[1]=p+1;continue;case 2:return;case 3:{s.splice(p,1,...f.nodes),n[1]=p+f.nodes.length;continue}case 5:{s.splice(p,1,...f.nodes);return}case 4:{s.splice(p,1,...f.nodes),n[1]=p+f.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${we[f.kind]??`Unknown(${f.kind})`}\` in exit.`)}}}var Vi=new g(e=>{let r=A(e),t=new Set;return v(r,(i,o)=>{let a=o.parent===null?r:o.parent.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let n=a.indexOf(i)??-1;if(n===-1)return;let s=a[n-1];if(s?.kind!=="separator"||s.value!==" ")return;let l=a[n+1];if(l?.kind!=="separator"||l.value!==" ")return;t.add(s),t.add(l)}else i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(a[0]===i||a[a.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&v(r,i=>{if(t.has(i))return t.delete(i),w.ReplaceSkip([])}),ye(r),S(r)});var Ri=new g(e=>{let r=A(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?S(r[2].nodes):e});function ye(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=G(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=G(r.value);for(let t=0;t<r.nodes.length;t++)ye([r.nodes[t]]);break}r.value=G(r.value),ye(r.nodes);break}case"separator":r.value=G(r.value);break;case"word":{(r.value[0]!=="-"||r.value[1]!=="-")&&(r.value=G(r.value));break}default:er(r)}}var Oi=new g(e=>{let r=A(e);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function er(e){throw new Error(`Unexpected value: ${e}`)}function G(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var tr=process.env.FEATURES_ENV!=="stable";var _=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,Fi=new RegExp(`^${_.source}$`);var ji=new RegExp(`^${_.source}%$`);var Wi=new RegExp(`^${_.source}s*/s*${_.source}$`);var rr=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],Bi=new RegELine truncated
`,r){t+=u.length;let p=t;t+=n.property.length,t+=2,t+=n.value?.length??0,n.important&&(t+=11);let c=t;t+=2,n.dst=[i,p,c]}}else if(n.kind==="rule"){if(l+=`${u}${n.selector} {
`,r){t+=u.length;let p=t;t+=n.selector.length,t+=1;let c=t;n.dst=[i,p,c],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
`,r&&(t+=u.length,t+=2)}else if(n.kind==="at-rule"){if(n.nodes.length===0){let p=`${u}${n.name} ${n.params};
`;if(r){t+=u.length;let c=t;t+=n.name.length,t+=1,t+=n.params.length;let f=t;t+=2,n.dst=[i,c,f]}return p}if(l+=`${u}${n.name}${n.params?` ${n.params} `:" "}{
`,r){t+=u.length;let p=t;t+=n.name.length,n.params&&(t+=1,t+=n.params.length),t+=1;let c=t;n.dst=[i,p,c],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
`,r&&(t+=u.length,t+=2)}else if(n.kind==="comment"){if(l+=`${u}/*${n.value}*/
`,r){t+=u.length;let p=t;t+=2+n.value.length+2;let c=t;n.dst=[i,p,c],t+=1}}else if(n.kind==="context"||n.kind==="at-root")return"";return l}let a="";for(let n of e)a+=o(n,0);return i.code=a,a}function Lr(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var t=e.length;if(t<=1)return e;var i="";if(t>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var a=e.split(/[/\\]+/);return r!==!1&&a[a.length-1]===""&&a.pop(),i+a.join("/")}function me(e){let r=Lr(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Re=/(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/,vt=/(?<=image-set\()((?:[\w-]{1,256}\([^)]*\)|[^)])*)(?=\))/,Kr=/(?:gradient|element|cross-fade|image)\(/,zr=/^\s*data:/i,Mr=/^([a-z]+:)?\/\//,Fr=/^[A-Z_][.\w-]*\(/i,jr=/(?:^|\s)(?<url>[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?<descriptor>\w[^,]+))?(?:,|$)/g,Wr=/(?<!\\)"/g,Br=/(?: |\\t|\\n|\\f|\\r)+/g,Yr=e=>zr.test(e),Gr=e=>Mr.test(e);async function wt({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=te(e),o=[];function a(n){if(n[0]==="/")return n;let s=Ve.posix.join(me(r),n),l=Ve.posix.relative(me(t),s);return l.startsWith(".")||(l="./"+l),l}return v(i,n=>{if(n.kind!=="declaration"||!n.value)return;let s=Re.test(n.value),l=vt.test(n.value);if(s||l){let u=l?Hr:yt;o.push(u(n.value,a).then(p=>{n.value=p}))}}),o.length&&await Promise.all(o),M(i)}function yt(e,r){return bt(e,Re,async t=>{let[i,o]=t;return await kt(o.trim(),i,r)})}async function Hr(e,r){return await bt(e,vt,async t=>{let[,i]=t;return await Zr(i,async({url:a})=>Re.test(a)?await yt(a,r):Kr.test(a)?a:await kt(a,a,r))})}async function kt(e,r,t,i="url"){let o="",a=e[0];if((a==='"'||a==="'")&&(o=a,e=e.slice(1,-1)),qr(e))return r;let n=await t(e);return o===""&&n!==encodeURI(n)&&(o='"'),o==="'"&&n.includes("'")&&(o='"'),o==='"'&&n.includes('"')&&(n=n.replace(Wr,'\\"')),`${i}(${o}${n}${o})`}function qr(e,r){return Gr(e)||Yr(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||Fr.test(e)}function Zr(e,r){return Promise.all(Qr(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(Jr)}function Qr(e){let r=e.trim().replace(Br," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(jr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function Jr(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function bt(e,r,t){let i,o=e,a="";for(;i=r.exec(o);)a+=o.slice(0,i.index),a+=await t(i),o=o.slice(i.index+i[0].length);return a+=o,a}var ai={};function $t({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:o,customCssResolver:a,customJsResolver:n}){return{base:e,polyfills:t,from:r,async loadModule(s,l){return Ie(s,l,i,n)},async loadStylesheet(s,l){let u=await Et(s,l,i,a);return o&&(u.content=await wt({css:u.content,root:e,base:u.base})),u}}}async function Tt(e){if(e.root&&e.root!=="none"){let r=/[*{]/,t=[];for(let o of e.root.pattern.split("/")){if(r.test(o))break;t.push(o)}if(!await _e.default.stat(re.default.resolve(e.root.base,t.join("/"))).then(o=>o.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist or is not a directory.`)}}async function Xr(e,r){let t=await(0,O.compileAst)(e,$t(r));return await Tt(t),t}async function ei(e,r){let t=await(0,O.compile)(e,$t(r));return await Tt(t),t}async function ti(e,{base:r}){return(0,O.__unstable__loadDesignSystem)(e,{base:r,async loadModule(t,i){return Ie(t,i,()=>{})},async loadStylesheet(t,i){return Et(t,i,()=>{})}})}async function Ie(e,r,t,i){if(e[0]!=="."){let s=await Ct(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let l=await At((0,Oe.pathToFileURL)(s).href);return{path:s,base:re.default.dirname(s),module:l.default??l}}let o=await Ct(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);let[a,n]=await Promise.all([At((0,Oe.pathToFileURL)(o).href+"?id="+Date.now()),Me(o)]);for(let s of n)t(s);return{path:o,base:re.default.dirname(o),module:a.default??a}}async function Et(e,r,t,i){let o=await ii(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);t(o);let a=await _e.default.readFile(o,"utf-8");return{path:o,base:re.default.dirname(o),content:a}}var xt=null;async function At(e){if(typeof globalThis.__tw_load=="function"){let r=await globalThis.__tw_load(e);if(r)return r}try{return await import(e)}catch{return xt??=(0,St.createJiti)(ai.url,{moduleCache:!1,fsCache:!1}),await xt.import(e)}}var De=["node_modules",...process.env.NODE_PATH?[process.env.NODE_PATH]:[]],ri=j.default.ResolverFactory.createResolver({fileSystem:new j.default.CachedInputFileSystem(ge.default,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"],modules:De});async function ii(e,r,t){if(typeof globalThiLine truncated
`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(o=>o.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),o=t-i.value;this.#t.get(i.id).value+=o}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let n=this.#e.length-1;n>=0;n--)this.end(this.#e[n].label);for(let[n,{value:s}]of this.#r.entries()){if(this.#t.has(n))continue;t.length===0&&(i=!0,t.push("Hits:"));let l=n.split("//").length;t.push(`${" ".repeat(l)}${n} ${he(Nt(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(`
Timers:`);let o=-1/0,a=new Map;for(let[n,{value:s}]of this.#t){let l=`${(Number(s)/1e6).toFixed(2)}ms`;a.set(n,l),o=Math.max(o,l.length)}for(let n of this.#t.keys()){let s=n.split("//").length;t.push(`${he(`[${a.get(n).padStart(o," ")}]`)}${" ".repeat(s-1)}${s===1?" ":he(" \u21B3 ")}${n.split("//").pop()} ${this.#r.get(n).value===1?"":he(Nt(`\xD7 ${this.#r.get(n).value}`))}`.trimEnd())}r(`
${t.join(`
`)}
`),this.reset()}[Symbol.dispose](){ve&&this.report()}};function he(e){return`\x1B[2m${e}\x1B[22m`}function Nt(e){return`\x1B[34m${e}\x1B[39m`}var Vt=T(require("@jridgewell/remapping")),U=require("lightningcss"),Rt=T(require("magic-string"));function li(e,{file:r="input.css",minify:t=!1,map:i}={}){function o(l,u){return(0,U.transform)({filename:r,code:l,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:U.Features.Nesting|U.Features.MediaQueries,exclude:U.Features.LogicalProperties|U.Features.DirSelector|U.Features.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let a=o(Buffer.from(e),i);if(i=a.map?.toString(),a.warnings=a.warnings.filter(l=>!/'(deep|slotted|global)' is not recognized as a valid pseudo-/.test(l.message)),a.warnings.length>0){let l=e.split(`
`),u=[`Found ${a.warnings.length} ${a.warnings.length===1?"warning":"warnings"} while optimizing generated CSS:`];for(let[p,c]of a.warnings.entries()){u.push(""),a.warnings.length>1&&u.push(`Issue #${p+1}:`);let f=2,m=Math.max(0,c.loc.line-f-1),d=Math.min(l.length,c.loc.line+f),x=l.slice(m,d).map((h,L)=>m+L+1===c.loc.line?`${ie("\u2502")} ${h}`:ie(`\u2502 ${h}`));x.splice(c.loc.line-m,0,`${ie("\u2506")}${" ".repeat(c.loc.column-1)} ${si(`${ie("^--")} ${c.message}`)}`,`${ie("\u2506")}`),u.push(...x)}u.push(""),console.warn(u.join(`
`))}a=o(a.code,i),i=a.map?.toString();let n=a.code.toString(),s=new Rt.default(n);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let l=s.generateMap({source:"original",hires:"boundary"}).toString();i=(0,Vt.default)([l,i],()=>null).toString()}return n=s.toString(),{code:n,map:i}}function ie(e){return`\x1B[2m${e}\x1B[22m`}function si(e){return`\x1B[33m${e}\x1B[39m`}var Ot=require("source-map-js");function ui(e){let r=new Ot.SourceMapGenerator,t=1,i=new g(o=>({url:o?.url??`<unknown ${t++}>`,content:o?.content??"<none>"}));for(let o of e.mappings){let a=i.get(o.originalPosition?.source??null);r.addMapping({generated:o.generatedPosition,original:o.originalPosition,source:a.url,name:o.name}),r.setSourceContent(a.url,a.content)}return r.toString()}function fi(e){let r=typeof e=="string"?e:ui(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */
`,t}}}process.versions.bun||Pt.register?.((0,_t.pathToFileURL)(require.resolve("@tailwindcss/node/esm-cache-loader")));0&&(module.exports={Features,Instrumentation,Polyfills,__unstable__loadDesignSystem,compile,compileAst,env,loadModule,normalizePath,optimize,toSourceMap});
+18
View File
@@ -0,0 +1,18 @@
var St=Object.defineProperty;var $t=(e,r)=>{for(var t in r)St(e,t,{get:r[t],enumerable:!0})};import*as ce from"module";import{pathToFileURL as Xr}from"url";var pe={};$t(pe,{DEBUG:()=>fe});var fe=Tt(process.env.DEBUG);function Tt(e){if(typeof e=="boolean")return e;if(e===void 0)return!1;if(e==="true"||e==="1")return!0;if(e==="false"||e==="0")return!1;if(e==="*")return!0;let r=e.split(",").map(t=>t.split(":")[0]);return r.includes("-tailwindcss")?!1:!!r.includes("tailwindcss")}import F from"enhanced-resolve";import{createJiti as Kr}from"jiti";import Ve from"fs";import wt from"fs/promises";import se from"path";import{pathToFileURL as mt}from"url";import{__unstable__loadDesignSystem as zr,compile as Mr,compileAst as Fr,Features as ru,Polyfills as iu}from"tailwindcss";import de from"fs/promises";import j from"path";var Et=[/import[\s\S]*?['"](.{3,}?)['"]/gi,/import[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/export[\s\S]*from[\s\S]*?['"](.{3,}?)['"]/gi,/require\(['"`](.+)['"`]\)/gi],Nt=[".js",".cjs",".mjs"],Vt=["",".js",".cjs",".mjs",".ts",".cts",".mts",".jsx",".tsx"],Rt=["",".ts",".cts",".mts",".tsx",".js",".cjs",".mjs",".jsx"];async function Ot(e,r){for(let t of r){let i=`${e}${t}`;if((await de.stat(i).catch(()=>null))?.isFile())return i}for(let t of r){let i=`${e}/index${t}`;if(await de.access(i).then(()=>!0,()=>!1))return i}return null}async function Oe(e,r,t,i){let o=Nt.includes(i)?Vt:Rt,a=await Ot(j.resolve(t,r),o);if(a===null||e.has(a))return;e.add(a),t=j.dirname(a),i=j.extname(a);let n=await de.readFile(a,"utf-8"),s=[];for(let l of Et)for(let u of n.matchAll(l))u[1].startsWith(".")&&s.push(Oe(e,u[1],t,i));await Promise.all(s)}async function Pe(e){let r=new Set;return await Oe(r,e,j.dirname(e),j.extname(e)),Array.from(r)}import*as Te from"path";function M(e){return{kind:"word",value:e}}function Pt(e,r){return{kind:"function",value:e,nodes:r}}function _t(e){return{kind:"separator",value:e}}function S(e){let r="";for(let t of e)switch(t.kind){case"word":case"separator":{r+=t.value;break}case"function":r+=t.value+"("+S(t.nodes)+")"}return r}var _e=92,It=41,Ie=58,De=44,Dt=34,Ue=61,Le=62,Ke=60,ze=10,Ut=40,Lt=39,Kt=47,Me=32,Fe=9;function A(e){e=e.replaceAll(`\r
`,`
`);let r=[],t=[],i=null,o="",a;for(let n=0;n<e.length;n++){let s=e.charCodeAt(n);switch(s){case _e:{o+=e[n]+e[n+1],n++;break}case Kt:{if(o.length>0){let u=M(o);i?i.nodes.push(u):r.push(u),o=""}let l=M(e[n]);i?i.nodes.push(l):r.push(l);break}case Ie:case De:case Ue:case Le:case Ke:case ze:case Me:case Fe:{if(o.length>0){let f=M(o);i?i.nodes.push(f):r.push(f),o=""}let l=n,u=n+1;for(;u<e.length&&(a=e.charCodeAt(u),!(a!==Ie&&a!==De&&a!==Ue&&a!==Le&&a!==Ke&&a!==ze&&a!==Me&&a!==Fe));u++);n=u-1;let p=_t(e.slice(l,u));i?i.nodes.push(p):r.push(p);break}case Lt:case Dt:{let l=n;for(let u=n+1;u<e.length;u++)if(a=e.charCodeAt(u),a===_e)u+=1;else if(a===s){n=u;break}o+=e.slice(l,n+1);break}case Ut:{let l=Pt(o,[]);o="",i?i.nodes.push(l):r.push(l),t.push(l),i=l;break}case It:{let l=t.pop();if(o.length>0){let u=M(o);l?.nodes.push(u),o=""}t.length>0?i=t[t.length-1]:i=null;break}default:o+=String.fromCharCode(s)}}return o.length>0&&r.push(M(o)),r}var g=class extends Map{constructor(t){super();this.factory=t}get(t){let i=super.get(t);return i===void 0&&(i=this.factory(t,this),this.set(t,i)),i}};var ui=new Uint8Array(256);var te=new Uint8Array(256);function y(e,r){let t=0,i=[],o=0,a=e.length,n=r.charCodeAt(0);for(let s=0;s<a;s++){let l=e.charCodeAt(s);if(t===0&&l===n){i.push(e.slice(o,s)),o=s+1;continue}switch(l){case 92:s+=1;break;case 39:case 34:for(;++s<a;){let u=e.charCodeAt(s);if(u===92){s+=1;continue}if(u===l)break}break;case 40:te[t]=41,t++;break;case 91:te[t]=93,t++;break;case 123:te[t]=125,t++;break;case 93:case 125:case 41:t>0&&l===te[t-1]&&t--;break}}return i.push(e.slice(o)),i}var me=(n=>(n[n.Continue=0]="Continue",n[n.Skip=1]="Skip",n[n.Stop=2]="Stop",n[n.Replace=3]="Replace",n[n.ReplaceSkip=4]="ReplaceSkip",n[n.ReplaceStop=5]="ReplaceStop",n))(me||{}),w={Continue:{kind:0},Skip:{kind:1},Stop:{kind:2},Replace:e=>({kind:3,nodes:Array.isArray(e)?e:[e]}),ReplaceSkip:e=>({kind:4,nodes:Array.isArray(e)?e:[e]}),ReplaceStop:e=>({kind:5,nodes:Array.isArray(e)?e:[e]})};function v(e,r){typeof r=="function"?je(e,r):je(e,r.enter,r.exit)}function je(e,r=()=>w.Continue,t=()=>w.Continue){let i=[[e,0,null]],o={parent:null,depth:0,path(){let a=[];for(let n=1;n<i.length;n++){let s=i[n][2];s&&a.push(s)}return a}};for(;i.length>0;){let a=i.length-1,n=i[a],s=n[0],l=n[1],u=n[2];if(l>=s.length){i.pop();continue}if(o.parent=u,o.depth=a,l>=0){let m=s[l],d=r(m,o)??w.Continue;switch(d.kind){case 0:{m.nodes&&m.nodes.length>0&&i.push([m.nodes,0,m]),n[1]=~l;continue}case 2:return;case 1:{n[1]=~l;continue}case 3:{s.splice(l,1,...d.nodes);continue}case 5:{s.splice(l,1,...d.nodes);return}case 4:{s.splice(l,1,...d.nodes),n[1]+=d.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${me[d.kind]??`Unknown(${d.kind})`}\` in enter.`)}}let p=~l,f=s[p],c=t(f,o)??w.Continue;switch(c.kind){case 0:n[1]=p+1;continue;case 2:return;case 3:{s.splice(p,1,...c.nodes),n[1]=p+c.nodes.length;continue}case 5:{s.splice(p,1,...c.nodes);return}case 4:{s.splice(p,1,...c.nodes),n[1]=p+c.nodes.length;continue}default:throw new Error(`Invalid \`WalkAction.${me[c.kind]??`Unknown(${c.kind})`}\` in exit.`)}}}var ki=new g(e=>{let r=A(e),t=new Set;return v(r,(i,o)=>{let a=o.parent===null?r:o.parent.nodes??[];if(i.kind==="word"&&(i.value==="+"||i.value==="-"||i.value==="*"||i.value==="/")){let n=a.indexOf(i)??-1;if(n===-1)return;let s=a[n-1];if(s?.kind!=="separator"||s.value!==" ")return;let l=a[n+1];if(l?.kind!=="separator"||l.value!==" ")return;t.add(s),t.add(l)}else i.kind==="separator"&&i.value.length>0&&i.value.trim()===""?(a[0]===i||a[a.length-1]===i)&&t.add(i):i.kind==="separator"&&i.value.trim()===","&&(i.value=",")}),t.size>0&&v(r,i=>{if(t.has(i))return t.delete(i),w.ReplaceSkip([])}),ge(r),S(r)});var bi=new g(e=>{let r=A(e);return r.length===3&&r[0].kind==="word"&&r[0].value==="&"&&r[1].kind==="separator"&&r[1].value===":"&&r[2].kind==="function"&&r[2].value==="is"?S(r[2].nodes):e});function ge(e){for(let r of e)switch(r.kind){case"function":{if(r.value==="url"||r.value.endsWith("_url")){r.value=W(r.value);break}if(r.value==="var"||r.value.endsWith("_var")||r.value==="theme"||r.value.endsWith("_theme")){r.value=W(r.value);for(let t=0;t<r.nodes.length;t++)ge([r.nodes[t]]);break}r.value=W(r.value),ge(r.nodes);break}case"separator":r.value=W(r.value);break;case"word":{(r.value[0]!=="-"||r.value[1]!=="-")&&(r.value=W(r.value));break}default:zt(r)}}var xi=new g(e=>{let r=A(e);return r.length===1&&r[0].kind==="function"&&r[0].value==="var"});function zt(e){throw new Error(`Unexpected value: ${e}`)}function W(e){return e.replaceAll("_",String.raw`\_`).replaceAll(" ","_")}var Mt=process.env.FEATURES_ENV!=="stable";var O=/[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?/,Oi=new RegExp(`^${O.source}$`);var Pi=new RegExp(`^${O.source}%$`);var _i=new RegExp(`^${O.source}s*/s*${O.source}$`);var Ft=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","rlh","vw","vh","vmin","vmax","vb","vi","svw","svh","lvw","lvh","dvw","dvh","cqw","cqh","cqi","cqb","cqmin","cqmax"],Ii=new RegELine truncated
`,r){t+=u.length;let p=t;t+=n.property.length,t+=2,t+=n.value?.length??0,n.important&&(t+=11);let f=t;t+=2,n.dst=[i,p,f]}}else if(n.kind==="rule"){if(l+=`${u}${n.selector} {
`,r){t+=u.length;let p=t;t+=n.selector.length,t+=1;let f=t;n.dst=[i,p,f],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
`,r&&(t+=u.length,t+=2)}else if(n.kind==="at-rule"){if(n.nodes.length===0){let p=`${u}${n.name} ${n.params};
`;if(r){t+=u.length;let f=t;t+=n.name.length,t+=1,t+=n.params.length;let c=t;t+=2,n.dst=[i,f,c]}return p}if(l+=`${u}${n.name}${n.params?` ${n.params} `:" "}{
`,r){t+=u.length;let p=t;t+=n.name.length,n.params&&(t+=1,t+=n.params.length),t+=1;let f=t;n.dst=[i,p,f],t+=2}for(let p of n.nodes)l+=o(p,s+1);l+=`${u}}
`,r&&(t+=u.length,t+=2)}else if(n.kind==="comment"){if(l+=`${u}/*${n.value}*/
`,r){t+=u.length;let p=t;t+=2+n.value.length+2;let f=t;n.dst=[i,p,f],t+=1}}else if(n.kind==="context"||n.kind==="at-root")return"";return l}let a="";for(let n of e)a+=o(n,0);return i.code=a,a}function Cr(e,r){if(typeof e!="string")throw new TypeError("expected path to be a string");if(e==="\\"||e==="/")return"/";var t=e.length;if(t<=1)return e;var i="";if(t>4&&e[3]==="\\"){var o=e[2];(o==="?"||o===".")&&e.slice(0,2)==="\\\\"&&(e=e.slice(2),i="//")}var a=e.split(/[/\\]+/);return r!==!1&&a[a.length-1]===""&&a.pop(),i+a.join("/")}function $e(e){let r=Cr(e);return e.startsWith("\\\\")&&r.startsWith("/")&&!r.startsWith("//")?`/${r}`:r}var Ee=/(?<!@import\s+)(?<=^|[^\w\-\u0080-\uffff])url\((\s*('[^']+'|"[^"]+")\s*|[^'")]+)\)/,ut=/(?<=image-set\()((?:[\w-]{1,256}\([^)]*\)|[^)])*)(?=\))/,Sr=/(?:gradient|element|cross-fade|image)\(/,$r=/^\s*data:/i,Tr=/^([a-z]+:)?\/\//,Er=/^[A-Z_][.\w-]*\(/i,Nr=/(?:^|\s)(?<url>[\w-]+\([^)]*\)|"[^"]*"|'[^']*'|[^,]\S*[^,])\s*(?:\s(?<descriptor>\w[^,]+))?(?:,|$)/g,Vr=/(?<!\\)"/g,Rr=/(?: |\\t|\\n|\\f|\\r)+/g,Or=e=>$r.test(e),Pr=e=>Tr.test(e);async function ct({css:e,base:r,root:t}){if(!e.includes("url(")&&!e.includes("image-set("))return e;let i=J(e),o=[];function a(n){if(n[0]==="/")return n;let s=Te.posix.join($e(r),n),l=Te.posix.relative($e(t),s);return l.startsWith(".")||(l="./"+l),l}return v(i,n=>{if(n.kind!=="declaration"||!n.value)return;let s=Ee.test(n.value),l=ut.test(n.value);if(s||l){let u=l?_r:ft;o.push(u(n.value,a).then(p=>{n.value=p}))}}),o.length&&await Promise.all(o),L(i)}function ft(e,r){return dt(e,Ee,async t=>{let[i,o]=t;return await pt(o.trim(),i,r)})}async function _r(e,r){return await dt(e,ut,async t=>{let[,i]=t;return await Dr(i,async({url:a})=>Ee.test(a)?await ft(a,r):Sr.test(a)?a:await pt(a,a,r))})}async function pt(e,r,t,i="url"){let o="",a=e[0];if((a==='"'||a==="'")&&(o=a,e=e.slice(1,-1)),Ir(e))return r;let n=await t(e);return o===""&&n!==encodeURI(n)&&(o='"'),o==="'"&&n.includes("'")&&(o='"'),o==='"'&&n.includes('"')&&(n=n.replace(Vr,'\\"')),`${i}(${o}${n}${o})`}function Ir(e,r){return Pr(e)||Or(e)||!e[0].match(/[\.a-zA-Z0-9_]/)||Er.test(e)}function Dr(e,r){return Promise.all(Ur(e).map(async({url:t,descriptor:i})=>({url:await r({url:t,descriptor:i}),descriptor:i}))).then(Lr)}function Ur(e){let r=e.trim().replace(Rr," ").replace(/\r?\n/,"").replace(/,\s+/,", ").replaceAll(/\s+/g," ").matchAll(Nr);return Array.from(r,({groups:t})=>({url:t?.url?.trim()??"",descriptor:t?.descriptor?.trim()??""})).filter(({url:t})=>!!t)}function Lr(e){return e.map(({url:r,descriptor:t})=>r+(t?` ${t}`:"")).join(", ")}async function dt(e,r,t){let i,o=e,a="";for(;i=r.exec(o);)a+=o.slice(0,i.index),a+=await t(i),o=o.slice(i.index+i[0].length);return a+=o,a}function yt({base:e,from:r,polyfills:t,onDependency:i,shouldRewriteUrls:o,customCssResolver:a,customJsResolver:n}){return{base:e,polyfills:t,from:r,async loadModule(s,l){return bt(s,l,i,n)},async loadStylesheet(s,l){let u=await xt(s,l,i,a);return o&&(u.content=await ct({css:u.content,root:e,base:u.base})),u}}}async function kt(e){if(e.root&&e.root!=="none"){let r=/[*{]/,t=[];for(let o of e.root.pattern.split("/")){if(r.test(o))break;t.push(o)}if(!await wt.stat(se.resolve(e.root.base,t.join("/"))).then(o=>o.isDirectory()).catch(()=>!1))throw new Error(`The \`source(${e.root.pattern})\` does not exist or is not a directory.`)}}async function au(e,r){let t=await Fr(e,yt(r));return await kt(t),t}async function lu(e,r){let t=await Mr(e,yt(r));return await kt(t),t}async function su(e,{base:r}){return zr(e,{base:r,async loadModule(t,i){return bt(t,i,()=>{})},async loadStylesheet(t,i){return xt(t,i,()=>{})}})}async function bt(e,r,t,i){if(e[0]!=="."){let s=await vt(e,r,i);if(!s)throw new Error(`Could not resolve '${e}' from '${r}'`);let l=await ht(mt(s).href);return{path:s,base:se.dirname(s),module:l.default??l}}let o=await vt(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);let[a,n]=await Promise.all([ht(mt(o).href+"?id="+Date.now()),Pe(o)]);for(let s of n)t(s);return{path:o,base:se.dirname(o),module:a.default??a}}async function xt(e,r,t,i){let o=await Wr(e,r,i);if(!o)throw new Error(`Could not resolve '${e}' from '${r}'`);t(o);let a=await wt.readFile(o,"utf-8");return{path:o,base:se.dirname(o),content:a}}var gt=null;async function ht(e){if(typeof globalThis.__tw_load=="function"){let r=await globalThis.__tw_load(e);if(r)return r}try{return await import(e)}catch{return gt??=Kr(import.meta.url,{moduleCache:!1,fsCache:!1}),await gt.import(e)}}var Re=["node_modules",...process.env.NODE_PATH?[process.env.NODE_PATH]:[]],jr=F.ResolverFactory.createResolver({fileSystem:new F.CachedInputFileSystem(Ve,4e3),useSyncFileSystemCalls:!0,extensions:[".css"],mainFields:["style"],conditionNames:["style"],modules:Re});async function Wr(e,r,t){if(typeof globalThis.__tw_resolve=="function"){let i=globalThis.__tw_resolve(e,r);if(i)return Promise.resolve(i)}if(t){let i=await t(e,r);if(i)return i}return Ne(jr,e,r)}var Br=F.ResolverFactory.creLine truncated
`)){this.defaultFlush=r}#r=new g(()=>({value:0}));#t=new g(()=>({value:0n}));#e=[];hit(r){this.#r.get(r).value++}start(r){let t=this.#e.map(o=>o.label).join("//"),i=`${t}${t.length===0?"":"//"}${r}`;this.#r.get(i).value++,this.#t.get(i),this.#e.push({id:i,label:r,namespace:t,value:process.hrtime.bigint()})}end(r){let t=process.hrtime.bigint();if(this.#e[this.#e.length-1].label!==r)throw new Error(`Mismatched timer label: \`${r}\`, expected \`${this.#e[this.#e.length-1].label}\``);let i=this.#e.pop(),o=t-i.value;this.#t.get(i.id).value+=o}reset(){this.#r.clear(),this.#t.clear(),this.#e.splice(0)}report(r=this.defaultFlush){let t=[],i=!1;for(let n=this.#e.length-1;n>=0;n--)this.end(this.#e[n].label);for(let[n,{value:s}]of this.#r.entries()){if(this.#t.has(n))continue;t.length===0&&(i=!0,t.push("Hits:"));let l=n.split("//").length;t.push(`${" ".repeat(l)}${n} ${ue(Ct(`\xD7 ${s}`))}`)}this.#t.size>0&&i&&t.push(`
Timers:`);let o=-1/0,a=new Map;for(let[n,{value:s}]of this.#t){let l=`${(Number(s)/1e6).toFixed(2)}ms`;a.set(n,l),o=Math.max(o,l.length)}for(let n of this.#t.keys()){let s=n.split("//").length;t.push(`${ue(`[${a.get(n).padStart(o," ")}]`)}${" ".repeat(s-1)}${s===1?" ":ue(" \u21B3 ")}${n.split("//").pop()} ${this.#r.get(n).value===1?"":ue(Ct(`\xD7 ${this.#r.get(n).value}`))}`.trimEnd())}r(`
${t.join(`
`)}
`),this.reset()}[Symbol.dispose](){fe&&this.report()}};function ue(e){return`\x1B[2m${e}\x1B[22m`}function Ct(e){return`\x1B[34m${e}\x1B[39m`}import Gr from"@jridgewell/remapping";import{Features as X,transform as Hr}from"lightningcss";import qr from"magic-string";function gu(e,{file:r="input.css",minify:t=!1,map:i}={}){function o(l,u){return Hr({filename:r,code:l,minify:t,sourceMap:typeof u<"u",inputSourceMap:u,drafts:{customMedia:!0},nonStandard:{deepSelectorCombinator:!0},include:X.Nesting|X.MediaQueries,exclude:X.LogicalProperties|X.DirSelector|X.LightDark,targets:{safari:16<<16|1024,ios_saf:16<<16|1024,firefox:8388608,chrome:7274496},errorRecovery:!0})}let a=o(Buffer.from(e),i);if(i=a.map?.toString(),a.warnings=a.warnings.filter(l=>!/'(deep|slotted|global)' is not recognized as a valid pseudo-/.test(l.message)),a.warnings.length>0){let l=e.split(`
`),u=[`Found ${a.warnings.length} ${a.warnings.length===1?"warning":"warnings"} while optimizing generated CSS:`];for(let[p,f]of a.warnings.entries()){u.push(""),a.warnings.length>1&&u.push(`Issue #${p+1}:`);let c=2,m=Math.max(0,f.loc.line-c-1),d=Math.min(l.length,f.loc.line+c),x=l.slice(m,d).map((h,I)=>m+I+1===f.loc.line?`${ee("\u2502")} ${h}`:ee(`\u2502 ${h}`));x.splice(f.loc.line-m,0,`${ee("\u2506")}${" ".repeat(f.loc.column-1)} ${Zr(`${ee("^--")} ${f.message}`)}`,`${ee("\u2506")}`),u.push(...x)}u.push(""),console.warn(u.join(`
`))}a=o(a.code,i),i=a.map?.toString();let n=a.code.toString(),s=new qr(n);if(s.replaceAll("@media not (","@media not all and ("),i!==void 0&&s.hasChanged()){let l=s.generateMap({source:"original",hires:"boundary"}).toString();i=Gr([l,i],()=>null).toString()}return n=s.toString(),{code:n,map:i}}function ee(e){return`\x1B[2m${e}\x1B[22m`}function Zr(e){return`\x1B[33m${e}\x1B[39m`}import{SourceMapGenerator as Qr}from"source-map-js";function Jr(e){let r=new Qr,t=1,i=new g(o=>({url:o?.url??`<unknown ${t++}>`,content:o?.content??"<none>"}));for(let o of e.mappings){let a=i.get(o.originalPosition?.source??null);r.addMapping({generated:o.generatedPosition,original:o.originalPosition,source:a.url,name:o.name}),r.setSourceContent(a.url,a.content)}return r.toString()}function yu(e){let r=typeof e=="string"?e:Jr(e);return{raw:r,get inline(){let t="";return t+="/*# sourceMappingURL=data:application/json;base64,",t+=Buffer.from(r,"utf-8").toString("base64"),t+=` */
`,t}}}if(!process.versions.bun){let e=ce.createRequire(import.meta.url);ce.register?.(Xr(e.resolve("@tailwindcss/node/esm-cache-loader")))}export{ru as Features,At as Instrumentation,iu as Polyfills,su as __unstable__loadDesignSystem,lu as compile,au as compileAst,pe as env,bt as loadModule,$e as normalizePath,gu as optimize,yu as toSourceMap};
+3
View File
@@ -0,0 +1,3 @@
declare function clearRequireCache(files: string[]): void;
export { clearRequireCache };
+1
View File
@@ -0,0 +1 @@
"use strict";var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var n=(r,e)=>{for(var t in e)i(r,t,{get:e[t],enumerable:!0})},u=(r,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let c of f(e))!l.call(r,c)&&c!==t&&i(r,c,{get:()=>e[c],enumerable:!(o=a(e,c))||o.enumerable});return r};var h=r=>u(i({},"__esModule",{value:!0}),r);var d={};n(d,{clearRequireCache:()=>q});module.exports=h(d);function q(r){for(let e of r)delete require.cache[e]}0&&(module.exports={clearRequireCache});