qy-vue-plugins 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-BFusb3rd.js +880 -0
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-C0OTINr4.js +1 -0
- package/dist/chunks/aria-CU11fhFG.js +5 -0
- package/dist/chunks/aria-Lnh-oIIU.js +173 -0
- package/dist/chunks/{base-C6ZR-g-3.js → base-BBPoamOf.js} +180 -168
- package/dist/chunks/base-Dbw4YzZq.js +1 -0
- package/dist/chunks/use-global-config-D_HRwVvW.js +301 -0
- package/dist/chunks/use-global-config-Wtw3ujWW.js +2 -0
- package/dist/manageTable/ReplaceSpeciesNameDialog.cjs +1 -1
- package/dist/manageTable/ReplaceSpeciesNameDialog.mjs +1 -1
- package/dist/manageTable/SortItem.cjs +1 -1
- package/dist/manageTable/SortItem.mjs +42 -39
- package/dist/manageTable/manageTable.cjs +1 -1
- package/dist/manageTable/manageTable.mjs +155 -108
- package/dist/mapbox/components/VideoDialog.cjs +3 -0
- package/dist/mapbox/components/VideoDialog.mjs +1741 -0
- package/dist/mapbox/widgets/LayerAttributeDialog.cjs +1 -2
- package/dist/mapbox/widgets/LayerAttributeDialog.mjs +264 -551
- package/dist/mapbox/widgets/LayerDialog.cjs +1 -1
- package/dist/mapbox/widgets/LayerDialog.mjs +201 -167
- package/dist/qy-vue-plugins.css +1 -1
- package/dist/types/manageTable/components/SortItem.vue.d.ts +1 -0
- package/dist/types/manageTable/manageTable.vue.d.ts +4 -0
- package/dist/types/mapbox/components/VideoDialog.vue.d.ts +58 -0
- package/dist/types/mapbox-components-VideoDialog.d.ts +4 -0
- package/package.json +1 -1
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-BsMK0hpE.js +0 -1014
- package/dist/chunks/ReplaceSpeciesNameDialog.vue_vue_type_script_setup_true_lang-Crqsopo0.js +0 -5
- package/dist/chunks/base-CPjTxLkU.js +0 -1
|
@@ -0,0 +1,1741 @@
|
|
|
1
|
+
import { i as Lt, f as ae, j as X, e as ut, C as Rt, u as te, N as Te, o as Le, F as It, G as Ft, H as Ot, a as Dt, g as Pt, r as $t, m as Ht, b as Vt, l as Ut, k as Ye } from "../../chunks/base-BBPoamOf.js";
|
|
2
|
+
import { onMounted as re, onBeforeUnmount as se, ref as x, defineComponent as I, renderSlot as A, provide as He, watch as V, unref as c, nextTick as Re, createBlock as H, openBlock as C, Teleport as zt, computed as k, inject as Ie, useSlots as ct, Text as Kt, resolveDynamicComponent as be, mergeProps as Fe, withCtx as N, createElementBlock as J, createCommentVNode as oe, Fragment as jt, normalizeClass as P, reactive as Gt, toRef as We, createVNode as Q, h as Yt, watchEffect as Wt, normalizeStyle as dt, createElementVNode as ee, toDisplayString as qt, isRef as Xt, onScopeDispose as Zt, getCurrentInstance as Jt, Transition as Qt, withDirectives as en, createSlots as tn, vShow as nn, createTextVNode as on } from "vue";
|
|
3
|
+
import { g as an, h as rn, _ as ne, f as sn, w as Ve, d as ln, u as un, c as ft, a as Oe, E as De, j as cn, k as dn, U as vt, l as qe } from "../../chunks/aria-Lnh-oIIU.js";
|
|
4
|
+
import { isClient as ye, useTimeoutFn as Xe } from "@vueuse/core";
|
|
5
|
+
import { a as ht, b as fn, c as vn } from "../../chunks/use-global-config-D_HRwVvW.js";
|
|
6
|
+
import { Loading as hn } from "@element-plus/icons-vue";
|
|
7
|
+
import { _ as pn } from "../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
+
let de;
|
|
9
|
+
const gn = (e) => {
|
|
10
|
+
var n;
|
|
11
|
+
if (!ye)
|
|
12
|
+
return 0;
|
|
13
|
+
if (de !== void 0)
|
|
14
|
+
return de;
|
|
15
|
+
const t = document.createElement("div");
|
|
16
|
+
t.className = `${e}-scrollbar__wrap`, t.style.visibility = "hidden", t.style.width = "100px", t.style.position = "absolute", t.style.top = "-9999px", document.body.appendChild(t);
|
|
17
|
+
const o = t.offsetWidth;
|
|
18
|
+
t.style.overflow = "scroll";
|
|
19
|
+
const a = document.createElement("div");
|
|
20
|
+
a.style.width = "100%", t.appendChild(a);
|
|
21
|
+
const r = a.offsetWidth;
|
|
22
|
+
return (n = t.parentNode) == null || n.removeChild(t), de = o - r, de;
|
|
23
|
+
}, Ce = "focus-trap.focus-after-trapped", Ae = "focus-trap.focus-after-released", bn = "focus-trap.focusout-prevented", Ze = {
|
|
24
|
+
cancelable: !0,
|
|
25
|
+
bubbles: !1
|
|
26
|
+
}, mn = {
|
|
27
|
+
cancelable: !0,
|
|
28
|
+
bubbles: !1
|
|
29
|
+
}, Je = "focusAfterTrapped", Qe = "focusAfterReleased", pt = Symbol("elFocusTrap"), Ue = x(), Se = x(0), ze = x(0);
|
|
30
|
+
let fe = 0;
|
|
31
|
+
const gt = (e) => {
|
|
32
|
+
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
33
|
+
acceptNode: (o) => {
|
|
34
|
+
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
35
|
+
return o.disabled || o.hidden || a ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
for (; t.nextNode(); )
|
|
39
|
+
n.push(t.currentNode);
|
|
40
|
+
return n;
|
|
41
|
+
}, et = (e, n) => {
|
|
42
|
+
for (const t of e)
|
|
43
|
+
if (!yn(t, n))
|
|
44
|
+
return t;
|
|
45
|
+
}, yn = (e, n) => {
|
|
46
|
+
if (typeof process < "u" && process.env.NODE_ENV === "test")
|
|
47
|
+
return !1;
|
|
48
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
49
|
+
return !0;
|
|
50
|
+
for (; e; ) {
|
|
51
|
+
if (n && e === n)
|
|
52
|
+
return !1;
|
|
53
|
+
if (getComputedStyle(e).display === "none")
|
|
54
|
+
return !0;
|
|
55
|
+
e = e.parentElement;
|
|
56
|
+
}
|
|
57
|
+
return !1;
|
|
58
|
+
}, En = (e) => {
|
|
59
|
+
const n = gt(e), t = et(n, e), o = et(n.reverse(), e);
|
|
60
|
+
return [t, o];
|
|
61
|
+
}, Sn = (e) => e instanceof HTMLInputElement && "select" in e, Y = (e, n) => {
|
|
62
|
+
if (e) {
|
|
63
|
+
const t = document.activeElement;
|
|
64
|
+
an(e, { preventScroll: !0 }), ze.value = window.performance.now(), e !== t && Sn(e) && n && e.select();
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
function tt(e, n) {
|
|
68
|
+
const t = [...e], o = e.indexOf(n);
|
|
69
|
+
return o !== -1 && t.splice(o, 1), t;
|
|
70
|
+
}
|
|
71
|
+
const kn = () => {
|
|
72
|
+
let e = [];
|
|
73
|
+
return {
|
|
74
|
+
push: (o) => {
|
|
75
|
+
const a = e[0];
|
|
76
|
+
a && o !== a && a.pause(), e = tt(e, o), e.unshift(o);
|
|
77
|
+
},
|
|
78
|
+
remove: (o) => {
|
|
79
|
+
var a, r;
|
|
80
|
+
e = tt(e, o), (r = (a = e[0]) == null ? void 0 : a.resume) == null || r.call(a);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
}, wn = (e, n = !1) => {
|
|
84
|
+
const t = document.activeElement;
|
|
85
|
+
for (const o of e)
|
|
86
|
+
if (Y(o, n), document.activeElement !== t)
|
|
87
|
+
return;
|
|
88
|
+
}, nt = kn(), _n = () => Se.value > ze.value, ve = () => {
|
|
89
|
+
Ue.value = "pointer", Se.value = window.performance.now();
|
|
90
|
+
}, ot = () => {
|
|
91
|
+
Ue.value = "keyboard", Se.value = window.performance.now();
|
|
92
|
+
}, Tn = () => (re(() => {
|
|
93
|
+
fe === 0 && (document.addEventListener("mousedown", ve), document.addEventListener("touchstart", ve), document.addEventListener("keydown", ot)), fe++;
|
|
94
|
+
}), se(() => {
|
|
95
|
+
fe--, fe <= 0 && (document.removeEventListener("mousedown", ve), document.removeEventListener("touchstart", ve), document.removeEventListener("keydown", ot));
|
|
96
|
+
}), {
|
|
97
|
+
focusReason: Ue,
|
|
98
|
+
lastUserFocusTimestamp: Se,
|
|
99
|
+
lastAutomatedFocusTimestamp: ze
|
|
100
|
+
}), he = (e) => new CustomEvent(bn, {
|
|
101
|
+
...mn,
|
|
102
|
+
detail: e
|
|
103
|
+
}), Ee = {
|
|
104
|
+
tab: "Tab",
|
|
105
|
+
enter: "Enter",
|
|
106
|
+
space: "Space",
|
|
107
|
+
left: "ArrowLeft",
|
|
108
|
+
up: "ArrowUp",
|
|
109
|
+
right: "ArrowRight",
|
|
110
|
+
down: "ArrowDown",
|
|
111
|
+
esc: "Escape",
|
|
112
|
+
delete: "Delete",
|
|
113
|
+
backspace: "Backspace",
|
|
114
|
+
numpadEnter: "NumpadEnter",
|
|
115
|
+
pageUp: "PageUp",
|
|
116
|
+
pageDown: "PageDown",
|
|
117
|
+
home: "Home",
|
|
118
|
+
end: "End"
|
|
119
|
+
}, bt = (e) => {
|
|
120
|
+
if (e.code && e.code !== "Unidentified")
|
|
121
|
+
return e.code;
|
|
122
|
+
const n = Cn(e);
|
|
123
|
+
if (n) {
|
|
124
|
+
if (Object.values(Ee).includes(n))
|
|
125
|
+
return n;
|
|
126
|
+
switch (n) {
|
|
127
|
+
case " ":
|
|
128
|
+
return Ee.space;
|
|
129
|
+
default:
|
|
130
|
+
return "";
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return "";
|
|
134
|
+
}, Cn = (e) => {
|
|
135
|
+
let n = e.key && e.key !== "Unidentified" ? e.key : "";
|
|
136
|
+
if (!n && e.type === "keyup" && rn()) {
|
|
137
|
+
const t = e.target;
|
|
138
|
+
n = t.value.charAt(t.selectionStart - 1);
|
|
139
|
+
}
|
|
140
|
+
return n;
|
|
141
|
+
};
|
|
142
|
+
let Z = [];
|
|
143
|
+
const at = (e) => {
|
|
144
|
+
bt(e) === Ee.esc && Z.forEach((t) => t(e));
|
|
145
|
+
}, An = (e) => {
|
|
146
|
+
re(() => {
|
|
147
|
+
Z.length === 0 && document.addEventListener("keydown", at), ye && Z.push(e);
|
|
148
|
+
}), se(() => {
|
|
149
|
+
Z = Z.filter((n) => n !== e), Z.length === 0 && ye && document.removeEventListener("keydown", at);
|
|
150
|
+
});
|
|
151
|
+
}, Mn = I({
|
|
152
|
+
name: "ElFocusTrap",
|
|
153
|
+
inheritAttrs: !1,
|
|
154
|
+
props: {
|
|
155
|
+
loop: Boolean,
|
|
156
|
+
trapped: Boolean,
|
|
157
|
+
focusTrapEl: Object,
|
|
158
|
+
focusStartEl: {
|
|
159
|
+
type: [Object, String],
|
|
160
|
+
default: "first"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
emits: [
|
|
164
|
+
Je,
|
|
165
|
+
Qe,
|
|
166
|
+
"focusin",
|
|
167
|
+
"focusout",
|
|
168
|
+
"focusout-prevented",
|
|
169
|
+
"release-requested"
|
|
170
|
+
],
|
|
171
|
+
setup(e, { emit: n }) {
|
|
172
|
+
const t = x();
|
|
173
|
+
let o, a;
|
|
174
|
+
const { focusReason: r } = Tn();
|
|
175
|
+
An((l) => {
|
|
176
|
+
e.trapped && !s.paused && n("release-requested", l);
|
|
177
|
+
});
|
|
178
|
+
const s = {
|
|
179
|
+
paused: !1,
|
|
180
|
+
pause() {
|
|
181
|
+
this.paused = !0;
|
|
182
|
+
},
|
|
183
|
+
resume() {
|
|
184
|
+
this.paused = !1;
|
|
185
|
+
}
|
|
186
|
+
}, i = (l) => {
|
|
187
|
+
if (!e.loop && !e.trapped || s.paused)
|
|
188
|
+
return;
|
|
189
|
+
const { altKey: h, ctrlKey: E, metaKey: u, currentTarget: d, shiftKey: b } = l, { loop: M } = e, j = bt(l) === Ee.tab && !h && !E && !u, $ = document.activeElement;
|
|
190
|
+
if (j && $) {
|
|
191
|
+
const F = d, [L, O] = En(F);
|
|
192
|
+
if (L && O) {
|
|
193
|
+
if (!b && $ === O) {
|
|
194
|
+
const v = he({
|
|
195
|
+
focusReason: r.value
|
|
196
|
+
});
|
|
197
|
+
n("focusout-prevented", v), v.defaultPrevented || (l.preventDefault(), M && Y(L, !0));
|
|
198
|
+
} else if (b && [L, F].includes($)) {
|
|
199
|
+
const v = he({
|
|
200
|
+
focusReason: r.value
|
|
201
|
+
});
|
|
202
|
+
n("focusout-prevented", v), v.defaultPrevented || (l.preventDefault(), M && Y(O, !0));
|
|
203
|
+
}
|
|
204
|
+
} else if ($ === F) {
|
|
205
|
+
const v = he({
|
|
206
|
+
focusReason: r.value
|
|
207
|
+
});
|
|
208
|
+
n("focusout-prevented", v), v.defaultPrevented || l.preventDefault();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
He(pt, {
|
|
213
|
+
focusTrapRef: t,
|
|
214
|
+
onKeydown: i
|
|
215
|
+
}), V(() => e.focusTrapEl, (l) => {
|
|
216
|
+
l && (t.value = l);
|
|
217
|
+
}, { immediate: !0 }), V([t], ([l], [h]) => {
|
|
218
|
+
l && (l.addEventListener("keydown", i), l.addEventListener("focusin", m), l.addEventListener("focusout", _)), h && (h.removeEventListener("keydown", i), h.removeEventListener("focusin", m), h.removeEventListener("focusout", _));
|
|
219
|
+
});
|
|
220
|
+
const f = (l) => {
|
|
221
|
+
n(Je, l);
|
|
222
|
+
}, p = (l) => n(Qe, l), m = (l) => {
|
|
223
|
+
const h = c(t);
|
|
224
|
+
if (!h)
|
|
225
|
+
return;
|
|
226
|
+
const E = l.target, u = l.relatedTarget, d = E && h.contains(E);
|
|
227
|
+
e.trapped || u && h.contains(u) || (o = u), d && n("focusin", l), !s.paused && e.trapped && (d ? a = E : Y(a, !0));
|
|
228
|
+
}, _ = (l) => {
|
|
229
|
+
const h = c(t);
|
|
230
|
+
if (!(s.paused || !h))
|
|
231
|
+
if (e.trapped) {
|
|
232
|
+
const E = l.relatedTarget;
|
|
233
|
+
!sn(E) && !h.contains(E) && setTimeout(() => {
|
|
234
|
+
if (!s.paused && e.trapped) {
|
|
235
|
+
const u = he({
|
|
236
|
+
focusReason: r.value
|
|
237
|
+
});
|
|
238
|
+
n("focusout-prevented", u), u.defaultPrevented || Y(a, !0);
|
|
239
|
+
}
|
|
240
|
+
}, 0);
|
|
241
|
+
} else {
|
|
242
|
+
const E = l.target;
|
|
243
|
+
E && h.contains(E) || n("focusout", l);
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
async function S() {
|
|
247
|
+
await Re();
|
|
248
|
+
const l = c(t);
|
|
249
|
+
if (l) {
|
|
250
|
+
nt.push(s);
|
|
251
|
+
const h = l.contains(document.activeElement) ? o : document.activeElement;
|
|
252
|
+
if (o = h, !l.contains(h)) {
|
|
253
|
+
const u = new Event(Ce, Ze);
|
|
254
|
+
l.addEventListener(Ce, f), l.dispatchEvent(u), u.defaultPrevented || Re(() => {
|
|
255
|
+
let d = e.focusStartEl;
|
|
256
|
+
Lt(d) || (Y(d), document.activeElement !== d && (d = "first")), d === "first" && wn(gt(l), !0), (document.activeElement === h || d === "container") && Y(l);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function y() {
|
|
262
|
+
const l = c(t);
|
|
263
|
+
if (l) {
|
|
264
|
+
l.removeEventListener(Ce, f);
|
|
265
|
+
const h = new CustomEvent(Ae, {
|
|
266
|
+
...Ze,
|
|
267
|
+
detail: {
|
|
268
|
+
focusReason: r.value
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
l.addEventListener(Ae, p), l.dispatchEvent(h), !h.defaultPrevented && (r.value == "keyboard" || !_n() || l.contains(document.activeElement)) && Y(o ?? document.body), l.removeEventListener(Ae, p), nt.remove(s), o = null, a = null;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return re(() => {
|
|
275
|
+
e.trapped && S(), V(() => e.trapped, (l) => {
|
|
276
|
+
l ? S() : y();
|
|
277
|
+
});
|
|
278
|
+
}), se(() => {
|
|
279
|
+
e.trapped && y(), t.value && (t.value.removeEventListener("keydown", i), t.value.removeEventListener("focusin", m), t.value.removeEventListener("focusout", _), t.value = void 0), o = null, a = null;
|
|
280
|
+
}), {
|
|
281
|
+
onKeydown: i
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
function xn(e, n, t, o, a, r) {
|
|
286
|
+
return A(e.$slots, "default", { handleKeydown: e.onKeydown });
|
|
287
|
+
}
|
|
288
|
+
var Bn = /* @__PURE__ */ ne(Mn, [["render", xn], ["__file", "focus-trap.vue"]]);
|
|
289
|
+
const mt = ae({
|
|
290
|
+
to: {
|
|
291
|
+
type: X([String, Object]),
|
|
292
|
+
required: !0
|
|
293
|
+
},
|
|
294
|
+
disabled: Boolean
|
|
295
|
+
}), Nn = /* @__PURE__ */ I({
|
|
296
|
+
__name: "teleport",
|
|
297
|
+
props: mt,
|
|
298
|
+
setup(e) {
|
|
299
|
+
return (n, t) => n.disabled ? A(n.$slots, "default", { key: 0 }) : (C(), H(zt, {
|
|
300
|
+
key: 1,
|
|
301
|
+
to: n.to
|
|
302
|
+
}, [
|
|
303
|
+
A(n.$slots, "default")
|
|
304
|
+
], 8, ["to"]));
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
var Ln = /* @__PURE__ */ ne(Nn, [["__file", "teleport.vue"]]);
|
|
308
|
+
const Rn = Ve(Ln), yt = Symbol("buttonGroupContextKey"), Et = ({ from: e, replacement: n, scope: t, version: o, ref: a, type: r = "API" }, s) => {
|
|
309
|
+
V(() => c(s), (i) => {
|
|
310
|
+
i && ut(t, `[${r}] ${e} is about to be deprecated in version ${o}, please use ${n} instead.
|
|
311
|
+
For more detail, please visit: ${a}
|
|
312
|
+
`);
|
|
313
|
+
}, {
|
|
314
|
+
immediate: !0
|
|
315
|
+
});
|
|
316
|
+
}, In = (e, n) => {
|
|
317
|
+
Et({
|
|
318
|
+
from: "type.text",
|
|
319
|
+
replacement: "link",
|
|
320
|
+
version: "3.0.0",
|
|
321
|
+
scope: "props",
|
|
322
|
+
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
323
|
+
}, k(() => e.type === "text"));
|
|
324
|
+
const t = Ie(yt, void 0), o = ht("button"), { form: a } = ln(), r = un(k(() => t?.size)), s = ft(), i = x(), f = ct(), p = k(() => {
|
|
325
|
+
var u;
|
|
326
|
+
return e.type || t?.type || ((u = o.value) == null ? void 0 : u.type) || "";
|
|
327
|
+
}), m = k(() => {
|
|
328
|
+
var u, d, b;
|
|
329
|
+
return (b = (d = e.autoInsertSpace) != null ? d : (u = o.value) == null ? void 0 : u.autoInsertSpace) != null ? b : !1;
|
|
330
|
+
}), _ = k(() => {
|
|
331
|
+
var u, d, b;
|
|
332
|
+
return (b = (d = e.plain) != null ? d : (u = o.value) == null ? void 0 : u.plain) != null ? b : !1;
|
|
333
|
+
}), S = k(() => {
|
|
334
|
+
var u, d, b;
|
|
335
|
+
return (b = (d = e.round) != null ? d : (u = o.value) == null ? void 0 : u.round) != null ? b : !1;
|
|
336
|
+
}), y = k(() => {
|
|
337
|
+
var u, d, b;
|
|
338
|
+
return (b = (d = e.text) != null ? d : (u = o.value) == null ? void 0 : u.text) != null ? b : !1;
|
|
339
|
+
}), l = k(() => e.tag === "button" ? {
|
|
340
|
+
ariaDisabled: s.value || e.loading,
|
|
341
|
+
disabled: s.value || e.loading,
|
|
342
|
+
autofocus: e.autofocus,
|
|
343
|
+
type: e.nativeType
|
|
344
|
+
} : {}), h = k(() => {
|
|
345
|
+
var u;
|
|
346
|
+
const d = (u = f.default) == null ? void 0 : u.call(f);
|
|
347
|
+
if (m.value && d?.length === 1) {
|
|
348
|
+
const b = d[0];
|
|
349
|
+
if (b?.type === Kt) {
|
|
350
|
+
const M = b.children;
|
|
351
|
+
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(M.trim());
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return !1;
|
|
355
|
+
});
|
|
356
|
+
return {
|
|
357
|
+
_disabled: s,
|
|
358
|
+
_size: r,
|
|
359
|
+
_type: p,
|
|
360
|
+
_ref: i,
|
|
361
|
+
_props: l,
|
|
362
|
+
_plain: _,
|
|
363
|
+
_round: S,
|
|
364
|
+
_text: y,
|
|
365
|
+
shouldAddSpace: h,
|
|
366
|
+
handleClick: (u) => {
|
|
367
|
+
if (s.value || e.loading) {
|
|
368
|
+
u.stopPropagation();
|
|
369
|
+
return;
|
|
370
|
+
}
|
|
371
|
+
e.nativeType === "reset" && a?.resetFields(), n("click", u);
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
}, Fn = [
|
|
375
|
+
"default",
|
|
376
|
+
"primary",
|
|
377
|
+
"success",
|
|
378
|
+
"warning",
|
|
379
|
+
"info",
|
|
380
|
+
"danger",
|
|
381
|
+
"text",
|
|
382
|
+
""
|
|
383
|
+
], On = ["button", "submit", "reset"], Pe = ae({
|
|
384
|
+
size: Rt,
|
|
385
|
+
disabled: {
|
|
386
|
+
type: Boolean,
|
|
387
|
+
default: void 0
|
|
388
|
+
},
|
|
389
|
+
type: {
|
|
390
|
+
type: String,
|
|
391
|
+
values: Fn,
|
|
392
|
+
default: ""
|
|
393
|
+
},
|
|
394
|
+
icon: {
|
|
395
|
+
type: Oe
|
|
396
|
+
},
|
|
397
|
+
nativeType: {
|
|
398
|
+
type: String,
|
|
399
|
+
values: On,
|
|
400
|
+
default: "button"
|
|
401
|
+
},
|
|
402
|
+
loading: Boolean,
|
|
403
|
+
loadingIcon: {
|
|
404
|
+
type: Oe,
|
|
405
|
+
default: () => hn
|
|
406
|
+
},
|
|
407
|
+
plain: {
|
|
408
|
+
type: Boolean,
|
|
409
|
+
default: void 0
|
|
410
|
+
},
|
|
411
|
+
text: {
|
|
412
|
+
type: Boolean,
|
|
413
|
+
default: void 0
|
|
414
|
+
},
|
|
415
|
+
link: Boolean,
|
|
416
|
+
bg: Boolean,
|
|
417
|
+
autofocus: Boolean,
|
|
418
|
+
round: {
|
|
419
|
+
type: Boolean,
|
|
420
|
+
default: void 0
|
|
421
|
+
},
|
|
422
|
+
circle: Boolean,
|
|
423
|
+
color: String,
|
|
424
|
+
dark: Boolean,
|
|
425
|
+
autoInsertSpace: {
|
|
426
|
+
type: Boolean,
|
|
427
|
+
default: void 0
|
|
428
|
+
},
|
|
429
|
+
tag: {
|
|
430
|
+
type: X([String, Object]),
|
|
431
|
+
default: "button"
|
|
432
|
+
}
|
|
433
|
+
}), Dn = {
|
|
434
|
+
click: (e) => e instanceof MouseEvent
|
|
435
|
+
};
|
|
436
|
+
function T(e, n) {
|
|
437
|
+
Pn(e) && (e = "100%");
|
|
438
|
+
var t = $n(e);
|
|
439
|
+
return e = n === 360 ? e : Math.min(n, Math.max(0, parseFloat(e))), t && (e = parseInt(String(e * n), 10) / 100), Math.abs(e - n) < 1e-6 ? 1 : (n === 360 ? e = (e < 0 ? e % n + n : e % n) / parseFloat(String(n)) : e = e % n / parseFloat(String(n)), e);
|
|
440
|
+
}
|
|
441
|
+
function pe(e) {
|
|
442
|
+
return Math.min(1, Math.max(0, e));
|
|
443
|
+
}
|
|
444
|
+
function Pn(e) {
|
|
445
|
+
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
|
|
446
|
+
}
|
|
447
|
+
function $n(e) {
|
|
448
|
+
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
449
|
+
}
|
|
450
|
+
function St(e) {
|
|
451
|
+
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
452
|
+
}
|
|
453
|
+
function ge(e) {
|
|
454
|
+
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
|
|
455
|
+
}
|
|
456
|
+
function q(e) {
|
|
457
|
+
return e.length === 1 ? "0" + e : String(e);
|
|
458
|
+
}
|
|
459
|
+
function Hn(e, n, t) {
|
|
460
|
+
return {
|
|
461
|
+
r: T(e, 255) * 255,
|
|
462
|
+
g: T(n, 255) * 255,
|
|
463
|
+
b: T(t, 255) * 255
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
function rt(e, n, t) {
|
|
467
|
+
e = T(e, 255), n = T(n, 255), t = T(t, 255);
|
|
468
|
+
var o = Math.max(e, n, t), a = Math.min(e, n, t), r = 0, s = 0, i = (o + a) / 2;
|
|
469
|
+
if (o === a)
|
|
470
|
+
s = 0, r = 0;
|
|
471
|
+
else {
|
|
472
|
+
var f = o - a;
|
|
473
|
+
switch (s = i > 0.5 ? f / (2 - o - a) : f / (o + a), o) {
|
|
474
|
+
case e:
|
|
475
|
+
r = (n - t) / f + (n < t ? 6 : 0);
|
|
476
|
+
break;
|
|
477
|
+
case n:
|
|
478
|
+
r = (t - e) / f + 2;
|
|
479
|
+
break;
|
|
480
|
+
case t:
|
|
481
|
+
r = (e - n) / f + 4;
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
r /= 6;
|
|
485
|
+
}
|
|
486
|
+
return { h: r, s, l: i };
|
|
487
|
+
}
|
|
488
|
+
function Me(e, n, t) {
|
|
489
|
+
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? e + (n - e) * (6 * t) : t < 1 / 2 ? n : t < 2 / 3 ? e + (n - e) * (2 / 3 - t) * 6 : e;
|
|
490
|
+
}
|
|
491
|
+
function Vn(e, n, t) {
|
|
492
|
+
var o, a, r;
|
|
493
|
+
if (e = T(e, 360), n = T(n, 100), t = T(t, 100), n === 0)
|
|
494
|
+
a = t, r = t, o = t;
|
|
495
|
+
else {
|
|
496
|
+
var s = t < 0.5 ? t * (1 + n) : t + n - t * n, i = 2 * t - s;
|
|
497
|
+
o = Me(i, s, e + 1 / 3), a = Me(i, s, e), r = Me(i, s, e - 1 / 3);
|
|
498
|
+
}
|
|
499
|
+
return { r: o * 255, g: a * 255, b: r * 255 };
|
|
500
|
+
}
|
|
501
|
+
function st(e, n, t) {
|
|
502
|
+
e = T(e, 255), n = T(n, 255), t = T(t, 255);
|
|
503
|
+
var o = Math.max(e, n, t), a = Math.min(e, n, t), r = 0, s = o, i = o - a, f = o === 0 ? 0 : i / o;
|
|
504
|
+
if (o === a)
|
|
505
|
+
r = 0;
|
|
506
|
+
else {
|
|
507
|
+
switch (o) {
|
|
508
|
+
case e:
|
|
509
|
+
r = (n - t) / i + (n < t ? 6 : 0);
|
|
510
|
+
break;
|
|
511
|
+
case n:
|
|
512
|
+
r = (t - e) / i + 2;
|
|
513
|
+
break;
|
|
514
|
+
case t:
|
|
515
|
+
r = (e - n) / i + 4;
|
|
516
|
+
break;
|
|
517
|
+
}
|
|
518
|
+
r /= 6;
|
|
519
|
+
}
|
|
520
|
+
return { h: r, s: f, v: s };
|
|
521
|
+
}
|
|
522
|
+
function Un(e, n, t) {
|
|
523
|
+
e = T(e, 360) * 6, n = T(n, 100), t = T(t, 100);
|
|
524
|
+
var o = Math.floor(e), a = e - o, r = t * (1 - n), s = t * (1 - a * n), i = t * (1 - (1 - a) * n), f = o % 6, p = [t, s, r, r, i, t][f], m = [i, t, t, s, r, r][f], _ = [r, r, i, t, t, s][f];
|
|
525
|
+
return { r: p * 255, g: m * 255, b: _ * 255 };
|
|
526
|
+
}
|
|
527
|
+
function it(e, n, t, o) {
|
|
528
|
+
var a = [
|
|
529
|
+
q(Math.round(e).toString(16)),
|
|
530
|
+
q(Math.round(n).toString(16)),
|
|
531
|
+
q(Math.round(t).toString(16))
|
|
532
|
+
];
|
|
533
|
+
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("");
|
|
534
|
+
}
|
|
535
|
+
function zn(e, n, t, o, a) {
|
|
536
|
+
var r = [
|
|
537
|
+
q(Math.round(e).toString(16)),
|
|
538
|
+
q(Math.round(n).toString(16)),
|
|
539
|
+
q(Math.round(t).toString(16)),
|
|
540
|
+
q(Kn(o))
|
|
541
|
+
];
|
|
542
|
+
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("");
|
|
543
|
+
}
|
|
544
|
+
function Kn(e) {
|
|
545
|
+
return Math.round(parseFloat(e) * 255).toString(16);
|
|
546
|
+
}
|
|
547
|
+
function lt(e) {
|
|
548
|
+
return R(e) / 255;
|
|
549
|
+
}
|
|
550
|
+
function R(e) {
|
|
551
|
+
return parseInt(e, 16);
|
|
552
|
+
}
|
|
553
|
+
function jn(e) {
|
|
554
|
+
return {
|
|
555
|
+
r: e >> 16,
|
|
556
|
+
g: (e & 65280) >> 8,
|
|
557
|
+
b: e & 255
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
var $e = {
|
|
561
|
+
aliceblue: "#f0f8ff",
|
|
562
|
+
antiquewhite: "#faebd7",
|
|
563
|
+
aqua: "#00ffff",
|
|
564
|
+
aquamarine: "#7fffd4",
|
|
565
|
+
azure: "#f0ffff",
|
|
566
|
+
beige: "#f5f5dc",
|
|
567
|
+
bisque: "#ffe4c4",
|
|
568
|
+
black: "#000000",
|
|
569
|
+
blanchedalmond: "#ffebcd",
|
|
570
|
+
blue: "#0000ff",
|
|
571
|
+
blueviolet: "#8a2be2",
|
|
572
|
+
brown: "#a52a2a",
|
|
573
|
+
burlywood: "#deb887",
|
|
574
|
+
cadetblue: "#5f9ea0",
|
|
575
|
+
chartreuse: "#7fff00",
|
|
576
|
+
chocolate: "#d2691e",
|
|
577
|
+
coral: "#ff7f50",
|
|
578
|
+
cornflowerblue: "#6495ed",
|
|
579
|
+
cornsilk: "#fff8dc",
|
|
580
|
+
crimson: "#dc143c",
|
|
581
|
+
cyan: "#00ffff",
|
|
582
|
+
darkblue: "#00008b",
|
|
583
|
+
darkcyan: "#008b8b",
|
|
584
|
+
darkgoldenrod: "#b8860b",
|
|
585
|
+
darkgray: "#a9a9a9",
|
|
586
|
+
darkgreen: "#006400",
|
|
587
|
+
darkgrey: "#a9a9a9",
|
|
588
|
+
darkkhaki: "#bdb76b",
|
|
589
|
+
darkmagenta: "#8b008b",
|
|
590
|
+
darkolivegreen: "#556b2f",
|
|
591
|
+
darkorange: "#ff8c00",
|
|
592
|
+
darkorchid: "#9932cc",
|
|
593
|
+
darkred: "#8b0000",
|
|
594
|
+
darksalmon: "#e9967a",
|
|
595
|
+
darkseagreen: "#8fbc8f",
|
|
596
|
+
darkslateblue: "#483d8b",
|
|
597
|
+
darkslategray: "#2f4f4f",
|
|
598
|
+
darkslategrey: "#2f4f4f",
|
|
599
|
+
darkturquoise: "#00ced1",
|
|
600
|
+
darkviolet: "#9400d3",
|
|
601
|
+
deeppink: "#ff1493",
|
|
602
|
+
deepskyblue: "#00bfff",
|
|
603
|
+
dimgray: "#696969",
|
|
604
|
+
dimgrey: "#696969",
|
|
605
|
+
dodgerblue: "#1e90ff",
|
|
606
|
+
firebrick: "#b22222",
|
|
607
|
+
floralwhite: "#fffaf0",
|
|
608
|
+
forestgreen: "#228b22",
|
|
609
|
+
fuchsia: "#ff00ff",
|
|
610
|
+
gainsboro: "#dcdcdc",
|
|
611
|
+
ghostwhite: "#f8f8ff",
|
|
612
|
+
goldenrod: "#daa520",
|
|
613
|
+
gold: "#ffd700",
|
|
614
|
+
gray: "#808080",
|
|
615
|
+
green: "#008000",
|
|
616
|
+
greenyellow: "#adff2f",
|
|
617
|
+
grey: "#808080",
|
|
618
|
+
honeydew: "#f0fff0",
|
|
619
|
+
hotpink: "#ff69b4",
|
|
620
|
+
indianred: "#cd5c5c",
|
|
621
|
+
indigo: "#4b0082",
|
|
622
|
+
ivory: "#fffff0",
|
|
623
|
+
khaki: "#f0e68c",
|
|
624
|
+
lavenderblush: "#fff0f5",
|
|
625
|
+
lavender: "#e6e6fa",
|
|
626
|
+
lawngreen: "#7cfc00",
|
|
627
|
+
lemonchiffon: "#fffacd",
|
|
628
|
+
lightblue: "#add8e6",
|
|
629
|
+
lightcoral: "#f08080",
|
|
630
|
+
lightcyan: "#e0ffff",
|
|
631
|
+
lightgoldenrodyellow: "#fafad2",
|
|
632
|
+
lightgray: "#d3d3d3",
|
|
633
|
+
lightgreen: "#90ee90",
|
|
634
|
+
lightgrey: "#d3d3d3",
|
|
635
|
+
lightpink: "#ffb6c1",
|
|
636
|
+
lightsalmon: "#ffa07a",
|
|
637
|
+
lightseagreen: "#20b2aa",
|
|
638
|
+
lightskyblue: "#87cefa",
|
|
639
|
+
lightslategray: "#778899",
|
|
640
|
+
lightslategrey: "#778899",
|
|
641
|
+
lightsteelblue: "#b0c4de",
|
|
642
|
+
lightyellow: "#ffffe0",
|
|
643
|
+
lime: "#00ff00",
|
|
644
|
+
limegreen: "#32cd32",
|
|
645
|
+
linen: "#faf0e6",
|
|
646
|
+
magenta: "#ff00ff",
|
|
647
|
+
maroon: "#800000",
|
|
648
|
+
mediumaquamarine: "#66cdaa",
|
|
649
|
+
mediumblue: "#0000cd",
|
|
650
|
+
mediumorchid: "#ba55d3",
|
|
651
|
+
mediumpurple: "#9370db",
|
|
652
|
+
mediumseagreen: "#3cb371",
|
|
653
|
+
mediumslateblue: "#7b68ee",
|
|
654
|
+
mediumspringgreen: "#00fa9a",
|
|
655
|
+
mediumturquoise: "#48d1cc",
|
|
656
|
+
mediumvioletred: "#c71585",
|
|
657
|
+
midnightblue: "#191970",
|
|
658
|
+
mintcream: "#f5fffa",
|
|
659
|
+
mistyrose: "#ffe4e1",
|
|
660
|
+
moccasin: "#ffe4b5",
|
|
661
|
+
navajowhite: "#ffdead",
|
|
662
|
+
navy: "#000080",
|
|
663
|
+
oldlace: "#fdf5e6",
|
|
664
|
+
olive: "#808000",
|
|
665
|
+
olivedrab: "#6b8e23",
|
|
666
|
+
orange: "#ffa500",
|
|
667
|
+
orangered: "#ff4500",
|
|
668
|
+
orchid: "#da70d6",
|
|
669
|
+
palegoldenrod: "#eee8aa",
|
|
670
|
+
palegreen: "#98fb98",
|
|
671
|
+
paleturquoise: "#afeeee",
|
|
672
|
+
palevioletred: "#db7093",
|
|
673
|
+
papayawhip: "#ffefd5",
|
|
674
|
+
peachpuff: "#ffdab9",
|
|
675
|
+
peru: "#cd853f",
|
|
676
|
+
pink: "#ffc0cb",
|
|
677
|
+
plum: "#dda0dd",
|
|
678
|
+
powderblue: "#b0e0e6",
|
|
679
|
+
purple: "#800080",
|
|
680
|
+
rebeccapurple: "#663399",
|
|
681
|
+
red: "#ff0000",
|
|
682
|
+
rosybrown: "#bc8f8f",
|
|
683
|
+
royalblue: "#4169e1",
|
|
684
|
+
saddlebrown: "#8b4513",
|
|
685
|
+
salmon: "#fa8072",
|
|
686
|
+
sandybrown: "#f4a460",
|
|
687
|
+
seagreen: "#2e8b57",
|
|
688
|
+
seashell: "#fff5ee",
|
|
689
|
+
sienna: "#a0522d",
|
|
690
|
+
silver: "#c0c0c0",
|
|
691
|
+
skyblue: "#87ceeb",
|
|
692
|
+
slateblue: "#6a5acd",
|
|
693
|
+
slategray: "#708090",
|
|
694
|
+
slategrey: "#708090",
|
|
695
|
+
snow: "#fffafa",
|
|
696
|
+
springgreen: "#00ff7f",
|
|
697
|
+
steelblue: "#4682b4",
|
|
698
|
+
tan: "#d2b48c",
|
|
699
|
+
teal: "#008080",
|
|
700
|
+
thistle: "#d8bfd8",
|
|
701
|
+
tomato: "#ff6347",
|
|
702
|
+
turquoise: "#40e0d0",
|
|
703
|
+
violet: "#ee82ee",
|
|
704
|
+
wheat: "#f5deb3",
|
|
705
|
+
white: "#ffffff",
|
|
706
|
+
whitesmoke: "#f5f5f5",
|
|
707
|
+
yellow: "#ffff00",
|
|
708
|
+
yellowgreen: "#9acd32"
|
|
709
|
+
};
|
|
710
|
+
function Gn(e) {
|
|
711
|
+
var n = { r: 0, g: 0, b: 0 }, t = 1, o = null, a = null, r = null, s = !1, i = !1;
|
|
712
|
+
return typeof e == "string" && (e = qn(e)), typeof e == "object" && (z(e.r) && z(e.g) && z(e.b) ? (n = Hn(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : z(e.h) && z(e.s) && z(e.v) ? (o = ge(e.s), a = ge(e.v), n = Un(e.h, o, a), s = !0, i = "hsv") : z(e.h) && z(e.s) && z(e.l) && (o = ge(e.s), r = ge(e.l), n = Vn(e.h, o, r), s = !0, i = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (t = e.a)), t = St(t), {
|
|
713
|
+
ok: s,
|
|
714
|
+
format: e.format || i,
|
|
715
|
+
r: Math.min(255, Math.max(n.r, 0)),
|
|
716
|
+
g: Math.min(255, Math.max(n.g, 0)),
|
|
717
|
+
b: Math.min(255, Math.max(n.b, 0)),
|
|
718
|
+
a: t
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
var Yn = "[-\\+]?\\d+%?", Wn = "[-\\+]?\\d*\\.\\d+%?", W = "(?:".concat(Wn, ")|(?:").concat(Yn, ")"), xe = "[\\s|\\(]+(".concat(W, ")[,|\\s]+(").concat(W, ")[,|\\s]+(").concat(W, ")\\s*\\)?"), Be = "[\\s|\\(]+(".concat(W, ")[,|\\s]+(").concat(W, ")[,|\\s]+(").concat(W, ")[,|\\s]+(").concat(W, ")\\s*\\)?"), D = {
|
|
722
|
+
CSS_UNIT: new RegExp(W),
|
|
723
|
+
rgb: new RegExp("rgb" + xe),
|
|
724
|
+
rgba: new RegExp("rgba" + Be),
|
|
725
|
+
hsl: new RegExp("hsl" + xe),
|
|
726
|
+
hsla: new RegExp("hsla" + Be),
|
|
727
|
+
hsv: new RegExp("hsv" + xe),
|
|
728
|
+
hsva: new RegExp("hsva" + Be),
|
|
729
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
730
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
731
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
732
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
733
|
+
};
|
|
734
|
+
function qn(e) {
|
|
735
|
+
if (e = e.trim().toLowerCase(), e.length === 0)
|
|
736
|
+
return !1;
|
|
737
|
+
var n = !1;
|
|
738
|
+
if ($e[e])
|
|
739
|
+
e = $e[e], n = !0;
|
|
740
|
+
else if (e === "transparent")
|
|
741
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
742
|
+
var t = D.rgb.exec(e);
|
|
743
|
+
return t ? { r: t[1], g: t[2], b: t[3] } : (t = D.rgba.exec(e), t ? { r: t[1], g: t[2], b: t[3], a: t[4] } : (t = D.hsl.exec(e), t ? { h: t[1], s: t[2], l: t[3] } : (t = D.hsla.exec(e), t ? { h: t[1], s: t[2], l: t[3], a: t[4] } : (t = D.hsv.exec(e), t ? { h: t[1], s: t[2], v: t[3] } : (t = D.hsva.exec(e), t ? { h: t[1], s: t[2], v: t[3], a: t[4] } : (t = D.hex8.exec(e), t ? {
|
|
744
|
+
r: R(t[1]),
|
|
745
|
+
g: R(t[2]),
|
|
746
|
+
b: R(t[3]),
|
|
747
|
+
a: lt(t[4]),
|
|
748
|
+
format: n ? "name" : "hex8"
|
|
749
|
+
} : (t = D.hex6.exec(e), t ? {
|
|
750
|
+
r: R(t[1]),
|
|
751
|
+
g: R(t[2]),
|
|
752
|
+
b: R(t[3]),
|
|
753
|
+
format: n ? "name" : "hex"
|
|
754
|
+
} : (t = D.hex4.exec(e), t ? {
|
|
755
|
+
r: R(t[1] + t[1]),
|
|
756
|
+
g: R(t[2] + t[2]),
|
|
757
|
+
b: R(t[3] + t[3]),
|
|
758
|
+
a: lt(t[4] + t[4]),
|
|
759
|
+
format: n ? "name" : "hex8"
|
|
760
|
+
} : (t = D.hex3.exec(e), t ? {
|
|
761
|
+
r: R(t[1] + t[1]),
|
|
762
|
+
g: R(t[2] + t[2]),
|
|
763
|
+
b: R(t[3] + t[3]),
|
|
764
|
+
format: n ? "name" : "hex"
|
|
765
|
+
} : !1)))))))));
|
|
766
|
+
}
|
|
767
|
+
function z(e) {
|
|
768
|
+
return !!D.CSS_UNIT.exec(String(e));
|
|
769
|
+
}
|
|
770
|
+
var Xn = (
|
|
771
|
+
/** @class */
|
|
772
|
+
function() {
|
|
773
|
+
function e(n, t) {
|
|
774
|
+
n === void 0 && (n = ""), t === void 0 && (t = {});
|
|
775
|
+
var o;
|
|
776
|
+
if (n instanceof e)
|
|
777
|
+
return n;
|
|
778
|
+
typeof n == "number" && (n = jn(n)), this.originalInput = n;
|
|
779
|
+
var a = Gn(n);
|
|
780
|
+
this.originalInput = n, 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 = t.format) !== null && o !== void 0 ? o : a.format, this.gradientType = t.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = a.ok;
|
|
781
|
+
}
|
|
782
|
+
return e.prototype.isDark = function() {
|
|
783
|
+
return this.getBrightness() < 128;
|
|
784
|
+
}, e.prototype.isLight = function() {
|
|
785
|
+
return !this.isDark();
|
|
786
|
+
}, e.prototype.getBrightness = function() {
|
|
787
|
+
var n = this.toRgb();
|
|
788
|
+
return (n.r * 299 + n.g * 587 + n.b * 114) / 1e3;
|
|
789
|
+
}, e.prototype.getLuminance = function() {
|
|
790
|
+
var n = this.toRgb(), t, o, a, r = n.r / 255, s = n.g / 255, i = n.b / 255;
|
|
791
|
+
return r <= 0.03928 ? t = r / 12.92 : t = 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 * t + 0.7152 * o + 0.0722 * a;
|
|
792
|
+
}, e.prototype.getAlpha = function() {
|
|
793
|
+
return this.a;
|
|
794
|
+
}, e.prototype.setAlpha = function(n) {
|
|
795
|
+
return this.a = St(n), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
796
|
+
}, e.prototype.isMonochrome = function() {
|
|
797
|
+
var n = this.toHsl().s;
|
|
798
|
+
return n === 0;
|
|
799
|
+
}, e.prototype.toHsv = function() {
|
|
800
|
+
var n = st(this.r, this.g, this.b);
|
|
801
|
+
return { h: n.h * 360, s: n.s, v: n.v, a: this.a };
|
|
802
|
+
}, e.prototype.toHsvString = function() {
|
|
803
|
+
var n = st(this.r, this.g, this.b), t = Math.round(n.h * 360), o = Math.round(n.s * 100), a = Math.round(n.v * 100);
|
|
804
|
+
return this.a === 1 ? "hsv(".concat(t, ", ").concat(o, "%, ").concat(a, "%)") : "hsva(".concat(t, ", ").concat(o, "%, ").concat(a, "%, ").concat(this.roundA, ")");
|
|
805
|
+
}, e.prototype.toHsl = function() {
|
|
806
|
+
var n = rt(this.r, this.g, this.b);
|
|
807
|
+
return { h: n.h * 360, s: n.s, l: n.l, a: this.a };
|
|
808
|
+
}, e.prototype.toHslString = function() {
|
|
809
|
+
var n = rt(this.r, this.g, this.b), t = Math.round(n.h * 360), o = Math.round(n.s * 100), a = Math.round(n.l * 100);
|
|
810
|
+
return this.a === 1 ? "hsl(".concat(t, ", ").concat(o, "%, ").concat(a, "%)") : "hsla(".concat(t, ", ").concat(o, "%, ").concat(a, "%, ").concat(this.roundA, ")");
|
|
811
|
+
}, e.prototype.toHex = function(n) {
|
|
812
|
+
return n === void 0 && (n = !1), it(this.r, this.g, this.b, n);
|
|
813
|
+
}, e.prototype.toHexString = function(n) {
|
|
814
|
+
return n === void 0 && (n = !1), "#" + this.toHex(n);
|
|
815
|
+
}, e.prototype.toHex8 = function(n) {
|
|
816
|
+
return n === void 0 && (n = !1), zn(this.r, this.g, this.b, this.a, n);
|
|
817
|
+
}, e.prototype.toHex8String = function(n) {
|
|
818
|
+
return n === void 0 && (n = !1), "#" + this.toHex8(n);
|
|
819
|
+
}, e.prototype.toHexShortString = function(n) {
|
|
820
|
+
return n === void 0 && (n = !1), this.a === 1 ? this.toHexString(n) : this.toHex8String(n);
|
|
821
|
+
}, e.prototype.toRgb = function() {
|
|
822
|
+
return {
|
|
823
|
+
r: Math.round(this.r),
|
|
824
|
+
g: Math.round(this.g),
|
|
825
|
+
b: Math.round(this.b),
|
|
826
|
+
a: this.a
|
|
827
|
+
};
|
|
828
|
+
}, e.prototype.toRgbString = function() {
|
|
829
|
+
var n = Math.round(this.r), t = Math.round(this.g), o = Math.round(this.b);
|
|
830
|
+
return this.a === 1 ? "rgb(".concat(n, ", ").concat(t, ", ").concat(o, ")") : "rgba(".concat(n, ", ").concat(t, ", ").concat(o, ", ").concat(this.roundA, ")");
|
|
831
|
+
}, e.prototype.toPercentageRgb = function() {
|
|
832
|
+
var n = function(t) {
|
|
833
|
+
return "".concat(Math.round(T(t, 255) * 100), "%");
|
|
834
|
+
};
|
|
835
|
+
return {
|
|
836
|
+
r: n(this.r),
|
|
837
|
+
g: n(this.g),
|
|
838
|
+
b: n(this.b),
|
|
839
|
+
a: this.a
|
|
840
|
+
};
|
|
841
|
+
}, e.prototype.toPercentageRgbString = function() {
|
|
842
|
+
var n = function(t) {
|
|
843
|
+
return Math.round(T(t, 255) * 100);
|
|
844
|
+
};
|
|
845
|
+
return this.a === 1 ? "rgb(".concat(n(this.r), "%, ").concat(n(this.g), "%, ").concat(n(this.b), "%)") : "rgba(".concat(n(this.r), "%, ").concat(n(this.g), "%, ").concat(n(this.b), "%, ").concat(this.roundA, ")");
|
|
846
|
+
}, e.prototype.toName = function() {
|
|
847
|
+
if (this.a === 0)
|
|
848
|
+
return "transparent";
|
|
849
|
+
if (this.a < 1)
|
|
850
|
+
return !1;
|
|
851
|
+
for (var n = "#" + it(this.r, this.g, this.b, !1), t = 0, o = Object.entries($e); t < o.length; t++) {
|
|
852
|
+
var a = o[t], r = a[0], s = a[1];
|
|
853
|
+
if (n === s)
|
|
854
|
+
return r;
|
|
855
|
+
}
|
|
856
|
+
return !1;
|
|
857
|
+
}, e.prototype.toString = function(n) {
|
|
858
|
+
var t = !!n;
|
|
859
|
+
n = n ?? this.format;
|
|
860
|
+
var o = !1, a = this.a < 1 && this.a >= 0, r = !t && a && (n.startsWith("hex") || n === "name");
|
|
861
|
+
return r ? n === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (n === "rgb" && (o = this.toRgbString()), n === "prgb" && (o = this.toPercentageRgbString()), (n === "hex" || n === "hex6") && (o = this.toHexString()), n === "hex3" && (o = this.toHexString(!0)), n === "hex4" && (o = this.toHex8String(!0)), n === "hex8" && (o = this.toHex8String()), n === "name" && (o = this.toName()), n === "hsl" && (o = this.toHslString()), n === "hsv" && (o = this.toHsvString()), o || this.toHexString());
|
|
862
|
+
}, e.prototype.toNumber = function() {
|
|
863
|
+
return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
|
|
864
|
+
}, e.prototype.clone = function() {
|
|
865
|
+
return new e(this.toString());
|
|
866
|
+
}, e.prototype.lighten = function(n) {
|
|
867
|
+
n === void 0 && (n = 10);
|
|
868
|
+
var t = this.toHsl();
|
|
869
|
+
return t.l += n / 100, t.l = pe(t.l), new e(t);
|
|
870
|
+
}, e.prototype.brighten = function(n) {
|
|
871
|
+
n === void 0 && (n = 10);
|
|
872
|
+
var t = this.toRgb();
|
|
873
|
+
return t.r = Math.max(0, Math.min(255, t.r - Math.round(255 * -(n / 100)))), t.g = Math.max(0, Math.min(255, t.g - Math.round(255 * -(n / 100)))), t.b = Math.max(0, Math.min(255, t.b - Math.round(255 * -(n / 100)))), new e(t);
|
|
874
|
+
}, e.prototype.darken = function(n) {
|
|
875
|
+
n === void 0 && (n = 10);
|
|
876
|
+
var t = this.toHsl();
|
|
877
|
+
return t.l -= n / 100, t.l = pe(t.l), new e(t);
|
|
878
|
+
}, e.prototype.tint = function(n) {
|
|
879
|
+
return n === void 0 && (n = 10), this.mix("white", n);
|
|
880
|
+
}, e.prototype.shade = function(n) {
|
|
881
|
+
return n === void 0 && (n = 10), this.mix("black", n);
|
|
882
|
+
}, e.prototype.desaturate = function(n) {
|
|
883
|
+
n === void 0 && (n = 10);
|
|
884
|
+
var t = this.toHsl();
|
|
885
|
+
return t.s -= n / 100, t.s = pe(t.s), new e(t);
|
|
886
|
+
}, e.prototype.saturate = function(n) {
|
|
887
|
+
n === void 0 && (n = 10);
|
|
888
|
+
var t = this.toHsl();
|
|
889
|
+
return t.s += n / 100, t.s = pe(t.s), new e(t);
|
|
890
|
+
}, e.prototype.greyscale = function() {
|
|
891
|
+
return this.desaturate(100);
|
|
892
|
+
}, e.prototype.spin = function(n) {
|
|
893
|
+
var t = this.toHsl(), o = (t.h + n) % 360;
|
|
894
|
+
return t.h = o < 0 ? 360 + o : o, new e(t);
|
|
895
|
+
}, e.prototype.mix = function(n, t) {
|
|
896
|
+
t === void 0 && (t = 50);
|
|
897
|
+
var o = this.toRgb(), a = new e(n).toRgb(), r = t / 100, s = {
|
|
898
|
+
r: (a.r - o.r) * r + o.r,
|
|
899
|
+
g: (a.g - o.g) * r + o.g,
|
|
900
|
+
b: (a.b - o.b) * r + o.b,
|
|
901
|
+
a: (a.a - o.a) * r + o.a
|
|
902
|
+
};
|
|
903
|
+
return new e(s);
|
|
904
|
+
}, e.prototype.analogous = function(n, t) {
|
|
905
|
+
n === void 0 && (n = 6), t === void 0 && (t = 30);
|
|
906
|
+
var o = this.toHsl(), a = 360 / t, r = [this];
|
|
907
|
+
for (o.h = (o.h - (a * n >> 1) + 720) % 360; --n; )
|
|
908
|
+
o.h = (o.h + a) % 360, r.push(new e(o));
|
|
909
|
+
return r;
|
|
910
|
+
}, e.prototype.complement = function() {
|
|
911
|
+
var n = this.toHsl();
|
|
912
|
+
return n.h = (n.h + 180) % 360, new e(n);
|
|
913
|
+
}, e.prototype.monochromatic = function(n) {
|
|
914
|
+
n === void 0 && (n = 6);
|
|
915
|
+
for (var t = this.toHsv(), o = t.h, a = t.s, r = t.v, s = [], i = 1 / n; n--; )
|
|
916
|
+
s.push(new e({ h: o, s: a, v: r })), r = (r + i) % 1;
|
|
917
|
+
return s;
|
|
918
|
+
}, e.prototype.splitcomplement = function() {
|
|
919
|
+
var n = this.toHsl(), t = n.h;
|
|
920
|
+
return [
|
|
921
|
+
this,
|
|
922
|
+
new e({ h: (t + 72) % 360, s: n.s, l: n.l }),
|
|
923
|
+
new e({ h: (t + 216) % 360, s: n.s, l: n.l })
|
|
924
|
+
];
|
|
925
|
+
}, e.prototype.onBackground = function(n) {
|
|
926
|
+
var t = this.toRgb(), o = new e(n).toRgb(), a = t.a + o.a * (1 - t.a);
|
|
927
|
+
return new e({
|
|
928
|
+
r: (t.r * t.a + o.r * o.a * (1 - t.a)) / a,
|
|
929
|
+
g: (t.g * t.a + o.g * o.a * (1 - t.a)) / a,
|
|
930
|
+
b: (t.b * t.a + o.b * o.a * (1 - t.a)) / a,
|
|
931
|
+
a
|
|
932
|
+
});
|
|
933
|
+
}, e.prototype.triad = function() {
|
|
934
|
+
return this.polyad(3);
|
|
935
|
+
}, e.prototype.tetrad = function() {
|
|
936
|
+
return this.polyad(4);
|
|
937
|
+
}, e.prototype.polyad = function(n) {
|
|
938
|
+
for (var t = this.toHsl(), o = t.h, a = [this], r = 360 / n, s = 1; s < n; s++)
|
|
939
|
+
a.push(new e({ h: (o + s * r) % 360, s: t.s, l: t.l }));
|
|
940
|
+
return a;
|
|
941
|
+
}, e.prototype.equals = function(n) {
|
|
942
|
+
return this.toRgbString() === new e(n).toRgbString();
|
|
943
|
+
}, e;
|
|
944
|
+
}()
|
|
945
|
+
);
|
|
946
|
+
function G(e, n = 20) {
|
|
947
|
+
return e.mix("#141414", n).toString();
|
|
948
|
+
}
|
|
949
|
+
function Zn(e) {
|
|
950
|
+
const n = ft(), t = te("button");
|
|
951
|
+
return k(() => {
|
|
952
|
+
let o = {}, a = e.color;
|
|
953
|
+
if (a) {
|
|
954
|
+
const r = a.match(/var\((.*?)\)/);
|
|
955
|
+
r && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));
|
|
956
|
+
const s = new Xn(a), i = e.dark ? s.tint(20).toString() : G(s, 20);
|
|
957
|
+
if (e.plain)
|
|
958
|
+
o = t.cssVarBlock({
|
|
959
|
+
"bg-color": e.dark ? G(s, 90) : s.tint(90).toString(),
|
|
960
|
+
"text-color": a,
|
|
961
|
+
"border-color": e.dark ? G(s, 50) : s.tint(50).toString(),
|
|
962
|
+
"hover-text-color": `var(${t.cssVarName("color-white")})`,
|
|
963
|
+
"hover-bg-color": a,
|
|
964
|
+
"hover-border-color": a,
|
|
965
|
+
"active-bg-color": i,
|
|
966
|
+
"active-text-color": `var(${t.cssVarName("color-white")})`,
|
|
967
|
+
"active-border-color": i
|
|
968
|
+
}), n.value && (o[t.cssVarBlockName("disabled-bg-color")] = e.dark ? G(s, 90) : s.tint(90).toString(), o[t.cssVarBlockName("disabled-text-color")] = e.dark ? G(s, 50) : s.tint(50).toString(), o[t.cssVarBlockName("disabled-border-color")] = e.dark ? G(s, 80) : s.tint(80).toString());
|
|
969
|
+
else {
|
|
970
|
+
const f = e.dark ? G(s, 30) : s.tint(30).toString(), p = s.isDark() ? `var(${t.cssVarName("color-white")})` : `var(${t.cssVarName("color-black")})`;
|
|
971
|
+
if (o = t.cssVarBlock({
|
|
972
|
+
"bg-color": a,
|
|
973
|
+
"text-color": p,
|
|
974
|
+
"border-color": a,
|
|
975
|
+
"hover-bg-color": f,
|
|
976
|
+
"hover-text-color": p,
|
|
977
|
+
"hover-border-color": f,
|
|
978
|
+
"active-bg-color": i,
|
|
979
|
+
"active-border-color": i
|
|
980
|
+
}), n.value) {
|
|
981
|
+
const m = e.dark ? G(s, 50) : s.tint(50).toString();
|
|
982
|
+
o[t.cssVarBlockName("disabled-bg-color")] = m, o[t.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${t.cssVarName("color-white")})`, o[t.cssVarBlockName("disabled-border-color")] = m;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
return o;
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
const Jn = I({
|
|
990
|
+
name: "ElButton"
|
|
991
|
+
}), Qn = /* @__PURE__ */ I({
|
|
992
|
+
...Jn,
|
|
993
|
+
props: Pe,
|
|
994
|
+
emits: Dn,
|
|
995
|
+
setup(e, { expose: n, emit: t }) {
|
|
996
|
+
const o = e, a = Zn(o), r = te("button"), {
|
|
997
|
+
_ref: s,
|
|
998
|
+
_size: i,
|
|
999
|
+
_type: f,
|
|
1000
|
+
_disabled: p,
|
|
1001
|
+
_props: m,
|
|
1002
|
+
_plain: _,
|
|
1003
|
+
_round: S,
|
|
1004
|
+
_text: y,
|
|
1005
|
+
shouldAddSpace: l,
|
|
1006
|
+
handleClick: h
|
|
1007
|
+
} = In(o, t), E = k(() => [
|
|
1008
|
+
r.b(),
|
|
1009
|
+
r.m(f.value),
|
|
1010
|
+
r.m(i.value),
|
|
1011
|
+
r.is("disabled", p.value),
|
|
1012
|
+
r.is("loading", o.loading),
|
|
1013
|
+
r.is("plain", _.value),
|
|
1014
|
+
r.is("round", S.value),
|
|
1015
|
+
r.is("circle", o.circle),
|
|
1016
|
+
r.is("text", y.value),
|
|
1017
|
+
r.is("link", o.link),
|
|
1018
|
+
r.is("has-bg", o.bg)
|
|
1019
|
+
]);
|
|
1020
|
+
return n({
|
|
1021
|
+
ref: s,
|
|
1022
|
+
size: i,
|
|
1023
|
+
type: f,
|
|
1024
|
+
disabled: p,
|
|
1025
|
+
shouldAddSpace: l
|
|
1026
|
+
}), (u, d) => (C(), H(be(u.tag), Fe({
|
|
1027
|
+
ref_key: "_ref",
|
|
1028
|
+
ref: s
|
|
1029
|
+
}, c(m), {
|
|
1030
|
+
class: c(E),
|
|
1031
|
+
style: c(a),
|
|
1032
|
+
onClick: c(h)
|
|
1033
|
+
}), {
|
|
1034
|
+
default: N(() => [
|
|
1035
|
+
u.loading ? (C(), J(jt, { key: 0 }, [
|
|
1036
|
+
u.$slots.loading ? A(u.$slots, "loading", { key: 0 }) : (C(), H(c(De), {
|
|
1037
|
+
key: 1,
|
|
1038
|
+
class: P(c(r).is("loading"))
|
|
1039
|
+
}, {
|
|
1040
|
+
default: N(() => [
|
|
1041
|
+
(C(), H(be(u.loadingIcon)))
|
|
1042
|
+
]),
|
|
1043
|
+
_: 1
|
|
1044
|
+
}, 8, ["class"]))
|
|
1045
|
+
], 64)) : u.icon || u.$slots.icon ? (C(), H(c(De), { key: 1 }, {
|
|
1046
|
+
default: N(() => [
|
|
1047
|
+
u.icon ? (C(), H(be(u.icon), { key: 0 })) : A(u.$slots, "icon", { key: 1 })
|
|
1048
|
+
]),
|
|
1049
|
+
_: 3
|
|
1050
|
+
})) : oe("v-if", !0),
|
|
1051
|
+
u.$slots.default ? (C(), J("span", {
|
|
1052
|
+
key: 2,
|
|
1053
|
+
class: P({ [c(r).em("text", "expand")]: c(l) })
|
|
1054
|
+
}, [
|
|
1055
|
+
A(u.$slots, "default")
|
|
1056
|
+
], 2)) : oe("v-if", !0)
|
|
1057
|
+
]),
|
|
1058
|
+
_: 3
|
|
1059
|
+
}, 16, ["class", "style", "onClick"]));
|
|
1060
|
+
}
|
|
1061
|
+
});
|
|
1062
|
+
var eo = /* @__PURE__ */ ne(Qn, [["__file", "button.vue"]]);
|
|
1063
|
+
const to = {
|
|
1064
|
+
size: Pe.size,
|
|
1065
|
+
type: Pe.type,
|
|
1066
|
+
direction: {
|
|
1067
|
+
type: X(String),
|
|
1068
|
+
values: ["horizontal", "vertical"],
|
|
1069
|
+
default: "horizontal"
|
|
1070
|
+
}
|
|
1071
|
+
}, no = I({
|
|
1072
|
+
name: "ElButtonGroup"
|
|
1073
|
+
}), oo = /* @__PURE__ */ I({
|
|
1074
|
+
...no,
|
|
1075
|
+
props: to,
|
|
1076
|
+
setup(e) {
|
|
1077
|
+
const n = e;
|
|
1078
|
+
He(yt, Gt({
|
|
1079
|
+
size: We(n, "size"),
|
|
1080
|
+
type: We(n, "type")
|
|
1081
|
+
}));
|
|
1082
|
+
const t = te("button");
|
|
1083
|
+
return (o, a) => (C(), J("div", {
|
|
1084
|
+
class: P([c(t).b("group"), c(t).bm("group", n.direction)])
|
|
1085
|
+
}, [
|
|
1086
|
+
A(o.$slots, "default")
|
|
1087
|
+
], 2));
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
var kt = /* @__PURE__ */ ne(oo, [["__file", "button-group.vue"]]);
|
|
1091
|
+
const ao = Ve(eo, {
|
|
1092
|
+
ButtonGroup: kt
|
|
1093
|
+
});
|
|
1094
|
+
cn(kt);
|
|
1095
|
+
var me = /* @__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))(me || {});
|
|
1096
|
+
const wt = (e) => {
|
|
1097
|
+
if (!e)
|
|
1098
|
+
return { onClick: Te, onMousedown: Te, onMouseup: Te };
|
|
1099
|
+
let n = !1, t = !1;
|
|
1100
|
+
return { onClick: (s) => {
|
|
1101
|
+
n && t && e(s), n = t = !1;
|
|
1102
|
+
}, onMousedown: (s) => {
|
|
1103
|
+
n = s.target === s.currentTarget;
|
|
1104
|
+
}, onMouseup: (s) => {
|
|
1105
|
+
t = s.target === s.currentTarget;
|
|
1106
|
+
} };
|
|
1107
|
+
}, ro = ae({
|
|
1108
|
+
mask: {
|
|
1109
|
+
type: Boolean,
|
|
1110
|
+
default: !0
|
|
1111
|
+
},
|
|
1112
|
+
customMaskEvent: Boolean,
|
|
1113
|
+
overlayClass: {
|
|
1114
|
+
type: X([
|
|
1115
|
+
String,
|
|
1116
|
+
Array,
|
|
1117
|
+
Object
|
|
1118
|
+
])
|
|
1119
|
+
},
|
|
1120
|
+
zIndex: {
|
|
1121
|
+
type: X([String, Number])
|
|
1122
|
+
}
|
|
1123
|
+
}), so = {
|
|
1124
|
+
click: (e) => e instanceof MouseEvent
|
|
1125
|
+
}, io = "overlay";
|
|
1126
|
+
var lo = I({
|
|
1127
|
+
name: "ElOverlay",
|
|
1128
|
+
props: ro,
|
|
1129
|
+
emits: so,
|
|
1130
|
+
setup(e, { slots: n, emit: t }) {
|
|
1131
|
+
const o = te(io), a = (f) => {
|
|
1132
|
+
t("click", f);
|
|
1133
|
+
}, { onClick: r, onMousedown: s, onMouseup: i } = wt(e.customMaskEvent ? void 0 : a);
|
|
1134
|
+
return () => e.mask ? Q("div", {
|
|
1135
|
+
class: [o.b(), e.overlayClass],
|
|
1136
|
+
style: {
|
|
1137
|
+
zIndex: e.zIndex
|
|
1138
|
+
},
|
|
1139
|
+
onClick: r,
|
|
1140
|
+
onMousedown: s,
|
|
1141
|
+
onMouseup: i
|
|
1142
|
+
}, [A(n, "default")], me.STYLE | me.CLASS | me.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Yt("div", {
|
|
1143
|
+
class: e.overlayClass,
|
|
1144
|
+
style: {
|
|
1145
|
+
zIndex: e.zIndex,
|
|
1146
|
+
position: "fixed",
|
|
1147
|
+
top: "0px",
|
|
1148
|
+
right: "0px",
|
|
1149
|
+
bottom: "0px",
|
|
1150
|
+
left: "0px"
|
|
1151
|
+
}
|
|
1152
|
+
}, [A(n, "default")]);
|
|
1153
|
+
}
|
|
1154
|
+
});
|
|
1155
|
+
const uo = lo, _t = Symbol("dialogInjectionKey"), Ne = "dialog-fade", Tt = ae({
|
|
1156
|
+
center: Boolean,
|
|
1157
|
+
alignCenter: {
|
|
1158
|
+
type: Boolean,
|
|
1159
|
+
default: void 0
|
|
1160
|
+
},
|
|
1161
|
+
closeIcon: {
|
|
1162
|
+
type: Oe
|
|
1163
|
+
},
|
|
1164
|
+
draggable: {
|
|
1165
|
+
type: Boolean,
|
|
1166
|
+
default: void 0
|
|
1167
|
+
},
|
|
1168
|
+
overflow: {
|
|
1169
|
+
type: Boolean,
|
|
1170
|
+
default: void 0
|
|
1171
|
+
},
|
|
1172
|
+
fullscreen: Boolean,
|
|
1173
|
+
headerClass: String,
|
|
1174
|
+
bodyClass: String,
|
|
1175
|
+
footerClass: String,
|
|
1176
|
+
showClose: {
|
|
1177
|
+
type: Boolean,
|
|
1178
|
+
default: !0
|
|
1179
|
+
},
|
|
1180
|
+
title: {
|
|
1181
|
+
type: String,
|
|
1182
|
+
default: ""
|
|
1183
|
+
},
|
|
1184
|
+
ariaLevel: {
|
|
1185
|
+
type: String,
|
|
1186
|
+
default: "2"
|
|
1187
|
+
}
|
|
1188
|
+
}), co = {
|
|
1189
|
+
close: () => !0
|
|
1190
|
+
}, fo = (e, n, t, o) => {
|
|
1191
|
+
const a = {
|
|
1192
|
+
offsetX: 0,
|
|
1193
|
+
offsetY: 0
|
|
1194
|
+
}, r = x(!1), s = (S, y) => {
|
|
1195
|
+
if (e.value) {
|
|
1196
|
+
const { offsetX: l, offsetY: h } = a, E = e.value.getBoundingClientRect(), u = E.left, d = E.top, b = E.width, M = E.height, K = document.documentElement.clientWidth, j = document.documentElement.clientHeight, $ = -u + l, F = -d + h, L = K - u - b + l, O = j - d - (M < j ? M : 0) + h;
|
|
1197
|
+
o?.value || (S = Math.min(Math.max(S, $), L), y = Math.min(Math.max(y, F), O)), a.offsetX = S, a.offsetY = y, e.value.style.transform = `translate(${Le(S)}, ${Le(y)})`;
|
|
1198
|
+
}
|
|
1199
|
+
}, i = (S) => {
|
|
1200
|
+
const y = S.clientX, l = S.clientY, { offsetX: h, offsetY: E } = a, u = (b) => {
|
|
1201
|
+
r.value || (r.value = !0);
|
|
1202
|
+
const M = h + b.clientX - y, K = E + b.clientY - l;
|
|
1203
|
+
s(M, K);
|
|
1204
|
+
}, d = () => {
|
|
1205
|
+
r.value = !1, document.removeEventListener("mousemove", u), document.removeEventListener("mouseup", d);
|
|
1206
|
+
};
|
|
1207
|
+
document.addEventListener("mousemove", u), document.addEventListener("mouseup", d);
|
|
1208
|
+
}, f = () => {
|
|
1209
|
+
n.value && e.value && (n.value.addEventListener("mousedown", i), window.addEventListener("resize", _));
|
|
1210
|
+
}, p = () => {
|
|
1211
|
+
n.value && e.value && (n.value.removeEventListener("mousedown", i), window.removeEventListener("resize", _));
|
|
1212
|
+
}, m = () => {
|
|
1213
|
+
a.offsetX = 0, a.offsetY = 0, e.value && (e.value.style.transform = "");
|
|
1214
|
+
}, _ = () => {
|
|
1215
|
+
const { offsetX: S, offsetY: y } = a;
|
|
1216
|
+
s(S, y);
|
|
1217
|
+
};
|
|
1218
|
+
return re(() => {
|
|
1219
|
+
Wt(() => {
|
|
1220
|
+
t.value ? f() : p();
|
|
1221
|
+
});
|
|
1222
|
+
}), se(() => {
|
|
1223
|
+
p();
|
|
1224
|
+
}), {
|
|
1225
|
+
isDragging: r,
|
|
1226
|
+
resetPosition: m,
|
|
1227
|
+
updatePosition: _
|
|
1228
|
+
};
|
|
1229
|
+
}, vo = (...e) => (n) => {
|
|
1230
|
+
e.forEach((t) => {
|
|
1231
|
+
t.value = n;
|
|
1232
|
+
});
|
|
1233
|
+
}, ho = I({ name: "ElDialogContent" }), po = /* @__PURE__ */ I({
|
|
1234
|
+
...ho,
|
|
1235
|
+
props: Tt,
|
|
1236
|
+
emits: co,
|
|
1237
|
+
setup(e, { expose: n }) {
|
|
1238
|
+
const t = e, { t: o } = fn(), { Close: a } = dn, { dialogRef: r, headerRef: s, bodyId: i, ns: f, style: p } = Ie(_t), { focusTrapRef: m } = Ie(pt), _ = vo(m, r), S = k(() => !!t.draggable), y = k(() => !!t.overflow), { resetPosition: l, updatePosition: h, isDragging: E } = fo(r, s, S, y), u = k(() => [
|
|
1239
|
+
f.b(),
|
|
1240
|
+
f.is("fullscreen", t.fullscreen),
|
|
1241
|
+
f.is("draggable", S.value),
|
|
1242
|
+
f.is("dragging", E.value),
|
|
1243
|
+
f.is("align-center", !!t.alignCenter),
|
|
1244
|
+
{ [f.m("center")]: t.center }
|
|
1245
|
+
]);
|
|
1246
|
+
return n({
|
|
1247
|
+
resetPosition: l,
|
|
1248
|
+
updatePosition: h
|
|
1249
|
+
}), (d, b) => (C(), J("div", {
|
|
1250
|
+
ref: c(_),
|
|
1251
|
+
class: P(c(u)),
|
|
1252
|
+
style: dt(c(p)),
|
|
1253
|
+
tabindex: "-1"
|
|
1254
|
+
}, [
|
|
1255
|
+
ee("header", {
|
|
1256
|
+
ref_key: "headerRef",
|
|
1257
|
+
ref: s,
|
|
1258
|
+
class: P([c(f).e("header"), d.headerClass, { "show-close": d.showClose }])
|
|
1259
|
+
}, [
|
|
1260
|
+
A(d.$slots, "header", {}, () => [
|
|
1261
|
+
ee("span", {
|
|
1262
|
+
role: "heading",
|
|
1263
|
+
"aria-level": d.ariaLevel,
|
|
1264
|
+
class: P(c(f).e("title"))
|
|
1265
|
+
}, qt(d.title), 11, ["aria-level"])
|
|
1266
|
+
]),
|
|
1267
|
+
d.showClose ? (C(), J("button", {
|
|
1268
|
+
key: 0,
|
|
1269
|
+
"aria-label": c(o)("el.dialog.close"),
|
|
1270
|
+
class: P(c(f).e("headerbtn")),
|
|
1271
|
+
type: "button",
|
|
1272
|
+
onClick: (M) => d.$emit("close")
|
|
1273
|
+
}, [
|
|
1274
|
+
Q(c(De), {
|
|
1275
|
+
class: P(c(f).e("close"))
|
|
1276
|
+
}, {
|
|
1277
|
+
default: N(() => [
|
|
1278
|
+
(C(), H(be(d.closeIcon || c(a))))
|
|
1279
|
+
]),
|
|
1280
|
+
_: 1
|
|
1281
|
+
}, 8, ["class"])
|
|
1282
|
+
], 10, ["aria-label", "onClick"])) : oe("v-if", !0)
|
|
1283
|
+
], 2),
|
|
1284
|
+
ee("div", {
|
|
1285
|
+
id: c(i),
|
|
1286
|
+
class: P([c(f).e("body"), d.bodyClass])
|
|
1287
|
+
}, [
|
|
1288
|
+
A(d.$slots, "default")
|
|
1289
|
+
], 10, ["id"]),
|
|
1290
|
+
d.$slots.footer ? (C(), J("footer", {
|
|
1291
|
+
key: 0,
|
|
1292
|
+
class: P([c(f).e("footer"), d.footerClass])
|
|
1293
|
+
}, [
|
|
1294
|
+
A(d.$slots, "footer")
|
|
1295
|
+
], 2)) : oe("v-if", !0)
|
|
1296
|
+
], 6));
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
var go = /* @__PURE__ */ ne(po, [["__file", "dialog-content.vue"]]);
|
|
1300
|
+
const bo = ae({
|
|
1301
|
+
...Tt,
|
|
1302
|
+
appendToBody: Boolean,
|
|
1303
|
+
appendTo: {
|
|
1304
|
+
type: mt.to.type,
|
|
1305
|
+
default: "body"
|
|
1306
|
+
},
|
|
1307
|
+
beforeClose: {
|
|
1308
|
+
type: X(Function)
|
|
1309
|
+
},
|
|
1310
|
+
destroyOnClose: Boolean,
|
|
1311
|
+
closeOnClickModal: {
|
|
1312
|
+
type: Boolean,
|
|
1313
|
+
default: !0
|
|
1314
|
+
},
|
|
1315
|
+
closeOnPressEscape: {
|
|
1316
|
+
type: Boolean,
|
|
1317
|
+
default: !0
|
|
1318
|
+
},
|
|
1319
|
+
lockScroll: {
|
|
1320
|
+
type: Boolean,
|
|
1321
|
+
default: !0
|
|
1322
|
+
},
|
|
1323
|
+
modal: {
|
|
1324
|
+
type: Boolean,
|
|
1325
|
+
default: !0
|
|
1326
|
+
},
|
|
1327
|
+
modalPenetrable: Boolean,
|
|
1328
|
+
openDelay: {
|
|
1329
|
+
type: Number,
|
|
1330
|
+
default: 0
|
|
1331
|
+
},
|
|
1332
|
+
closeDelay: {
|
|
1333
|
+
type: Number,
|
|
1334
|
+
default: 0
|
|
1335
|
+
},
|
|
1336
|
+
top: {
|
|
1337
|
+
type: String
|
|
1338
|
+
},
|
|
1339
|
+
modelValue: Boolean,
|
|
1340
|
+
modalClass: String,
|
|
1341
|
+
headerClass: String,
|
|
1342
|
+
bodyClass: String,
|
|
1343
|
+
footerClass: String,
|
|
1344
|
+
width: {
|
|
1345
|
+
type: [String, Number]
|
|
1346
|
+
},
|
|
1347
|
+
zIndex: {
|
|
1348
|
+
type: Number
|
|
1349
|
+
},
|
|
1350
|
+
trapFocus: Boolean,
|
|
1351
|
+
headerAriaLevel: {
|
|
1352
|
+
type: String,
|
|
1353
|
+
default: "2"
|
|
1354
|
+
},
|
|
1355
|
+
transition: {
|
|
1356
|
+
type: X([String, Object]),
|
|
1357
|
+
default: void 0
|
|
1358
|
+
}
|
|
1359
|
+
}), mo = {
|
|
1360
|
+
open: () => !0,
|
|
1361
|
+
opened: () => !0,
|
|
1362
|
+
close: () => !0,
|
|
1363
|
+
closed: () => !0,
|
|
1364
|
+
[vt]: (e) => It(e),
|
|
1365
|
+
openAutoFocus: () => !0,
|
|
1366
|
+
closeAutoFocus: () => !0
|
|
1367
|
+
}, yo = (e, n = {}) => {
|
|
1368
|
+
Xt(e) || Ft("[useLockscreen]", "You need to pass a ref param to this function");
|
|
1369
|
+
const t = n.ns || te("popup"), o = k(() => t.bm("parent", "hidden"));
|
|
1370
|
+
let a = 0, r = !1, s = "0";
|
|
1371
|
+
const i = () => {
|
|
1372
|
+
setTimeout(() => {
|
|
1373
|
+
typeof document > "u" || r && document && (document.body.style.width = s, $t(document.body, o.value));
|
|
1374
|
+
}, 200);
|
|
1375
|
+
};
|
|
1376
|
+
V(e, (f) => {
|
|
1377
|
+
if (!f) {
|
|
1378
|
+
i();
|
|
1379
|
+
return;
|
|
1380
|
+
}
|
|
1381
|
+
r = !Ot(document.body, o.value), r && (s = document.body.style.width, Dt(document.body, o.value)), a = gn(t.namespace.value);
|
|
1382
|
+
const p = document.documentElement.clientHeight < document.body.scrollHeight, m = Pt(document.body, "overflowY");
|
|
1383
|
+
a > 0 && (p || m === "scroll") && r && (document.body.style.width = `calc(100% - ${a}px)`);
|
|
1384
|
+
}), Zt(() => i());
|
|
1385
|
+
}, Eo = "ElDialog", So = (e, n) => {
|
|
1386
|
+
var t;
|
|
1387
|
+
const a = Jt().emit, { nextZIndex: r } = vn();
|
|
1388
|
+
let s = "";
|
|
1389
|
+
const i = qe(), f = qe(), p = x(!1), m = x(!1), _ = x(!1), S = x((t = e.zIndex) != null ? t : r());
|
|
1390
|
+
let y, l;
|
|
1391
|
+
const h = ht(), E = k(() => {
|
|
1392
|
+
var g, w;
|
|
1393
|
+
return (w = (g = h.value) == null ? void 0 : g.namespace) != null ? w : Ht;
|
|
1394
|
+
}), u = k(() => {
|
|
1395
|
+
var g;
|
|
1396
|
+
return (g = h.value) == null ? void 0 : g.dialog;
|
|
1397
|
+
}), d = k(() => {
|
|
1398
|
+
const g = {}, w = `--${E.value}-dialog`;
|
|
1399
|
+
if (!e.fullscreen) {
|
|
1400
|
+
e.top && (g[`${w}-margin-top`] = e.top);
|
|
1401
|
+
const B = Le(e.width);
|
|
1402
|
+
B && (g[`${w}-width`] = B);
|
|
1403
|
+
}
|
|
1404
|
+
return g;
|
|
1405
|
+
}), b = k(() => {
|
|
1406
|
+
var g, w, B;
|
|
1407
|
+
return ((B = (w = e.draggable) != null ? w : (g = u.value) == null ? void 0 : g.draggable) != null ? B : !1) && !e.fullscreen;
|
|
1408
|
+
}), M = k(() => {
|
|
1409
|
+
var g, w, B;
|
|
1410
|
+
return (B = (w = e.alignCenter) != null ? w : (g = u.value) == null ? void 0 : g.alignCenter) != null ? B : !1;
|
|
1411
|
+
}), K = k(() => {
|
|
1412
|
+
var g, w, B;
|
|
1413
|
+
return (B = (w = e.overflow) != null ? w : (g = u.value) == null ? void 0 : g.overflow) != null ? B : !1;
|
|
1414
|
+
}), j = k(() => M.value ? { display: "flex" } : {}), $ = k(() => {
|
|
1415
|
+
var g, w, B;
|
|
1416
|
+
const we = (B = (w = e.transition) != null ? w : (g = u.value) == null ? void 0 : g.transition) != null ? B : Ne, Bt = {
|
|
1417
|
+
name: we,
|
|
1418
|
+
onAfterEnter: F,
|
|
1419
|
+
onBeforeLeave: O,
|
|
1420
|
+
onAfterLeave: L
|
|
1421
|
+
};
|
|
1422
|
+
if (Vt(we)) {
|
|
1423
|
+
const U = { ...we }, _e = (ce, Nt) => (je) => {
|
|
1424
|
+
Ut(ce) ? ce.forEach((Ge) => {
|
|
1425
|
+
Ye(Ge) && Ge(je);
|
|
1426
|
+
}) : Ye(ce) && ce(je), Nt();
|
|
1427
|
+
};
|
|
1428
|
+
return U.onAfterEnter = _e(U.onAfterEnter, F), U.onBeforeLeave = _e(U.onBeforeLeave, O), U.onAfterLeave = _e(U.onAfterLeave, L), U.name || (U.name = Ne, ut(Eo, `transition.name is missing when using object syntax, fallback to '${Ne}'`)), U;
|
|
1429
|
+
}
|
|
1430
|
+
return Bt;
|
|
1431
|
+
});
|
|
1432
|
+
function F() {
|
|
1433
|
+
a("opened");
|
|
1434
|
+
}
|
|
1435
|
+
function L() {
|
|
1436
|
+
a("closed"), a(vt, !1), e.destroyOnClose && (_.value = !1);
|
|
1437
|
+
}
|
|
1438
|
+
function O() {
|
|
1439
|
+
a("close");
|
|
1440
|
+
}
|
|
1441
|
+
function ie() {
|
|
1442
|
+
l?.(), y?.(), e.openDelay && e.openDelay > 0 ? { stop: y } = Xe(() => Ke(), e.openDelay) : Ke();
|
|
1443
|
+
}
|
|
1444
|
+
function v() {
|
|
1445
|
+
y?.(), l?.(), e.closeDelay && e.closeDelay > 0 ? { stop: l } = Xe(() => ke(), e.closeDelay) : ke();
|
|
1446
|
+
}
|
|
1447
|
+
function le() {
|
|
1448
|
+
function g(w) {
|
|
1449
|
+
w || (m.value = !0, p.value = !1);
|
|
1450
|
+
}
|
|
1451
|
+
e.beforeClose ? e.beforeClose(g) : v();
|
|
1452
|
+
}
|
|
1453
|
+
function ue() {
|
|
1454
|
+
e.closeOnClickModal && le();
|
|
1455
|
+
}
|
|
1456
|
+
function Ke() {
|
|
1457
|
+
ye && (p.value = !0);
|
|
1458
|
+
}
|
|
1459
|
+
function ke() {
|
|
1460
|
+
p.value = !1;
|
|
1461
|
+
}
|
|
1462
|
+
function Ct() {
|
|
1463
|
+
a("openAutoFocus");
|
|
1464
|
+
}
|
|
1465
|
+
function At() {
|
|
1466
|
+
a("closeAutoFocus");
|
|
1467
|
+
}
|
|
1468
|
+
function Mt(g) {
|
|
1469
|
+
var w;
|
|
1470
|
+
((w = g.detail) == null ? void 0 : w.focusReason) === "pointer" && g.preventDefault();
|
|
1471
|
+
}
|
|
1472
|
+
e.lockScroll && yo(p);
|
|
1473
|
+
function xt() {
|
|
1474
|
+
e.closeOnPressEscape && le();
|
|
1475
|
+
}
|
|
1476
|
+
return V(() => e.zIndex, () => {
|
|
1477
|
+
var g;
|
|
1478
|
+
S.value = (g = e.zIndex) != null ? g : r();
|
|
1479
|
+
}), V(() => e.modelValue, (g) => {
|
|
1480
|
+
var w;
|
|
1481
|
+
g ? (m.value = !1, ie(), _.value = !0, S.value = (w = e.zIndex) != null ? w : r(), Re(() => {
|
|
1482
|
+
a("open"), n.value && (n.value.parentElement.scrollTop = 0, n.value.parentElement.scrollLeft = 0, n.value.scrollTop = 0);
|
|
1483
|
+
})) : p.value && v();
|
|
1484
|
+
}), V(() => e.fullscreen, (g) => {
|
|
1485
|
+
n.value && (g ? (s = n.value.style.transform, n.value.style.transform = "") : n.value.style.transform = s);
|
|
1486
|
+
}), re(() => {
|
|
1487
|
+
e.modelValue && (p.value = !0, _.value = !0, ie());
|
|
1488
|
+
}), {
|
|
1489
|
+
afterEnter: F,
|
|
1490
|
+
afterLeave: L,
|
|
1491
|
+
beforeLeave: O,
|
|
1492
|
+
handleClose: le,
|
|
1493
|
+
onModalClick: ue,
|
|
1494
|
+
close: v,
|
|
1495
|
+
doClose: ke,
|
|
1496
|
+
onOpenAutoFocus: Ct,
|
|
1497
|
+
onCloseAutoFocus: At,
|
|
1498
|
+
onCloseRequested: xt,
|
|
1499
|
+
onFocusoutPrevented: Mt,
|
|
1500
|
+
titleId: i,
|
|
1501
|
+
bodyId: f,
|
|
1502
|
+
closed: m,
|
|
1503
|
+
style: d,
|
|
1504
|
+
overlayDialogStyle: j,
|
|
1505
|
+
rendered: _,
|
|
1506
|
+
visible: p,
|
|
1507
|
+
zIndex: S,
|
|
1508
|
+
transitionConfig: $,
|
|
1509
|
+
_draggable: b,
|
|
1510
|
+
_alignCenter: M,
|
|
1511
|
+
_overflow: K
|
|
1512
|
+
};
|
|
1513
|
+
}, ko = I({
|
|
1514
|
+
name: "ElDialog",
|
|
1515
|
+
inheritAttrs: !1
|
|
1516
|
+
}), wo = /* @__PURE__ */ I({
|
|
1517
|
+
...ko,
|
|
1518
|
+
props: bo,
|
|
1519
|
+
emits: mo,
|
|
1520
|
+
setup(e, { expose: n }) {
|
|
1521
|
+
const t = e, o = ct();
|
|
1522
|
+
Et({
|
|
1523
|
+
scope: "el-dialog",
|
|
1524
|
+
from: "the title slot",
|
|
1525
|
+
replacement: "the header slot",
|
|
1526
|
+
version: "3.0.0",
|
|
1527
|
+
ref: "https://element-plus.org/en-US/component/dialog.html#slots"
|
|
1528
|
+
}, k(() => !!o.title));
|
|
1529
|
+
const a = te("dialog"), r = x(), s = x(), i = x(), {
|
|
1530
|
+
visible: f,
|
|
1531
|
+
titleId: p,
|
|
1532
|
+
bodyId: m,
|
|
1533
|
+
style: _,
|
|
1534
|
+
overlayDialogStyle: S,
|
|
1535
|
+
rendered: y,
|
|
1536
|
+
transitionConfig: l,
|
|
1537
|
+
zIndex: h,
|
|
1538
|
+
_draggable: E,
|
|
1539
|
+
_alignCenter: u,
|
|
1540
|
+
_overflow: d,
|
|
1541
|
+
handleClose: b,
|
|
1542
|
+
onModalClick: M,
|
|
1543
|
+
onOpenAutoFocus: K,
|
|
1544
|
+
onCloseAutoFocus: j,
|
|
1545
|
+
onCloseRequested: $,
|
|
1546
|
+
onFocusoutPrevented: F
|
|
1547
|
+
} = So(t, r);
|
|
1548
|
+
He(_t, {
|
|
1549
|
+
dialogRef: r,
|
|
1550
|
+
headerRef: s,
|
|
1551
|
+
bodyId: m,
|
|
1552
|
+
ns: a,
|
|
1553
|
+
rendered: y,
|
|
1554
|
+
style: _
|
|
1555
|
+
});
|
|
1556
|
+
const L = wt(M), O = k(() => t.modalPenetrable && !t.modal && !t.fullscreen);
|
|
1557
|
+
return n({
|
|
1558
|
+
visible: f,
|
|
1559
|
+
dialogContentRef: i,
|
|
1560
|
+
resetPosition: () => {
|
|
1561
|
+
var v;
|
|
1562
|
+
(v = i.value) == null || v.resetPosition();
|
|
1563
|
+
},
|
|
1564
|
+
handleClose: b
|
|
1565
|
+
}), (v, le) => (C(), H(c(Rn), {
|
|
1566
|
+
to: v.appendTo,
|
|
1567
|
+
disabled: v.appendTo !== "body" ? !1 : !v.appendToBody
|
|
1568
|
+
}, {
|
|
1569
|
+
default: N(() => [
|
|
1570
|
+
Q(Qt, Fe(c(l), { persisted: "" }), {
|
|
1571
|
+
default: N(() => {
|
|
1572
|
+
var ue;
|
|
1573
|
+
return [
|
|
1574
|
+
en(Q(c(uo), {
|
|
1575
|
+
"custom-mask-event": "",
|
|
1576
|
+
mask: v.modal,
|
|
1577
|
+
"overlay-class": [
|
|
1578
|
+
(ue = v.modalClass) != null ? ue : "",
|
|
1579
|
+
`${c(a).namespace.value}-modal-dialog`,
|
|
1580
|
+
c(a).is("penetrable", c(O))
|
|
1581
|
+
],
|
|
1582
|
+
"z-index": c(h)
|
|
1583
|
+
}, {
|
|
1584
|
+
default: N(() => [
|
|
1585
|
+
ee("div", {
|
|
1586
|
+
role: "dialog",
|
|
1587
|
+
"aria-modal": "true",
|
|
1588
|
+
"aria-label": v.title || void 0,
|
|
1589
|
+
"aria-labelledby": v.title ? void 0 : c(p),
|
|
1590
|
+
"aria-describedby": c(m),
|
|
1591
|
+
class: P(`${c(a).namespace.value}-overlay-dialog`),
|
|
1592
|
+
style: dt(c(S)),
|
|
1593
|
+
onClick: c(L).onClick,
|
|
1594
|
+
onMousedown: c(L).onMousedown,
|
|
1595
|
+
onMouseup: c(L).onMouseup
|
|
1596
|
+
}, [
|
|
1597
|
+
Q(c(Bn), {
|
|
1598
|
+
loop: "",
|
|
1599
|
+
trapped: c(f),
|
|
1600
|
+
"focus-start-el": "container",
|
|
1601
|
+
onFocusAfterTrapped: c(K),
|
|
1602
|
+
onFocusAfterReleased: c(j),
|
|
1603
|
+
onFocusoutPrevented: c(F),
|
|
1604
|
+
onReleaseRequested: c($)
|
|
1605
|
+
}, {
|
|
1606
|
+
default: N(() => [
|
|
1607
|
+
c(y) ? (C(), H(go, Fe({
|
|
1608
|
+
key: 0,
|
|
1609
|
+
ref_key: "dialogContentRef",
|
|
1610
|
+
ref: i
|
|
1611
|
+
}, v.$attrs, {
|
|
1612
|
+
center: v.center,
|
|
1613
|
+
"align-center": c(u),
|
|
1614
|
+
"close-icon": v.closeIcon,
|
|
1615
|
+
draggable: c(E),
|
|
1616
|
+
overflow: c(d),
|
|
1617
|
+
fullscreen: v.fullscreen,
|
|
1618
|
+
"header-class": v.headerClass,
|
|
1619
|
+
"body-class": v.bodyClass,
|
|
1620
|
+
"footer-class": v.footerClass,
|
|
1621
|
+
"show-close": v.showClose,
|
|
1622
|
+
title: v.title,
|
|
1623
|
+
"aria-level": v.headerAriaLevel,
|
|
1624
|
+
onClose: c(b)
|
|
1625
|
+
}), tn({
|
|
1626
|
+
header: N(() => [
|
|
1627
|
+
v.$slots.title ? A(v.$slots, "title", { key: 1 }) : A(v.$slots, "header", {
|
|
1628
|
+
key: 0,
|
|
1629
|
+
close: c(b),
|
|
1630
|
+
titleId: c(p),
|
|
1631
|
+
titleClass: c(a).e("title")
|
|
1632
|
+
})
|
|
1633
|
+
]),
|
|
1634
|
+
default: N(() => [
|
|
1635
|
+
A(v.$slots, "default")
|
|
1636
|
+
]),
|
|
1637
|
+
_: 2
|
|
1638
|
+
}, [
|
|
1639
|
+
v.$slots.footer ? {
|
|
1640
|
+
name: "footer",
|
|
1641
|
+
fn: N(() => [
|
|
1642
|
+
A(v.$slots, "footer")
|
|
1643
|
+
])
|
|
1644
|
+
} : void 0
|
|
1645
|
+
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : oe("v-if", !0)
|
|
1646
|
+
]),
|
|
1647
|
+
_: 3
|
|
1648
|
+
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
1649
|
+
], 46, ["aria-label", "aria-labelledby", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
|
|
1650
|
+
]),
|
|
1651
|
+
_: 3
|
|
1652
|
+
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
1653
|
+
[nn, c(f)]
|
|
1654
|
+
])
|
|
1655
|
+
];
|
|
1656
|
+
}),
|
|
1657
|
+
_: 3
|
|
1658
|
+
}, 16)
|
|
1659
|
+
]),
|
|
1660
|
+
_: 3
|
|
1661
|
+
}, 8, ["to", "disabled"]));
|
|
1662
|
+
}
|
|
1663
|
+
});
|
|
1664
|
+
var _o = /* @__PURE__ */ ne(wo, [["__file", "dialog.vue"]]);
|
|
1665
|
+
const To = Ve(_o), Co = ["src"], Ao = { style: { "text-align": "right" } }, Mo = /* @__PURE__ */ I({
|
|
1666
|
+
__name: "VideoDialog",
|
|
1667
|
+
props: {
|
|
1668
|
+
modelValue: { type: Boolean, default: !1 },
|
|
1669
|
+
type: { type: String, required: !0 },
|
|
1670
|
+
otherSrc: { type: String, required: !1 },
|
|
1671
|
+
title: { type: String, default: "视频播放" },
|
|
1672
|
+
width: { type: [String, Number], default: "800px" }
|
|
1673
|
+
},
|
|
1674
|
+
emits: ["update:modelValue", "close"],
|
|
1675
|
+
setup(e, { emit: n }) {
|
|
1676
|
+
const t = {
|
|
1677
|
+
MakeShpZip: "https://play.zhbhd.cn/customerTrans/953f578f2ef797bde2422ceac4be5956/1c264c0e-19a32e04b7a-0007-0689-5de-e4d25.mp4"
|
|
1678
|
+
}, o = e, a = k(() => o.type && t[o.type] || o.otherSrc), r = n, s = x(o.modelValue), i = x(null);
|
|
1679
|
+
V(
|
|
1680
|
+
() => o.modelValue,
|
|
1681
|
+
(p) => {
|
|
1682
|
+
s.value = p, p && i.value && i.value.play().catch(() => {
|
|
1683
|
+
});
|
|
1684
|
+
}
|
|
1685
|
+
), V(s, (p) => {
|
|
1686
|
+
r("update:modelValue", p);
|
|
1687
|
+
});
|
|
1688
|
+
const f = () => {
|
|
1689
|
+
if (i.value)
|
|
1690
|
+
try {
|
|
1691
|
+
i.value.pause(), i.value.currentTime = 0;
|
|
1692
|
+
} catch {
|
|
1693
|
+
}
|
|
1694
|
+
s.value = !1, r("close");
|
|
1695
|
+
};
|
|
1696
|
+
return se(() => {
|
|
1697
|
+
if (i.value)
|
|
1698
|
+
try {
|
|
1699
|
+
i.value.pause();
|
|
1700
|
+
} catch {
|
|
1701
|
+
}
|
|
1702
|
+
}), (p, m) => {
|
|
1703
|
+
const _ = ao, S = To;
|
|
1704
|
+
return C(), H(S, {
|
|
1705
|
+
modelValue: s.value,
|
|
1706
|
+
"onUpdate:modelValue": m[0] || (m[0] = (y) => s.value = y),
|
|
1707
|
+
title: e.title,
|
|
1708
|
+
width: e.width,
|
|
1709
|
+
"close-on-click-modal": !0,
|
|
1710
|
+
"destroy-on-close": !0,
|
|
1711
|
+
onClose: f,
|
|
1712
|
+
"append-to-body": ""
|
|
1713
|
+
}, {
|
|
1714
|
+
footer: N(() => [
|
|
1715
|
+
ee("div", Ao, [
|
|
1716
|
+
Q(_, { onClick: f }, {
|
|
1717
|
+
default: N(() => [...m[1] || (m[1] = [
|
|
1718
|
+
on("关闭", -1)
|
|
1719
|
+
])]),
|
|
1720
|
+
_: 1
|
|
1721
|
+
})
|
|
1722
|
+
])
|
|
1723
|
+
]),
|
|
1724
|
+
default: N(() => [
|
|
1725
|
+
ee("video", {
|
|
1726
|
+
ref_key: "videoRef",
|
|
1727
|
+
ref: i,
|
|
1728
|
+
src: a.value,
|
|
1729
|
+
controls: "",
|
|
1730
|
+
autoplay: "",
|
|
1731
|
+
style: { width: "100%", "max-height": "70vh", background: "#000" }
|
|
1732
|
+
}, null, 8, Co)
|
|
1733
|
+
]),
|
|
1734
|
+
_: 1
|
|
1735
|
+
}, 8, ["modelValue", "title", "width"]);
|
|
1736
|
+
};
|
|
1737
|
+
}
|
|
1738
|
+
}), Oo = /* @__PURE__ */ pn(Mo, [["__scopeId", "data-v-3690f990"]]);
|
|
1739
|
+
export {
|
|
1740
|
+
Oo as default
|
|
1741
|
+
};
|