ra-element 0.0.10 → 0.0.13

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.
@@ -1,1584 +0,0 @@
1
- import { getCurrentInstance as J, inject as k, ref as _, computed as C, unref as l, shallowRef as Dt, watchEffect as rt, readonly as st, getCurrentScope as At, onScopeDispose as at, isRef as it, warn as Ft, defineComponent as P, createElementBlock as G, openBlock as F, mergeProps as lt, renderSlot as T, createElementVNode as W, onMounted as ne, onBeforeUnmount as ve, provide as ct, watch as K, nextTick as Te, createBlock as fe, Teleport as xt, createVNode as ee, h as Mt, normalizeStyle as ut, normalizeClass as R, createCommentVNode as Se, toDisplayString as kt, withCtx as z, resolveDynamicComponent as jt, useSlots as Rt, Transition as zt, withDirectives as Bt, createSlots as Kt, vShow as Vt } from "vue";
2
- const Ut = Symbol(), ce = "el", Ht = "is-", V = (e, t, n, o, r) => {
3
- let s = `${e}-${t}`;
4
- return n && (s += `-${n}`), o && (s += `__${o}`), r && (s += `--${r}`), s;
5
- }, Yt = Symbol("namespaceContextKey"), dt = (e) => {
6
- const t = J() ? k(Yt, _(ce)) : _(ce);
7
- return C(() => l(t) || ce);
8
- }, me = (e, t) => {
9
- const n = dt();
10
- return {
11
- namespace: n,
12
- b: (a = "") => V(n.value, e, a, "", ""),
13
- e: (a) => a ? V(n.value, e, "", a, "") : "",
14
- m: (a) => a ? V(n.value, e, "", "", a) : "",
15
- be: (a, d) => a && d ? V(n.value, e, a, d, "") : "",
16
- em: (a, d) => a && d ? V(n.value, e, "", a, d) : "",
17
- bm: (a, d) => a && d ? V(n.value, e, a, "", d) : "",
18
- bem: (a, d, c) => a && d && c ? V(n.value, e, a, d, c) : "",
19
- is: (a, ...d) => {
20
- const c = d.length >= 1 ? d[0] : !0;
21
- return a && c ? `${Ht}${a}` : "";
22
- },
23
- cssVar: (a) => {
24
- const d = {};
25
- for (const c in a)
26
- a[c] && (d[`--${n.value}-${c}`] = a[c]);
27
- return d;
28
- },
29
- cssVarName: (a) => `--${n.value}-${a}`,
30
- cssVarBlock: (a) => {
31
- const d = {};
32
- for (const c in a)
33
- a[c] && (d[`--${n.value}-${e}-${c}`] = a[c]);
34
- return d;
35
- },
36
- cssVarBlockName: (a) => `--${n.value}-${e}-${a}`
37
- };
38
- };
39
- /**
40
- * @vue/shared v3.5.17
41
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
42
- * @license MIT
43
- **/
44
- process.env.NODE_ENV !== "production" && Object.freeze({});
45
- process.env.NODE_ENV !== "production" && Object.freeze([]);
46
- const ue = () => {
47
- }, Gt = Object.prototype.hasOwnProperty, Fe = (e, t) => Gt.call(e, t), Wt = (e) => typeof e == "function", ye = (e) => typeof e == "string", ft = (e) => e !== null && typeof e == "object", Jt = (e) => {
48
- const t = /* @__PURE__ */ Object.create(null);
49
- return (n) => t[n] || (t[n] = e(n));
50
- }, Xt = /-(\w)/g, Zt = Jt(
51
- (e) => e.replace(Xt, (t, n) => n ? n.toUpperCase() : "")
52
- );
53
- var qt = typeof global == "object" && global && global.Object === Object && global, Qt = typeof self == "object" && self && self.Object === Object && self, Ie = qt || Qt || Function("return this")(), X = Ie.Symbol, pt = Object.prototype, en = pt.hasOwnProperty, tn = pt.toString, Q = X ? X.toStringTag : void 0;
54
- function nn(e) {
55
- var t = en.call(e, Q), n = e[Q];
56
- try {
57
- e[Q] = void 0;
58
- var o = !0;
59
- } catch {
60
- }
61
- var r = tn.call(e);
62
- return o && (t ? e[Q] = n : delete e[Q]), r;
63
- }
64
- var on = Object.prototype, rn = on.toString;
65
- function sn(e) {
66
- return rn.call(e);
67
- }
68
- var an = "[object Null]", ln = "[object Undefined]", xe = X ? X.toStringTag : void 0;
69
- function vt(e) {
70
- return e == null ? e === void 0 ? ln : an : xe && xe in Object(e) ? nn(e) : sn(e);
71
- }
72
- function cn(e) {
73
- return e != null && typeof e == "object";
74
- }
75
- var un = "[object Symbol]";
76
- function Ne(e) {
77
- return typeof e == "symbol" || cn(e) && vt(e) == un;
78
- }
79
- function dn(e, t) {
80
- for (var n = -1, o = e == null ? 0 : e.length, r = Array(o); ++n < o; )
81
- r[n] = t(e[n], n, e);
82
- return r;
83
- }
84
- var Pe = Array.isArray, Me = X ? X.prototype : void 0, ke = Me ? Me.toString : void 0;
85
- function mt(e) {
86
- if (typeof e == "string")
87
- return e;
88
- if (Pe(e))
89
- return dn(e, mt) + "";
90
- if (Ne(e))
91
- return ke ? ke.call(e) : "";
92
- var t = e + "";
93
- return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
94
- }
95
- function yt(e) {
96
- var t = typeof e;
97
- return e != null && (t == "object" || t == "function");
98
- }
99
- var fn = "[object AsyncFunction]", pn = "[object Function]", vn = "[object GeneratorFunction]", mn = "[object Proxy]";
100
- function yn(e) {
101
- if (!yt(e))
102
- return !1;
103
- var t = vt(e);
104
- return t == pn || t == vn || t == fn || t == mn;
105
- }
106
- var _e = Ie["__core-js_shared__"], je = function() {
107
- var e = /[^.]+$/.exec(_e && _e.keys && _e.keys.IE_PROTO || "");
108
- return e ? "Symbol(src)_1." + e : "";
109
- }();
110
- function hn(e) {
111
- return !!je && je in e;
112
- }
113
- var gn = Function.prototype, bn = gn.toString;
114
- function En(e) {
115
- if (e != null) {
116
- try {
117
- return bn.call(e);
118
- } catch {
119
- }
120
- try {
121
- return e + "";
122
- } catch {
123
- }
124
- }
125
- return "";
126
- }
127
- var _n = /[\\^$.*+?()[\]{}|]/g, wn = /^\[object .+?Constructor\]$/, Cn = Function.prototype, Tn = Object.prototype, Sn = Cn.toString, On = Tn.hasOwnProperty, In = RegExp(
128
- "^" + Sn.call(On).replace(_n, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
129
- );
130
- function Nn(e) {
131
- if (!yt(e) || hn(e))
132
- return !1;
133
- var t = yn(e) ? In : wn;
134
- return t.test(En(e));
135
- }
136
- function Pn(e, t) {
137
- return e?.[t];
138
- }
139
- function ht(e, t) {
140
- var n = Pn(e, t);
141
- return Nn(n) ? n : void 0;
142
- }
143
- function $n(e, t) {
144
- return e === t || e !== e && t !== t;
145
- }
146
- var Ln = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Dn = /^\w*$/;
147
- function An(e, t) {
148
- if (Pe(e))
149
- return !1;
150
- var n = typeof e;
151
- return n == "number" || n == "symbol" || n == "boolean" || e == null || Ne(e) ? !0 : Dn.test(e) || !Ln.test(e) || t != null && e in Object(t);
152
- }
153
- var te = ht(Object, "create");
154
- function Fn() {
155
- this.__data__ = te ? te(null) : {}, this.size = 0;
156
- }
157
- function xn(e) {
158
- var t = this.has(e) && delete this.__data__[e];
159
- return this.size -= t ? 1 : 0, t;
160
- }
161
- var Mn = "__lodash_hash_undefined__", kn = Object.prototype, jn = kn.hasOwnProperty;
162
- function Rn(e) {
163
- var t = this.__data__;
164
- if (te) {
165
- var n = t[e];
166
- return n === Mn ? void 0 : n;
167
- }
168
- return jn.call(t, e) ? t[e] : void 0;
169
- }
170
- var zn = Object.prototype, Bn = zn.hasOwnProperty;
171
- function Kn(e) {
172
- var t = this.__data__;
173
- return te ? t[e] !== void 0 : Bn.call(t, e);
174
- }
175
- var Vn = "__lodash_hash_undefined__";
176
- function Un(e, t) {
177
- var n = this.__data__;
178
- return this.size += this.has(e) ? 0 : 1, n[e] = te && t === void 0 ? Vn : t, this;
179
- }
180
- function U(e) {
181
- var t = -1, n = e == null ? 0 : e.length;
182
- for (this.clear(); ++t < n; ) {
183
- var o = e[t];
184
- this.set(o[0], o[1]);
185
- }
186
- }
187
- U.prototype.clear = Fn;
188
- U.prototype.delete = xn;
189
- U.prototype.get = Rn;
190
- U.prototype.has = Kn;
191
- U.prototype.set = Un;
192
- function Hn() {
193
- this.__data__ = [], this.size = 0;
194
- }
195
- function he(e, t) {
196
- for (var n = e.length; n--; )
197
- if ($n(e[n][0], t))
198
- return n;
199
- return -1;
200
- }
201
- var Yn = Array.prototype, Gn = Yn.splice;
202
- function Wn(e) {
203
- var t = this.__data__, n = he(t, e);
204
- if (n < 0)
205
- return !1;
206
- var o = t.length - 1;
207
- return n == o ? t.pop() : Gn.call(t, n, 1), --this.size, !0;
208
- }
209
- function Jn(e) {
210
- var t = this.__data__, n = he(t, e);
211
- return n < 0 ? void 0 : t[n][1];
212
- }
213
- function Xn(e) {
214
- return he(this.__data__, e) > -1;
215
- }
216
- function Zn(e, t) {
217
- var n = this.__data__, o = he(n, e);
218
- return o < 0 ? (++this.size, n.push([e, t])) : n[o][1] = t, this;
219
- }
220
- function q(e) {
221
- var t = -1, n = e == null ? 0 : e.length;
222
- for (this.clear(); ++t < n; ) {
223
- var o = e[t];
224
- this.set(o[0], o[1]);
225
- }
226
- }
227
- q.prototype.clear = Hn;
228
- q.prototype.delete = Wn;
229
- q.prototype.get = Jn;
230
- q.prototype.has = Xn;
231
- q.prototype.set = Zn;
232
- var qn = ht(Ie, "Map");
233
- function Qn() {
234
- this.size = 0, this.__data__ = {
235
- hash: new U(),
236
- map: new (qn || q)(),
237
- string: new U()
238
- };
239
- }
240
- function eo(e) {
241
- var t = typeof e;
242
- return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
243
- }
244
- function ge(e, t) {
245
- var n = e.__data__;
246
- return eo(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
247
- }
248
- function to(e) {
249
- var t = ge(this, e).delete(e);
250
- return this.size -= t ? 1 : 0, t;
251
- }
252
- function no(e) {
253
- return ge(this, e).get(e);
254
- }
255
- function oo(e) {
256
- return ge(this, e).has(e);
257
- }
258
- function ro(e, t) {
259
- var n = ge(this, e), o = n.size;
260
- return n.set(e, t), this.size += n.size == o ? 0 : 1, this;
261
- }
262
- function H(e) {
263
- var t = -1, n = e == null ? 0 : e.length;
264
- for (this.clear(); ++t < n; ) {
265
- var o = e[t];
266
- this.set(o[0], o[1]);
267
- }
268
- }
269
- H.prototype.clear = Qn;
270
- H.prototype.delete = to;
271
- H.prototype.get = no;
272
- H.prototype.has = oo;
273
- H.prototype.set = ro;
274
- var so = "Expected a function";
275
- function $e(e, t) {
276
- if (typeof e != "function" || t != null && typeof t != "function")
277
- throw new TypeError(so);
278
- var n = function() {
279
- var o = arguments, r = t ? t.apply(this, o) : o[0], s = n.cache;
280
- if (s.has(r))
281
- return s.get(r);
282
- var u = e.apply(this, o);
283
- return n.cache = s.set(r, u) || s, u;
284
- };
285
- return n.cache = new ($e.Cache || H)(), n;
286
- }
287
- $e.Cache = H;
288
- var ao = 500;
289
- function io(e) {
290
- var t = $e(e, function(o) {
291
- return n.size === ao && n.clear(), o;
292
- }), n = t.cache;
293
- return t;
294
- }
295
- var lo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, co = /\\(\\)?/g, uo = io(function(e) {
296
- var t = [];
297
- return e.charCodeAt(0) === 46 && t.push(""), e.replace(lo, function(n, o, r, s) {
298
- t.push(r ? s.replace(co, "$1") : o || n);
299
- }), t;
300
- });
301
- function fo(e) {
302
- return e == null ? "" : mt(e);
303
- }
304
- function po(e, t) {
305
- return Pe(e) ? e : An(e, t) ? [e] : uo(fo(e));
306
- }
307
- function vo(e) {
308
- if (typeof e == "string" || Ne(e))
309
- return e;
310
- var t = e + "";
311
- return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
312
- }
313
- function mo(e, t) {
314
- t = po(t, e);
315
- for (var n = 0, o = t.length; e != null && n < o; )
316
- e = e[vo(t[n++])];
317
- return n && n == o ? e : void 0;
318
- }
319
- function yo(e, t, n) {
320
- var o = e == null ? void 0 : mo(e, t);
321
- return o === void 0 ? n : o;
322
- }
323
- function ho(e) {
324
- for (var t = -1, n = e == null ? 0 : e.length, o = {}; ++t < n; ) {
325
- var r = e[t];
326
- o[r[0]] = r[1];
327
- }
328
- return o;
329
- }
330
- function go(e) {
331
- return e == null;
332
- }
333
- const bo = (e) => e === void 0, Eo = (e) => typeof e == "boolean", gt = (e) => typeof e == "number", Re = (e) => typeof Element > "u" ? !1 : e instanceof Element, _o = (e) => ye(e) ? !Number.isNaN(Number(e)) : !1;
334
- var wo = Object.defineProperty, Co = Object.defineProperties, To = Object.getOwnPropertyDescriptors, ze = Object.getOwnPropertySymbols, So = Object.prototype.hasOwnProperty, Oo = Object.prototype.propertyIsEnumerable, Be = (e, t, n) => t in e ? wo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Io = (e, t) => {
335
- for (var n in t || (t = {}))
336
- So.call(t, n) && Be(e, n, t[n]);
337
- if (ze)
338
- for (var n of ze(t))
339
- Oo.call(t, n) && Be(e, n, t[n]);
340
- return e;
341
- }, No = (e, t) => Co(e, To(t));
342
- function Po(e, t) {
343
- var n;
344
- const o = Dt();
345
- return rt(() => {
346
- o.value = e();
347
- }, No(Io({}, t), {
348
- flush: (n = void 0) != null ? n : "sync"
349
- })), st(o);
350
- }
351
- var Ke;
352
- const x = typeof window < "u";
353
- x && ((Ke = window?.navigator) != null && Ke.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
354
- function $o(e) {
355
- return typeof e == "function" ? e() : l(e);
356
- }
357
- function Lo(e) {
358
- return At() ? (at(e), !0) : !1;
359
- }
360
- function Ve(e, t, n = {}) {
361
- const {
362
- immediate: o = !0
363
- } = n, r = _(!1);
364
- let s = null;
365
- function u() {
366
- s && (clearTimeout(s), s = null);
367
- }
368
- function m() {
369
- r.value = !1, u();
370
- }
371
- function f(...y) {
372
- u(), r.value = !0, s = setTimeout(() => {
373
- r.value = !1, s = null, e(...y);
374
- }, $o(t));
375
- }
376
- return o && (r.value = !0, x && f()), Lo(m), {
377
- isPending: st(r),
378
- start: f,
379
- stop: m
380
- };
381
- }
382
- class bt extends Error {
383
- constructor(t) {
384
- super(t), this.name = "ElementPlusError";
385
- }
386
- }
387
- function Do(e, t) {
388
- throw new bt(`[${e}] ${t}`);
389
- }
390
- function be(e, t) {
391
- if (process.env.NODE_ENV !== "production") {
392
- const n = ye(e) ? new bt(`[${e}] ${t}`) : e;
393
- console.warn(n);
394
- }
395
- }
396
- const Ue = {
397
- current: 0
398
- }, He = _(0), Ao = 2e3, Ye = Symbol("elZIndexContextKey"), Fo = Symbol("zIndexContextKey"), xo = (e) => {
399
- const t = J() ? k(Ye, Ue) : Ue, n = J() ? k(Fo, void 0) : void 0, o = C(() => {
400
- const u = l(n);
401
- return gt(u) ? u : Ao;
402
- }), r = C(() => o.value + He.value), s = () => (t.current++, He.value = t.current, r.value);
403
- return !x && !k(Ye) && be("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
404
- usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
405
- initialZIndex: o,
406
- currentZIndex: r,
407
- nextZIndex: s
408
- };
409
- };
410
- var Mo = {
411
- name: "en",
412
- el: {
413
- breadcrumb: {
414
- label: "Breadcrumb"
415
- },
416
- colorpicker: {
417
- confirm: "OK",
418
- clear: "Clear",
419
- defaultLabel: "color picker",
420
- description: "current color is {color}. press enter to select a new color.",
421
- alphaLabel: "pick alpha value"
422
- },
423
- datepicker: {
424
- now: "Now",
425
- today: "Today",
426
- cancel: "Cancel",
427
- clear: "Clear",
428
- confirm: "OK",
429
- dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
430
- monthTablePrompt: "Use the arrow keys and enter to select the month",
431
- yearTablePrompt: "Use the arrow keys and enter to select the year",
432
- selectedDate: "Selected date",
433
- selectDate: "Select date",
434
- selectTime: "Select time",
435
- startDate: "Start Date",
436
- startTime: "Start Time",
437
- endDate: "End Date",
438
- endTime: "End Time",
439
- prevYear: "Previous Year",
440
- nextYear: "Next Year",
441
- prevMonth: "Previous Month",
442
- nextMonth: "Next Month",
443
- year: "",
444
- month1: "January",
445
- month2: "February",
446
- month3: "March",
447
- month4: "April",
448
- month5: "May",
449
- month6: "June",
450
- month7: "July",
451
- month8: "August",
452
- month9: "September",
453
- month10: "October",
454
- month11: "November",
455
- month12: "December",
456
- week: "week",
457
- weeks: {
458
- sun: "Sun",
459
- mon: "Mon",
460
- tue: "Tue",
461
- wed: "Wed",
462
- thu: "Thu",
463
- fri: "Fri",
464
- sat: "Sat"
465
- },
466
- weeksFull: {
467
- sun: "Sunday",
468
- mon: "Monday",
469
- tue: "Tuesday",
470
- wed: "Wednesday",
471
- thu: "Thursday",
472
- fri: "Friday",
473
- sat: "Saturday"
474
- },
475
- months: {
476
- jan: "Jan",
477
- feb: "Feb",
478
- mar: "Mar",
479
- apr: "Apr",
480
- may: "May",
481
- jun: "Jun",
482
- jul: "Jul",
483
- aug: "Aug",
484
- sep: "Sep",
485
- oct: "Oct",
486
- nov: "Nov",
487
- dec: "Dec"
488
- }
489
- },
490
- inputNumber: {
491
- decrease: "decrease number",
492
- increase: "increase number"
493
- },
494
- select: {
495
- loading: "Loading",
496
- noMatch: "No matching data",
497
- noData: "No data",
498
- placeholder: "Select"
499
- },
500
- mention: {
501
- loading: "Loading"
502
- },
503
- dropdown: {
504
- toggleDropdown: "Toggle Dropdown"
505
- },
506
- cascader: {
507
- noMatch: "No matching data",
508
- loading: "Loading",
509
- placeholder: "Select",
510
- noData: "No data"
511
- },
512
- pagination: {
513
- goto: "Go to",
514
- pagesize: "/page",
515
- total: "Total {total}",
516
- pageClassifier: "",
517
- page: "Page",
518
- prev: "Go to previous page",
519
- next: "Go to next page",
520
- currentPage: "page {pager}",
521
- prevPages: "Previous {pager} pages",
522
- nextPages: "Next {pager} pages",
523
- deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
524
- },
525
- dialog: {
526
- close: "Close this dialog"
527
- },
528
- drawer: {
529
- close: "Close this dialog"
530
- },
531
- messagebox: {
532
- title: "Message",
533
- confirm: "OK",
534
- cancel: "Cancel",
535
- error: "Illegal input",
536
- close: "Close this dialog"
537
- },
538
- upload: {
539
- deleteTip: "press delete to remove",
540
- delete: "Delete",
541
- preview: "Preview",
542
- continue: "Continue"
543
- },
544
- slider: {
545
- defaultLabel: "slider between {min} and {max}",
546
- defaultRangeStartLabel: "pick start value",
547
- defaultRangeEndLabel: "pick end value"
548
- },
549
- table: {
550
- emptyText: "No Data",
551
- confirmFilter: "Confirm",
552
- resetFilter: "Reset",
553
- clearFilter: "All",
554
- sumText: "Sum"
555
- },
556
- tour: {
557
- next: "Next",
558
- previous: "Previous",
559
- finish: "Finish"
560
- },
561
- tree: {
562
- emptyText: "No Data"
563
- },
564
- transfer: {
565
- noMatch: "No matching data",
566
- noData: "No data",
567
- titles: ["List 1", "List 2"],
568
- filterPlaceholder: "Enter keyword",
569
- noCheckedFormat: "{total} items",
570
- hasCheckedFormat: "{checked}/{total} checked"
571
- },
572
- image: {
573
- error: "FAILED"
574
- },
575
- pageHeader: {
576
- title: "Back"
577
- },
578
- popconfirm: {
579
- confirmButtonText: "Yes",
580
- cancelButtonText: "No"
581
- },
582
- carousel: {
583
- leftArrow: "Carousel arrow left",
584
- rightArrow: "Carousel arrow right",
585
- indicator: "Carousel switch to index {index}"
586
- }
587
- }
588
- };
589
- const ko = (e) => (t, n) => jo(t, n, l(e)), jo = (e, t, n) => yo(n, e, e).replace(/\{(\w+)\}/g, (o, r) => {
590
- var s;
591
- return `${(s = t?.[r]) != null ? s : `{${r}}`}`;
592
- }), Ro = (e) => {
593
- const t = C(() => l(e).name), n = it(e) ? e : _(e);
594
- return {
595
- lang: t,
596
- locale: n,
597
- t: ko(e)
598
- };
599
- }, zo = Symbol("localeContextKey"), Bo = (e) => {
600
- const t = k(zo, _());
601
- return Ro(C(() => t.value || Mo));
602
- }, Et = "__epPropKey", Z = (e) => e, Ko = (e) => ft(e) && !!e[Et], Vo = (e, t) => {
603
- if (!ft(e) || Ko(e))
604
- return e;
605
- const { values: n, required: o, default: r, type: s, validator: u } = e, f = {
606
- type: s,
607
- required: !!o,
608
- validator: n || u ? (y) => {
609
- let h = !1, v = [];
610
- if (n && (v = Array.from(n), Fe(e, "default") && v.push(r), h || (h = v.includes(y))), u && (h || (h = u(y))), !h && v.length > 0) {
611
- const b = [...new Set(v)].map((E) => JSON.stringify(E)).join(", ");
612
- Ft(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${b}], got value ${JSON.stringify(y)}.`);
613
- }
614
- return h;
615
- } : void 0,
616
- [Et]: !0
617
- };
618
- return Fe(e, "default") && (f.default = r), f;
619
- }, oe = (e) => ho(Object.entries(e).map(([t, n]) => [
620
- t,
621
- Vo(n, t)
622
- ])), Ge = _();
623
- function Uo(e, t = void 0) {
624
- const n = J() ? k(Ut, Ge) : Ge;
625
- return e ? C(() => {
626
- var o, r;
627
- return (r = (o = n.value) == null ? void 0 : o[e]) != null ? r : t;
628
- }) : n;
629
- }
630
- const _t = "update:modelValue";
631
- var re = (e, t) => {
632
- const n = e.__vccOpts || e;
633
- for (const [o, r] of t)
634
- n[o] = r;
635
- return n;
636
- };
637
- const Ho = "utils/dom/style", wt = (e = "") => e.split(" ").filter((t) => !!t.trim()), We = (e, t) => {
638
- if (!e || !t)
639
- return !1;
640
- if (t.includes(" "))
641
- throw new Error("className should not contain space.");
642
- return e.classList.contains(t);
643
- }, Yo = (e, t) => {
644
- !e || !t.trim() || e.classList.add(...wt(t));
645
- }, Go = (e, t) => {
646
- !e || !t.trim() || e.classList.remove(...wt(t));
647
- }, Wo = (e, t) => {
648
- var n;
649
- if (!x || !e || !t)
650
- return "";
651
- let o = Zt(t);
652
- o === "float" && (o = "cssFloat");
653
- try {
654
- const r = e.style[o];
655
- if (r)
656
- return r;
657
- const s = (n = document.defaultView) == null ? void 0 : n.getComputedStyle(e, "");
658
- return s ? s[o] : "";
659
- } catch {
660
- return e.style[o];
661
- }
662
- };
663
- function pe(e, t = "px") {
664
- if (!e)
665
- return "";
666
- if (gt(e) || _o(e))
667
- return `${e}${t}`;
668
- if (ye(e))
669
- return e;
670
- be(Ho, "binding value must be a string or number");
671
- }
672
- let se;
673
- const Jo = (e) => {
674
- var t;
675
- if (!x)
676
- return 0;
677
- if (se !== void 0)
678
- return se;
679
- const n = document.createElement("div");
680
- 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);
681
- const o = n.offsetWidth;
682
- n.style.overflow = "scroll";
683
- const r = document.createElement("div");
684
- r.style.width = "100%", n.appendChild(r);
685
- const s = r.offsetWidth;
686
- return (t = n.parentNode) == null || t.removeChild(n), se = o - s, se;
687
- }, Le = (e, t) => {
688
- if (e.install = (n) => {
689
- for (const o of [e, ...Object.values(t ?? {})])
690
- n.component(o.name, o);
691
- }, t)
692
- for (const [n, o] of Object.entries(t))
693
- e[n] = o;
694
- return e;
695
- }, Gr = (e) => (e.install = ue, e), Xo = oe({
696
- size: {
697
- type: Z([Number, String])
698
- },
699
- color: {
700
- type: String
701
- }
702
- }), Zo = P({
703
- name: "ElIcon",
704
- inheritAttrs: !1
705
- }), qo = /* @__PURE__ */ P({
706
- ...Zo,
707
- props: Xo,
708
- setup(e) {
709
- const t = e, n = me("icon"), o = C(() => {
710
- const { size: r, color: s } = t;
711
- return !r && !s ? {} : {
712
- fontSize: bo(r) ? void 0 : pe(r),
713
- "--color": s
714
- };
715
- });
716
- return (r, s) => (F(), G("i", lt({
717
- class: l(n).b(),
718
- style: l(o)
719
- }, r.$attrs), [
720
- T(r.$slots, "default")
721
- ], 16));
722
- }
723
- });
724
- var Qo = /* @__PURE__ */ re(qo, [["__file", "icon.vue"]]);
725
- const er = Le(Qo);
726
- /*! Element Plus Icons Vue v2.3.1 */
727
- var tr = /* @__PURE__ */ P({
728
- name: "Close",
729
- __name: "close",
730
- setup(e) {
731
- return (t, n) => (F(), G("svg", {
732
- xmlns: "http://www.w3.org/2000/svg",
733
- viewBox: "0 0 1024 1024"
734
- }, [
735
- W("path", {
736
- fill: "currentColor",
737
- d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
738
- })
739
- ]));
740
- }
741
- }), nr = tr, or = /* @__PURE__ */ P({
742
- name: "Loading",
743
- __name: "loading",
744
- setup(e) {
745
- return (t, n) => (F(), G("svg", {
746
- xmlns: "http://www.w3.org/2000/svg",
747
- viewBox: "0 0 1024 1024"
748
- }, [
749
- W("path", {
750
- fill: "currentColor",
751
- d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"
752
- })
753
- ]));
754
- }
755
- }), Wr = or;
756
- const rr = Z([
757
- String,
758
- Object,
759
- Function
760
- ]), sr = {
761
- Close: nr
762
- }, Oe = {
763
- prefix: Math.floor(Math.random() * 1e4),
764
- current: 0
765
- }, ar = Symbol("elIdInjection"), ir = () => J() ? k(ar, Oe) : Oe, Je = (e) => {
766
- const t = ir();
767
- !x && t === Oe && be("IdInjection", `Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
768
- usage: app.provide(ID_INJECTION_KEY, {
769
- prefix: number,
770
- current: number,
771
- })`);
772
- const n = dt();
773
- return Po(() => l(e) || `${n.value}-id-${t.prefix}-${t.current++}`);
774
- }, lr = (e) => {
775
- if (e.tabIndex > 0 || e.tabIndex === 0 && e.getAttribute("tabIndex") !== null)
776
- return !0;
777
- if (e.tabIndex < 0 || e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true")
778
- return !1;
779
- switch (e.nodeName) {
780
- case "A":
781
- return !!e.href && e.rel !== "ignore";
782
- case "INPUT":
783
- return !(e.type === "hidden" || e.type === "file");
784
- case "BUTTON":
785
- case "SELECT":
786
- case "TEXTAREA":
787
- return !0;
788
- default:
789
- return !1;
790
- }
791
- }, we = "focus-trap.focus-after-trapped", Ce = "focus-trap.focus-after-released", cr = "focus-trap.focusout-prevented", Xe = {
792
- cancelable: !0,
793
- bubbles: !1
794
- }, ur = {
795
- cancelable: !0,
796
- bubbles: !1
797
- }, Ze = "focusAfterTrapped", qe = "focusAfterReleased", Ct = Symbol("elFocusTrap"), De = _(), Ee = _(0), Ae = _(0);
798
- let ae = 0;
799
- const Tt = (e) => {
800
- const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
801
- acceptNode: (o) => {
802
- const r = o.tagName === "INPUT" && o.type === "hidden";
803
- return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 || o === document.activeElement ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
804
- }
805
- });
806
- for (; n.nextNode(); )
807
- t.push(n.currentNode);
808
- return t;
809
- }, Qe = (e, t) => {
810
- for (const n of e)
811
- if (!dr(n, t))
812
- return n;
813
- }, dr = (e, t) => {
814
- if (process.env.NODE_ENV === "test")
815
- return !1;
816
- if (getComputedStyle(e).visibility === "hidden")
817
- return !0;
818
- for (; e; ) {
819
- if (t && e === t)
820
- return !1;
821
- if (getComputedStyle(e).display === "none")
822
- return !0;
823
- e = e.parentElement;
824
- }
825
- return !1;
826
- }, fr = (e) => {
827
- const t = Tt(e), n = Qe(t, e), o = Qe(t.reverse(), e);
828
- return [n, o];
829
- }, pr = (e) => e instanceof HTMLInputElement && "select" in e, B = (e, t) => {
830
- if (e && e.focus) {
831
- const n = document.activeElement;
832
- let o = !1;
833
- Re(e) && !lr(e) && !e.getAttribute("tabindex") && (e.setAttribute("tabindex", "-1"), o = !0), e.focus({ preventScroll: !0 }), Ae.value = window.performance.now(), e !== n && pr(e) && t && e.select(), Re(e) && o && e.removeAttribute("tabindex");
834
- }
835
- };
836
- function et(e, t) {
837
- const n = [...e], o = e.indexOf(t);
838
- return o !== -1 && n.splice(o, 1), n;
839
- }
840
- const vr = () => {
841
- let e = [];
842
- return {
843
- push: (o) => {
844
- const r = e[0];
845
- r && o !== r && r.pause(), e = et(e, o), e.unshift(o);
846
- },
847
- remove: (o) => {
848
- var r, s;
849
- e = et(e, o), (s = (r = e[0]) == null ? void 0 : r.resume) == null || s.call(r);
850
- }
851
- };
852
- }, mr = (e, t = !1) => {
853
- const n = document.activeElement;
854
- for (const o of e)
855
- if (B(o, t), document.activeElement !== n)
856
- return;
857
- }, tt = vr(), yr = () => Ee.value > Ae.value, ie = () => {
858
- De.value = "pointer", Ee.value = window.performance.now();
859
- }, nt = () => {
860
- De.value = "keyboard", Ee.value = window.performance.now();
861
- }, hr = () => (ne(() => {
862
- ae === 0 && (document.addEventListener("mousedown", ie), document.addEventListener("touchstart", ie), document.addEventListener("keydown", nt)), ae++;
863
- }), ve(() => {
864
- ae--, ae <= 0 && (document.removeEventListener("mousedown", ie), document.removeEventListener("touchstart", ie), document.removeEventListener("keydown", nt));
865
- }), {
866
- focusReason: De,
867
- lastUserFocusTimestamp: Ee,
868
- lastAutomatedFocusTimestamp: Ae
869
- }), le = (e) => new CustomEvent(cr, {
870
- ...ur,
871
- detail: e
872
- }), St = {
873
- tab: "Tab",
874
- esc: "Escape"
875
- };
876
- let Y = [];
877
- const ot = (e) => {
878
- e.code === St.esc && Y.forEach((t) => t(e));
879
- }, gr = (e) => {
880
- ne(() => {
881
- Y.length === 0 && document.addEventListener("keydown", ot), x && Y.push(e);
882
- }), ve(() => {
883
- Y = Y.filter((t) => t !== e), Y.length === 0 && x && document.removeEventListener("keydown", ot);
884
- });
885
- }, br = P({
886
- name: "ElFocusTrap",
887
- inheritAttrs: !1,
888
- props: {
889
- loop: Boolean,
890
- trapped: Boolean,
891
- focusTrapEl: Object,
892
- focusStartEl: {
893
- type: [Object, String],
894
- default: "first"
895
- }
896
- },
897
- emits: [
898
- Ze,
899
- qe,
900
- "focusin",
901
- "focusout",
902
- "focusout-prevented",
903
- "release-requested"
904
- ],
905
- setup(e, { emit: t }) {
906
- const n = _();
907
- let o, r;
908
- const { focusReason: s } = hr();
909
- gr((i) => {
910
- e.trapped && !u.paused && t("release-requested", i);
911
- });
912
- const u = {
913
- paused: !1,
914
- pause() {
915
- this.paused = !0;
916
- },
917
- resume() {
918
- this.paused = !1;
919
- }
920
- }, m = (i) => {
921
- if (!e.loop && !e.trapped || u.paused)
922
- return;
923
- const { code: a, altKey: d, ctrlKey: c, metaKey: g, currentTarget: S, shiftKey: $ } = i, { loop: L } = e, M = a === St.tab && !d && !c && !g, O = document.activeElement;
924
- if (M && O) {
925
- const I = S, [D, j] = fr(I);
926
- if (D && j) {
927
- if (!$ && O === j) {
928
- const N = le({
929
- focusReason: s.value
930
- });
931
- t("focusout-prevented", N), N.defaultPrevented || (i.preventDefault(), L && B(D, !0));
932
- } else if ($ && [D, I].includes(O)) {
933
- const N = le({
934
- focusReason: s.value
935
- });
936
- t("focusout-prevented", N), N.defaultPrevented || (i.preventDefault(), L && B(j, !0));
937
- }
938
- } else if (O === I) {
939
- const N = le({
940
- focusReason: s.value
941
- });
942
- t("focusout-prevented", N), N.defaultPrevented || i.preventDefault();
943
- }
944
- }
945
- };
946
- ct(Ct, {
947
- focusTrapRef: n,
948
- onKeydown: m
949
- }), K(() => e.focusTrapEl, (i) => {
950
- i && (n.value = i);
951
- }, { immediate: !0 }), K([n], ([i], [a]) => {
952
- i && (i.addEventListener("keydown", m), i.addEventListener("focusin", h), i.addEventListener("focusout", v)), a && (a.removeEventListener("keydown", m), a.removeEventListener("focusin", h), a.removeEventListener("focusout", v));
953
- });
954
- const f = (i) => {
955
- t(Ze, i);
956
- }, y = (i) => t(qe, i), h = (i) => {
957
- const a = l(n);
958
- if (!a)
959
- return;
960
- const d = i.target, c = i.relatedTarget, g = d && a.contains(d);
961
- e.trapped || c && a.contains(c) || (o = c), g && t("focusin", i), !u.paused && e.trapped && (g ? r = d : B(r, !0));
962
- }, v = (i) => {
963
- const a = l(n);
964
- if (!(u.paused || !a))
965
- if (e.trapped) {
966
- const d = i.relatedTarget;
967
- !go(d) && !a.contains(d) && setTimeout(() => {
968
- if (!u.paused && e.trapped) {
969
- const c = le({
970
- focusReason: s.value
971
- });
972
- t("focusout-prevented", c), c.defaultPrevented || B(r, !0);
973
- }
974
- }, 0);
975
- } else {
976
- const d = i.target;
977
- d && a.contains(d) || t("focusout", i);
978
- }
979
- };
980
- async function b() {
981
- await Te();
982
- const i = l(n);
983
- if (i) {
984
- tt.push(u);
985
- const a = i.contains(document.activeElement) ? o : document.activeElement;
986
- if (o = a, !i.contains(a)) {
987
- const c = new Event(we, Xe);
988
- i.addEventListener(we, f), i.dispatchEvent(c), c.defaultPrevented || Te(() => {
989
- let g = e.focusStartEl;
990
- ye(g) || (B(g), document.activeElement !== g && (g = "first")), g === "first" && mr(Tt(i), !0), (document.activeElement === a || g === "container") && B(i);
991
- });
992
- }
993
- }
994
- }
995
- function E() {
996
- const i = l(n);
997
- if (i) {
998
- i.removeEventListener(we, f);
999
- const a = new CustomEvent(Ce, {
1000
- ...Xe,
1001
- detail: {
1002
- focusReason: s.value
1003
- }
1004
- });
1005
- i.addEventListener(Ce, y), i.dispatchEvent(a), !a.defaultPrevented && (s.value == "keyboard" || !yr() || i.contains(document.activeElement)) && B(o ?? document.body), i.removeEventListener(Ce, y), tt.remove(u);
1006
- }
1007
- }
1008
- return ne(() => {
1009
- e.trapped && b(), K(() => e.trapped, (i) => {
1010
- i ? b() : E();
1011
- });
1012
- }), ve(() => {
1013
- e.trapped && E(), n.value && (n.value.removeEventListener("keydown", m), n.value.removeEventListener("focusin", h), n.value.removeEventListener("focusout", v), n.value = void 0);
1014
- }), {
1015
- onKeydown: m
1016
- };
1017
- }
1018
- });
1019
- function Er(e, t, n, o, r, s) {
1020
- return T(e.$slots, "default", { handleKeydown: e.onKeydown });
1021
- }
1022
- var _r = /* @__PURE__ */ re(br, [["render", Er], ["__file", "focus-trap.vue"]]);
1023
- const Ot = oe({
1024
- to: {
1025
- type: Z([String, Object]),
1026
- required: !0
1027
- },
1028
- disabled: Boolean
1029
- }), wr = /* @__PURE__ */ P({
1030
- __name: "teleport",
1031
- props: Ot,
1032
- setup(e) {
1033
- return (t, n) => t.disabled ? T(t.$slots, "default", { key: 0 }) : (F(), fe(xt, {
1034
- key: 1,
1035
- to: t.to
1036
- }, [
1037
- T(t.$slots, "default")
1038
- ], 8, ["to"]));
1039
- }
1040
- });
1041
- var Cr = /* @__PURE__ */ re(wr, [["__file", "teleport.vue"]]);
1042
- const Tr = Le(Cr), Sr = ({ from: e, replacement: t, scope: n, version: o, ref: r, type: s = "API" }, u) => {
1043
- K(() => l(u), (m) => {
1044
- m && be(n, `[${s}] ${e} is about to be deprecated in version ${o}, please use ${t} instead.
1045
- For more detail, please visit: ${r}
1046
- `);
1047
- }, {
1048
- immediate: !0
1049
- });
1050
- };
1051
- var de = /* @__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))(de || {});
1052
- const It = (e) => {
1053
- if (!e)
1054
- return { onClick: ue, onMousedown: ue, onMouseup: ue };
1055
- let t = !1, n = !1;
1056
- return { onClick: (u) => {
1057
- t && n && e(u), t = n = !1;
1058
- }, onMousedown: (u) => {
1059
- t = u.target === u.currentTarget;
1060
- }, onMouseup: (u) => {
1061
- n = u.target === u.currentTarget;
1062
- } };
1063
- }, Or = oe({
1064
- mask: {
1065
- type: Boolean,
1066
- default: !0
1067
- },
1068
- customMaskEvent: Boolean,
1069
- overlayClass: {
1070
- type: Z([
1071
- String,
1072
- Array,
1073
- Object
1074
- ])
1075
- },
1076
- zIndex: {
1077
- type: Z([String, Number])
1078
- }
1079
- }), Ir = {
1080
- click: (e) => e instanceof MouseEvent
1081
- }, Nr = "overlay";
1082
- var Pr = P({
1083
- name: "ElOverlay",
1084
- props: Or,
1085
- emits: Ir,
1086
- setup(e, { slots: t, emit: n }) {
1087
- const o = me(Nr), r = (f) => {
1088
- n("click", f);
1089
- }, { onClick: s, onMousedown: u, onMouseup: m } = It(e.customMaskEvent ? void 0 : r);
1090
- return () => e.mask ? ee("div", {
1091
- class: [o.b(), e.overlayClass],
1092
- style: {
1093
- zIndex: e.zIndex
1094
- },
1095
- onClick: s,
1096
- onMousedown: u,
1097
- onMouseup: m
1098
- }, [T(t, "default")], de.STYLE | de.CLASS | de.PROPS, ["onClick", "onMouseup", "onMousedown"]) : Mt("div", {
1099
- class: e.overlayClass,
1100
- style: {
1101
- zIndex: e.zIndex,
1102
- position: "fixed",
1103
- top: "0px",
1104
- right: "0px",
1105
- bottom: "0px",
1106
- left: "0px"
1107
- }
1108
- }, [T(t, "default")]);
1109
- }
1110
- });
1111
- const $r = Pr, Nt = Symbol("dialogInjectionKey"), Pt = oe({
1112
- center: Boolean,
1113
- alignCenter: Boolean,
1114
- closeIcon: {
1115
- type: rr
1116
- },
1117
- draggable: Boolean,
1118
- overflow: Boolean,
1119
- fullscreen: Boolean,
1120
- headerClass: String,
1121
- bodyClass: String,
1122
- footerClass: String,
1123
- showClose: {
1124
- type: Boolean,
1125
- default: !0
1126
- },
1127
- title: {
1128
- type: String,
1129
- default: ""
1130
- },
1131
- ariaLevel: {
1132
- type: String,
1133
- default: "2"
1134
- }
1135
- }), Lr = {
1136
- close: () => !0
1137
- }, Dr = (e, t, n, o) => {
1138
- const r = {
1139
- offsetX: 0,
1140
- offsetY: 0
1141
- }, s = (v, b) => {
1142
- if (e.value) {
1143
- const { offsetX: E, offsetY: i } = r, a = e.value.getBoundingClientRect(), d = a.left, c = a.top, g = a.width, S = a.height, $ = document.documentElement.clientWidth, L = document.documentElement.clientHeight, M = -d + E, O = -c + i, I = $ - d - g + E, D = L - c - (S < L ? S : 0) + i;
1144
- o?.value || (v = Math.min(Math.max(v, M), I), b = Math.min(Math.max(b, O), D)), r.offsetX = v, r.offsetY = b, e.value.style.transform = `translate(${pe(v)}, ${pe(b)})`;
1145
- }
1146
- }, u = (v) => {
1147
- const b = v.clientX, E = v.clientY, { offsetX: i, offsetY: a } = r, d = (g) => {
1148
- const S = i + g.clientX - b, $ = a + g.clientY - E;
1149
- s(S, $);
1150
- }, c = () => {
1151
- document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", c);
1152
- };
1153
- document.addEventListener("mousemove", d), document.addEventListener("mouseup", c);
1154
- }, m = () => {
1155
- t.value && e.value && (t.value.addEventListener("mousedown", u), window.addEventListener("resize", h));
1156
- }, f = () => {
1157
- t.value && e.value && (t.value.removeEventListener("mousedown", u), window.removeEventListener("resize", h));
1158
- }, y = () => {
1159
- r.offsetX = 0, r.offsetY = 0, e.value && (e.value.style.transform = "");
1160
- }, h = () => {
1161
- const { offsetX: v, offsetY: b } = r;
1162
- s(v, b);
1163
- };
1164
- return ne(() => {
1165
- rt(() => {
1166
- n.value ? m() : f();
1167
- });
1168
- }), ve(() => {
1169
- f();
1170
- }), {
1171
- resetPosition: y,
1172
- updatePosition: h
1173
- };
1174
- }, Ar = (...e) => (t) => {
1175
- e.forEach((n) => {
1176
- Wt(n) ? n(t) : n.value = t;
1177
- });
1178
- }, Fr = P({ name: "ElDialogContent" }), xr = /* @__PURE__ */ P({
1179
- ...Fr,
1180
- props: Pt,
1181
- emits: Lr,
1182
- setup(e, { expose: t }) {
1183
- const n = e, { t: o } = Bo(), { Close: r } = sr, { dialogRef: s, headerRef: u, bodyId: m, ns: f, style: y } = k(Nt), { focusTrapRef: h } = k(Ct), v = C(() => [
1184
- f.b(),
1185
- f.is("fullscreen", n.fullscreen),
1186
- f.is("draggable", n.draggable),
1187
- f.is("align-center", n.alignCenter),
1188
- { [f.m("center")]: n.center }
1189
- ]), b = Ar(h, s), E = C(() => n.draggable), i = C(() => n.overflow), { resetPosition: a, updatePosition: d } = Dr(s, u, E, i);
1190
- return t({
1191
- resetPosition: a,
1192
- updatePosition: d
1193
- }), (c, g) => (F(), G("div", {
1194
- ref: l(b),
1195
- class: R(l(v)),
1196
- style: ut(l(y)),
1197
- tabindex: "-1"
1198
- }, [
1199
- W("header", {
1200
- ref_key: "headerRef",
1201
- ref: u,
1202
- class: R([l(f).e("header"), c.headerClass, { "show-close": c.showClose }])
1203
- }, [
1204
- T(c.$slots, "header", {}, () => [
1205
- W("span", {
1206
- role: "heading",
1207
- "aria-level": c.ariaLevel,
1208
- class: R(l(f).e("title"))
1209
- }, kt(c.title), 11, ["aria-level"])
1210
- ]),
1211
- c.showClose ? (F(), G("button", {
1212
- key: 0,
1213
- "aria-label": l(o)("el.dialog.close"),
1214
- class: R(l(f).e("headerbtn")),
1215
- type: "button",
1216
- onClick: (S) => c.$emit("close")
1217
- }, [
1218
- ee(l(er), {
1219
- class: R(l(f).e("close"))
1220
- }, {
1221
- default: z(() => [
1222
- (F(), fe(jt(c.closeIcon || l(r))))
1223
- ]),
1224
- _: 1
1225
- }, 8, ["class"])
1226
- ], 10, ["aria-label", "onClick"])) : Se("v-if", !0)
1227
- ], 2),
1228
- W("div", {
1229
- id: l(m),
1230
- class: R([l(f).e("body"), c.bodyClass])
1231
- }, [
1232
- T(c.$slots, "default")
1233
- ], 10, ["id"]),
1234
- c.$slots.footer ? (F(), G("footer", {
1235
- key: 0,
1236
- class: R([l(f).e("footer"), c.footerClass])
1237
- }, [
1238
- T(c.$slots, "footer")
1239
- ], 2)) : Se("v-if", !0)
1240
- ], 6));
1241
- }
1242
- });
1243
- var Mr = /* @__PURE__ */ re(xr, [["__file", "dialog-content.vue"]]);
1244
- const kr = oe({
1245
- ...Pt,
1246
- appendToBody: Boolean,
1247
- appendTo: {
1248
- type: Ot.to.type,
1249
- default: "body"
1250
- },
1251
- beforeClose: {
1252
- type: Z(Function)
1253
- },
1254
- destroyOnClose: Boolean,
1255
- closeOnClickModal: {
1256
- type: Boolean,
1257
- default: !0
1258
- },
1259
- closeOnPressEscape: {
1260
- type: Boolean,
1261
- default: !0
1262
- },
1263
- lockScroll: {
1264
- type: Boolean,
1265
- default: !0
1266
- },
1267
- modal: {
1268
- type: Boolean,
1269
- default: !0
1270
- },
1271
- openDelay: {
1272
- type: Number,
1273
- default: 0
1274
- },
1275
- closeDelay: {
1276
- type: Number,
1277
- default: 0
1278
- },
1279
- top: {
1280
- type: String
1281
- },
1282
- modelValue: Boolean,
1283
- modalClass: String,
1284
- headerClass: String,
1285
- bodyClass: String,
1286
- footerClass: String,
1287
- width: {
1288
- type: [String, Number]
1289
- },
1290
- zIndex: {
1291
- type: Number
1292
- },
1293
- trapFocus: Boolean,
1294
- headerAriaLevel: {
1295
- type: String,
1296
- default: "2"
1297
- }
1298
- }), jr = {
1299
- open: () => !0,
1300
- opened: () => !0,
1301
- close: () => !0,
1302
- closed: () => !0,
1303
- [_t]: (e) => Eo(e),
1304
- openAutoFocus: () => !0,
1305
- closeAutoFocus: () => !0
1306
- }, Rr = (e, t = {}) => {
1307
- it(e) || Do("[useLockscreen]", "You need to pass a ref param to this function");
1308
- const n = t.ns || me("popup"), o = C(() => n.bm("parent", "hidden"));
1309
- if (!x || We(document.body, o.value))
1310
- return;
1311
- let r = 0, s = !1, u = "0";
1312
- const m = () => {
1313
- setTimeout(() => {
1314
- typeof document > "u" || s && document && (document.body.style.width = u, Go(document.body, o.value));
1315
- }, 200);
1316
- };
1317
- K(e, (f) => {
1318
- if (!f) {
1319
- m();
1320
- return;
1321
- }
1322
- s = !We(document.body, o.value), s && (u = document.body.style.width, Yo(document.body, o.value)), r = Jo(n.namespace.value);
1323
- const y = document.documentElement.clientHeight < document.body.scrollHeight, h = Wo(document.body, "overflowY");
1324
- r > 0 && (y || h === "scroll") && s && (document.body.style.width = `calc(100% - ${r}px)`);
1325
- }), at(() => m());
1326
- }, zr = (e, t) => {
1327
- var n;
1328
- const r = J().emit, { nextZIndex: s } = xo();
1329
- let u = "";
1330
- const m = Je(), f = Je(), y = _(!1), h = _(!1), v = _(!1), b = _((n = e.zIndex) != null ? n : s());
1331
- let E, i;
1332
- const a = Uo("namespace", ce), d = C(() => {
1333
- const w = {}, A = `--${a.value}-dialog`;
1334
- return e.fullscreen || (e.top && (w[`${A}-margin-top`] = e.top), e.width && (w[`${A}-width`] = pe(e.width))), w;
1335
- }), c = C(() => e.alignCenter ? { display: "flex" } : {});
1336
- function g() {
1337
- r("opened");
1338
- }
1339
- function S() {
1340
- r("closed"), r(_t, !1), e.destroyOnClose && (v.value = !1);
1341
- }
1342
- function $() {
1343
- r("close");
1344
- }
1345
- function L() {
1346
- i?.(), E?.(), e.openDelay && e.openDelay > 0 ? { stop: E } = Ve(() => D(), e.openDelay) : D();
1347
- }
1348
- function M() {
1349
- E?.(), i?.(), e.closeDelay && e.closeDelay > 0 ? { stop: i } = Ve(() => j(), e.closeDelay) : j();
1350
- }
1351
- function O() {
1352
- function w(A) {
1353
- A || (h.value = !0, y.value = !1);
1354
- }
1355
- e.beforeClose ? e.beforeClose(w) : M();
1356
- }
1357
- function I() {
1358
- e.closeOnClickModal && O();
1359
- }
1360
- function D() {
1361
- x && (y.value = !0);
1362
- }
1363
- function j() {
1364
- y.value = !1;
1365
- }
1366
- function p() {
1367
- r("openAutoFocus");
1368
- }
1369
- function N() {
1370
- r("closeAutoFocus");
1371
- }
1372
- function $t(w) {
1373
- var A;
1374
- ((A = w.detail) == null ? void 0 : A.focusReason) === "pointer" && w.preventDefault();
1375
- }
1376
- e.lockScroll && Rr(y);
1377
- function Lt() {
1378
- e.closeOnPressEscape && O();
1379
- }
1380
- return K(() => e.zIndex, () => {
1381
- var w;
1382
- b.value = (w = e.zIndex) != null ? w : s();
1383
- }), K(() => e.modelValue, (w) => {
1384
- var A;
1385
- w ? (h.value = !1, L(), v.value = !0, b.value = (A = e.zIndex) != null ? A : s(), Te(() => {
1386
- r("open"), t.value && (t.value.parentElement.scrollTop = 0, t.value.parentElement.scrollLeft = 0, t.value.scrollTop = 0);
1387
- })) : y.value && M();
1388
- }), K(() => e.fullscreen, (w) => {
1389
- t.value && (w ? (u = t.value.style.transform, t.value.style.transform = "") : t.value.style.transform = u);
1390
- }), ne(() => {
1391
- e.modelValue && (y.value = !0, v.value = !0, L());
1392
- }), {
1393
- afterEnter: g,
1394
- afterLeave: S,
1395
- beforeLeave: $,
1396
- handleClose: O,
1397
- onModalClick: I,
1398
- close: M,
1399
- doClose: j,
1400
- onOpenAutoFocus: p,
1401
- onCloseAutoFocus: N,
1402
- onCloseRequested: Lt,
1403
- onFocusoutPrevented: $t,
1404
- titleId: m,
1405
- bodyId: f,
1406
- closed: h,
1407
- style: d,
1408
- overlayDialogStyle: c,
1409
- rendered: v,
1410
- visible: y,
1411
- zIndex: b
1412
- };
1413
- }, Br = P({
1414
- name: "ElDialog",
1415
- inheritAttrs: !1
1416
- }), Kr = /* @__PURE__ */ P({
1417
- ...Br,
1418
- props: kr,
1419
- emits: jr,
1420
- setup(e, { expose: t }) {
1421
- const n = e, o = Rt();
1422
- Sr({
1423
- scope: "el-dialog",
1424
- from: "the title slot",
1425
- replacement: "the header slot",
1426
- version: "3.0.0",
1427
- ref: "https://element-plus.org/en-US/component/dialog.html#slots"
1428
- }, C(() => !!o.title));
1429
- const r = me("dialog"), s = _(), u = _(), m = _(), {
1430
- visible: f,
1431
- titleId: y,
1432
- bodyId: h,
1433
- style: v,
1434
- overlayDialogStyle: b,
1435
- rendered: E,
1436
- zIndex: i,
1437
- afterEnter: a,
1438
- afterLeave: d,
1439
- beforeLeave: c,
1440
- handleClose: g,
1441
- onModalClick: S,
1442
- onOpenAutoFocus: $,
1443
- onCloseAutoFocus: L,
1444
- onCloseRequested: M,
1445
- onFocusoutPrevented: O
1446
- } = zr(n, s);
1447
- ct(Nt, {
1448
- dialogRef: s,
1449
- headerRef: u,
1450
- bodyId: h,
1451
- ns: r,
1452
- rendered: E,
1453
- style: v
1454
- });
1455
- const I = It(S), D = C(() => n.draggable && !n.fullscreen);
1456
- return t({
1457
- visible: f,
1458
- dialogContentRef: m,
1459
- resetPosition: () => {
1460
- var p;
1461
- (p = m.value) == null || p.resetPosition();
1462
- },
1463
- handleClose: g
1464
- }), (p, N) => (F(), fe(l(Tr), {
1465
- to: p.appendTo,
1466
- disabled: p.appendTo !== "body" ? !1 : !p.appendToBody
1467
- }, {
1468
- default: z(() => [
1469
- ee(zt, {
1470
- name: "dialog-fade",
1471
- onAfterEnter: l(a),
1472
- onAfterLeave: l(d),
1473
- onBeforeLeave: l(c),
1474
- persisted: ""
1475
- }, {
1476
- default: z(() => [
1477
- Bt(ee(l($r), {
1478
- "custom-mask-event": "",
1479
- mask: p.modal,
1480
- "overlay-class": p.modalClass,
1481
- "z-index": l(i)
1482
- }, {
1483
- default: z(() => [
1484
- W("div", {
1485
- role: "dialog",
1486
- "aria-modal": "true",
1487
- "aria-label": p.title || void 0,
1488
- "aria-labelledby": p.title ? void 0 : l(y),
1489
- "aria-describedby": l(h),
1490
- class: R(`${l(r).namespace.value}-overlay-dialog`),
1491
- style: ut(l(b)),
1492
- onClick: l(I).onClick,
1493
- onMousedown: l(I).onMousedown,
1494
- onMouseup: l(I).onMouseup
1495
- }, [
1496
- ee(l(_r), {
1497
- loop: "",
1498
- trapped: l(f),
1499
- "focus-start-el": "container",
1500
- onFocusAfterTrapped: l($),
1501
- onFocusAfterReleased: l(L),
1502
- onFocusoutPrevented: l(O),
1503
- onReleaseRequested: l(M)
1504
- }, {
1505
- default: z(() => [
1506
- l(E) ? (F(), fe(Mr, lt({
1507
- key: 0,
1508
- ref_key: "dialogContentRef",
1509
- ref: m
1510
- }, p.$attrs, {
1511
- center: p.center,
1512
- "align-center": p.alignCenter,
1513
- "close-icon": p.closeIcon,
1514
- draggable: l(D),
1515
- overflow: p.overflow,
1516
- fullscreen: p.fullscreen,
1517
- "header-class": p.headerClass,
1518
- "body-class": p.bodyClass,
1519
- "footer-class": p.footerClass,
1520
- "show-close": p.showClose,
1521
- title: p.title,
1522
- "aria-level": p.headerAriaLevel,
1523
- onClose: l(g)
1524
- }), Kt({
1525
- header: z(() => [
1526
- p.$slots.title ? T(p.$slots, "title", { key: 1 }) : T(p.$slots, "header", {
1527
- key: 0,
1528
- close: l(g),
1529
- titleId: l(y),
1530
- titleClass: l(r).e("title")
1531
- })
1532
- ]),
1533
- default: z(() => [
1534
- T(p.$slots, "default")
1535
- ]),
1536
- _: 2
1537
- }, [
1538
- p.$slots.footer ? {
1539
- name: "footer",
1540
- fn: z(() => [
1541
- T(p.$slots, "footer")
1542
- ])
1543
- } : void 0
1544
- ]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "aria-level", "onClose"])) : Se("v-if", !0)
1545
- ]),
1546
- _: 3
1547
- }, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
1548
- ], 46, ["aria-label", "aria-labelledby", "aria-describedby", "onClick", "onMousedown", "onMouseup"])
1549
- ]),
1550
- _: 3
1551
- }, 8, ["mask", "overlay-class", "z-index"]), [
1552
- [Vt, l(f)]
1553
- ])
1554
- ]),
1555
- _: 3
1556
- }, 8, ["onAfterEnter", "onAfterLeave", "onBeforeLeave"])
1557
- ]),
1558
- _: 3
1559
- }, 8, ["to", "disabled"]));
1560
- }
1561
- });
1562
- var Vr = /* @__PURE__ */ re(Kr, [["__file", "dialog.vue"]]);
1563
- const Ur = Le(Vr), Hr = /* @__PURE__ */ Object.assign({ "./ra-button/index.vue": () => import("./index-IUnmld_H.js"), "./ra-dialog/index.vue": () => import("./index-C5WOaHn1.js") }), Jr = (e) => {
1564
- e.use(Ur), Object.values(Hr).forEach(async (t) => {
1565
- const n = await t();
1566
- e.component(n.name, n);
1567
- });
1568
- };
1569
- export {
1570
- er as E,
1571
- re as _,
1572
- Uo as a,
1573
- Vo as b,
1574
- oe as c,
1575
- Z as d,
1576
- me as e,
1577
- Gr as f,
1578
- Ur as g,
1579
- Jr as h,
1580
- rr as i,
1581
- Wr as l,
1582
- Sr as u,
1583
- Le as w
1584
- };