bp-aicc-editor 1.2.507 → 1.2.511
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/lib/ScreenPreview-CV95NWOd.js +373 -0
- package/lib/{atlas-C3az-9Mm.js → atlas-DsmLq2V0.js} +1 -1
- package/lib/{button-base-_jCki568.js → button-base-DHNVBrQ9.js} +1 -1
- package/lib/{cache-Jvpyvvq5.js → cache-lsjsKZHu.js} +1 -1
- package/lib/{container-group-DTRMf-Lh.js → container-group-DqAcKEBy.js} +1 -1
- package/lib/{copy-JUmhZHJW.js → copy-C5Pi6nJh.js} +1 -1
- package/lib/{datav-DYcMOPlj.js → datav-BER95ty-.js} +27 -27
- package/lib/{delete-C0k5m-ed.js → delete-C2EW4JCs.js} +1 -1
- package/lib/{divider-CvWkiVUb.js → divider-BazBGRgV.js} +1 -1
- package/lib/edit-B2pfd2q1.js +24 -0
- package/lib/el-button-DvLKp6Ga.js +815 -0
- package/lib/el-form-item-BDdxk5F5.js +1175 -0
- package/lib/el-link-D2ol9BHQ.js +91 -0
- package/lib/el-loading-Cgwgez55.js +230 -0
- package/lib/el-overlay-BK0_UIU6.js +704 -0
- package/lib/el-tab-pane-DD2eM9rB.js +536 -0
- package/lib/{fullscreen-DOYyz7vQ.js → fullscreen-OChDsSnk.js} +1 -1
- package/lib/{image-BQIpsLBo.js → image-C5ZAY3yt.js} +1 -1
- package/lib/index-3pzVrvby.js +150 -0
- package/lib/{index-D9Iayd4l.js → index-B19lEYui.js} +6 -6
- package/lib/index-B1yAU2Cb.js +390 -0
- package/lib/index-BCFXuK7k.js +68 -0
- package/lib/index-BD4Jwo8Z.js +449 -0
- package/lib/{index-BvcqtFEY.js → index-BMWqf88L.js} +10 -10
- package/lib/{index-CI4vgOJL.js → index-BPcvYtHf.js} +8 -11
- package/lib/index-BWPVi43E.js +21 -0
- package/lib/{index-CSkWvBQG.js → index-BatyRVpL.js} +1 -1
- package/lib/{index-D7jQaJbo.js → index-Belsn8kt.js} +1 -1
- package/lib/{index-C7ZW2TdD.js → index-BfIEunKC.js} +13 -15
- package/lib/{index-DTbzx51-.js → index-BhP9eBCp.js} +2 -2
- package/lib/{index-BdQOzowp.js → index-BkdiXCRY.js} +1 -1
- package/lib/{index-B4Kg0SOl.js → index-Buoc0ISP.js} +60 -65
- package/lib/index-BwCQWH-N.js +439 -0
- package/lib/{index-KO7LIDgy.js → index-C7k49L2T.js} +1 -1
- package/lib/{index-BCisGpRV.js → index-CGFEhUh9.js} +21 -21
- package/lib/{index-BCZuzL9x.js → index-CGrR_i0u.js} +1 -1
- package/lib/index-CIADz1i0.js +8494 -0
- package/lib/{index-BiybAKLy.js → index-CJyYGViv.js} +1 -1
- package/lib/{index-Curd3Q_C.js → index-CVE37oE7.js} +1 -1
- package/lib/{index-BGT3NcHb.js → index-CVsy2qTh.js} +2 -2
- package/lib/{index-CEKpsQ73.js → index-CWbZmzNT.js} +20 -20
- package/lib/{index-r0p4Zsdn.js → index-CXQ258ID.js} +1 -1
- package/lib/{index-C17gkQC5.js → index-CX_Ghcb6.js} +2 -2
- package/lib/index-CZJriuFt.js +27215 -0
- package/lib/{index-UdJ7RS5C.js → index-Ci8AbyIq.js} +1 -1
- package/lib/{index-DzglmFul.js → index-Ck7uFsPE.js} +1 -1
- package/lib/{index-DfKVDhZo.js → index-D4X0_jbv.js} +4 -4
- package/lib/{index-Q9GLzAp6.js → index-DKTrbqcA.js} +2 -2
- package/lib/{index-DiSYhNaR.js → index-Ge_d2xqD.js} +1 -1
- package/lib/{index-D9qrFCLu.js → index-qVyixI57.js} +21 -24
- package/lib/{index-DrO2UeJx.js → index-tbhuYbb0.js} +1 -1
- package/lib/index.es.js +3 -3
- package/lib/index.umd.js +57 -34
- package/lib/{layer-setting-panel-Bjnt_eL7.js → layer-setting-panel-VvDSQ-cn.js} +2 -2
- package/lib/{line-show-C7Nn6vkO.js → line-show-Bp4G-LqO.js} +1 -1
- package/lib/{multi-layout-config-Cq3yMVHR.js → multi-layout-config-drSy7ezf.js} +5 -5
- package/lib/{multiline-text-20qZej5M.js → multiline-text-D89kYrA2.js} +1 -1
- package/lib/{navigation-CYYFLmhU.js → navigation-YAGxZ0OT.js} +1 -1
- package/lib/page-config-Cmsi8Vpr.js +582 -0
- package/lib/page-tabs-wFeNBY4c.js +185 -0
- package/lib/{plus-CLcKk5PN.js → plus-3mdO6yXY.js} +1 -1
- package/lib/{requestOld-UJ_IbJZV.js → requestOld-DRcjsmRQ.js} +1 -1
- package/lib/{schema-EG3DcRzW.js → schema-BavJE-SK.js} +2 -2
- package/lib/{schema-B8SVu2jj.js → schema-BflqDw-a.js} +1 -1
- package/lib/{schema-D6lT1sLt.js → schema-Bo30dbBx.js} +1 -1
- package/lib/{schema-Blmk8VpW.js → schema-BsnIOGBI.js} +1 -1
- package/lib/{schema-C1vqYLAm.js → schema-_APJMUW3.js} +24 -24
- package/lib/{schema-C4qS2kV8.js → schema-qKI1F8Bt.js} +1 -1
- package/lib/{setting-panel-CoVHYjPW.js → setting-panel-BgzN3BUP.js} +91 -93
- package/lib/{show-DWWTez5i.js → show-C4AeWlKj.js} +13 -32
- package/lib/{stepper-bfTmJIGg.js → stepper-D5EFeJWG.js} +1 -1
- package/lib/strings-_mHAdgA4.js +6 -0
- package/lib/style.css +1 -0
- package/lib/{switch-Dxeq_HHd.js → switch-B0dR4LM_.js} +1 -1
- package/lib/unlock-Cq9PLhBA.js +62 -0
- package/lib/{use-env-url-CP2GpMCY.js → use-env-url-BM9dgwx_.js} +1 -1
- package/lib/use-global-config-CflpFoxU.js +115 -0
- package/lib/vnode-B_Dj8zxu.js +14 -0
- package/package.json +3 -2
- package/lib/ScreenPreview-DGe9FXWu.js +0 -126
- package/lib/index-08FGmL4D.js +0 -3744
- package/lib/index-Bg2serjU.js +0 -155
- package/lib/index-CJbqu93z.js +0 -496
- package/lib/index-D-A44QLA.js +0 -228
- package/lib/index-D6ZS8SXJ.js +0 -22369
- package/lib/index-DgTMT-ZH.js +0 -71
- package/lib/index-noVQZPd6.js +0 -133
- package/lib/page-config-Bw-OZliO.js +0 -257
- package/lib/page-tabs-DM9zkW_X.js +0 -190
- package/lib/styles.css +0 -1
|
@@ -0,0 +1,815 @@
|
|
|
1
|
+
import { computed as b, inject as ot, ref as st, useSlots as ft, Text as ut, defineComponent as X, createBlock as _, openBlock as x, resolveDynamicComponent as N, mergeProps as lt, unref as v, withCtx as E, createElementBlock as $, createCommentVNode as W, Fragment as ct, renderSlot as R, normalizeClass as z, provide as ht, reactive as dt, toRef as U } from "vue";
|
|
2
|
+
import { ab as gt, I as bt, ae as Y, b as vt, d as tt, aM as pt, i as q, e as mt, n as D, k as et, E as K, w as yt, aw as kt } from "./index-CZJriuFt.js";
|
|
3
|
+
import { u as xt } from "./index-BWPVi43E.js";
|
|
4
|
+
import { b as St } from "./use-global-config-CflpFoxU.js";
|
|
5
|
+
const rt = Symbol(
|
|
6
|
+
"buttonGroupContextKey"
|
|
7
|
+
), Mt = (e, r) => {
|
|
8
|
+
xt(
|
|
9
|
+
{
|
|
10
|
+
from: "type.text",
|
|
11
|
+
replacement: "link",
|
|
12
|
+
version: "3.0.0",
|
|
13
|
+
scope: "props",
|
|
14
|
+
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
15
|
+
},
|
|
16
|
+
b(() => e.type === "text")
|
|
17
|
+
);
|
|
18
|
+
const t = ot(rt, void 0), a = St("button"), { form: n } = gt(), o = bt(b(() => t?.size)), i = Y(), s = st(), l = ft(), p = b(
|
|
19
|
+
() => {
|
|
20
|
+
var u;
|
|
21
|
+
return e.type || t?.type || ((u = a.value) == null ? void 0 : u.type) || "";
|
|
22
|
+
}
|
|
23
|
+
), m = b(
|
|
24
|
+
() => {
|
|
25
|
+
var u, f, h;
|
|
26
|
+
return (h = (f = e.autoInsertSpace) != null ? f : (u = a.value) == null ? void 0 : u.autoInsertSpace) != null ? h : !1;
|
|
27
|
+
}
|
|
28
|
+
), w = b(
|
|
29
|
+
() => {
|
|
30
|
+
var u, f, h;
|
|
31
|
+
return (h = (f = e.plain) != null ? f : (u = a.value) == null ? void 0 : u.plain) != null ? h : !1;
|
|
32
|
+
}
|
|
33
|
+
), T = b(
|
|
34
|
+
() => {
|
|
35
|
+
var u, f, h;
|
|
36
|
+
return (h = (f = e.round) != null ? f : (u = a.value) == null ? void 0 : u.round) != null ? h : !1;
|
|
37
|
+
}
|
|
38
|
+
), F = b(() => {
|
|
39
|
+
var u, f, h;
|
|
40
|
+
return (h = (f = e.text) != null ? f : (u = a.value) == null ? void 0 : u.text) != null ? h : !1;
|
|
41
|
+
}), I = b(() => e.tag === "button" ? {
|
|
42
|
+
ariaDisabled: i.value || e.loading,
|
|
43
|
+
disabled: i.value || e.loading,
|
|
44
|
+
autofocus: e.autofocus,
|
|
45
|
+
type: e.nativeType
|
|
46
|
+
} : {}), B = b(() => {
|
|
47
|
+
var u;
|
|
48
|
+
const f = (u = l.default) == null ? void 0 : u.call(l);
|
|
49
|
+
if (m.value && f?.length === 1) {
|
|
50
|
+
const h = f[0];
|
|
51
|
+
if (h?.type === ut) {
|
|
52
|
+
const it = h.children;
|
|
53
|
+
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(it.trim());
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return !1;
|
|
57
|
+
});
|
|
58
|
+
return {
|
|
59
|
+
_disabled: i,
|
|
60
|
+
_size: o,
|
|
61
|
+
_type: p,
|
|
62
|
+
_ref: s,
|
|
63
|
+
_props: I,
|
|
64
|
+
_plain: w,
|
|
65
|
+
_round: T,
|
|
66
|
+
_text: F,
|
|
67
|
+
shouldAddSpace: B,
|
|
68
|
+
handleClick: (u) => {
|
|
69
|
+
if (i.value || e.loading) {
|
|
70
|
+
u.stopPropagation();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
e.nativeType === "reset" && n?.resetFields(), r("click", u);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}, wt = [
|
|
77
|
+
"default",
|
|
78
|
+
"primary",
|
|
79
|
+
"success",
|
|
80
|
+
"warning",
|
|
81
|
+
"info",
|
|
82
|
+
"danger",
|
|
83
|
+
"text",
|
|
84
|
+
""
|
|
85
|
+
], _t = ["button", "submit", "reset"], G = vt({
|
|
86
|
+
size: mt,
|
|
87
|
+
disabled: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: void 0
|
|
90
|
+
},
|
|
91
|
+
type: {
|
|
92
|
+
type: String,
|
|
93
|
+
values: wt,
|
|
94
|
+
default: ""
|
|
95
|
+
},
|
|
96
|
+
icon: {
|
|
97
|
+
type: q
|
|
98
|
+
},
|
|
99
|
+
nativeType: {
|
|
100
|
+
type: String,
|
|
101
|
+
values: _t,
|
|
102
|
+
default: "button"
|
|
103
|
+
},
|
|
104
|
+
loading: Boolean,
|
|
105
|
+
loadingIcon: {
|
|
106
|
+
type: q,
|
|
107
|
+
default: () => pt
|
|
108
|
+
},
|
|
109
|
+
plain: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
default: void 0
|
|
112
|
+
},
|
|
113
|
+
text: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: void 0
|
|
116
|
+
},
|
|
117
|
+
link: Boolean,
|
|
118
|
+
bg: Boolean,
|
|
119
|
+
autofocus: Boolean,
|
|
120
|
+
round: {
|
|
121
|
+
type: Boolean,
|
|
122
|
+
default: void 0
|
|
123
|
+
},
|
|
124
|
+
circle: Boolean,
|
|
125
|
+
color: String,
|
|
126
|
+
dark: Boolean,
|
|
127
|
+
autoInsertSpace: {
|
|
128
|
+
type: Boolean,
|
|
129
|
+
default: void 0
|
|
130
|
+
},
|
|
131
|
+
tag: {
|
|
132
|
+
type: tt([String, Object]),
|
|
133
|
+
default: "button"
|
|
134
|
+
}
|
|
135
|
+
}), Bt = {
|
|
136
|
+
click: (e) => e instanceof MouseEvent
|
|
137
|
+
};
|
|
138
|
+
function c(e, r) {
|
|
139
|
+
At(e) && (e = "100%");
|
|
140
|
+
var t = Ht(e);
|
|
141
|
+
return e = r === 360 ? e : Math.min(r, Math.max(0, parseFloat(e))), t && (e = parseInt(String(e * r), 10) / 100), Math.abs(e - r) < 1e-6 ? 1 : (r === 360 ? e = (e < 0 ? e % r + r : e % r) / parseFloat(String(r)) : e = e % r / parseFloat(String(r)), e);
|
|
142
|
+
}
|
|
143
|
+
function A(e) {
|
|
144
|
+
return Math.min(1, Math.max(0, e));
|
|
145
|
+
}
|
|
146
|
+
function At(e) {
|
|
147
|
+
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
|
|
148
|
+
}
|
|
149
|
+
function Ht(e) {
|
|
150
|
+
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
151
|
+
}
|
|
152
|
+
function at(e) {
|
|
153
|
+
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
154
|
+
}
|
|
155
|
+
function H(e) {
|
|
156
|
+
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
|
|
157
|
+
}
|
|
158
|
+
function M(e) {
|
|
159
|
+
return e.length === 1 ? "0" + e : String(e);
|
|
160
|
+
}
|
|
161
|
+
function Rt(e, r, t) {
|
|
162
|
+
return {
|
|
163
|
+
r: c(e, 255) * 255,
|
|
164
|
+
g: c(r, 255) * 255,
|
|
165
|
+
b: c(t, 255) * 255
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
function L(e, r, t) {
|
|
169
|
+
e = c(e, 255), r = c(r, 255), t = c(t, 255);
|
|
170
|
+
var a = Math.max(e, r, t), n = Math.min(e, r, t), o = 0, i = 0, s = (a + n) / 2;
|
|
171
|
+
if (a === n)
|
|
172
|
+
i = 0, o = 0;
|
|
173
|
+
else {
|
|
174
|
+
var l = a - n;
|
|
175
|
+
switch (i = s > 0.5 ? l / (2 - a - n) : l / (a + n), a) {
|
|
176
|
+
case e:
|
|
177
|
+
o = (r - t) / l + (r < t ? 6 : 0);
|
|
178
|
+
break;
|
|
179
|
+
case r:
|
|
180
|
+
o = (t - e) / l + 2;
|
|
181
|
+
break;
|
|
182
|
+
case t:
|
|
183
|
+
o = (e - r) / l + 4;
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
o /= 6;
|
|
187
|
+
}
|
|
188
|
+
return { h: o, s: i, l: s };
|
|
189
|
+
}
|
|
190
|
+
function C(e, r, t) {
|
|
191
|
+
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? e + (r - e) * (6 * t) : t < 1 / 2 ? r : t < 2 / 3 ? e + (r - e) * (2 / 3 - t) * 6 : e;
|
|
192
|
+
}
|
|
193
|
+
function Tt(e, r, t) {
|
|
194
|
+
var a, n, o;
|
|
195
|
+
if (e = c(e, 360), r = c(r, 100), t = c(t, 100), r === 0)
|
|
196
|
+
n = t, o = t, a = t;
|
|
197
|
+
else {
|
|
198
|
+
var i = t < 0.5 ? t * (1 + r) : t + r - t * r, s = 2 * t - i;
|
|
199
|
+
a = C(s, i, e + 1 / 3), n = C(s, i, e), o = C(s, i, e - 1 / 3);
|
|
200
|
+
}
|
|
201
|
+
return { r: a * 255, g: n * 255, b: o * 255 };
|
|
202
|
+
}
|
|
203
|
+
function Z(e, r, t) {
|
|
204
|
+
e = c(e, 255), r = c(r, 255), t = c(t, 255);
|
|
205
|
+
var a = Math.max(e, r, t), n = Math.min(e, r, t), o = 0, i = a, s = a - n, l = a === 0 ? 0 : s / a;
|
|
206
|
+
if (a === n)
|
|
207
|
+
o = 0;
|
|
208
|
+
else {
|
|
209
|
+
switch (a) {
|
|
210
|
+
case e:
|
|
211
|
+
o = (r - t) / s + (r < t ? 6 : 0);
|
|
212
|
+
break;
|
|
213
|
+
case r:
|
|
214
|
+
o = (t - e) / s + 2;
|
|
215
|
+
break;
|
|
216
|
+
case t:
|
|
217
|
+
o = (e - r) / s + 4;
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
o /= 6;
|
|
221
|
+
}
|
|
222
|
+
return { h: o, s: l, v: i };
|
|
223
|
+
}
|
|
224
|
+
function Ft(e, r, t) {
|
|
225
|
+
e = c(e, 360) * 6, r = c(r, 100), t = c(t, 100);
|
|
226
|
+
var a = Math.floor(e), n = e - a, o = t * (1 - r), i = t * (1 - n * r), s = t * (1 - (1 - n) * r), l = a % 6, p = [t, i, o, o, s, t][l], m = [s, t, t, i, o, o][l], w = [o, o, s, t, t, i][l];
|
|
227
|
+
return { r: p * 255, g: m * 255, b: w * 255 };
|
|
228
|
+
}
|
|
229
|
+
function J(e, r, t, a) {
|
|
230
|
+
var n = [
|
|
231
|
+
M(Math.round(e).toString(16)),
|
|
232
|
+
M(Math.round(r).toString(16)),
|
|
233
|
+
M(Math.round(t).toString(16))
|
|
234
|
+
];
|
|
235
|
+
return a && n[0].startsWith(n[0].charAt(1)) && n[1].startsWith(n[1].charAt(1)) && n[2].startsWith(n[2].charAt(1)) ? n[0].charAt(0) + n[1].charAt(0) + n[2].charAt(0) : n.join("");
|
|
236
|
+
}
|
|
237
|
+
function It(e, r, t, a, n) {
|
|
238
|
+
var o = [
|
|
239
|
+
M(Math.round(e).toString(16)),
|
|
240
|
+
M(Math.round(r).toString(16)),
|
|
241
|
+
M(Math.round(t).toString(16)),
|
|
242
|
+
M(Nt(a))
|
|
243
|
+
];
|
|
244
|
+
return n && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("");
|
|
245
|
+
}
|
|
246
|
+
function Nt(e) {
|
|
247
|
+
return Math.round(parseFloat(e) * 255).toString(16);
|
|
248
|
+
}
|
|
249
|
+
function Q(e) {
|
|
250
|
+
return d(e) / 255;
|
|
251
|
+
}
|
|
252
|
+
function d(e) {
|
|
253
|
+
return parseInt(e, 16);
|
|
254
|
+
}
|
|
255
|
+
function Et(e) {
|
|
256
|
+
return {
|
|
257
|
+
r: e >> 16,
|
|
258
|
+
g: (e & 65280) >> 8,
|
|
259
|
+
b: e & 255
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
var j = {
|
|
263
|
+
aliceblue: "#f0f8ff",
|
|
264
|
+
antiquewhite: "#faebd7",
|
|
265
|
+
aqua: "#00ffff",
|
|
266
|
+
aquamarine: "#7fffd4",
|
|
267
|
+
azure: "#f0ffff",
|
|
268
|
+
beige: "#f5f5dc",
|
|
269
|
+
bisque: "#ffe4c4",
|
|
270
|
+
black: "#000000",
|
|
271
|
+
blanchedalmond: "#ffebcd",
|
|
272
|
+
blue: "#0000ff",
|
|
273
|
+
blueviolet: "#8a2be2",
|
|
274
|
+
brown: "#a52a2a",
|
|
275
|
+
burlywood: "#deb887",
|
|
276
|
+
cadetblue: "#5f9ea0",
|
|
277
|
+
chartreuse: "#7fff00",
|
|
278
|
+
chocolate: "#d2691e",
|
|
279
|
+
coral: "#ff7f50",
|
|
280
|
+
cornflowerblue: "#6495ed",
|
|
281
|
+
cornsilk: "#fff8dc",
|
|
282
|
+
crimson: "#dc143c",
|
|
283
|
+
cyan: "#00ffff",
|
|
284
|
+
darkblue: "#00008b",
|
|
285
|
+
darkcyan: "#008b8b",
|
|
286
|
+
darkgoldenrod: "#b8860b",
|
|
287
|
+
darkgray: "#a9a9a9",
|
|
288
|
+
darkgreen: "#006400",
|
|
289
|
+
darkgrey: "#a9a9a9",
|
|
290
|
+
darkkhaki: "#bdb76b",
|
|
291
|
+
darkmagenta: "#8b008b",
|
|
292
|
+
darkolivegreen: "#556b2f",
|
|
293
|
+
darkorange: "#ff8c00",
|
|
294
|
+
darkorchid: "#9932cc",
|
|
295
|
+
darkred: "#8b0000",
|
|
296
|
+
darksalmon: "#e9967a",
|
|
297
|
+
darkseagreen: "#8fbc8f",
|
|
298
|
+
darkslateblue: "#483d8b",
|
|
299
|
+
darkslategray: "#2f4f4f",
|
|
300
|
+
darkslategrey: "#2f4f4f",
|
|
301
|
+
darkturquoise: "#00ced1",
|
|
302
|
+
darkviolet: "#9400d3",
|
|
303
|
+
deeppink: "#ff1493",
|
|
304
|
+
deepskyblue: "#00bfff",
|
|
305
|
+
dimgray: "#696969",
|
|
306
|
+
dimgrey: "#696969",
|
|
307
|
+
dodgerblue: "#1e90ff",
|
|
308
|
+
firebrick: "#b22222",
|
|
309
|
+
floralwhite: "#fffaf0",
|
|
310
|
+
forestgreen: "#228b22",
|
|
311
|
+
fuchsia: "#ff00ff",
|
|
312
|
+
gainsboro: "#dcdcdc",
|
|
313
|
+
ghostwhite: "#f8f8ff",
|
|
314
|
+
goldenrod: "#daa520",
|
|
315
|
+
gold: "#ffd700",
|
|
316
|
+
gray: "#808080",
|
|
317
|
+
green: "#008000",
|
|
318
|
+
greenyellow: "#adff2f",
|
|
319
|
+
grey: "#808080",
|
|
320
|
+
honeydew: "#f0fff0",
|
|
321
|
+
hotpink: "#ff69b4",
|
|
322
|
+
indianred: "#cd5c5c",
|
|
323
|
+
indigo: "#4b0082",
|
|
324
|
+
ivory: "#fffff0",
|
|
325
|
+
khaki: "#f0e68c",
|
|
326
|
+
lavenderblush: "#fff0f5",
|
|
327
|
+
lavender: "#e6e6fa",
|
|
328
|
+
lawngreen: "#7cfc00",
|
|
329
|
+
lemonchiffon: "#fffacd",
|
|
330
|
+
lightblue: "#add8e6",
|
|
331
|
+
lightcoral: "#f08080",
|
|
332
|
+
lightcyan: "#e0ffff",
|
|
333
|
+
lightgoldenrodyellow: "#fafad2",
|
|
334
|
+
lightgray: "#d3d3d3",
|
|
335
|
+
lightgreen: "#90ee90",
|
|
336
|
+
lightgrey: "#d3d3d3",
|
|
337
|
+
lightpink: "#ffb6c1",
|
|
338
|
+
lightsalmon: "#ffa07a",
|
|
339
|
+
lightseagreen: "#20b2aa",
|
|
340
|
+
lightskyblue: "#87cefa",
|
|
341
|
+
lightslategray: "#778899",
|
|
342
|
+
lightslategrey: "#778899",
|
|
343
|
+
lightsteelblue: "#b0c4de",
|
|
344
|
+
lightyellow: "#ffffe0",
|
|
345
|
+
lime: "#00ff00",
|
|
346
|
+
limegreen: "#32cd32",
|
|
347
|
+
linen: "#faf0e6",
|
|
348
|
+
magenta: "#ff00ff",
|
|
349
|
+
maroon: "#800000",
|
|
350
|
+
mediumaquamarine: "#66cdaa",
|
|
351
|
+
mediumblue: "#0000cd",
|
|
352
|
+
mediumorchid: "#ba55d3",
|
|
353
|
+
mediumpurple: "#9370db",
|
|
354
|
+
mediumseagreen: "#3cb371",
|
|
355
|
+
mediumslateblue: "#7b68ee",
|
|
356
|
+
mediumspringgreen: "#00fa9a",
|
|
357
|
+
mediumturquoise: "#48d1cc",
|
|
358
|
+
mediumvioletred: "#c71585",
|
|
359
|
+
midnightblue: "#191970",
|
|
360
|
+
mintcream: "#f5fffa",
|
|
361
|
+
mistyrose: "#ffe4e1",
|
|
362
|
+
moccasin: "#ffe4b5",
|
|
363
|
+
navajowhite: "#ffdead",
|
|
364
|
+
navy: "#000080",
|
|
365
|
+
oldlace: "#fdf5e6",
|
|
366
|
+
olive: "#808000",
|
|
367
|
+
olivedrab: "#6b8e23",
|
|
368
|
+
orange: "#ffa500",
|
|
369
|
+
orangered: "#ff4500",
|
|
370
|
+
orchid: "#da70d6",
|
|
371
|
+
palegoldenrod: "#eee8aa",
|
|
372
|
+
palegreen: "#98fb98",
|
|
373
|
+
paleturquoise: "#afeeee",
|
|
374
|
+
palevioletred: "#db7093",
|
|
375
|
+
papayawhip: "#ffefd5",
|
|
376
|
+
peachpuff: "#ffdab9",
|
|
377
|
+
peru: "#cd853f",
|
|
378
|
+
pink: "#ffc0cb",
|
|
379
|
+
plum: "#dda0dd",
|
|
380
|
+
powderblue: "#b0e0e6",
|
|
381
|
+
purple: "#800080",
|
|
382
|
+
rebeccapurple: "#663399",
|
|
383
|
+
red: "#ff0000",
|
|
384
|
+
rosybrown: "#bc8f8f",
|
|
385
|
+
royalblue: "#4169e1",
|
|
386
|
+
saddlebrown: "#8b4513",
|
|
387
|
+
salmon: "#fa8072",
|
|
388
|
+
sandybrown: "#f4a460",
|
|
389
|
+
seagreen: "#2e8b57",
|
|
390
|
+
seashell: "#fff5ee",
|
|
391
|
+
sienna: "#a0522d",
|
|
392
|
+
silver: "#c0c0c0",
|
|
393
|
+
skyblue: "#87ceeb",
|
|
394
|
+
slateblue: "#6a5acd",
|
|
395
|
+
slategray: "#708090",
|
|
396
|
+
slategrey: "#708090",
|
|
397
|
+
snow: "#fffafa",
|
|
398
|
+
springgreen: "#00ff7f",
|
|
399
|
+
steelblue: "#4682b4",
|
|
400
|
+
tan: "#d2b48c",
|
|
401
|
+
teal: "#008080",
|
|
402
|
+
thistle: "#d8bfd8",
|
|
403
|
+
tomato: "#ff6347",
|
|
404
|
+
turquoise: "#40e0d0",
|
|
405
|
+
violet: "#ee82ee",
|
|
406
|
+
wheat: "#f5deb3",
|
|
407
|
+
white: "#ffffff",
|
|
408
|
+
whitesmoke: "#f5f5f5",
|
|
409
|
+
yellow: "#ffff00",
|
|
410
|
+
yellowgreen: "#9acd32"
|
|
411
|
+
};
|
|
412
|
+
function Ct(e) {
|
|
413
|
+
var r = { r: 0, g: 0, b: 0 }, t = 1, a = null, n = null, o = null, i = !1, s = !1;
|
|
414
|
+
return typeof e == "string" && (e = $t(e)), typeof e == "object" && (y(e.r) && y(e.g) && y(e.b) ? (r = Rt(e.r, e.g, e.b), i = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : y(e.h) && y(e.s) && y(e.v) ? (a = H(e.s), n = H(e.v), r = Ft(e.h, a, n), i = !0, s = "hsv") : y(e.h) && y(e.s) && y(e.l) && (a = H(e.s), o = H(e.l), r = Tt(e.h, a, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (t = e.a)), t = at(t), {
|
|
415
|
+
ok: i,
|
|
416
|
+
format: e.format || s,
|
|
417
|
+
r: Math.min(255, Math.max(r.r, 0)),
|
|
418
|
+
g: Math.min(255, Math.max(r.g, 0)),
|
|
419
|
+
b: Math.min(255, Math.max(r.b, 0)),
|
|
420
|
+
a: t
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
var Pt = "[-\\+]?\\d+%?", Vt = "[-\\+]?\\d*\\.\\d+%?", S = "(?:".concat(Vt, ")|(?:").concat(Pt, ")"), P = "[\\s|\\(]+(".concat(S, ")[,|\\s]+(").concat(S, ")[,|\\s]+(").concat(S, ")\\s*\\)?"), V = "[\\s|\\(]+(".concat(S, ")[,|\\s]+(").concat(S, ")[,|\\s]+(").concat(S, ")[,|\\s]+(").concat(S, ")\\s*\\)?"), g = {
|
|
424
|
+
CSS_UNIT: new RegExp(S),
|
|
425
|
+
rgb: new RegExp("rgb" + P),
|
|
426
|
+
rgba: new RegExp("rgba" + V),
|
|
427
|
+
hsl: new RegExp("hsl" + P),
|
|
428
|
+
hsla: new RegExp("hsla" + V),
|
|
429
|
+
hsv: new RegExp("hsv" + P),
|
|
430
|
+
hsva: new RegExp("hsva" + V),
|
|
431
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
432
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
433
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
434
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
435
|
+
};
|
|
436
|
+
function $t(e) {
|
|
437
|
+
if (e = e.trim().toLowerCase(), e.length === 0)
|
|
438
|
+
return !1;
|
|
439
|
+
var r = !1;
|
|
440
|
+
if (j[e])
|
|
441
|
+
e = j[e], r = !0;
|
|
442
|
+
else if (e === "transparent")
|
|
443
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
444
|
+
var t = g.rgb.exec(e);
|
|
445
|
+
return t ? { r: t[1], g: t[2], b: t[3] } : (t = g.rgba.exec(e), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = g.hsl.exec(e), t ? { h: t[1], s: t[2], l: t[3] } : (t = g.hsla.exec(e), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = g.hsv.exec(e), t ? { h: t[1], s: t[2], v: t[3] } : (t = g.hsva.exec(e), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = g.hex8.exec(e), t ? {
|
|
446
|
+
r: d(t[1]),
|
|
447
|
+
g: d(t[2]),
|
|
448
|
+
b: d(t[3]),
|
|
449
|
+
a: Q(t[4]),
|
|
450
|
+
format: r ? "name" : "hex8"
|
|
451
|
+
} : (t = g.hex6.exec(e), t ? {
|
|
452
|
+
r: d(t[1]),
|
|
453
|
+
g: d(t[2]),
|
|
454
|
+
b: d(t[3]),
|
|
455
|
+
format: r ? "name" : "hex"
|
|
456
|
+
} : (t = g.hex4.exec(e), t ? {
|
|
457
|
+
r: d(t[1] + t[1]),
|
|
458
|
+
g: d(t[2] + t[2]),
|
|
459
|
+
b: d(t[3] + t[3]),
|
|
460
|
+
a: Q(t[4] + t[4]),
|
|
461
|
+
format: r ? "name" : "hex8"
|
|
462
|
+
} : (t = g.hex3.exec(e), t ? {
|
|
463
|
+
r: d(t[1] + t[1]),
|
|
464
|
+
g: d(t[2] + t[2]),
|
|
465
|
+
b: d(t[3] + t[3]),
|
|
466
|
+
format: r ? "name" : "hex"
|
|
467
|
+
} : !1)))))))));
|
|
468
|
+
}
|
|
469
|
+
function y(e) {
|
|
470
|
+
return !!g.CSS_UNIT.exec(String(e));
|
|
471
|
+
}
|
|
472
|
+
var zt = (
|
|
473
|
+
/** @class */
|
|
474
|
+
(function() {
|
|
475
|
+
function e(r, t) {
|
|
476
|
+
r === void 0 && (r = ""), t === void 0 && (t = {});
|
|
477
|
+
var a;
|
|
478
|
+
if (r instanceof e)
|
|
479
|
+
return r;
|
|
480
|
+
typeof r == "number" && (r = Et(r)), this.originalInput = r;
|
|
481
|
+
var n = Ct(r);
|
|
482
|
+
this.originalInput = r, this.r = n.r, this.g = n.g, this.b = n.b, this.a = n.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (a = t.format) !== null && a !== void 0 ? a : n.format, this.gradientType = t.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = n.ok;
|
|
483
|
+
}
|
|
484
|
+
return e.prototype.isDark = function() {
|
|
485
|
+
return this.getBrightness() < 128;
|
|
486
|
+
}, e.prototype.isLight = function() {
|
|
487
|
+
return !this.isDark();
|
|
488
|
+
}, e.prototype.getBrightness = function() {
|
|
489
|
+
var r = this.toRgb();
|
|
490
|
+
return (r.r * 299 + r.g * 587 + r.b * 114) / 1e3;
|
|
491
|
+
}, e.prototype.getLuminance = function() {
|
|
492
|
+
var r = this.toRgb(), t, a, n, o = r.r / 255, i = r.g / 255, s = r.b / 255;
|
|
493
|
+
return o <= 0.03928 ? t = o / 12.92 : t = Math.pow((o + 0.055) / 1.055, 2.4), i <= 0.03928 ? a = i / 12.92 : a = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? n = s / 12.92 : n = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * t + 0.7152 * a + 0.0722 * n;
|
|
494
|
+
}, e.prototype.getAlpha = function() {
|
|
495
|
+
return this.a;
|
|
496
|
+
}, e.prototype.setAlpha = function(r) {
|
|
497
|
+
return this.a = at(r), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
498
|
+
}, e.prototype.isMonochrome = function() {
|
|
499
|
+
var r = this.toHsl().s;
|
|
500
|
+
return r === 0;
|
|
501
|
+
}, e.prototype.toHsv = function() {
|
|
502
|
+
var r = Z(this.r, this.g, this.b);
|
|
503
|
+
return { h: r.h * 360, s: r.s, v: r.v, a: this.a };
|
|
504
|
+
}, e.prototype.toHsvString = function() {
|
|
505
|
+
var r = Z(this.r, this.g, this.b), t = Math.round(r.h * 360), a = Math.round(r.s * 100), n = Math.round(r.v * 100);
|
|
506
|
+
return this.a === 1 ? "hsv(".concat(t, ", ").concat(a, "%, ").concat(n, "%)") : "hsva(".concat(t, ", ").concat(a, "%, ").concat(n, "%, ").concat(this.roundA, ")");
|
|
507
|
+
}, e.prototype.toHsl = function() {
|
|
508
|
+
var r = L(this.r, this.g, this.b);
|
|
509
|
+
return { h: r.h * 360, s: r.s, l: r.l, a: this.a };
|
|
510
|
+
}, e.prototype.toHslString = function() {
|
|
511
|
+
var r = L(this.r, this.g, this.b), t = Math.round(r.h * 360), a = Math.round(r.s * 100), n = Math.round(r.l * 100);
|
|
512
|
+
return this.a === 1 ? "hsl(".concat(t, ", ").concat(a, "%, ").concat(n, "%)") : "hsla(".concat(t, ", ").concat(a, "%, ").concat(n, "%, ").concat(this.roundA, ")");
|
|
513
|
+
}, e.prototype.toHex = function(r) {
|
|
514
|
+
return r === void 0 && (r = !1), J(this.r, this.g, this.b, r);
|
|
515
|
+
}, e.prototype.toHexString = function(r) {
|
|
516
|
+
return r === void 0 && (r = !1), "#" + this.toHex(r);
|
|
517
|
+
}, e.prototype.toHex8 = function(r) {
|
|
518
|
+
return r === void 0 && (r = !1), It(this.r, this.g, this.b, this.a, r);
|
|
519
|
+
}, e.prototype.toHex8String = function(r) {
|
|
520
|
+
return r === void 0 && (r = !1), "#" + this.toHex8(r);
|
|
521
|
+
}, e.prototype.toHexShortString = function(r) {
|
|
522
|
+
return r === void 0 && (r = !1), this.a === 1 ? this.toHexString(r) : this.toHex8String(r);
|
|
523
|
+
}, e.prototype.toRgb = function() {
|
|
524
|
+
return {
|
|
525
|
+
r: Math.round(this.r),
|
|
526
|
+
g: Math.round(this.g),
|
|
527
|
+
b: Math.round(this.b),
|
|
528
|
+
a: this.a
|
|
529
|
+
};
|
|
530
|
+
}, e.prototype.toRgbString = function() {
|
|
531
|
+
var r = Math.round(this.r), t = Math.round(this.g), a = Math.round(this.b);
|
|
532
|
+
return this.a === 1 ? "rgb(".concat(r, ", ").concat(t, ", ").concat(a, ")") : "rgba(".concat(r, ", ").concat(t, ", ").concat(a, ", ").concat(this.roundA, ")");
|
|
533
|
+
}, e.prototype.toPercentageRgb = function() {
|
|
534
|
+
var r = function(t) {
|
|
535
|
+
return "".concat(Math.round(c(t, 255) * 100), "%");
|
|
536
|
+
};
|
|
537
|
+
return {
|
|
538
|
+
r: r(this.r),
|
|
539
|
+
g: r(this.g),
|
|
540
|
+
b: r(this.b),
|
|
541
|
+
a: this.a
|
|
542
|
+
};
|
|
543
|
+
}, e.prototype.toPercentageRgbString = function() {
|
|
544
|
+
var r = function(t) {
|
|
545
|
+
return Math.round(c(t, 255) * 100);
|
|
546
|
+
};
|
|
547
|
+
return this.a === 1 ? "rgb(".concat(r(this.r), "%, ").concat(r(this.g), "%, ").concat(r(this.b), "%)") : "rgba(".concat(r(this.r), "%, ").concat(r(this.g), "%, ").concat(r(this.b), "%, ").concat(this.roundA, ")");
|
|
548
|
+
}, e.prototype.toName = function() {
|
|
549
|
+
if (this.a === 0)
|
|
550
|
+
return "transparent";
|
|
551
|
+
if (this.a < 1)
|
|
552
|
+
return !1;
|
|
553
|
+
for (var r = "#" + J(this.r, this.g, this.b, !1), t = 0, a = Object.entries(j); t < a.length; t++) {
|
|
554
|
+
var n = a[t], o = n[0], i = n[1];
|
|
555
|
+
if (r === i)
|
|
556
|
+
return o;
|
|
557
|
+
}
|
|
558
|
+
return !1;
|
|
559
|
+
}, e.prototype.toString = function(r) {
|
|
560
|
+
var t = !!r;
|
|
561
|
+
r = r ?? this.format;
|
|
562
|
+
var a = !1, n = this.a < 1 && this.a >= 0, o = !t && n && (r.startsWith("hex") || r === "name");
|
|
563
|
+
return o ? r === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (r === "rgb" && (a = this.toRgbString()), r === "prgb" && (a = this.toPercentageRgbString()), (r === "hex" || r === "hex6") && (a = this.toHexString()), r === "hex3" && (a = this.toHexString(!0)), r === "hex4" && (a = this.toHex8String(!0)), r === "hex8" && (a = this.toHex8String()), r === "name" && (a = this.toName()), r === "hsl" && (a = this.toHslString()), r === "hsv" && (a = this.toHsvString()), a || this.toHexString());
|
|
564
|
+
}, e.prototype.toNumber = function() {
|
|
565
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
566
|
+
}, e.prototype.clone = function() {
|
|
567
|
+
return new e(this.toString());
|
|
568
|
+
}, e.prototype.lighten = function(r) {
|
|
569
|
+
r === void 0 && (r = 10);
|
|
570
|
+
var t = this.toHsl();
|
|
571
|
+
return t.l += r / 100, t.l = A(t.l), new e(t);
|
|
572
|
+
}, e.prototype.brighten = function(r) {
|
|
573
|
+
r === void 0 && (r = 10);
|
|
574
|
+
var t = this.toRgb();
|
|
575
|
+
return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(r / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(r / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(r / 100)))), new e(t);
|
|
576
|
+
}, e.prototype.darken = function(r) {
|
|
577
|
+
r === void 0 && (r = 10);
|
|
578
|
+
var t = this.toHsl();
|
|
579
|
+
return t.l -= r / 100, t.l = A(t.l), new e(t);
|
|
580
|
+
}, e.prototype.tint = function(r) {
|
|
581
|
+
return r === void 0 && (r = 10), this.mix("white", r);
|
|
582
|
+
}, e.prototype.shade = function(r) {
|
|
583
|
+
return r === void 0 && (r = 10), this.mix("black", r);
|
|
584
|
+
}, e.prototype.desaturate = function(r) {
|
|
585
|
+
r === void 0 && (r = 10);
|
|
586
|
+
var t = this.toHsl();
|
|
587
|
+
return t.s -= r / 100, t.s = A(t.s), new e(t);
|
|
588
|
+
}, e.prototype.saturate = function(r) {
|
|
589
|
+
r === void 0 && (r = 10);
|
|
590
|
+
var t = this.toHsl();
|
|
591
|
+
return t.s += r / 100, t.s = A(t.s), new e(t);
|
|
592
|
+
}, e.prototype.greyscale = function() {
|
|
593
|
+
return this.desaturate(100);
|
|
594
|
+
}, e.prototype.spin = function(r) {
|
|
595
|
+
var t = this.toHsl(), a = (t.h + r) % 360;
|
|
596
|
+
return t.h = a < 0 ? 360 + a : a, new e(t);
|
|
597
|
+
}, e.prototype.mix = function(r, t) {
|
|
598
|
+
t === void 0 && (t = 50);
|
|
599
|
+
var a = this.toRgb(), n = new e(r).toRgb(), o = t / 100, i = {
|
|
600
|
+
r: (n.r - a.r) * o + a.r,
|
|
601
|
+
g: (n.g - a.g) * o + a.g,
|
|
602
|
+
b: (n.b - a.b) * o + a.b,
|
|
603
|
+
a: (n.a - a.a) * o + a.a
|
|
604
|
+
};
|
|
605
|
+
return new e(i);
|
|
606
|
+
}, e.prototype.analogous = function(r, t) {
|
|
607
|
+
r === void 0 && (r = 6), t === void 0 && (t = 30);
|
|
608
|
+
var a = this.toHsl(), n = 360 / t, o = [this];
|
|
609
|
+
for (a.h = (a.h - (n * r >> 1) + 720) % 360; --r; )
|
|
610
|
+
a.h = (a.h + n) % 360, o.push(new e(a));
|
|
611
|
+
return o;
|
|
612
|
+
}, e.prototype.complement = function() {
|
|
613
|
+
var r = this.toHsl();
|
|
614
|
+
return r.h = (r.h + 180) % 360, new e(r);
|
|
615
|
+
}, e.prototype.monochromatic = function(r) {
|
|
616
|
+
r === void 0 && (r = 6);
|
|
617
|
+
for (var t = this.toHsv(), a = t.h, n = t.s, o = t.v, i = [], s = 1 / r; r--; )
|
|
618
|
+
i.push(new e({ h: a, s: n, v: o })), o = (o + s) % 1;
|
|
619
|
+
return i;
|
|
620
|
+
}, e.prototype.splitcomplement = function() {
|
|
621
|
+
var r = this.toHsl(), t = r.h;
|
|
622
|
+
return [
|
|
623
|
+
this,
|
|
624
|
+
new e({ h: (t + 72) % 360, s: r.s, l: r.l }),
|
|
625
|
+
new e({ h: (t + 216) % 360, s: r.s, l: r.l })
|
|
626
|
+
];
|
|
627
|
+
}, e.prototype.onBackground = function(r) {
|
|
628
|
+
var t = this.toRgb(), a = new e(r).toRgb(), n = t.a + a.a * (1 - t.a);
|
|
629
|
+
return new e({
|
|
630
|
+
r: (t.r * t.a + a.r * a.a * (1 - t.a)) / n,
|
|
631
|
+
g: (t.g * t.a + a.g * a.a * (1 - t.a)) / n,
|
|
632
|
+
b: (t.b * t.a + a.b * a.a * (1 - t.a)) / n,
|
|
633
|
+
a: n
|
|
634
|
+
});
|
|
635
|
+
}, e.prototype.triad = function() {
|
|
636
|
+
return this.polyad(3);
|
|
637
|
+
}, e.prototype.tetrad = function() {
|
|
638
|
+
return this.polyad(4);
|
|
639
|
+
}, e.prototype.polyad = function(r) {
|
|
640
|
+
for (var t = this.toHsl(), a = t.h, n = [this], o = 360 / r, i = 1; i < r; i++)
|
|
641
|
+
n.push(new e({ h: (a + i * o) % 360, s: t.s, l: t.l }));
|
|
642
|
+
return n;
|
|
643
|
+
}, e.prototype.equals = function(r) {
|
|
644
|
+
return this.toRgbString() === new e(r).toRgbString();
|
|
645
|
+
}, e;
|
|
646
|
+
})()
|
|
647
|
+
);
|
|
648
|
+
function k(e, r = 20) {
|
|
649
|
+
return e.mix("#141414", r).toString();
|
|
650
|
+
}
|
|
651
|
+
function Gt(e) {
|
|
652
|
+
const r = Y(), t = D("button");
|
|
653
|
+
return b(() => {
|
|
654
|
+
let a = {}, n = e.color;
|
|
655
|
+
if (n) {
|
|
656
|
+
const o = n.match(/var\((.*?)\)/);
|
|
657
|
+
o && (n = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));
|
|
658
|
+
const i = new zt(n), s = e.dark ? i.tint(20).toString() : k(i, 20);
|
|
659
|
+
if (e.plain)
|
|
660
|
+
a = t.cssVarBlock({
|
|
661
|
+
"bg-color": e.dark ? k(i, 90) : i.tint(90).toString(),
|
|
662
|
+
"text-color": n,
|
|
663
|
+
"border-color": e.dark ? k(i, 50) : i.tint(50).toString(),
|
|
664
|
+
"hover-text-color": `var(${t.cssVarName("color-white")})`,
|
|
665
|
+
"hover-bg-color": n,
|
|
666
|
+
"hover-border-color": n,
|
|
667
|
+
"active-bg-color": s,
|
|
668
|
+
"active-text-color": `var(${t.cssVarName("color-white")})`,
|
|
669
|
+
"active-border-color": s
|
|
670
|
+
}), r.value && (a[t.cssVarBlockName("disabled-bg-color")] = e.dark ? k(i, 90) : i.tint(90).toString(), a[t.cssVarBlockName("disabled-text-color")] = e.dark ? k(i, 50) : i.tint(50).toString(), a[t.cssVarBlockName("disabled-border-color")] = e.dark ? k(i, 80) : i.tint(80).toString());
|
|
671
|
+
else {
|
|
672
|
+
const l = e.dark ? k(i, 30) : i.tint(30).toString(), p = i.isDark() ? `var(${t.cssVarName("color-white")})` : `var(${t.cssVarName("color-black")})`;
|
|
673
|
+
if (a = t.cssVarBlock({
|
|
674
|
+
"bg-color": n,
|
|
675
|
+
"text-color": p,
|
|
676
|
+
"border-color": n,
|
|
677
|
+
"hover-bg-color": l,
|
|
678
|
+
"hover-text-color": p,
|
|
679
|
+
"hover-border-color": l,
|
|
680
|
+
"active-bg-color": s,
|
|
681
|
+
"active-border-color": s
|
|
682
|
+
}), r.value) {
|
|
683
|
+
const m = e.dark ? k(i, 50) : i.tint(50).toString();
|
|
684
|
+
a[t.cssVarBlockName("disabled-bg-color")] = m, a[t.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${t.cssVarName("color-white")})`, a[t.cssVarBlockName("disabled-border-color")] = m;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
return a;
|
|
689
|
+
});
|
|
690
|
+
}
|
|
691
|
+
const jt = X({
|
|
692
|
+
name: "ElButton",
|
|
693
|
+
__name: "button",
|
|
694
|
+
props: G,
|
|
695
|
+
emits: Bt,
|
|
696
|
+
setup(e, { expose: r, emit: t }) {
|
|
697
|
+
const a = e, n = t, o = Gt(a), i = D("button"), {
|
|
698
|
+
_ref: s,
|
|
699
|
+
_size: l,
|
|
700
|
+
_type: p,
|
|
701
|
+
_disabled: m,
|
|
702
|
+
_props: w,
|
|
703
|
+
_plain: T,
|
|
704
|
+
_round: F,
|
|
705
|
+
_text: I,
|
|
706
|
+
shouldAddSpace: B,
|
|
707
|
+
handleClick: O
|
|
708
|
+
} = Mt(a, n), u = b(() => [
|
|
709
|
+
i.b(),
|
|
710
|
+
i.m(p.value),
|
|
711
|
+
i.m(l.value),
|
|
712
|
+
i.is("disabled", m.value),
|
|
713
|
+
i.is("loading", a.loading),
|
|
714
|
+
i.is("plain", T.value),
|
|
715
|
+
i.is("round", F.value),
|
|
716
|
+
i.is("circle", a.circle),
|
|
717
|
+
i.is("text", I.value),
|
|
718
|
+
i.is("link", a.link),
|
|
719
|
+
i.is("has-bg", a.bg)
|
|
720
|
+
]);
|
|
721
|
+
return r({
|
|
722
|
+
ref: s,
|
|
723
|
+
size: l,
|
|
724
|
+
type: p,
|
|
725
|
+
disabled: m,
|
|
726
|
+
shouldAddSpace: B
|
|
727
|
+
}), (f, h) => (x(), _(N(f.tag), lt({
|
|
728
|
+
ref_key: "_ref",
|
|
729
|
+
ref: s
|
|
730
|
+
}, v(w), {
|
|
731
|
+
class: u.value,
|
|
732
|
+
style: v(o),
|
|
733
|
+
onClick: v(O)
|
|
734
|
+
}), {
|
|
735
|
+
default: E(() => [
|
|
736
|
+
f.loading ? (x(), $(
|
|
737
|
+
ct,
|
|
738
|
+
{ key: 0 },
|
|
739
|
+
[
|
|
740
|
+
f.$slots.loading ? R(f.$slots, "loading", { key: 0 }) : (x(), _(v(K), {
|
|
741
|
+
key: 1,
|
|
742
|
+
class: z(v(i).is("loading"))
|
|
743
|
+
}, {
|
|
744
|
+
default: E(() => [
|
|
745
|
+
(x(), _(N(f.loadingIcon)))
|
|
746
|
+
]),
|
|
747
|
+
_: 1
|
|
748
|
+
}, 8, ["class"]))
|
|
749
|
+
],
|
|
750
|
+
64
|
|
751
|
+
)) : f.icon || f.$slots.icon ? (x(), _(v(K), { key: 1 }, {
|
|
752
|
+
default: E(() => [
|
|
753
|
+
f.icon ? (x(), _(N(f.icon), { key: 0 })) : R(f.$slots, "icon", { key: 1 })
|
|
754
|
+
]),
|
|
755
|
+
_: 3
|
|
756
|
+
})) : W("v-if", !0),
|
|
757
|
+
f.$slots.default ? (x(), $(
|
|
758
|
+
"span",
|
|
759
|
+
{
|
|
760
|
+
key: 2,
|
|
761
|
+
class: z({ [v(i).em("text", "expand")]: v(B) })
|
|
762
|
+
},
|
|
763
|
+
[
|
|
764
|
+
R(f.$slots, "default")
|
|
765
|
+
],
|
|
766
|
+
2
|
|
767
|
+
)) : W("v-if", !0)
|
|
768
|
+
]),
|
|
769
|
+
_: 3
|
|
770
|
+
}, 16, ["class", "style", "onClick"]));
|
|
771
|
+
}
|
|
772
|
+
});
|
|
773
|
+
var Dt = /* @__PURE__ */ et(jt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
|
|
774
|
+
const Ot = {
|
|
775
|
+
size: G.size,
|
|
776
|
+
type: G.type,
|
|
777
|
+
direction: {
|
|
778
|
+
type: tt(String),
|
|
779
|
+
values: ["horizontal", "vertical"],
|
|
780
|
+
default: "horizontal"
|
|
781
|
+
}
|
|
782
|
+
}, Wt = X({
|
|
783
|
+
name: "ElButtonGroup",
|
|
784
|
+
__name: "button-group",
|
|
785
|
+
props: Ot,
|
|
786
|
+
setup(e) {
|
|
787
|
+
const r = e;
|
|
788
|
+
ht(
|
|
789
|
+
rt,
|
|
790
|
+
dt({
|
|
791
|
+
size: U(r, "size"),
|
|
792
|
+
type: U(r, "type")
|
|
793
|
+
})
|
|
794
|
+
);
|
|
795
|
+
const t = D("button");
|
|
796
|
+
return (a, n) => (x(), $(
|
|
797
|
+
"div",
|
|
798
|
+
{
|
|
799
|
+
class: z([v(t).b("group"), v(t).bm("group", r.direction)])
|
|
800
|
+
},
|
|
801
|
+
[
|
|
802
|
+
R(a.$slots, "default")
|
|
803
|
+
],
|
|
804
|
+
2
|
|
805
|
+
));
|
|
806
|
+
}
|
|
807
|
+
});
|
|
808
|
+
var nt = /* @__PURE__ */ et(Wt, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
|
|
809
|
+
const Zt = yt(Dt, {
|
|
810
|
+
ButtonGroup: nt
|
|
811
|
+
});
|
|
812
|
+
kt(nt);
|
|
813
|
+
export {
|
|
814
|
+
Zt as E
|
|
815
|
+
};
|