停用master分支并保留分支策略说明

This commit is contained in:
2026-08-25 17:59:14 +08:00
parent 6bfb5ec860
commit eca19fbdf9
17640 changed files with 9 additions and 10528372 deletions
BIN
View File
Binary file not shown.
@@ -1,85 +0,0 @@
---
name: gitnexus-cli
description: "Use when the user needs to run GitNexus CLI commands like analyze/index a repo, check status, clean the index, generate a wiki, or list indexed repos. Examples: \"Index this repo\", \"Reanalyze the codebase\", \"Generate a wiki\""
---
# GitNexus CLI Commands
Commands below use `node .gitnexus/run.cjs <command>` — the project-local runner `gitnexus analyze` drops next to the index. It auto-selects an available runner at call time (global `gitnexus`, else `pnpm dlx`, else `npx`), so no package-manager assumption and no global install is required.
> **Not analyzed yet, or `node .gitnexus/run.cjs` reports `Cannot find module`** (the gitignored runner is absent — e.g. a fresh clone or `git clean`)? (Re)generate it with `npx gitnexus analyze` from the project root. On **npm 11.x**, if `npx` crashes during install (`node.target is null`), install once with `npm i -g gitnexus` (then `gitnexus analyze`) or use `pnpm --allow-build=@ladybugdb/core --allow-build=gitnexus --allow-build=tree-sitter dlx gitnexus@latest analyze`. See [#1939](https://github.com/abhigyanpatwari/GitNexus/issues/1939).
## Commands
### analyze — Build or refresh the index
```bash
node .gitnexus/run.cjs analyze
```
Run from the project root. This parses all source files, builds the knowledge graph, writes it to `.gitnexus/`, and generates CLAUDE.md / AGENTS.md context files.
| Flag | Effect |
| -------------- | ---------------------------------------------------------------- |
| `--force` | Force full re-index even if up to date |
| `--embeddings` | Enable embedding generation for semantic search (off by default) |
| `--drop-embeddings` | Drop existing embeddings on rebuild. By default, an `analyze` without `--embeddings` preserves them. |
**When to run:** First time in a project, after major code changes, or when `gitnexus://repo/{name}/context` reports the index is stale. In Claude Code, a PostToolUse hook detects staleness after `git commit` and `git merge` and notifies the agent to run `analyze` — the hook does not run analyze itself, to avoid blocking the agent for up to 120s and risking KuzuDB corruption on timeout.
### status — Check index freshness
```bash
node .gitnexus/run.cjs status
```
Shows whether the current repo has a GitNexus index, when it was last updated, and symbol/relationship counts. Use this to check if re-indexing is needed.
### clean — Delete the index
```bash
node .gitnexus/run.cjs clean
```
Deletes the `.gitnexus/` directory and unregisters the repo from the global registry. Use before re-indexing if the index is corrupt or after removing GitNexus from a project.
| Flag | Effect |
| --------- | ------------------------------------------------- |
| `--force` | Skip confirmation prompt |
| `--all` | Clean all indexed repos, not just the current one |
### wiki — Generate documentation from the graph
```bash
node .gitnexus/run.cjs wiki
```
Generates repository documentation from the knowledge graph using an LLM. Requires an API key (saved to `~/.gitnexus/config.json` on first use).
| Flag | Effect |
| ------------------- | ----------------------------------------- |
| `--force` | Force full regeneration |
| `--model <model>` | LLM model (default: minimax/minimax-m2.5) |
| `--base-url <url>` | LLM API base URL |
| `--api-key <key>` | LLM API key |
| `--concurrency <n>` | Parallel LLM calls (default: 3) |
| `--gist` | Publish wiki as a public GitHub Gist |
### list — Show all indexed repos
```bash
node .gitnexus/run.cjs list
```
Lists all repositories registered in `~/.gitnexus/registry.json`. The MCP `list_repos` tool provides the same information.
## After Indexing
1. **Read `gitnexus://repo/{name}/context`** to verify the index loaded
2. Use the other GitNexus skills (`exploring`, `debugging`, `impact-analysis`, `refactoring`) for your task
## Troubleshooting
- **"Not inside a git repository"**: Run from a directory inside a git repo
- **Index is stale after re-analyzing**: Restart Claude Code to reload the MCP server
- **Embeddings slow**: Omit `--embeddings` (it's off by default) or set `OPENAI_API_KEY` for faster API-based embedding
@@ -1,89 +0,0 @@
---
name: gitnexus-debugging
description: "Use when the user is debugging a bug, tracing an error, or asking why something fails. Examples: \"Why is X failing?\", \"Where does this error come from?\", \"Trace this bug\""
---
# Debugging with GitNexus
## When to Use
- "Why is this function failing?"
- "Trace where this error comes from"
- "Who calls this method?"
- "This endpoint returns 500"
- Investigating bugs, errors, or unexpected behavior
## Workflow
```
1. query({query: "<error or symptom>"}) → Find related execution flows
2. context({name: "<suspect>"}) → See callers/callees/processes
3. READ gitnexus://repo/{name}/process/{name} → Trace execution flow
4. cypher({query: "MATCH path..."}) → Custom traces if needed
```
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
## Checklist
```
- [ ] Understand the symptom (error message, unexpected behavior)
- [ ] query for error text or related code
- [ ] Identify the suspect function from returned processes
- [ ] context to see callers and callees
- [ ] Trace execution flow via process resource if applicable
- [ ] cypher for custom call chain traces if needed
- [ ] Read source files to confirm root cause
```
## Debugging Patterns
| Symptom | GitNexus Approach |
| -------------------- | ---------------------------------------------------------- |
| Error message | `query` for error text → `context` on throw sites |
| Wrong return value | `context` on the function → trace callees for data flow |
| Intermittent failure | `context` → look for external calls, async deps |
| Performance issue | `context` → find symbols with many callers (hot paths) |
| Recent regression | `detect_changes` to see what your changes affect |
## Tools
**query** — find code related to error:
```
query({query: "payment validation error"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError, PaymentException
```
**context** — full context for a suspect:
```
context({name: "validatePayment"})
→ Incoming calls: processCheckout, webhookHandler
→ Outgoing calls: verifyCard, fetchRates (external API!)
→ Processes: CheckoutFlow (step 3/7)
```
**cypher** — custom call chain traces:
```cypher
MATCH path = (a)-[:CodeRelation {type: 'CALLS'}*1..2]->(b:Function {name: "validatePayment"})
RETURN [n IN nodes(path) | n.name] AS chain
```
## Example: "Payment endpoint returns 500 intermittently"
```
1. query({query: "payment error handling"})
→ Processes: CheckoutFlow, ErrorHandling
→ Symbols: validatePayment, handlePaymentError
2. context({name: "validatePayment"})
→ Outgoing calls: verifyCard, fetchRates (external API!)
3. READ gitnexus://repo/my-app/process/CheckoutFlow
→ Step 3: validatePayment → calls fetchRates (external)
4. Root cause: fetchRates calls external API without proper timeout
```
@@ -1,78 +0,0 @@
---
name: gitnexus-exploring
description: "Use when the user asks how code works, wants to understand architecture, trace execution flows, or explore unfamiliar parts of the codebase. Examples: \"How does X work?\", \"What calls this function?\", \"Show me the auth flow\""
---
# Exploring Codebases with GitNexus
## When to Use
- "How does authentication work?"
- "What's the project structure?"
- "Show me the main components"
- "Where is the database logic?"
- Understanding code you haven't seen before
## Workflow
```
1. READ gitnexus://repos → Discover indexed repos
2. READ gitnexus://repo/{name}/context → Codebase overview, check staleness
3. query({query: "<what you want to understand>"}) → Find related execution flows
4. context({name: "<symbol>"}) → Deep dive on specific symbol
5. READ gitnexus://repo/{name}/process/{name} → Trace full execution flow
```
> If step 2 says "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
## Checklist
```
- [ ] READ gitnexus://repo/{name}/context
- [ ] query for the concept you want to understand
- [ ] Review returned processes (execution flows)
- [ ] context on key symbols for callers/callees
- [ ] READ process resource for full execution traces
- [ ] Read source files for implementation details
```
## Resources
| Resource | What you get |
| --------------------------------------- | ------------------------------------------------------- |
| `gitnexus://repo/{name}/context` | Stats, staleness warning (~150 tokens) |
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores (~300 tokens) |
| `gitnexus://repo/{name}/cluster/{name}` | Area members with file paths (~500 tokens) |
| `gitnexus://repo/{name}/process/{name}` | Step-by-step execution trace (~200 tokens) |
## Tools
**query** — find execution flows related to a concept:
```
query({query: "payment processing"})
→ Processes: CheckoutFlow, RefundFlow, WebhookHandler
→ Symbols grouped by flow with file locations
```
**context** — 360-degree view of a symbol:
```
context({name: "validateUser"})
→ Incoming calls: loginHandler, apiMiddleware
→ Outgoing calls: checkToken, getUserById
→ Processes: LoginFlow (step 2/5), TokenRefresh (step 1/3)
```
## Example: "How does payment processing work?"
```
1. READ gitnexus://repo/my-app/context → 918 symbols, 45 processes
2. query({query: "payment processing"})
→ CheckoutFlow: processPayment → validateCard → chargeStripe
→ RefundFlow: initiateRefund → calculateRefund → processRefund
3. context({name: "processPayment"})
→ Incoming: checkoutHandler, webhookHandler
→ Outgoing: validateCard, chargeStripe, saveTransaction
4. Read src/payments/processor.ts for implementation details
```
@@ -1,95 +0,0 @@
---
name: gitnexus-guide
description: "Use when the user asks about GitNexus itself — available tools, how to query the knowledge graph, MCP resources, graph schema, or workflow reference. Examples: \"What GitNexus tools are available?\", \"How do I use GitNexus?\""
---
# GitNexus Guide
Quick reference for all GitNexus MCP tools, resources, and the knowledge graph schema.
## Always Start Here
For any task involving code understanding, debugging, impact analysis, or refactoring:
1. **Read `gitnexus://repo/{name}/context`** — codebase overview + check index freshness
2. **Match your task to a skill below** and **read that skill file**
3. **Follow the skill's workflow and checklist**
> If step 1 warns the index is stale, run `node .gitnexus/run.cjs analyze` in the terminal first.
## Skills
| Task | Skill to read |
| -------------------------------------------- | ------------------- |
| Understand architecture / "How does X work?" | `gitnexus-exploring` |
| Blast radius / "What breaks if I change X?" | `gitnexus-impact-analysis` |
| Trace bugs / "Why is X failing?" | `gitnexus-debugging` |
| Rename / extract / split / refactor | `gitnexus-refactoring` |
| Tools, resources, schema reference | `gitnexus-guide` (this file) |
| Index, status, clean, wiki CLI commands | `gitnexus-cli` |
## Tools Reference
| Tool | What it gives you |
| ---------------- | ------------------------------------------------------------------------ |
| `query` | Process-grouped code intelligence — execution flows related to a concept |
| `context` | 360-degree symbol view — categorized refs, processes it participates in |
| `impact` | Symbol blast radius — what breaks at depth 1/2/3 with confidence |
| `detect_changes` | Git-diff impact — what do your current changes affect |
| `rename` | Multi-file coordinated rename with confidence-tagged edits |
| `cypher` | Raw graph queries (read `gitnexus://repo/{name}/schema` first) |
| `list_repos` | Discover indexed repos (paginated — `limit`/`offset`) |
### Paginating `list_repos`
`list_repos` is paginated so a large registry is not truncated by MCP/LLM token limits. It takes optional `limit` (default **50**, max **200**) and `offset`, and returns:
```jsonc
{
"repositories": [
{ "name": "...", "path": "...", "indexedAt": "...", "lastCommit": "...", "stats": { } }
],
"pagination": {
"total": 437,
"limit": 50,
"offset": 0,
"returned": 50,
"hasMore": true,
"nextOffset": 50
}
}
```
To enumerate **every** repository, keep calling with `offset` set to `pagination.nextOffset` until `hasMore` is `false`:
```text
list_repos {} → repos 1–50, nextOffset 50, hasMore true
list_repos { offset: 50 } → repos 51–100, nextOffset 100, hasMore true
…
list_repos { offset: 400 } → repos 401–437, hasMore false (done)
```
Notes: `offset` ≥ `total` returns an empty page (with `total` still reported). Out-of-range or malformed `limit`/`offset` (non-integer, `limit` outside `[1, 200]`, `offset < 0`) are rejected with a clear error — `limit` above the max is rejected, not silently capped. The order is deterministic (lower-cased name, then path), so paging never skips or duplicates an entry while the registry is unchanged.
## Resources Reference
Lightweight reads (~100-500 tokens) for navigation:
| Resource | Content |
| ---------------------------------------------- | ----------------------------------------- |
| `gitnexus://repo/{name}/context` | Stats, staleness check |
| `gitnexus://repo/{name}/clusters` | All functional areas with cohesion scores |
| `gitnexus://repo/{name}/cluster/{clusterName}` | Area members |
| `gitnexus://repo/{name}/processes` | All execution flows |
| `gitnexus://repo/{name}/process/{processName}` | Step-by-step trace |
| `gitnexus://repo/{name}/schema` | Graph schema for Cypher |
## Graph Schema
**Nodes:** File, Function, Class, Interface, Method, Community, Process
**Edges (via CodeRelation.type):** CALLS, IMPORTS, EXTENDS, IMPLEMENTS, DEFINES, MEMBER_OF, STEP_IN_PROCESS
```cypher
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "myFunc"})
RETURN caller.name, caller.filePath
```
@@ -1,97 +0,0 @@
---
name: gitnexus-impact-analysis
description: "Use when the user wants to know what will break if they change something, or needs safety analysis before editing code. Examples: \"Is it safe to change X?\", \"What depends on this?\", \"What will break?\""
---
# Impact Analysis with GitNexus
## When to Use
- "Is it safe to change this function?"
- "What will break if I modify X?"
- "Show me the blast radius"
- "Who uses this code?"
- Before making non-trivial code changes
- Before committing — to understand what your changes affect
## Workflow
```
1. impact({target: "X", direction: "upstream"}) → What depends on this
2. READ gitnexus://repo/{name}/processes → Check affected execution flows
3. detect_changes() → Map current git changes to affected flows
4. Assess risk and report to user
```
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
## Checklist
```
- [ ] impact({target, direction: "upstream"}) to find dependents
- [ ] Review d=1 items first (these WILL BREAK)
- [ ] Check high-confidence (>0.8) dependencies
- [ ] READ processes to check affected execution flows
- [ ] detect_changes() for pre-commit check
- [ ] Assess risk level and report to user
```
## Understanding Output
| Depth | Risk Level | Meaning |
| ----- | ---------------- | ------------------------ |
| d=1 | **WILL BREAK** | Direct callers/importers |
| d=2 | LIKELY AFFECTED | Indirect dependencies |
| d=3 | MAY NEED TESTING | Transitive effects |
## Risk Assessment
| Affected | Risk |
| ------------------------------ | -------- |
| <5 symbols, few processes | LOW |
| 5-15 symbols, 2-5 processes | MEDIUM |
| >15 symbols or many processes | HIGH |
| Critical path (auth, payments) | CRITICAL |
## Tools
**impact** — the primary tool for symbol blast radius:
```
impact({
target: "validateUser",
direction: "upstream",
minConfidence: 0.8,
maxDepth: 3
})
→ d=1 (WILL BREAK):
- loginHandler (src/auth/login.ts:42) [CALLS, 100%]
- apiMiddleware (src/api/middleware.ts:15) [CALLS, 100%]
→ d=2 (LIKELY AFFECTED):
- authRouter (src/routes/auth.ts:22) [CALLS, 95%]
```
**detect_changes** — git-diff based impact analysis:
```
detect_changes({scope: "staged"})
→ Changed: 5 symbols in 3 files
→ Affected: LoginFlow, TokenRefresh, APIMiddlewarePipeline
→ Risk: MEDIUM
```
## Example: "What breaks if I change validateUser?"
```
1. impact({target: "validateUser", direction: "upstream"})
→ d=1: loginHandler, apiMiddleware (WILL BREAK)
→ d=2: authRouter, sessionManager (LIKELY AFFECTED)
2. READ gitnexus://repo/my-app/processes
→ LoginFlow and TokenRefresh touch validateUser
3. Risk: 2 direct callers, 2 processes = MEDIUM
```
@@ -1,121 +0,0 @@
---
name: gitnexus-refactoring
description: "Use when the user wants to rename, extract, split, move, or restructure code safely. Examples: \"Rename this function\", \"Extract this into a module\", \"Refactor this class\", \"Move this to a separate file\""
---
# Refactoring with GitNexus
## When to Use
- "Rename this function safely"
- "Extract this into a module"
- "Split this service"
- "Move this to a new file"
- Any task involving renaming, extracting, splitting, or restructuring code
## Workflow
```
1. impact({target: "X", direction: "upstream"}) → Map all dependents
2. query({query: "X"}) → Find execution flows involving X
3. context({name: "X"}) → See all incoming/outgoing refs
4. Plan update order: interfaces → implementations → callers → tests
```
> If "Index is stale" → run `node .gitnexus/run.cjs analyze` in terminal.
## Checklists
### Rename Symbol
```
- [ ] rename({symbol_name: "oldName", new_name: "newName", dry_run: true}) — preview all edits
- [ ] Review graph edits (high confidence) and ast_search edits (review carefully)
- [ ] If satisfied: rename({..., dry_run: false}) — apply edits
- [ ] detect_changes() — verify only expected files changed
- [ ] Run tests for affected processes
```
### Extract Module
```
- [ ] context({name: target}) — see all incoming/outgoing refs
- [ ] impact({target, direction: "upstream"}) — find all external callers
- [ ] Define new module interface
- [ ] Extract code, update imports
- [ ] detect_changes() — verify affected scope
- [ ] Run tests for affected processes
```
### Split Function/Service
```
- [ ] context({name: target}) — understand all callees
- [ ] Group callees by responsibility
- [ ] impact({target, direction: "upstream"}) — map callers to update
- [ ] Create new functions/services
- [ ] Update callers
- [ ] detect_changes() — verify affected scope
- [ ] Run tests for affected processes
```
## Tools
**rename** — automated multi-file rename:
```
rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
→ 12 edits across 8 files
→ 10 graph edits (high confidence), 2 ast_search edits (review)
→ Changes: [{file_path, edits: [{line, old_text, new_text, confidence}]}]
```
**impact** — map all dependents first:
```
impact({target: "validateUser", direction: "upstream"})
→ d=1: loginHandler, apiMiddleware, testUtils
→ Affected Processes: LoginFlow, TokenRefresh
```
**detect_changes** — verify your changes after refactoring:
```
detect_changes({scope: "all"})
→ Changed: 8 files, 12 symbols
→ Affected processes: LoginFlow, TokenRefresh
→ Risk: MEDIUM
```
**cypher** — custom reference queries:
```cypher
MATCH (caller)-[:CodeRelation {type: 'CALLS'}]->(f:Function {name: "validateUser"})
RETURN caller.name, caller.filePath ORDER BY caller.filePath
```
## Risk Rules
| Risk Factor | Mitigation |
| ------------------- | ----------------------------------------- |
| Many callers (>5) | Use rename for automated updates |
| Cross-area refs | Use detect_changes after to verify scope |
| String/dynamic refs | query to find them |
| External/public API | Version and deprecate properly |
## Example: Rename `validateUser` to `authenticateUser`
```
1. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: true})
→ 12 edits: 10 graph (safe), 2 ast_search (review)
→ Files: validator.ts, login.ts, middleware.ts, config.json...
2. Review ast_search edits (config.json: dynamic reference!)
3. rename({symbol_name: "validateUser", new_name: "authenticateUser", dry_run: false})
→ Applied 12 edits across 8 files
4. detect_changes({scope: "all"})
→ Affected: LoginFlow, TokenRefresh
→ Risk: MEDIUM — run tests for these flows
```
Binary file not shown.
@@ -1 +0,0 @@
level=none expiry=0
Binary file not shown.
@@ -1,2 +0,0 @@
{
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,904 +0,0 @@
// node_modules/@ctrl/tinycolor/dist/module/util.js
function bound01(n, max) {
if (isOnePointZero(n)) {
n = "100%";
}
var isPercent = isPercentage(n);
n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
if (isPercent) {
n = parseInt(String(n * max), 10) / 100;
}
if (Math.abs(n - max) < 1e-6) {
return 1;
}
if (max === 360) {
n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
} else {
n = n % max / parseFloat(String(max));
}
return n;
}
function clamp01(val) {
return Math.min(1, Math.max(0, val));
}
function isOnePointZero(n) {
return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
}
function isPercentage(n) {
return typeof n === "string" && n.indexOf("%") !== -1;
}
function boundAlpha(a) {
a = parseFloat(a);
if (isNaN(a) || a < 0 || a > 1) {
a = 1;
}
return a;
}
function convertToPercentage(n) {
if (n <= 1) {
return "".concat(Number(n) * 100, "%");
}
return n;
}
function pad2(c) {
return c.length === 1 ? "0" + c : String(c);
}
// node_modules/@ctrl/tinycolor/dist/module/conversion.js
function rgbToRgb(r, g, b) {
return {
r: bound01(r, 255) * 255,
g: bound01(g, 255) * 255,
b: bound01(b, 255) * 255
};
}
function rgbToHsl(r, g, b) {
r = bound01(r, 255);
g = bound01(g, 255);
b = bound01(b, 255);
var max = Math.max(r, g, b);
var min = Math.min(r, g, b);
var h = 0;
var s = 0;
var l = (max + min) / 2;
if (max === min) {
s = 0;
h = 0;
} else {
var d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch (max) {
case r:
h = (g - b) / d + (g < b ? 6 : 0);
break;
case g:
h = (b - r) / d + 2;
break;
case b:
h = (r - g) / d + 4;
break;
default:
break;
}
h /= 6;
}
return { h, s, l };
}
function hue2rgb(p, q, t) {
if (t < 0) {
t += 1;
}
if (t > 1) {
t -= 1;
}
if (t < 1 / 6) {
return p + (q - p) * (6 * t);
}
if (t < 1 / 2) {
return q;
}
if (t < 2 / 3) {
return p + (q - p) * (2 / 3 - t) * 6;
}
return p;
}
function hslToRgb(h, s, l) {
var r;
var g;
var b;
h = bound01(h, 360);
s = bound01(s, 100);
l = bound01(l, 100);
if (s === 0) {
g = l;
b = l;
r = l;
} else {
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
var p = 2 * l - q;
r = hue2rgb(p, q, h + 1 / 3);
g = hue2rgb(p, q, h);
b = hue2rgb(p, q, h - 1 / 3);
}
return { r: r * 255, g: g * 255, b: b * 255 };
}
function rgbToHsv(r, g, b) {
r = bound01(r, 255);
g = bound01(g, 255);
b = bound01(b, 255);
var max = Math.max(r, g, b);
var min = Math.min(r, g, b);
var h = 0;
var v = max;
var d = max - min;
var s = max === 0 ? 0 : d / max;
if (max === min) {
h = 0;
} else {
switch (max) {
case r:
h = (g - b) / d + (g < b ? 6 : 0);
break;
case g:
h = (b - r) / d + 2;
break;
case b:
h = (r - g) / d + 4;
break;
default:
break;
}
h /= 6;
}
return { h, s, v };
}
function hsvToRgb(h, s, v) {
h = bound01(h, 360) * 6;
s = bound01(s, 100);
v = bound01(v, 100);
var i = Math.floor(h);
var f = h - i;
var p = v * (1 - s);
var q = v * (1 - f * s);
var t = v * (1 - (1 - f) * s);
var mod = i % 6;
var r = [v, q, p, p, t, v][mod];
var g = [t, v, v, q, p, p][mod];
var b = [p, p, t, v, v, q][mod];
return { r: r * 255, g: g * 255, b: b * 255 };
}
function rgbToHex(r, g, b, allow3Char) {
var hex = [
pad2(Math.round(r).toString(16)),
pad2(Math.round(g).toString(16)),
pad2(Math.round(b).toString(16))
];
if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) {
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
}
return hex.join("");
}
function rgbaToHex(r, g, b, a, allow4Char) {
var hex = [
pad2(Math.round(r).toString(16)),
pad2(Math.round(g).toString(16)),
pad2(Math.round(b).toString(16)),
pad2(convertDecimalToHex(a))
];
if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) {
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
}
return hex.join("");
}
function convertDecimalToHex(d) {
return Math.round(parseFloat(d) * 255).toString(16);
}
function convertHexToDecimal(h) {
return parseIntFromHex(h) / 255;
}
function parseIntFromHex(val) {
return parseInt(val, 16);
}
function numberInputToObject(color) {
return {
r: color >> 16,
g: (color & 65280) >> 8,
b: color & 255
};
}
// node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
var names = {
aliceblue: "#f0f8ff",
antiquewhite: "#faebd7",
aqua: "#00ffff",
aquamarine: "#7fffd4",
azure: "#f0ffff",
beige: "#f5f5dc",
bisque: "#ffe4c4",
black: "#000000",
blanchedalmond: "#ffebcd",
blue: "#0000ff",
blueviolet: "#8a2be2",
brown: "#a52a2a",
burlywood: "#deb887",
cadetblue: "#5f9ea0",
chartreuse: "#7fff00",
chocolate: "#d2691e",
coral: "#ff7f50",
cornflowerblue: "#6495ed",
cornsilk: "#fff8dc",
crimson: "#dc143c",
cyan: "#00ffff",
darkblue: "#00008b",
darkcyan: "#008b8b",
darkgoldenrod: "#b8860b",
darkgray: "#a9a9a9",
darkgreen: "#006400",
darkgrey: "#a9a9a9",
darkkhaki: "#bdb76b",
darkmagenta: "#8b008b",
darkolivegreen: "#556b2f",
darkorange: "#ff8c00",
darkorchid: "#9932cc",
darkred: "#8b0000",
darksalmon: "#e9967a",
darkseagreen: "#8fbc8f",
darkslateblue: "#483d8b",
darkslategray: "#2f4f4f",
darkslategrey: "#2f4f4f",
darkturquoise: "#00ced1",
darkviolet: "#9400d3",
deeppink: "#ff1493",
deepskyblue: "#00bfff",
dimgray: "#696969",
dimgrey: "#696969",
dodgerblue: "#1e90ff",
firebrick: "#b22222",
floralwhite: "#fffaf0",
forestgreen: "#228b22",
fuchsia: "#ff00ff",
gainsboro: "#dcdcdc",
ghostwhite: "#f8f8ff",
goldenrod: "#daa520",
gold: "#ffd700",
gray: "#808080",
green: "#008000",
greenyellow: "#adff2f",
grey: "#808080",
honeydew: "#f0fff0",
hotpink: "#ff69b4",
indianred: "#cd5c5c",
indigo: "#4b0082",
ivory: "#fffff0",
khaki: "#f0e68c",
lavenderblush: "#fff0f5",
lavender: "#e6e6fa",
lawngreen: "#7cfc00",
lemonchiffon: "#fffacd",
lightblue: "#add8e6",
lightcoral: "#f08080",
lightcyan: "#e0ffff",
lightgoldenrodyellow: "#fafad2",
lightgray: "#d3d3d3",
lightgreen: "#90ee90",
lightgrey: "#d3d3d3",
lightpink: "#ffb6c1",
lightsalmon: "#ffa07a",
lightseagreen: "#20b2aa",
lightskyblue: "#87cefa",
lightslategray: "#778899",
lightslategrey: "#778899",
lightsteelblue: "#b0c4de",
lightyellow: "#ffffe0",
lime: "#00ff00",
limegreen: "#32cd32",
linen: "#faf0e6",
magenta: "#ff00ff",
maroon: "#800000",
mediumaquamarine: "#66cdaa",
mediumblue: "#0000cd",
mediumorchid: "#ba55d3",
mediumpurple: "#9370db",
mediumseagreen: "#3cb371",
mediumslateblue: "#7b68ee",
mediumspringgreen: "#00fa9a",
mediumturquoise: "#48d1cc",
mediumvioletred: "#c71585",
midnightblue: "#191970",
mintcream: "#f5fffa",
mistyrose: "#ffe4e1",
moccasin: "#ffe4b5",
navajowhite: "#ffdead",
navy: "#000080",
oldlace: "#fdf5e6",
olive: "#808000",
olivedrab: "#6b8e23",
orange: "#ffa500",
orangered: "#ff4500",
orchid: "#da70d6",
palegoldenrod: "#eee8aa",
palegreen: "#98fb98",
paleturquoise: "#afeeee",
palevioletred: "#db7093",
papayawhip: "#ffefd5",
peachpuff: "#ffdab9",
peru: "#cd853f",
pink: "#ffc0cb",
plum: "#dda0dd",
powderblue: "#b0e0e6",
purple: "#800080",
rebeccapurple: "#663399",
red: "#ff0000",
rosybrown: "#bc8f8f",
royalblue: "#4169e1",
saddlebrown: "#8b4513",
salmon: "#fa8072",
sandybrown: "#f4a460",
seagreen: "#2e8b57",
seashell: "#fff5ee",
sienna: "#a0522d",
silver: "#c0c0c0",
skyblue: "#87ceeb",
slateblue: "#6a5acd",
slategray: "#708090",
slategrey: "#708090",
snow: "#fffafa",
springgreen: "#00ff7f",
steelblue: "#4682b4",
tan: "#d2b48c",
teal: "#008080",
thistle: "#d8bfd8",
tomato: "#ff6347",
turquoise: "#40e0d0",
violet: "#ee82ee",
wheat: "#f5deb3",
white: "#ffffff",
whitesmoke: "#f5f5f5",
yellow: "#ffff00",
yellowgreen: "#9acd32"
};
// node_modules/@ctrl/tinycolor/dist/module/format-input.js
function inputToRGB(color) {
var rgb = { r: 0, g: 0, b: 0 };
var a = 1;
var s = null;
var v = null;
var l = null;
var ok = false;
var format = false;
if (typeof color === "string") {
color = stringInputToObject(color);
}
if (typeof color === "object") {
if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
rgb = rgbToRgb(color.r, color.g, color.b);
ok = true;
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
s = convertToPercentage(color.s);
v = convertToPercentage(color.v);
rgb = hsvToRgb(color.h, s, v);
ok = true;
format = "hsv";
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
s = convertToPercentage(color.s);
l = convertToPercentage(color.l);
rgb = hslToRgb(color.h, s, l);
ok = true;
format = "hsl";
}
if (Object.prototype.hasOwnProperty.call(color, "a")) {
a = color.a;
}
}
a = boundAlpha(a);
return {
ok,
format: color.format || format,
r: Math.min(255, Math.max(rgb.r, 0)),
g: Math.min(255, Math.max(rgb.g, 0)),
b: Math.min(255, Math.max(rgb.b, 0)),
a
};
}
var CSS_INTEGER = "[-\\+]?\\d+%?";
var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
var matchers = {
CSS_UNIT: new RegExp(CSS_UNIT),
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
};
function stringInputToObject(color) {
color = color.trim().toLowerCase();
if (color.length === 0) {
return false;
}
var named = false;
if (names[color]) {
color = names[color];
named = true;
} else if (color === "transparent") {
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
}
var match = matchers.rgb.exec(color);
if (match) {
return { r: match[1], g: match[2], b: match[3] };
}
match = matchers.rgba.exec(color);
if (match) {
return { r: match[1], g: match[2], b: match[3], a: match[4] };
}
match = matchers.hsl.exec(color);
if (match) {
return { h: match[1], s: match[2], l: match[3] };
}
match = matchers.hsla.exec(color);
if (match) {
return { h: match[1], s: match[2], l: match[3], a: match[4] };
}
match = matchers.hsv.exec(color);
if (match) {
return { h: match[1], s: match[2], v: match[3] };
}
match = matchers.hsva.exec(color);
if (match) {
return { h: match[1], s: match[2], v: match[3], a: match[4] };
}
match = matchers.hex8.exec(color);
if (match) {
return {
r: parseIntFromHex(match[1]),
g: parseIntFromHex(match[2]),
b: parseIntFromHex(match[3]),
a: convertHexToDecimal(match[4]),
format: named ? "name" : "hex8"
};
}
match = matchers.hex6.exec(color);
if (match) {
return {
r: parseIntFromHex(match[1]),
g: parseIntFromHex(match[2]),
b: parseIntFromHex(match[3]),
format: named ? "name" : "hex"
};
}
match = matchers.hex4.exec(color);
if (match) {
return {
r: parseIntFromHex(match[1] + match[1]),
g: parseIntFromHex(match[2] + match[2]),
b: parseIntFromHex(match[3] + match[3]),
a: convertHexToDecimal(match[4] + match[4]),
format: named ? "name" : "hex8"
};
}
match = matchers.hex3.exec(color);
if (match) {
return {
r: parseIntFromHex(match[1] + match[1]),
g: parseIntFromHex(match[2] + match[2]),
b: parseIntFromHex(match[3] + match[3]),
format: named ? "name" : "hex"
};
}
return false;
}
function isValidCSSUnit(color) {
return Boolean(matchers.CSS_UNIT.exec(String(color)));
}
// node_modules/@ctrl/tinycolor/dist/module/index.js
var TinyColor = (
/** @class */
(function() {
function TinyColor2(color, opts) {
if (color === void 0) {
color = "";
}
if (opts === void 0) {
opts = {};
}
var _a;
if (color instanceof TinyColor2) {
return color;
}
if (typeof color === "number") {
color = numberInputToObject(color);
}
this.originalInput = color;
var rgb = inputToRGB(color);
this.originalInput = color;
this.r = rgb.r;
this.g = rgb.g;
this.b = rgb.b;
this.a = rgb.a;
this.roundA = Math.round(100 * this.a) / 100;
this.format = (_a = opts.format) !== null && _a !== void 0 ? _a : rgb.format;
this.gradientType = opts.gradientType;
if (this.r < 1) {
this.r = Math.round(this.r);
}
if (this.g < 1) {
this.g = Math.round(this.g);
}
if (this.b < 1) {
this.b = Math.round(this.b);
}
this.isValid = rgb.ok;
}
TinyColor2.prototype.isDark = function() {
return this.getBrightness() < 128;
};
TinyColor2.prototype.isLight = function() {
return !this.isDark();
};
TinyColor2.prototype.getBrightness = function() {
var rgb = this.toRgb();
return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
};
TinyColor2.prototype.getLuminance = function() {
var rgb = this.toRgb();
var R;
var G;
var B;
var RsRGB = rgb.r / 255;
var GsRGB = rgb.g / 255;
var BsRGB = rgb.b / 255;
if (RsRGB <= 0.03928) {
R = RsRGB / 12.92;
} else {
R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
}
if (GsRGB <= 0.03928) {
G = GsRGB / 12.92;
} else {
G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
}
if (BsRGB <= 0.03928) {
B = BsRGB / 12.92;
} else {
B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
}
return 0.2126 * R + 0.7152 * G + 0.0722 * B;
};
TinyColor2.prototype.getAlpha = function() {
return this.a;
};
TinyColor2.prototype.setAlpha = function(alpha) {
this.a = boundAlpha(alpha);
this.roundA = Math.round(100 * this.a) / 100;
return this;
};
TinyColor2.prototype.isMonochrome = function() {
var s = this.toHsl().s;
return s === 0;
};
TinyColor2.prototype.toHsv = function() {
var hsv = rgbToHsv(this.r, this.g, this.b);
return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };
};
TinyColor2.prototype.toHsvString = function() {
var hsv = rgbToHsv(this.r, this.g, this.b);
var h = Math.round(hsv.h * 360);
var s = Math.round(hsv.s * 100);
var v = Math.round(hsv.v * 100);
return this.a === 1 ? "hsv(".concat(h, ", ").concat(s, "%, ").concat(v, "%)") : "hsva(".concat(h, ", ").concat(s, "%, ").concat(v, "%, ").concat(this.roundA, ")");
};
TinyColor2.prototype.toHsl = function() {
var hsl = rgbToHsl(this.r, this.g, this.b);
return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };
};
TinyColor2.prototype.toHslString = function() {
var hsl = rgbToHsl(this.r, this.g, this.b);
var h = Math.round(hsl.h * 360);
var s = Math.round(hsl.s * 100);
var l = Math.round(hsl.l * 100);
return this.a === 1 ? "hsl(".concat(h, ", ").concat(s, "%, ").concat(l, "%)") : "hsla(".concat(h, ", ").concat(s, "%, ").concat(l, "%, ").concat(this.roundA, ")");
};
TinyColor2.prototype.toHex = function(allow3Char) {
if (allow3Char === void 0) {
allow3Char = false;
}
return rgbToHex(this.r, this.g, this.b, allow3Char);
};
TinyColor2.prototype.toHexString = function(allow3Char) {
if (allow3Char === void 0) {
allow3Char = false;
}
return "#" + this.toHex(allow3Char);
};
TinyColor2.prototype.toHex8 = function(allow4Char) {
if (allow4Char === void 0) {
allow4Char = false;
}
return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
};
TinyColor2.prototype.toHex8String = function(allow4Char) {
if (allow4Char === void 0) {
allow4Char = false;
}
return "#" + this.toHex8(allow4Char);
};
TinyColor2.prototype.toHexShortString = function(allowShortChar) {
if (allowShortChar === void 0) {
allowShortChar = false;
}
return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
};
TinyColor2.prototype.toRgb = function() {
return {
r: Math.round(this.r),
g: Math.round(this.g),
b: Math.round(this.b),
a: this.a
};
};
TinyColor2.prototype.toRgbString = function() {
var r = Math.round(this.r);
var g = Math.round(this.g);
var b = Math.round(this.b);
return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(this.roundA, ")");
};
TinyColor2.prototype.toPercentageRgb = function() {
var fmt = function(x) {
return "".concat(Math.round(bound01(x, 255) * 100), "%");
};
return {
r: fmt(this.r),
g: fmt(this.g),
b: fmt(this.b),
a: this.a
};
};
TinyColor2.prototype.toPercentageRgbString = function() {
var rnd = function(x) {
return Math.round(bound01(x, 255) * 100);
};
return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")");
};
TinyColor2.prototype.toName = function() {
if (this.a === 0) {
return "transparent";
}
if (this.a < 1) {
return false;
}
var hex = "#" + rgbToHex(this.r, this.g, this.b, false);
for (var _i = 0, _a = Object.entries(names); _i < _a.length; _i++) {
var _b = _a[_i], key = _b[0], value = _b[1];
if (hex === value) {
return key;
}
}
return false;
};
TinyColor2.prototype.toString = function(format) {
var formatSet = Boolean(format);
format = format !== null && format !== void 0 ? format : this.format;
var formattedString = false;
var hasAlpha = this.a < 1 && this.a >= 0;
var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith("hex") || format === "name");
if (needsAlphaFormat) {
if (format === "name" && this.a === 0) {
return this.toName();
}
return this.toRgbString();
}
if (format === "rgb") {
formattedString = this.toRgbString();
}
if (format === "prgb") {
formattedString = this.toPercentageRgbString();
}
if (format === "hex" || format === "hex6") {
formattedString = this.toHexString();
}
if (format === "hex3") {
formattedString = this.toHexString(true);
}
if (format === "hex4") {
formattedString = this.toHex8String(true);
}
if (format === "hex8") {
formattedString = this.toHex8String();
}
if (format === "name") {
formattedString = this.toName();
}
if (format === "hsl") {
formattedString = this.toHslString();
}
if (format === "hsv") {
formattedString = this.toHsvString();
}
return formattedString || this.toHexString();
};
TinyColor2.prototype.toNumber = function() {
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
};
TinyColor2.prototype.clone = function() {
return new TinyColor2(this.toString());
};
TinyColor2.prototype.lighten = function(amount) {
if (amount === void 0) {
amount = 10;
}
var hsl = this.toHsl();
hsl.l += amount / 100;
hsl.l = clamp01(hsl.l);
return new TinyColor2(hsl);
};
TinyColor2.prototype.brighten = function(amount) {
if (amount === void 0) {
amount = 10;
}
var rgb = this.toRgb();
rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
return new TinyColor2(rgb);
};
TinyColor2.prototype.darken = function(amount) {
if (amount === void 0) {
amount = 10;
}
var hsl = this.toHsl();
hsl.l -= amount / 100;
hsl.l = clamp01(hsl.l);
return new TinyColor2(hsl);
};
TinyColor2.prototype.tint = function(amount) {
if (amount === void 0) {
amount = 10;
}
return this.mix("white", amount);
};
TinyColor2.prototype.shade = function(amount) {
if (amount === void 0) {
amount = 10;
}
return this.mix("black", amount);
};
TinyColor2.prototype.desaturate = function(amount) {
if (amount === void 0) {
amount = 10;
}
var hsl = this.toHsl();
hsl.s -= amount / 100;
hsl.s = clamp01(hsl.s);
return new TinyColor2(hsl);
};
TinyColor2.prototype.saturate = function(amount) {
if (amount === void 0) {
amount = 10;
}
var hsl = this.toHsl();
hsl.s += amount / 100;
hsl.s = clamp01(hsl.s);
return new TinyColor2(hsl);
};
TinyColor2.prototype.greyscale = function() {
return this.desaturate(100);
};
TinyColor2.prototype.spin = function(amount) {
var hsl = this.toHsl();
var hue = (hsl.h + amount) % 360;
hsl.h = hue < 0 ? 360 + hue : hue;
return new TinyColor2(hsl);
};
TinyColor2.prototype.mix = function(color, amount) {
if (amount === void 0) {
amount = 50;
}
var rgb1 = this.toRgb();
var rgb2 = new TinyColor2(color).toRgb();
var p = amount / 100;
var rgba = {
r: (rgb2.r - rgb1.r) * p + rgb1.r,
g: (rgb2.g - rgb1.g) * p + rgb1.g,
b: (rgb2.b - rgb1.b) * p + rgb1.b,
a: (rgb2.a - rgb1.a) * p + rgb1.a
};
return new TinyColor2(rgba);
};
TinyColor2.prototype.analogous = function(results, slices) {
if (results === void 0) {
results = 6;
}
if (slices === void 0) {
slices = 30;
}
var hsl = this.toHsl();
var part = 360 / slices;
var ret = [this];
for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) {
hsl.h = (hsl.h + part) % 360;
ret.push(new TinyColor2(hsl));
}
return ret;
};
TinyColor2.prototype.complement = function() {
var hsl = this.toHsl();
hsl.h = (hsl.h + 180) % 360;
return new TinyColor2(hsl);
};
TinyColor2.prototype.monochromatic = function(results) {
if (results === void 0) {
results = 6;
}
var hsv = this.toHsv();
var h = hsv.h;
var s = hsv.s;
var v = hsv.v;
var res = [];
var modification = 1 / results;
while (results--) {
res.push(new TinyColor2({ h, s, v }));
v = (v + modification) % 1;
}
return res;
};
TinyColor2.prototype.splitcomplement = function() {
var hsl = this.toHsl();
var h = hsl.h;
return [
this,
new TinyColor2({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),
new TinyColor2({ h: (h + 216) % 360, s: hsl.s, l: hsl.l })
];
};
TinyColor2.prototype.onBackground = function(background) {
var fg = this.toRgb();
var bg = new TinyColor2(background).toRgb();
var alpha = fg.a + bg.a * (1 - fg.a);
return new TinyColor2({
r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
a: alpha
});
};
TinyColor2.prototype.triad = function() {
return this.polyad(3);
};
TinyColor2.prototype.tetrad = function() {
return this.polyad(4);
};
TinyColor2.prototype.polyad = function(n) {
var hsl = this.toHsl();
var h = hsl.h;
var result = [this];
var increment = 360 / n;
for (var i = 1; i < n; i++) {
result.push(new TinyColor2({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));
}
return result;
};
TinyColor2.prototype.equals = function(color) {
return this.toRgbString() === new TinyColor2(color).toRgbString();
};
return TinyColor2;
})()
);
export {
rgbToHsv,
rgbToHex,
inputToRGB,
TinyColor
};
//# sourceMappingURL=chunk-USF4GMDZ.js.map
File diff suppressed because it is too large Load Diff
@@ -1,841 +0,0 @@
import {
initSlideMotion
} from "/node_modules/.vite/deps/chunk-6BFCWS52.js?v=e2549d3d";
import {
genComponentStyleHook,
genFocusStyle,
merge,
resetComponent,
textEllipsis
} from "/node_modules/.vite/deps/chunk-COFT5PGQ.js?v=e2549d3d";
import {
_extends
} from "/node_modules/.vite/deps/chunk-EQCCHGRT.js?v=e2549d3d";
// node_modules/ant-design-vue/es/tabs/style/motion.js
var genMotionStyle = (token) => {
const {
componentCls,
motionDurationSlow
} = token;
return [
{
[componentCls]: {
[`${componentCls}-switch`]: {
"&-appear, &-enter": {
transition: "none",
"&-start": {
opacity: 0
},
"&-active": {
opacity: 1,
transition: `opacity ${motionDurationSlow}`
}
},
"&-leave": {
position: "absolute",
transition: "none",
inset: 0,
"&-start": {
opacity: 1
},
"&-active": {
opacity: 0,
transition: `opacity ${motionDurationSlow}`
}
}
}
}
},
// Follow code may reuse in other components
[initSlideMotion(token, "slide-up"), initSlideMotion(token, "slide-down")]
];
};
var motion_default = genMotionStyle;
// node_modules/ant-design-vue/es/tabs/style/index.js
var genCardStyle = (token) => {
const {
componentCls,
tabsCardHorizontalPadding,
tabsCardHeadBackground,
tabsCardGutter,
colorSplit
} = token;
return {
[`${componentCls}-card`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
margin: 0,
padding: tabsCardHorizontalPadding,
background: tabsCardHeadBackground,
border: `${token.lineWidth}px ${token.lineType} ${colorSplit}`,
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`
},
[`${componentCls}-tab-active`]: {
color: token.colorPrimary,
background: token.colorBgContainer
},
[`${componentCls}-ink-bar`]: {
visibility: "hidden"
}
},
// ========================== Top & Bottom ==========================
[`&${componentCls}-top, &${componentCls}-bottom`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab + ${componentCls}-tab`]: {
marginLeft: {
_skip_check_: true,
value: `${tabsCardGutter}px`
}
}
}
},
[`&${componentCls}-top`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`
},
[`${componentCls}-tab-active`]: {
borderBottomColor: token.colorBgContainer
}
}
},
[`&${componentCls}-bottom`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
borderRadius: `0 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px`
},
[`${componentCls}-tab-active`]: {
borderTopColor: token.colorBgContainer
}
}
},
// ========================== Left & Right ==========================
[`&${componentCls}-left, &${componentCls}-right`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab + ${componentCls}-tab`]: {
marginTop: `${tabsCardGutter}px`
}
}
},
[`&${componentCls}-left`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
borderRadius: {
_skip_check_: true,
value: `${token.borderRadiusLG}px 0 0 ${token.borderRadiusLG}px`
}
},
[`${componentCls}-tab-active`]: {
borderRightColor: {
_skip_check_: true,
value: token.colorBgContainer
}
}
}
},
[`&${componentCls}-right`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
borderRadius: {
_skip_check_: true,
value: `0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px 0`
}
},
[`${componentCls}-tab-active`]: {
borderLeftColor: {
_skip_check_: true,
value: token.colorBgContainer
}
}
}
}
}
};
};
var genDropdownStyle = (token) => {
const {
componentCls,
tabsHoverColor,
dropdownEdgeChildVerticalPadding
} = token;
return {
[`${componentCls}-dropdown`]: _extends(_extends({}, resetComponent(token)), {
position: "absolute",
top: -9999,
left: {
_skip_check_: true,
value: -9999
},
zIndex: token.zIndexPopup,
display: "block",
"&-hidden": {
display: "none"
},
[`${componentCls}-dropdown-menu`]: {
maxHeight: token.tabsDropdownHeight,
margin: 0,
padding: `${dropdownEdgeChildVerticalPadding}px 0`,
overflowX: "hidden",
overflowY: "auto",
textAlign: {
_skip_check_: true,
value: "left"
},
listStyleType: "none",
backgroundColor: token.colorBgContainer,
backgroundClip: "padding-box",
borderRadius: token.borderRadiusLG,
outline: "none",
boxShadow: token.boxShadowSecondary,
"&-item": _extends(_extends({}, textEllipsis), {
display: "flex",
alignItems: "center",
minWidth: token.tabsDropdownWidth,
margin: 0,
padding: `${token.paddingXXS}px ${token.paddingSM}px`,
color: token.colorText,
fontWeight: "normal",
fontSize: token.fontSize,
lineHeight: token.lineHeight,
cursor: "pointer",
transition: `all ${token.motionDurationSlow}`,
"> span": {
flex: 1,
whiteSpace: "nowrap"
},
"&-remove": {
flex: "none",
marginLeft: {
_skip_check_: true,
value: token.marginSM
},
color: token.colorTextDescription,
fontSize: token.fontSizeSM,
background: "transparent",
border: 0,
cursor: "pointer",
"&:hover": {
color: tabsHoverColor
}
},
"&:hover": {
background: token.controlItemBgHover
},
"&-disabled": {
"&, &:hover": {
color: token.colorTextDisabled,
background: "transparent",
cursor: "not-allowed"
}
}
})
}
})
};
};
var genPositionStyle = (token) => {
const {
componentCls,
margin,
colorSplit
} = token;
return {
// ========================== Top & Bottom ==========================
[`${componentCls}-top, ${componentCls}-bottom`]: {
flexDirection: "column",
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
margin: `0 0 ${margin}px 0`,
"&::before": {
position: "absolute",
right: {
_skip_check_: true,
value: 0
},
left: {
_skip_check_: true,
value: 0
},
borderBottom: `${token.lineWidth}px ${token.lineType} ${colorSplit}`,
content: "''"
},
[`${componentCls}-ink-bar`]: {
height: token.lineWidthBold,
"&-animated": {
transition: `width ${token.motionDurationSlow}, left ${token.motionDurationSlow},
right ${token.motionDurationSlow}`
}
},
[`${componentCls}-nav-wrap`]: {
"&::before, &::after": {
top: 0,
bottom: 0,
width: token.controlHeight
},
"&::before": {
left: {
_skip_check_: true,
value: 0
},
boxShadow: token.boxShadowTabsOverflowLeft
},
"&::after": {
right: {
_skip_check_: true,
value: 0
},
boxShadow: token.boxShadowTabsOverflowRight
},
[`&${componentCls}-nav-wrap-ping-left::before`]: {
opacity: 1
},
[`&${componentCls}-nav-wrap-ping-right::after`]: {
opacity: 1
}
}
}
},
[`${componentCls}-top`]: {
[`> ${componentCls}-nav,
> div > ${componentCls}-nav`]: {
"&::before": {
bottom: 0
},
[`${componentCls}-ink-bar`]: {
bottom: 0
}
}
},
[`${componentCls}-bottom`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
order: 1,
marginTop: `${margin}px`,
marginBottom: 0,
"&::before": {
top: 0
},
[`${componentCls}-ink-bar`]: {
top: 0
}
},
[`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
order: 0
}
},
// ========================== Left & Right ==========================
[`${componentCls}-left, ${componentCls}-right`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
flexDirection: "column",
minWidth: token.controlHeight * 1.25,
// >>>>>>>>>>> Tab
[`${componentCls}-tab`]: {
padding: `${token.paddingXS}px ${token.paddingLG}px`,
textAlign: "center"
},
[`${componentCls}-tab + ${componentCls}-tab`]: {
margin: `${token.margin}px 0 0 0`
},
// >>>>>>>>>>> Nav
[`${componentCls}-nav-wrap`]: {
flexDirection: "column",
"&::before, &::after": {
right: {
_skip_check_: true,
value: 0
},
left: {
_skip_check_: true,
value: 0
},
height: token.controlHeight
},
"&::before": {
top: 0,
boxShadow: token.boxShadowTabsOverflowTop
},
"&::after": {
bottom: 0,
boxShadow: token.boxShadowTabsOverflowBottom
},
[`&${componentCls}-nav-wrap-ping-top::before`]: {
opacity: 1
},
[`&${componentCls}-nav-wrap-ping-bottom::after`]: {
opacity: 1
}
},
// >>>>>>>>>>> Ink Bar
[`${componentCls}-ink-bar`]: {
width: token.lineWidthBold,
"&-animated": {
transition: `height ${token.motionDurationSlow}, top ${token.motionDurationSlow}`
}
},
[`${componentCls}-nav-list, ${componentCls}-nav-operations`]: {
flex: "1 0 auto",
flexDirection: "column"
}
}
},
[`${componentCls}-left`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-ink-bar`]: {
right: {
_skip_check_: true,
value: 0
}
}
},
[`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
marginLeft: {
_skip_check_: true,
value: `-${token.lineWidth}px`
},
borderLeft: {
_skip_check_: true,
value: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`
},
[`> ${componentCls}-content > ${componentCls}-tabpane`]: {
paddingLeft: {
_skip_check_: true,
value: token.paddingLG
}
}
}
},
[`${componentCls}-right`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
order: 1,
[`${componentCls}-ink-bar`]: {
left: {
_skip_check_: true,
value: 0
}
}
},
[`> ${componentCls}-content-holder, > div > ${componentCls}-content-holder`]: {
order: 0,
marginRight: {
_skip_check_: true,
value: -token.lineWidth
},
borderRight: {
_skip_check_: true,
value: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`
},
[`> ${componentCls}-content > ${componentCls}-tabpane`]: {
paddingRight: {
_skip_check_: true,
value: token.paddingLG
}
}
}
}
};
};
var genSizeStyle = (token) => {
const {
componentCls,
padding
} = token;
return {
[componentCls]: {
"&-small": {
[`> ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: `${token.paddingXS}px 0`,
fontSize: token.fontSize
}
}
},
"&-large": {
[`> ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: `${padding}px 0`,
fontSize: token.fontSizeLG
}
}
}
},
[`${componentCls}-card`]: {
[`&${componentCls}-small`]: {
[`> ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: `${token.paddingXXS * 1.5}px ${padding}px`
}
},
[`&${componentCls}-bottom`]: {
[`> ${componentCls}-nav ${componentCls}-tab`]: {
borderRadius: `0 0 ${token.borderRadius}px ${token.borderRadius}px`
}
},
[`&${componentCls}-top`]: {
[`> ${componentCls}-nav ${componentCls}-tab`]: {
borderRadius: `${token.borderRadius}px ${token.borderRadius}px 0 0`
}
},
[`&${componentCls}-right`]: {
[`> ${componentCls}-nav ${componentCls}-tab`]: {
borderRadius: {
_skip_check_: true,
value: `0 ${token.borderRadius}px ${token.borderRadius}px 0`
}
}
},
[`&${componentCls}-left`]: {
[`> ${componentCls}-nav ${componentCls}-tab`]: {
borderRadius: {
_skip_check_: true,
value: `${token.borderRadius}px 0 0 ${token.borderRadius}px`
}
}
}
},
[`&${componentCls}-large`]: {
[`> ${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
padding: `${token.paddingXS}px ${padding}px ${token.paddingXXS * 1.5}px`
}
}
}
}
};
};
var genTabStyle = (token) => {
const {
componentCls,
tabsActiveColor,
tabsHoverColor,
iconCls,
tabsHorizontalGutter
} = token;
const tabCls = `${componentCls}-tab`;
return {
[tabCls]: {
position: "relative",
display: "inline-flex",
alignItems: "center",
padding: `${token.paddingSM}px 0`,
fontSize: `${token.fontSize}px`,
background: "transparent",
border: 0,
outline: "none",
cursor: "pointer",
"&-btn, &-remove": _extends({
"&:focus:not(:focus-visible), &:active": {
color: tabsActiveColor
}
}, genFocusStyle(token)),
"&-btn": {
outline: "none",
transition: "all 0.3s"
},
"&-remove": {
flex: "none",
marginRight: {
_skip_check_: true,
value: -token.marginXXS
},
marginLeft: {
_skip_check_: true,
value: token.marginXS
},
color: token.colorTextDescription,
fontSize: token.fontSizeSM,
background: "transparent",
border: "none",
outline: "none",
cursor: "pointer",
transition: `all ${token.motionDurationSlow}`,
"&:hover": {
color: token.colorTextHeading
}
},
"&:hover": {
color: tabsHoverColor
},
[`&${tabCls}-active ${tabCls}-btn`]: {
color: token.colorPrimary,
textShadow: token.tabsActiveTextShadow
},
[`&${tabCls}-disabled`]: {
color: token.colorTextDisabled,
cursor: "not-allowed"
},
[`&${tabCls}-disabled ${tabCls}-btn, &${tabCls}-disabled ${componentCls}-remove`]: {
"&:focus, &:active": {
color: token.colorTextDisabled
}
},
[`& ${tabCls}-remove ${iconCls}`]: {
margin: 0
},
[iconCls]: {
marginRight: {
_skip_check_: true,
value: token.marginSM
}
}
},
[`${tabCls} + ${tabCls}`]: {
margin: {
_skip_check_: true,
value: `0 0 0 ${tabsHorizontalGutter}px`
}
}
};
};
var genRtlStyle = (token) => {
const {
componentCls,
tabsHorizontalGutter,
iconCls,
tabsCardGutter
} = token;
const rtlCls = `${componentCls}-rtl`;
return {
[rtlCls]: {
direction: "rtl",
[`${componentCls}-nav`]: {
[`${componentCls}-tab`]: {
margin: {
_skip_check_: true,
value: `0 0 0 ${tabsHorizontalGutter}px`
},
[`${componentCls}-tab:last-of-type`]: {
marginLeft: {
_skip_check_: true,
value: 0
}
},
[iconCls]: {
marginRight: {
_skip_check_: true,
value: 0
},
marginLeft: {
_skip_check_: true,
value: `${token.marginSM}px`
}
},
[`${componentCls}-tab-remove`]: {
marginRight: {
_skip_check_: true,
value: `${token.marginXS}px`
},
marginLeft: {
_skip_check_: true,
value: `-${token.marginXXS}px`
},
[iconCls]: {
margin: 0
}
}
}
},
[`&${componentCls}-left`]: {
[`> ${componentCls}-nav`]: {
order: 1
},
[`> ${componentCls}-content-holder`]: {
order: 0
}
},
[`&${componentCls}-right`]: {
[`> ${componentCls}-nav`]: {
order: 0
},
[`> ${componentCls}-content-holder`]: {
order: 1
}
},
// ====================== Card ======================
[`&${componentCls}-card${componentCls}-top, &${componentCls}-card${componentCls}-bottom`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-tab + ${componentCls}-tab`]: {
marginRight: {
_skip_check_: true,
value: `${tabsCardGutter}px`
},
marginLeft: {
_skip_check_: true,
value: 0
}
}
}
}
},
[`${componentCls}-dropdown-rtl`]: {
direction: "rtl"
},
[`${componentCls}-menu-item`]: {
[`${componentCls}-dropdown-rtl`]: {
textAlign: {
_skip_check_: true,
value: "right"
}
}
}
};
};
var genTabsStyle = (token) => {
const {
componentCls,
tabsCardHorizontalPadding,
tabsCardHeight,
tabsCardGutter,
tabsHoverColor,
tabsActiveColor,
colorSplit
} = token;
return {
[componentCls]: _extends(_extends(_extends(_extends({}, resetComponent(token)), {
display: "flex",
// ========================== Navigation ==========================
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
position: "relative",
display: "flex",
flex: "none",
alignItems: "center",
[`${componentCls}-nav-wrap`]: {
position: "relative",
display: "flex",
flex: "auto",
alignSelf: "stretch",
overflow: "hidden",
whiteSpace: "nowrap",
transform: "translate(0)",
// >>>>> Ping shadow
"&::before, &::after": {
position: "absolute",
zIndex: 1,
opacity: 0,
transition: `opacity ${token.motionDurationSlow}`,
content: "''",
pointerEvents: "none"
}
},
[`${componentCls}-nav-list`]: {
position: "relative",
display: "flex",
transition: `opacity ${token.motionDurationSlow}`
},
// >>>>>>>> Operations
[`${componentCls}-nav-operations`]: {
display: "flex",
alignSelf: "stretch"
},
[`${componentCls}-nav-operations-hidden`]: {
position: "absolute",
visibility: "hidden",
pointerEvents: "none"
},
[`${componentCls}-nav-more`]: {
position: "relative",
padding: tabsCardHorizontalPadding,
background: "transparent",
border: 0,
"&::after": {
position: "absolute",
right: {
_skip_check_: true,
value: 0
},
bottom: 0,
left: {
_skip_check_: true,
value: 0
},
height: token.controlHeightLG / 8,
transform: "translateY(100%)",
content: "''"
}
},
[`${componentCls}-nav-add`]: _extends({
minWidth: `${tabsCardHeight}px`,
marginLeft: {
_skip_check_: true,
value: `${tabsCardGutter}px`
},
padding: `0 ${token.paddingXS}px`,
background: "transparent",
border: `${token.lineWidth}px ${token.lineType} ${colorSplit}`,
borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`,
outline: "none",
cursor: "pointer",
color: token.colorText,
transition: `all ${token.motionDurationSlow} ${token.motionEaseInOut}`,
"&:hover": {
color: tabsHoverColor
},
"&:active, &:focus:not(:focus-visible)": {
color: tabsActiveColor
}
}, genFocusStyle(token))
},
[`${componentCls}-extra-content`]: {
flex: "none"
},
// ============================ InkBar ============================
[`${componentCls}-ink-bar`]: {
position: "absolute",
background: token.colorPrimary,
pointerEvents: "none"
}
}), genTabStyle(token)), {
// =========================== TabPanes ===========================
[`${componentCls}-content`]: {
position: "relative",
display: "flex",
width: "100%",
["&-animated"]: {
transition: "margin 0.3s"
}
},
[`${componentCls}-content-holder`]: {
flex: "auto",
minWidth: 0,
minHeight: 0
},
[`${componentCls}-tabpane`]: {
outline: "none",
flex: "none",
width: "100%"
}
}),
[`${componentCls}-centered`]: {
[`> ${componentCls}-nav, > div > ${componentCls}-nav`]: {
[`${componentCls}-nav-wrap`]: {
[`&:not([class*='${componentCls}-nav-wrap-ping'])`]: {
justifyContent: "center"
}
}
}
}
};
};
var style_default = genComponentStyleHook("Tabs", (token) => {
const tabsCardHeight = token.controlHeightLG;
const tabsToken = merge(token, {
tabsHoverColor: token.colorPrimaryHover,
tabsActiveColor: token.colorPrimaryActive,
tabsCardHorizontalPadding: `${(tabsCardHeight - Math.round(token.fontSize * token.lineHeight)) / 2 - token.lineWidth}px ${token.padding}px`,
tabsCardHeight,
tabsCardGutter: token.marginXXS / 2,
tabsHorizontalGutter: 32,
tabsCardHeadBackground: token.colorFillAlter,
dropdownEdgeChildVerticalPadding: token.paddingXXS,
tabsActiveTextShadow: "0 0 0.25px currentcolor",
tabsDropdownHeight: 200,
tabsDropdownWidth: 120
});
return [genSizeStyle(tabsToken), genRtlStyle(tabsToken), genPositionStyle(tabsToken), genDropdownStyle(tabsToken), genCardStyle(tabsToken), genTabsStyle(tabsToken), motion_default(tabsToken)];
}, (token) => ({
zIndexPopup: token.zIndexPopupBase + 50
}));
export {
style_default
};
//# sourceMappingURL=chunk-TX6JHECE.js.map
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,893 +0,0 @@
import {
collapse_default,
initSlideMotion,
initZoomMotion
} from "/node_modules/.vite/deps/chunk-6BFCWS52.js?v=e2549d3d";
import {
clearFix,
genComponentStyleHook,
genFocusOutline,
merge,
resetComponent,
resetIcon,
textEllipsis
} from "/node_modules/.vite/deps/chunk-COFT5PGQ.js?v=e2549d3d";
import {
TinyColor
} from "/node_modules/.vite/deps/chunk-USF4GMDZ.js?v=e2549d3d";
import {
_extends
} from "/node_modules/.vite/deps/chunk-EQCCHGRT.js?v=e2549d3d";
// node_modules/ant-design-vue/es/menu/style/horizontal.js
var getHorizontalStyle = (token) => {
const {
componentCls,
motionDurationSlow,
menuHorizontalHeight,
colorSplit,
lineWidth,
lineType,
menuItemPaddingInline
} = token;
return {
[`${componentCls}-horizontal`]: {
lineHeight: `${menuHorizontalHeight}px`,
border: 0,
borderBottom: `${lineWidth}px ${lineType} ${colorSplit}`,
boxShadow: "none",
"&::after": {
display: "block",
clear: "both",
height: 0,
content: '"\\20"'
},
// ======================= Item =======================
[`${componentCls}-item, ${componentCls}-submenu`]: {
position: "relative",
display: "inline-block",
verticalAlign: "bottom",
paddingInline: menuItemPaddingInline
},
[`> ${componentCls}-item:hover,
> ${componentCls}-item-active,
> ${componentCls}-submenu ${componentCls}-submenu-title:hover`]: {
backgroundColor: "transparent"
},
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`].join(",")
},
// ===================== Sub Menu =====================
[`${componentCls}-submenu-arrow`]: {
display: "none"
}
}
};
};
var horizontal_default = getHorizontalStyle;
// node_modules/ant-design-vue/es/menu/style/rtl.js
var getRTLStyle = (_ref) => {
let {
componentCls,
menuArrowOffset
} = _ref;
return {
[`${componentCls}-rtl`]: {
direction: "rtl"
},
[`${componentCls}-submenu-rtl`]: {
transformOrigin: "100% 0"
},
// Vertical Arrow
[`${componentCls}-rtl${componentCls}-vertical,
${componentCls}-submenu-rtl ${componentCls}-vertical`]: {
[`${componentCls}-submenu-arrow`]: {
"&::before": {
transform: `rotate(-45deg) translateY(-${menuArrowOffset})`
},
"&::after": {
transform: `rotate(45deg) translateY(${menuArrowOffset})`
}
}
}
};
};
var rtl_default = getRTLStyle;
// node_modules/ant-design-vue/es/menu/style/theme.js
var accessibilityFocus = (token) => _extends({}, genFocusOutline(token));
var getThemeStyle = (token, themeSuffix) => {
const {
componentCls,
colorItemText,
colorItemTextSelected,
colorGroupTitle,
colorItemBg,
colorSubItemBg,
colorItemBgSelected,
colorActiveBarHeight,
colorActiveBarWidth,
colorActiveBarBorderSize,
motionDurationSlow,
motionEaseInOut,
motionEaseOut,
menuItemPaddingInline,
motionDurationMid,
colorItemTextHover,
lineType,
colorSplit,
// Disabled
colorItemTextDisabled,
// Danger
colorDangerItemText,
colorDangerItemTextHover,
colorDangerItemTextSelected,
colorDangerItemBgActive,
colorDangerItemBgSelected,
colorItemBgHover,
menuSubMenuBg,
// Horizontal
colorItemTextSelectedHorizontal,
colorItemBgSelectedHorizontal
} = token;
return {
[`${componentCls}-${themeSuffix}`]: {
color: colorItemText,
background: colorItemBg,
[`&${componentCls}-root:focus-visible`]: _extends({}, accessibilityFocus(token)),
// ======================== Item ========================
[`${componentCls}-item-group-title`]: {
color: colorGroupTitle
},
[`${componentCls}-submenu-selected`]: {
[`> ${componentCls}-submenu-title`]: {
color: colorItemTextSelected
}
},
// Disabled
[`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
color: `${colorItemTextDisabled} !important`
},
// Hover
[`${componentCls}-item:hover, ${componentCls}-submenu-title:hover`]: {
[`&:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {
color: colorItemTextHover
}
},
[`&:not(${componentCls}-horizontal)`]: {
[`${componentCls}-item:not(${componentCls}-item-selected)`]: {
"&:hover": {
backgroundColor: colorItemBgHover
},
"&:active": {
backgroundColor: colorItemBgSelected
}
},
[`${componentCls}-submenu-title`]: {
"&:hover": {
backgroundColor: colorItemBgHover
},
"&:active": {
backgroundColor: colorItemBgSelected
}
}
},
// Danger - only Item has
[`${componentCls}-item-danger`]: {
color: colorDangerItemText,
[`&${componentCls}-item:hover`]: {
[`&:not(${componentCls}-item-selected):not(${componentCls}-submenu-selected)`]: {
color: colorDangerItemTextHover
}
},
[`&${componentCls}-item:active`]: {
background: colorDangerItemBgActive
}
},
[`${componentCls}-item a`]: {
"&, &:hover": {
color: "inherit"
}
},
[`${componentCls}-item-selected`]: {
color: colorItemTextSelected,
// Danger
[`&${componentCls}-item-danger`]: {
color: colorDangerItemTextSelected
},
[`a, a:hover`]: {
color: "inherit"
}
},
[`& ${componentCls}-item-selected`]: {
backgroundColor: colorItemBgSelected,
// Danger
[`&${componentCls}-item-danger`]: {
backgroundColor: colorDangerItemBgSelected
}
},
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
[`&:not(${componentCls}-item-disabled):focus-visible`]: _extends({}, accessibilityFocus(token))
},
[`&${componentCls}-submenu > ${componentCls}`]: {
backgroundColor: menuSubMenuBg
},
[`&${componentCls}-popup > ${componentCls}`]: {
backgroundColor: colorItemBg
},
// ====================== Horizontal ======================
[`&${componentCls}-horizontal`]: _extends(_extends({}, themeSuffix === "dark" ? {
borderBottom: 0
} : {}), {
[`> ${componentCls}-item, > ${componentCls}-submenu`]: {
top: colorActiveBarBorderSize,
marginTop: -colorActiveBarBorderSize,
marginBottom: 0,
borderRadius: 0,
"&::after": {
position: "absolute",
insetInline: menuItemPaddingInline,
bottom: 0,
borderBottom: `${colorActiveBarHeight}px solid transparent`,
transition: `border-color ${motionDurationSlow} ${motionEaseInOut}`,
content: '""'
},
[`&:hover, &-active, &-open`]: {
"&::after": {
borderBottomWidth: colorActiveBarHeight,
borderBottomColor: colorItemTextSelectedHorizontal
}
},
[`&-selected`]: {
color: colorItemTextSelectedHorizontal,
backgroundColor: colorItemBgSelectedHorizontal,
"&::after": {
borderBottomWidth: colorActiveBarHeight,
borderBottomColor: colorItemTextSelectedHorizontal
}
}
}
}),
// ================== Inline & Vertical ===================
//
[`&${componentCls}-root`]: {
[`&${componentCls}-inline, &${componentCls}-vertical`]: {
borderInlineEnd: `${colorActiveBarBorderSize}px ${lineType} ${colorSplit}`
}
},
// ======================== Inline ========================
[`&${componentCls}-inline`]: {
// Sub
[`${componentCls}-sub${componentCls}-inline`]: {
background: colorSubItemBg
},
// Item
[`${componentCls}-item, ${componentCls}-submenu-title`]: colorActiveBarBorderSize && colorActiveBarWidth ? {
width: `calc(100% + ${colorActiveBarBorderSize}px)`
} : {},
[`${componentCls}-item`]: {
position: "relative",
"&::after": {
position: "absolute",
insetBlock: 0,
insetInlineEnd: 0,
borderInlineEnd: `${colorActiveBarWidth}px solid ${colorItemTextSelected}`,
transform: "scaleY(0.0001)",
opacity: 0,
transition: [`transform ${motionDurationMid} ${motionEaseOut}`, `opacity ${motionDurationMid} ${motionEaseOut}`].join(","),
content: '""'
},
// Danger
[`&${componentCls}-item-danger`]: {
"&::after": {
borderInlineEndColor: colorDangerItemTextSelected
}
}
},
[`${componentCls}-selected, ${componentCls}-item-selected`]: {
"&::after": {
transform: "scaleY(1)",
opacity: 1,
transition: [`transform ${motionDurationMid} ${motionEaseInOut}`, `opacity ${motionDurationMid} ${motionEaseInOut}`].join(",")
}
}
}
}
};
};
var theme_default = getThemeStyle;
// node_modules/ant-design-vue/es/menu/style/vertical.js
var getVerticalInlineStyle = (token) => {
const {
componentCls,
menuItemHeight,
itemMarginInline,
padding,
menuArrowSize,
marginXS,
marginXXS
} = token;
const paddingWithArrow = padding + menuArrowSize + marginXS;
return {
[`${componentCls}-item`]: {
position: "relative"
},
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
height: menuItemHeight,
lineHeight: `${menuItemHeight}px`,
paddingInline: padding,
overflow: "hidden",
textOverflow: "ellipsis",
marginInline: itemMarginInline,
marginBlock: marginXXS,
width: `calc(100% - ${itemMarginInline * 2}px)`
},
// disable margin collapsed
[`${componentCls}-submenu`]: {
paddingBottom: 0.02
},
[`> ${componentCls}-item,
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
height: menuItemHeight,
lineHeight: `${menuItemHeight}px`
},
[`${componentCls}-item-group-list ${componentCls}-submenu-title,
${componentCls}-submenu-title`]: {
paddingInlineEnd: paddingWithArrow
}
};
};
var getVerticalStyle = (token) => {
const {
componentCls,
iconCls,
menuItemHeight,
colorTextLightSolid,
dropdownWidth,
controlHeightLG,
motionDurationMid,
motionEaseOut,
paddingXL,
fontSizeSM,
fontSizeLG,
motionDurationSlow,
paddingXS,
boxShadowSecondary
} = token;
const inlineItemStyle = {
height: menuItemHeight,
lineHeight: `${menuItemHeight}px`,
listStylePosition: "inside",
listStyleType: "disc"
};
return [
{
[componentCls]: {
[`&-inline, &-vertical`]: _extends({
[`&${componentCls}-root`]: {
boxShadow: "none"
}
}, getVerticalInlineStyle(token))
},
[`${componentCls}-submenu-popup`]: {
[`${componentCls}-vertical`]: _extends(_extends({}, getVerticalInlineStyle(token)), {
boxShadow: boxShadowSecondary
})
}
},
// Vertical only
{
[`${componentCls}-submenu-popup ${componentCls}-vertical${componentCls}-sub`]: {
minWidth: dropdownWidth,
maxHeight: `calc(100vh - ${controlHeightLG * 2.5}px)`,
padding: "0",
overflow: "hidden",
borderInlineEnd: 0,
// https://github.com/ant-design/ant-design/issues/22244
// https://github.com/ant-design/ant-design/issues/26812
"&:not([class*='-active'])": {
overflowX: "hidden",
overflowY: "auto"
}
}
},
// Inline Only
{
[`${componentCls}-inline`]: {
width: "100%",
// Motion enhance for first level
[`&${componentCls}-root`]: {
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
display: "flex",
alignItems: "center",
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding ${motionDurationMid} ${motionEaseOut}`].join(","),
[`> ${componentCls}-title-content`]: {
flex: "auto",
minWidth: 0,
overflow: "hidden",
textOverflow: "ellipsis"
},
"> *": {
flex: "none"
}
}
},
// >>>>> Sub
[`${componentCls}-sub${componentCls}-inline`]: {
padding: 0,
border: 0,
borderRadius: 0,
boxShadow: "none",
[`& > ${componentCls}-submenu > ${componentCls}-submenu-title`]: inlineItemStyle,
[`& ${componentCls}-item-group-title`]: {
paddingInlineStart: paddingXL
}
},
// >>>>> Item
[`${componentCls}-item`]: inlineItemStyle
}
},
// Inline Collapse Only
{
[`${componentCls}-inline-collapsed`]: {
width: menuItemHeight * 2,
[`&${componentCls}-root`]: {
[`${componentCls}-item, ${componentCls}-submenu ${componentCls}-submenu-title`]: {
[`> ${componentCls}-inline-collapsed-noicon`]: {
fontSize: fontSizeLG,
textAlign: "center"
}
}
},
[`> ${componentCls}-item,
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
insetInlineStart: 0,
paddingInline: `calc(50% - ${fontSizeSM}px)`,
textOverflow: "clip",
[`
${componentCls}-submenu-arrow,
${componentCls}-submenu-expand-icon
`]: {
opacity: 0
},
[`${componentCls}-item-icon, ${iconCls}`]: {
margin: 0,
fontSize: fontSizeLG,
lineHeight: `${menuItemHeight}px`,
"+ span": {
display: "inline-block",
opacity: 0
}
}
},
[`${componentCls}-item-icon, ${iconCls}`]: {
display: "inline-block"
},
"&-tooltip": {
pointerEvents: "none",
[`${componentCls}-item-icon, ${iconCls}`]: {
display: "none"
},
"a, a:hover": {
color: colorTextLightSolid
}
},
[`${componentCls}-item-group-title`]: _extends(_extends({}, textEllipsis), {
paddingInline: paddingXS
})
}
}
];
};
var vertical_default = getVerticalStyle;
// node_modules/ant-design-vue/es/menu/style/index.js
var genMenuItemStyle = (token) => {
const {
componentCls,
fontSize,
motionDurationSlow,
motionDurationMid,
motionEaseInOut,
motionEaseOut,
iconCls,
controlHeightSM
} = token;
return {
// >>>>> Item
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
position: "relative",
display: "block",
margin: 0,
whiteSpace: "nowrap",
cursor: "pointer",
transition: [`border-color ${motionDurationSlow}`, `background ${motionDurationSlow}`, `padding ${motionDurationSlow} ${motionEaseInOut}`].join(","),
[`${componentCls}-item-icon, ${iconCls}`]: {
minWidth: fontSize,
fontSize,
transition: [`font-size ${motionDurationMid} ${motionEaseOut}`, `margin ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow}`].join(","),
"+ span": {
marginInlineStart: controlHeightSM - fontSize,
opacity: 1,
transition: [`opacity ${motionDurationSlow} ${motionEaseInOut}`, `margin ${motionDurationSlow}`, `color ${motionDurationSlow}`].join(",")
}
},
[`${componentCls}-item-icon`]: _extends({}, resetIcon()),
[`&${componentCls}-item-only-child`]: {
[`> ${iconCls}, > ${componentCls}-item-icon`]: {
marginInlineEnd: 0
}
}
},
// Disabled state sets text to gray and nukes hover/tab effects
[`${componentCls}-item-disabled, ${componentCls}-submenu-disabled`]: {
background: "none !important",
cursor: "not-allowed",
"&::after": {
borderColor: "transparent !important"
},
a: {
color: "inherit !important"
},
[`> ${componentCls}-submenu-title`]: {
color: "inherit !important",
cursor: "not-allowed"
}
}
};
};
var genSubMenuArrowStyle = (token) => {
const {
componentCls,
motionDurationSlow,
motionEaseInOut,
borderRadius,
menuArrowSize,
menuArrowOffset
} = token;
return {
[`${componentCls}-submenu`]: {
[`&-expand-icon, &-arrow`]: {
position: "absolute",
top: "50%",
insetInlineEnd: token.margin,
width: menuArrowSize,
color: "currentcolor",
transform: "translateY(-50%)",
transition: `transform ${motionDurationSlow} ${motionEaseInOut}, opacity ${motionDurationSlow}`
},
"&-arrow": {
// →
"&::before, &::after": {
position: "absolute",
width: menuArrowSize * 0.6,
height: menuArrowSize * 0.15,
backgroundColor: "currentcolor",
borderRadius,
transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `transform ${motionDurationSlow} ${motionEaseInOut}`, `top ${motionDurationSlow} ${motionEaseInOut}`, `color ${motionDurationSlow} ${motionEaseInOut}`].join(","),
content: '""'
},
"&::before": {
transform: `rotate(45deg) translateY(-${menuArrowOffset})`
},
"&::after": {
transform: `rotate(-45deg) translateY(${menuArrowOffset})`
}
}
}
};
};
var getBaseStyle = (token) => {
const {
antCls,
componentCls,
fontSize,
motionDurationSlow,
motionDurationMid,
motionEaseInOut,
lineHeight,
paddingXS,
padding,
colorSplit,
lineWidth,
zIndexPopup,
borderRadiusLG,
radiusSubMenuItem,
menuArrowSize,
menuArrowOffset,
lineType,
menuPanelMaskInset
} = token;
return [
// Misc
{
"": {
[`${componentCls}`]: _extends(_extends({}, clearFix()), {
// Hidden
[`&-hidden`]: {
display: "none"
}
})
},
[`${componentCls}-submenu-hidden`]: {
display: "none"
}
},
{
[componentCls]: _extends(_extends(_extends(_extends(_extends(_extends(_extends({}, resetComponent(token)), clearFix()), {
marginBottom: 0,
paddingInlineStart: 0,
// Override default ul/ol
fontSize,
lineHeight: 0,
listStyle: "none",
outline: "none",
transition: `width ${motionDurationSlow} cubic-bezier(0.2, 0, 0, 1) 0s`,
[`ul, ol`]: {
margin: 0,
padding: 0,
listStyle: "none"
},
// Overflow ellipsis
[`&-overflow`]: {
display: "flex",
[`${componentCls}-item`]: {
flex: "none"
}
},
[`${componentCls}-item, ${componentCls}-submenu, ${componentCls}-submenu-title`]: {
borderRadius: token.radiusItem
},
[`${componentCls}-item-group-title`]: {
padding: `${paddingXS}px ${padding}px`,
fontSize,
lineHeight,
transition: `all ${motionDurationSlow}`
},
[`&-horizontal ${componentCls}-submenu`]: {
transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`].join(",")
},
[`${componentCls}-submenu, ${componentCls}-submenu-inline`]: {
transition: [`border-color ${motionDurationSlow} ${motionEaseInOut}`, `background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationMid} ${motionEaseInOut}`].join(",")
},
[`${componentCls}-submenu ${componentCls}-sub`]: {
cursor: "initial",
transition: [`background ${motionDurationSlow} ${motionEaseInOut}`, `padding ${motionDurationSlow} ${motionEaseInOut}`].join(",")
},
[`${componentCls}-title-content`]: {
transition: `color ${motionDurationSlow}`
},
[`${componentCls}-item a`]: {
"&::before": {
position: "absolute",
inset: 0,
backgroundColor: "transparent",
content: '""'
}
},
// Removed a Badge related style seems it's safe
// https://github.com/ant-design/ant-design/issues/19809
// >>>>> Divider
[`${componentCls}-item-divider`]: {
overflow: "hidden",
lineHeight: 0,
borderColor: colorSplit,
borderStyle: lineType,
borderWidth: 0,
borderTopWidth: lineWidth,
marginBlock: lineWidth,
padding: 0,
"&-dashed": {
borderStyle: "dashed"
}
}
}), genMenuItemStyle(token)), {
[`${componentCls}-item-group`]: {
[`${componentCls}-item-group-list`]: {
margin: 0,
padding: 0,
[`${componentCls}-item, ${componentCls}-submenu-title`]: {
paddingInline: `${fontSize * 2}px ${padding}px`
}
}
},
// ======================= Sub Menu =======================
"&-submenu": {
"&-popup": {
position: "absolute",
zIndex: zIndexPopup,
background: "transparent",
borderRadius: borderRadiusLG,
boxShadow: "none",
transformOrigin: "0 0",
// https://github.com/ant-design/ant-design/issues/13955
"&::before": {
position: "absolute",
inset: `${menuPanelMaskInset}px 0 0`,
zIndex: -1,
width: "100%",
height: "100%",
opacity: 0,
content: '""'
}
},
// https://github.com/ant-design/ant-design/issues/13955
"&-placement-rightTop::before": {
top: 0,
insetInlineStart: menuPanelMaskInset
},
[`> ${componentCls}`]: _extends(_extends(_extends({
borderRadius: borderRadiusLG
}, genMenuItemStyle(token)), genSubMenuArrowStyle(token)), {
[`${componentCls}-item, ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
borderRadius: radiusSubMenuItem
},
[`${componentCls}-submenu-title::after`]: {
transition: `transform ${motionDurationSlow} ${motionEaseInOut}`
}
})
}
}), genSubMenuArrowStyle(token)), {
[`&-inline-collapsed ${componentCls}-submenu-arrow,
&-inline ${componentCls}-submenu-arrow`]: {
// ↓
"&::before": {
transform: `rotate(-45deg) translateX(${menuArrowOffset})`
},
"&::after": {
transform: `rotate(45deg) translateX(-${menuArrowOffset})`
}
},
[`${componentCls}-submenu-open${componentCls}-submenu-inline > ${componentCls}-submenu-title > ${componentCls}-submenu-arrow`]: {
// ↑
transform: `translateY(-${menuArrowSize * 0.2}px)`,
"&::after": {
transform: `rotate(-45deg) translateX(-${menuArrowOffset})`
},
"&::before": {
transform: `rotate(45deg) translateX(${menuArrowOffset})`
}
}
})
},
// Integration with header element so menu items have the same height
{
[`${antCls}-layout-header`]: {
[componentCls]: {
lineHeight: "inherit"
}
}
}
];
};
var style_default = ((prefixCls, injectStyle) => {
const useOriginHook = genComponentStyleHook("Menu", (token, _ref) => {
let {
overrideComponentToken
} = _ref;
if ((injectStyle === null || injectStyle === void 0 ? void 0 : injectStyle.value) === false) {
return [];
}
const {
colorBgElevated,
colorPrimary,
colorError,
colorErrorHover,
colorTextLightSolid
} = token;
const {
controlHeightLG,
fontSize
} = token;
const menuArrowSize = fontSize / 7 * 5;
const menuToken = merge(token, {
menuItemHeight: controlHeightLG,
menuItemPaddingInline: token.margin,
menuArrowSize,
menuHorizontalHeight: controlHeightLG * 1.15,
menuArrowOffset: `${menuArrowSize * 0.25}px`,
menuPanelMaskInset: -7,
menuSubMenuBg: colorBgElevated
});
const colorTextDark = new TinyColor(colorTextLightSolid).setAlpha(0.65).toRgbString();
const menuDarkToken = merge(menuToken, {
colorItemText: colorTextDark,
colorItemTextHover: colorTextLightSolid,
colorGroupTitle: colorTextDark,
colorItemTextSelected: colorTextLightSolid,
colorItemBg: "#001529",
colorSubItemBg: "#000c17",
colorItemBgActive: "transparent",
colorItemBgSelected: colorPrimary,
colorActiveBarWidth: 0,
colorActiveBarHeight: 0,
colorActiveBarBorderSize: 0,
// Disabled
colorItemTextDisabled: new TinyColor(colorTextLightSolid).setAlpha(0.25).toRgbString(),
// Danger
colorDangerItemText: colorError,
colorDangerItemTextHover: colorErrorHover,
colorDangerItemTextSelected: colorTextLightSolid,
colorDangerItemBgActive: colorError,
colorDangerItemBgSelected: colorError,
menuSubMenuBg: "#001529",
// Horizontal
colorItemTextSelectedHorizontal: colorTextLightSolid,
colorItemBgSelectedHorizontal: colorPrimary
}, _extends({}, overrideComponentToken));
return [
// Basic
getBaseStyle(menuToken),
// Horizontal
horizontal_default(menuToken),
// Vertical
vertical_default(menuToken),
// Theme
theme_default(menuToken, "light"),
theme_default(menuDarkToken, "dark"),
// RTL
rtl_default(menuToken),
// Motion
collapse_default(menuToken),
initSlideMotion(menuToken, "slide-up"),
initSlideMotion(menuToken, "slide-down"),
initZoomMotion(menuToken, "zoom-big")
];
}, (token) => {
const {
colorPrimary,
colorError,
colorTextDisabled,
colorErrorBg,
colorText,
colorTextDescription,
colorBgContainer,
colorFillAlter,
colorFillContent,
lineWidth,
lineWidthBold,
controlItemBgActive,
colorBgTextHover
} = token;
return {
dropdownWidth: 160,
zIndexPopup: token.zIndexPopupBase + 50,
radiusItem: token.borderRadiusLG,
radiusSubMenuItem: token.borderRadiusSM,
colorItemText: colorText,
colorItemTextHover: colorText,
colorItemTextHoverHorizontal: colorPrimary,
colorGroupTitle: colorTextDescription,
colorItemTextSelected: colorPrimary,
colorItemTextSelectedHorizontal: colorPrimary,
colorItemBg: colorBgContainer,
colorItemBgHover: colorBgTextHover,
colorItemBgActive: colorFillContent,
colorSubItemBg: colorFillAlter,
colorItemBgSelected: controlItemBgActive,
colorItemBgSelectedHorizontal: "transparent",
colorActiveBarWidth: 0,
colorActiveBarHeight: lineWidthBold,
colorActiveBarBorderSize: lineWidth,
// Disabled
colorItemTextDisabled: colorTextDisabled,
// Danger
colorDangerItemText: colorError,
colorDangerItemTextHover: colorError,
colorDangerItemTextSelected: colorError,
colorDangerItemBgActive: colorErrorBg,
colorDangerItemBgSelected: colorErrorBg,
itemMarginInline: token.marginXXS
};
});
return useOriginHook(prefixCls);
});
export {
style_default
};
//# sourceMappingURL=chunk-OIBTJ7JI.js.map
@@ -1,812 +0,0 @@
import {
genCompactItemStyle
} from "/node_modules/.vite/deps/chunk-ZYZGYAET.js?v=e2549d3d";
import {
clearFix,
genComponentStyleHook,
merge,
resetComponent
} from "/node_modules/.vite/deps/chunk-COFT5PGQ.js?v=e2549d3d";
import {
_extends
} from "/node_modules/.vite/deps/chunk-EQCCHGRT.js?v=e2549d3d";
// node_modules/ant-design-vue/es/input/style/index.js
var genPlaceholderStyle = (color) => ({
// Firefox
"&::-moz-placeholder": {
opacity: 1
},
"&::placeholder": {
color,
userSelect: "none"
// https://github.com/ant-design/ant-design/pull/32639
},
"&:placeholder-shown": {
textOverflow: "ellipsis"
}
});
var genHoverStyle = (token) => ({
borderColor: token.inputBorderHoverColor,
borderInlineEndWidth: token.lineWidth
});
var genActiveStyle = (token) => ({
borderColor: token.inputBorderHoverColor,
boxShadow: `0 0 0 ${token.controlOutlineWidth}px ${token.controlOutline}`,
borderInlineEndWidth: token.lineWidth,
outline: 0
});
var genDisabledStyle = (token) => ({
color: token.colorTextDisabled,
backgroundColor: token.colorBgContainerDisabled,
borderColor: token.colorBorder,
boxShadow: "none",
cursor: "not-allowed",
opacity: 1,
"&:hover": _extends({}, genHoverStyle(merge(token, {
inputBorderHoverColor: token.colorBorder
})))
});
var genInputLargeStyle = (token) => {
const {
inputPaddingVerticalLG,
fontSizeLG,
lineHeightLG,
borderRadiusLG,
inputPaddingHorizontalLG
} = token;
return {
padding: `${inputPaddingVerticalLG}px ${inputPaddingHorizontalLG}px`,
fontSize: fontSizeLG,
lineHeight: lineHeightLG,
borderRadius: borderRadiusLG
};
};
var genInputSmallStyle = (token) => ({
padding: `${token.inputPaddingVerticalSM}px ${token.controlPaddingHorizontalSM - 1}px`,
borderRadius: token.borderRadiusSM
});
var genStatusStyle = (token, parentCls) => {
const {
componentCls,
colorError,
colorWarning,
colorErrorOutline,
colorWarningOutline,
colorErrorBorderHover,
colorWarningBorderHover
} = token;
return {
[`&-status-error:not(${parentCls}-disabled):not(${parentCls}-borderless)${parentCls}`]: {
borderColor: colorError,
"&:hover": {
borderColor: colorErrorBorderHover
},
"&:focus, &-focused": _extends({}, genActiveStyle(merge(token, {
inputBorderActiveColor: colorError,
inputBorderHoverColor: colorError,
controlOutline: colorErrorOutline
}))),
[`${componentCls}-prefix`]: {
color: colorError
}
},
[`&-status-warning:not(${parentCls}-disabled):not(${parentCls}-borderless)${parentCls}`]: {
borderColor: colorWarning,
"&:hover": {
borderColor: colorWarningBorderHover
},
"&:focus, &-focused": _extends({}, genActiveStyle(merge(token, {
inputBorderActiveColor: colorWarning,
inputBorderHoverColor: colorWarning,
controlOutline: colorWarningOutline
}))),
[`${componentCls}-prefix`]: {
color: colorWarning
}
}
};
};
var genBasicInputStyle = (token) => _extends(_extends({
position: "relative",
display: "inline-block",
width: "100%",
minWidth: 0,
padding: `${token.inputPaddingVertical}px ${token.inputPaddingHorizontal}px`,
color: token.colorText,
fontSize: token.fontSize,
lineHeight: token.lineHeight,
backgroundColor: token.colorBgContainer,
backgroundImage: "none",
borderWidth: token.lineWidth,
borderStyle: token.lineType,
borderColor: token.colorBorder,
borderRadius: token.borderRadius,
transition: `all ${token.motionDurationMid}`
}, genPlaceholderStyle(token.colorTextPlaceholder)), {
"&:hover": _extends({}, genHoverStyle(token)),
"&:focus, &-focused": _extends({}, genActiveStyle(token)),
"&-disabled, &[disabled]": _extends({}, genDisabledStyle(token)),
"&-borderless": {
"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]": {
backgroundColor: "transparent",
border: "none",
boxShadow: "none"
}
},
// Reset height for `textarea`s
"textarea&": {
maxWidth: "100%",
height: "auto",
minHeight: token.controlHeight,
lineHeight: token.lineHeight,
verticalAlign: "bottom",
transition: `all ${token.motionDurationSlow}, height 0s`,
resize: "vertical"
},
// Size
"&-lg": _extends({}, genInputLargeStyle(token)),
"&-sm": _extends({}, genInputSmallStyle(token)),
// RTL
"&-rtl": {
direction: "rtl"
},
"&-textarea-rtl": {
direction: "rtl"
}
});
var genInputGroupStyle = (token) => {
const {
componentCls,
antCls
} = token;
return {
position: "relative",
display: "table",
width: "100%",
borderCollapse: "separate",
borderSpacing: 0,
// Undo padding and float of grid classes
[`&[class*='col-']`]: {
paddingInlineEnd: token.paddingXS,
"&:last-child": {
paddingInlineEnd: 0
}
},
// Sizing options
[`&-lg ${componentCls}, &-lg > ${componentCls}-group-addon`]: _extends({}, genInputLargeStyle(token)),
[`&-sm ${componentCls}, &-sm > ${componentCls}-group-addon`]: _extends({}, genInputSmallStyle(token)),
[`> ${componentCls}`]: {
display: "table-cell",
"&:not(:first-child):not(:last-child)": {
borderRadius: 0
}
},
[`${componentCls}-group`]: {
[`&-addon, &-wrap`]: {
display: "table-cell",
width: 1,
whiteSpace: "nowrap",
verticalAlign: "middle",
"&:not(:first-child):not(:last-child)": {
borderRadius: 0
}
},
"&-wrap > *": {
display: "block !important"
},
"&-addon": {
position: "relative",
padding: `0 ${token.inputPaddingHorizontal}px`,
color: token.colorText,
fontWeight: "normal",
fontSize: token.fontSize,
textAlign: "center",
backgroundColor: token.colorFillAlter,
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
borderRadius: token.borderRadius,
transition: `all ${token.motionDurationSlow}`,
lineHeight: 1,
// Reset Select's style in addon
[`${antCls}-select`]: {
margin: `-${token.inputPaddingVertical + 1}px -${token.inputPaddingHorizontal}px`,
[`&${antCls}-select-single:not(${antCls}-select-customize-input)`]: {
[`${antCls}-select-selector`]: {
backgroundColor: "inherit",
border: `${token.lineWidth}px ${token.lineType} transparent`,
boxShadow: "none"
}
},
"&-open, &-focused": {
[`${antCls}-select-selector`]: {
color: token.colorPrimary
}
}
},
// https://github.com/ant-design/ant-design/issues/31333
[`${antCls}-cascader-picker`]: {
margin: `-9px -${token.inputPaddingHorizontal}px`,
backgroundColor: "transparent",
[`${antCls}-cascader-input`]: {
textAlign: "start",
border: 0,
boxShadow: "none"
}
}
},
"&-addon:first-child": {
borderInlineEnd: 0
},
"&-addon:last-child": {
borderInlineStart: 0
}
},
[`${componentCls}`]: {
float: "inline-start",
width: "100%",
marginBottom: 0,
textAlign: "inherit",
"&:focus": {
zIndex: 1,
borderInlineEndWidth: 1
},
"&:hover": {
zIndex: 1,
borderInlineEndWidth: 1,
[`${componentCls}-search-with-button &`]: {
zIndex: 0
}
}
},
// Reset rounded corners
[`> ${componentCls}:first-child, ${componentCls}-group-addon:first-child`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0,
// Reset Select's style in addon
[`${antCls}-select ${antCls}-select-selector`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
[`> ${componentCls}-affix-wrapper`]: {
[`&:not(:first-child) ${componentCls}`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
},
[`&:not(:last-child) ${componentCls}`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
[`> ${componentCls}:last-child, ${componentCls}-group-addon:last-child`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0,
// Reset Select's style in addon
[`${antCls}-select ${antCls}-select-selector`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
},
[`${componentCls}-affix-wrapper`]: {
"&:not(:last-child)": {
borderStartEndRadius: 0,
borderEndEndRadius: 0,
[`${componentCls}-search &`]: {
borderStartStartRadius: token.borderRadius,
borderEndStartRadius: token.borderRadius
}
},
[`&:not(:first-child), ${componentCls}-search &:not(:first-child)`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
},
[`&${componentCls}-group-compact`]: _extends(_extends({
display: "block"
}, clearFix()), {
[`${componentCls}-group-addon, ${componentCls}-group-wrap, > ${componentCls}`]: {
"&:not(:first-child):not(:last-child)": {
borderInlineEndWidth: token.lineWidth,
"&:hover": {
zIndex: 1
},
"&:focus": {
zIndex: 1
}
}
},
"& > *": {
display: "inline-block",
float: "none",
verticalAlign: "top",
borderRadius: 0
},
[`& > ${componentCls}-affix-wrapper`]: {
display: "inline-flex"
},
[`& > ${antCls}-picker-range`]: {
display: "inline-flex"
},
"& > *:not(:last-child)": {
marginInlineEnd: -token.lineWidth,
borderInlineEndWidth: token.lineWidth
},
// Undo float for .ant-input-group .ant-input
[`${componentCls}`]: {
float: "none"
},
// reset border for Select, DatePicker, AutoComplete, Cascader, Mention, TimePicker, Input
[`& > ${antCls}-select > ${antCls}-select-selector,
& > ${antCls}-select-auto-complete ${componentCls},
& > ${antCls}-cascader-picker ${componentCls},
& > ${componentCls}-group-wrapper ${componentCls}`]: {
borderInlineEndWidth: token.lineWidth,
borderRadius: 0,
"&:hover": {
zIndex: 1
},
"&:focus": {
zIndex: 1
}
},
[`& > ${antCls}-select-focused`]: {
zIndex: 1
},
// update z-index for arrow icon
[`& > ${antCls}-select > ${antCls}-select-arrow`]: {
zIndex: 1
// https://github.com/ant-design/ant-design/issues/20371
},
[`& > *:first-child,
& > ${antCls}-select:first-child > ${antCls}-select-selector,
& > ${antCls}-select-auto-complete:first-child ${componentCls},
& > ${antCls}-cascader-picker:first-child ${componentCls}`]: {
borderStartStartRadius: token.borderRadius,
borderEndStartRadius: token.borderRadius
},
[`& > *:last-child,
& > ${antCls}-select:last-child > ${antCls}-select-selector,
& > ${antCls}-cascader-picker:last-child ${componentCls},
& > ${antCls}-cascader-picker-focused:last-child ${componentCls}`]: {
borderInlineEndWidth: token.lineWidth,
borderStartEndRadius: token.borderRadius,
borderEndEndRadius: token.borderRadius
},
// https://github.com/ant-design/ant-design/issues/12493
[`& > ${antCls}-select-auto-complete ${componentCls}`]: {
verticalAlign: "top"
},
[`${componentCls}-group-wrapper + ${componentCls}-group-wrapper`]: {
marginInlineStart: -token.lineWidth,
[`${componentCls}-affix-wrapper`]: {
borderRadius: 0
}
},
[`${componentCls}-group-wrapper:not(:last-child)`]: {
[`&${componentCls}-search > ${componentCls}-group`]: {
[`& > ${componentCls}-group-addon > ${componentCls}-search-button`]: {
borderRadius: 0
},
[`& > ${componentCls}`]: {
borderStartStartRadius: token.borderRadius,
borderStartEndRadius: 0,
borderEndEndRadius: 0,
borderEndStartRadius: token.borderRadius
}
}
}
}),
[`&&-sm ${antCls}-btn`]: {
fontSize: token.fontSizeSM,
height: token.controlHeightSM,
lineHeight: "normal"
},
[`&&-lg ${antCls}-btn`]: {
fontSize: token.fontSizeLG,
height: token.controlHeightLG,
lineHeight: "normal"
},
// Fix https://github.com/ant-design/ant-design/issues/5754
[`&&-lg ${antCls}-select-single ${antCls}-select-selector`]: {
height: `${token.controlHeightLG}px`,
[`${antCls}-select-selection-item, ${antCls}-select-selection-placeholder`]: {
// -2 is for the border size & override default
lineHeight: `${token.controlHeightLG - 2}px`
},
[`${antCls}-select-selection-search-input`]: {
height: `${token.controlHeightLG}px`
}
},
[`&&-sm ${antCls}-select-single ${antCls}-select-selector`]: {
height: `${token.controlHeightSM}px`,
[`${antCls}-select-selection-item, ${antCls}-select-selection-placeholder`]: {
// -2 is for the border size & override default
lineHeight: `${token.controlHeightSM - 2}px`
},
[`${antCls}-select-selection-search-input`]: {
height: `${token.controlHeightSM}px`
}
}
};
};
var genInputStyle = (token) => {
const {
componentCls,
controlHeightSM,
lineWidth
} = token;
const FIXED_CHROME_COLOR_HEIGHT = 16;
const colorSmallPadding = (controlHeightSM - lineWidth * 2 - FIXED_CHROME_COLOR_HEIGHT) / 2;
return {
[componentCls]: _extends(_extends(_extends(_extends({}, resetComponent(token)), genBasicInputStyle(token)), genStatusStyle(token, componentCls)), {
'&[type="color"]': {
height: token.controlHeight,
[`&${componentCls}-lg`]: {
height: token.controlHeightLG
},
[`&${componentCls}-sm`]: {
height: controlHeightSM,
paddingTop: colorSmallPadding,
paddingBottom: colorSmallPadding
}
}
})
};
};
var genAllowClearStyle = (token) => {
const {
componentCls
} = token;
return {
// ========================= Input =========================
[`${componentCls}-clear-icon`]: {
margin: 0,
color: token.colorTextQuaternary,
fontSize: token.fontSizeIcon,
verticalAlign: -1,
// https://github.com/ant-design/ant-design/pull/18151
// https://codesandbox.io/s/wizardly-sun-u10br
cursor: "pointer",
transition: `color ${token.motionDurationSlow}`,
"&:hover": {
color: token.colorTextTertiary
},
"&:active": {
color: token.colorText
},
"&-hidden": {
visibility: "hidden"
},
"&-has-suffix": {
margin: `0 ${token.inputAffixPadding}px`
}
},
// ======================= TextArea ========================
"&-textarea-with-clear-btn": {
padding: "0 !important",
border: "0 !important",
[`${componentCls}-clear-icon`]: {
position: "absolute",
insetBlockStart: token.paddingXS,
insetInlineEnd: token.paddingXS,
zIndex: 1
}
}
};
};
var genAffixStyle = (token) => {
const {
componentCls,
inputAffixPadding,
colorTextDescription,
motionDurationSlow,
colorIcon,
colorIconHover,
iconCls
} = token;
return {
[`${componentCls}-affix-wrapper`]: _extends(_extends(_extends(_extends(_extends({}, genBasicInputStyle(token)), {
display: "inline-flex",
[`&:not(${componentCls}-affix-wrapper-disabled):hover`]: _extends(_extends({}, genHoverStyle(token)), {
zIndex: 1,
[`${componentCls}-search-with-button &`]: {
zIndex: 0
}
}),
"&-focused, &:focus": {
zIndex: 1
},
"&-disabled": {
[`${componentCls}[disabled]`]: {
background: "transparent"
}
},
[`> input${componentCls}`]: {
padding: 0,
fontSize: "inherit",
border: "none",
borderRadius: 0,
outline: "none",
"&:focus": {
boxShadow: "none !important"
}
},
"&::before": {
width: 0,
visibility: "hidden",
content: '"\\a0"'
},
[`${componentCls}`]: {
"&-prefix, &-suffix": {
display: "flex",
flex: "none",
alignItems: "center",
"> *:not(:last-child)": {
marginInlineEnd: token.paddingXS
}
},
"&-show-count-suffix": {
color: colorTextDescription
},
"&-show-count-has-suffix": {
marginInlineEnd: token.paddingXXS
},
"&-prefix": {
marginInlineEnd: inputAffixPadding
},
"&-suffix": {
marginInlineStart: inputAffixPadding
}
}
}), genAllowClearStyle(token)), {
// password
[`${iconCls}${componentCls}-password-icon`]: {
color: colorIcon,
cursor: "pointer",
transition: `all ${motionDurationSlow}`,
"&:hover": {
color: colorIconHover
}
}
}), genStatusStyle(token, `${componentCls}-affix-wrapper`))
};
};
var genGroupStyle = (token) => {
const {
componentCls,
colorError,
colorSuccess,
borderRadiusLG,
borderRadiusSM
} = token;
return {
[`${componentCls}-group`]: _extends(_extends(_extends({}, resetComponent(token)), genInputGroupStyle(token)), {
"&-rtl": {
direction: "rtl"
},
"&-wrapper": {
display: "inline-block",
width: "100%",
textAlign: "start",
verticalAlign: "top",
"&-rtl": {
direction: "rtl"
},
// Size
"&-lg": {
[`${componentCls}-group-addon`]: {
borderRadius: borderRadiusLG
}
},
"&-sm": {
[`${componentCls}-group-addon`]: {
borderRadius: borderRadiusSM
}
},
// Status
"&-status-error": {
[`${componentCls}-group-addon`]: {
color: colorError,
borderColor: colorError
}
},
"&-status-warning": {
[`${componentCls}-group-addon:last-child`]: {
color: colorSuccess,
borderColor: colorSuccess
}
}
}
})
};
};
var genSearchInputStyle = (token) => {
const {
componentCls,
antCls
} = token;
const searchPrefixCls = `${componentCls}-search`;
return {
[searchPrefixCls]: {
[`${componentCls}`]: {
"&:hover, &:focus": {
borderColor: token.colorPrimaryHover,
[`+ ${componentCls}-group-addon ${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
borderInlineStartColor: token.colorPrimaryHover
}
}
},
[`${componentCls}-affix-wrapper`]: {
borderRadius: 0
},
// fix slight height diff in Firefox:
// https://ant.design/components/auto-complete-cn/#components-auto-complete-demo-certain-category
[`${componentCls}-lg`]: {
lineHeight: token.lineHeightLG - 2e-4
},
[`> ${componentCls}-group`]: {
[`> ${componentCls}-group-addon:last-child`]: {
insetInlineStart: -1,
padding: 0,
border: 0,
[`${searchPrefixCls}-button`]: {
paddingTop: 0,
paddingBottom: 0,
borderStartStartRadius: 0,
borderStartEndRadius: token.borderRadius,
borderEndEndRadius: token.borderRadius,
borderEndStartRadius: 0
},
[`${searchPrefixCls}-button:not(${antCls}-btn-primary)`]: {
color: token.colorTextDescription,
"&:hover": {
color: token.colorPrimaryHover
},
"&:active": {
color: token.colorPrimaryActive
},
[`&${antCls}-btn-loading::before`]: {
insetInlineStart: 0,
insetInlineEnd: 0,
insetBlockStart: 0,
insetBlockEnd: 0
}
}
}
},
[`${searchPrefixCls}-button`]: {
height: token.controlHeight,
"&:hover, &:focus": {
zIndex: 1
}
},
[`&-large ${searchPrefixCls}-button`]: {
height: token.controlHeightLG
},
[`&-small ${searchPrefixCls}-button`]: {
height: token.controlHeightSM
},
"&-rtl": {
direction: "rtl"
},
// ===================== Compact Item Customized Styles =====================
[`&${componentCls}-compact-item`]: {
[`&:not(${componentCls}-compact-last-item)`]: {
[`${componentCls}-group-addon`]: {
[`${componentCls}-search-button`]: {
marginInlineEnd: -token.lineWidth,
borderRadius: 0
}
}
},
[`&:not(${componentCls}-compact-first-item)`]: {
[`${componentCls},${componentCls}-affix-wrapper`]: {
borderRadius: 0
}
},
[`> ${componentCls}-group-addon ${componentCls}-search-button,
> ${componentCls},
${componentCls}-affix-wrapper`]: {
"&:hover,&:focus,&:active": {
zIndex: 2
}
},
[`> ${componentCls}-affix-wrapper-focused`]: {
zIndex: 2
}
}
}
};
};
function initInputToken(token) {
return merge(token, {
inputAffixPadding: token.paddingXXS,
inputPaddingVertical: Math.max(Math.round((token.controlHeight - token.fontSize * token.lineHeight) / 2 * 10) / 10 - token.lineWidth, 3),
inputPaddingVerticalLG: Math.ceil((token.controlHeightLG - token.fontSizeLG * token.lineHeightLG) / 2 * 10) / 10 - token.lineWidth,
inputPaddingVerticalSM: Math.max(Math.round((token.controlHeightSM - token.fontSize * token.lineHeight) / 2 * 10) / 10 - token.lineWidth, 0),
inputPaddingHorizontal: token.paddingSM - token.lineWidth,
inputPaddingHorizontalSM: token.paddingXS - token.lineWidth,
inputPaddingHorizontalLG: token.controlPaddingHorizontal - token.lineWidth,
inputBorderHoverColor: token.colorPrimaryHover,
inputBorderActiveColor: token.colorPrimaryHover
});
}
var genTextAreaStyle = (token) => {
const {
componentCls,
inputPaddingHorizontal,
paddingLG
} = token;
const textareaPrefixCls = `${componentCls}-textarea`;
return {
[textareaPrefixCls]: {
position: "relative",
[`${textareaPrefixCls}-suffix`]: {
position: "absolute",
top: 0,
insetInlineEnd: inputPaddingHorizontal,
bottom: 0,
zIndex: 1,
display: "inline-flex",
alignItems: "center",
margin: "auto"
},
[`&-status-error,
&-status-warning,
&-status-success,
&-status-validating`]: {
[`&${textareaPrefixCls}-has-feedback`]: {
[`${componentCls}`]: {
paddingInlineEnd: paddingLG
}
}
},
"&-show-count": {
// https://github.com/ant-design/ant-design/issues/33049
[`> ${componentCls}`]: {
height: "100%"
},
"&::after": {
color: token.colorTextDescription,
whiteSpace: "nowrap",
content: "attr(data-count)",
pointerEvents: "none",
float: "right"
}
},
"&-rtl": {
"&::after": {
float: "left"
}
}
}
};
};
var style_default = genComponentStyleHook("Input", (token) => {
const inputToken = initInputToken(token);
return [
genInputStyle(inputToken),
genTextAreaStyle(inputToken),
genAffixStyle(inputToken),
genGroupStyle(inputToken),
genSearchInputStyle(inputToken),
// =====================================================
// == Space Compact ==
// =====================================================
genCompactItemStyle(inputToken)
];
});
export {
genPlaceholderStyle,
genHoverStyle,
genActiveStyle,
genDisabledStyle,
genInputSmallStyle,
genStatusStyle,
genBasicInputStyle,
genInputGroupStyle,
initInputToken,
style_default
};
//# sourceMappingURL=chunk-YFF4L46P.js.map
@@ -1,775 +0,0 @@
import {
initMoveMotion,
initSlideMotion,
slideDownIn,
slideDownOut,
slideUpIn,
slideUpOut
} from "/node_modules/.vite/deps/chunk-6BFCWS52.js?v=e2549d3d";
import {
genCompactItemStyle
} from "/node_modules/.vite/deps/chunk-ZYZGYAET.js?v=e2549d3d";
import {
genComponentStyleHook,
merge,
resetComponent,
resetIcon,
textEllipsis
} from "/node_modules/.vite/deps/chunk-COFT5PGQ.js?v=e2549d3d";
import {
_extends
} from "/node_modules/.vite/deps/chunk-EQCCHGRT.js?v=e2549d3d";
// node_modules/ant-design-vue/es/select/style/dropdown.js
var genItemStyle = (token) => {
const {
controlPaddingHorizontal
} = token;
return {
position: "relative",
display: "block",
minHeight: token.controlHeight,
padding: `${(token.controlHeight - token.fontSize * token.lineHeight) / 2}px ${controlPaddingHorizontal}px`,
color: token.colorText,
fontWeight: "normal",
fontSize: token.fontSize,
lineHeight: token.lineHeight,
boxSizing: "border-box"
};
};
var genSingleStyle = (token) => {
const {
antCls,
componentCls
} = token;
const selectItemCls = `${componentCls}-item`;
return [
{
[`${componentCls}-dropdown`]: _extends(_extends({}, resetComponent(token)), {
position: "absolute",
top: -9999,
zIndex: token.zIndexPopup,
boxSizing: "border-box",
padding: token.paddingXXS,
overflow: "hidden",
fontSize: token.fontSize,
// Fix select render lag of long text in chrome
// https://github.com/ant-design/ant-design/issues/11456
// https://github.com/ant-design/ant-design/issues/11843
fontVariant: "initial",
backgroundColor: token.colorBgElevated,
borderRadius: token.borderRadiusLG,
outline: "none",
boxShadow: token.boxShadowSecondary,
[`
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-bottomLeft,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-bottomLeft
`]: {
animationName: slideUpIn
},
[`
&${antCls}-slide-up-enter${antCls}-slide-up-enter-active${componentCls}-dropdown-placement-topLeft,
&${antCls}-slide-up-appear${antCls}-slide-up-appear-active${componentCls}-dropdown-placement-topLeft
`]: {
animationName: slideDownIn
},
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-bottomLeft`]: {
animationName: slideUpOut
},
[`&${antCls}-slide-up-leave${antCls}-slide-up-leave-active${componentCls}-dropdown-placement-topLeft`]: {
animationName: slideDownOut
},
"&-hidden": {
display: "none"
},
"&-empty": {
color: token.colorTextDisabled
},
// ========================= Options =========================
[`${selectItemCls}-empty`]: _extends(_extends({}, genItemStyle(token)), {
color: token.colorTextDisabled
}),
[`${selectItemCls}`]: _extends(_extends({}, genItemStyle(token)), {
cursor: "pointer",
transition: `background ${token.motionDurationSlow} ease`,
borderRadius: token.borderRadiusSM,
// =========== Group ============
"&-group": {
color: token.colorTextDescription,
fontSize: token.fontSizeSM,
cursor: "default"
},
// =========== Option ===========
"&-option": {
display: "flex",
"&-content": _extends({
flex: "auto"
}, textEllipsis),
"&-state": {
flex: "none"
},
[`&-active:not(${selectItemCls}-option-disabled)`]: {
backgroundColor: token.controlItemBgHover
},
[`&-selected:not(${selectItemCls}-option-disabled)`]: {
color: token.colorText,
fontWeight: token.fontWeightStrong,
backgroundColor: token.controlItemBgActive,
[`${selectItemCls}-option-state`]: {
color: token.colorPrimary
}
},
"&-disabled": {
[`&${selectItemCls}-option-selected`]: {
backgroundColor: token.colorBgContainerDisabled
},
color: token.colorTextDisabled,
cursor: "not-allowed"
},
"&-grouped": {
paddingInlineStart: token.controlPaddingHorizontal * 2
}
}
}),
// =========================== RTL ===========================
"&-rtl": {
direction: "rtl"
}
})
},
// Follow code may reuse in other components
initSlideMotion(token, "slide-up"),
initSlideMotion(token, "slide-down"),
initMoveMotion(token, "move-up"),
initMoveMotion(token, "move-down")
];
};
var dropdown_default = genSingleStyle;
// node_modules/ant-design-vue/es/select/style/multiple.js
var FIXED_ITEM_MARGIN = 2;
function getSelectItemStyle(_ref) {
let {
controlHeightSM,
controlHeight,
lineWidth: borderWidth
} = _ref;
const selectItemDist = (controlHeight - controlHeightSM) / 2 - borderWidth;
const selectItemMargin = Math.ceil(selectItemDist / 2);
return [selectItemDist, selectItemMargin];
}
function genSizeStyle(token, suffix) {
const {
componentCls,
iconCls
} = token;
const selectOverflowPrefixCls = `${componentCls}-selection-overflow`;
const selectItemHeight = token.controlHeightSM;
const [selectItemDist] = getSelectItemStyle(token);
const suffixCls = suffix ? `${componentCls}-${suffix}` : "";
return {
[`${componentCls}-multiple${suffixCls}`]: {
fontSize: token.fontSize,
/**
* Do not merge `height` & `line-height` under style with `selection` & `search`, since chrome
* may update to redesign with its align logic.
*/
// =========================== Overflow ===========================
[selectOverflowPrefixCls]: {
position: "relative",
display: "flex",
flex: "auto",
flexWrap: "wrap",
maxWidth: "100%",
"&-item": {
flex: "none",
alignSelf: "center",
maxWidth: "100%",
display: "inline-flex"
}
},
// ========================= Selector =========================
[`${componentCls}-selector`]: {
display: "flex",
flexWrap: "wrap",
alignItems: "center",
// Multiple is little different that horizontal is follow the vertical
padding: `${selectItemDist - FIXED_ITEM_MARGIN}px ${FIXED_ITEM_MARGIN * 2}px`,
borderRadius: token.borderRadius,
[`${componentCls}-show-search&`]: {
cursor: "text"
},
[`${componentCls}-disabled&`]: {
background: token.colorBgContainerDisabled,
cursor: "not-allowed"
},
"&:after": {
display: "inline-block",
width: 0,
margin: `${FIXED_ITEM_MARGIN}px 0`,
lineHeight: `${selectItemHeight}px`,
content: '"\\a0"'
}
},
[`
&${componentCls}-show-arrow ${componentCls}-selector,
&${componentCls}-allow-clear ${componentCls}-selector
`]: {
paddingInlineEnd: token.fontSizeIcon + token.controlPaddingHorizontal
},
// ======================== Selections ========================
[`${componentCls}-selection-item`]: {
position: "relative",
display: "flex",
flex: "none",
boxSizing: "border-box",
maxWidth: "100%",
height: selectItemHeight,
marginTop: FIXED_ITEM_MARGIN,
marginBottom: FIXED_ITEM_MARGIN,
lineHeight: `${selectItemHeight - token.lineWidth * 2}px`,
background: token.colorFillSecondary,
border: `${token.lineWidth}px solid ${token.colorSplit}`,
borderRadius: token.borderRadiusSM,
cursor: "default",
transition: `font-size ${token.motionDurationSlow}, line-height ${token.motionDurationSlow}, height ${token.motionDurationSlow}`,
userSelect: "none",
marginInlineEnd: FIXED_ITEM_MARGIN * 2,
paddingInlineStart: token.paddingXS,
paddingInlineEnd: token.paddingXS / 2,
[`${componentCls}-disabled&`]: {
color: token.colorTextDisabled,
borderColor: token.colorBorder,
cursor: "not-allowed"
},
// It's ok not to do this, but 24px makes bottom narrow in view should adjust
"&-content": {
display: "inline-block",
marginInlineEnd: token.paddingXS / 2,
overflow: "hidden",
whiteSpace: "pre",
textOverflow: "ellipsis"
},
"&-remove": _extends(_extends({}, resetIcon()), {
display: "inline-block",
color: token.colorIcon,
fontWeight: "bold",
fontSize: 10,
lineHeight: "inherit",
cursor: "pointer",
[`> ${iconCls}`]: {
verticalAlign: "-0.2em"
},
"&:hover": {
color: token.colorIconHover
}
})
},
// ========================== Input ==========================
[`${selectOverflowPrefixCls}-item + ${selectOverflowPrefixCls}-item`]: {
[`${componentCls}-selection-search`]: {
marginInlineStart: 0
}
},
[`${componentCls}-selection-search`]: {
display: "inline-flex",
position: "relative",
maxWidth: "100%",
marginInlineStart: token.inputPaddingHorizontalBase - selectItemDist,
[`
&-input,
&-mirror
`]: {
height: selectItemHeight,
fontFamily: token.fontFamily,
lineHeight: `${selectItemHeight}px`,
transition: `all ${token.motionDurationSlow}`
},
"&-input": {
width: "100%",
minWidth: 4.1
// fix search cursor missing
},
"&-mirror": {
position: "absolute",
top: 0,
insetInlineStart: 0,
insetInlineEnd: "auto",
zIndex: 999,
whiteSpace: "pre",
visibility: "hidden"
}
},
// ======================= Placeholder =======================
[`${componentCls}-selection-placeholder `]: {
position: "absolute",
top: "50%",
insetInlineStart: token.inputPaddingHorizontalBase,
insetInlineEnd: token.inputPaddingHorizontalBase,
transform: "translateY(-50%)",
transition: `all ${token.motionDurationSlow}`
}
}
};
}
function genMultipleStyle(token) {
const {
componentCls
} = token;
const smallToken = merge(token, {
controlHeight: token.controlHeightSM,
controlHeightSM: token.controlHeightXS,
borderRadius: token.borderRadiusSM,
borderRadiusSM: token.borderRadiusXS
});
const [, smSelectItemMargin] = getSelectItemStyle(token);
return [
genSizeStyle(token),
// ======================== Small ========================
// Shared
genSizeStyle(smallToken, "sm"),
// Padding
{
[`${componentCls}-multiple${componentCls}-sm`]: {
[`${componentCls}-selection-placeholder`]: {
insetInlineStart: token.controlPaddingHorizontalSM - token.lineWidth,
insetInlineEnd: "auto"
},
// https://github.com/ant-design/ant-design/issues/29559
[`${componentCls}-selection-search`]: {
marginInlineStart: smSelectItemMargin
}
}
},
// ======================== Large ========================
// Shared
genSizeStyle(merge(token, {
fontSize: token.fontSizeLG,
controlHeight: token.controlHeightLG,
controlHeightSM: token.controlHeight,
borderRadius: token.borderRadiusLG,
borderRadiusSM: token.borderRadius
}), "lg")
];
}
// node_modules/ant-design-vue/es/select/style/single.js
function genSizeStyle2(token, suffix) {
const {
componentCls,
inputPaddingHorizontalBase,
borderRadius
} = token;
const selectHeightWithoutBorder = token.controlHeight - token.lineWidth * 2;
const selectionItemPadding = Math.ceil(token.fontSize * 1.25);
const suffixCls = suffix ? `${componentCls}-${suffix}` : "";
return {
[`${componentCls}-single${suffixCls}`]: {
fontSize: token.fontSize,
// ========================= Selector =========================
[`${componentCls}-selector`]: _extends(_extends({}, resetComponent(token)), {
display: "flex",
borderRadius,
[`${componentCls}-selection-search`]: {
position: "absolute",
top: 0,
insetInlineStart: inputPaddingHorizontalBase,
insetInlineEnd: inputPaddingHorizontalBase,
bottom: 0,
"&-input": {
width: "100%"
}
},
[`
${componentCls}-selection-item,
${componentCls}-selection-placeholder
`]: {
padding: 0,
lineHeight: `${selectHeightWithoutBorder}px`,
transition: `all ${token.motionDurationSlow}`,
// Firefox inline-block position calculation is not same as Chrome & Safari. Patch this:
"@supports (-moz-appearance: meterbar)": {
lineHeight: `${selectHeightWithoutBorder}px`
}
},
[`${componentCls}-selection-item`]: {
position: "relative",
userSelect: "none"
},
[`${componentCls}-selection-placeholder`]: {
transition: "none",
pointerEvents: "none"
},
// For common baseline align
[[
"&:after",
/* For '' value baseline align */
`${componentCls}-selection-item:after`,
/* For undefined value baseline align */
`${componentCls}-selection-placeholder:after`
].join(",")]: {
display: "inline-block",
width: 0,
visibility: "hidden",
content: '"\\a0"'
}
}),
[`
&${componentCls}-show-arrow ${componentCls}-selection-item,
&${componentCls}-show-arrow ${componentCls}-selection-placeholder
`]: {
paddingInlineEnd: selectionItemPadding
},
// Opacity selection if open
[`&${componentCls}-open ${componentCls}-selection-item`]: {
color: token.colorTextPlaceholder
},
// ========================== Input ==========================
// We only change the style of non-customize input which is only support by `combobox` mode.
// Not customize
[`&:not(${componentCls}-customize-input)`]: {
[`${componentCls}-selector`]: {
width: "100%",
height: token.controlHeight,
padding: `0 ${inputPaddingHorizontalBase}px`,
[`${componentCls}-selection-search-input`]: {
height: selectHeightWithoutBorder
},
"&:after": {
lineHeight: `${selectHeightWithoutBorder}px`
}
}
},
[`&${componentCls}-customize-input`]: {
[`${componentCls}-selector`]: {
"&:after": {
display: "none"
},
[`${componentCls}-selection-search`]: {
position: "static",
width: "100%"
},
[`${componentCls}-selection-placeholder`]: {
position: "absolute",
insetInlineStart: 0,
insetInlineEnd: 0,
padding: `0 ${inputPaddingHorizontalBase}px`,
"&:after": {
display: "none"
}
}
}
}
}
};
}
function genSingleStyle2(token) {
const {
componentCls
} = token;
const inputPaddingHorizontalSM = token.controlPaddingHorizontalSM - token.lineWidth;
return [
genSizeStyle2(token),
// ======================== Small ========================
// Shared
genSizeStyle2(merge(token, {
controlHeight: token.controlHeightSM,
borderRadius: token.borderRadiusSM
}), "sm"),
// padding
{
[`${componentCls}-single${componentCls}-sm`]: {
[`&:not(${componentCls}-customize-input)`]: {
[`${componentCls}-selection-search`]: {
insetInlineStart: inputPaddingHorizontalSM,
insetInlineEnd: inputPaddingHorizontalSM
},
[`${componentCls}-selector`]: {
padding: `0 ${inputPaddingHorizontalSM}px`
},
// With arrow should provides `padding-right` to show the arrow
[`&${componentCls}-show-arrow ${componentCls}-selection-search`]: {
insetInlineEnd: inputPaddingHorizontalSM + token.fontSize * 1.5
},
[`
&${componentCls}-show-arrow ${componentCls}-selection-item,
&${componentCls}-show-arrow ${componentCls}-selection-placeholder
`]: {
paddingInlineEnd: token.fontSize * 1.5
}
}
}
},
// ======================== Large ========================
// Shared
genSizeStyle2(merge(token, {
controlHeight: token.controlHeightLG,
fontSize: token.fontSizeLG,
borderRadius: token.borderRadiusLG
}), "lg")
];
}
// node_modules/ant-design-vue/es/select/style/index.js
var genSelectorStyle = (token) => {
const {
componentCls
} = token;
return {
position: "relative",
backgroundColor: token.colorBgContainer,
border: `${token.lineWidth}px ${token.lineType} ${token.colorBorder}`,
transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
input: {
cursor: "pointer"
},
[`${componentCls}-show-search&`]: {
cursor: "text",
input: {
cursor: "auto",
color: "inherit"
}
},
[`${componentCls}-disabled&`]: {
color: token.colorTextDisabled,
background: token.colorBgContainerDisabled,
cursor: "not-allowed",
[`${componentCls}-multiple&`]: {
background: token.colorBgContainerDisabled
},
input: {
cursor: "not-allowed"
}
}
};
};
var genStatusStyle = function(rootSelectCls, token) {
let overwriteDefaultBorder = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
const {
componentCls,
borderHoverColor,
outlineColor,
antCls
} = token;
const overwriteStyle = overwriteDefaultBorder ? {
[`${componentCls}-selector`]: {
borderColor: borderHoverColor
}
} : {};
return {
[rootSelectCls]: {
[`&:not(${componentCls}-disabled):not(${componentCls}-customize-input):not(${antCls}-pagination-size-changer)`]: _extends(_extends({}, overwriteStyle), {
[`${componentCls}-focused& ${componentCls}-selector`]: {
borderColor: borderHoverColor,
boxShadow: `0 0 0 ${token.controlOutlineWidth}px ${outlineColor}`,
borderInlineEndWidth: `${token.controlLineWidth}px !important`,
outline: 0
},
[`&:hover ${componentCls}-selector`]: {
borderColor: borderHoverColor,
borderInlineEndWidth: `${token.controlLineWidth}px !important`
}
})
}
};
};
var getSearchInputWithoutBorderStyle = (token) => {
const {
componentCls
} = token;
return {
[`${componentCls}-selection-search-input`]: {
margin: 0,
padding: 0,
background: "transparent",
border: "none",
outline: "none",
appearance: "none",
"&::-webkit-search-cancel-button": {
display: "none",
"-webkit-appearance": "none"
}
}
};
};
var genBaseStyle = (token) => {
const {
componentCls,
inputPaddingHorizontalBase,
iconCls
} = token;
return {
[componentCls]: _extends(_extends({}, resetComponent(token)), {
position: "relative",
display: "inline-block",
cursor: "pointer",
[`&:not(${componentCls}-customize-input) ${componentCls}-selector`]: _extends(_extends({}, genSelectorStyle(token)), getSearchInputWithoutBorderStyle(token)),
// [`&:not(&-disabled):hover ${selectCls}-selector`]: {
// ...genHoverStyle(token),
// },
// ======================== Selection ========================
[`${componentCls}-selection-item`]: _extends({
flex: 1,
fontWeight: "normal"
}, textEllipsis),
// ======================= Placeholder =======================
[`${componentCls}-selection-placeholder`]: _extends(_extends({}, textEllipsis), {
flex: 1,
color: token.colorTextPlaceholder,
pointerEvents: "none"
}),
// ========================== Arrow ==========================
[`${componentCls}-arrow`]: _extends(_extends({}, resetIcon()), {
position: "absolute",
top: "50%",
insetInlineStart: "auto",
insetInlineEnd: inputPaddingHorizontalBase,
height: token.fontSizeIcon,
marginTop: -token.fontSizeIcon / 2,
color: token.colorTextQuaternary,
fontSize: token.fontSizeIcon,
lineHeight: 1,
textAlign: "center",
pointerEvents: "none",
display: "flex",
alignItems: "center",
[iconCls]: {
verticalAlign: "top",
transition: `transform ${token.motionDurationSlow}`,
"> svg": {
verticalAlign: "top"
},
[`&:not(${componentCls}-suffix)`]: {
pointerEvents: "auto"
}
},
[`${componentCls}-disabled &`]: {
cursor: "not-allowed"
},
"> *:not(:last-child)": {
marginInlineEnd: 8
// FIXME: magic
}
}),
// ========================== Clear ==========================
[`${componentCls}-clear`]: {
position: "absolute",
top: "50%",
insetInlineStart: "auto",
insetInlineEnd: inputPaddingHorizontalBase,
zIndex: 1,
display: "inline-block",
width: token.fontSizeIcon,
height: token.fontSizeIcon,
marginTop: -token.fontSizeIcon / 2,
color: token.colorTextQuaternary,
fontSize: token.fontSizeIcon,
fontStyle: "normal",
lineHeight: 1,
textAlign: "center",
textTransform: "none",
background: token.colorBgContainer,
cursor: "pointer",
opacity: 0,
transition: `color ${token.motionDurationMid} ease, opacity ${token.motionDurationSlow} ease`,
textRendering: "auto",
"&:before": {
display: "block"
},
"&:hover": {
color: token.colorTextTertiary
}
},
"&:hover": {
[`${componentCls}-clear`]: {
opacity: 1
}
}
}),
// ========================= Feedback ==========================
[`${componentCls}-has-feedback`]: {
[`${componentCls}-clear`]: {
insetInlineEnd: inputPaddingHorizontalBase + token.fontSize + token.paddingXXS
}
}
};
};
var genSelectStyle = (token) => {
const {
componentCls
} = token;
return [
{
[componentCls]: {
// ==================== BorderLess ====================
[`&-borderless ${componentCls}-selector`]: {
backgroundColor: `transparent !important`,
borderColor: `transparent !important`,
boxShadow: `none !important`
},
// ==================== In Form ====================
[`&${componentCls}-in-form-item`]: {
width: "100%"
}
}
},
// =====================================================
// == LTR ==
// =====================================================
// Base
genBaseStyle(token),
// Single
genSingleStyle2(token),
// Multiple
genMultipleStyle(token),
// Dropdown
dropdown_default(token),
// =====================================================
// == RTL ==
// =====================================================
{
[`${componentCls}-rtl`]: {
direction: "rtl"
}
},
// =====================================================
// == Status ==
// =====================================================
genStatusStyle(componentCls, merge(token, {
borderHoverColor: token.colorPrimaryHover,
outlineColor: token.controlOutline
})),
genStatusStyle(`${componentCls}-status-error`, merge(token, {
borderHoverColor: token.colorErrorHover,
outlineColor: token.colorErrorOutline
}), true),
genStatusStyle(`${componentCls}-status-warning`, merge(token, {
borderHoverColor: token.colorWarningHover,
outlineColor: token.colorWarningOutline
}), true),
// =====================================================
// == Space Compact ==
// =====================================================
genCompactItemStyle(token, {
borderElCls: `${componentCls}-selector`,
focusElCls: `${componentCls}-focused`
})
];
};
var style_default = genComponentStyleHook("Select", (token, _ref) => {
let {
rootPrefixCls
} = _ref;
const selectToken = merge(token, {
rootPrefixCls,
inputPaddingHorizontalBase: token.paddingSM - 1
});
return [genSelectStyle(selectToken)];
}, (token) => ({
zIndexPopup: token.zIndexPopupBase + 50
}));
export {
style_default
};
//# sourceMappingURL=chunk-RPBENUO7.js.map
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -1 +0,0 @@
$F~

Some files were not shown because too many files have changed in this diff Show More