jmash-core 0.1.13 → 0.1.15
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/README.md +57 -57
- package/dist/{401-BcGTgHAm.mjs → 401-C-Z61lLd.mjs} +2 -2
- package/dist/{404-CnraIJ2H.mjs → 404-B0xdJSOl.mjs} +8 -8
- package/dist/{BarChart-DJ-wSXB4.mjs → BarChart-CVVuHHkX.mjs} +2 -2
- package/dist/{index-BjBVwnHW.mjs → index-Bd-9PguH.mjs} +8808 -8451
- package/dist/index-BeclKUkp.mjs +26 -0
- package/dist/{index-VZhyMSwH.mjs → index-CJ7wU_M7.mjs} +13 -13
- package/dist/{index-Dbzm9SAW.mjs → index-CQK8n-wP.mjs} +18 -18
- package/dist/{index-DhsGavW6.mjs → index-DI57cJJp.mjs} +81 -74
- package/dist/{index-C8JpbA4n.mjs → index-D_w6Hgrj.mjs} +17 -17
- package/dist/index.mjs +61 -57
- package/dist/{profile-DlEftq9N.mjs → profile-6d2duxJR.mjs} +2 -2
- package/dist/{runAs-CgbfNv4R.mjs → runAs-faf8rkih.mjs} +1 -1
- package/dist/runAs.vue_vue_type_script_setup_true_lang-owDiLD86.mjs +2610 -0
- package/dist/style.css +1 -1
- package/dist/{types-CaRkLleQ.mjs → types-3onZoSqF.mjs} +41 -38
- package/dist/{updatePwd-B2hzJU2l.mjs → updatePwd-Bje9j_CP.mjs} +1 -1
- package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-DDjbAy5V.mjs → updatePwd.vue_vue_type_script_setup_true_lang-Z21pA8yn.mjs} +1 -1
- package/dts/src/api/auth/index.d.ts +8 -2
- package/dts/src/api/auth/types.d.ts +26 -0
- package/dts/src/components/RegisterForm/index.vue.d.ts +2 -0
- package/dts/src/index.d.ts +11 -9
- package/dts/src/lang/package/zh-cn.d.ts +27 -0
- package/dts/src/router/index.d.ts +1 -0
- package/dts/src/settings.d.ts +3 -1
- package/dts/src/types/index.d.ts +1 -0
- package/dts/src/views/register/index.vue.d.ts +2 -0
- package/package.json +3 -3
- package/dist/runAs.vue_vue_type_script_setup_true_lang-msF4q50T.mjs +0 -2558
|
@@ -0,0 +1,2610 @@
|
|
|
1
|
+
import { I as Gn, J as jn, K as hn, L as Xn, M as $t, N as mn, O as yt, P as gn, Q as Ht, R as qn, U as ye, V as Vt, W as Jn, X as et, Y as de, Z as oe, $ as Zn, a0 as Ie, a1 as Qn, a2 as bn, a3 as eo, a4 as to, a5 as no, a6 as oo, a7 as rt, a8 as Be, a9 as Le, aa as fe, ab as ao, ac as ro, ad as so, ae as io, af as ie, ag as We, ah as qe, ai as yn, aj as Et, ak as wt, al as lo, am as ft, an as uo, ao as zt, ap as Dt, aq as co, ar as fo, as as vo, at as po, au as ho, av as mo, aw as Ut, ax as Kt, ay as Wt, az as go, b as Fe, aA as bo, aB as yo, _ as Eo, aC as wo, E as So } from "./index-Bd-9PguH.mjs";
|
|
2
|
+
import { computed as y, getCurrentInstance as Re, inject as ve, unref as d, ref as x, onMounted as pe, watch as G, toRef as Je, onUnmounted as Co, shallowRef as Ye, nextTick as D, defineComponent as Q, useAttrs as To, useSlots as En, createElementBlock as L, openBlock as b, normalizeStyle as Ze, normalizeClass as S, createCommentVNode as I, Fragment as Ge, createElementVNode as H, renderSlot as Y, createBlock as A, withCtx as B, resolveDynamicComponent as K, mergeProps as vt, withModifiers as ke, toDisplayString as W, onBeforeUnmount as Pe, provide as wn, Text as ko, reactive as St, createVNode as Z, h as Io, watchEffect as Mo, isRef as Ao, onScopeDispose as xo, markRaw as pt, toRefs as Bo, resolveComponent as ge, Transition as No, withDirectives as Me, withKeys as $e, vShow as Ae, createTextVNode as xe, isVNode as Sn, render as Cn, useModel as Lo } from "vue";
|
|
3
|
+
function Ro(e) {
|
|
4
|
+
return e;
|
|
5
|
+
}
|
|
6
|
+
function Po(e, t, n) {
|
|
7
|
+
switch (n.length) {
|
|
8
|
+
case 0:
|
|
9
|
+
return e.call(t);
|
|
10
|
+
case 1:
|
|
11
|
+
return e.call(t, n[0]);
|
|
12
|
+
case 2:
|
|
13
|
+
return e.call(t, n[0], n[1]);
|
|
14
|
+
case 3:
|
|
15
|
+
return e.call(t, n[0], n[1], n[2]);
|
|
16
|
+
}
|
|
17
|
+
return e.apply(t, n);
|
|
18
|
+
}
|
|
19
|
+
var Oo = 800, _o = 16, Fo = Date.now;
|
|
20
|
+
function $o(e) {
|
|
21
|
+
var t = 0, n = 0;
|
|
22
|
+
return function() {
|
|
23
|
+
var o = Fo(), a = _o - (o - n);
|
|
24
|
+
if (n = o, a > 0) {
|
|
25
|
+
if (++t >= Oo)
|
|
26
|
+
return arguments[0];
|
|
27
|
+
} else
|
|
28
|
+
t = 0;
|
|
29
|
+
return e.apply(void 0, arguments);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
function Ho(e) {
|
|
33
|
+
return function() {
|
|
34
|
+
return e;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
var Qe = function() {
|
|
38
|
+
try {
|
|
39
|
+
var e = Gn(Object, "defineProperty");
|
|
40
|
+
return e({}, "", {}), e;
|
|
41
|
+
} catch {
|
|
42
|
+
}
|
|
43
|
+
}(), Vo = Qe ? function(e, t) {
|
|
44
|
+
return Qe(e, "toString", {
|
|
45
|
+
configurable: !0,
|
|
46
|
+
enumerable: !1,
|
|
47
|
+
value: Ho(t),
|
|
48
|
+
writable: !0
|
|
49
|
+
});
|
|
50
|
+
} : Ro, zo = $o(Vo), Do = 9007199254740991, Uo = /^(?:0|[1-9]\d*)$/;
|
|
51
|
+
function Tn(e, t) {
|
|
52
|
+
var n = typeof e;
|
|
53
|
+
return t = t ?? Do, !!t && (n == "number" || n != "symbol" && Uo.test(e)) && e > -1 && e % 1 == 0 && e < t;
|
|
54
|
+
}
|
|
55
|
+
function Ko(e, t, n) {
|
|
56
|
+
t == "__proto__" && Qe ? Qe(e, t, {
|
|
57
|
+
configurable: !0,
|
|
58
|
+
enumerable: !0,
|
|
59
|
+
value: n,
|
|
60
|
+
writable: !0
|
|
61
|
+
}) : e[t] = n;
|
|
62
|
+
}
|
|
63
|
+
var Wo = Object.prototype, Yo = Wo.hasOwnProperty;
|
|
64
|
+
function Go(e, t, n) {
|
|
65
|
+
var o = e[t];
|
|
66
|
+
(!(Yo.call(e, t) && jn(o, n)) || n === void 0 && !(t in e)) && Ko(e, t, n);
|
|
67
|
+
}
|
|
68
|
+
var Yt = Math.max;
|
|
69
|
+
function jo(e, t, n) {
|
|
70
|
+
return t = Yt(t === void 0 ? e.length - 1 : t, 0), function() {
|
|
71
|
+
for (var o = arguments, a = -1, r = Yt(o.length - t, 0), s = Array(r); ++a < r; )
|
|
72
|
+
s[a] = o[t + a];
|
|
73
|
+
a = -1;
|
|
74
|
+
for (var i = Array(t + 1); ++a < t; )
|
|
75
|
+
i[a] = o[a];
|
|
76
|
+
return i[t] = n(s), Po(e, this, i);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
var Xo = 9007199254740991;
|
|
80
|
+
function qo(e) {
|
|
81
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Xo;
|
|
82
|
+
}
|
|
83
|
+
var Jo = "[object Arguments]";
|
|
84
|
+
function Gt(e) {
|
|
85
|
+
return hn(e) && Xn(e) == Jo;
|
|
86
|
+
}
|
|
87
|
+
var kn = Object.prototype, Zo = kn.hasOwnProperty, Qo = kn.propertyIsEnumerable, In = Gt(/* @__PURE__ */ function() {
|
|
88
|
+
return arguments;
|
|
89
|
+
}()) ? Gt : function(e) {
|
|
90
|
+
return hn(e) && Zo.call(e, "callee") && !Qo.call(e, "callee");
|
|
91
|
+
};
|
|
92
|
+
function ea(e, t) {
|
|
93
|
+
for (var n = -1, o = t.length, a = e.length; ++n < o; )
|
|
94
|
+
e[a + n] = t[n];
|
|
95
|
+
return e;
|
|
96
|
+
}
|
|
97
|
+
var jt = $t ? $t.isConcatSpreadable : void 0;
|
|
98
|
+
function ta(e) {
|
|
99
|
+
return mn(e) || In(e) || !!(jt && e && e[jt]);
|
|
100
|
+
}
|
|
101
|
+
function na(e, t, n, o, a) {
|
|
102
|
+
var r = -1, s = e.length;
|
|
103
|
+
for (n || (n = ta), a || (a = []); ++r < s; ) {
|
|
104
|
+
var i = e[r];
|
|
105
|
+
n(i) ? ea(a, i) : a[a.length] = i;
|
|
106
|
+
}
|
|
107
|
+
return a;
|
|
108
|
+
}
|
|
109
|
+
function oa(e) {
|
|
110
|
+
var t = e == null ? 0 : e.length;
|
|
111
|
+
return t ? na(e) : [];
|
|
112
|
+
}
|
|
113
|
+
function aa(e) {
|
|
114
|
+
return zo(jo(e, void 0, oa), e + "");
|
|
115
|
+
}
|
|
116
|
+
function ra(e, t) {
|
|
117
|
+
return e != null && t in Object(e);
|
|
118
|
+
}
|
|
119
|
+
function sa(e, t, n) {
|
|
120
|
+
t = yt(t, e);
|
|
121
|
+
for (var o = -1, a = t.length, r = !1; ++o < a; ) {
|
|
122
|
+
var s = gn(t[o]);
|
|
123
|
+
if (!(r = e != null && n(e, s)))
|
|
124
|
+
break;
|
|
125
|
+
e = e[s];
|
|
126
|
+
}
|
|
127
|
+
return r || ++o != a ? r : (a = e == null ? 0 : e.length, !!a && qo(a) && Tn(s, a) && (mn(e) || In(e)));
|
|
128
|
+
}
|
|
129
|
+
function ia(e, t) {
|
|
130
|
+
return e != null && sa(e, t, ra);
|
|
131
|
+
}
|
|
132
|
+
function Mn(e) {
|
|
133
|
+
return e == null;
|
|
134
|
+
}
|
|
135
|
+
function la(e, t, n, o) {
|
|
136
|
+
if (!Ht(e))
|
|
137
|
+
return e;
|
|
138
|
+
t = yt(t, e);
|
|
139
|
+
for (var a = -1, r = t.length, s = r - 1, i = e; i != null && ++a < r; ) {
|
|
140
|
+
var f = gn(t[a]), u = n;
|
|
141
|
+
if (f === "__proto__" || f === "constructor" || f === "prototype")
|
|
142
|
+
return e;
|
|
143
|
+
if (a != s) {
|
|
144
|
+
var h = i[f];
|
|
145
|
+
u = void 0, u === void 0 && (u = Ht(h) ? h : Tn(t[a + 1]) ? [] : {});
|
|
146
|
+
}
|
|
147
|
+
Go(i, f, u), i = i[f];
|
|
148
|
+
}
|
|
149
|
+
return e;
|
|
150
|
+
}
|
|
151
|
+
function ua(e, t, n) {
|
|
152
|
+
for (var o = -1, a = t.length, r = {}; ++o < a; ) {
|
|
153
|
+
var s = t[o], i = qn(e, s);
|
|
154
|
+
n(i, s) && la(r, yt(s, e), i);
|
|
155
|
+
}
|
|
156
|
+
return r;
|
|
157
|
+
}
|
|
158
|
+
function ca(e, t) {
|
|
159
|
+
return ua(e, t, function(n, o) {
|
|
160
|
+
return ia(e, o);
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
var da = aa(function(e, t) {
|
|
164
|
+
return e == null ? {} : ca(e, t);
|
|
165
|
+
});
|
|
166
|
+
const je = "update:modelValue", Xt = "change", st = "input";
|
|
167
|
+
let He;
|
|
168
|
+
const fa = (e) => {
|
|
169
|
+
var t;
|
|
170
|
+
if (!ye)
|
|
171
|
+
return 0;
|
|
172
|
+
if (He !== void 0)
|
|
173
|
+
return He;
|
|
174
|
+
const n = document.createElement("div");
|
|
175
|
+
n.className = `${e}-scrollbar__wrap`, n.style.visibility = "hidden", n.style.width = "100px", n.style.position = "absolute", n.style.top = "-9999px", document.body.appendChild(n);
|
|
176
|
+
const o = n.offsetWidth;
|
|
177
|
+
n.style.overflow = "scroll";
|
|
178
|
+
const a = document.createElement("div");
|
|
179
|
+
a.style.width = "100%", n.appendChild(a);
|
|
180
|
+
const r = a.offsetWidth;
|
|
181
|
+
return (t = n.parentNode) == null || t.removeChild(n), He = o - r, He;
|
|
182
|
+
};
|
|
183
|
+
class va extends Error {
|
|
184
|
+
constructor(t) {
|
|
185
|
+
super(t), this.name = "ElementPlusError";
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function pa(e, t) {
|
|
189
|
+
throw new va(`[${e}] ${t}`);
|
|
190
|
+
}
|
|
191
|
+
let z;
|
|
192
|
+
const ha = {
|
|
193
|
+
height: "0",
|
|
194
|
+
visibility: "hidden",
|
|
195
|
+
overflow: Jn() ? "" : "hidden",
|
|
196
|
+
position: "absolute",
|
|
197
|
+
"z-index": "-1000",
|
|
198
|
+
top: "0",
|
|
199
|
+
right: "0"
|
|
200
|
+
}, ma = [
|
|
201
|
+
"letter-spacing",
|
|
202
|
+
"line-height",
|
|
203
|
+
"padding-top",
|
|
204
|
+
"padding-bottom",
|
|
205
|
+
"font-family",
|
|
206
|
+
"font-weight",
|
|
207
|
+
"font-size",
|
|
208
|
+
"text-rendering",
|
|
209
|
+
"text-transform",
|
|
210
|
+
"width",
|
|
211
|
+
"text-indent",
|
|
212
|
+
"padding-left",
|
|
213
|
+
"padding-right",
|
|
214
|
+
"border-width",
|
|
215
|
+
"box-sizing",
|
|
216
|
+
"word-break"
|
|
217
|
+
], qt = (e) => {
|
|
218
|
+
const t = Number.parseFloat(e);
|
|
219
|
+
return Number.isNaN(t) ? e : t;
|
|
220
|
+
};
|
|
221
|
+
function ga(e) {
|
|
222
|
+
const t = window.getComputedStyle(e), n = t.getPropertyValue("box-sizing"), o = Number.parseFloat(t.getPropertyValue("padding-bottom")) + Number.parseFloat(t.getPropertyValue("padding-top")), a = Number.parseFloat(t.getPropertyValue("border-bottom-width")) + Number.parseFloat(t.getPropertyValue("border-top-width"));
|
|
223
|
+
return { contextStyle: ma.map((s) => [
|
|
224
|
+
s,
|
|
225
|
+
t.getPropertyValue(s)
|
|
226
|
+
]), paddingSize: o, borderSize: a, boxSizing: n };
|
|
227
|
+
}
|
|
228
|
+
function Jt(e, t = 1, n) {
|
|
229
|
+
var o, a;
|
|
230
|
+
z || (z = document.createElement("textarea"), ((o = e.parentNode) != null ? o : document.body).appendChild(z));
|
|
231
|
+
const { paddingSize: r, borderSize: s, boxSizing: i, contextStyle: f } = ga(e);
|
|
232
|
+
f.forEach(([w, p]) => z == null ? void 0 : z.style.setProperty(w, p)), Object.entries(ha).forEach(([w, p]) => z == null ? void 0 : z.style.setProperty(w, p, "important")), z.value = e.value || e.placeholder || "";
|
|
233
|
+
let u = z.scrollHeight;
|
|
234
|
+
const h = {};
|
|
235
|
+
i === "border-box" ? u = u + s : i === "content-box" && (u = u - r), z.value = "";
|
|
236
|
+
const E = z.scrollHeight - r;
|
|
237
|
+
if (Vt(t)) {
|
|
238
|
+
let w = E * t;
|
|
239
|
+
i === "border-box" && (w = w + r + s), u = Math.max(w, u), h.minHeight = `${w}px`;
|
|
240
|
+
}
|
|
241
|
+
if (Vt(n)) {
|
|
242
|
+
let w = E * n;
|
|
243
|
+
i === "border-box" && (w = w + r + s), u = Math.min(w, u);
|
|
244
|
+
}
|
|
245
|
+
return h.height = `${u}px`, (a = z.parentNode) == null || a.removeChild(z), z = void 0, h;
|
|
246
|
+
}
|
|
247
|
+
const ba = et({
|
|
248
|
+
ariaLabel: String,
|
|
249
|
+
ariaOrientation: {
|
|
250
|
+
type: String,
|
|
251
|
+
values: ["horizontal", "vertical", "undefined"]
|
|
252
|
+
},
|
|
253
|
+
ariaControls: String
|
|
254
|
+
}), ya = (e) => da(ba, e), Ea = et({
|
|
255
|
+
id: {
|
|
256
|
+
type: String,
|
|
257
|
+
default: void 0
|
|
258
|
+
},
|
|
259
|
+
size: bn,
|
|
260
|
+
disabled: Boolean,
|
|
261
|
+
modelValue: {
|
|
262
|
+
type: oe([
|
|
263
|
+
String,
|
|
264
|
+
Number,
|
|
265
|
+
Object
|
|
266
|
+
]),
|
|
267
|
+
default: ""
|
|
268
|
+
},
|
|
269
|
+
modelModifiers: {
|
|
270
|
+
type: oe(Object),
|
|
271
|
+
default: () => ({})
|
|
272
|
+
},
|
|
273
|
+
maxlength: {
|
|
274
|
+
type: [String, Number]
|
|
275
|
+
},
|
|
276
|
+
minlength: {
|
|
277
|
+
type: [String, Number]
|
|
278
|
+
},
|
|
279
|
+
type: {
|
|
280
|
+
type: String,
|
|
281
|
+
default: "text"
|
|
282
|
+
},
|
|
283
|
+
resize: {
|
|
284
|
+
type: String,
|
|
285
|
+
values: ["none", "both", "horizontal", "vertical"]
|
|
286
|
+
},
|
|
287
|
+
autosize: {
|
|
288
|
+
type: oe([Boolean, Object]),
|
|
289
|
+
default: !1
|
|
290
|
+
},
|
|
291
|
+
autocomplete: {
|
|
292
|
+
type: oe(String),
|
|
293
|
+
default: "off"
|
|
294
|
+
},
|
|
295
|
+
formatter: {
|
|
296
|
+
type: Function
|
|
297
|
+
},
|
|
298
|
+
parser: {
|
|
299
|
+
type: Function
|
|
300
|
+
},
|
|
301
|
+
placeholder: {
|
|
302
|
+
type: String
|
|
303
|
+
},
|
|
304
|
+
form: {
|
|
305
|
+
type: String
|
|
306
|
+
},
|
|
307
|
+
readonly: Boolean,
|
|
308
|
+
clearable: Boolean,
|
|
309
|
+
clearIcon: {
|
|
310
|
+
type: Ie,
|
|
311
|
+
default: Qn
|
|
312
|
+
},
|
|
313
|
+
showPassword: Boolean,
|
|
314
|
+
showWordLimit: Boolean,
|
|
315
|
+
wordLimitPosition: {
|
|
316
|
+
type: String,
|
|
317
|
+
values: ["inside", "outside"],
|
|
318
|
+
default: "inside"
|
|
319
|
+
},
|
|
320
|
+
suffixIcon: {
|
|
321
|
+
type: Ie
|
|
322
|
+
},
|
|
323
|
+
prefixIcon: {
|
|
324
|
+
type: Ie
|
|
325
|
+
},
|
|
326
|
+
containerRole: {
|
|
327
|
+
type: String,
|
|
328
|
+
default: void 0
|
|
329
|
+
},
|
|
330
|
+
tabindex: {
|
|
331
|
+
type: [String, Number],
|
|
332
|
+
default: 0
|
|
333
|
+
},
|
|
334
|
+
validateEvent: {
|
|
335
|
+
type: Boolean,
|
|
336
|
+
default: !0
|
|
337
|
+
},
|
|
338
|
+
inputStyle: {
|
|
339
|
+
type: oe([Object, Array, String]),
|
|
340
|
+
default: () => Zn({})
|
|
341
|
+
},
|
|
342
|
+
autofocus: Boolean,
|
|
343
|
+
rows: {
|
|
344
|
+
type: Number,
|
|
345
|
+
default: 2
|
|
346
|
+
},
|
|
347
|
+
...ya(["ariaLabel"]),
|
|
348
|
+
inputmode: {
|
|
349
|
+
type: oe(String),
|
|
350
|
+
default: void 0
|
|
351
|
+
},
|
|
352
|
+
name: String
|
|
353
|
+
}), wa = {
|
|
354
|
+
[je]: (e) => de(e),
|
|
355
|
+
input: (e) => de(e),
|
|
356
|
+
change: (e) => de(e),
|
|
357
|
+
focus: (e) => e instanceof FocusEvent,
|
|
358
|
+
blur: (e) => e instanceof FocusEvent,
|
|
359
|
+
clear: () => !0,
|
|
360
|
+
mouseleave: (e) => e instanceof MouseEvent,
|
|
361
|
+
mouseenter: (e) => e instanceof MouseEvent,
|
|
362
|
+
keydown: (e) => e instanceof Event,
|
|
363
|
+
compositionstart: (e) => e instanceof CompositionEvent,
|
|
364
|
+
compositionupdate: (e) => e instanceof CompositionEvent,
|
|
365
|
+
compositionend: (e) => e instanceof CompositionEvent
|
|
366
|
+
}, Sa = ["class", "style"], Ca = /^on[A-Z]/, Ta = (e = {}) => {
|
|
367
|
+
const { excludeListeners: t = !1, excludeKeys: n } = e, o = y(() => ((n == null ? void 0 : n.value) || []).concat(Sa)), a = Re();
|
|
368
|
+
return a ? y(() => {
|
|
369
|
+
var r;
|
|
370
|
+
return eo(Object.entries((r = a.proxy) == null ? void 0 : r.$attrs).filter(([s]) => !o.value.includes(s) && !(t && Ca.test(s))));
|
|
371
|
+
}) : y(() => ({}));
|
|
372
|
+
}, Zt = {
|
|
373
|
+
prefix: Math.floor(Math.random() * 1e4),
|
|
374
|
+
current: 0
|
|
375
|
+
}, ka = Symbol("elIdInjection"), Ia = () => Re() ? ve(ka, Zt) : Zt, ht = (e) => {
|
|
376
|
+
const t = Ia(), n = to();
|
|
377
|
+
return no(() => d(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
|
|
378
|
+
}, Ct = Symbol("formContextKey"), An = Symbol("formItemContextKey"), xn = () => {
|
|
379
|
+
const e = ve(Ct, void 0), t = ve(An, void 0);
|
|
380
|
+
return {
|
|
381
|
+
form: e,
|
|
382
|
+
formItem: t
|
|
383
|
+
};
|
|
384
|
+
}, Ma = (e, {
|
|
385
|
+
formItemContext: t,
|
|
386
|
+
disableIdGeneration: n,
|
|
387
|
+
disableIdManagement: o
|
|
388
|
+
}) => {
|
|
389
|
+
n || (n = x(!1)), o || (o = x(!1));
|
|
390
|
+
const a = Re(), r = () => {
|
|
391
|
+
let u = a == null ? void 0 : a.parent;
|
|
392
|
+
for (; u; ) {
|
|
393
|
+
if (u.type.name === "ElFormItem")
|
|
394
|
+
return !1;
|
|
395
|
+
if (u.type.name === "ElLabelWrap")
|
|
396
|
+
return !0;
|
|
397
|
+
u = u.parent;
|
|
398
|
+
}
|
|
399
|
+
return !1;
|
|
400
|
+
}, s = x();
|
|
401
|
+
let i;
|
|
402
|
+
const f = y(() => {
|
|
403
|
+
var u;
|
|
404
|
+
return !!(!(e.label || e.ariaLabel) && t && t.inputIds && ((u = t.inputIds) == null ? void 0 : u.length) <= 1);
|
|
405
|
+
});
|
|
406
|
+
return pe(() => {
|
|
407
|
+
i = G([Je(e, "id"), n], ([u, h]) => {
|
|
408
|
+
const E = u ?? (h ? void 0 : ht().value);
|
|
409
|
+
E !== s.value && (t != null && t.removeInputId && !r() && (s.value && t.removeInputId(s.value), !(o != null && o.value) && !h && E && t.addInputId(E)), s.value = E);
|
|
410
|
+
}, { immediate: !0 });
|
|
411
|
+
}), Co(() => {
|
|
412
|
+
i && i(), t != null && t.removeInputId && s.value && t.removeInputId(s.value);
|
|
413
|
+
}), {
|
|
414
|
+
isLabeledByFormItem: f,
|
|
415
|
+
inputId: s
|
|
416
|
+
};
|
|
417
|
+
}, Bn = (e) => {
|
|
418
|
+
const t = Re();
|
|
419
|
+
return y(() => {
|
|
420
|
+
var n, o;
|
|
421
|
+
return (o = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : o[e];
|
|
422
|
+
});
|
|
423
|
+
}, Nn = (e, t = {}) => {
|
|
424
|
+
const n = x(void 0), o = t.prop ? n : Bn("size"), a = t.global ? n : oo(), r = t.form ? { size: void 0 } : ve(Ct, void 0), s = t.formItem ? { size: void 0 } : ve(An, void 0);
|
|
425
|
+
return y(() => o.value || d(e) || (s == null ? void 0 : s.size) || (r == null ? void 0 : r.size) || a.value || "");
|
|
426
|
+
}, Tt = (e) => {
|
|
427
|
+
const t = Bn("disabled"), n = ve(Ct, void 0);
|
|
428
|
+
return y(() => t.value || d(e) || (n == null ? void 0 : n.disabled) || !1);
|
|
429
|
+
}, Aa = 'a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])', Qt = (e) => typeof Element > "u" ? !1 : e instanceof Element, xa = (e) => getComputedStyle(e).position === "fixed" ? !1 : e.offsetParent !== null, en = (e) => Array.from(e.querySelectorAll(Aa)).filter((t) => kt(t) && xa(t)), kt = (e) => {
|
|
430
|
+
if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
|
|
431
|
+
return !0;
|
|
432
|
+
if (e.tabIndex < 0 || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true")
|
|
433
|
+
return !1;
|
|
434
|
+
switch (e.nodeName) {
|
|
435
|
+
case "A":
|
|
436
|
+
return !!e.href && e.rel !== "ignore";
|
|
437
|
+
case "INPUT":
|
|
438
|
+
return !(e.type === "hidden" || e.type === "file");
|
|
439
|
+
case "BUTTON":
|
|
440
|
+
case "SELECT":
|
|
441
|
+
case "TEXTAREA":
|
|
442
|
+
return !0;
|
|
443
|
+
default:
|
|
444
|
+
return !1;
|
|
445
|
+
}
|
|
446
|
+
}, Ba = (e, t) => {
|
|
447
|
+
if (!e || !e.focus)
|
|
448
|
+
return;
|
|
449
|
+
let n = !1;
|
|
450
|
+
Qt(e) && !kt(e) && !e.getAttribute("tabindex") && (e.setAttribute("tabindex", "-1"), n = !0), e.focus(t), Qt(e) && n && e.removeAttribute("tabindex");
|
|
451
|
+
};
|
|
452
|
+
function Na(e, {
|
|
453
|
+
disabled: t,
|
|
454
|
+
beforeFocus: n,
|
|
455
|
+
afterFocus: o,
|
|
456
|
+
beforeBlur: a,
|
|
457
|
+
afterBlur: r
|
|
458
|
+
} = {}) {
|
|
459
|
+
const s = Re(), { emit: i } = s, f = Ye(), u = x(!1), h = (p) => {
|
|
460
|
+
const l = Be(n) ? n(p) : !1;
|
|
461
|
+
d(t) || u.value || l || (u.value = !0, i("focus", p), o == null || o());
|
|
462
|
+
}, E = (p) => {
|
|
463
|
+
var l;
|
|
464
|
+
const m = Be(a) ? a(p) : !1;
|
|
465
|
+
d(t) || p.relatedTarget && ((l = f.value) != null && l.contains(p.relatedTarget)) || m || (u.value = !1, i("blur", p), r == null || r());
|
|
466
|
+
}, w = (p) => {
|
|
467
|
+
var l, m;
|
|
468
|
+
d(t) || kt(p.target) || (l = f.value) != null && l.contains(document.activeElement) && f.value !== document.activeElement || (m = e.value) == null || m.focus();
|
|
469
|
+
};
|
|
470
|
+
return G([f, () => d(t)], ([p, l]) => {
|
|
471
|
+
p && (l ? p.removeAttribute("tabindex") : p.setAttribute("tabindex", "-1"));
|
|
472
|
+
}), rt(f, "focus", h, !0), rt(f, "blur", E, !0), rt(f, "click", w, !0), {
|
|
473
|
+
isFocused: u,
|
|
474
|
+
wrapperRef: f,
|
|
475
|
+
handleFocus: h,
|
|
476
|
+
handleBlur: E
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
const La = (e) => /([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(e);
|
|
480
|
+
function Ra({
|
|
481
|
+
afterComposition: e,
|
|
482
|
+
emit: t
|
|
483
|
+
}) {
|
|
484
|
+
const n = x(!1), o = (i) => {
|
|
485
|
+
t == null || t("compositionstart", i), n.value = !0;
|
|
486
|
+
}, a = (i) => {
|
|
487
|
+
var f;
|
|
488
|
+
t == null || t("compositionupdate", i);
|
|
489
|
+
const u = (f = i.target) == null ? void 0 : f.value, h = u[u.length - 1] || "";
|
|
490
|
+
n.value = !La(h);
|
|
491
|
+
}, r = (i) => {
|
|
492
|
+
t == null || t("compositionend", i), n.value && (n.value = !1, D(() => e(i)));
|
|
493
|
+
};
|
|
494
|
+
return {
|
|
495
|
+
isComposing: n,
|
|
496
|
+
handleComposition: (i) => {
|
|
497
|
+
i.type === "compositionend" ? r(i) : a(i);
|
|
498
|
+
},
|
|
499
|
+
handleCompositionStart: o,
|
|
500
|
+
handleCompositionUpdate: a,
|
|
501
|
+
handleCompositionEnd: r
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
function Pa(e) {
|
|
505
|
+
let t;
|
|
506
|
+
function n() {
|
|
507
|
+
if (e.value == null)
|
|
508
|
+
return;
|
|
509
|
+
const { selectionStart: a, selectionEnd: r, value: s } = e.value;
|
|
510
|
+
if (a == null || r == null)
|
|
511
|
+
return;
|
|
512
|
+
const i = s.slice(0, Math.max(0, a)), f = s.slice(Math.max(0, r));
|
|
513
|
+
t = {
|
|
514
|
+
selectionStart: a,
|
|
515
|
+
selectionEnd: r,
|
|
516
|
+
value: s,
|
|
517
|
+
beforeTxt: i,
|
|
518
|
+
afterTxt: f
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
function o() {
|
|
522
|
+
if (e.value == null || t == null)
|
|
523
|
+
return;
|
|
524
|
+
const { value: a } = e.value, { beforeTxt: r, afterTxt: s, selectionStart: i } = t;
|
|
525
|
+
if (r == null || s == null || i == null)
|
|
526
|
+
return;
|
|
527
|
+
let f = a.length;
|
|
528
|
+
if (a.endsWith(s))
|
|
529
|
+
f = a.length - s.length;
|
|
530
|
+
else if (a.startsWith(r))
|
|
531
|
+
f = r.length;
|
|
532
|
+
else {
|
|
533
|
+
const u = r[i - 1], h = a.indexOf(u, i - 1);
|
|
534
|
+
h !== -1 && (f = h + 1);
|
|
535
|
+
}
|
|
536
|
+
e.value.setSelectionRange(f, f);
|
|
537
|
+
}
|
|
538
|
+
return [n, o];
|
|
539
|
+
}
|
|
540
|
+
const Oa = "ElInput", _a = Q({
|
|
541
|
+
name: Oa,
|
|
542
|
+
inheritAttrs: !1
|
|
543
|
+
}), Fa = /* @__PURE__ */ Q({
|
|
544
|
+
..._a,
|
|
545
|
+
props: Ea,
|
|
546
|
+
emits: wa,
|
|
547
|
+
setup(e, { expose: t, emit: n }) {
|
|
548
|
+
const o = e, a = To(), r = Ta(), s = En(), i = y(() => [
|
|
549
|
+
o.type === "textarea" ? m.b() : l.b(),
|
|
550
|
+
l.m(w.value),
|
|
551
|
+
l.is("disabled", p.value),
|
|
552
|
+
l.is("exceed", Fn.value),
|
|
553
|
+
{
|
|
554
|
+
[l.b("group")]: s.prepend || s.append,
|
|
555
|
+
[l.m("prefix")]: s.prefix || o.prefixIcon,
|
|
556
|
+
[l.m("suffix")]: s.suffix || o.suffixIcon || o.clearable || o.showPassword,
|
|
557
|
+
[l.bm("suffix", "password-clear")]: _.value && $.value,
|
|
558
|
+
[l.b("hidden")]: o.type === "hidden"
|
|
559
|
+
},
|
|
560
|
+
a.class
|
|
561
|
+
]), f = y(() => [
|
|
562
|
+
l.e("wrapper"),
|
|
563
|
+
l.is("focus", F.value)
|
|
564
|
+
]), { form: u, formItem: h } = xn(), { inputId: E } = Ma(o, {
|
|
565
|
+
formItemContext: h
|
|
566
|
+
}), w = Nn(), p = Tt(), l = fe("input"), m = fe("textarea"), k = Ye(), v = Ye(), g = x(!1), C = x(!1), V = x(), j = Ye(o.inputStyle), R = y(() => k.value || v.value), { wrapperRef: q, isFocused: F, handleFocus: J, handleBlur: ee } = Na(R, {
|
|
567
|
+
disabled: p,
|
|
568
|
+
afterBlur() {
|
|
569
|
+
var c;
|
|
570
|
+
o.validateEvent && ((c = h == null ? void 0 : h.validate) == null || c.call(h, "blur").catch((M) => void 0));
|
|
571
|
+
}
|
|
572
|
+
}), we = y(() => {
|
|
573
|
+
var c;
|
|
574
|
+
return (c = u == null ? void 0 : u.statusIcon) != null ? c : !1;
|
|
575
|
+
}), N = y(() => (h == null ? void 0 : h.validateState) || ""), Se = y(() => N.value && ao[N.value]), nt = y(() => C.value ? ro : so), Oe = y(() => [
|
|
576
|
+
a.style
|
|
577
|
+
]), _e = y(() => [
|
|
578
|
+
o.inputStyle,
|
|
579
|
+
j.value,
|
|
580
|
+
{ resize: o.resize }
|
|
581
|
+
]), T = y(() => Mn(o.modelValue) ? "" : String(o.modelValue)), _ = y(() => o.clearable && !p.value && !o.readonly && !!T.value && (F.value || g.value)), $ = y(() => o.showPassword && !p.value && !!T.value), te = y(() => o.showWordLimit && !!o.maxlength && (o.type === "text" || o.type === "textarea") && !p.value && !o.readonly && !o.showPassword), ot = y(() => T.value.length), Fn = y(() => !!te.value && ot.value > Number(o.maxlength)), $n = y(() => !!s.suffix || !!o.suffixIcon || _.value || o.showPassword || te.value || !!N.value && we.value), Hn = y(() => !!Object.keys(o.modelModifiers).length), [At, xt] = Pa(k);
|
|
582
|
+
io(v, (c) => {
|
|
583
|
+
if (Vn(), !te.value || o.resize !== "both")
|
|
584
|
+
return;
|
|
585
|
+
const M = c[0], { width: P } = M.contentRect;
|
|
586
|
+
V.value = {
|
|
587
|
+
right: `calc(100% - ${P + 15 + 6}px)`
|
|
588
|
+
};
|
|
589
|
+
});
|
|
590
|
+
const Ce = () => {
|
|
591
|
+
const { type: c, autosize: M } = o;
|
|
592
|
+
if (!(!ye || c !== "textarea" || !v.value))
|
|
593
|
+
if (M) {
|
|
594
|
+
const P = qe(M) ? M.minRows : void 0, me = qe(M) ? M.maxRows : void 0, Te = Jt(v.value, P, me);
|
|
595
|
+
j.value = {
|
|
596
|
+
overflowY: "hidden",
|
|
597
|
+
...Te
|
|
598
|
+
}, D(() => {
|
|
599
|
+
v.value.offsetHeight, j.value = Te;
|
|
600
|
+
});
|
|
601
|
+
} else
|
|
602
|
+
j.value = {
|
|
603
|
+
minHeight: Jt(v.value).minHeight
|
|
604
|
+
};
|
|
605
|
+
}, Vn = ((c) => {
|
|
606
|
+
let M = !1;
|
|
607
|
+
return () => {
|
|
608
|
+
var P;
|
|
609
|
+
if (M || !o.autosize)
|
|
610
|
+
return;
|
|
611
|
+
((P = v.value) == null ? void 0 : P.offsetParent) === null || (setTimeout(c), M = !0);
|
|
612
|
+
};
|
|
613
|
+
})(Ce), he = () => {
|
|
614
|
+
const c = R.value, M = o.formatter ? o.formatter(T.value) : T.value;
|
|
615
|
+
!c || c.value === M || (c.value = M);
|
|
616
|
+
}, Bt = (c) => {
|
|
617
|
+
const { trim: M, number: P } = o.modelModifiers;
|
|
618
|
+
return M && (c = c.trim()), P && (c = `${qt(c)}`), o.formatter && o.parser && (c = o.parser(c)), c;
|
|
619
|
+
}, at = async (c) => {
|
|
620
|
+
if (Lt.value)
|
|
621
|
+
return;
|
|
622
|
+
const { lazy: M } = o.modelModifiers;
|
|
623
|
+
let { value: P } = c.target;
|
|
624
|
+
if (M) {
|
|
625
|
+
n(st, P);
|
|
626
|
+
return;
|
|
627
|
+
}
|
|
628
|
+
if (P = Bt(P), String(P) === T.value) {
|
|
629
|
+
o.formatter && he();
|
|
630
|
+
return;
|
|
631
|
+
}
|
|
632
|
+
At(), n(je, P), n(st, P), await D(), (o.formatter && o.parser || !Hn.value) && he(), xt();
|
|
633
|
+
}, Nt = async (c) => {
|
|
634
|
+
let { value: M } = c.target;
|
|
635
|
+
M = Bt(M), o.modelModifiers.lazy && n(je, M), n(Xt, M), await D(), he();
|
|
636
|
+
}, {
|
|
637
|
+
isComposing: Lt,
|
|
638
|
+
handleCompositionStart: Rt,
|
|
639
|
+
handleCompositionUpdate: Pt,
|
|
640
|
+
handleCompositionEnd: Ot
|
|
641
|
+
} = Ra({ emit: n, afterComposition: at }), zn = () => {
|
|
642
|
+
At(), C.value = !C.value, setTimeout(xt);
|
|
643
|
+
}, Dn = () => {
|
|
644
|
+
var c;
|
|
645
|
+
return (c = R.value) == null ? void 0 : c.focus();
|
|
646
|
+
}, Un = () => {
|
|
647
|
+
var c;
|
|
648
|
+
return (c = R.value) == null ? void 0 : c.blur();
|
|
649
|
+
}, Kn = (c) => {
|
|
650
|
+
g.value = !1, n("mouseleave", c);
|
|
651
|
+
}, Wn = (c) => {
|
|
652
|
+
g.value = !0, n("mouseenter", c);
|
|
653
|
+
}, _t = (c) => {
|
|
654
|
+
n("keydown", c);
|
|
655
|
+
}, Yn = () => {
|
|
656
|
+
var c;
|
|
657
|
+
(c = R.value) == null || c.select();
|
|
658
|
+
}, Ft = () => {
|
|
659
|
+
n(je, ""), n(Xt, ""), n("clear"), n(st, "");
|
|
660
|
+
};
|
|
661
|
+
return G(() => o.modelValue, () => {
|
|
662
|
+
var c;
|
|
663
|
+
D(() => Ce()), o.validateEvent && ((c = h == null ? void 0 : h.validate) == null || c.call(h, "change").catch((M) => void 0));
|
|
664
|
+
}), G(T, (c) => {
|
|
665
|
+
if (!R.value)
|
|
666
|
+
return;
|
|
667
|
+
const { trim: M, number: P } = o.modelModifiers, me = R.value.value, Te = (P || o.type === "number") && !/^0\d/.test(me) ? `${qt(me)}` : me;
|
|
668
|
+
Te !== c && (document.activeElement === R.value && R.value.type !== "range" && M && Te.trim() === c || he());
|
|
669
|
+
}), G(() => o.type, async () => {
|
|
670
|
+
await D(), he(), Ce();
|
|
671
|
+
}), pe(() => {
|
|
672
|
+
!o.formatter && o.parser, he(), D(Ce);
|
|
673
|
+
}), t({
|
|
674
|
+
input: k,
|
|
675
|
+
textarea: v,
|
|
676
|
+
ref: R,
|
|
677
|
+
textareaStyle: _e,
|
|
678
|
+
autosize: Je(o, "autosize"),
|
|
679
|
+
isComposing: Lt,
|
|
680
|
+
focus: Dn,
|
|
681
|
+
blur: Un,
|
|
682
|
+
select: Yn,
|
|
683
|
+
clear: Ft,
|
|
684
|
+
resizeTextarea: Ce
|
|
685
|
+
}), (c, M) => (b(), L("div", {
|
|
686
|
+
class: S([
|
|
687
|
+
d(i),
|
|
688
|
+
{
|
|
689
|
+
[d(l).bm("group", "append")]: c.$slots.append,
|
|
690
|
+
[d(l).bm("group", "prepend")]: c.$slots.prepend
|
|
691
|
+
}
|
|
692
|
+
]),
|
|
693
|
+
style: Ze(d(Oe)),
|
|
694
|
+
onMouseenter: Wn,
|
|
695
|
+
onMouseleave: Kn
|
|
696
|
+
}, [
|
|
697
|
+
I(" input "),
|
|
698
|
+
c.type !== "textarea" ? (b(), L(Ge, { key: 0 }, [
|
|
699
|
+
I(" prepend slot "),
|
|
700
|
+
c.$slots.prepend ? (b(), L("div", {
|
|
701
|
+
key: 0,
|
|
702
|
+
class: S(d(l).be("group", "prepend"))
|
|
703
|
+
}, [
|
|
704
|
+
Y(c.$slots, "prepend")
|
|
705
|
+
], 2)) : I("v-if", !0),
|
|
706
|
+
H("div", {
|
|
707
|
+
ref_key: "wrapperRef",
|
|
708
|
+
ref: q,
|
|
709
|
+
class: S(d(f))
|
|
710
|
+
}, [
|
|
711
|
+
I(" prefix slot "),
|
|
712
|
+
c.$slots.prefix || c.prefixIcon ? (b(), L("span", {
|
|
713
|
+
key: 0,
|
|
714
|
+
class: S(d(l).e("prefix"))
|
|
715
|
+
}, [
|
|
716
|
+
H("span", {
|
|
717
|
+
class: S(d(l).e("prefix-inner"))
|
|
718
|
+
}, [
|
|
719
|
+
Y(c.$slots, "prefix"),
|
|
720
|
+
c.prefixIcon ? (b(), A(d(ie), {
|
|
721
|
+
key: 0,
|
|
722
|
+
class: S(d(l).e("icon"))
|
|
723
|
+
}, {
|
|
724
|
+
default: B(() => [
|
|
725
|
+
(b(), A(K(c.prefixIcon)))
|
|
726
|
+
]),
|
|
727
|
+
_: 1
|
|
728
|
+
}, 8, ["class"])) : I("v-if", !0)
|
|
729
|
+
], 2)
|
|
730
|
+
], 2)) : I("v-if", !0),
|
|
731
|
+
H("input", vt({
|
|
732
|
+
id: d(E),
|
|
733
|
+
ref_key: "input",
|
|
734
|
+
ref: k,
|
|
735
|
+
class: d(l).e("inner")
|
|
736
|
+
}, d(r), {
|
|
737
|
+
name: c.name,
|
|
738
|
+
minlength: c.minlength,
|
|
739
|
+
maxlength: c.maxlength,
|
|
740
|
+
type: c.showPassword ? C.value ? "text" : "password" : c.type,
|
|
741
|
+
disabled: d(p),
|
|
742
|
+
readonly: c.readonly,
|
|
743
|
+
autocomplete: c.autocomplete,
|
|
744
|
+
tabindex: c.tabindex,
|
|
745
|
+
"aria-label": c.ariaLabel,
|
|
746
|
+
placeholder: c.placeholder,
|
|
747
|
+
style: c.inputStyle,
|
|
748
|
+
form: c.form,
|
|
749
|
+
autofocus: c.autofocus,
|
|
750
|
+
role: c.containerRole,
|
|
751
|
+
inputmode: c.inputmode,
|
|
752
|
+
onCompositionstart: d(Rt),
|
|
753
|
+
onCompositionupdate: d(Pt),
|
|
754
|
+
onCompositionend: d(Ot),
|
|
755
|
+
onInput: at,
|
|
756
|
+
onChange: Nt,
|
|
757
|
+
onKeydown: _t
|
|
758
|
+
}), null, 16, ["id", "name", "minlength", "maxlength", "type", "disabled", "readonly", "autocomplete", "tabindex", "aria-label", "placeholder", "form", "autofocus", "role", "inputmode", "onCompositionstart", "onCompositionupdate", "onCompositionend"]),
|
|
759
|
+
I(" suffix slot "),
|
|
760
|
+
d($n) ? (b(), L("span", {
|
|
761
|
+
key: 1,
|
|
762
|
+
class: S(d(l).e("suffix"))
|
|
763
|
+
}, [
|
|
764
|
+
H("span", {
|
|
765
|
+
class: S(d(l).e("suffix-inner"))
|
|
766
|
+
}, [
|
|
767
|
+
!d(_) || !d($) || !d(te) ? (b(), L(Ge, { key: 0 }, [
|
|
768
|
+
Y(c.$slots, "suffix"),
|
|
769
|
+
c.suffixIcon ? (b(), A(d(ie), {
|
|
770
|
+
key: 0,
|
|
771
|
+
class: S(d(l).e("icon"))
|
|
772
|
+
}, {
|
|
773
|
+
default: B(() => [
|
|
774
|
+
(b(), A(K(c.suffixIcon)))
|
|
775
|
+
]),
|
|
776
|
+
_: 1
|
|
777
|
+
}, 8, ["class"])) : I("v-if", !0)
|
|
778
|
+
], 64)) : I("v-if", !0),
|
|
779
|
+
d(_) ? (b(), A(d(ie), {
|
|
780
|
+
key: 1,
|
|
781
|
+
class: S([d(l).e("icon"), d(l).e("clear")]),
|
|
782
|
+
onMousedown: ke(d(We), ["prevent"]),
|
|
783
|
+
onClick: Ft
|
|
784
|
+
}, {
|
|
785
|
+
default: B(() => [
|
|
786
|
+
(b(), A(K(c.clearIcon)))
|
|
787
|
+
]),
|
|
788
|
+
_: 1
|
|
789
|
+
}, 8, ["class", "onMousedown"])) : I("v-if", !0),
|
|
790
|
+
d($) ? (b(), A(d(ie), {
|
|
791
|
+
key: 2,
|
|
792
|
+
class: S([d(l).e("icon"), d(l).e("password")]),
|
|
793
|
+
onClick: zn
|
|
794
|
+
}, {
|
|
795
|
+
default: B(() => [
|
|
796
|
+
(b(), A(K(d(nt))))
|
|
797
|
+
]),
|
|
798
|
+
_: 1
|
|
799
|
+
}, 8, ["class"])) : I("v-if", !0),
|
|
800
|
+
d(te) ? (b(), L("span", {
|
|
801
|
+
key: 3,
|
|
802
|
+
class: S([
|
|
803
|
+
d(l).e("count"),
|
|
804
|
+
d(l).is("outside", c.wordLimitPosition === "outside")
|
|
805
|
+
])
|
|
806
|
+
}, [
|
|
807
|
+
H("span", {
|
|
808
|
+
class: S(d(l).e("count-inner"))
|
|
809
|
+
}, W(d(ot)) + " / " + W(c.maxlength), 3)
|
|
810
|
+
], 2)) : I("v-if", !0),
|
|
811
|
+
d(N) && d(Se) && d(we) ? (b(), A(d(ie), {
|
|
812
|
+
key: 4,
|
|
813
|
+
class: S([
|
|
814
|
+
d(l).e("icon"),
|
|
815
|
+
d(l).e("validateIcon"),
|
|
816
|
+
d(l).is("loading", d(N) === "validating")
|
|
817
|
+
])
|
|
818
|
+
}, {
|
|
819
|
+
default: B(() => [
|
|
820
|
+
(b(), A(K(d(Se))))
|
|
821
|
+
]),
|
|
822
|
+
_: 1
|
|
823
|
+
}, 8, ["class"])) : I("v-if", !0)
|
|
824
|
+
], 2)
|
|
825
|
+
], 2)) : I("v-if", !0)
|
|
826
|
+
], 2),
|
|
827
|
+
I(" append slot "),
|
|
828
|
+
c.$slots.append ? (b(), L("div", {
|
|
829
|
+
key: 1,
|
|
830
|
+
class: S(d(l).be("group", "append"))
|
|
831
|
+
}, [
|
|
832
|
+
Y(c.$slots, "append")
|
|
833
|
+
], 2)) : I("v-if", !0)
|
|
834
|
+
], 64)) : (b(), L(Ge, { key: 1 }, [
|
|
835
|
+
I(" textarea "),
|
|
836
|
+
H("textarea", vt({
|
|
837
|
+
id: d(E),
|
|
838
|
+
ref_key: "textarea",
|
|
839
|
+
ref: v,
|
|
840
|
+
class: [d(m).e("inner"), d(l).is("focus", d(F))]
|
|
841
|
+
}, d(r), {
|
|
842
|
+
minlength: c.minlength,
|
|
843
|
+
maxlength: c.maxlength,
|
|
844
|
+
tabindex: c.tabindex,
|
|
845
|
+
disabled: d(p),
|
|
846
|
+
readonly: c.readonly,
|
|
847
|
+
autocomplete: c.autocomplete,
|
|
848
|
+
style: d(_e),
|
|
849
|
+
"aria-label": c.ariaLabel,
|
|
850
|
+
placeholder: c.placeholder,
|
|
851
|
+
form: c.form,
|
|
852
|
+
autofocus: c.autofocus,
|
|
853
|
+
rows: c.rows,
|
|
854
|
+
role: c.containerRole,
|
|
855
|
+
onCompositionstart: d(Rt),
|
|
856
|
+
onCompositionupdate: d(Pt),
|
|
857
|
+
onCompositionend: d(Ot),
|
|
858
|
+
onInput: at,
|
|
859
|
+
onFocus: d(J),
|
|
860
|
+
onBlur: d(ee),
|
|
861
|
+
onChange: Nt,
|
|
862
|
+
onKeydown: _t
|
|
863
|
+
}), null, 16, ["id", "minlength", "maxlength", "tabindex", "disabled", "readonly", "autocomplete", "aria-label", "placeholder", "form", "autofocus", "rows", "role", "onCompositionstart", "onCompositionupdate", "onCompositionend", "onFocus", "onBlur"]),
|
|
864
|
+
d(te) ? (b(), L("span", {
|
|
865
|
+
key: 0,
|
|
866
|
+
style: Ze(V.value),
|
|
867
|
+
class: S([
|
|
868
|
+
d(l).e("count"),
|
|
869
|
+
d(l).is("outside", c.wordLimitPosition === "outside")
|
|
870
|
+
])
|
|
871
|
+
}, W(d(ot)) + " / " + W(c.maxlength), 7)) : I("v-if", !0)
|
|
872
|
+
], 64))
|
|
873
|
+
], 38));
|
|
874
|
+
}
|
|
875
|
+
});
|
|
876
|
+
var $a = /* @__PURE__ */ Le(Fa, [["__file", "input.vue"]]);
|
|
877
|
+
const Ha = yn($a), it = "focus-trap.focus-after-trapped", lt = "focus-trap.focus-after-released", Va = "focus-trap.focusout-prevented", tn = {
|
|
878
|
+
cancelable: !0,
|
|
879
|
+
bubbles: !1
|
|
880
|
+
}, za = {
|
|
881
|
+
cancelable: !0,
|
|
882
|
+
bubbles: !1
|
|
883
|
+
}, nn = "focusAfterTrapped", on = "focusAfterReleased", Da = Symbol("elFocusTrap"), It = x(), tt = x(0), Mt = x(0);
|
|
884
|
+
let Ve = 0;
|
|
885
|
+
const Ln = (e) => {
|
|
886
|
+
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
887
|
+
acceptNode: (o) => {
|
|
888
|
+
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
889
|
+
return o.disabled || o.hidden || a ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
890
|
+
}
|
|
891
|
+
});
|
|
892
|
+
for (; n.nextNode(); )
|
|
893
|
+
t.push(n.currentNode);
|
|
894
|
+
return t;
|
|
895
|
+
}, an = (e, t) => {
|
|
896
|
+
for (const n of e)
|
|
897
|
+
if (!Ua(n, t))
|
|
898
|
+
return n;
|
|
899
|
+
}, Ua = (e, t) => {
|
|
900
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
901
|
+
return !0;
|
|
902
|
+
for (; e; ) {
|
|
903
|
+
if (t && e === t)
|
|
904
|
+
return !1;
|
|
905
|
+
if (getComputedStyle(e).display === "none")
|
|
906
|
+
return !0;
|
|
907
|
+
e = e.parentElement;
|
|
908
|
+
}
|
|
909
|
+
return !1;
|
|
910
|
+
}, Ka = (e) => {
|
|
911
|
+
const t = Ln(e), n = an(t, e), o = an(t.reverse(), e);
|
|
912
|
+
return [n, o];
|
|
913
|
+
}, Wa = (e) => e instanceof HTMLInputElement && "select" in e, re = (e, t) => {
|
|
914
|
+
if (e) {
|
|
915
|
+
const n = document.activeElement;
|
|
916
|
+
Ba(e, { preventScroll: !0 }), Mt.value = window.performance.now(), e !== n && Wa(e) && t && e.select();
|
|
917
|
+
}
|
|
918
|
+
};
|
|
919
|
+
function rn(e, t) {
|
|
920
|
+
const n = [...e], o = e.indexOf(t);
|
|
921
|
+
return o !== -1 && n.splice(o, 1), n;
|
|
922
|
+
}
|
|
923
|
+
const Ya = () => {
|
|
924
|
+
let e = [];
|
|
925
|
+
return {
|
|
926
|
+
push: (o) => {
|
|
927
|
+
const a = e[0];
|
|
928
|
+
a && o !== a && a.pause(), e = rn(e, o), e.unshift(o);
|
|
929
|
+
},
|
|
930
|
+
remove: (o) => {
|
|
931
|
+
var a, r;
|
|
932
|
+
e = rn(e, o), (r = (a = e[0]) == null ? void 0 : a.resume) == null || r.call(a);
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
}, Ga = (e, t = !1) => {
|
|
936
|
+
const n = document.activeElement;
|
|
937
|
+
for (const o of e)
|
|
938
|
+
if (re(o, t), document.activeElement !== n)
|
|
939
|
+
return;
|
|
940
|
+
}, sn = Ya(), ja = () => tt.value > Mt.value, ze = () => {
|
|
941
|
+
It.value = "pointer", tt.value = window.performance.now();
|
|
942
|
+
}, ln = () => {
|
|
943
|
+
It.value = "keyboard", tt.value = window.performance.now();
|
|
944
|
+
}, Xa = () => (pe(() => {
|
|
945
|
+
Ve === 0 && (document.addEventListener("mousedown", ze), document.addEventListener("touchstart", ze), document.addEventListener("keydown", ln)), Ve++;
|
|
946
|
+
}), Pe(() => {
|
|
947
|
+
Ve--, Ve <= 0 && (document.removeEventListener("mousedown", ze), document.removeEventListener("touchstart", ze), document.removeEventListener("keydown", ln));
|
|
948
|
+
}), {
|
|
949
|
+
focusReason: It,
|
|
950
|
+
lastUserFocusTimestamp: tt,
|
|
951
|
+
lastAutomatedFocusTimestamp: Mt
|
|
952
|
+
}), De = (e) => new CustomEvent(Va, {
|
|
953
|
+
...za,
|
|
954
|
+
detail: e
|
|
955
|
+
});
|
|
956
|
+
let be = [];
|
|
957
|
+
const un = (e) => {
|
|
958
|
+
Et(e) === wt.esc && be.forEach((n) => n(e));
|
|
959
|
+
}, qa = (e) => {
|
|
960
|
+
pe(() => {
|
|
961
|
+
be.length === 0 && document.addEventListener("keydown", un), ye && be.push(e);
|
|
962
|
+
}), Pe(() => {
|
|
963
|
+
be = be.filter((t) => t !== e), be.length === 0 && ye && document.removeEventListener("keydown", un);
|
|
964
|
+
});
|
|
965
|
+
}, Ja = Q({
|
|
966
|
+
name: "ElFocusTrap",
|
|
967
|
+
inheritAttrs: !1,
|
|
968
|
+
props: {
|
|
969
|
+
loop: Boolean,
|
|
970
|
+
trapped: Boolean,
|
|
971
|
+
focusTrapEl: Object,
|
|
972
|
+
focusStartEl: {
|
|
973
|
+
type: [Object, String],
|
|
974
|
+
default: "first"
|
|
975
|
+
}
|
|
976
|
+
},
|
|
977
|
+
emits: [
|
|
978
|
+
nn,
|
|
979
|
+
on,
|
|
980
|
+
"focusin",
|
|
981
|
+
"focusout",
|
|
982
|
+
"focusout-prevented",
|
|
983
|
+
"release-requested"
|
|
984
|
+
],
|
|
985
|
+
setup(e, { emit: t }) {
|
|
986
|
+
const n = x();
|
|
987
|
+
let o, a;
|
|
988
|
+
const { focusReason: r } = Xa();
|
|
989
|
+
qa((l) => {
|
|
990
|
+
e.trapped && !s.paused && t("release-requested", l);
|
|
991
|
+
});
|
|
992
|
+
const s = {
|
|
993
|
+
paused: !1,
|
|
994
|
+
pause() {
|
|
995
|
+
this.paused = !0;
|
|
996
|
+
},
|
|
997
|
+
resume() {
|
|
998
|
+
this.paused = !1;
|
|
999
|
+
}
|
|
1000
|
+
}, i = (l) => {
|
|
1001
|
+
if (!e.loop && !e.trapped || s.paused)
|
|
1002
|
+
return;
|
|
1003
|
+
const { altKey: m, ctrlKey: k, metaKey: v, currentTarget: g, shiftKey: C } = l, { loop: V } = e, R = Et(l) === wt.tab && !m && !k && !v, q = document.activeElement;
|
|
1004
|
+
if (R && q) {
|
|
1005
|
+
const F = g, [J, ee] = Ka(F);
|
|
1006
|
+
if (J && ee) {
|
|
1007
|
+
if (!C && q === ee) {
|
|
1008
|
+
const N = De({
|
|
1009
|
+
focusReason: r.value
|
|
1010
|
+
});
|
|
1011
|
+
t("focusout-prevented", N), N.defaultPrevented || (l.preventDefault(), V && re(J, !0));
|
|
1012
|
+
} else if (C && [J, F].includes(q)) {
|
|
1013
|
+
const N = De({
|
|
1014
|
+
focusReason: r.value
|
|
1015
|
+
});
|
|
1016
|
+
t("focusout-prevented", N), N.defaultPrevented || (l.preventDefault(), V && re(ee, !0));
|
|
1017
|
+
}
|
|
1018
|
+
} else if (q === F) {
|
|
1019
|
+
const N = De({
|
|
1020
|
+
focusReason: r.value
|
|
1021
|
+
});
|
|
1022
|
+
t("focusout-prevented", N), N.defaultPrevented || l.preventDefault();
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
};
|
|
1026
|
+
wn(Da, {
|
|
1027
|
+
focusTrapRef: n,
|
|
1028
|
+
onKeydown: i
|
|
1029
|
+
}), G(() => e.focusTrapEl, (l) => {
|
|
1030
|
+
l && (n.value = l);
|
|
1031
|
+
}, { immediate: !0 }), G([n], ([l], [m]) => {
|
|
1032
|
+
l && (l.addEventListener("keydown", i), l.addEventListener("focusin", h), l.addEventListener("focusout", E)), m && (m.removeEventListener("keydown", i), m.removeEventListener("focusin", h), m.removeEventListener("focusout", E));
|
|
1033
|
+
});
|
|
1034
|
+
const f = (l) => {
|
|
1035
|
+
t(nn, l);
|
|
1036
|
+
}, u = (l) => t(on, l), h = (l) => {
|
|
1037
|
+
const m = d(n);
|
|
1038
|
+
if (!m)
|
|
1039
|
+
return;
|
|
1040
|
+
const k = l.target, v = l.relatedTarget, g = k && m.contains(k);
|
|
1041
|
+
e.trapped || v && m.contains(v) || (o = v), g && t("focusin", l), !s.paused && e.trapped && (g ? a = k : re(a, !0));
|
|
1042
|
+
}, E = (l) => {
|
|
1043
|
+
const m = d(n);
|
|
1044
|
+
if (!(s.paused || !m))
|
|
1045
|
+
if (e.trapped) {
|
|
1046
|
+
const k = l.relatedTarget;
|
|
1047
|
+
!Mn(k) && !m.contains(k) && setTimeout(() => {
|
|
1048
|
+
if (!s.paused && e.trapped) {
|
|
1049
|
+
const v = De({
|
|
1050
|
+
focusReason: r.value
|
|
1051
|
+
});
|
|
1052
|
+
t("focusout-prevented", v), v.defaultPrevented || re(a, !0);
|
|
1053
|
+
}
|
|
1054
|
+
}, 0);
|
|
1055
|
+
} else {
|
|
1056
|
+
const k = l.target;
|
|
1057
|
+
k && m.contains(k) || t("focusout", l);
|
|
1058
|
+
}
|
|
1059
|
+
};
|
|
1060
|
+
async function w() {
|
|
1061
|
+
await D();
|
|
1062
|
+
const l = d(n);
|
|
1063
|
+
if (l) {
|
|
1064
|
+
sn.push(s);
|
|
1065
|
+
const m = l.contains(document.activeElement) ? o : document.activeElement;
|
|
1066
|
+
if (o = m, !l.contains(m)) {
|
|
1067
|
+
const v = new Event(it, tn);
|
|
1068
|
+
l.addEventListener(it, f), l.dispatchEvent(v), v.defaultPrevented || D(() => {
|
|
1069
|
+
let g = e.focusStartEl;
|
|
1070
|
+
de(g) || (re(g), document.activeElement !== g && (g = "first")), g === "first" && Ga(Ln(l), !0), (document.activeElement === m || g === "container") && re(l);
|
|
1071
|
+
});
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
function p() {
|
|
1076
|
+
const l = d(n);
|
|
1077
|
+
if (l) {
|
|
1078
|
+
l.removeEventListener(it, f);
|
|
1079
|
+
const m = new CustomEvent(lt, {
|
|
1080
|
+
...tn,
|
|
1081
|
+
detail: {
|
|
1082
|
+
focusReason: r.value
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
l.addEventListener(lt, u), l.dispatchEvent(m), !m.defaultPrevented && (r.value == "keyboard" || !ja() || l.contains(document.activeElement)) && re(o ?? document.body), l.removeEventListener(lt, u), sn.remove(s), o = null, a = null;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
return pe(() => {
|
|
1089
|
+
e.trapped && w(), G(() => e.trapped, (l) => {
|
|
1090
|
+
l ? w() : p();
|
|
1091
|
+
});
|
|
1092
|
+
}), Pe(() => {
|
|
1093
|
+
e.trapped && p(), n.value && (n.value.removeEventListener("keydown", i), n.value.removeEventListener("focusin", h), n.value.removeEventListener("focusout", E), n.value = void 0);
|
|
1094
|
+
}), {
|
|
1095
|
+
onKeydown: i
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
function Za(e, t, n, o, a, r) {
|
|
1100
|
+
return Y(e.$slots, "default", { handleKeydown: e.onKeydown });
|
|
1101
|
+
}
|
|
1102
|
+
var Qa = /* @__PURE__ */ Le(Ja, [["render", Za], ["__file", "focus-trap.vue"]]);
|
|
1103
|
+
const Rn = Symbol("buttonGroupContextKey"), er = ({ from: e, replacement: t, scope: n, version: o, ref: a, type: r = "API" }, s) => {
|
|
1104
|
+
G(() => d(s), (i) => {
|
|
1105
|
+
}, {
|
|
1106
|
+
immediate: !0
|
|
1107
|
+
});
|
|
1108
|
+
}, tr = (e, t) => {
|
|
1109
|
+
er({
|
|
1110
|
+
from: "type.text",
|
|
1111
|
+
replacement: "link",
|
|
1112
|
+
version: "3.0.0",
|
|
1113
|
+
scope: "props",
|
|
1114
|
+
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
1115
|
+
}, y(() => e.type === "text"));
|
|
1116
|
+
const n = ve(Rn, void 0), o = lo("button"), { form: a } = xn(), r = Nn(y(() => n == null ? void 0 : n.size)), s = Tt(), i = x(), f = En(), u = y(() => {
|
|
1117
|
+
var v;
|
|
1118
|
+
return e.type || (n == null ? void 0 : n.type) || ((v = o.value) == null ? void 0 : v.type) || "";
|
|
1119
|
+
}), h = y(() => {
|
|
1120
|
+
var v, g, C;
|
|
1121
|
+
return (C = (g = e.autoInsertSpace) != null ? g : (v = o.value) == null ? void 0 : v.autoInsertSpace) != null ? C : !1;
|
|
1122
|
+
}), E = y(() => {
|
|
1123
|
+
var v, g, C;
|
|
1124
|
+
return (C = (g = e.plain) != null ? g : (v = o.value) == null ? void 0 : v.plain) != null ? C : !1;
|
|
1125
|
+
}), w = y(() => {
|
|
1126
|
+
var v, g, C;
|
|
1127
|
+
return (C = (g = e.round) != null ? g : (v = o.value) == null ? void 0 : v.round) != null ? C : !1;
|
|
1128
|
+
}), p = y(() => {
|
|
1129
|
+
var v, g, C;
|
|
1130
|
+
return (C = (g = e.text) != null ? g : (v = o.value) == null ? void 0 : v.text) != null ? C : !1;
|
|
1131
|
+
}), l = y(() => e.tag === "button" ? {
|
|
1132
|
+
ariaDisabled: s.value || e.loading,
|
|
1133
|
+
disabled: s.value || e.loading,
|
|
1134
|
+
autofocus: e.autofocus,
|
|
1135
|
+
type: e.nativeType
|
|
1136
|
+
} : {}), m = y(() => {
|
|
1137
|
+
var v;
|
|
1138
|
+
const g = (v = f.default) == null ? void 0 : v.call(f);
|
|
1139
|
+
if (h.value && (g == null ? void 0 : g.length) === 1) {
|
|
1140
|
+
const C = g[0];
|
|
1141
|
+
if ((C == null ? void 0 : C.type) === ko) {
|
|
1142
|
+
const V = C.children;
|
|
1143
|
+
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(V.trim());
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
return !1;
|
|
1147
|
+
});
|
|
1148
|
+
return {
|
|
1149
|
+
_disabled: s,
|
|
1150
|
+
_size: r,
|
|
1151
|
+
_type: u,
|
|
1152
|
+
_ref: i,
|
|
1153
|
+
_props: l,
|
|
1154
|
+
_plain: E,
|
|
1155
|
+
_round: w,
|
|
1156
|
+
_text: p,
|
|
1157
|
+
shouldAddSpace: m,
|
|
1158
|
+
handleClick: (v) => {
|
|
1159
|
+
if (s.value || e.loading) {
|
|
1160
|
+
v.stopPropagation();
|
|
1161
|
+
return;
|
|
1162
|
+
}
|
|
1163
|
+
e.nativeType === "reset" && (a == null || a.resetFields()), t("click", v);
|
|
1164
|
+
}
|
|
1165
|
+
};
|
|
1166
|
+
}, nr = [
|
|
1167
|
+
"default",
|
|
1168
|
+
"primary",
|
|
1169
|
+
"success",
|
|
1170
|
+
"warning",
|
|
1171
|
+
"info",
|
|
1172
|
+
"danger",
|
|
1173
|
+
"text",
|
|
1174
|
+
""
|
|
1175
|
+
], or = ["button", "submit", "reset"], mt = et({
|
|
1176
|
+
size: bn,
|
|
1177
|
+
disabled: Boolean,
|
|
1178
|
+
type: {
|
|
1179
|
+
type: String,
|
|
1180
|
+
values: nr,
|
|
1181
|
+
default: ""
|
|
1182
|
+
},
|
|
1183
|
+
icon: {
|
|
1184
|
+
type: Ie
|
|
1185
|
+
},
|
|
1186
|
+
nativeType: {
|
|
1187
|
+
type: String,
|
|
1188
|
+
values: or,
|
|
1189
|
+
default: "button"
|
|
1190
|
+
},
|
|
1191
|
+
loading: Boolean,
|
|
1192
|
+
loadingIcon: {
|
|
1193
|
+
type: Ie,
|
|
1194
|
+
default: () => ft
|
|
1195
|
+
},
|
|
1196
|
+
plain: {
|
|
1197
|
+
type: Boolean,
|
|
1198
|
+
default: void 0
|
|
1199
|
+
},
|
|
1200
|
+
text: {
|
|
1201
|
+
type: Boolean,
|
|
1202
|
+
default: void 0
|
|
1203
|
+
},
|
|
1204
|
+
link: Boolean,
|
|
1205
|
+
bg: Boolean,
|
|
1206
|
+
autofocus: Boolean,
|
|
1207
|
+
round: {
|
|
1208
|
+
type: Boolean,
|
|
1209
|
+
default: void 0
|
|
1210
|
+
},
|
|
1211
|
+
circle: Boolean,
|
|
1212
|
+
color: String,
|
|
1213
|
+
dark: Boolean,
|
|
1214
|
+
autoInsertSpace: {
|
|
1215
|
+
type: Boolean,
|
|
1216
|
+
default: void 0
|
|
1217
|
+
},
|
|
1218
|
+
tag: {
|
|
1219
|
+
type: oe([String, Object]),
|
|
1220
|
+
default: "button"
|
|
1221
|
+
}
|
|
1222
|
+
}), ar = {
|
|
1223
|
+
click: (e) => e instanceof MouseEvent
|
|
1224
|
+
};
|
|
1225
|
+
function O(e, t) {
|
|
1226
|
+
rr(e) && (e = "100%");
|
|
1227
|
+
var n = sr(e);
|
|
1228
|
+
return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
|
|
1229
|
+
}
|
|
1230
|
+
function Ue(e) {
|
|
1231
|
+
return Math.min(1, Math.max(0, e));
|
|
1232
|
+
}
|
|
1233
|
+
function rr(e) {
|
|
1234
|
+
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
|
|
1235
|
+
}
|
|
1236
|
+
function sr(e) {
|
|
1237
|
+
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
1238
|
+
}
|
|
1239
|
+
function Pn(e) {
|
|
1240
|
+
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
1241
|
+
}
|
|
1242
|
+
function Ke(e) {
|
|
1243
|
+
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
|
|
1244
|
+
}
|
|
1245
|
+
function ue(e) {
|
|
1246
|
+
return e.length === 1 ? "0" + e : String(e);
|
|
1247
|
+
}
|
|
1248
|
+
function ir(e, t, n) {
|
|
1249
|
+
return {
|
|
1250
|
+
r: O(e, 255) * 255,
|
|
1251
|
+
g: O(t, 255) * 255,
|
|
1252
|
+
b: O(n, 255) * 255
|
|
1253
|
+
};
|
|
1254
|
+
}
|
|
1255
|
+
function cn(e, t, n) {
|
|
1256
|
+
e = O(e, 255), t = O(t, 255), n = O(n, 255);
|
|
1257
|
+
var o = Math.max(e, t, n), a = Math.min(e, t, n), r = 0, s = 0, i = (o + a) / 2;
|
|
1258
|
+
if (o === a)
|
|
1259
|
+
s = 0, r = 0;
|
|
1260
|
+
else {
|
|
1261
|
+
var f = o - a;
|
|
1262
|
+
switch (s = i > 0.5 ? f / (2 - o - a) : f / (o + a), o) {
|
|
1263
|
+
case e:
|
|
1264
|
+
r = (t - n) / f + (t < n ? 6 : 0);
|
|
1265
|
+
break;
|
|
1266
|
+
case t:
|
|
1267
|
+
r = (n - e) / f + 2;
|
|
1268
|
+
break;
|
|
1269
|
+
case n:
|
|
1270
|
+
r = (e - t) / f + 4;
|
|
1271
|
+
break;
|
|
1272
|
+
}
|
|
1273
|
+
r /= 6;
|
|
1274
|
+
}
|
|
1275
|
+
return { h: r, s, l: i };
|
|
1276
|
+
}
|
|
1277
|
+
function ut(e, t, n) {
|
|
1278
|
+
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
1279
|
+
}
|
|
1280
|
+
function lr(e, t, n) {
|
|
1281
|
+
var o, a, r;
|
|
1282
|
+
if (e = O(e, 360), t = O(t, 100), n = O(n, 100), t === 0)
|
|
1283
|
+
a = n, r = n, o = n;
|
|
1284
|
+
else {
|
|
1285
|
+
var s = n < 0.5 ? n * (1 + t) : n + t - n * t, i = 2 * n - s;
|
|
1286
|
+
o = ut(i, s, e + 1 / 3), a = ut(i, s, e), r = ut(i, s, e - 1 / 3);
|
|
1287
|
+
}
|
|
1288
|
+
return { r: o * 255, g: a * 255, b: r * 255 };
|
|
1289
|
+
}
|
|
1290
|
+
function dn(e, t, n) {
|
|
1291
|
+
e = O(e, 255), t = O(t, 255), n = O(n, 255);
|
|
1292
|
+
var o = Math.max(e, t, n), a = Math.min(e, t, n), r = 0, s = o, i = o - a, f = o === 0 ? 0 : i / o;
|
|
1293
|
+
if (o === a)
|
|
1294
|
+
r = 0;
|
|
1295
|
+
else {
|
|
1296
|
+
switch (o) {
|
|
1297
|
+
case e:
|
|
1298
|
+
r = (t - n) / i + (t < n ? 6 : 0);
|
|
1299
|
+
break;
|
|
1300
|
+
case t:
|
|
1301
|
+
r = (n - e) / i + 2;
|
|
1302
|
+
break;
|
|
1303
|
+
case n:
|
|
1304
|
+
r = (e - t) / i + 4;
|
|
1305
|
+
break;
|
|
1306
|
+
}
|
|
1307
|
+
r /= 6;
|
|
1308
|
+
}
|
|
1309
|
+
return { h: r, s: f, v: s };
|
|
1310
|
+
}
|
|
1311
|
+
function ur(e, t, n) {
|
|
1312
|
+
e = O(e, 360) * 6, t = O(t, 100), n = O(n, 100);
|
|
1313
|
+
var o = Math.floor(e), a = e - o, r = n * (1 - t), s = n * (1 - a * t), i = n * (1 - (1 - a) * t), f = o % 6, u = [n, s, r, r, i, n][f], h = [i, n, n, s, r, r][f], E = [r, r, i, n, n, s][f];
|
|
1314
|
+
return { r: u * 255, g: h * 255, b: E * 255 };
|
|
1315
|
+
}
|
|
1316
|
+
function fn(e, t, n, o) {
|
|
1317
|
+
var a = [
|
|
1318
|
+
ue(Math.round(e).toString(16)),
|
|
1319
|
+
ue(Math.round(t).toString(16)),
|
|
1320
|
+
ue(Math.round(n).toString(16))
|
|
1321
|
+
];
|
|
1322
|
+
return o && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
|
|
1323
|
+
}
|
|
1324
|
+
function cr(e, t, n, o, a) {
|
|
1325
|
+
var r = [
|
|
1326
|
+
ue(Math.round(e).toString(16)),
|
|
1327
|
+
ue(Math.round(t).toString(16)),
|
|
1328
|
+
ue(Math.round(n).toString(16)),
|
|
1329
|
+
ue(dr(o))
|
|
1330
|
+
];
|
|
1331
|
+
return a && r[0].startsWith(r[0].charAt(1)) && r[1].startsWith(r[1].charAt(1)) && r[2].startsWith(r[2].charAt(1)) && r[3].startsWith(r[3].charAt(1)) ? r[0].charAt(0) + r[1].charAt(0) + r[2].charAt(0) + r[3].charAt(0) : r.join("");
|
|
1332
|
+
}
|
|
1333
|
+
function dr(e) {
|
|
1334
|
+
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1335
|
+
}
|
|
1336
|
+
function vn(e) {
|
|
1337
|
+
return U(e) / 255;
|
|
1338
|
+
}
|
|
1339
|
+
function U(e) {
|
|
1340
|
+
return parseInt(e, 16);
|
|
1341
|
+
}
|
|
1342
|
+
function fr(e) {
|
|
1343
|
+
return {
|
|
1344
|
+
r: e >> 16,
|
|
1345
|
+
g: (e & 65280) >> 8,
|
|
1346
|
+
b: e & 255
|
|
1347
|
+
};
|
|
1348
|
+
}
|
|
1349
|
+
var gt = {
|
|
1350
|
+
aliceblue: "#f0f8ff",
|
|
1351
|
+
antiquewhite: "#faebd7",
|
|
1352
|
+
aqua: "#00ffff",
|
|
1353
|
+
aquamarine: "#7fffd4",
|
|
1354
|
+
azure: "#f0ffff",
|
|
1355
|
+
beige: "#f5f5dc",
|
|
1356
|
+
bisque: "#ffe4c4",
|
|
1357
|
+
black: "#000000",
|
|
1358
|
+
blanchedalmond: "#ffebcd",
|
|
1359
|
+
blue: "#0000ff",
|
|
1360
|
+
blueviolet: "#8a2be2",
|
|
1361
|
+
brown: "#a52a2a",
|
|
1362
|
+
burlywood: "#deb887",
|
|
1363
|
+
cadetblue: "#5f9ea0",
|
|
1364
|
+
chartreuse: "#7fff00",
|
|
1365
|
+
chocolate: "#d2691e",
|
|
1366
|
+
coral: "#ff7f50",
|
|
1367
|
+
cornflowerblue: "#6495ed",
|
|
1368
|
+
cornsilk: "#fff8dc",
|
|
1369
|
+
crimson: "#dc143c",
|
|
1370
|
+
cyan: "#00ffff",
|
|
1371
|
+
darkblue: "#00008b",
|
|
1372
|
+
darkcyan: "#008b8b",
|
|
1373
|
+
darkgoldenrod: "#b8860b",
|
|
1374
|
+
darkgray: "#a9a9a9",
|
|
1375
|
+
darkgreen: "#006400",
|
|
1376
|
+
darkgrey: "#a9a9a9",
|
|
1377
|
+
darkkhaki: "#bdb76b",
|
|
1378
|
+
darkmagenta: "#8b008b",
|
|
1379
|
+
darkolivegreen: "#556b2f",
|
|
1380
|
+
darkorange: "#ff8c00",
|
|
1381
|
+
darkorchid: "#9932cc",
|
|
1382
|
+
darkred: "#8b0000",
|
|
1383
|
+
darksalmon: "#e9967a",
|
|
1384
|
+
darkseagreen: "#8fbc8f",
|
|
1385
|
+
darkslateblue: "#483d8b",
|
|
1386
|
+
darkslategray: "#2f4f4f",
|
|
1387
|
+
darkslategrey: "#2f4f4f",
|
|
1388
|
+
darkturquoise: "#00ced1",
|
|
1389
|
+
darkviolet: "#9400d3",
|
|
1390
|
+
deeppink: "#ff1493",
|
|
1391
|
+
deepskyblue: "#00bfff",
|
|
1392
|
+
dimgray: "#696969",
|
|
1393
|
+
dimgrey: "#696969",
|
|
1394
|
+
dodgerblue: "#1e90ff",
|
|
1395
|
+
firebrick: "#b22222",
|
|
1396
|
+
floralwhite: "#fffaf0",
|
|
1397
|
+
forestgreen: "#228b22",
|
|
1398
|
+
fuchsia: "#ff00ff",
|
|
1399
|
+
gainsboro: "#dcdcdc",
|
|
1400
|
+
ghostwhite: "#f8f8ff",
|
|
1401
|
+
goldenrod: "#daa520",
|
|
1402
|
+
gold: "#ffd700",
|
|
1403
|
+
gray: "#808080",
|
|
1404
|
+
green: "#008000",
|
|
1405
|
+
greenyellow: "#adff2f",
|
|
1406
|
+
grey: "#808080",
|
|
1407
|
+
honeydew: "#f0fff0",
|
|
1408
|
+
hotpink: "#ff69b4",
|
|
1409
|
+
indianred: "#cd5c5c",
|
|
1410
|
+
indigo: "#4b0082",
|
|
1411
|
+
ivory: "#fffff0",
|
|
1412
|
+
khaki: "#f0e68c",
|
|
1413
|
+
lavenderblush: "#fff0f5",
|
|
1414
|
+
lavender: "#e6e6fa",
|
|
1415
|
+
lawngreen: "#7cfc00",
|
|
1416
|
+
lemonchiffon: "#fffacd",
|
|
1417
|
+
lightblue: "#add8e6",
|
|
1418
|
+
lightcoral: "#f08080",
|
|
1419
|
+
lightcyan: "#e0ffff",
|
|
1420
|
+
lightgoldenrodyellow: "#fafad2",
|
|
1421
|
+
lightgray: "#d3d3d3",
|
|
1422
|
+
lightgreen: "#90ee90",
|
|
1423
|
+
lightgrey: "#d3d3d3",
|
|
1424
|
+
lightpink: "#ffb6c1",
|
|
1425
|
+
lightsalmon: "#ffa07a",
|
|
1426
|
+
lightseagreen: "#20b2aa",
|
|
1427
|
+
lightskyblue: "#87cefa",
|
|
1428
|
+
lightslategray: "#778899",
|
|
1429
|
+
lightslategrey: "#778899",
|
|
1430
|
+
lightsteelblue: "#b0c4de",
|
|
1431
|
+
lightyellow: "#ffffe0",
|
|
1432
|
+
lime: "#00ff00",
|
|
1433
|
+
limegreen: "#32cd32",
|
|
1434
|
+
linen: "#faf0e6",
|
|
1435
|
+
magenta: "#ff00ff",
|
|
1436
|
+
maroon: "#800000",
|
|
1437
|
+
mediumaquamarine: "#66cdaa",
|
|
1438
|
+
mediumblue: "#0000cd",
|
|
1439
|
+
mediumorchid: "#ba55d3",
|
|
1440
|
+
mediumpurple: "#9370db",
|
|
1441
|
+
mediumseagreen: "#3cb371",
|
|
1442
|
+
mediumslateblue: "#7b68ee",
|
|
1443
|
+
mediumspringgreen: "#00fa9a",
|
|
1444
|
+
mediumturquoise: "#48d1cc",
|
|
1445
|
+
mediumvioletred: "#c71585",
|
|
1446
|
+
midnightblue: "#191970",
|
|
1447
|
+
mintcream: "#f5fffa",
|
|
1448
|
+
mistyrose: "#ffe4e1",
|
|
1449
|
+
moccasin: "#ffe4b5",
|
|
1450
|
+
navajowhite: "#ffdead",
|
|
1451
|
+
navy: "#000080",
|
|
1452
|
+
oldlace: "#fdf5e6",
|
|
1453
|
+
olive: "#808000",
|
|
1454
|
+
olivedrab: "#6b8e23",
|
|
1455
|
+
orange: "#ffa500",
|
|
1456
|
+
orangered: "#ff4500",
|
|
1457
|
+
orchid: "#da70d6",
|
|
1458
|
+
palegoldenrod: "#eee8aa",
|
|
1459
|
+
palegreen: "#98fb98",
|
|
1460
|
+
paleturquoise: "#afeeee",
|
|
1461
|
+
palevioletred: "#db7093",
|
|
1462
|
+
papayawhip: "#ffefd5",
|
|
1463
|
+
peachpuff: "#ffdab9",
|
|
1464
|
+
peru: "#cd853f",
|
|
1465
|
+
pink: "#ffc0cb",
|
|
1466
|
+
plum: "#dda0dd",
|
|
1467
|
+
powderblue: "#b0e0e6",
|
|
1468
|
+
purple: "#800080",
|
|
1469
|
+
rebeccapurple: "#663399",
|
|
1470
|
+
red: "#ff0000",
|
|
1471
|
+
rosybrown: "#bc8f8f",
|
|
1472
|
+
royalblue: "#4169e1",
|
|
1473
|
+
saddlebrown: "#8b4513",
|
|
1474
|
+
salmon: "#fa8072",
|
|
1475
|
+
sandybrown: "#f4a460",
|
|
1476
|
+
seagreen: "#2e8b57",
|
|
1477
|
+
seashell: "#fff5ee",
|
|
1478
|
+
sienna: "#a0522d",
|
|
1479
|
+
silver: "#c0c0c0",
|
|
1480
|
+
skyblue: "#87ceeb",
|
|
1481
|
+
slateblue: "#6a5acd",
|
|
1482
|
+
slategray: "#708090",
|
|
1483
|
+
slategrey: "#708090",
|
|
1484
|
+
snow: "#fffafa",
|
|
1485
|
+
springgreen: "#00ff7f",
|
|
1486
|
+
steelblue: "#4682b4",
|
|
1487
|
+
tan: "#d2b48c",
|
|
1488
|
+
teal: "#008080",
|
|
1489
|
+
thistle: "#d8bfd8",
|
|
1490
|
+
tomato: "#ff6347",
|
|
1491
|
+
turquoise: "#40e0d0",
|
|
1492
|
+
violet: "#ee82ee",
|
|
1493
|
+
wheat: "#f5deb3",
|
|
1494
|
+
white: "#ffffff",
|
|
1495
|
+
whitesmoke: "#f5f5f5",
|
|
1496
|
+
yellow: "#ffff00",
|
|
1497
|
+
yellowgreen: "#9acd32"
|
|
1498
|
+
};
|
|
1499
|
+
function vr(e) {
|
|
1500
|
+
var t = { r: 0, g: 0, b: 0 }, n = 1, o = null, a = null, r = null, s = !1, i = !1;
|
|
1501
|
+
return typeof e == "string" && (e = mr(e)), typeof e == "object" && (ne(e.r) && ne(e.g) && ne(e.b) ? (t = ir(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : ne(e.h) && ne(e.s) && ne(e.v) ? (o = Ke(e.s), a = Ke(e.v), t = ur(e.h, o, a), s = !0, i = "hsv") : ne(e.h) && ne(e.s) && ne(e.l) && (o = Ke(e.s), r = Ke(e.l), t = lr(e.h, o, r), s = !0, i = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Pn(n), {
|
|
1502
|
+
ok: s,
|
|
1503
|
+
format: e.format || i,
|
|
1504
|
+
r: Math.min(255, Math.max(t.r, 0)),
|
|
1505
|
+
g: Math.min(255, Math.max(t.g, 0)),
|
|
1506
|
+
b: Math.min(255, Math.max(t.b, 0)),
|
|
1507
|
+
a: n
|
|
1508
|
+
};
|
|
1509
|
+
}
|
|
1510
|
+
var pr = "[-\\+]?\\d+%?", hr = "[-\\+]?\\d*\\.\\d+%?", le = "(?:".concat(hr, ")|(?:").concat(pr, ")"), ct = "[\\s|\\(]+(".concat(le, ")[,|\\s]+(").concat(le, ")[,|\\s]+(").concat(le, ")\\s*\\)?"), dt = "[\\s|\\(]+(".concat(le, ")[,|\\s]+(").concat(le, ")[,|\\s]+(").concat(le, ")[,|\\s]+(").concat(le, ")\\s*\\)?"), X = {
|
|
1511
|
+
CSS_UNIT: new RegExp(le),
|
|
1512
|
+
rgb: new RegExp("rgb" + ct),
|
|
1513
|
+
rgba: new RegExp("rgba" + dt),
|
|
1514
|
+
hsl: new RegExp("hsl" + ct),
|
|
1515
|
+
hsla: new RegExp("hsla" + dt),
|
|
1516
|
+
hsv: new RegExp("hsv" + ct),
|
|
1517
|
+
hsva: new RegExp("hsva" + dt),
|
|
1518
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1519
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1520
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1521
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1522
|
+
};
|
|
1523
|
+
function mr(e) {
|
|
1524
|
+
if (e = e.trim().toLowerCase(), e.length === 0)
|
|
1525
|
+
return !1;
|
|
1526
|
+
var t = !1;
|
|
1527
|
+
if (gt[e])
|
|
1528
|
+
e = gt[e], t = !0;
|
|
1529
|
+
else if (e === "transparent")
|
|
1530
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
1531
|
+
var n = X.rgb.exec(e);
|
|
1532
|
+
return n ? { r: n[1], g: n[2], b: n[3] } : (n = X.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = X.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = X.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = X.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = X.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = X.hex8.exec(e), n ? {
|
|
1533
|
+
r: U(n[1]),
|
|
1534
|
+
g: U(n[2]),
|
|
1535
|
+
b: U(n[3]),
|
|
1536
|
+
a: vn(n[4]),
|
|
1537
|
+
format: t ? "name" : "hex8"
|
|
1538
|
+
} : (n = X.hex6.exec(e), n ? {
|
|
1539
|
+
r: U(n[1]),
|
|
1540
|
+
g: U(n[2]),
|
|
1541
|
+
b: U(n[3]),
|
|
1542
|
+
format: t ? "name" : "hex"
|
|
1543
|
+
} : (n = X.hex4.exec(e), n ? {
|
|
1544
|
+
r: U(n[1] + n[1]),
|
|
1545
|
+
g: U(n[2] + n[2]),
|
|
1546
|
+
b: U(n[3] + n[3]),
|
|
1547
|
+
a: vn(n[4] + n[4]),
|
|
1548
|
+
format: t ? "name" : "hex8"
|
|
1549
|
+
} : (n = X.hex3.exec(e), n ? {
|
|
1550
|
+
r: U(n[1] + n[1]),
|
|
1551
|
+
g: U(n[2] + n[2]),
|
|
1552
|
+
b: U(n[3] + n[3]),
|
|
1553
|
+
format: t ? "name" : "hex"
|
|
1554
|
+
} : !1)))))))));
|
|
1555
|
+
}
|
|
1556
|
+
function ne(e) {
|
|
1557
|
+
return !!X.CSS_UNIT.exec(String(e));
|
|
1558
|
+
}
|
|
1559
|
+
var gr = (
|
|
1560
|
+
/** @class */
|
|
1561
|
+
function() {
|
|
1562
|
+
function e(t, n) {
|
|
1563
|
+
t === void 0 && (t = ""), n === void 0 && (n = {});
|
|
1564
|
+
var o;
|
|
1565
|
+
if (t instanceof e)
|
|
1566
|
+
return t;
|
|
1567
|
+
typeof t == "number" && (t = fr(t)), this.originalInput = t;
|
|
1568
|
+
var a = vr(t);
|
|
1569
|
+
this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (o = n.format) !== null && o !== void 0 ? o : a.format, this.gradientType = n.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 = a.ok;
|
|
1570
|
+
}
|
|
1571
|
+
return e.prototype.isDark = function() {
|
|
1572
|
+
return this.getBrightness() < 128;
|
|
1573
|
+
}, e.prototype.isLight = function() {
|
|
1574
|
+
return !this.isDark();
|
|
1575
|
+
}, e.prototype.getBrightness = function() {
|
|
1576
|
+
var t = this.toRgb();
|
|
1577
|
+
return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
|
|
1578
|
+
}, e.prototype.getLuminance = function() {
|
|
1579
|
+
var t = this.toRgb(), n, o, a, r = t.r / 255, s = t.g / 255, i = t.b / 255;
|
|
1580
|
+
return r <= 0.03928 ? n = r / 12.92 : n = Math.pow((r + 0.055) / 1.055, 2.4), s <= 0.03928 ? o = s / 12.92 : o = Math.pow((s + 0.055) / 1.055, 2.4), i <= 0.03928 ? a = i / 12.92 : a = Math.pow((i + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * o + 0.0722 * a;
|
|
1581
|
+
}, e.prototype.getAlpha = function() {
|
|
1582
|
+
return this.a;
|
|
1583
|
+
}, e.prototype.setAlpha = function(t) {
|
|
1584
|
+
return this.a = Pn(t), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
1585
|
+
}, e.prototype.isMonochrome = function() {
|
|
1586
|
+
var t = this.toHsl().s;
|
|
1587
|
+
return t === 0;
|
|
1588
|
+
}, e.prototype.toHsv = function() {
|
|
1589
|
+
var t = dn(this.r, this.g, this.b);
|
|
1590
|
+
return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
|
|
1591
|
+
}, e.prototype.toHsvString = function() {
|
|
1592
|
+
var t = dn(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), a = Math.round(t.v * 100);
|
|
1593
|
+
return this.a === 1 ? "hsv(".concat(n, ", ").concat(o, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(o, "%, ").concat(a, "%, ").concat(this.roundA, ")");
|
|
1594
|
+
}, e.prototype.toHsl = function() {
|
|
1595
|
+
var t = cn(this.r, this.g, this.b);
|
|
1596
|
+
return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
|
|
1597
|
+
}, e.prototype.toHslString = function() {
|
|
1598
|
+
var t = cn(this.r, this.g, this.b), n = Math.round(t.h * 360), o = Math.round(t.s * 100), a = Math.round(t.l * 100);
|
|
1599
|
+
return this.a === 1 ? "hsl(".concat(n, ", ").concat(o, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(o, "%, ").concat(a, "%, ").concat(this.roundA, ")");
|
|
1600
|
+
}, e.prototype.toHex = function(t) {
|
|
1601
|
+
return t === void 0 && (t = !1), fn(this.r, this.g, this.b, t);
|
|
1602
|
+
}, e.prototype.toHexString = function(t) {
|
|
1603
|
+
return t === void 0 && (t = !1), "#" + this.toHex(t);
|
|
1604
|
+
}, e.prototype.toHex8 = function(t) {
|
|
1605
|
+
return t === void 0 && (t = !1), cr(this.r, this.g, this.b, this.a, t);
|
|
1606
|
+
}, e.prototype.toHex8String = function(t) {
|
|
1607
|
+
return t === void 0 && (t = !1), "#" + this.toHex8(t);
|
|
1608
|
+
}, e.prototype.toHexShortString = function(t) {
|
|
1609
|
+
return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
|
|
1610
|
+
}, e.prototype.toRgb = function() {
|
|
1611
|
+
return {
|
|
1612
|
+
r: Math.round(this.r),
|
|
1613
|
+
g: Math.round(this.g),
|
|
1614
|
+
b: Math.round(this.b),
|
|
1615
|
+
a: this.a
|
|
1616
|
+
};
|
|
1617
|
+
}, e.prototype.toRgbString = function() {
|
|
1618
|
+
var t = Math.round(this.r), n = Math.round(this.g), o = Math.round(this.b);
|
|
1619
|
+
return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(o, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(o, ", ").concat(this.roundA, ")");
|
|
1620
|
+
}, e.prototype.toPercentageRgb = function() {
|
|
1621
|
+
var t = function(n) {
|
|
1622
|
+
return "".concat(Math.round(O(n, 255) * 100), "%");
|
|
1623
|
+
};
|
|
1624
|
+
return {
|
|
1625
|
+
r: t(this.r),
|
|
1626
|
+
g: t(this.g),
|
|
1627
|
+
b: t(this.b),
|
|
1628
|
+
a: this.a
|
|
1629
|
+
};
|
|
1630
|
+
}, e.prototype.toPercentageRgbString = function() {
|
|
1631
|
+
var t = function(n) {
|
|
1632
|
+
return Math.round(O(n, 255) * 100);
|
|
1633
|
+
};
|
|
1634
|
+
return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
|
|
1635
|
+
}, e.prototype.toName = function() {
|
|
1636
|
+
if (this.a === 0)
|
|
1637
|
+
return "transparent";
|
|
1638
|
+
if (this.a < 1)
|
|
1639
|
+
return !1;
|
|
1640
|
+
for (var t = "#" + fn(this.r, this.g, this.b, !1), n = 0, o = Object.entries(gt); n < o.length; n++) {
|
|
1641
|
+
var a = o[n], r = a[0], s = a[1];
|
|
1642
|
+
if (t === s)
|
|
1643
|
+
return r;
|
|
1644
|
+
}
|
|
1645
|
+
return !1;
|
|
1646
|
+
}, e.prototype.toString = function(t) {
|
|
1647
|
+
var n = !!t;
|
|
1648
|
+
t = t ?? this.format;
|
|
1649
|
+
var o = !1, a = this.a < 1 && this.a >= 0, r = !n && a && (t.startsWith("hex") || t === "name");
|
|
1650
|
+
return r ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (o = this.toRgbString()), t === "prgb" && (o = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (o = this.toHexString()), t === "hex3" && (o = this.toHexString(!0)), t === "hex4" && (o = this.toHex8String(!0)), t === "hex8" && (o = this.toHex8String()), t === "name" && (o = this.toName()), t === "hsl" && (o = this.toHslString()), t === "hsv" && (o = this.toHsvString()), o || this.toHexString());
|
|
1651
|
+
}, e.prototype.toNumber = function() {
|
|
1652
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
1653
|
+
}, e.prototype.clone = function() {
|
|
1654
|
+
return new e(this.toString());
|
|
1655
|
+
}, e.prototype.lighten = function(t) {
|
|
1656
|
+
t === void 0 && (t = 10);
|
|
1657
|
+
var n = this.toHsl();
|
|
1658
|
+
return n.l += t / 100, n.l = Ue(n.l), new e(n);
|
|
1659
|
+
}, e.prototype.brighten = function(t) {
|
|
1660
|
+
t === void 0 && (t = 10);
|
|
1661
|
+
var n = this.toRgb();
|
|
1662
|
+
return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
|
|
1663
|
+
}, e.prototype.darken = function(t) {
|
|
1664
|
+
t === void 0 && (t = 10);
|
|
1665
|
+
var n = this.toHsl();
|
|
1666
|
+
return n.l -= t / 100, n.l = Ue(n.l), new e(n);
|
|
1667
|
+
}, e.prototype.tint = function(t) {
|
|
1668
|
+
return t === void 0 && (t = 10), this.mix("white", t);
|
|
1669
|
+
}, e.prototype.shade = function(t) {
|
|
1670
|
+
return t === void 0 && (t = 10), this.mix("black", t);
|
|
1671
|
+
}, e.prototype.desaturate = function(t) {
|
|
1672
|
+
t === void 0 && (t = 10);
|
|
1673
|
+
var n = this.toHsl();
|
|
1674
|
+
return n.s -= t / 100, n.s = Ue(n.s), new e(n);
|
|
1675
|
+
}, e.prototype.saturate = function(t) {
|
|
1676
|
+
t === void 0 && (t = 10);
|
|
1677
|
+
var n = this.toHsl();
|
|
1678
|
+
return n.s += t / 100, n.s = Ue(n.s), new e(n);
|
|
1679
|
+
}, e.prototype.greyscale = function() {
|
|
1680
|
+
return this.desaturate(100);
|
|
1681
|
+
}, e.prototype.spin = function(t) {
|
|
1682
|
+
var n = this.toHsl(), o = (n.h + t) % 360;
|
|
1683
|
+
return n.h = o < 0 ? 360 + o : o, new e(n);
|
|
1684
|
+
}, e.prototype.mix = function(t, n) {
|
|
1685
|
+
n === void 0 && (n = 50);
|
|
1686
|
+
var o = this.toRgb(), a = new e(t).toRgb(), r = n / 100, s = {
|
|
1687
|
+
r: (a.r - o.r) * r + o.r,
|
|
1688
|
+
g: (a.g - o.g) * r + o.g,
|
|
1689
|
+
b: (a.b - o.b) * r + o.b,
|
|
1690
|
+
a: (a.a - o.a) * r + o.a
|
|
1691
|
+
};
|
|
1692
|
+
return new e(s);
|
|
1693
|
+
}, e.prototype.analogous = function(t, n) {
|
|
1694
|
+
t === void 0 && (t = 6), n === void 0 && (n = 30);
|
|
1695
|
+
var o = this.toHsl(), a = 360 / n, r = [this];
|
|
1696
|
+
for (o.h = (o.h - (a * t >> 1) + 720) % 360; --t; )
|
|
1697
|
+
o.h = (o.h + a) % 360, r.push(new e(o));
|
|
1698
|
+
return r;
|
|
1699
|
+
}, e.prototype.complement = function() {
|
|
1700
|
+
var t = this.toHsl();
|
|
1701
|
+
return t.h = (t.h + 180) % 360, new e(t);
|
|
1702
|
+
}, e.prototype.monochromatic = function(t) {
|
|
1703
|
+
t === void 0 && (t = 6);
|
|
1704
|
+
for (var n = this.toHsv(), o = n.h, a = n.s, r = n.v, s = [], i = 1 / t; t--; )
|
|
1705
|
+
s.push(new e({ h: o, s: a, v: r })), r = (r + i) % 1;
|
|
1706
|
+
return s;
|
|
1707
|
+
}, e.prototype.splitcomplement = function() {
|
|
1708
|
+
var t = this.toHsl(), n = t.h;
|
|
1709
|
+
return [
|
|
1710
|
+
this,
|
|
1711
|
+
new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
|
|
1712
|
+
new e({ h: (n + 216) % 360, s: t.s, l: t.l })
|
|
1713
|
+
];
|
|
1714
|
+
}, e.prototype.onBackground = function(t) {
|
|
1715
|
+
var n = this.toRgb(), o = new e(t).toRgb(), a = n.a + o.a * (1 - n.a);
|
|
1716
|
+
return new e({
|
|
1717
|
+
r: (n.r * n.a + o.r * o.a * (1 - n.a)) / a,
|
|
1718
|
+
g: (n.g * n.a + o.g * o.a * (1 - n.a)) / a,
|
|
1719
|
+
b: (n.b * n.a + o.b * o.a * (1 - n.a)) / a,
|
|
1720
|
+
a
|
|
1721
|
+
});
|
|
1722
|
+
}, e.prototype.triad = function() {
|
|
1723
|
+
return this.polyad(3);
|
|
1724
|
+
}, e.prototype.tetrad = function() {
|
|
1725
|
+
return this.polyad(4);
|
|
1726
|
+
}, e.prototype.polyad = function(t) {
|
|
1727
|
+
for (var n = this.toHsl(), o = n.h, a = [this], r = 360 / t, s = 1; s < t; s++)
|
|
1728
|
+
a.push(new e({ h: (o + s * r) % 360, s: n.s, l: n.l }));
|
|
1729
|
+
return a;
|
|
1730
|
+
}, e.prototype.equals = function(t) {
|
|
1731
|
+
return this.toRgbString() === new e(t).toRgbString();
|
|
1732
|
+
}, e;
|
|
1733
|
+
}()
|
|
1734
|
+
);
|
|
1735
|
+
function ae(e, t = 20) {
|
|
1736
|
+
return e.mix("#141414", t).toString();
|
|
1737
|
+
}
|
|
1738
|
+
function br(e) {
|
|
1739
|
+
const t = Tt(), n = fe("button");
|
|
1740
|
+
return y(() => {
|
|
1741
|
+
let o = {}, a = e.color;
|
|
1742
|
+
if (a) {
|
|
1743
|
+
const r = a.match(/var\((.*?)\)/);
|
|
1744
|
+
r && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));
|
|
1745
|
+
const s = new gr(a), i = e.dark ? s.tint(20).toString() : ae(s, 20);
|
|
1746
|
+
if (e.plain)
|
|
1747
|
+
o = n.cssVarBlock({
|
|
1748
|
+
"bg-color": e.dark ? ae(s, 90) : s.tint(90).toString(),
|
|
1749
|
+
"text-color": a,
|
|
1750
|
+
"border-color": e.dark ? ae(s, 50) : s.tint(50).toString(),
|
|
1751
|
+
"hover-text-color": `var(${n.cssVarName("color-white")})`,
|
|
1752
|
+
"hover-bg-color": a,
|
|
1753
|
+
"hover-border-color": a,
|
|
1754
|
+
"active-bg-color": i,
|
|
1755
|
+
"active-text-color": `var(${n.cssVarName("color-white")})`,
|
|
1756
|
+
"active-border-color": i
|
|
1757
|
+
}), t.value && (o[n.cssVarBlockName("disabled-bg-color")] = e.dark ? ae(s, 90) : s.tint(90).toString(), o[n.cssVarBlockName("disabled-text-color")] = e.dark ? ae(s, 50) : s.tint(50).toString(), o[n.cssVarBlockName("disabled-border-color")] = e.dark ? ae(s, 80) : s.tint(80).toString());
|
|
1758
|
+
else {
|
|
1759
|
+
const f = e.dark ? ae(s, 30) : s.tint(30).toString(), u = s.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
|
|
1760
|
+
if (o = n.cssVarBlock({
|
|
1761
|
+
"bg-color": a,
|
|
1762
|
+
"text-color": u,
|
|
1763
|
+
"border-color": a,
|
|
1764
|
+
"hover-bg-color": f,
|
|
1765
|
+
"hover-text-color": u,
|
|
1766
|
+
"hover-border-color": f,
|
|
1767
|
+
"active-bg-color": i,
|
|
1768
|
+
"active-border-color": i
|
|
1769
|
+
}), t.value) {
|
|
1770
|
+
const h = e.dark ? ae(s, 50) : s.tint(50).toString();
|
|
1771
|
+
o[n.cssVarBlockName("disabled-bg-color")] = h, o[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, o[n.cssVarBlockName("disabled-border-color")] = h;
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
return o;
|
|
1776
|
+
});
|
|
1777
|
+
}
|
|
1778
|
+
const yr = Q({
|
|
1779
|
+
name: "ElButton"
|
|
1780
|
+
}), Er = /* @__PURE__ */ Q({
|
|
1781
|
+
...yr,
|
|
1782
|
+
props: mt,
|
|
1783
|
+
emits: ar,
|
|
1784
|
+
setup(e, { expose: t, emit: n }) {
|
|
1785
|
+
const o = e, a = br(o), r = fe("button"), {
|
|
1786
|
+
_ref: s,
|
|
1787
|
+
_size: i,
|
|
1788
|
+
_type: f,
|
|
1789
|
+
_disabled: u,
|
|
1790
|
+
_props: h,
|
|
1791
|
+
_plain: E,
|
|
1792
|
+
_round: w,
|
|
1793
|
+
_text: p,
|
|
1794
|
+
shouldAddSpace: l,
|
|
1795
|
+
handleClick: m
|
|
1796
|
+
} = tr(o, n), k = y(() => [
|
|
1797
|
+
r.b(),
|
|
1798
|
+
r.m(f.value),
|
|
1799
|
+
r.m(i.value),
|
|
1800
|
+
r.is("disabled", u.value),
|
|
1801
|
+
r.is("loading", o.loading),
|
|
1802
|
+
r.is("plain", E.value),
|
|
1803
|
+
r.is("round", w.value),
|
|
1804
|
+
r.is("circle", o.circle),
|
|
1805
|
+
r.is("text", p.value),
|
|
1806
|
+
r.is("link", o.link),
|
|
1807
|
+
r.is("has-bg", o.bg)
|
|
1808
|
+
]);
|
|
1809
|
+
return t({
|
|
1810
|
+
ref: s,
|
|
1811
|
+
size: i,
|
|
1812
|
+
type: f,
|
|
1813
|
+
disabled: u,
|
|
1814
|
+
shouldAddSpace: l
|
|
1815
|
+
}), (v, g) => (b(), A(K(v.tag), vt({
|
|
1816
|
+
ref_key: "_ref",
|
|
1817
|
+
ref: s
|
|
1818
|
+
}, d(h), {
|
|
1819
|
+
class: d(k),
|
|
1820
|
+
style: d(a),
|
|
1821
|
+
onClick: d(m)
|
|
1822
|
+
}), {
|
|
1823
|
+
default: B(() => [
|
|
1824
|
+
v.loading ? (b(), L(Ge, { key: 0 }, [
|
|
1825
|
+
v.$slots.loading ? Y(v.$slots, "loading", { key: 0 }) : (b(), A(d(ie), {
|
|
1826
|
+
key: 1,
|
|
1827
|
+
class: S(d(r).is("loading"))
|
|
1828
|
+
}, {
|
|
1829
|
+
default: B(() => [
|
|
1830
|
+
(b(), A(K(v.loadingIcon)))
|
|
1831
|
+
]),
|
|
1832
|
+
_: 1
|
|
1833
|
+
}, 8, ["class"]))
|
|
1834
|
+
], 64)) : v.icon || v.$slots.icon ? (b(), A(d(ie), { key: 1 }, {
|
|
1835
|
+
default: B(() => [
|
|
1836
|
+
v.icon ? (b(), A(K(v.icon), { key: 0 })) : Y(v.$slots, "icon", { key: 1 })
|
|
1837
|
+
]),
|
|
1838
|
+
_: 3
|
|
1839
|
+
})) : I("v-if", !0),
|
|
1840
|
+
v.$slots.default ? (b(), L("span", {
|
|
1841
|
+
key: 2,
|
|
1842
|
+
class: S({ [d(r).em("text", "expand")]: d(l) })
|
|
1843
|
+
}, [
|
|
1844
|
+
Y(v.$slots, "default")
|
|
1845
|
+
], 2)) : I("v-if", !0)
|
|
1846
|
+
]),
|
|
1847
|
+
_: 3
|
|
1848
|
+
}, 16, ["class", "style", "onClick"]));
|
|
1849
|
+
}
|
|
1850
|
+
});
|
|
1851
|
+
var wr = /* @__PURE__ */ Le(Er, [["__file", "button.vue"]]);
|
|
1852
|
+
const Sr = {
|
|
1853
|
+
size: mt.size,
|
|
1854
|
+
type: mt.type
|
|
1855
|
+
}, Cr = Q({
|
|
1856
|
+
name: "ElButtonGroup"
|
|
1857
|
+
}), Tr = /* @__PURE__ */ Q({
|
|
1858
|
+
...Cr,
|
|
1859
|
+
props: Sr,
|
|
1860
|
+
setup(e) {
|
|
1861
|
+
const t = e;
|
|
1862
|
+
wn(Rn, St({
|
|
1863
|
+
size: Je(t, "size"),
|
|
1864
|
+
type: Je(t, "type")
|
|
1865
|
+
}));
|
|
1866
|
+
const n = fe("button");
|
|
1867
|
+
return (o, a) => (b(), L("div", {
|
|
1868
|
+
class: S(d(n).b("group"))
|
|
1869
|
+
}, [
|
|
1870
|
+
Y(o.$slots, "default")
|
|
1871
|
+
], 2));
|
|
1872
|
+
}
|
|
1873
|
+
});
|
|
1874
|
+
var On = /* @__PURE__ */ Le(Tr, [["__file", "button-group.vue"]]);
|
|
1875
|
+
const kr = yn(wr, {
|
|
1876
|
+
ButtonGroup: On
|
|
1877
|
+
});
|
|
1878
|
+
uo(On);
|
|
1879
|
+
var Xe = /* @__PURE__ */ ((e) => (e[e.TEXT = 1] = "TEXT", e[e.CLASS = 2] = "CLASS", e[e.STYLE = 4] = "STYLE", e[e.PROPS = 8] = "PROPS", e[e.FULL_PROPS = 16] = "FULL_PROPS", e[e.HYDRATE_EVENTS = 32] = "HYDRATE_EVENTS", e[e.STABLE_FRAGMENT = 64] = "STABLE_FRAGMENT", e[e.KEYED_FRAGMENT = 128] = "KEYED_FRAGMENT", e[e.UNKEYED_FRAGMENT = 256] = "UNKEYED_FRAGMENT", e[e.NEED_PATCH = 512] = "NEED_PATCH", e[e.DYNAMIC_SLOTS = 1024] = "DYNAMIC_SLOTS", e[e.HOISTED = -1] = "HOISTED", e[e.BAIL = -2] = "BAIL", e))(Xe || {});
|
|
1880
|
+
const _n = (e) => {
|
|
1881
|
+
if (!e)
|
|
1882
|
+
return { onClick: We, onMousedown: We, onMouseup: We };
|
|
1883
|
+
let t = !1, n = !1;
|
|
1884
|
+
return { onClick: (s) => {
|
|
1885
|
+
t && n && e(s), t = n = !1;
|
|
1886
|
+
}, onMousedown: (s) => {
|
|
1887
|
+
t = s.target === s.currentTarget;
|
|
1888
|
+
}, onMouseup: (s) => {
|
|
1889
|
+
n = s.target === s.currentTarget;
|
|
1890
|
+
} };
|
|
1891
|
+
}, Ir = et({
|
|
1892
|
+
mask: {
|
|
1893
|
+
type: Boolean,
|
|
1894
|
+
default: !0
|
|
1895
|
+
},
|
|
1896
|
+
customMaskEvent: Boolean,
|
|
1897
|
+
overlayClass: {
|
|
1898
|
+
type: oe([
|
|
1899
|
+
String,
|
|
1900
|
+
Array,
|
|
1901
|
+
Object
|
|
1902
|
+
])
|
|
1903
|
+
},
|
|
1904
|
+
zIndex: {
|
|
1905
|
+
type: oe([String, Number])
|
|
1906
|
+
}
|
|
1907
|
+
}), Mr = {
|
|
1908
|
+
click: (e) => e instanceof MouseEvent
|
|
1909
|
+
}, Ar = "overlay";
|
|
1910
|
+
var xr = Q({
|
|
1911
|
+
name: "ElOverlay",
|
|
1912
|
+
props: Ir,
|
|
1913
|
+
emits: Mr,
|
|
1914
|
+
setup(e, { slots: t, emit: n }) {
|
|
1915
|
+
const o = fe(Ar), a = (f) => {
|
|
1916
|
+
n("click", f);
|
|
1917
|
+
}, { onClick: r, onMousedown: s, onMouseup: i } = _n(e.customMaskEvent ? void 0 : a);
|
|
1918
|
+
return () => e.mask ? Z("div", {
|
|
1919
|
+
class: [o.b(), e.overlayClass],
|
|
1920
|
+
style: {
|
|
1921
|
+
zIndex: e.zIndex
|
|
1922
|
+
},
|
|
1923
|
+
onClick: r,
|
|
1924
|
+
onMousedown: s,
|
|
1925
|
+
onMouseup: i
|
|
1926
|
+
}, [Y(t, "default")], Xe.STYLE | Xe.CLASS | Xe.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Io("div", {
|
|
1927
|
+
class: e.overlayClass,
|
|
1928
|
+
style: {
|
|
1929
|
+
zIndex: e.zIndex,
|
|
1930
|
+
position: "fixed",
|
|
1931
|
+
top: "0px",
|
|
1932
|
+
right: "0px",
|
|
1933
|
+
bottom: "0px",
|
|
1934
|
+
left: "0px"
|
|
1935
|
+
}
|
|
1936
|
+
}, [Y(t, "default")]);
|
|
1937
|
+
}
|
|
1938
|
+
});
|
|
1939
|
+
const Br = xr, Nr = (e, t, n, o) => {
|
|
1940
|
+
const a = {
|
|
1941
|
+
offsetX: 0,
|
|
1942
|
+
offsetY: 0
|
|
1943
|
+
}, r = x(!1), s = (w, p) => {
|
|
1944
|
+
if (e.value) {
|
|
1945
|
+
const { offsetX: l, offsetY: m } = a, k = e.value.getBoundingClientRect(), v = k.left, g = k.top, C = k.width, V = k.height, j = document.documentElement.clientWidth, R = document.documentElement.clientHeight, q = -v + l, F = -g + m, J = j - v - C + l, ee = R - g - (V < R ? V : 0) + m;
|
|
1946
|
+
o != null && o.value || (w = Math.min(Math.max(w, q), J), p = Math.min(Math.max(p, F), ee)), a.offsetX = w, a.offsetY = p, e.value.style.transform = `translate(${zt(w)}, ${zt(p)})`;
|
|
1947
|
+
}
|
|
1948
|
+
}, i = (w) => {
|
|
1949
|
+
const p = w.clientX, l = w.clientY, { offsetX: m, offsetY: k } = a, v = (C) => {
|
|
1950
|
+
r.value || (r.value = !0);
|
|
1951
|
+
const V = m + C.clientX - p, j = k + C.clientY - l;
|
|
1952
|
+
s(V, j);
|
|
1953
|
+
}, g = () => {
|
|
1954
|
+
r.value = !1, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", g);
|
|
1955
|
+
};
|
|
1956
|
+
document.addEventListener("mousemove", v), document.addEventListener("mouseup", g);
|
|
1957
|
+
}, f = () => {
|
|
1958
|
+
t.value && e.value && (t.value.addEventListener("mousedown", i), window.addEventListener("resize", E));
|
|
1959
|
+
}, u = () => {
|
|
1960
|
+
t.value && e.value && (t.value.removeEventListener("mousedown", i), window.removeEventListener("resize", E));
|
|
1961
|
+
}, h = () => {
|
|
1962
|
+
a.offsetX = 0, a.offsetY = 0, e.value && (e.value.style.transform = "");
|
|
1963
|
+
}, E = () => {
|
|
1964
|
+
const { offsetX: w, offsetY: p } = a;
|
|
1965
|
+
s(w, p);
|
|
1966
|
+
};
|
|
1967
|
+
return pe(() => {
|
|
1968
|
+
Mo(() => {
|
|
1969
|
+
n.value ? f() : u();
|
|
1970
|
+
});
|
|
1971
|
+
}), Pe(() => {
|
|
1972
|
+
u();
|
|
1973
|
+
}), {
|
|
1974
|
+
isDragging: r,
|
|
1975
|
+
resetPosition: h,
|
|
1976
|
+
updatePosition: E
|
|
1977
|
+
};
|
|
1978
|
+
}, Lr = (e, t = {}) => {
|
|
1979
|
+
Ao(e) || pa("[useLockscreen]", "You need to pass a ref param to this function");
|
|
1980
|
+
const n = t.ns || fe("popup"), o = y(() => n.bm("parent", "hidden"));
|
|
1981
|
+
if (!ye || Dt(document.body, o.value))
|
|
1982
|
+
return;
|
|
1983
|
+
let a = 0, r = !1, s = "0";
|
|
1984
|
+
const i = () => {
|
|
1985
|
+
setTimeout(() => {
|
|
1986
|
+
typeof document > "u" || r && document && (document.body.style.width = s, vo(document.body, o.value));
|
|
1987
|
+
}, 200);
|
|
1988
|
+
};
|
|
1989
|
+
G(e, (f) => {
|
|
1990
|
+
if (!f) {
|
|
1991
|
+
i();
|
|
1992
|
+
return;
|
|
1993
|
+
}
|
|
1994
|
+
r = !Dt(document.body, o.value), r && (s = document.body.style.width, co(document.body, o.value)), a = fa(n.namespace.value);
|
|
1995
|
+
const u = document.documentElement.clientHeight < document.body.scrollHeight, h = fo(document.body, "overflowY");
|
|
1996
|
+
a > 0 && (u || h === "scroll") && r && (document.body.style.width = `calc(100% - ${a}px)`);
|
|
1997
|
+
}), xo(() => i());
|
|
1998
|
+
}, Rr = (e) => ["", ...po].includes(e), bt = "_trap-focus-children", ce = [], pn = (e) => {
|
|
1999
|
+
if (ce.length === 0)
|
|
2000
|
+
return;
|
|
2001
|
+
const t = Et(e), n = ce[ce.length - 1][bt];
|
|
2002
|
+
if (n.length > 0 && t === wt.tab) {
|
|
2003
|
+
if (n.length === 1) {
|
|
2004
|
+
e.preventDefault(), document.activeElement !== n[0] && n[0].focus();
|
|
2005
|
+
return;
|
|
2006
|
+
}
|
|
2007
|
+
const o = e.shiftKey, a = e.target === n[0], r = e.target === n[n.length - 1];
|
|
2008
|
+
a && o && (e.preventDefault(), n[n.length - 1].focus()), r && !o && (e.preventDefault(), n[0].focus());
|
|
2009
|
+
}
|
|
2010
|
+
}, Pr = {
|
|
2011
|
+
beforeMount(e) {
|
|
2012
|
+
e[bt] = en(e), ce.push(e), ce.length <= 1 && document.addEventListener("keydown", pn);
|
|
2013
|
+
},
|
|
2014
|
+
updated(e) {
|
|
2015
|
+
D(() => {
|
|
2016
|
+
e[bt] = en(e);
|
|
2017
|
+
});
|
|
2018
|
+
},
|
|
2019
|
+
unmounted() {
|
|
2020
|
+
ce.shift(), ce.length === 0 && document.removeEventListener("keydown", pn);
|
|
2021
|
+
}
|
|
2022
|
+
}, Or = Q({
|
|
2023
|
+
name: "ElMessageBox",
|
|
2024
|
+
directives: {
|
|
2025
|
+
TrapFocus: Pr
|
|
2026
|
+
},
|
|
2027
|
+
components: {
|
|
2028
|
+
ElButton: kr,
|
|
2029
|
+
ElFocusTrap: Qa,
|
|
2030
|
+
ElInput: Ha,
|
|
2031
|
+
ElOverlay: Br,
|
|
2032
|
+
ElIcon: ie,
|
|
2033
|
+
...ho
|
|
2034
|
+
},
|
|
2035
|
+
inheritAttrs: !1,
|
|
2036
|
+
props: {
|
|
2037
|
+
buttonSize: {
|
|
2038
|
+
type: String,
|
|
2039
|
+
validator: Rr
|
|
2040
|
+
},
|
|
2041
|
+
modal: {
|
|
2042
|
+
type: Boolean,
|
|
2043
|
+
default: !0
|
|
2044
|
+
},
|
|
2045
|
+
lockScroll: {
|
|
2046
|
+
type: Boolean,
|
|
2047
|
+
default: !0
|
|
2048
|
+
},
|
|
2049
|
+
showClose: {
|
|
2050
|
+
type: Boolean,
|
|
2051
|
+
default: !0
|
|
2052
|
+
},
|
|
2053
|
+
closeOnClickModal: {
|
|
2054
|
+
type: Boolean,
|
|
2055
|
+
default: !0
|
|
2056
|
+
},
|
|
2057
|
+
closeOnPressEscape: {
|
|
2058
|
+
type: Boolean,
|
|
2059
|
+
default: !0
|
|
2060
|
+
},
|
|
2061
|
+
closeOnHashChange: {
|
|
2062
|
+
type: Boolean,
|
|
2063
|
+
default: !0
|
|
2064
|
+
},
|
|
2065
|
+
center: Boolean,
|
|
2066
|
+
draggable: Boolean,
|
|
2067
|
+
overflow: Boolean,
|
|
2068
|
+
roundButton: Boolean,
|
|
2069
|
+
container: {
|
|
2070
|
+
type: String,
|
|
2071
|
+
default: "body"
|
|
2072
|
+
},
|
|
2073
|
+
boxType: {
|
|
2074
|
+
type: String,
|
|
2075
|
+
default: ""
|
|
2076
|
+
}
|
|
2077
|
+
},
|
|
2078
|
+
emits: ["vanish", "action"],
|
|
2079
|
+
setup(e, { emit: t }) {
|
|
2080
|
+
const {
|
|
2081
|
+
locale: n,
|
|
2082
|
+
zIndex: o,
|
|
2083
|
+
ns: a,
|
|
2084
|
+
size: r
|
|
2085
|
+
} = mo("message-box", y(() => e.buttonSize)), { t: s } = n, { nextZIndex: i } = o, f = x(!1), u = St({
|
|
2086
|
+
autofocus: !0,
|
|
2087
|
+
beforeClose: null,
|
|
2088
|
+
callback: null,
|
|
2089
|
+
cancelButtonText: "",
|
|
2090
|
+
cancelButtonClass: "",
|
|
2091
|
+
confirmButtonText: "",
|
|
2092
|
+
confirmButtonClass: "",
|
|
2093
|
+
customClass: "",
|
|
2094
|
+
customStyle: {},
|
|
2095
|
+
dangerouslyUseHTMLString: !1,
|
|
2096
|
+
distinguishCancelAndClose: !1,
|
|
2097
|
+
icon: "",
|
|
2098
|
+
closeIcon: "",
|
|
2099
|
+
inputPattern: null,
|
|
2100
|
+
inputPlaceholder: "",
|
|
2101
|
+
inputType: "text",
|
|
2102
|
+
inputValue: "",
|
|
2103
|
+
inputValidator: void 0,
|
|
2104
|
+
inputErrorMessage: "",
|
|
2105
|
+
message: "",
|
|
2106
|
+
modalFade: !0,
|
|
2107
|
+
modalClass: "",
|
|
2108
|
+
showCancelButton: !1,
|
|
2109
|
+
showConfirmButton: !0,
|
|
2110
|
+
type: "",
|
|
2111
|
+
title: void 0,
|
|
2112
|
+
showInput: !1,
|
|
2113
|
+
action: "",
|
|
2114
|
+
confirmButtonLoading: !1,
|
|
2115
|
+
cancelButtonLoading: !1,
|
|
2116
|
+
confirmButtonLoadingIcon: pt(ft),
|
|
2117
|
+
cancelButtonLoadingIcon: pt(ft),
|
|
2118
|
+
confirmButtonDisabled: !1,
|
|
2119
|
+
editorErrorMessage: "",
|
|
2120
|
+
validateError: !1,
|
|
2121
|
+
zIndex: i()
|
|
2122
|
+
}), h = y(() => {
|
|
2123
|
+
const T = u.type;
|
|
2124
|
+
return { [a.bm("icon", T)]: T && Ut[T] };
|
|
2125
|
+
}), E = ht(), w = ht(), p = y(() => {
|
|
2126
|
+
const T = u.type;
|
|
2127
|
+
return u.icon || T && Ut[T] || "";
|
|
2128
|
+
}), l = y(() => !!u.message), m = x(), k = x(), v = x(), g = x(), C = x(), V = y(() => u.confirmButtonClass);
|
|
2129
|
+
G(() => u.inputValue, async (T) => {
|
|
2130
|
+
await D(), e.boxType === "prompt" && T && Se();
|
|
2131
|
+
}, { immediate: !0 }), G(() => f.value, (T) => {
|
|
2132
|
+
var _, $;
|
|
2133
|
+
T && (e.boxType !== "prompt" && (u.autofocus ? v.value = ($ = (_ = C.value) == null ? void 0 : _.$el) != null ? $ : m.value : v.value = m.value), u.zIndex = i()), e.boxType === "prompt" && (T ? D().then(() => {
|
|
2134
|
+
var te;
|
|
2135
|
+
g.value && g.value.$el && (u.autofocus ? v.value = (te = nt()) != null ? te : m.value : v.value = m.value);
|
|
2136
|
+
}) : (u.editorErrorMessage = "", u.validateError = !1));
|
|
2137
|
+
});
|
|
2138
|
+
const j = y(() => e.draggable), R = y(() => e.overflow), { isDragging: q } = Nr(m, k, j, R);
|
|
2139
|
+
pe(async () => {
|
|
2140
|
+
await D(), e.closeOnHashChange && window.addEventListener("hashchange", F);
|
|
2141
|
+
}), Pe(() => {
|
|
2142
|
+
e.closeOnHashChange && window.removeEventListener("hashchange", F);
|
|
2143
|
+
});
|
|
2144
|
+
function F() {
|
|
2145
|
+
f.value && (f.value = !1, D(() => {
|
|
2146
|
+
u.action && t("action", u.action);
|
|
2147
|
+
}));
|
|
2148
|
+
}
|
|
2149
|
+
const J = () => {
|
|
2150
|
+
e.closeOnClickModal && N(u.distinguishCancelAndClose ? "close" : "cancel");
|
|
2151
|
+
}, ee = _n(J), we = (T) => {
|
|
2152
|
+
if (u.inputType !== "textarea")
|
|
2153
|
+
return T.preventDefault(), N("confirm");
|
|
2154
|
+
}, N = (T) => {
|
|
2155
|
+
var _;
|
|
2156
|
+
e.boxType === "prompt" && T === "confirm" && !Se() || (u.action = T, u.beforeClose ? (_ = u.beforeClose) == null || _.call(u, T, u, F) : F());
|
|
2157
|
+
}, Se = () => {
|
|
2158
|
+
if (e.boxType === "prompt") {
|
|
2159
|
+
const T = u.inputPattern;
|
|
2160
|
+
if (T && !T.test(u.inputValue || ""))
|
|
2161
|
+
return u.editorErrorMessage = u.inputErrorMessage || s("el.messagebox.error"), u.validateError = !0, !1;
|
|
2162
|
+
const _ = u.inputValidator;
|
|
2163
|
+
if (Be(_)) {
|
|
2164
|
+
const $ = _(u.inputValue);
|
|
2165
|
+
if ($ === !1)
|
|
2166
|
+
return u.editorErrorMessage = u.inputErrorMessage || s("el.messagebox.error"), u.validateError = !0, !1;
|
|
2167
|
+
if (de($))
|
|
2168
|
+
return u.editorErrorMessage = $, u.validateError = !0, !1;
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
return u.editorErrorMessage = "", u.validateError = !1, !0;
|
|
2172
|
+
}, nt = () => {
|
|
2173
|
+
var T, _;
|
|
2174
|
+
const $ = (T = g.value) == null ? void 0 : T.$refs;
|
|
2175
|
+
return (_ = $ == null ? void 0 : $.input) != null ? _ : $ == null ? void 0 : $.textarea;
|
|
2176
|
+
}, Oe = () => {
|
|
2177
|
+
N("close");
|
|
2178
|
+
}, _e = () => {
|
|
2179
|
+
e.closeOnPressEscape && Oe();
|
|
2180
|
+
};
|
|
2181
|
+
return e.lockScroll && Lr(f, { ns: a }), {
|
|
2182
|
+
...Bo(u),
|
|
2183
|
+
ns: a,
|
|
2184
|
+
overlayEvent: ee,
|
|
2185
|
+
visible: f,
|
|
2186
|
+
hasMessage: l,
|
|
2187
|
+
typeClass: h,
|
|
2188
|
+
contentId: E,
|
|
2189
|
+
inputId: w,
|
|
2190
|
+
btnSize: r,
|
|
2191
|
+
iconComponent: p,
|
|
2192
|
+
confirmButtonClasses: V,
|
|
2193
|
+
rootRef: m,
|
|
2194
|
+
focusStartRef: v,
|
|
2195
|
+
headerRef: k,
|
|
2196
|
+
inputRef: g,
|
|
2197
|
+
isDragging: q,
|
|
2198
|
+
confirmRef: C,
|
|
2199
|
+
doClose: F,
|
|
2200
|
+
handleClose: Oe,
|
|
2201
|
+
onCloseRequested: _e,
|
|
2202
|
+
handleWrapperClick: J,
|
|
2203
|
+
handleInputEnter: we,
|
|
2204
|
+
handleAction: N,
|
|
2205
|
+
t: s
|
|
2206
|
+
};
|
|
2207
|
+
}
|
|
2208
|
+
});
|
|
2209
|
+
function _r(e, t, n, o, a, r) {
|
|
2210
|
+
const s = ge("el-icon"), i = ge("el-input"), f = ge("el-button"), u = ge("el-focus-trap"), h = ge("el-overlay");
|
|
2211
|
+
return b(), A(No, {
|
|
2212
|
+
name: "fade-in-linear",
|
|
2213
|
+
onAfterLeave: (E) => e.$emit("vanish"),
|
|
2214
|
+
persisted: ""
|
|
2215
|
+
}, {
|
|
2216
|
+
default: B(() => [
|
|
2217
|
+
Me(Z(h, {
|
|
2218
|
+
"z-index": e.zIndex,
|
|
2219
|
+
"overlay-class": [e.ns.is("message-box"), e.modalClass],
|
|
2220
|
+
mask: e.modal
|
|
2221
|
+
}, {
|
|
2222
|
+
default: B(() => [
|
|
2223
|
+
H("div", {
|
|
2224
|
+
role: "dialog",
|
|
2225
|
+
"aria-label": e.title,
|
|
2226
|
+
"aria-modal": "true",
|
|
2227
|
+
"aria-describedby": e.showInput ? void 0 : e.contentId,
|
|
2228
|
+
class: S(`${e.ns.namespace.value}-overlay-message-box`),
|
|
2229
|
+
onClick: e.overlayEvent.onClick,
|
|
2230
|
+
onMousedown: e.overlayEvent.onMousedown,
|
|
2231
|
+
onMouseup: e.overlayEvent.onMouseup
|
|
2232
|
+
}, [
|
|
2233
|
+
Z(u, {
|
|
2234
|
+
loop: "",
|
|
2235
|
+
trapped: e.visible,
|
|
2236
|
+
"focus-trap-el": e.rootRef,
|
|
2237
|
+
"focus-start-el": e.focusStartRef,
|
|
2238
|
+
onReleaseRequested: e.onCloseRequested
|
|
2239
|
+
}, {
|
|
2240
|
+
default: B(() => [
|
|
2241
|
+
H("div", {
|
|
2242
|
+
ref: "rootRef",
|
|
2243
|
+
class: S([
|
|
2244
|
+
e.ns.b(),
|
|
2245
|
+
e.customClass,
|
|
2246
|
+
e.ns.is("draggable", e.draggable),
|
|
2247
|
+
e.ns.is("dragging", e.isDragging),
|
|
2248
|
+
{ [e.ns.m("center")]: e.center }
|
|
2249
|
+
]),
|
|
2250
|
+
style: Ze(e.customStyle),
|
|
2251
|
+
tabindex: "-1",
|
|
2252
|
+
onClick: ke(() => {
|
|
2253
|
+
}, ["stop"])
|
|
2254
|
+
}, [
|
|
2255
|
+
e.title !== null && e.title !== void 0 ? (b(), L("div", {
|
|
2256
|
+
key: 0,
|
|
2257
|
+
ref: "headerRef",
|
|
2258
|
+
class: S([e.ns.e("header"), { "show-close": e.showClose }])
|
|
2259
|
+
}, [
|
|
2260
|
+
H("div", {
|
|
2261
|
+
class: S(e.ns.e("title"))
|
|
2262
|
+
}, [
|
|
2263
|
+
e.iconComponent && e.center ? (b(), A(s, {
|
|
2264
|
+
key: 0,
|
|
2265
|
+
class: S([e.ns.e("status"), e.typeClass])
|
|
2266
|
+
}, {
|
|
2267
|
+
default: B(() => [
|
|
2268
|
+
(b(), A(K(e.iconComponent)))
|
|
2269
|
+
]),
|
|
2270
|
+
_: 1
|
|
2271
|
+
}, 8, ["class"])) : I("v-if", !0),
|
|
2272
|
+
H("span", null, W(e.title), 1)
|
|
2273
|
+
], 2),
|
|
2274
|
+
e.showClose ? (b(), L("button", {
|
|
2275
|
+
key: 0,
|
|
2276
|
+
type: "button",
|
|
2277
|
+
class: S(e.ns.e("headerbtn")),
|
|
2278
|
+
"aria-label": e.t("el.messagebox.close"),
|
|
2279
|
+
onClick: (E) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"),
|
|
2280
|
+
onKeydown: $e(ke((E) => e.handleAction(e.distinguishCancelAndClose ? "close" : "cancel"), ["prevent"]), ["enter"])
|
|
2281
|
+
}, [
|
|
2282
|
+
Z(s, {
|
|
2283
|
+
class: S(e.ns.e("close"))
|
|
2284
|
+
}, {
|
|
2285
|
+
default: B(() => [
|
|
2286
|
+
(b(), A(K(e.closeIcon || "close")))
|
|
2287
|
+
]),
|
|
2288
|
+
_: 1
|
|
2289
|
+
}, 8, ["class"])
|
|
2290
|
+
], 42, ["aria-label", "onClick", "onKeydown"])) : I("v-if", !0)
|
|
2291
|
+
], 2)) : I("v-if", !0),
|
|
2292
|
+
H("div", {
|
|
2293
|
+
id: e.contentId,
|
|
2294
|
+
class: S(e.ns.e("content"))
|
|
2295
|
+
}, [
|
|
2296
|
+
H("div", {
|
|
2297
|
+
class: S(e.ns.e("container"))
|
|
2298
|
+
}, [
|
|
2299
|
+
e.iconComponent && !e.center && e.hasMessage ? (b(), A(s, {
|
|
2300
|
+
key: 0,
|
|
2301
|
+
class: S([e.ns.e("status"), e.typeClass])
|
|
2302
|
+
}, {
|
|
2303
|
+
default: B(() => [
|
|
2304
|
+
(b(), A(K(e.iconComponent)))
|
|
2305
|
+
]),
|
|
2306
|
+
_: 1
|
|
2307
|
+
}, 8, ["class"])) : I("v-if", !0),
|
|
2308
|
+
e.hasMessage ? (b(), L("div", {
|
|
2309
|
+
key: 1,
|
|
2310
|
+
class: S(e.ns.e("message"))
|
|
2311
|
+
}, [
|
|
2312
|
+
Y(e.$slots, "default", {}, () => [
|
|
2313
|
+
e.dangerouslyUseHTMLString ? (b(), A(K(e.showInput ? "label" : "p"), {
|
|
2314
|
+
key: 1,
|
|
2315
|
+
for: e.showInput ? e.inputId : void 0,
|
|
2316
|
+
innerHTML: e.message
|
|
2317
|
+
}, null, 8, ["for", "innerHTML"])) : (b(), A(K(e.showInput ? "label" : "p"), {
|
|
2318
|
+
key: 0,
|
|
2319
|
+
for: e.showInput ? e.inputId : void 0,
|
|
2320
|
+
textContent: W(e.message)
|
|
2321
|
+
}, null, 8, ["for", "textContent"]))
|
|
2322
|
+
])
|
|
2323
|
+
], 2)) : I("v-if", !0)
|
|
2324
|
+
], 2),
|
|
2325
|
+
Me(H("div", {
|
|
2326
|
+
class: S(e.ns.e("input"))
|
|
2327
|
+
}, [
|
|
2328
|
+
Z(i, {
|
|
2329
|
+
id: e.inputId,
|
|
2330
|
+
ref: "inputRef",
|
|
2331
|
+
modelValue: e.inputValue,
|
|
2332
|
+
"onUpdate:modelValue": (E) => e.inputValue = E,
|
|
2333
|
+
type: e.inputType,
|
|
2334
|
+
placeholder: e.inputPlaceholder,
|
|
2335
|
+
"aria-invalid": e.validateError,
|
|
2336
|
+
class: S({ invalid: e.validateError }),
|
|
2337
|
+
onKeydown: $e(e.handleInputEnter, ["enter"])
|
|
2338
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "type", "placeholder", "aria-invalid", "class", "onKeydown"]),
|
|
2339
|
+
H("div", {
|
|
2340
|
+
class: S(e.ns.e("errormsg")),
|
|
2341
|
+
style: Ze({
|
|
2342
|
+
visibility: e.editorErrorMessage ? "visible" : "hidden"
|
|
2343
|
+
})
|
|
2344
|
+
}, W(e.editorErrorMessage), 7)
|
|
2345
|
+
], 2), [
|
|
2346
|
+
[Ae, e.showInput]
|
|
2347
|
+
])
|
|
2348
|
+
], 10, ["id"]),
|
|
2349
|
+
H("div", {
|
|
2350
|
+
class: S(e.ns.e("btns"))
|
|
2351
|
+
}, [
|
|
2352
|
+
e.showCancelButton ? (b(), A(f, {
|
|
2353
|
+
key: 0,
|
|
2354
|
+
loading: e.cancelButtonLoading,
|
|
2355
|
+
"loading-icon": e.cancelButtonLoadingIcon,
|
|
2356
|
+
class: S([e.cancelButtonClass]),
|
|
2357
|
+
round: e.roundButton,
|
|
2358
|
+
size: e.btnSize,
|
|
2359
|
+
onClick: (E) => e.handleAction("cancel"),
|
|
2360
|
+
onKeydown: $e(ke((E) => e.handleAction("cancel"), ["prevent"]), ["enter"])
|
|
2361
|
+
}, {
|
|
2362
|
+
default: B(() => [
|
|
2363
|
+
xe(W(e.cancelButtonText || e.t("el.messagebox.cancel")), 1)
|
|
2364
|
+
]),
|
|
2365
|
+
_: 1
|
|
2366
|
+
}, 8, ["loading", "loading-icon", "class", "round", "size", "onClick", "onKeydown"])) : I("v-if", !0),
|
|
2367
|
+
Me(Z(f, {
|
|
2368
|
+
ref: "confirmRef",
|
|
2369
|
+
type: "primary",
|
|
2370
|
+
loading: e.confirmButtonLoading,
|
|
2371
|
+
"loading-icon": e.confirmButtonLoadingIcon,
|
|
2372
|
+
class: S([e.confirmButtonClasses]),
|
|
2373
|
+
round: e.roundButton,
|
|
2374
|
+
disabled: e.confirmButtonDisabled,
|
|
2375
|
+
size: e.btnSize,
|
|
2376
|
+
onClick: (E) => e.handleAction("confirm"),
|
|
2377
|
+
onKeydown: $e(ke((E) => e.handleAction("confirm"), ["prevent"]), ["enter"])
|
|
2378
|
+
}, {
|
|
2379
|
+
default: B(() => [
|
|
2380
|
+
xe(W(e.confirmButtonText || e.t("el.messagebox.confirm")), 1)
|
|
2381
|
+
]),
|
|
2382
|
+
_: 1
|
|
2383
|
+
}, 8, ["loading", "loading-icon", "class", "round", "disabled", "size", "onClick", "onKeydown"]), [
|
|
2384
|
+
[Ae, e.showConfirmButton]
|
|
2385
|
+
])
|
|
2386
|
+
], 2)
|
|
2387
|
+
], 14, ["onClick"])
|
|
2388
|
+
]),
|
|
2389
|
+
_: 3
|
|
2390
|
+
}, 8, ["trapped", "focus-trap-el", "focus-start-el", "onReleaseRequested"])
|
|
2391
|
+
], 42, ["aria-label", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
|
|
2392
|
+
]),
|
|
2393
|
+
_: 3
|
|
2394
|
+
}, 8, ["z-index", "overlay-class", "mask"]), [
|
|
2395
|
+
[Ae, e.visible]
|
|
2396
|
+
])
|
|
2397
|
+
]),
|
|
2398
|
+
_: 3
|
|
2399
|
+
}, 8, ["onAfterLeave"]);
|
|
2400
|
+
}
|
|
2401
|
+
var Fr = /* @__PURE__ */ Le(Or, [["render", _r], ["__file", "index.vue"]]);
|
|
2402
|
+
const Ne = /* @__PURE__ */ new Map(), $r = (e) => {
|
|
2403
|
+
let t = document.body;
|
|
2404
|
+
return e.appendTo && (de(e.appendTo) && (t = document.querySelector(e.appendTo)), Wt(e.appendTo) && (t = e.appendTo), Wt(t) || (t = document.body)), t;
|
|
2405
|
+
}, Hr = (e, t, n = null) => {
|
|
2406
|
+
const o = Z(Fr, e, Be(e.message) || Sn(e.message) ? {
|
|
2407
|
+
default: Be(e.message) ? e.message : () => e.message
|
|
2408
|
+
} : null);
|
|
2409
|
+
return o.appContext = n, Cn(o, t), $r(e).appendChild(t.firstElementChild), o.component;
|
|
2410
|
+
}, Vr = () => document.createElement("div"), zr = (e, t) => {
|
|
2411
|
+
const n = Vr();
|
|
2412
|
+
e.onVanish = () => {
|
|
2413
|
+
Cn(null, n), Ne.delete(a);
|
|
2414
|
+
}, e.onAction = (r) => {
|
|
2415
|
+
const s = Ne.get(a);
|
|
2416
|
+
let i;
|
|
2417
|
+
e.showInput ? i = { value: a.inputValue, action: r } : i = r, e.callback ? e.callback(i, o.proxy) : r === "cancel" || r === "close" ? e.distinguishCancelAndClose && r !== "cancel" ? s.reject("close") : s.reject("cancel") : s.resolve(i);
|
|
2418
|
+
};
|
|
2419
|
+
const o = Hr(e, n, t), a = o.proxy;
|
|
2420
|
+
for (const r in e)
|
|
2421
|
+
Kt(e, r) && !Kt(a.$props, r) && (r === "closeIcon" && qe(e[r]) ? a[r] = pt(e[r]) : a[r] = e[r]);
|
|
2422
|
+
return a.visible = !0, a;
|
|
2423
|
+
};
|
|
2424
|
+
function Ee(e, t = null) {
|
|
2425
|
+
if (!ye)
|
|
2426
|
+
return Promise.reject();
|
|
2427
|
+
let n;
|
|
2428
|
+
return de(e) || Sn(e) ? e = {
|
|
2429
|
+
message: e
|
|
2430
|
+
} : n = e.callback, new Promise((o, a) => {
|
|
2431
|
+
const r = zr(e, t ?? Ee._context);
|
|
2432
|
+
Ne.set(r, {
|
|
2433
|
+
options: e,
|
|
2434
|
+
callback: n,
|
|
2435
|
+
resolve: o,
|
|
2436
|
+
reject: a
|
|
2437
|
+
});
|
|
2438
|
+
});
|
|
2439
|
+
}
|
|
2440
|
+
const Dr = ["alert", "confirm", "prompt"], Ur = {
|
|
2441
|
+
alert: { closeOnPressEscape: !1, closeOnClickModal: !1 },
|
|
2442
|
+
confirm: { showCancelButton: !0 },
|
|
2443
|
+
prompt: { showCancelButton: !0, showInput: !0 }
|
|
2444
|
+
};
|
|
2445
|
+
Dr.forEach((e) => {
|
|
2446
|
+
Ee[e] = Kr(e);
|
|
2447
|
+
});
|
|
2448
|
+
function Kr(e) {
|
|
2449
|
+
return (t, n, o, a) => {
|
|
2450
|
+
let r = "";
|
|
2451
|
+
return qe(n) ? (o = n, r = "") : go(n) ? r = "" : r = n, Ee(Object.assign({
|
|
2452
|
+
title: r,
|
|
2453
|
+
message: t,
|
|
2454
|
+
type: "",
|
|
2455
|
+
...Ur[e]
|
|
2456
|
+
}, o, {
|
|
2457
|
+
boxType: e
|
|
2458
|
+
}), a);
|
|
2459
|
+
};
|
|
2460
|
+
}
|
|
2461
|
+
Ee.close = () => {
|
|
2462
|
+
Ne.forEach((e, t) => {
|
|
2463
|
+
t.doClose();
|
|
2464
|
+
}), Ne.clear();
|
|
2465
|
+
};
|
|
2466
|
+
Ee._context = null;
|
|
2467
|
+
const se = Ee;
|
|
2468
|
+
se.install = (e) => {
|
|
2469
|
+
se._context = e._context, e.config.globalProperties.$msgbox = se, e.config.globalProperties.$messageBox = se, e.config.globalProperties.$alert = se.alert, e.config.globalProperties.$confirm = se.confirm, e.config.globalProperties.$prompt = se.prompt;
|
|
2470
|
+
};
|
|
2471
|
+
const Wr = se, Yr = {
|
|
2472
|
+
key: 0,
|
|
2473
|
+
class: "distance-left"
|
|
2474
|
+
}, Gr = ["onClick"], Jr = /* @__PURE__ */ Q({
|
|
2475
|
+
__name: "runAs",
|
|
2476
|
+
props: {
|
|
2477
|
+
modelValue: { type: Boolean },
|
|
2478
|
+
modelModifiers: {}
|
|
2479
|
+
},
|
|
2480
|
+
emits: ["update:modelValue"],
|
|
2481
|
+
setup(e) {
|
|
2482
|
+
const t = x(!1), n = x([]), o = Fe().user, a = Lo(e, "modelValue"), r = St([
|
|
2483
|
+
{
|
|
2484
|
+
label: "login.username",
|
|
2485
|
+
prop: "loginName",
|
|
2486
|
+
width: "100",
|
|
2487
|
+
sortable: !0,
|
|
2488
|
+
isColumn: !0
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
label: "sysUser.nickname",
|
|
2492
|
+
prop: "nickName",
|
|
2493
|
+
minWidth: "100",
|
|
2494
|
+
isColumn: !0
|
|
2495
|
+
},
|
|
2496
|
+
{
|
|
2497
|
+
label: "sysUser.phoneNumber",
|
|
2498
|
+
prop: "mobilePhone",
|
|
2499
|
+
slotName: "mobilePhone",
|
|
2500
|
+
columnType: "slot",
|
|
2501
|
+
width: "140",
|
|
2502
|
+
isColumn: !0,
|
|
2503
|
+
sortable: !0
|
|
2504
|
+
},
|
|
2505
|
+
{
|
|
2506
|
+
label: "sysUser.email",
|
|
2507
|
+
prop: "email",
|
|
2508
|
+
width: "180",
|
|
2509
|
+
slotName: "email",
|
|
2510
|
+
columnType: "slot",
|
|
2511
|
+
isColumn: !0,
|
|
2512
|
+
sortable: !0
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
label: "common.status",
|
|
2516
|
+
width: "100",
|
|
2517
|
+
slotName: "status",
|
|
2518
|
+
columnType: "slot",
|
|
2519
|
+
isColumn: !0
|
|
2520
|
+
},
|
|
2521
|
+
{
|
|
2522
|
+
label: "common.operate",
|
|
2523
|
+
width: "80",
|
|
2524
|
+
slotName: "operation",
|
|
2525
|
+
columnType: "slot",
|
|
2526
|
+
fixed: "right",
|
|
2527
|
+
isColumn: !0
|
|
2528
|
+
}
|
|
2529
|
+
]);
|
|
2530
|
+
t.value = !0;
|
|
2531
|
+
function s(f) {
|
|
2532
|
+
f.showEncrypt = !f.showEncrypt;
|
|
2533
|
+
}
|
|
2534
|
+
bo().then(({ data: f }) => {
|
|
2535
|
+
t.value = !1, n.value = f.results;
|
|
2536
|
+
});
|
|
2537
|
+
function i(f) {
|
|
2538
|
+
Wr.confirm("确定切换用户身份吗?", "提示", {
|
|
2539
|
+
confirmButtonText: "确定",
|
|
2540
|
+
cancelButtonText: "取消",
|
|
2541
|
+
type: "warning"
|
|
2542
|
+
}).then(() => {
|
|
2543
|
+
console.log(Fe()), wo(f.userId).then(async (u) => {
|
|
2544
|
+
u.status === 200 && (Fe().user.roleCodes = [], Fe().user.permCodes = [], a.value = !1, location.reload(), So({
|
|
2545
|
+
message: "切换成功",
|
|
2546
|
+
type: "success"
|
|
2547
|
+
}));
|
|
2548
|
+
});
|
|
2549
|
+
});
|
|
2550
|
+
}
|
|
2551
|
+
return (f, u) => {
|
|
2552
|
+
const h = Eo, E = yo, w = ge("el-dialog");
|
|
2553
|
+
return b(), A(w, {
|
|
2554
|
+
title: "切换身份",
|
|
2555
|
+
modelValue: a.value,
|
|
2556
|
+
"onUpdate:modelValue": u[0] || (u[0] = (p) => a.value = p),
|
|
2557
|
+
width: "800px"
|
|
2558
|
+
}, {
|
|
2559
|
+
default: B(() => [
|
|
2560
|
+
Z(E, {
|
|
2561
|
+
class: "table-top",
|
|
2562
|
+
ref: "multipleTableRef",
|
|
2563
|
+
"row-key": "userId",
|
|
2564
|
+
"list-loading": d(t),
|
|
2565
|
+
data: d(n),
|
|
2566
|
+
"table-label": d(r),
|
|
2567
|
+
isSelection: !1
|
|
2568
|
+
}, {
|
|
2569
|
+
mobilePhone: B((p) => [
|
|
2570
|
+
xe(W(p.data.row.showEncrypt ? p.data.row.mobilePhone : p.data.row.mobilePhoneIns) + " ", 1),
|
|
2571
|
+
p.data.row.mobilePhoneIns ? (b(), L("span", Yr, [
|
|
2572
|
+
Me(Z(h, {
|
|
2573
|
+
"icon-class": "close-eye",
|
|
2574
|
+
onClick: (l) => s(p.data.row)
|
|
2575
|
+
}, null, 8, ["onClick"]), [
|
|
2576
|
+
[Ae, !p.data.row.showEncrypt]
|
|
2577
|
+
]),
|
|
2578
|
+
Me(Z(h, {
|
|
2579
|
+
"icon-class": "eye-open",
|
|
2580
|
+
onClick: (l) => s(p.data.row)
|
|
2581
|
+
}, null, 8, ["onClick"]), [
|
|
2582
|
+
[Ae, p.data.row.showEncrypt]
|
|
2583
|
+
])
|
|
2584
|
+
])) : I("", !0)
|
|
2585
|
+
]),
|
|
2586
|
+
email: B((p) => [
|
|
2587
|
+
xe(W(p.data.row.showEncrypt ? p.data.row.email : p.data.row.emailIns), 1)
|
|
2588
|
+
]),
|
|
2589
|
+
status: B((p) => [
|
|
2590
|
+
xe(W(p.data.row.userId.replace(/-/g, "") === d(o).primaryUserId ? "原身份" : "") + " " + W(p.data.row.userId == d(o).userId ? "当前身份" : ""), 1)
|
|
2591
|
+
]),
|
|
2592
|
+
operation: B((p) => [
|
|
2593
|
+
p.data.row.userId !== d(o).userId ? (b(), L("span", {
|
|
2594
|
+
key: 0,
|
|
2595
|
+
class: "el-button-color",
|
|
2596
|
+
onClick: (l) => i(p.data.row)
|
|
2597
|
+
}, " 切换 ", 8, Gr)) : I("", !0)
|
|
2598
|
+
]),
|
|
2599
|
+
_: 1
|
|
2600
|
+
}, 8, ["list-loading", "data", "table-label"])
|
|
2601
|
+
]),
|
|
2602
|
+
_: 1
|
|
2603
|
+
}, 8, ["modelValue"]);
|
|
2604
|
+
};
|
|
2605
|
+
}
|
|
2606
|
+
});
|
|
2607
|
+
export {
|
|
2608
|
+
Wr as E,
|
|
2609
|
+
Jr as _
|
|
2610
|
+
};
|