@linkdesk/ui 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,83 +1,87 @@
1
1
  import "./index.css";
2
- import { jsx as d, jsxs as F, Fragment as xe } from "react/jsx-runtime";
3
- import { useRef as H, useEffect as R, useState as P, useCallback as B, useLayoutEffect as re, useMemo as z, forwardRef as se, useImperativeHandle as Me, useContext as Ne, createContext as Ee, createElement as oe } from "react";
4
- import Ae, { createPortal as ce } from "react-dom";
5
- import { useTranslation as j } from "react-i18next";
6
- function Ce({ children: t, onClick: n, disabled: e, title: o, type: r = "button" }) {
7
- return /* @__PURE__ */ d("button", { type: r, className: "button", onClick: n, disabled: e, title: o, children: t });
2
+ import { jsx as u, jsxs as P, Fragment as Ve } from "react/jsx-runtime";
3
+ import { useRef as F, useEffect as z, useState as T, useCallback as W, useLayoutEffect as ce, useMemo as j, forwardRef as ie, useImperativeHandle as je, useContext as Oe, createContext as qe, createElement as re } from "react";
4
+ import Ue, { createPortal as ae } from "react-dom";
5
+ import { useTranslation as U } from "react-i18next";
6
+ function Gt({ children: e, title: t }) {
7
+ return /* @__PURE__ */ u("span", { className: "badge", title: t, children: e });
8
8
  }
9
- var q = {}, ae;
10
- function Ie() {
11
- if (ae) return q;
12
- ae = 1;
13
- var t = Ae;
9
+ function Ge({ children: e, onClick: t, disabled: n, title: o, type: r = "button", variant: i }) {
10
+ const s = i ? `button button--${i}` : "button";
11
+ return /* @__PURE__ */ u("button", { type: r, className: s, onClick: t, disabled: n, title: o, children: e });
12
+ }
13
+ var G = {}, ue;
14
+ function Ze() {
15
+ if (ue) return G;
16
+ ue = 1;
17
+ var e = Ue;
14
18
  if (process.env.NODE_ENV === "production")
15
- q.createRoot = t.createRoot, q.hydrateRoot = t.hydrateRoot;
19
+ G.createRoot = e.createRoot, G.hydrateRoot = e.hydrateRoot;
16
20
  else {
17
- var n = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
18
- q.createRoot = function(e, o) {
19
- n.usingClientEntryPoint = !0;
21
+ var t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
22
+ G.createRoot = function(n, o) {
23
+ t.usingClientEntryPoint = !0;
20
24
  try {
21
- return t.createRoot(e, o);
25
+ return e.createRoot(n, o);
22
26
  } finally {
23
- n.usingClientEntryPoint = !1;
27
+ t.usingClientEntryPoint = !1;
24
28
  }
25
- }, q.hydrateRoot = function(e, o, r) {
26
- n.usingClientEntryPoint = !0;
29
+ }, G.hydrateRoot = function(n, o, r) {
30
+ t.usingClientEntryPoint = !0;
27
31
  try {
28
- return t.hydrateRoot(e, o, r);
32
+ return e.hydrateRoot(n, o, r);
29
33
  } finally {
30
- n.usingClientEntryPoint = !1;
34
+ t.usingClientEntryPoint = !1;
31
35
  }
32
36
  };
33
37
  }
34
- return q;
38
+ return G;
35
39
  }
36
- Ie();
37
- const Le = "overlay-root", _e = "ld-scrim-plane";
38
- function we() {
39
- return document.getElementById(_e) ?? document.body;
40
+ Ze();
41
+ const Xe = "overlay-root", Ye = "ld-scrim-plane";
42
+ function ye() {
43
+ return document.getElementById(Ye) ?? document.body;
40
44
  }
41
- const le = 'a[href],button:not([disabled]),input:not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';
42
- function ie({ children: t, onClose: n, triggerRef: e, trapFocus: o, zIndex: r, rootId: c, open: s = !0 }) {
43
- const h = H(null);
44
- R(() => {
45
- if (!s || !n) return;
46
- const l = (i) => {
47
- var a, x;
48
- const k = i.target, v = (a = h.current) == null ? void 0 : a.contains(k), m = ((x = e == null ? void 0 : e.current) == null ? void 0 : x.contains(k)) ?? !1;
49
- !v && !m && n();
45
+ const de = 'a[href],button:not([disabled]),input:not([disabled]),textarea:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';
46
+ function le({ children: e, onClose: t, triggerRef: n, trapFocus: o, zIndex: r, rootId: i, open: s = !0 }) {
47
+ const a = F(null);
48
+ z(() => {
49
+ if (!s || !t) return;
50
+ const d = (h) => {
51
+ var c, y;
52
+ const x = h.target, p = (c = a.current) == null ? void 0 : c.contains(x), f = ((y = n == null ? void 0 : n.current) == null ? void 0 : y.contains(x)) ?? !1;
53
+ !p && !f && t();
50
54
  };
51
- return window.addEventListener("mousedown", l, !0), () => window.removeEventListener("mousedown", l, !0);
52
- }, [s, n, e]), R(() => {
53
- if (!s || !n) return;
54
- const l = (i) => {
55
- i.key === "Escape" && n();
55
+ return window.addEventListener("mousedown", d, !0), () => window.removeEventListener("mousedown", d, !0);
56
+ }, [s, t, n]), z(() => {
57
+ if (!s || !t) return;
58
+ const d = (h) => {
59
+ h.key === "Escape" && t();
56
60
  };
57
- return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
58
- }, [s, n]), R(() => {
61
+ return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
62
+ }, [s, t]), z(() => {
59
63
  if (!s || !o) return;
60
- const l = h.current;
61
- if (!l) return;
62
- const i = l.querySelector(le);
63
- i ? i.focus() : (l.tabIndex = -1, l.focus());
64
- const k = (v) => {
65
- if (v.key !== "Tab") return;
66
- const m = Array.from(l.querySelectorAll(le));
67
- if (m.length === 0) {
68
- v.preventDefault();
64
+ const d = a.current;
65
+ if (!d) return;
66
+ const h = d.querySelector(de);
67
+ h ? h.focus() : (d.tabIndex = -1, d.focus());
68
+ const x = (p) => {
69
+ if (p.key !== "Tab") return;
70
+ const f = Array.from(d.querySelectorAll(de));
71
+ if (f.length === 0) {
72
+ p.preventDefault();
69
73
  return;
70
74
  }
71
- const a = m[0], x = m[m.length - 1];
72
- v.shiftKey && document.activeElement === a ? (v.preventDefault(), x.focus()) : !v.shiftKey && document.activeElement === x && (v.preventDefault(), a.focus());
75
+ const c = f[0], y = f[f.length - 1];
76
+ p.shiftKey && document.activeElement === c ? (p.preventDefault(), y.focus()) : !p.shiftKey && document.activeElement === y && (p.preventDefault(), c.focus());
73
77
  };
74
- return window.addEventListener("keydown", k), () => window.removeEventListener("keydown", k);
78
+ return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
75
79
  }, [s, o]);
76
- const u = {
80
+ const l = {
77
81
  position: "relative",
78
82
  ...r ? { zIndex: r } : {}
79
83
  };
80
- return ce(
84
+ return ae(
81
85
  // E5.8#109:data-overlay-wrapper 结构标记——浮层权威的「隔离地板」(index.css)用它排除本包装盒。
82
86
  // 包装盒是结构容器(ref/zIndex 载体)不是表面:若地板规则的深度 2 选择器给它的 backdrop-filter,
83
87
  // 它就成了 backdrop root,把内部真实表面的 backdrop 采样掐断(E5.8#103 地板因此从未对
@@ -86,214 +90,214 @@ function ie({ children: t, onClose: n, triggerRef: e, trapFocus: o, zIndex: r, r
86
90
  // 对外只算包装盒 z-auto(0),被 scrim 遮罩 z500 盖住 → 点在预期位置实中遮罩 onClose =「点一下自己退」。
87
91
  // 故包装盒必须保持零 stacking-context 属性(backdrop-filter/filter/transform/z-index 均禁;
88
92
  // zIndex 例外见 prop 契约——需 z-index 时必须 > scrim 遮罩 500)。
89
- /* @__PURE__ */ d("div", { ref: h, "data-overlay-wrapper": !0, style: Object.keys(u).length > 1 ? u : {}, children: t }),
93
+ /* @__PURE__ */ u("div", { ref: a, "data-overlay-wrapper": !0, style: Object.keys(l).length > 1 ? l : {}, children: e }),
90
94
  // E5.8#107 单一门:默认 → #overlay-root(浮层权威 surface 根);显式 rootId 优先;根缺失回退 body
91
- (c ? document.getElementById(c) : document.getElementById(Le)) ?? document.body
95
+ (i ? document.getElementById(i) : document.getElementById(Xe)) ?? document.body
92
96
  );
93
97
  }
94
- const ue = 232, de = 224, fe = 263, $e = 8;
95
- function J(t, n, e, o, r = $e) {
96
- const c = Math.max(r, o.width - n - r), s = Math.max(r, o.height - e - r), h = Math.min(Math.max(
97
- t.x + n + r <= o.width ? t.x : t.x - n - r,
98
+ const he = 232, fe = 224, me = 263, Je = 8;
99
+ function Q(e, t, n, o, r = Je) {
100
+ const i = Math.max(r, o.width - t - r), s = Math.max(r, o.height - n - r), a = Math.min(Math.max(
101
+ e.x + t + r <= o.width ? e.x : e.x - t - r,
98
102
  r
99
- ), c), u = Math.min(Math.max(
100
- t.y + e + r <= o.height ? t.y : t.y - e - r,
103
+ ), i), l = Math.min(Math.max(
104
+ e.y + n + r <= o.height ? e.y : e.y - n - r,
101
105
  r
102
106
  ), s);
103
- return { left: h, top: u };
107
+ return { left: a, top: l };
104
108
  }
105
- function De(t) {
106
- const n = t.replace("#", "");
109
+ function Qe(e) {
110
+ const t = e.replace("#", "");
107
111
  return [
108
- parseInt(n.substring(0, 2), 16),
109
- parseInt(n.substring(2, 4), 16),
110
- parseInt(n.substring(4, 6), 16)
112
+ parseInt(t.substring(0, 2), 16),
113
+ parseInt(t.substring(2, 4), 16),
114
+ parseInt(t.substring(4, 6), 16)
111
115
  ];
112
116
  }
113
- function Se(t, n, e) {
114
- return "#" + [t, n, e].map((o) => Math.max(0, Math.min(255, Math.round(o))).toString(16).padStart(2, "0")).join("");
117
+ function et(e, t, n) {
118
+ return "#" + [e, t, n].map((o) => Math.max(0, Math.min(255, Math.round(o))).toString(16).padStart(2, "0")).join("");
115
119
  }
116
- function Re(t, n, e) {
117
- const o = e * n, r = o * (1 - Math.abs(t / 60 % 2 - 1)), c = e - o;
118
- let s = 0, h = 0, u = 0;
119
- return t < 60 ? (s = o, h = r) : t < 120 ? (s = r, h = o) : t < 180 ? (h = o, u = r) : t < 240 ? (h = r, u = o) : t < 300 ? (s = r, u = o) : (s = o, u = r), [Math.round((s + c) * 255), Math.round((h + c) * 255), Math.round((u + c) * 255)];
120
+ function tt(e, t, n) {
121
+ const o = n * t, r = o * (1 - Math.abs(e / 60 % 2 - 1)), i = n - o;
122
+ let s = 0, a = 0, l = 0;
123
+ return e < 60 ? (s = o, a = r) : e < 120 ? (s = r, a = o) : e < 180 ? (a = o, l = r) : e < 240 ? (a = r, l = o) : e < 300 ? (s = r, l = o) : (s = o, l = r), [Math.round((s + i) * 255), Math.round((a + i) * 255), Math.round((l + i) * 255)];
120
124
  }
121
- function Te(t, n, e) {
122
- const o = Math.max(t, n, e) / 255, r = Math.min(t, n, e) / 255, c = o - r;
125
+ function nt(e, t, n) {
126
+ const o = Math.max(e, t, n) / 255, r = Math.min(e, t, n) / 255, i = o - r;
123
127
  let s = 0;
124
- c > 0 && (o === t / 255 ? s = 60 * ((n / 255 - e / 255) / c % 6) : o === n / 255 ? s = 60 * ((e / 255 - t / 255) / c + 2) : s = 60 * ((t / 255 - n / 255) / c + 4)), s < 0 && (s += 360);
125
- const h = o === 0 ? 0 : c / o;
126
- return { h: s, s: h, v: o };
128
+ i > 0 && (o === e / 255 ? s = 60 * ((t / 255 - n / 255) / i % 6) : o === t / 255 ? s = 60 * ((n / 255 - e / 255) / i + 2) : s = 60 * ((e / 255 - t / 255) / i + 4)), s < 0 && (s += 360);
129
+ const a = o === 0 ? 0 : i / o;
130
+ return { h: s, s: a, v: o };
127
131
  }
128
- function X(t) {
129
- const [n, e, o] = De(t);
130
- return Te(n, e, o);
132
+ function Y(e) {
133
+ const [t, n, o] = Qe(e);
134
+ return nt(t, n, o);
131
135
  }
132
- function Q(t, n, e) {
133
- const [o, r, c] = Re(t, n, e);
134
- return Se(o, r, c);
136
+ function ee(e, t, n) {
137
+ const [o, r, i] = tt(e, t, n);
138
+ return et(o, r, i);
135
139
  }
136
- function Pe(t) {
137
- let n = t.replace(/[^0-9a-fA-F]/g, "").slice(0, 6);
138
- return n.length > 0 && (n = "#" + n), n;
140
+ function ot(e) {
141
+ let t = e.replace(/[^0-9a-fA-F]/g, "").slice(0, 6);
142
+ return t.length > 0 && (t = "#" + t), t;
139
143
  }
140
- function At({ open: t, value: n, onChange: e, onClose: o, presets: r, anchor: c }) {
141
- const [s, h] = P(() => X(n)), [u, l] = P(n), i = H(null), k = H(null), v = H(null), m = H(null), a = H(s), [x, D] = P(null);
142
- R(() => {
143
- if (t) {
144
- const p = X(n);
145
- a.current = p, h(p), l(n);
144
+ function Zt({ open: e, value: t, onChange: n, onClose: o, presets: r, anchor: i }) {
145
+ const [s, a] = T(() => Y(t)), [l, d] = T(t), h = F(null), x = F(null), p = F(null), f = F(null), c = F(s), [y, _] = T(null);
146
+ z(() => {
147
+ if (e) {
148
+ const k = Y(t);
149
+ c.current = k, a(k), d(t);
146
150
  }
147
- }, [n, t]);
148
- const $ = B((p) => {
149
- const C = Pe(p);
150
- if (l(C), /^#[0-9a-fA-F]{6}$/.test(C)) {
151
- const K = X(C);
152
- return a.current = K, h(K), C;
151
+ }, [t, e]);
152
+ const E = W((k) => {
153
+ const D = ot(k);
154
+ if (d(D), /^#[0-9a-fA-F]{6}$/.test(D)) {
155
+ const B = Y(D);
156
+ return c.current = B, a(B), D;
153
157
  }
154
158
  return null;
155
- }, []), A = B((p) => {
156
- var E;
157
- const C = (E = i.current) == null ? void 0 : E.getBoundingClientRect();
158
- if (!C) return;
159
- const K = Math.max(0, Math.min(1, (p.clientX - C.left) / C.width)), V = Math.max(0, Math.min(1, (p.clientY - C.top) / C.height)), w = { ...a.current, s: K, v: 1 - V };
160
- a.current = w, h(w), l(Q(w.h, w.s, w.v));
161
- }, []), _ = B((p) => {
162
- var w;
163
- const C = (w = k.current) == null ? void 0 : w.getBoundingClientRect();
164
- if (!C) return;
165
- const K = Math.max(0, Math.min(1, (p.clientX - C.left) / C.width)), y = { ...a.current, h: K * 360 };
166
- a.current = y, h(y), l(Q(y.h, y.s, y.v));
159
+ }, []), C = W((k) => {
160
+ var A;
161
+ const D = (A = h.current) == null ? void 0 : A.getBoundingClientRect();
162
+ if (!D) return;
163
+ const B = Math.max(0, Math.min(1, (k.clientX - D.left) / D.width)), V = Math.max(0, Math.min(1, (k.clientY - D.top) / D.height)), g = { ...c.current, s: B, v: 1 - V };
164
+ c.current = g, a(g), d(ee(g.h, g.s, g.v));
165
+ }, []), I = W((k) => {
166
+ var g;
167
+ const D = (g = x.current) == null ? void 0 : g.getBoundingClientRect();
168
+ if (!D) return;
169
+ const B = Math.max(0, Math.min(1, (k.clientX - D.left) / D.width)), v = { ...c.current, h: B * 360 };
170
+ c.current = v, a(v), d(ee(v.h, v.s, v.v));
167
171
  }, []);
168
- if (R(() => {
169
- if (!t) return;
170
- const p = () => {
171
- m.current = null;
172
- }, C = (K) => {
173
- m.current === "sv" ? A(K) : m.current === "hue" && _(K);
172
+ if (z(() => {
173
+ if (!e) return;
174
+ const k = () => {
175
+ f.current = null;
176
+ }, D = (B) => {
177
+ f.current === "sv" ? C(B) : f.current === "hue" && I(B);
174
178
  };
175
- return window.addEventListener("mouseup", p), window.addEventListener("mousemove", C), () => {
176
- window.removeEventListener("mouseup", p), window.removeEventListener("mousemove", C);
179
+ return window.addEventListener("mouseup", k), window.addEventListener("mousemove", D), () => {
180
+ window.removeEventListener("mouseup", k), window.removeEventListener("mousemove", D);
177
181
  };
178
- }, [t, A, _]), re(() => {
179
- if (!t || !c) {
180
- D(null);
182
+ }, [e, C, I]), ce(() => {
183
+ if (!e || !i) {
184
+ _(null);
181
185
  return;
182
186
  }
183
- const p = v.current, C = { width: window.innerWidth, height: window.innerHeight }, K = p ? J(c, p.offsetWidth, p.offsetHeight, C) : J(c, ue, r != null && r.length ? fe : de, C);
184
- D((V) => V && V.left === K.left && V.top === K.top ? V : K);
185
- }, [t, c, r]), !t) return null;
186
- const I = Q(s.h, 1, 1), S = `${Math.round(s.s * 100)}%`, M = `${Math.round((1 - s.v) * 100)}%`, g = `${Math.round(s.h / 360 * 100)}%`, b = c && !x ? J(
187
- c,
188
- ue,
189
- r != null && r.length ? fe : de,
187
+ const k = p.current, D = { width: window.innerWidth, height: window.innerHeight }, B = k ? Q(i, k.offsetWidth, k.offsetHeight, D) : Q(i, he, r != null && r.length ? me : fe, D);
188
+ _((V) => V && V.left === B.left && V.top === B.top ? V : B);
189
+ }, [e, i, r]), !e) return null;
190
+ const w = ee(s.h, 1, 1), $ = `${Math.round(s.s * 100)}%`, M = `${Math.round((1 - s.v) * 100)}%`, b = `${Math.round(s.h / 360 * 100)}%`, N = i && !y ? Q(
191
+ i,
192
+ he,
193
+ r != null && r.length ? me : fe,
190
194
  { width: window.innerWidth, height: window.innerHeight }
191
- ) : null, f = x ?? b;
192
- return /* @__PURE__ */ F(ie, { onClose: o, children: [
193
- ce(/* @__PURE__ */ d("div", { className: "colorpicker-overlay", onClick: () => o() }), we()),
194
- /* @__PURE__ */ F(
195
+ ) : null, m = y ?? N;
196
+ return /* @__PURE__ */ P(le, { onClose: o, children: [
197
+ ae(/* @__PURE__ */ u("div", { className: "colorpicker-overlay", onClick: () => o() }), ye()),
198
+ /* @__PURE__ */ P(
195
199
  "div",
196
200
  {
197
- ref: v,
201
+ ref: p,
198
202
  className: "colorpicker-panel",
199
- style: c && f ? { left: f.left, top: f.top } : void 0,
200
- onClick: (p) => p.stopPropagation(),
203
+ style: i && m ? { left: m.left, top: m.top } : void 0,
204
+ onClick: (k) => k.stopPropagation(),
201
205
  children: [
202
- /* @__PURE__ */ F(
206
+ /* @__PURE__ */ P(
203
207
  "div",
204
208
  {
205
- ref: i,
209
+ ref: h,
206
210
  className: "colorpicker-sv",
207
- style: { background: I },
208
- onMouseDown: (p) => {
209
- m.current = "sv", A(p);
211
+ style: { background: w },
212
+ onMouseDown: (k) => {
213
+ f.current = "sv", C(k);
210
214
  },
211
215
  children: [
212
- /* @__PURE__ */ d("div", { className: "colorpicker-sv-white" }),
213
- /* @__PURE__ */ d("div", { className: "colorpicker-sv-black" }),
214
- /* @__PURE__ */ d("div", { className: "colorpicker-sv-cursor", style: { left: S, top: M } })
216
+ /* @__PURE__ */ u("div", { className: "colorpicker-sv-white" }),
217
+ /* @__PURE__ */ u("div", { className: "colorpicker-sv-black" }),
218
+ /* @__PURE__ */ u("div", { className: "colorpicker-sv-cursor", style: { left: $, top: M } })
215
219
  ]
216
220
  }
217
221
  ),
218
- /* @__PURE__ */ d(
222
+ /* @__PURE__ */ u(
219
223
  "div",
220
224
  {
221
- ref: k,
225
+ ref: x,
222
226
  className: "colorpicker-hue",
223
- onMouseDown: (p) => {
224
- m.current = "hue", _(p);
227
+ onMouseDown: (k) => {
228
+ f.current = "hue", I(k);
225
229
  },
226
- children: /* @__PURE__ */ d("div", { className: "colorpicker-hue-cursor", style: { left: g } })
230
+ children: /* @__PURE__ */ u("div", { className: "colorpicker-hue-cursor", style: { left: b } })
227
231
  }
228
232
  ),
229
- /* @__PURE__ */ F("div", { className: "colorpicker-footer", children: [
230
- /* @__PURE__ */ d("div", { className: "colorpicker-preview", style: { background: u } }),
231
- /* @__PURE__ */ d(
233
+ /* @__PURE__ */ P("div", { className: "colorpicker-footer", children: [
234
+ /* @__PURE__ */ u("div", { className: "colorpicker-preview", style: { background: l } }),
235
+ /* @__PURE__ */ u(
232
236
  "input",
233
237
  {
234
238
  className: "colorpicker-hex",
235
239
  type: "text",
236
- value: u,
237
- onChange: (p) => {
238
- const C = $(p.target.value);
239
- C && e(C);
240
+ value: l,
241
+ onChange: (k) => {
242
+ const D = E(k.target.value);
243
+ D && n(D);
240
244
  },
241
- onKeyDown: (p) => {
242
- if (p.key === "Enter") {
243
- const C = $(u);
244
- C && e(C);
245
+ onKeyDown: (k) => {
246
+ if (k.key === "Enter") {
247
+ const D = E(l);
248
+ D && n(D);
245
249
  }
246
250
  },
247
251
  spellCheck: !1
248
252
  }
249
253
  ),
250
- /* @__PURE__ */ d("button", { className: "colorpicker-ok", onClick: () => {
251
- e(u), o();
254
+ /* @__PURE__ */ u("button", { className: "colorpicker-ok", onClick: () => {
255
+ n(l), o();
252
256
  }, children: "OK" })
253
257
  ] }),
254
- r && r.length > 0 && /* @__PURE__ */ d("div", { className: "colorpicker-presets", children: r.map((p) => /* @__PURE__ */ d(
258
+ r && r.length > 0 && /* @__PURE__ */ u("div", { className: "colorpicker-presets", children: r.map((k) => /* @__PURE__ */ u(
255
259
  "div",
256
260
  {
257
261
  className: "colorpicker-preset",
258
- style: { background: p },
259
- title: p,
262
+ style: { background: k },
263
+ title: k,
260
264
  onClick: () => {
261
- const C = X(p);
262
- a.current = C, h(C), l(p), e(p);
265
+ const D = Y(k);
266
+ c.current = D, a(D), d(k), n(k);
263
267
  }
264
268
  },
265
- p
269
+ k
266
270
  )) })
267
271
  ]
268
272
  }
269
273
  )
270
274
  ] });
271
275
  }
272
- const Fe = { left: 0, top: 0, width: 100, maxWidth: 300 };
273
- function ve({ containerRef: t, onClose: n, onKeyDown: e, listRef: o, search: r, children: c }) {
274
- const [s, h] = P(Fe), u = B(() => {
275
- var k;
276
- const l = (k = t.current) == null ? void 0 : k.getBoundingClientRect();
277
- if (!l) return;
278
- const i = {
279
- left: Math.round(l.left),
280
- top: Math.round(l.bottom) + 2,
281
- width: Math.round(l.width),
282
- maxWidth: Math.round(window.innerWidth - l.left - 24)
276
+ const rt = { left: 0, top: 0, width: 100, maxWidth: 300 };
277
+ function ke({ containerRef: e, onClose: t, onKeyDown: n, listRef: o, search: r, children: i }) {
278
+ const [s, a] = T(rt), l = W(() => {
279
+ var x;
280
+ const d = (x = e.current) == null ? void 0 : x.getBoundingClientRect();
281
+ if (!d) return;
282
+ const h = {
283
+ left: Math.round(d.left),
284
+ top: Math.round(d.bottom) + 2,
285
+ width: Math.round(d.width),
286
+ maxWidth: Math.round(window.innerWidth - d.left - 24)
283
287
  };
284
- h(
285
- (v) => v.left === i.left && v.top === i.top && v.width === i.width && v.maxWidth === i.maxWidth ? v : i
288
+ a(
289
+ (p) => p.left === h.left && p.top === h.top && p.width === h.width && p.maxWidth === h.maxWidth ? p : h
286
290
  );
287
- }, [t]);
288
- return re(() => (u(), window.addEventListener("resize", u), window.addEventListener("scroll", u, !0), () => {
289
- window.removeEventListener("resize", u), window.removeEventListener("scroll", u, !0);
290
- }), [u]), R(() => {
291
- t.current || u();
292
- }, [t, u]), /* @__PURE__ */ d(ie, { onClose: n, triggerRef: t, children: /* @__PURE__ */ F(
291
+ }, [e]);
292
+ return ce(() => (l(), window.addEventListener("resize", l), window.addEventListener("scroll", l, !0), () => {
293
+ window.removeEventListener("resize", l), window.removeEventListener("scroll", l, !0);
294
+ }), [l]), z(() => {
295
+ e.current || l();
296
+ }, [e, l]), /* @__PURE__ */ u(le, { onClose: t, triggerRef: e, children: /* @__PURE__ */ P(
293
297
  "div",
294
298
  {
295
299
  className: "selectbox-dropdown",
296
- onKeyDown: e,
300
+ onKeyDown: n,
297
301
  style: {
298
302
  position: "fixed",
299
303
  left: s.left,
@@ -304,107 +308,107 @@ function ve({ containerRef: t, onClose: n, onKeyDown: e, listRef: o, search: r,
304
308
  },
305
309
  children: [
306
310
  r,
307
- /* @__PURE__ */ d("ul", { ref: o, className: "selectbox-list", tabIndex: -1, children: c })
311
+ /* @__PURE__ */ u("ul", { ref: o, className: "selectbox-list", tabIndex: -1, children: i })
308
312
  ]
309
313
  }
310
314
  ) });
311
315
  }
312
- function Ct({ value: t, options: n, onChange: e, disabled: o, placeholder: r, title: c, className: s, onOpen: h, inputMode: u = "text" }) {
313
- const { t: l } = j(), [i, k] = P(!1), [v, m] = P(t), [a, x] = P(-1), D = H(null), $ = H(null), A = H(!1);
314
- R(() => {
315
- A.current || m(t);
316
- }, [t]);
317
- const _ = v !== t, I = z(() => {
318
- if (!_) return n;
319
- const g = v.trim().toLowerCase();
320
- return g ? n.filter((b) => b.toLowerCase().includes(g)) : n;
321
- }, [n, v, _]);
322
- R(() => {
323
- a >= I.length && x(Math.max(0, I.length - 1));
324
- }, [I.length, a]), R(() => {
325
- if (!i) return;
326
- h == null || h();
327
- const g = I.findIndex((b) => b === t);
328
- x(g >= 0 ? g : 0);
329
- }, [i]), R(() => {
330
- if (!i || !$.current) return;
331
- const g = $.current.children[a];
332
- g == null || g.scrollIntoView({ block: "nearest" });
333
- }, [a, i]);
334
- const S = B(
335
- (g) => {
336
- const b = g.trim();
337
- k(!1), b && (m(b), b !== t && e(b));
316
+ function Xt({ value: e, options: t, onChange: n, disabled: o, placeholder: r, title: i, className: s, onOpen: a, inputMode: l = "text" }) {
317
+ const { t: d } = U(), [h, x] = T(!1), [p, f] = T(e), [c, y] = T(-1), _ = F(null), E = F(null), C = F(!1);
318
+ z(() => {
319
+ C.current || f(e);
320
+ }, [e]);
321
+ const I = p !== e, w = j(() => {
322
+ if (!I) return t;
323
+ const b = p.trim().toLowerCase();
324
+ return b ? t.filter((N) => N.toLowerCase().includes(b)) : t;
325
+ }, [t, p, I]);
326
+ z(() => {
327
+ c >= w.length && y(Math.max(0, w.length - 1));
328
+ }, [w.length, c]), z(() => {
329
+ if (!h) return;
330
+ a == null || a();
331
+ const b = w.findIndex((N) => N === e);
332
+ y(b >= 0 ? b : 0);
333
+ }, [h]), z(() => {
334
+ if (!h || !E.current) return;
335
+ const b = E.current.children[c];
336
+ b == null || b.scrollIntoView({ block: "nearest" });
337
+ }, [c, h]);
338
+ const $ = W(
339
+ (b) => {
340
+ const N = b.trim();
341
+ x(!1), N && (f(N), N !== e && n(N));
338
342
  },
339
- [t, e]
340
- ), M = B(
341
- (g) => {
342
- switch (g.key) {
343
+ [e, n]
344
+ ), M = W(
345
+ (b) => {
346
+ switch (b.key) {
343
347
  case "ArrowDown":
344
- g.preventDefault(), k(!0), x((b) => Math.min(b + 1, I.length - 1));
348
+ b.preventDefault(), x(!0), y((N) => Math.min(N + 1, w.length - 1));
345
349
  break;
346
350
  case "ArrowUp":
347
- g.preventDefault(), k(!0), x((b) => Math.max(b - 1, 0));
351
+ b.preventDefault(), x(!0), y((N) => Math.max(N - 1, 0));
348
352
  break;
349
353
  case "Enter":
350
- g.preventDefault(), i && I[a] ? S(I[a]) : S(v);
354
+ b.preventDefault(), h && w[c] ? $(w[c]) : $(p);
351
355
  break;
352
356
  case "Escape":
353
- g.preventDefault(), m(t), k(!1);
357
+ b.preventDefault(), f(e), x(!1);
354
358
  break;
355
359
  }
356
360
  },
357
- [i, I, a, S, v, t]
361
+ [h, w, c, $, p, e]
358
362
  );
359
- return /* @__PURE__ */ F(
363
+ return /* @__PURE__ */ P(
360
364
  "div",
361
365
  {
362
- className: `combobox ${i ? "selectbox-open" : ""} ${o ? "selectbox-disabled" : ""} ${s ?? ""}`,
363
- ref: D,
366
+ className: `combobox ${h ? "selectbox-open" : ""} ${o ? "selectbox-disabled" : ""} ${s ?? ""}`,
367
+ ref: _,
364
368
  children: [
365
- /* @__PURE__ */ F("div", { className: "combobox-field", children: [
366
- /* @__PURE__ */ d(
369
+ /* @__PURE__ */ P("div", { className: "combobox-field", children: [
370
+ /* @__PURE__ */ u(
367
371
  "input",
368
372
  {
369
373
  type: "text",
370
- inputMode: u,
374
+ inputMode: l,
371
375
  className: "combobox-input",
372
- value: v,
373
- title: c,
374
- "aria-label": c,
376
+ value: p,
377
+ title: i,
378
+ "aria-label": i,
375
379
  placeholder: r,
376
380
  disabled: o,
377
381
  onFocus: () => {
378
- A.current = !0, k(!0);
382
+ C.current = !0, x(!0);
379
383
  },
380
384
  onBlur: () => {
381
- A.current = !1, S(v);
385
+ C.current = !1, $(p);
382
386
  },
383
- onChange: (g) => {
384
- m(g.target.value), k(!0), x(-1);
387
+ onChange: (b) => {
388
+ f(b.target.value), x(!0), y(-1);
385
389
  },
386
390
  onKeyDown: M
387
391
  }
388
392
  ),
389
- /* @__PURE__ */ d("span", { className: `codicon codicon-chevron-down selectbox-arrow ${i ? "selectbox-arrow-up" : ""}` })
393
+ /* @__PURE__ */ u("span", { className: `codicon codicon-chevron-down selectbox-arrow ${h ? "selectbox-arrow-up" : ""}` })
390
394
  ] }),
391
- i && /* @__PURE__ */ d(
392
- ve,
395
+ h && /* @__PURE__ */ u(
396
+ ke,
393
397
  {
394
- containerRef: D,
395
- onClose: () => k(!1),
396
- listRef: $,
397
- children: I.length === 0 ? /* @__PURE__ */ d("li", { className: "selectbox-empty", children: l("无匹配项") }) : I.map((g, b) => /* @__PURE__ */ d(
398
+ containerRef: _,
399
+ onClose: () => x(!1),
400
+ listRef: E,
401
+ children: w.length === 0 ? /* @__PURE__ */ u("li", { className: "selectbox-empty", children: d("无匹配项") }) : w.map((b, N) => /* @__PURE__ */ u(
398
402
  "li",
399
403
  {
400
- className: `selectbox-item ${b === a ? "selectbox-item-focus" : ""} ${g === t ? "selectbox-item-selected" : ""}`,
401
- onMouseDown: (f) => {
402
- f.preventDefault(), S(g);
404
+ className: `selectbox-item ${N === c ? "selectbox-item-focus" : ""} ${b === e ? "selectbox-item-selected" : ""}`,
405
+ onMouseDown: (m) => {
406
+ m.preventDefault(), $(b);
403
407
  },
404
- onMouseEnter: () => x(b),
405
- children: g
408
+ onMouseEnter: () => y(N),
409
+ children: b
406
410
  },
407
- g
411
+ b
408
412
  ))
409
413
  }
410
414
  )
@@ -412,348 +416,348 @@ function Ct({ value: t, options: n, onChange: e, disabled: o, placeholder: r, ti
412
416
  }
413
417
  );
414
418
  }
415
- const Y = 3e3;
416
- function ee() {
419
+ const J = 3e3;
420
+ function te() {
417
421
  return window.linkdesk;
418
422
  }
419
- function ye(t, n) {
420
- return t.map((e) => {
421
- if (typeof e == "string") return { id: e, label: e, group: n };
422
- const o = e.children && e.children.length > 0 ? ye(e.children, n) : void 0;
423
+ function ge(e, t) {
424
+ return e.map((n) => {
425
+ if (typeof n == "string") return { id: n, label: n, group: t };
426
+ const o = n.children && n.children.length > 0 ? ge(n.children, t) : void 0;
423
427
  return {
424
- id: e.command,
425
- label: e.label ?? e.command,
426
- group: n,
427
- checked: e.checked,
428
- commandArgs: e.commandArgs,
428
+ id: n.command,
429
+ label: n.label ?? n.command,
430
+ group: t,
431
+ checked: n.checked,
432
+ commandArgs: n.commandArgs,
429
433
  ...o ? { children: o } : {}
430
434
  };
431
435
  });
432
436
  }
433
- function It({ menuId: t, anchor: n, context: e, onClose: o, resolveChildren: r, items: c, variant: s }) {
434
- const h = H(null), u = H(/* @__PURE__ */ new Map()), l = H(null), [i, k] = P([]), v = z(() => JSON.stringify(e ?? {}), [e]);
435
- R(() => {
436
- var w, E;
437
- let y = !1;
438
- return c ? (k(c), () => {
439
- y = !0;
440
- }) : ((E = (w = ee().menu) == null ? void 0 : w.getItems) == null || E.call(w, t, e).then((N) => {
441
- !y && N && k(N);
437
+ function Yt({ menuId: e, anchor: t, context: n, onClose: o, resolveChildren: r, items: i, variant: s }) {
438
+ const a = F(null), l = F(/* @__PURE__ */ new Map()), d = F(null), [h, x] = T([]), p = j(() => JSON.stringify(n ?? {}), [n]);
439
+ z(() => {
440
+ var g, A;
441
+ let v = !1;
442
+ return i ? (x(i), () => {
443
+ v = !0;
444
+ }) : ((A = (g = te().menu) == null ? void 0 : g.getItems) == null || A.call(g, e, n).then((L) => {
445
+ !v && L && x(L);
442
446
  }).catch(() => {
443
447
  }), () => {
444
- y = !0;
448
+ v = !0;
445
449
  });
446
- }, [t, v, c]);
447
- const m = z(() => {
448
- const y = /* @__PURE__ */ new Map(), w = [];
449
- for (const N of i) {
450
- const T = N.children;
451
- if (!N.command && !T) continue;
452
- const L = N.group ?? "__default";
453
- y.has(L) || (y.set(L, []), w.push(L));
454
- let W;
455
- if (T && T.length > 0)
456
- W = ye(T, L);
457
- else if (T && T.length === 0 && r) {
458
- const U = r(N.command, e ?? {});
459
- U && U.length > 0 && (W = U.map((Z) => ({ id: Z.id, label: Z.label, group: L })));
450
+ }, [e, p, i]);
451
+ const f = j(() => {
452
+ const v = /* @__PURE__ */ new Map(), g = [];
453
+ for (const L of h) {
454
+ const R = L.children;
455
+ if (!L.command && !R) continue;
456
+ const S = L.group ?? "__default";
457
+ v.has(S) || (v.set(S, []), g.push(S));
458
+ let K;
459
+ if (R && R.length > 0)
460
+ K = ge(R, S);
461
+ else if (R && R.length === 0 && r) {
462
+ const O = r(L.command, n ?? {});
463
+ O && O.length > 0 && (K = O.map((X) => ({ id: X.id, label: X.label, group: S })));
460
464
  }
461
- y.get(L).push({
462
- id: N.command || N.label || "",
465
+ v.get(S).push({
466
+ id: L.command || L.label || "",
463
467
  // E5.8#37.7.1:label 优先于命令 title——菜单项显式 label 是槽位显示文本(如 when 门控的
464
468
  // 「移动到右侧/左侧」、面板视图清单的视图名);命令 title 只是无 label 时的兜底
465
469
  // (修复 #37.6 侧栏换边菜单项被命令 title「切换侧栏位置」遮蔽的潜在 bug)。
466
- label: N.label ?? N.title ?? N.command,
467
- group: L,
468
- shortcut: N.shortcut,
469
- checked: N.checked,
470
- commandArgs: N.commandArgs,
471
- children: W
470
+ label: L.label ?? L.title ?? L.command,
471
+ group: S,
472
+ shortcut: L.shortcut,
473
+ checked: L.checked,
474
+ commandArgs: L.commandArgs,
475
+ children: K
472
476
  });
473
477
  }
474
- const E = [];
475
- for (let N = 0; N < w.length; N++)
476
- N > 0 && E.push({ type: "divider", group: w[N] }), E.push(...y.get(w[N]));
477
- return E;
478
- }, [i, e, r]), [a, x] = P([]), D = B(() => {
479
- l.current && (clearTimeout(l.current), l.current = null);
480
- }, []), $ = B((y) => {
481
- l.current && (clearTimeout(l.current), l.current = null), l.current = setTimeout(() => x((w) => w.slice(0, y)), 150);
482
- }, []), A = B((y, w, E) => {
483
- D();
484
- const N = y.getBoundingClientRect(), T = 160, L = N.right + T > window.innerWidth ? N.left - T - 4 : N.right + 4;
485
- x((W) => [...W.slice(0, E), { x: L, y: N.top, items: w }]);
486
- }, [D]), [_, I] = P({ left: n.x, top: n.y }), [S, M] = P(!1), g = S;
487
- R(() => {
488
- if (!g) return;
489
- const y = (T) => {
490
- T.key === "Escape" && (a.length > 0 ? x((L) => L.slice(0, L.length - 1)) : o());
491
- }, w = () => o(), E = () => o(), N = (T) => {
492
- var U;
493
- const L = T.target;
494
- (((U = h.current) == null ? void 0 : U.contains(L)) ?? !1) || [...u.current.values()].some((Z) => Z.contains(L)) || o();
478
+ const A = [];
479
+ for (let L = 0; L < g.length; L++)
480
+ L > 0 && A.push({ type: "divider", group: g[L] }), A.push(...v.get(g[L]));
481
+ return A;
482
+ }, [h, n, r]), [c, y] = T([]), _ = W(() => {
483
+ d.current && (clearTimeout(d.current), d.current = null);
484
+ }, []), E = W((v) => {
485
+ d.current && (clearTimeout(d.current), d.current = null), d.current = setTimeout(() => y((g) => g.slice(0, v)), 150);
486
+ }, []), C = W((v, g, A) => {
487
+ _();
488
+ const L = v.getBoundingClientRect(), R = 160, S = L.right + R > window.innerWidth ? L.left - R - 4 : L.right + 4;
489
+ y((K) => [...K.slice(0, A), { x: S, y: L.top, items: g }]);
490
+ }, [_]), [I, w] = T({ left: t.x, top: t.y }), [$, M] = T(!1), b = $;
491
+ z(() => {
492
+ if (!b) return;
493
+ const v = (R) => {
494
+ R.key === "Escape" && (c.length > 0 ? y((S) => S.slice(0, S.length - 1)) : o());
495
+ }, g = () => o(), A = () => o(), L = (R) => {
496
+ var O;
497
+ const S = R.target;
498
+ (((O = a.current) == null ? void 0 : O.contains(S)) ?? !1) || [...l.current.values()].some((X) => X.contains(S)) || o();
495
499
  };
496
- return window.addEventListener("keydown", y), window.addEventListener("blur", w), window.addEventListener("wheel", E, !0), s !== "embedded" && window.addEventListener("mousedown", N, !0), () => {
497
- window.removeEventListener("keydown", y), window.removeEventListener("blur", w), window.removeEventListener("wheel", E, !0), s !== "embedded" && window.removeEventListener("mousedown", N, !0);
500
+ return window.addEventListener("keydown", v), window.addEventListener("blur", g), window.addEventListener("wheel", A, !0), s !== "embedded" && window.addEventListener("mousedown", L, !0), () => {
501
+ window.removeEventListener("keydown", v), window.removeEventListener("blur", g), window.removeEventListener("wheel", A, !0), s !== "embedded" && window.removeEventListener("mousedown", L, !0);
498
502
  };
499
- }, [o, a, g, s]);
500
- const [b, f] = P(-1), p = H(/* @__PURE__ */ new Map()), C = z(() => m.filter((y) => !("type" in y)), [m]);
501
- R(() => {
502
- if (!g) return;
503
- const y = (w) => {
504
- var E, N, T;
505
- if (w.key === "ArrowDown")
506
- w.preventDefault(), f((L) => Math.min(L + 1, C.length - 1));
507
- else if (w.key === "ArrowUp")
508
- w.preventDefault(), f((L) => Math.max(L - 1, 0));
509
- else if (w.key === "ArrowRight" && b >= 0) {
510
- const L = C[b];
511
- if ((E = L == null ? void 0 : L.children) != null && E.length) {
512
- w.preventDefault();
513
- const W = p.current.get(b);
514
- W && A(W, L.children, 0);
503
+ }, [o, c, b, s]);
504
+ const [N, m] = T(-1), k = F(/* @__PURE__ */ new Map()), D = j(() => f.filter((v) => !("type" in v)), [f]);
505
+ z(() => {
506
+ if (!b) return;
507
+ const v = (g) => {
508
+ var A, L, R;
509
+ if (g.key === "ArrowDown")
510
+ g.preventDefault(), m((S) => Math.min(S + 1, D.length - 1));
511
+ else if (g.key === "ArrowUp")
512
+ g.preventDefault(), m((S) => Math.max(S - 1, 0));
513
+ else if (g.key === "ArrowRight" && N >= 0) {
514
+ const S = D[N];
515
+ if ((A = S == null ? void 0 : S.children) != null && A.length) {
516
+ g.preventDefault();
517
+ const K = k.current.get(N);
518
+ K && C(K, S.children, 0);
515
519
  }
516
- } else if (w.key === "ArrowLeft")
517
- a.length > 0 && (w.preventDefault(), x((L) => L.slice(0, L.length - 1)));
518
- else if (w.key === "Enter" && b >= 0) {
519
- w.preventDefault();
520
- const L = C[b];
521
- L && ((T = (N = ee().commands) == null ? void 0 : N.executeCommand) == null || T.call(N, L.id, void 0, ...L.commandArgs ?? [], e), o());
520
+ } else if (g.key === "ArrowLeft")
521
+ c.length > 0 && (g.preventDefault(), y((S) => S.slice(0, S.length - 1)));
522
+ else if (g.key === "Enter" && N >= 0) {
523
+ g.preventDefault();
524
+ const S = D[N];
525
+ S && ((R = (L = te().commands) == null ? void 0 : L.executeCommand) == null || R.call(L, S.id, void 0, ...S.commandArgs ?? [], n), o());
522
526
  }
523
527
  };
524
- return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
525
- }, [C, b, e, o, g, a, A]), R(() => {
526
- var y;
527
- b >= 0 && ((y = p.current.get(b)) == null || y.scrollIntoView({ block: "nearest" }));
528
- }, [b]);
529
- const K = B(async (y) => {
530
- var w, E;
531
- o(), await ((E = (w = ee().commands) == null ? void 0 : w.executeCommand) == null ? void 0 : E.call(w, y.id, void 0, ...y.commandArgs ?? [], e));
532
- }, [e, o]);
533
- re(() => {
534
- I({ left: n.x, top: Math.max(30, n.y) }), M(!1);
535
- }, [n.x, n.y, m.length]), R(() => {
536
- const y = h.current;
537
- if (!y) return;
538
- const w = y.getBoundingClientRect();
539
- let E = n.x, N = Math.max(30, n.y);
540
- E + w.width > window.innerWidth && (E = Math.max(0, window.innerWidth - w.width - 4)), N + w.height > window.innerHeight && (N = Math.max(30, window.innerHeight - w.height - 4)), I({ left: E, top: N });
541
- const T = requestAnimationFrame(() => {
542
- M(!0), y.classList.add("show");
528
+ return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
529
+ }, [D, N, n, o, b, c, C]), z(() => {
530
+ var v;
531
+ N >= 0 && ((v = k.current.get(N)) == null || v.scrollIntoView({ block: "nearest" }));
532
+ }, [N]);
533
+ const B = W(async (v) => {
534
+ var g, A;
535
+ o(), await ((A = (g = te().commands) == null ? void 0 : g.executeCommand) == null ? void 0 : A.call(g, v.id, void 0, ...v.commandArgs ?? [], n));
536
+ }, [n, o]);
537
+ ce(() => {
538
+ w({ left: t.x, top: Math.max(30, t.y) }), M(!1);
539
+ }, [t.x, t.y, f.length]), z(() => {
540
+ const v = a.current;
541
+ if (!v) return;
542
+ const g = v.getBoundingClientRect();
543
+ let A = t.x, L = Math.max(30, t.y);
544
+ A + g.width > window.innerWidth && (A = Math.max(0, window.innerWidth - g.width - 4)), L + g.height > window.innerHeight && (L = Math.max(30, window.innerHeight - g.height - 4)), w({ left: A, top: L });
545
+ const R = requestAnimationFrame(() => {
546
+ M(!0), v.classList.add("show");
543
547
  });
544
- return () => cancelAnimationFrame(T);
545
- }, [n.x, n.y, m.length]), R(() => {
546
- var y;
547
- S && ((y = h.current) == null || y.focus());
548
- }, [S]);
548
+ return () => cancelAnimationFrame(R);
549
+ }, [t.x, t.y, f.length]), z(() => {
550
+ var v;
551
+ $ && ((v = a.current) == null || v.focus());
552
+ }, [$]);
549
553
  let V = 0;
550
- return /* @__PURE__ */ F(ie, { rootId: "context-menu-root", zIndex: String(Y), children: [
551
- s !== "embedded" && s !== "non-modal" && ce(
552
- /* @__PURE__ */ d(
554
+ return /* @__PURE__ */ P(le, { rootId: "context-menu-root", zIndex: String(J), children: [
555
+ s !== "embedded" && s !== "non-modal" && ae(
556
+ /* @__PURE__ */ u(
553
557
  "div",
554
558
  {
555
559
  style: {
556
560
  position: "fixed",
557
561
  inset: 0,
558
- zIndex: Y - 1
562
+ zIndex: J - 1
559
563
  }
560
564
  }
561
565
  ),
562
- we()
566
+ ye()
563
567
  ),
564
- /* @__PURE__ */ d(
568
+ /* @__PURE__ */ u(
565
569
  "div",
566
570
  {
567
- ref: h,
571
+ ref: a,
568
572
  className: "ctx-menu",
569
573
  tabIndex: -1,
570
574
  style: {
571
- left: _.left,
572
- top: _.top,
573
- zIndex: Y,
574
- visibility: S ? void 0 : "hidden"
575
+ left: I.left,
576
+ top: I.top,
577
+ zIndex: J,
578
+ visibility: $ ? void 0 : "hidden"
575
579
  },
576
- children: m.map((y, w) => {
577
- if ("type" in y) return /* @__PURE__ */ d("div", { className: "ctx-divider" }, `div-${w}`);
578
- const E = V++, N = !!(y.children && y.children.length > 0), T = E === b, L = y.group === "delete";
580
+ children: f.map((v, g) => {
581
+ if ("type" in v) return /* @__PURE__ */ u("div", { className: "ctx-divider" }, `div-${g}`);
582
+ const A = V++, L = !!(v.children && v.children.length > 0), R = A === N, S = v.group === "delete";
579
583
  return (
580
584
  // E5.8#37.7.1:复合 key——共享命令 id 的动态项(面板视图清单全用同一 toggle 命令)会撞 key;
581
585
  // 并入数组索引消歧(菜单项在菜单生命周期内静态,索引稳定)。
582
- /* @__PURE__ */ F(
586
+ /* @__PURE__ */ P(
583
587
  "div",
584
588
  {
585
- ref: (W) => {
586
- W ? p.current.set(E, W) : p.current.delete(E);
589
+ ref: (K) => {
590
+ K ? k.current.set(A, K) : k.current.delete(A);
587
591
  },
588
- className: `ctx-item${T ? " focused" : ""}${L ? " ctx-item-danger" : ""}`,
589
- onClick: (W) => {
590
- W.stopPropagation(), N || K(y);
592
+ className: `ctx-item${R ? " focused" : ""}${S ? " ctx-item-danger" : ""}`,
593
+ onClick: (K) => {
594
+ K.stopPropagation(), L || B(v);
591
595
  },
592
- onMouseEnter: (W) => {
593
- f(E), N ? A(W.currentTarget, y.children, 0) : x((U) => U.slice(0, 0));
596
+ onMouseEnter: (K) => {
597
+ m(A), L ? C(K.currentTarget, v.children, 0) : y((O) => O.slice(0, 0));
594
598
  },
595
599
  onMouseLeave: () => {
596
- N && $(1);
600
+ L && E(1);
597
601
  },
598
602
  children: [
599
- /* @__PURE__ */ d("span", { className: "ctx-item-check", "aria-hidden": "true", children: y.checked ? "✓" : "" }),
600
- /* @__PURE__ */ d("span", { className: "ctx-item-label", children: y.label }),
601
- N && /* @__PURE__ */ d("span", { className: "ctx-item-chevron", children: "›" }),
602
- y.shortcut && /* @__PURE__ */ d("span", { className: "ctx-item-shortcut", children: y.shortcut })
603
+ /* @__PURE__ */ u("span", { className: "ctx-item-check", "aria-hidden": "true", children: v.checked ? "✓" : "" }),
604
+ /* @__PURE__ */ u("span", { className: "ctx-item-label", children: v.label }),
605
+ L && /* @__PURE__ */ u("span", { className: "ctx-item-chevron", children: "›" }),
606
+ v.shortcut && /* @__PURE__ */ u("span", { className: "ctx-item-shortcut", children: v.shortcut })
603
607
  ]
604
608
  },
605
- `${y.id}::${w}`
609
+ `${v.id}::${g}`
606
610
  )
607
611
  );
608
612
  })
609
613
  }
610
614
  ),
611
- a.map((y, w) => /* @__PURE__ */ d(
615
+ c.map((v, g) => /* @__PURE__ */ u(
612
616
  "div",
613
617
  {
614
- ref: (E) => {
615
- E ? u.current.set(w, E) : u.current.delete(w);
618
+ ref: (A) => {
619
+ A ? l.current.set(g, A) : l.current.delete(g);
616
620
  },
617
621
  className: "ctx-menu show",
618
- style: { left: y.x, top: y.y, zIndex: Y },
619
- onMouseEnter: D,
620
- onMouseLeave: () => $(w + 1),
621
- children: y.items.map((E, N) => {
622
- const T = !!(E.children && E.children.length > 0);
623
- return /* @__PURE__ */ F(
622
+ style: { left: v.x, top: v.y, zIndex: J },
623
+ onMouseEnter: _,
624
+ onMouseLeave: () => E(g + 1),
625
+ children: v.items.map((A, L) => {
626
+ const R = !!(A.children && A.children.length > 0);
627
+ return /* @__PURE__ */ P(
624
628
  "div",
625
629
  {
626
630
  className: "ctx-item",
627
- onClick: (L) => {
628
- L.stopPropagation(), T || K(E);
631
+ onClick: (S) => {
632
+ S.stopPropagation(), R || B(A);
629
633
  },
630
- onMouseEnter: (L) => {
631
- T ? A(L.currentTarget, E.children, w + 1) : x((W) => W.slice(0, w + 1));
634
+ onMouseEnter: (S) => {
635
+ R ? C(S.currentTarget, A.children, g + 1) : y((K) => K.slice(0, g + 1));
632
636
  },
633
637
  onMouseLeave: () => {
634
- T && $(w + 2);
638
+ R && E(g + 2);
635
639
  },
636
640
  children: [
637
- /* @__PURE__ */ d("span", { className: "ctx-item-check", "aria-hidden": "true", children: E.checked ? "✓" : "" }),
638
- /* @__PURE__ */ d("span", { className: "ctx-item-label", children: E.label }),
639
- T && /* @__PURE__ */ d("span", { className: "ctx-item-chevron", children: "›" }),
640
- E.shortcut && /* @__PURE__ */ d("span", { className: "ctx-item-shortcut", children: E.shortcut })
641
+ /* @__PURE__ */ u("span", { className: "ctx-item-check", "aria-hidden": "true", children: A.checked ? "✓" : "" }),
642
+ /* @__PURE__ */ u("span", { className: "ctx-item-label", children: A.label }),
643
+ R && /* @__PURE__ */ u("span", { className: "ctx-item-chevron", children: "›" }),
644
+ A.shortcut && /* @__PURE__ */ u("span", { className: "ctx-item-shortcut", children: A.shortcut })
641
645
  ]
642
646
  },
643
- `${E.id}::${N}`
647
+ `${A.id}::${L}`
644
648
  );
645
649
  })
646
650
  },
647
- w
651
+ g
648
652
  ))
649
653
  ] });
650
654
  }
651
- function He(t) {
652
- return typeof t == "object" && "value" in t && "label" in t;
655
+ function st(e) {
656
+ return typeof e == "object" && "value" in e && "label" in e;
653
657
  }
654
- function ge({ value: t, options: n, onChange: e, disabled: o, placeholder: r, title: c, className: s, onOpen: h }) {
655
- const { t: u } = j(), [l, i] = P(!1), [k, v] = P(""), [m, a] = P(-1), x = H(null), D = H(null), $ = H(null), A = z(
656
- () => n.map((f) => He(f) ? f : { value: f, label: f }),
657
- [n]
658
- ), _ = z(() => {
659
- if (!k) return A;
660
- const f = k.toLowerCase();
661
- return A.filter((p) => p.label.toLowerCase().includes(f));
662
- }, [A, k]), I = z(() => A.find((f) => f.value === t), [A, t]), S = z(() => I ? I.label : t !== "" ? t : r ?? t, [I, t, r]);
663
- R(() => {
664
- m >= _.length && a(Math.max(0, _.length - 1));
665
- }, [_.length, m]), R(() => {
666
- var p, C;
667
- if (!l) {
668
- v(""), a(-1);
658
+ function be({ value: e, options: t, onChange: n, disabled: o, placeholder: r, title: i, className: s, onOpen: a }) {
659
+ const { t: l } = U(), [d, h] = T(!1), [x, p] = T(""), [f, c] = T(-1), y = F(null), _ = F(null), E = F(null), C = j(
660
+ () => t.map((m) => st(m) ? m : { value: m, label: m }),
661
+ [t]
662
+ ), I = j(() => {
663
+ if (!x) return C;
664
+ const m = x.toLowerCase();
665
+ return C.filter((k) => k.label.toLowerCase().includes(m));
666
+ }, [C, x]), w = j(() => C.find((m) => m.value === e), [C, e]), $ = j(() => w ? w.label : e !== "" ? e : r ?? e, [w, e, r]);
667
+ z(() => {
668
+ f >= I.length && c(Math.max(0, I.length - 1));
669
+ }, [I.length, f]), z(() => {
670
+ var k, D;
671
+ if (!d) {
672
+ p(""), c(-1);
669
673
  return;
670
674
  }
671
- h == null || h();
672
- const f = _.findIndex((K) => K.value === t);
673
- a(f >= 0 ? f : 0), A.length > 8 ? (p = D.current) == null || p.focus() : (C = $.current) == null || C.focus();
674
- }, [l]);
675
- const M = B(
676
- (f) => {
677
- e(f), i(!1);
675
+ a == null || a();
676
+ const m = I.findIndex((B) => B.value === e);
677
+ c(m >= 0 ? m : 0), C.length > 8 ? (k = _.current) == null || k.focus() : (D = E.current) == null || D.focus();
678
+ }, [d]);
679
+ const M = W(
680
+ (m) => {
681
+ n(m), h(!1);
678
682
  },
679
- [e]
680
- ), g = B(
681
- (f) => {
682
- switch (f.key) {
683
+ [n]
684
+ ), b = W(
685
+ (m) => {
686
+ switch (m.key) {
683
687
  case "ArrowDown":
684
- f.preventDefault(), a((p) => Math.min(p + 1, _.length - 1));
688
+ m.preventDefault(), c((k) => Math.min(k + 1, I.length - 1));
685
689
  break;
686
690
  case "ArrowUp":
687
- f.preventDefault(), a((p) => Math.max(p - 1, 0));
691
+ m.preventDefault(), c((k) => Math.max(k - 1, 0));
688
692
  break;
689
693
  case "Enter":
690
- f.preventDefault(), _[m] && M(_[m].value);
694
+ m.preventDefault(), I[f] && M(I[f].value);
691
695
  break;
692
696
  }
693
697
  },
694
- [_, m, M]
698
+ [I, f, M]
695
699
  );
696
- R(() => {
697
- if (!l || !$.current) return;
698
- const f = $.current.children[m];
699
- f == null || f.scrollIntoView({ block: "nearest" });
700
- }, [m, l]);
701
- const b = A.length > 8;
702
- return /* @__PURE__ */ F(
700
+ z(() => {
701
+ if (!d || !E.current) return;
702
+ const m = E.current.children[f];
703
+ m == null || m.scrollIntoView({ block: "nearest" });
704
+ }, [f, d]);
705
+ const N = C.length > 8;
706
+ return /* @__PURE__ */ P(
703
707
  "div",
704
708
  {
705
- className: `selectbox ${l ? "selectbox-open" : ""} ${o ? "selectbox-disabled" : ""} ${s ?? ""}`,
706
- ref: x,
709
+ className: `selectbox ${d ? "selectbox-open" : ""} ${o ? "selectbox-disabled" : ""} ${s ?? ""}`,
710
+ ref: y,
707
711
  children: [
708
- /* @__PURE__ */ F(
712
+ /* @__PURE__ */ P(
709
713
  "button",
710
714
  {
711
715
  type: "button",
712
716
  className: "selectbox-trigger",
713
717
  disabled: o,
714
- title: c,
715
- onClick: () => i((f) => !f),
718
+ title: i,
719
+ onClick: () => h((m) => !m),
716
720
  children: [
717
- /* @__PURE__ */ F("span", { className: "selectbox-label", children: [
718
- (I == null ? void 0 : I.preview) && /* @__PURE__ */ d("span", { className: "selectbox-swatch", style: { background: I.preview } }),
719
- S
721
+ /* @__PURE__ */ P("span", { className: "selectbox-label", children: [
722
+ (w == null ? void 0 : w.preview) && /* @__PURE__ */ u("span", { className: "selectbox-swatch", style: { background: w.preview } }),
723
+ $
720
724
  ] }),
721
- /* @__PURE__ */ d("span", { className: `codicon codicon-chevron-down selectbox-arrow ${l ? "selectbox-arrow-up" : ""}` })
725
+ /* @__PURE__ */ u("span", { className: `codicon codicon-chevron-down selectbox-arrow ${d ? "selectbox-arrow-up" : ""}` })
722
726
  ]
723
727
  }
724
728
  ),
725
- l && /* @__PURE__ */ d(
726
- ve,
729
+ d && /* @__PURE__ */ u(
730
+ ke,
727
731
  {
728
- containerRef: x,
729
- onClose: () => i(!1),
730
- onKeyDown: g,
731
- listRef: $,
732
- search: b ? /* @__PURE__ */ d("div", { className: "selectbox-search", children: /* @__PURE__ */ d(
732
+ containerRef: y,
733
+ onClose: () => h(!1),
734
+ onKeyDown: b,
735
+ listRef: E,
736
+ search: N ? /* @__PURE__ */ u("div", { className: "selectbox-search", children: /* @__PURE__ */ u(
733
737
  "input",
734
738
  {
735
- ref: D,
739
+ ref: _,
736
740
  type: "text",
737
741
  className: "selectbox-search-input",
738
- placeholder: u("筛选..."),
739
- value: k,
740
- onChange: (f) => {
741
- v(f.target.value), a(0);
742
+ placeholder: l("筛选..."),
743
+ value: x,
744
+ onChange: (m) => {
745
+ p(m.target.value), c(0);
742
746
  }
743
747
  }
744
748
  ) }) : void 0,
745
- children: _.length === 0 ? /* @__PURE__ */ d("li", { className: "selectbox-empty", children: u("无匹配项") }) : _.map((f, p) => /* @__PURE__ */ F(
749
+ children: I.length === 0 ? /* @__PURE__ */ u("li", { className: "selectbox-empty", children: l("无匹配项") }) : I.map((m, k) => /* @__PURE__ */ P(
746
750
  "li",
747
751
  {
748
- className: `selectbox-item ${p === m ? "selectbox-item-focus" : ""} ${f.value === t ? "selectbox-item-selected" : ""}`,
749
- onClick: () => M(f.value),
750
- onMouseEnter: () => a(p),
752
+ className: `selectbox-item ${k === f ? "selectbox-item-focus" : ""} ${m.value === e ? "selectbox-item-selected" : ""}`,
753
+ onClick: () => M(m.value),
754
+ onMouseEnter: () => c(k),
751
755
  children: [
752
- f.preview && /* @__PURE__ */ d("span", { className: "selectbox-swatch", style: { background: f.preview } }),
753
- f.label
756
+ m.preview && /* @__PURE__ */ u("span", { className: "selectbox-swatch", style: { background: m.preview } }),
757
+ m.label
754
758
  ]
755
759
  },
756
- f.value
760
+ m.value
757
761
  ))
758
762
  }
759
763
  )
@@ -761,125 +765,125 @@ function ge({ value: t, options: n, onChange: e, disabled: o, placeholder: r, ti
761
765
  }
762
766
  );
763
767
  }
764
- const he = "followTheme", te = [];
765
- function Lt({ value: t, onChange: n, optionsFrom: e, domain: o, disabled: r, placeholder: c, title: s }) {
766
- const { t: h } = j(), [u, l] = P(te), i = e === "theme.colorways" && o === "colors", [k, v] = P(void 0);
767
- R(() => {
768
- var $, A, _, I, S;
769
- if (!i) return;
770
- let x = !1;
771
- (A = ($ = window.linkdesk) == null ? void 0 : $.configuration) == null || A.get("app.appearanceMode").then((M) => {
772
- x || v(M);
768
+ const pe = "followTheme", ne = [];
769
+ function Jt({ value: e, onChange: t, optionsFrom: n, domain: o, disabled: r, placeholder: i, title: s }) {
770
+ const { t: a } = U(), [l, d] = T(ne), h = n === "theme.colorways" && o === "colors", [x, p] = T(void 0);
771
+ z(() => {
772
+ var E, C, I, w, $;
773
+ if (!h) return;
774
+ let y = !1;
775
+ (C = (E = window.linkdesk) == null ? void 0 : E.configuration) == null || C.get("app.appearanceMode").then((M) => {
776
+ y || p(M);
773
777
  });
774
- const D = (S = (I = (_ = window.linkdesk) == null ? void 0 : _.configuration) == null ? void 0 : I.onChange) == null ? void 0 : S.call(I, "app.appearanceMode", (M) => v(M));
778
+ const _ = ($ = (w = (I = window.linkdesk) == null ? void 0 : I.configuration) == null ? void 0 : w.onChange) == null ? void 0 : $.call(w, "app.appearanceMode", (M) => p(M));
775
779
  return () => {
776
- x = !0, D == null || D();
780
+ y = !0, _ == null || _();
777
781
  };
778
- }, [i]);
779
- const m = i && k === "custom", a = B(async () => {
780
- var D, $, A, _;
781
- const x = ($ = (D = window.linkdesk) == null ? void 0 : D.theme) == null ? void 0 : $.listRecipes;
782
- if (x)
782
+ }, [h]);
783
+ const f = h && x === "custom", c = W(async () => {
784
+ var _, E, C, I;
785
+ const y = (E = (_ = window.linkdesk) == null ? void 0 : _.theme) == null ? void 0 : E.listRecipes;
786
+ if (y)
783
787
  try {
784
- const I = await x() ?? [];
785
- if (e === "theme.sources" || m) {
788
+ const w = await y() ?? [];
789
+ if (n === "theme.sources" || f) {
786
790
  if (o === "colors") {
787
- l([
788
- { value: he, label: h("跟随主题") },
789
- ...I.flatMap(
790
- (f) => f.colorways.map((p) => {
791
- var C;
791
+ d([
792
+ { value: pe, label: a("跟随主题") },
793
+ ...w.flatMap(
794
+ (m) => m.colorways.map((k) => {
795
+ var D;
792
796
  return {
793
- value: p.id,
794
- label: `${f.name}·${p.name}`,
795
- preview: ((C = p.preview) == null ? void 0 : C.accent) || void 0
797
+ value: k.id,
798
+ label: `${m.name}·${k.name}`,
799
+ preview: ((D = k.preview) == null ? void 0 : D.accent) || void 0
796
800
  };
797
801
  })
798
802
  )
799
803
  ]);
800
804
  return;
801
805
  }
802
- const b = o ? I.filter((f) => f.domains.includes(o)) : I;
803
- l([
804
- { value: he, label: h("跟随主题") },
805
- ...b.map((f) => ({ value: f.id, label: f.name }))
806
+ const N = o ? w.filter((m) => m.domains.includes(o)) : w;
807
+ d([
808
+ { value: pe, label: a("跟随主题") },
809
+ ...N.map((m) => ({ value: m.id, label: m.name }))
806
810
  ]);
807
811
  return;
808
812
  }
809
- const S = (_ = (A = window.linkdesk) == null ? void 0 : A.configuration) == null ? void 0 : _.get, M = S ? await S("app.theme") : "", g = I.find((b) => b.id === M);
810
- l(
811
- g ? g.colorways.map((b) => {
812
- var f;
813
- return { value: b.id, label: b.name, preview: ((f = b.preview) == null ? void 0 : f.accent) || void 0 };
814
- }) : te
813
+ const $ = (I = (C = window.linkdesk) == null ? void 0 : C.configuration) == null ? void 0 : I.get, M = $ ? await $("app.theme") : "", b = w.find((N) => N.id === M);
814
+ d(
815
+ b ? b.colorways.map((N) => {
816
+ var m;
817
+ return { value: N.id, label: N.name, preview: ((m = N.preview) == null ? void 0 : m.accent) || void 0 };
818
+ }) : ne
815
819
  );
816
820
  } catch {
817
- l(te);
821
+ d(ne);
818
822
  }
819
- }, [e, o, h, m]);
820
- return R(() => {
821
- var $, A, _, I, S, M;
822
- a();
823
- const x = (_ = (A = ($ = window.linkdesk) == null ? void 0 : $.configuration) == null ? void 0 : A.onPluginLifecycleChange) == null ? void 0 : _.call(A, () => {
824
- a();
825
- }), D = e === "theme.colorways" ? (M = (S = (I = window.linkdesk) == null ? void 0 : I.configuration) == null ? void 0 : S.onChange) == null ? void 0 : M.call(S, "app.theme", () => {
826
- a();
823
+ }, [n, o, a, f]);
824
+ return z(() => {
825
+ var E, C, I, w, $, M;
826
+ c();
827
+ const y = (I = (C = (E = window.linkdesk) == null ? void 0 : E.configuration) == null ? void 0 : C.onPluginLifecycleChange) == null ? void 0 : I.call(C, () => {
828
+ c();
829
+ }), _ = n === "theme.colorways" ? (M = ($ = (w = window.linkdesk) == null ? void 0 : w.configuration) == null ? void 0 : $.onChange) == null ? void 0 : M.call($, "app.theme", () => {
830
+ c();
827
831
  }) : void 0;
828
832
  return () => {
829
- x == null || x(), D == null || D();
833
+ y == null || y(), _ == null || _();
830
834
  };
831
- }, [a, e]), i && !m && u.length === 1 ? null : /* @__PURE__ */ d(
832
- ge,
835
+ }, [c, n]), h && !f && l.length === 1 ? null : /* @__PURE__ */ u(
836
+ be,
833
837
  {
834
- value: t,
835
- options: u,
836
- onChange: n,
838
+ value: e,
839
+ options: l,
840
+ onChange: t,
837
841
  disabled: r,
838
- placeholder: c,
842
+ placeholder: i,
839
843
  title: s,
840
844
  onOpen: () => {
841
- a();
845
+ c();
842
846
  }
843
847
  }
844
848
  );
845
849
  }
846
- function _t({ value: t, onChange: n, dialogType: e }) {
847
- const { t: o } = j(), r = async () => {
848
- var h;
849
- const c = (h = window.linkdesk) == null ? void 0 : h.dialog;
850
- if (!c) return;
851
- const s = e === "directory" ? { directory: !0 } : {
850
+ function Qt({ value: e, onChange: t, dialogType: n }) {
851
+ const { t: o } = U(), r = async () => {
852
+ var a;
853
+ const i = (a = window.linkdesk) == null ? void 0 : a.dialog;
854
+ if (!i) return;
855
+ const s = n === "directory" ? { directory: !0 } : {
852
856
  filters: [{ name: o("所有文件"), extensions: ["*"] }]
853
857
  };
854
858
  try {
855
- const u = await c.open(s);
856
- u && n(u);
859
+ const l = await i.open(s);
860
+ l && t(l);
857
861
  } catch {
858
862
  }
859
863
  };
860
- return /* @__PURE__ */ F("div", { style: { display: "flex", gap: 4, alignItems: "center" }, children: [
861
- /* @__PURE__ */ d(
864
+ return /* @__PURE__ */ P("div", { style: { display: "flex", gap: 4, alignItems: "center" }, children: [
865
+ /* @__PURE__ */ u(
862
866
  "input",
863
867
  {
864
868
  className: "input",
865
869
  type: "text",
866
- value: t,
867
- onChange: (c) => n(c.target.value),
870
+ value: e,
871
+ onChange: (i) => t(i.target.value),
868
872
  style: { flex: 1 },
869
- placeholder: o(e === "directory" ? "选择目录…" : "选择文件…")
873
+ placeholder: o(n === "directory" ? "选择目录…" : "选择文件…")
870
874
  }
871
875
  ),
872
- /* @__PURE__ */ d(
873
- Ce,
876
+ /* @__PURE__ */ u(
877
+ Ge,
874
878
  {
875
879
  onClick: r,
876
- title: o(e === "directory" ? "浏览目录…" : "浏览文件…"),
880
+ title: o(n === "directory" ? "浏览目录…" : "浏览文件…"),
877
881
  children: "…"
878
882
  }
879
883
  )
880
884
  ] });
881
885
  }
882
- const be = [
886
+ const ve = [
883
887
  "Cascadia Code",
884
888
  "Cascadia Mono",
885
889
  "Consolas",
@@ -899,8 +903,8 @@ const be = [
899
903
  "Noto Sans Mono",
900
904
  "Source Code Pro",
901
905
  "Ubuntu Mono"
902
- ], Ke = [
903
- ...be,
906
+ ], ct = [
907
+ ...ve,
904
908
  "Arial",
905
909
  "Arial Narrow",
906
910
  "Calibri",
@@ -921,709 +925,1218 @@ const be = [
921
925
  "Trebuchet MS",
922
926
  "Verdana"
923
927
  ];
924
- function We(t) {
928
+ function it(e) {
925
929
  try {
926
- const e = document.createElement("canvas").getContext("2d");
927
- if (!e) return !1;
928
- e.font = `16px "${t}"`;
929
- const o = e.measureText("i").width, r = e.measureText("W").width;
930
+ const n = document.createElement("canvas").getContext("2d");
931
+ if (!n) return !1;
932
+ n.font = `16px "${e}"`;
933
+ const o = n.measureText("i").width, r = n.measureText("W").width;
930
934
  return Math.abs(o - r) < 0.5;
931
935
  } catch {
932
936
  return !1;
933
937
  }
934
938
  }
935
- function Be(t) {
936
- const [n, e] = P([]);
937
- return R(() => {
939
+ function at(e) {
940
+ const [t, n] = T([]);
941
+ return z(() => {
938
942
  let o = !1;
939
943
  async function r() {
940
- var h;
941
- let c = [];
944
+ var a;
945
+ let i = [];
942
946
  if ("queryLocalFonts" in window)
943
947
  try {
944
- const u = await ((h = window.queryLocalFonts) == null ? void 0 : h.call(window));
945
- o || (c = (u ?? []).map((l) => l.family).filter((l, i, k) => k.indexOf(l) === i));
948
+ const l = await ((a = window.queryLocalFonts) == null ? void 0 : a.call(window));
949
+ o || (i = (l ?? []).map((d) => d.family).filter((d, h, x) => x.indexOf(d) === h));
946
950
  } catch {
947
951
  }
948
- c.length === 0 && (c = t ? be : Ke);
949
- const s = t ? c.filter((u) => We(u)) : c;
950
- o || e(s.sort((u, l) => u.localeCompare(l)));
952
+ i.length === 0 && (i = e ? ve : ct);
953
+ const s = e ? i.filter((l) => it(l)) : i;
954
+ o || n(s.sort((l, d) => l.localeCompare(d)));
951
955
  }
952
956
  return r(), () => {
953
957
  o = !0;
954
958
  };
955
- }, [t]), n;
959
+ }, [e]), t;
956
960
  }
957
- function $t({ value: t, onChange: n, monoOnly: e = !0 }) {
958
- const { t: o } = j(), r = Be(e), c = z(() => e ? r.map((s) => ({ value: s, label: s })) : [
961
+ function en({ value: e, onChange: t, monoOnly: n = !0 }) {
962
+ const { t: o } = U(), r = at(n), i = j(() => n ? r.map((s) => ({ value: s, label: s })) : [
959
963
  { value: "", label: o("跟随主题") },
960
964
  { value: "__none__", label: o("系统字体") },
961
965
  ...r.map((s) => ({ value: s, label: s }))
962
- ], [e, r, o]);
963
- return /* @__PURE__ */ d(
964
- ge,
966
+ ], [n, r, o]);
967
+ return /* @__PURE__ */ u(
968
+ be,
965
969
  {
966
- value: t,
967
- options: c,
968
- onChange: n,
969
- placeholder: o(e ? "选择等宽字体…" : "跟随主题")
970
+ value: e,
971
+ options: i,
972
+ onChange: t,
973
+ placeholder: o(n ? "选择等宽字体…" : "跟随主题")
970
974
  }
971
975
  );
972
976
  }
973
- function Dt({ label: t, children: n }) {
974
- return /* @__PURE__ */ F("div", { className: "form-row", children: [
975
- /* @__PURE__ */ d("label", { children: t }),
976
- n
977
+ function tn({ label: e, children: t }) {
978
+ return /* @__PURE__ */ P("div", { className: "form-row", children: [
979
+ /* @__PURE__ */ u("label", { children: e }),
980
+ t
977
981
  ] });
978
982
  }
979
- function St({ value: t, onChange: n, min: e, max: o, step: r = 1, unit: c, style: s }) {
980
- const { t: h } = j(), u = B(
981
- (m) => {
982
- let a = m;
983
- return e !== void 0 && (a = Math.max(e, a)), o !== void 0 && (a = Math.min(o, a)), a;
983
+ function nn({ value: e, onChange: t, min: n, max: o, step: r = 1, unit: i, style: s }) {
984
+ const { t: a } = U(), l = W(
985
+ (f) => {
986
+ let c = f;
987
+ return n !== void 0 && (c = Math.max(n, c)), o !== void 0 && (c = Math.min(o, c)), c;
984
988
  },
985
- [e, o]
986
- ), l = () => n(u(t - r)), i = () => n(u(t + r)), k = e !== void 0 && t <= e, v = o !== void 0 && t >= o;
987
- return /* @__PURE__ */ F("div", { className: "number-input", style: s, children: [
988
- /* @__PURE__ */ d(
989
+ [n, o]
990
+ ), d = () => t(l(e - r)), h = () => t(l(e + r)), x = n !== void 0 && e <= n, p = o !== void 0 && e >= o;
991
+ return /* @__PURE__ */ P("div", { className: "number-input", style: s, children: [
992
+ /* @__PURE__ */ u(
989
993
  "button",
990
994
  {
991
995
  className: "number-input-btn",
992
- onClick: l,
993
- disabled: k,
996
+ onClick: d,
997
+ disabled: x,
994
998
  tabIndex: -1,
995
- "aria-label": h("减少"),
999
+ "aria-label": a("减少"),
996
1000
  children: "−"
997
1001
  }
998
1002
  ),
999
- /* @__PURE__ */ d(
1003
+ /* @__PURE__ */ u(
1000
1004
  "input",
1001
1005
  {
1002
1006
  className: "input number-input-field",
1003
1007
  type: "text",
1004
- value: t,
1005
- onChange: (m) => {
1006
- const a = Number(m.target.value);
1007
- isNaN(a) || n(u(a));
1008
+ value: e,
1009
+ onChange: (f) => {
1010
+ const c = Number(f.target.value);
1011
+ isNaN(c) || t(l(c));
1008
1012
  },
1009
1013
  style: { width: 56, textAlign: "center" }
1010
1014
  }
1011
1015
  ),
1012
- c ? /* @__PURE__ */ d("span", { className: "number-input-unit", children: c }) : null,
1013
- /* @__PURE__ */ d(
1016
+ i ? /* @__PURE__ */ u("span", { className: "number-input-unit", children: i }) : null,
1017
+ /* @__PURE__ */ u(
1014
1018
  "button",
1015
1019
  {
1016
1020
  className: "number-input-btn",
1017
- onClick: i,
1018
- disabled: v,
1021
+ onClick: h,
1022
+ disabled: p,
1019
1023
  tabIndex: -1,
1020
- "aria-label": h("增加"),
1024
+ "aria-label": a("增加"),
1021
1025
  children: "+"
1022
1026
  }
1023
1027
  )
1024
1028
  ] });
1025
1029
  }
1026
- function Rt({ options: t, value: n, onChange: e, ariaLabel: o }) {
1027
- const r = H([]), c = (s, h) => {
1028
- var i;
1030
+ function on({ options: e, value: t, onChange: n, ariaLabel: o }) {
1031
+ const r = F([]), i = (s, a) => {
1032
+ var h;
1029
1033
  if (!["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"].includes(s.key)) return;
1030
1034
  s.preventDefault();
1031
- const u = s.key === "ArrowRight" || s.key === "ArrowDown" ? 1 : -1, l = (h + u + t.length) % t.length;
1032
- (i = r.current[l]) == null || i.focus(), e(t[l].value);
1035
+ const l = s.key === "ArrowRight" || s.key === "ArrowDown" ? 1 : -1, d = (a + l + e.length) % e.length;
1036
+ (h = r.current[d]) == null || h.focus(), n(e[d].value);
1033
1037
  };
1034
- return /* @__PURE__ */ d("div", { className: "segmented-radio", role: "radiogroup", "aria-label": o, children: t.map((s, h) => {
1035
- const u = n === s.value;
1036
- return /* @__PURE__ */ F(
1038
+ return /* @__PURE__ */ u("div", { className: "segmented-radio", role: "radiogroup", "aria-label": o, children: e.map((s, a) => {
1039
+ const l = t === s.value;
1040
+ return /* @__PURE__ */ P(
1037
1041
  "button",
1038
1042
  {
1039
1043
  type: "button",
1040
- ref: (l) => {
1041
- r.current[h] = l;
1044
+ ref: (d) => {
1045
+ r.current[a] = d;
1042
1046
  },
1043
1047
  role: "radio",
1044
- "aria-checked": u,
1045
- tabIndex: u ? 0 : -1,
1046
- className: `segmented-radio__option${u ? " is-selected" : ""}`,
1048
+ "aria-checked": l,
1049
+ tabIndex: l ? 0 : -1,
1050
+ className: `segmented-radio__option${l ? " is-selected" : ""}`,
1047
1051
  title: s.title ?? s.label,
1048
- onClick: () => e(s.value),
1049
- onKeyDown: (l) => c(l, h),
1052
+ onClick: () => n(s.value),
1053
+ onKeyDown: (d) => i(d, a),
1050
1054
  children: [
1051
1055
  s.preview,
1052
- /* @__PURE__ */ d("span", { className: "segmented-radio__label", children: s.label })
1056
+ /* @__PURE__ */ u("span", { className: "segmented-radio__label", children: s.label })
1053
1057
  ]
1054
1058
  },
1055
1059
  s.value
1056
1060
  );
1057
1061
  }) });
1058
1062
  }
1059
- function Tt({ value: t, onChange: n, min: e = 0, max: o = 100, step: r = 1, ariaLabel: c, disabled: s, style: h }) {
1060
- const u = (i) => Math.min(o, Math.max(e, i)), l = o > e ? (u(t) - e) / (o - e) * 100 : 0;
1061
- return /* @__PURE__ */ d(
1063
+ function rn({ value: e, onChange: t, min: n = 0, max: o = 100, step: r = 1, ariaLabel: i, disabled: s, style: a }) {
1064
+ const l = (h) => Math.min(o, Math.max(n, h)), d = o > n ? (l(e) - n) / (o - n) * 100 : 0;
1065
+ return /* @__PURE__ */ u(
1062
1066
  "input",
1063
1067
  {
1064
1068
  type: "range",
1065
1069
  className: "slider",
1066
- value: u(t),
1067
- min: e,
1070
+ value: l(e),
1071
+ min: n,
1068
1072
  max: o,
1069
1073
  step: r,
1070
1074
  disabled: s,
1071
- "aria-label": c,
1072
- onChange: (i) => n(Number(i.target.value)),
1073
- style: { ...h, "--slider-pct": `${l}%` }
1075
+ "aria-label": i,
1076
+ onChange: (h) => t(Number(h.target.value)),
1077
+ style: { ...a, "--slider-pct": `${d}%` }
1074
1078
  }
1075
1079
  );
1076
1080
  }
1077
- const Oe = 6, Ve = "color-mix(in srgb, var(--text-secondary) 45%, transparent)";
1078
- function Pt({ value: t, onChange: n }) {
1079
- const { t: e } = j(), [o, r] = P([]), [c, s] = P(0), h = H([]), u = B((i) => {
1080
- var v, m;
1081
- const k = (m = (v = window.linkdesk) == null ? void 0 : v.theme) == null ? void 0 : m.listRecipes;
1082
- k && k().then((a) => {
1083
- i && !i() || r(a ?? []);
1081
+ function sn({
1082
+ value: e,
1083
+ onChange: t,
1084
+ locked: n = [],
1085
+ lockedBadge: o,
1086
+ placeholder: r,
1087
+ addLabel: i,
1088
+ removeTitle: s,
1089
+ urlOnly: a,
1090
+ emptyMessage: l,
1091
+ badUrlMessage: d,
1092
+ duplicateMessage: h,
1093
+ itemKey: x,
1094
+ hint: p
1095
+ }) {
1096
+ const [f, c] = T(""), [y, _] = T(null), E = () => _(null), C = (w) => {
1097
+ const $ = (M) => {
1098
+ if (!x) return M === w;
1099
+ const b = x(w);
1100
+ return b === null ? M === w : x(M) === b;
1101
+ };
1102
+ return n.some($) || e.some($);
1103
+ }, I = () => {
1104
+ const w = f.trim();
1105
+ if (!w) {
1106
+ l && _(l);
1107
+ return;
1108
+ }
1109
+ if (a && !/^https?:\/\/.+/.test(w)) {
1110
+ d && _(d);
1111
+ return;
1112
+ }
1113
+ if (C(w)) {
1114
+ h && _(h);
1115
+ return;
1116
+ }
1117
+ t([...e, w]), c(""), E();
1118
+ };
1119
+ return /* @__PURE__ */ P("div", { className: "sle", children: [
1120
+ n.map((w) => /* @__PURE__ */ P("div", { className: "sle-row sle-row--locked", title: w, children: [
1121
+ a && /* @__PURE__ */ u("span", { className: "codicon codicon-link sle-glyph", "aria-hidden": "true" }),
1122
+ /* @__PURE__ */ u("span", { className: "sle-url", children: w }),
1123
+ o && /* @__PURE__ */ u("span", { className: "sle-badge", children: o }),
1124
+ /* @__PURE__ */ u("span", { className: "codicon codicon-lock sle-lock", "aria-hidden": "true" })
1125
+ ] }, w)),
1126
+ e.map((w) => /* @__PURE__ */ P("div", { className: "sle-row", title: w, children: [
1127
+ a && /* @__PURE__ */ u("span", { className: "codicon codicon-link sle-glyph", "aria-hidden": "true" }),
1128
+ /* @__PURE__ */ u("span", { className: "sle-url", children: w }),
1129
+ /* @__PURE__ */ u(
1130
+ "button",
1131
+ {
1132
+ className: "sle-del",
1133
+ title: s,
1134
+ "aria-label": s,
1135
+ onClick: () => t(e.filter(($) => $ !== w)),
1136
+ children: /* @__PURE__ */ u("span", { className: "codicon codicon-trash", "aria-hidden": "true" })
1137
+ }
1138
+ )
1139
+ ] }, w)),
1140
+ /* @__PURE__ */ P("div", { className: "sle-add-row", children: [
1141
+ /* @__PURE__ */ u(
1142
+ "input",
1143
+ {
1144
+ className: "sle-input",
1145
+ type: "text",
1146
+ value: f,
1147
+ placeholder: r,
1148
+ spellCheck: !1,
1149
+ onChange: (w) => {
1150
+ c(w.target.value), E();
1151
+ },
1152
+ onKeyDown: (w) => {
1153
+ w.key === "Enter" && I();
1154
+ }
1155
+ }
1156
+ ),
1157
+ /* @__PURE__ */ u("button", { className: "sle-add-btn", type: "button", onClick: I, children: i })
1158
+ ] }),
1159
+ y && /* @__PURE__ */ u("span", { className: "sle-msg sle-msg--error", children: y }),
1160
+ !y && p && /* @__PURE__ */ u("div", { className: "sle-msg sle-msg--hint", children: p })
1161
+ ] });
1162
+ }
1163
+ const lt = 6, ut = "color-mix(in srgb, var(--text-secondary) 45%, transparent)";
1164
+ function cn({ value: e, onChange: t }) {
1165
+ const { t: n } = U(), [o, r] = T([]), [i, s] = T(0), a = F([]), l = W((h) => {
1166
+ var p, f;
1167
+ const x = (f = (p = window.linkdesk) == null ? void 0 : p.theme) == null ? void 0 : f.listRecipes;
1168
+ x && x().then((c) => {
1169
+ h && !h() || r(c ?? []);
1084
1170
  }).catch(() => {
1085
1171
  });
1086
1172
  }, []);
1087
- R(() => {
1088
- var m, a, x;
1089
- let i = !1;
1090
- u(() => !i);
1091
- const v = (x = (a = (m = window.linkdesk) == null ? void 0 : m.configuration) == null ? void 0 : a.onPluginLifecycleChange) == null ? void 0 : x.call(a, () => {
1092
- u();
1173
+ z(() => {
1174
+ var f, c, y;
1175
+ let h = !1;
1176
+ l(() => !h);
1177
+ const p = (y = (c = (f = window.linkdesk) == null ? void 0 : f.configuration) == null ? void 0 : c.onPluginLifecycleChange) == null ? void 0 : y.call(c, () => {
1178
+ l();
1093
1179
  });
1094
1180
  return () => {
1095
- i = !0, v == null || v();
1181
+ h = !0, p == null || p();
1096
1182
  };
1097
- }, [u]);
1098
- const l = (i) => {
1099
- var m;
1100
- const k = o.length;
1101
- if (k === 0) return;
1102
- let v = c;
1103
- switch (i.key) {
1183
+ }, [l]);
1184
+ const d = (h) => {
1185
+ var f;
1186
+ const x = o.length;
1187
+ if (x === 0) return;
1188
+ let p = i;
1189
+ switch (h.key) {
1104
1190
  case "ArrowRight":
1105
1191
  case "ArrowDown":
1106
- v = Math.min(c + 1, k - 1);
1192
+ p = Math.min(i + 1, x - 1);
1107
1193
  break;
1108
1194
  case "ArrowLeft":
1109
1195
  case "ArrowUp":
1110
- v = Math.max(c - 1, 0);
1196
+ p = Math.max(i - 1, 0);
1111
1197
  break;
1112
1198
  case "Home":
1113
- v = 0;
1199
+ p = 0;
1114
1200
  break;
1115
1201
  case "End":
1116
- v = k - 1;
1202
+ p = x - 1;
1117
1203
  break;
1118
1204
  default:
1119
1205
  return;
1120
1206
  }
1121
- i.preventDefault(), s(v), (m = h.current[v]) == null || m.focus();
1207
+ h.preventDefault(), s(p), (f = a.current[p]) == null || f.focus();
1122
1208
  };
1123
- return o.length === 0 ? /* @__PURE__ */ d("span", { className: "theme-picker-empty", children: e("无可用主题配方") }) : /* @__PURE__ */ d(
1209
+ return o.length === 0 ? /* @__PURE__ */ u("span", { className: "theme-picker-empty", children: n("无可用主题配方") }) : /* @__PURE__ */ u(
1124
1210
  "div",
1125
1211
  {
1126
1212
  className: "theme-picker",
1127
1213
  role: "group",
1128
- "aria-label": e("主题配方"),
1129
- onKeyDown: l,
1130
- children: o.map((i, k) => {
1131
- var D, $;
1132
- const v = i.colorways.length <= 1, m = (D = i.colorways[0]) == null ? void 0 : D.preview, a = (m == null ? void 0 : m.accent) || Ve, x = i.id === t;
1133
- return /* @__PURE__ */ F(
1214
+ "aria-label": n("主题配方"),
1215
+ onKeyDown: d,
1216
+ children: o.map((h, x) => {
1217
+ var _, E;
1218
+ const p = h.colorways.length <= 1, f = (_ = h.colorways[0]) == null ? void 0 : _.preview, c = (f == null ? void 0 : f.accent) || ut, y = h.id === e;
1219
+ return /* @__PURE__ */ P(
1134
1220
  "button",
1135
1221
  {
1136
- ref: (A) => {
1137
- h.current[k] = A;
1222
+ ref: (C) => {
1223
+ a.current[x] = C;
1138
1224
  },
1139
1225
  type: "button",
1140
- className: `theme-card${x ? " active" : ""}`,
1141
- tabIndex: c === k ? 0 : -1,
1142
- "aria-label": i.name,
1143
- "aria-pressed": x,
1144
- onClick: () => n(i.id),
1145
- onFocus: () => s(k),
1226
+ className: `theme-card${y ? " active" : ""}`,
1227
+ tabIndex: i === x ? 0 : -1,
1228
+ "aria-label": h.name,
1229
+ "aria-pressed": y,
1230
+ onClick: () => t(h.id),
1231
+ onFocus: () => s(x),
1146
1232
  children: [
1147
- /* @__PURE__ */ d("div", { className: "theme-preview", style: m != null && m.bgWindow ? { background: m.bgWindow } : void 0, children: v ? (
1233
+ /* @__PURE__ */ u("div", { className: "theme-preview", style: f != null && f.bgWindow ? { background: f.bgWindow } : void 0, children: p ? (
1148
1234
  // 单配色配方——3 条强调色预览条(mockup .pv-bar)
1149
- /* @__PURE__ */ F(xe, { children: [
1150
- /* @__PURE__ */ d("span", { className: "pv-bar", style: { background: a } }),
1151
- /* @__PURE__ */ d("span", { className: "pv-bar", style: { background: a } }),
1152
- /* @__PURE__ */ d("span", { className: "pv-bar", style: { background: a } })
1235
+ /* @__PURE__ */ P(Ve, { children: [
1236
+ /* @__PURE__ */ u("span", { className: "pv-bar", style: { background: c } }),
1237
+ /* @__PURE__ */ u("span", { className: "pv-bar", style: { background: c } }),
1238
+ /* @__PURE__ */ u("span", { className: "pv-bar", style: { background: c } })
1153
1239
  ] })
1154
1240
  ) : (
1155
1241
  // 多配色配方——配色圆点色板(mockup .pv-dot)
1156
- /* @__PURE__ */ d("span", { className: "pv-dots", children: i.colorways.slice(0, Oe).map((A) => {
1157
- var _;
1158
- return /* @__PURE__ */ d(
1242
+ /* @__PURE__ */ u("span", { className: "pv-dots", children: h.colorways.slice(0, lt).map((C) => {
1243
+ var I;
1244
+ return /* @__PURE__ */ u(
1159
1245
  "span",
1160
1246
  {
1161
1247
  className: "pv-dot",
1162
- style: (_ = A.preview) != null && _.accent ? { background: A.preview.accent } : void 0
1248
+ style: (I = C.preview) != null && I.accent ? { background: C.preview.accent } : void 0
1163
1249
  },
1164
- A.id
1250
+ C.id
1165
1251
  );
1166
1252
  }) })
1167
1253
  ) }),
1168
- /* @__PURE__ */ F("div", { className: "tname", children: [
1169
- /* @__PURE__ */ d("span", { className: "tname-name", children: i.name }),
1170
- /* @__PURE__ */ d("span", { className: "badge", children: v ? (($ = i.colorways[0]) == null ? void 0 : $.name) ?? "" : e("{{count}} 配色", { count: i.colorways.length }) })
1254
+ /* @__PURE__ */ P("div", { className: "tname", children: [
1255
+ /* @__PURE__ */ u("span", { className: "tname-name", children: h.name }),
1256
+ /* @__PURE__ */ u("span", { className: "badge", children: p ? ((E = h.colorways[0]) == null ? void 0 : E.name) ?? "" : n("{{count}} 配色", { count: h.colorways.length }) })
1171
1257
  ] })
1172
1258
  ]
1173
1259
  },
1174
- i.id
1260
+ h.id
1175
1261
  );
1176
1262
  })
1177
1263
  }
1178
1264
  );
1179
1265
  }
1180
- function Ft({ checked: t, onChange: n, disabled: e }) {
1181
- return /* @__PURE__ */ d(
1266
+ function an({ checked: e, onChange: t, disabled: n }) {
1267
+ return /* @__PURE__ */ u(
1182
1268
  "div",
1183
1269
  {
1184
- className: `toggle${t ? " on" : ""}${e ? " disabled" : ""}`,
1270
+ className: `toggle${e ? " on" : ""}${n ? " disabled" : ""}`,
1185
1271
  onClick: () => {
1186
- e || n(!t);
1272
+ n || t(!e);
1187
1273
  },
1188
1274
  role: "switch",
1189
- "aria-checked": t
1275
+ "aria-checked": e
1190
1276
  }
1191
1277
  );
1192
1278
  }
1193
- function G() {
1279
+ function Z() {
1194
1280
  return window.linkdesk;
1195
1281
  }
1196
- const Ht = se(function({
1197
- size: n,
1198
- value: e,
1282
+ const ln = ie(function({
1283
+ size: t,
1284
+ value: n,
1199
1285
  onConfirm: o,
1200
1286
  onCancel: r,
1201
- onChange: c,
1287
+ onChange: i,
1202
1288
  selectMode: s = "all",
1203
- width: h,
1204
- autoFocus: u,
1205
- placeholder: l,
1206
- type: i = "text",
1207
- min: k,
1208
- max: v
1209
- }, m) {
1210
- const a = H(null), [x, D] = P(e), [$, A] = P(!0);
1211
- Me(m, () => ({
1212
- getValue: () => x
1213
- }), [x]), R(() => {
1214
- if (!u || !a.current) return;
1215
- a.current.focus(), requestAnimationFrame(() => {
1216
- if (a.current)
1289
+ width: a,
1290
+ autoFocus: l,
1291
+ placeholder: d,
1292
+ type: h = "text",
1293
+ min: x,
1294
+ max: p
1295
+ }, f) {
1296
+ const c = F(null), [y, _] = T(n), [E, C] = T(!0);
1297
+ je(f, () => ({
1298
+ getValue: () => y
1299
+ }), [y]), z(() => {
1300
+ if (!l || !c.current) return;
1301
+ c.current.focus(), requestAnimationFrame(() => {
1302
+ if (c.current)
1217
1303
  if (s === "nameOnly") {
1218
- const g = e.lastIndexOf(".");
1219
- g > 0 ? a.current.setSelectionRange(0, g) : a.current.select();
1304
+ const b = n.lastIndexOf(".");
1305
+ b > 0 ? c.current.setSelectionRange(0, b) : c.current.select();
1220
1306
  } else
1221
- a.current.select();
1307
+ c.current.select();
1222
1308
  });
1223
- }, [u]), R(() => {
1224
- var M, g;
1225
- if (!$) {
1226
- (g = (M = G().contextKey) == null ? void 0 : M.set) == null || g.call(M, "inputFocus", !1);
1227
- const b = requestAnimationFrame(() => {
1228
- var f, p;
1229
- (p = (f = G().keybindings) == null ? void 0 : f.setKeybindingCaptureActive) == null || p.call(f, !1);
1309
+ }, [l]), z(() => {
1310
+ var M, b;
1311
+ if (!E) {
1312
+ (b = (M = Z().contextKey) == null ? void 0 : M.set) == null || b.call(M, "inputFocus", !1);
1313
+ const N = requestAnimationFrame(() => {
1314
+ var m, k;
1315
+ (k = (m = Z().keybindings) == null ? void 0 : m.setKeybindingCaptureActive) == null || k.call(m, !1);
1230
1316
  });
1231
- return () => cancelAnimationFrame(b);
1317
+ return () => cancelAnimationFrame(N);
1232
1318
  }
1233
- }, [$]), R(() => () => {
1234
- var M, g, b, f;
1235
- (g = (M = G().contextKey) == null ? void 0 : M.set) == null || g.call(M, "inputFocus", !1), (f = (b = G().keybindings) == null ? void 0 : b.setKeybindingCaptureActive) == null || f.call(b, !1);
1319
+ }, [E]), z(() => () => {
1320
+ var M, b, N, m;
1321
+ (b = (M = Z().contextKey) == null ? void 0 : M.set) == null || b.call(M, "inputFocus", !1), (m = (N = Z().keybindings) == null ? void 0 : N.setKeybindingCaptureActive) == null || m.call(N, !1);
1236
1322
  }, []);
1237
- const _ = (M) => {
1238
- M.key === "Enter" ? (M.preventDefault(), A(!1), o(x)) : M.key === "Escape" && (M.preventDefault(), A(!1), r()), M.stopPropagation();
1239
- }, I = () => {
1240
- $ && (A(!1), o(x));
1241
- }, S = () => {
1242
- var M, g, b, f;
1243
- (g = (M = G().contextKey) == null ? void 0 : M.set) == null || g.call(M, "inputFocus", !0), (f = (b = G().keybindings) == null ? void 0 : b.setKeybindingCaptureActive) == null || f.call(b, !0);
1323
+ const I = (M) => {
1324
+ M.key === "Enter" ? (M.preventDefault(), C(!1), o(y)) : M.key === "Escape" && (M.preventDefault(), C(!1), r()), M.stopPropagation();
1325
+ }, w = () => {
1326
+ E && (C(!1), o(y));
1327
+ }, $ = () => {
1328
+ var M, b, N, m;
1329
+ (b = (M = Z().contextKey) == null ? void 0 : M.set) == null || b.call(M, "inputFocus", !0), (m = (N = Z().keybindings) == null ? void 0 : N.setKeybindingCaptureActive) == null || m.call(N, !0);
1244
1330
  };
1245
- return /* @__PURE__ */ d(
1331
+ return /* @__PURE__ */ u(
1246
1332
  "input",
1247
1333
  {
1248
- ref: a,
1249
- className: `inline-input inline-input--${n}`,
1250
- type: i,
1251
- value: x,
1334
+ ref: c,
1335
+ className: `inline-input inline-input--${t}`,
1336
+ type: h,
1337
+ value: y,
1252
1338
  onChange: (M) => {
1253
- const g = i === "number" ? M.target.value.replace(/\D/g, "") : M.target.value;
1254
- D(g), c == null || c(g);
1339
+ const b = h === "number" ? M.target.value.replace(/\D/g, "") : M.target.value;
1340
+ _(b), i == null || i(b);
1255
1341
  },
1256
- onKeyDown: _,
1257
- onBlur: I,
1258
- onFocus: S,
1342
+ onKeyDown: I,
1343
+ onBlur: w,
1344
+ onFocus: $,
1259
1345
  onDragStart: (M) => M.preventDefault(),
1260
- placeholder: l,
1261
- min: k,
1262
- max: v,
1263
- style: h ? { width: h } : void 0,
1346
+ placeholder: d,
1347
+ min: x,
1348
+ max: p,
1349
+ style: a ? { width: a } : void 0,
1264
1350
  autoComplete: "off",
1265
1351
  spellCheck: !1
1266
1352
  }
1267
1353
  );
1268
1354
  });
1269
- function ze(t, n) {
1270
- const e = n.icon, o = n.iconSource;
1271
- if (o === "lucide" && e)
1272
- return { lucide: e };
1273
- if (o === "codicon" && e)
1274
- return { codicon: `codicon-${e}` };
1275
- if (e && (o === "svg" || o === "url"))
1276
- return { src: e };
1277
- if (e) {
1278
- if (e.includes("/") || e.includes(".")) {
1279
- const r = e.includes(".") ? e : `${e}.png`;
1280
- return { src: `linkdesk://${t}/${r}` };
1355
+ function dt(e, t) {
1356
+ const n = t.icon, o = t.iconSource;
1357
+ if (o === "lucide" && n)
1358
+ return { lucide: n };
1359
+ if (o === "codicon" && n)
1360
+ return { codicon: `codicon-${n}` };
1361
+ if (n && (o === "svg" || o === "url"))
1362
+ return { src: n };
1363
+ if (n) {
1364
+ if (n.includes("/") || n.includes(".")) {
1365
+ const r = n.includes(".") ? n : `${n}.png`;
1366
+ return { src: `linkdesk://${e}/${r}` };
1281
1367
  }
1282
- return { codicon: `codicon-${e}` };
1368
+ return { codicon: `codicon-${n}` };
1283
1369
  }
1284
1370
  return { emoji: "📄" };
1285
1371
  }
1286
1372
  /**
1287
- * @license lucide-react v1.29.0 - ISC
1373
+ * @license lucide-react v1.42.0 - ISC
1288
1374
  *
1289
1375
  * This source code is licensed under the ISC license.
1290
1376
  * See the LICENSE file in the root directory of this source tree.
1291
1377
  */
1292
- const ke = (...t) => t.filter((n, e, o) => !!n && n.trim() !== "" && o.indexOf(n) === e).join(" ").trim();
1378
+ const ht = (e) => e == null ? void 0 : e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1293
1379
  /**
1294
- * @license lucide-react v1.29.0 - ISC
1380
+ * @license lucide-react v1.42.0 - ISC
1295
1381
  *
1296
1382
  * This source code is licensed under the ISC license.
1297
1383
  * See the LICENSE file in the root directory of this source tree.
1298
1384
  */
1299
- const Ue = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
1385
+ function ft(e, t, n = []) {
1386
+ if (t == null)
1387
+ throw new Error("[lucide]: iconNode is required when icon name is used");
1388
+ return {
1389
+ name: ht(e),
1390
+ size: 24,
1391
+ node: t,
1392
+ ...n.length > 0 ? { aliases: n } : {}
1393
+ };
1394
+ }
1300
1395
  /**
1301
- * @license lucide-react v1.29.0 - ISC
1396
+ * @license lucide-react v1.42.0 - ISC
1302
1397
  *
1303
1398
  * This source code is licensed under the ISC license.
1304
1399
  * See the LICENSE file in the root directory of this source tree.
1305
1400
  */
1306
- const je = (t) => t.replace(
1307
- /^([A-Z])|[\s-_]+(\w)/g,
1308
- (n, e, o) => o ? o.toUpperCase() : e.toLowerCase()
1309
- );
1401
+ const mt = (e) => {
1402
+ let t = "", n = !1;
1403
+ for (const o of e) {
1404
+ if (o === "-" || o === "_" || o <= " ") {
1405
+ n = t.length > 0;
1406
+ continue;
1407
+ }
1408
+ t.length === 0 ? t += o.toLowerCase() : t += n ? o.toUpperCase() : o, n = !1;
1409
+ }
1410
+ return t;
1411
+ };
1310
1412
  /**
1311
- * @license lucide-react v1.29.0 - ISC
1413
+ * @license lucide-react v1.42.0 - ISC
1312
1414
  *
1313
1415
  * This source code is licensed under the ISC license.
1314
1416
  * See the LICENSE file in the root directory of this source tree.
1315
1417
  */
1316
- const me = (t) => {
1317
- const n = je(t);
1318
- return n.charAt(0).toUpperCase() + n.slice(1);
1418
+ const pt = (e) => {
1419
+ const t = mt(e);
1420
+ return t.charAt(0).toUpperCase() + t.slice(1);
1319
1421
  };
1320
1422
  /**
1321
- * @license lucide-react v1.29.0 - ISC
1423
+ * @license lucide-react v1.42.0 - ISC
1424
+ *
1425
+ * This source code is licensed under the ISC license.
1426
+ * See the LICENSE file in the root directory of this source tree.
1427
+ */
1428
+ const se = (...e) => e.filter((t, n, o) => !!t && t.trim() !== "" && o.indexOf(t) === n).join(" ").trim();
1429
+ /**
1430
+ * @license lucide-react v1.42.0 - ISC
1322
1431
  *
1323
1432
  * This source code is licensed under the ISC license.
1324
1433
  * See the LICENSE file in the root directory of this source tree.
1325
1434
  */
1326
- var ne = {
1435
+ const q = {
1327
1436
  xmlns: "http://www.w3.org/2000/svg",
1328
1437
  width: 24,
1329
1438
  height: 24,
1330
1439
  viewBox: "0 0 24 24",
1331
1440
  fill: "none",
1332
1441
  stroke: "currentColor",
1333
- strokeWidth: 2,
1334
- strokeLinecap: "round",
1335
- strokeLinejoin: "round"
1442
+ "stroke-width": 2,
1443
+ "stroke-linecap": "round",
1444
+ "stroke-linejoin": "round"
1336
1445
  };
1337
1446
  /**
1338
- * @license lucide-react v1.29.0 - ISC
1447
+ * @license lucide-react v1.42.0 - ISC
1339
1448
  *
1340
1449
  * This source code is licensed under the ISC license.
1341
1450
  * See the LICENSE file in the root directory of this source tree.
1342
1451
  */
1343
- const qe = (t) => {
1344
- for (const n in t)
1345
- if (n.startsWith("aria-") || n === "role" || n === "title")
1452
+ function oe(e) {
1453
+ return e != null;
1454
+ }
1455
+ function wt(e, t = {}) {
1456
+ var p, f;
1457
+ const n = t.attributeNames ?? {}, o = (c) => n[c] ?? c, r = e.size ?? e.width ?? q.width, i = e.size ?? e.height ?? q.height, s = ((p = e.aliases) == null ? void 0 : p.filter((c) => typeof c == "string" && c.trim() !== "").map((c) => `lucide-${c}`)) ?? [], a = [...e.name ? [`lucide-${e.name}`] : [], ...s], l = ((f = t.className) == null ? void 0 : f.split(" ").filter(Boolean)) ?? [], d = t.includeDefaultClasses === !1 ? se(...l) : se("lucide", ...a, ...l), h = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? q["stroke-width"]) * Number(e.size ?? e.width ?? q.width) / Number(t.size ?? t.width ?? q.width) : t.strokeWidth ?? q["stroke-width"];
1458
+ return [
1459
+ "svg",
1460
+ {
1461
+ ...Object.entries(q).reduce((c, [y, _]) => (c[o(y)] = _, c), {}),
1462
+ ..."color" in t && t.color && {
1463
+ [o("stroke")]: t.color
1464
+ },
1465
+ ..."size" in t && oe(t.size) && {
1466
+ [o("width")]: t.size,
1467
+ [o("height")]: t.size
1468
+ },
1469
+ ..."width" in t && oe(t.width) && {
1470
+ [o("width")]: t.width
1471
+ },
1472
+ ..."height" in t && oe(t.height) && {
1473
+ [o("height")]: t.height
1474
+ },
1475
+ [o("stroke-width")]: h,
1476
+ ...d && {
1477
+ [o("class")]: d
1478
+ },
1479
+ [o("viewBox")]: `0 0 ${r} ${i}`,
1480
+ ...t.hasA11yProp === !1 ? {
1481
+ [o("aria-hidden")]: "true"
1482
+ } : {},
1483
+ ..."attributes" in t && t.attributes
1484
+ },
1485
+ e.node.map((c) => {
1486
+ const [y, _, E] = c, C = t.nonScalingStroke ? { [o("vector-effect")]: "non-scaling-stroke", ..._ } : _;
1487
+ return E ? [y, C, E] : [y, C];
1488
+ })
1489
+ ];
1490
+ }
1491
+ /**
1492
+ * @license lucide-react v1.42.0 - ISC
1493
+ *
1494
+ * This source code is licensed under the ISC license.
1495
+ * See the LICENSE file in the root directory of this source tree.
1496
+ */
1497
+ function yt(e, t = {}) {
1498
+ return wt(e, {
1499
+ ...t,
1500
+ attributeNames: {
1501
+ ...t.attributeNames,
1502
+ class: "className",
1503
+ "stroke-width": "strokeWidth",
1504
+ "stroke-linecap": "strokeLinecap",
1505
+ "stroke-linejoin": "strokeLinejoin",
1506
+ "vector-effect": "vectorEffect"
1507
+ }
1508
+ });
1509
+ }
1510
+ /**
1511
+ * @license lucide-react v1.42.0 - ISC
1512
+ *
1513
+ * This source code is licensed under the ISC license.
1514
+ * See the LICENSE file in the root directory of this source tree.
1515
+ */
1516
+ const kt = (e) => {
1517
+ for (const t in e)
1518
+ if (t.startsWith("aria-") || t === "role" || t === "title")
1346
1519
  return !0;
1347
1520
  return !1;
1348
- }, Ge = Ee({}), Ze = () => Ne(Ge), Xe = se(
1349
- ({ color: t, size: n, strokeWidth: e, absoluteStrokeWidth: o, className: r = "", children: c, iconNode: s, ...h }, u) => {
1521
+ }, gt = qe({}), bt = () => Oe(gt), vt = ie(
1522
+ ({
1523
+ color: e,
1524
+ size: t,
1525
+ width: n,
1526
+ height: o,
1527
+ strokeWidth: r,
1528
+ absoluteStrokeWidth: i,
1529
+ nonScalingStroke: s,
1530
+ className: a = "",
1531
+ children: l,
1532
+ iconNode: d = [],
1533
+ icon: h = {
1534
+ node: d,
1535
+ aliases: [],
1536
+ size: 24
1537
+ },
1538
+ ...x
1539
+ }, p) => {
1350
1540
  const {
1351
- size: l = 24,
1352
- strokeWidth: i = 2,
1353
- absoluteStrokeWidth: k = !1,
1354
- color: v = "currentColor",
1355
- className: m = ""
1356
- } = Ze() ?? {}, a = o ?? k ? Number(e ?? i) * 24 / Number(n ?? l) : e ?? i;
1357
- return oe(
1358
- "svg",
1541
+ size: f = 24,
1542
+ strokeWidth: c = 2,
1543
+ absoluteStrokeWidth: y = !1,
1544
+ nonScalingStroke: _ = !1,
1545
+ color: E = "currentColor",
1546
+ className: C = ""
1547
+ } = bt() ?? {}, I = !!l || kt(x), [w, $, M = []] = yt(h, {
1548
+ color: e ?? E,
1549
+ width: n ?? t ?? f,
1550
+ height: o ?? t ?? f,
1551
+ strokeWidth: r ?? c,
1552
+ absoluteStrokeWidth: i ?? y,
1553
+ nonScalingStroke: s ?? _,
1554
+ className: se(C, a),
1555
+ hasA11yProp: I,
1556
+ attributes: x
1557
+ });
1558
+ return re(
1559
+ w,
1359
1560
  {
1360
- ref: u,
1361
- ...ne,
1362
- width: n ?? l ?? ne.width,
1363
- height: n ?? l ?? ne.height,
1364
- stroke: t ?? v,
1365
- strokeWidth: a,
1366
- className: ke("lucide", m, r),
1367
- ...!c && !qe(h) && { "aria-hidden": "true" },
1368
- ...h
1561
+ ref: p,
1562
+ ...$
1369
1563
  },
1370
1564
  [
1371
- ...s.map(([x, D]) => oe(x, D)),
1372
- ...Array.isArray(c) ? c : [c]
1565
+ ...M.map(([b, N]) => re(b, N)),
1566
+ ...Array.isArray(l) ? l : [l]
1373
1567
  ]
1374
1568
  );
1375
1569
  }
1376
1570
  );
1377
1571
  /**
1378
- * @license lucide-react v1.29.0 - ISC
1572
+ * @license lucide-react v1.42.0 - ISC
1379
1573
  *
1380
1574
  * This source code is licensed under the ISC license.
1381
1575
  * See the LICENSE file in the root directory of this source tree.
1382
1576
  */
1383
- const O = (t, n) => {
1384
- const e = se(
1385
- ({ className: o, ...r }, c) => oe(Xe, {
1386
- ref: c,
1387
- iconNode: n,
1388
- className: ke(
1389
- `lucide-${Ue(me(t))}`,
1390
- `lucide-${t}`,
1391
- o
1392
- ),
1393
- ...r
1577
+ function H(e, t = [], n = []) {
1578
+ const o = typeof e == "string" ? ft(e, t, n) : e, r = ie(
1579
+ ({ className: i, ...s }, a) => re(vt, {
1580
+ ref: a,
1581
+ icon: o,
1582
+ className: i,
1583
+ ...s
1394
1584
  })
1395
1585
  );
1396
- return e.displayName = me(t), e;
1397
- };
1586
+ return o.name && (r.displayName = pt(o.name)), r;
1587
+ }
1398
1588
  /**
1399
- * @license lucide-react v1.29.0 - ISC
1589
+ * @license lucide-react v1.42.0 - ISC
1400
1590
  *
1401
1591
  * This source code is licensed under the ISC license.
1402
1592
  * See the LICENSE file in the root directory of this source tree.
1403
1593
  */
1404
- const Ye = [
1405
- ["path", { d: "M12 5v16", key: "1f6ucr" }],
1406
- [
1407
- "path",
1408
- {
1409
- d: "M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",
1410
- key: "1fyvmf"
1411
- }
1594
+ const xe = {
1595
+ name: "book-open",
1596
+ size: 24,
1597
+ node: [
1598
+ ["path", { d: "M12 5v16", key: "1f6ucr" }],
1599
+ [
1600
+ "path",
1601
+ {
1602
+ d: "M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",
1603
+ key: "1fyvmf"
1604
+ }
1605
+ ]
1412
1606
  ]
1413
- ], Je = O("book-open", Ye);
1607
+ };
1608
+ xe.node;
1609
+ const xt = H(xe);
1414
1610
  /**
1415
- * @license lucide-react v1.29.0 - ISC
1611
+ * @license lucide-react v1.42.0 - ISC
1416
1612
  *
1417
1613
  * This source code is licensed under the ISC license.
1418
1614
  * See the LICENSE file in the root directory of this source tree.
1419
1615
  */
1420
- const Qe = [
1421
- ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
1422
- ["path", { d: "M18 17V9", key: "2bz60n" }],
1423
- ["path", { d: "M13 17V5", key: "1frdt8" }],
1424
- ["path", { d: "M8 17v-3", key: "17ska0" }]
1425
- ], et = O("chart-column", Qe);
1616
+ const Me = {
1617
+ name: "chart-column",
1618
+ size: 24,
1619
+ node: [
1620
+ ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
1621
+ ["path", { d: "M18 17V9", key: "2bz60n" }],
1622
+ ["path", { d: "M13 17V5", key: "1frdt8" }],
1623
+ ["path", { d: "M8 17v-3", key: "17ska0" }]
1624
+ ],
1625
+ aliases: ["bar-chart-3"]
1626
+ };
1627
+ Me.node;
1628
+ const Mt = H(Me);
1426
1629
  /**
1427
- * @license lucide-react v1.29.0 - ISC
1630
+ * @license lucide-react v1.42.0 - ISC
1428
1631
  *
1429
1632
  * This source code is licensed under the ISC license.
1430
1633
  * See the LICENSE file in the root directory of this source tree.
1431
1634
  */
1432
- const tt = [
1433
- [
1434
- "path",
1435
- {
1436
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
1437
- key: "1oefj6"
1438
- }
1635
+ const Ne = {
1636
+ name: "download",
1637
+ size: 24,
1638
+ node: [
1639
+ ["path", { d: "M12 15V3", key: "m9g1x1" }],
1640
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
1641
+ ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
1642
+ ]
1643
+ };
1644
+ Ne.node;
1645
+ const Nt = H(Ne);
1646
+ /**
1647
+ * @license lucide-react v1.42.0 - ISC
1648
+ *
1649
+ * This source code is licensed under the ISC license.
1650
+ * See the LICENSE file in the root directory of this source tree.
1651
+ */
1652
+ const Ce = {
1653
+ name: "face-slightly-smiling",
1654
+ size: 24,
1655
+ node: [
1656
+ ["path", { d: "M15 10V9", key: "4dkmfx" }],
1657
+ ["path", { d: "M16.472 15a6 6 0 01-8.943 0", key: "7qomzy" }],
1658
+ ["path", { d: "M9 10V9", key: "1lazqi" }],
1659
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
1439
1660
  ],
1440
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
1441
- ], nt = O("file", tt);
1661
+ aliases: ["smile"]
1662
+ };
1663
+ Ce.node;
1664
+ const Ct = H(Ce);
1442
1665
  /**
1443
- * @license lucide-react v1.29.0 - ISC
1666
+ * @license lucide-react v1.42.0 - ISC
1444
1667
  *
1445
1668
  * This source code is licensed under the ISC license.
1446
1669
  * See the LICENSE file in the root directory of this source tree.
1447
1670
  */
1448
- const ot = [
1449
- [
1450
- "path",
1451
- {
1452
- d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
1453
- key: "usdka0"
1454
- }
1671
+ const Le = {
1672
+ name: "file",
1673
+ size: 24,
1674
+ node: [
1675
+ [
1676
+ "path",
1677
+ {
1678
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
1679
+ key: "1oefj6"
1680
+ }
1681
+ ],
1682
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
1455
1683
  ]
1456
- ], rt = O("folder-open", ot);
1684
+ };
1685
+ Le.node;
1686
+ const Lt = H(Le);
1457
1687
  /**
1458
- * @license lucide-react v1.29.0 - ISC
1688
+ * @license lucide-react v1.42.0 - ISC
1459
1689
  *
1460
1690
  * This source code is licensed under the ISC license.
1461
1691
  * See the LICENSE file in the root directory of this source tree.
1462
1692
  */
1463
- const st = [
1464
- [
1465
- "path",
1466
- {
1467
- d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",
1468
- key: "hod4my"
1469
- }
1470
- ],
1471
- [
1472
- "path",
1473
- {
1474
- d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",
1475
- key: "w4yl2u"
1476
- }
1477
- ],
1478
- ["path", { d: "M3 5a2 2 0 0 0 2 2h3", key: "f2jnh7" }],
1479
- ["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }]
1480
- ], ct = O("folder-tree", st);
1693
+ const Ae = {
1694
+ name: "folder-open",
1695
+ size: 24,
1696
+ node: [
1697
+ [
1698
+ "path",
1699
+ {
1700
+ d: "m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",
1701
+ key: "usdka0"
1702
+ }
1703
+ ]
1704
+ ]
1705
+ };
1706
+ Ae.node;
1707
+ const At = H(Ae);
1481
1708
  /**
1482
- * @license lucide-react v1.29.0 - ISC
1709
+ * @license lucide-react v1.42.0 - ISC
1483
1710
  *
1484
1711
  * This source code is licensed under the ISC license.
1485
1712
  * See the LICENSE file in the root directory of this source tree.
1486
1713
  */
1487
- const it = [
1488
- [
1489
- "path",
1490
- {
1491
- d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
1492
- key: "1kt360"
1493
- }
1714
+ const _e = {
1715
+ name: "folder-tree",
1716
+ size: 24,
1717
+ node: [
1718
+ [
1719
+ "path",
1720
+ {
1721
+ d: "M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",
1722
+ key: "hod4my"
1723
+ }
1724
+ ],
1725
+ [
1726
+ "path",
1727
+ {
1728
+ d: "M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",
1729
+ key: "w4yl2u"
1730
+ }
1731
+ ],
1732
+ ["path", { d: "M3 5a2 2 0 0 0 2 2h3", key: "f2jnh7" }],
1733
+ ["path", { d: "M3 3v13a2 2 0 0 0 2 2h3", key: "k8epm1" }]
1494
1734
  ]
1495
- ], at = O("folder", it);
1735
+ };
1736
+ _e.node;
1737
+ const _t = H(_e);
1496
1738
  /**
1497
- * @license lucide-react v1.29.0 - ISC
1739
+ * @license lucide-react v1.42.0 - ISC
1498
1740
  *
1499
1741
  * This source code is licensed under the ISC license.
1500
1742
  * See the LICENSE file in the root directory of this source tree.
1501
1743
  */
1502
- const lt = [
1503
- [
1504
- "path",
1505
- {
1506
- d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",
1507
- key: "1gvzjb"
1508
- }
1509
- ],
1510
- ["path", { d: "M9 18h6", key: "x1upvd" }],
1511
- ["path", { d: "M10 22h4", key: "ceow96" }]
1512
- ], ut = O("lightbulb", lt);
1744
+ const De = {
1745
+ name: "folder",
1746
+ size: 24,
1747
+ node: [
1748
+ [
1749
+ "path",
1750
+ {
1751
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
1752
+ key: "1kt360"
1753
+ }
1754
+ ]
1755
+ ]
1756
+ };
1757
+ De.node;
1758
+ const Dt = H(De);
1513
1759
  /**
1514
- * @license lucide-react v1.29.0 - ISC
1760
+ * @license lucide-react v1.42.0 - ISC
1515
1761
  *
1516
1762
  * This source code is licensed under the ISC license.
1517
1763
  * See the LICENSE file in the root directory of this source tree.
1518
1764
  */
1519
- const dt = [
1520
- ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
1521
- ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
1522
- ], ft = O("lock", dt);
1765
+ const Ee = {
1766
+ name: "globe",
1767
+ size: 24,
1768
+ node: [
1769
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
1770
+ ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
1771
+ ["path", { d: "M2 12h20", key: "9i4pu4" }]
1772
+ ]
1773
+ };
1774
+ Ee.node;
1775
+ const Et = H(Ee);
1523
1776
  /**
1524
- * @license lucide-react v1.29.0 - ISC
1777
+ * @license lucide-react v1.42.0 - ISC
1525
1778
  *
1526
1779
  * This source code is licensed under the ISC license.
1527
1780
  * See the LICENSE file in the root directory of this source tree.
1528
1781
  */
1529
- const ht = [
1530
- ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
1531
- ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
1532
- ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
1533
- ], mt = O("monitor", ht);
1782
+ const Ie = {
1783
+ name: "lightbulb",
1784
+ size: 24,
1785
+ node: [
1786
+ [
1787
+ "path",
1788
+ {
1789
+ d: "M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",
1790
+ key: "1gvzjb"
1791
+ }
1792
+ ],
1793
+ ["path", { d: "M9 18h6", key: "x1upvd" }],
1794
+ ["path", { d: "M10 22h4", key: "ceow96" }]
1795
+ ]
1796
+ };
1797
+ Ie.node;
1798
+ const It = H(Ie);
1534
1799
  /**
1535
- * @license lucide-react v1.29.0 - ISC
1800
+ * @license lucide-react v1.42.0 - ISC
1536
1801
  *
1537
1802
  * This source code is licensed under the ISC license.
1538
1803
  * See the LICENSE file in the root directory of this source tree.
1539
1804
  */
1540
- const pt = [
1541
- [
1542
- "path",
1543
- {
1544
- d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",
1545
- key: "1a0edw"
1546
- }
1547
- ],
1548
- ["path", { d: "M12 22V12", key: "d0xqtd" }],
1549
- ["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
1550
- ["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }]
1551
- ], wt = O("package", pt);
1805
+ const Se = {
1806
+ name: "lock",
1807
+ size: 24,
1808
+ node: [
1809
+ ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
1810
+ ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
1811
+ ]
1812
+ };
1813
+ Se.node;
1814
+ const St = H(Se);
1552
1815
  /**
1553
- * @license lucide-react v1.29.0 - ISC
1816
+ * @license lucide-react v1.42.0 - ISC
1554
1817
  *
1555
1818
  * This source code is licensed under the ISC license.
1556
1819
  * See the LICENSE file in the root directory of this source tree.
1557
1820
  */
1558
- const vt = [
1559
- [
1560
- "path",
1561
- {
1562
- d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
1563
- key: "1i5ecw"
1564
- }
1821
+ const $e = {
1822
+ name: "monitor",
1823
+ size: 24,
1824
+ node: [
1825
+ ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
1826
+ ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
1827
+ ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
1828
+ ]
1829
+ };
1830
+ $e.node;
1831
+ const $t = H($e);
1832
+ /**
1833
+ * @license lucide-react v1.42.0 - ISC
1834
+ *
1835
+ * This source code is licensed under the ISC license.
1836
+ * See the LICENSE file in the root directory of this source tree.
1837
+ */
1838
+ const ze = {
1839
+ name: "package",
1840
+ size: 24,
1841
+ node: [
1842
+ [
1843
+ "path",
1844
+ {
1845
+ d: "M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",
1846
+ key: "1a0edw"
1847
+ }
1848
+ ],
1849
+ ["path", { d: "M12 22V12", key: "d0xqtd" }],
1850
+ ["polyline", { points: "3.29 7 12 12 20.71 7", key: "ousv84" }],
1851
+ ["path", { d: "m7.5 4.27 9 5.15", key: "1c824w" }]
1852
+ ]
1853
+ };
1854
+ ze.node;
1855
+ const zt = H(ze);
1856
+ /**
1857
+ * @license lucide-react v1.42.0 - ISC
1858
+ *
1859
+ * This source code is licensed under the ISC license.
1860
+ * See the LICENSE file in the root directory of this source tree.
1861
+ */
1862
+ const Re = {
1863
+ name: "plug",
1864
+ size: 24,
1865
+ node: [
1866
+ ["path", { d: "M12 22v-5", key: "1ega77" }],
1867
+ ["path", { d: "M15 8V2", key: "18g5xt" }],
1868
+ [
1869
+ "path",
1870
+ { d: "M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z", key: "1xoxul" }
1871
+ ],
1872
+ ["path", { d: "M9 8V2", key: "14iosj" }]
1873
+ ]
1874
+ };
1875
+ Re.node;
1876
+ const Rt = H(Re);
1877
+ /**
1878
+ * @license lucide-react v1.42.0 - ISC
1879
+ *
1880
+ * This source code is licensed under the ISC license.
1881
+ * See the LICENSE file in the root directory of this source tree.
1882
+ */
1883
+ const Te = {
1884
+ name: "puzzle",
1885
+ size: 24,
1886
+ node: [
1887
+ [
1888
+ "path",
1889
+ {
1890
+ d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
1891
+ key: "w46dr5"
1892
+ }
1893
+ ]
1894
+ ]
1895
+ };
1896
+ Te.node;
1897
+ const Tt = H(Te);
1898
+ /**
1899
+ * @license lucide-react v1.42.0 - ISC
1900
+ *
1901
+ * This source code is licensed under the ISC license.
1902
+ * See the LICENSE file in the root directory of this source tree.
1903
+ */
1904
+ const Pe = {
1905
+ name: "rocket",
1906
+ size: 24,
1907
+ node: [
1908
+ ["path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5", key: "qeys4" }],
1909
+ [
1910
+ "path",
1911
+ {
1912
+ d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",
1913
+ key: "u4xsad"
1914
+ }
1915
+ ],
1916
+ [
1917
+ "path",
1918
+ {
1919
+ d: "M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",
1920
+ key: "676m9"
1921
+ }
1922
+ ],
1923
+ ["path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05", key: "92ym6u" }]
1924
+ ]
1925
+ };
1926
+ Pe.node;
1927
+ const Pt = H(Pe);
1928
+ /**
1929
+ * @license lucide-react v1.42.0 - ISC
1930
+ *
1931
+ * This source code is licensed under the ISC license.
1932
+ * See the LICENSE file in the root directory of this source tree.
1933
+ */
1934
+ const Fe = {
1935
+ name: "settings",
1936
+ size: 24,
1937
+ node: [
1938
+ [
1939
+ "path",
1940
+ {
1941
+ d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",
1942
+ key: "1i5ecw"
1943
+ }
1944
+ ],
1945
+ ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
1946
+ ]
1947
+ };
1948
+ Fe.node;
1949
+ const Ft = H(Fe);
1950
+ /**
1951
+ * @license lucide-react v1.42.0 - ISC
1952
+ *
1953
+ * This source code is licensed under the ISC license.
1954
+ * See the LICENSE file in the root directory of this source tree.
1955
+ */
1956
+ const He = {
1957
+ name: "shopping-bag",
1958
+ size: 24,
1959
+ node: [
1960
+ ["path", { d: "M16 10a4 4 0 0 1-8 0", key: "1ltviw" }],
1961
+ ["path", { d: "M3.103 6.034h17.794", key: "awc11p" }],
1962
+ [
1963
+ "path",
1964
+ {
1965
+ d: "M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",
1966
+ key: "o988cm"
1967
+ }
1968
+ ]
1969
+ ]
1970
+ };
1971
+ He.node;
1972
+ const Ht = H(He);
1973
+ /**
1974
+ * @license lucide-react v1.42.0 - ISC
1975
+ *
1976
+ * This source code is licensed under the ISC license.
1977
+ * See the LICENSE file in the root directory of this source tree.
1978
+ */
1979
+ const We = {
1980
+ name: "sparkles",
1981
+ size: 24,
1982
+ node: [
1983
+ [
1984
+ "path",
1985
+ {
1986
+ d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
1987
+ key: "1s2grr"
1988
+ }
1989
+ ],
1990
+ ["path", { d: "M20 2v4", key: "1rf3ol" }],
1991
+ ["path", { d: "M22 4h-4", key: "gwowj6" }],
1992
+ ["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
1565
1993
  ],
1566
- ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
1567
- ], yt = O("settings", vt);
1994
+ aliases: ["stars"]
1995
+ };
1996
+ We.node;
1997
+ const Wt = H(We);
1568
1998
  /**
1569
- * @license lucide-react v1.29.0 - ISC
1999
+ * @license lucide-react v1.42.0 - ISC
1570
2000
  *
1571
2001
  * This source code is licensed under the ISC license.
1572
2002
  * See the LICENSE file in the root directory of this source tree.
1573
2003
  */
1574
- const gt = [
1575
- ["path", { d: "M16 10a4 4 0 0 1-8 0", key: "1ltviw" }],
1576
- ["path", { d: "M3.103 6.034h17.794", key: "awc11p" }],
1577
- [
1578
- "path",
1579
- {
1580
- d: "M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",
1581
- key: "o988cm"
1582
- }
2004
+ const Be = {
2005
+ name: "star",
2006
+ size: 24,
2007
+ node: [
2008
+ [
2009
+ "path",
2010
+ {
2011
+ d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
2012
+ key: "r04s7s"
2013
+ }
2014
+ ]
2015
+ ]
2016
+ };
2017
+ Be.node;
2018
+ const Bt = H(Be);
2019
+ /**
2020
+ * @license lucide-react v1.42.0 - ISC
2021
+ *
2022
+ * This source code is licensed under the ISC license.
2023
+ * See the LICENSE file in the root directory of this source tree.
2024
+ */
2025
+ const Ke = {
2026
+ name: "zap",
2027
+ size: 24,
2028
+ node: [
2029
+ [
2030
+ "path",
2031
+ {
2032
+ d: "M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",
2033
+ key: "1v7up4"
2034
+ }
2035
+ ]
1583
2036
  ]
1584
- ], bt = O("shopping-bag", gt), kt = {
1585
- File: nt,
1586
- Folder: at,
1587
- FolderOpen: rt,
1588
- FolderTree: ct,
1589
- Package: wt,
1590
- ShoppingBag: bt,
1591
- Monitor: mt,
1592
- Settings: yt,
1593
- BookOpen: Je,
1594
- BarChart3: et,
1595
- Lightbulb: ut,
1596
- Lock: ft
1597
- }, pe = "📄";
1598
- function Kt({ pluginId: t, manifest: n, className: e, alt: o = "" }) {
1599
- const r = n ? ze(t, n) : { emoji: pe };
2037
+ };
2038
+ Ke.node;
2039
+ const Kt = H(Ke), Vt = {
2040
+ File: Lt,
2041
+ Folder: Dt,
2042
+ FolderOpen: At,
2043
+ FolderTree: _t,
2044
+ Package: zt,
2045
+ ShoppingBag: Ht,
2046
+ Monitor: $t,
2047
+ Settings: Ft,
2048
+ BookOpen: xt,
2049
+ BarChart3: Mt,
2050
+ Lightbulb: It,
2051
+ Lock: St,
2052
+ Download: Nt,
2053
+ Globe: Et,
2054
+ Plug: Rt,
2055
+ Puzzle: Tt,
2056
+ Rocket: Pt,
2057
+ Smile: Ct,
2058
+ Sparkles: Wt,
2059
+ Star: Bt,
2060
+ Zap: Kt
2061
+ }, we = "📄";
2062
+ function un({ pluginId: e, manifest: t, className: n, alt: o = "" }) {
2063
+ const r = t ? dt(e, t) : { emoji: we };
1600
2064
  if (r.lucide) {
1601
- const c = kt[r.lucide];
1602
- if (c)
1603
- return /* @__PURE__ */ d(c, { className: `plugin-icon plugin-icon--lucide ${e ?? ""}` });
2065
+ const i = Vt[r.lucide];
2066
+ if (i)
2067
+ return /* @__PURE__ */ u(i, { className: `plugin-icon plugin-icon--lucide ${n ?? ""}` });
1604
2068
  }
1605
- return r.codicon ? /* @__PURE__ */ d("span", { className: `codicon ${r.codicon} plugin-icon plugin-icon--codicon ${e ?? ""}` }) : r.src ? /* @__PURE__ */ d("img", { src: r.src, alt: o, className: `plugin-icon plugin-icon--img ${e ?? ""}`, draggable: !1 }) : /* @__PURE__ */ d("span", { className: `plugin-icon plugin-icon--emoji ${e ?? ""}`, children: r.emoji ?? pe });
2069
+ return r.codicon ? /* @__PURE__ */ u("span", { className: `codicon ${r.codicon} plugin-icon plugin-icon--codicon ${n ?? ""}` }) : r.src ? /* @__PURE__ */ u("img", { src: r.src, alt: o, className: `plugin-icon plugin-icon--img ${n ?? ""}`, draggable: !1 }) : /* @__PURE__ */ u("span", { className: `plugin-icon plugin-icon--emoji ${n ?? ""}`, children: r.emoji ?? we });
2070
+ }
2071
+ function dn({ onPreview: e, onPin: t, disabled: n, delay: o = 250 }) {
2072
+ const r = F(null);
2073
+ z(() => () => {
2074
+ r.current && clearTimeout(r.current);
2075
+ }, []);
2076
+ const i = W((a) => {
2077
+ n || a.button !== void 0 && a.button !== 0 || (r.current ? (clearTimeout(r.current), r.current = null) : r.current = setTimeout(() => {
2078
+ r.current = null, e();
2079
+ }, o));
2080
+ }, [n, o, e]), s = W((a) => {
2081
+ n || a.button !== void 0 && a.button !== 0 || a.detail === 2 && (r.current && (clearTimeout(r.current), r.current = null), t());
2082
+ }, [n, t]);
2083
+ return { handleMouseDown: i, handleClick: s };
2084
+ }
2085
+ function hn(e) {
2086
+ const t = F(e);
2087
+ return t.current = e, W((n) => {
2088
+ var r, i, s, a, l, d;
2089
+ if (!(n.ctrlKey || n.metaKey)) return !1;
2090
+ const o = n.key.toLowerCase();
2091
+ return o !== "c" && o !== "x" && o !== "v" ? !1 : (n.preventDefault(), o === "c" ? (i = (r = t.current).onCopy) == null || i.call(r) : o === "x" ? (a = (s = t.current).onCut) == null || a.call(s) : (d = (l = t.current).onPaste) == null || d.call(l), !0);
2092
+ }, []);
2093
+ }
2094
+ function fn(e, t = 150) {
2095
+ const [n, o] = T(""), r = F(null), i = W(
2096
+ (a) => {
2097
+ o(a), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
2098
+ e(a);
2099
+ }, t);
2100
+ },
2101
+ [e, t]
2102
+ ), s = W(() => {
2103
+ r.current && clearTimeout(r.current), o(""), e("");
2104
+ }, [e]);
2105
+ return z(() => () => {
2106
+ r.current && clearTimeout(r.current);
2107
+ }, []), { value: n, onChange: i, onClear: s };
2108
+ }
2109
+ function mn(e, t) {
2110
+ const n = t - e;
2111
+ return !Number.isInteger(e) || !Number.isInteger(t) || n <= 2 ? 0.01 : 1;
1606
2112
  }
1607
- function Wt(t, n) {
1608
- const e = n - t;
1609
- return !Number.isInteger(t) || !Number.isInteger(n) || e <= 2 ? 0.01 : 1;
2113
+ function pn(e) {
2114
+ const t = /^https?:\/\/(?:github\.com|raw\.githubusercontent\.com)\/([^/]+)\/([^/?#]+)/i.exec(e.trim());
2115
+ return t ? `${t[1].toLowerCase()}/${t[2].toLowerCase()}` : null;
1610
2116
  }
1611
2117
  export {
1612
- Ce as Button,
1613
- At as ColorPicker,
1614
- Ct as Combobox,
1615
- It as ContextMenu,
1616
- Lt as DynamicSelect,
1617
- _t as FilePathInput,
1618
- $t as FontFamilySelect,
1619
- Dt as FormRow,
1620
- Ht as InlineInput,
1621
- St as NumberInput,
1622
- Kt as PluginIcon,
1623
- Rt as SegmentedRadio,
1624
- ge as SelectBox,
1625
- Tt as Slider,
1626
- Pt as ThemePicker,
1627
- Ft as Toggle,
1628
- Wt as inferSliderStep
2118
+ Gt as Badge,
2119
+ Ge as Button,
2120
+ Zt as ColorPicker,
2121
+ Xt as Combobox,
2122
+ Yt as ContextMenu,
2123
+ Jt as DynamicSelect,
2124
+ Qt as FilePathInput,
2125
+ en as FontFamilySelect,
2126
+ tn as FormRow,
2127
+ ln as InlineInput,
2128
+ nn as NumberInput,
2129
+ le as OverlayPortal,
2130
+ un as PluginIcon,
2131
+ on as SegmentedRadio,
2132
+ be as SelectBox,
2133
+ rn as Slider,
2134
+ sn as StringListEditor,
2135
+ cn as ThemePicker,
2136
+ an as Toggle,
2137
+ mn as inferSliderStep,
2138
+ pn as urlSourceKey,
2139
+ dn as useClickPreview,
2140
+ hn as useClipboardKeys,
2141
+ fn as useDebouncedInput
1629
2142
  };