roui-element 1.0.0

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.
Files changed (48) hide show
  1. package/README.md +181 -0
  2. package/dist/es/favicon.ico +0 -0
  3. package/dist/es/r-element.js +1755 -0
  4. package/dist/style.css +1 -0
  5. package/dist/types/components/Button/Button.vue.d.ts +26 -0
  6. package/dist/types/components/Button/index.d.ts +3 -0
  7. package/dist/types/components/Button/types.d.ts +18 -0
  8. package/dist/types/components/Collapse/Collapse.vue.d.ts +24 -0
  9. package/dist/types/components/Collapse/CollapseItem.vue.d.ts +19 -0
  10. package/dist/types/components/Collapse/index.d.ts +5 -0
  11. package/dist/types/components/Collapse/types.d.ts +20 -0
  12. package/dist/types/components/Common/RenderVnode.d.ts +12 -0
  13. package/dist/types/components/Dropdown/Dropdown.d.ts +86 -0
  14. package/dist/types/components/Dropdown/Dropdown.vue.d.ts +191 -0
  15. package/dist/types/components/Dropdown/index.d.ts +3 -0
  16. package/dist/types/components/Dropdown/types.d.ts +20 -0
  17. package/dist/types/components/Form/Form.vue.d.ts +22 -0
  18. package/dist/types/components/Form/FormItem.vue.d.ts +28 -0
  19. package/dist/types/components/Form/index copy.d.ts +5 -0
  20. package/dist/types/components/Form/index.d.ts +5 -0
  21. package/dist/types/components/Form/types.d.ts +46 -0
  22. package/dist/types/components/Icon/Icon.vue.d.ts +3 -0
  23. package/dist/types/components/Icon/index.d.ts +3 -0
  24. package/dist/types/components/Icon/types.d.ts +32 -0
  25. package/dist/types/components/Input/Input.vue.d.ts +45 -0
  26. package/dist/types/components/Input/index.d.ts +3 -0
  27. package/dist/types/components/Input/types.d.ts +24 -0
  28. package/dist/types/components/Message/Message.vue.d.ts +30 -0
  29. package/dist/types/components/Message/index.d.ts +5 -0
  30. package/dist/types/components/Message/method.d.ts +23 -0
  31. package/dist/types/components/Message/types.d.ts +20 -0
  32. package/dist/types/components/Select/Select.vue.d.ts +191 -0
  33. package/dist/types/components/Select/index.d.ts +3 -0
  34. package/dist/types/components/Select/types.d.ts +20 -0
  35. package/dist/types/components/Switch/Switch.vue.d.ts +14 -0
  36. package/dist/types/components/Switch/index.d.ts +3 -0
  37. package/dist/types/components/Switch/types.d.ts +16 -0
  38. package/dist/types/components/Tooltip/Tooltip.vue.d.ts +38 -0
  39. package/dist/types/components/Tooltip/index.d.ts +3 -0
  40. package/dist/types/components/Tooltip/types.d.ts +16 -0
  41. package/dist/types/hooks/useClickOutSide.d.ts +3 -0
  42. package/dist/types/hooks/useEventListener.d.ts +2 -0
  43. package/dist/types/hooks/useZIndex.d.ts +6 -0
  44. package/dist/types/index.d.ts +17 -0
  45. package/dist/umd/favicon.ico +0 -0
  46. package/dist/umd/r-element.umd.cjs +577 -0
  47. package/dist/umd/style.css +1 -0
  48. package/package.json +108 -0
@@ -0,0 +1,1755 @@
1
+ import { library as Kt } from "@fortawesome/fontawesome-svg-core";
2
+ import { fas as Zt } from "@fortawesome/free-solid-svg-icons";
3
+ import { defineComponent as _, computed as A, createElementBlock as v, openBlock as g, mergeProps as Y, createVNode as E, unref as F, normalizeProps as qt, guardReactiveProps as Wt, ref as w, normalizeClass as I, createBlock as G, createCommentVNode as S, renderSlot as C, watch as z, provide as Re, inject as mt, createElementVNode as T, createTextVNode as ke, toDisplayString as J, Transition as Ve, toHandlers as _e, withCtx as L, withDirectives as ce, vShow as vt, onMounted as ee, onUnmounted as ge, reactive as N, Fragment as ue, renderList as yt, shallowReactive as Xt, h as Yt, render as Ge, isRef as Jt, onBeforeUnmount as Qt, normalizeStyle as bt, withModifiers as Fe, useAttrs as en, vModelDynamic as tn, vModelText as nn, nextTick as rn, withKeys as on } from "vue";
4
+ import { FontAwesomeIcon as an } from "@fortawesome/vue-fontawesome";
5
+ import { createPopper as sn } from "@popperjs/core";
6
+ import ln from "async-validator";
7
+ var $t = typeof global == "object" && global && global.Object === Object && global, cn = typeof self == "object" && self && self.Object === Object && self, k = $t || cn || Function("return this")(), R = k.Symbol, _t = Object.prototype, un = _t.hasOwnProperty, dn = _t.toString, re = R ? R.toStringTag : void 0;
8
+ function fn(e) {
9
+ var t = un.call(e, re), n = e[re];
10
+ try {
11
+ e[re] = void 0;
12
+ var r = !0;
13
+ } catch {
14
+ }
15
+ var o = dn.call(e);
16
+ return r && (t ? e[re] = n : delete e[re]), o;
17
+ }
18
+ var pn = Object.prototype, gn = pn.toString;
19
+ function hn(e) {
20
+ return gn.call(e);
21
+ }
22
+ var mn = "[object Null]", vn = "[object Undefined]", He = R ? R.toStringTag : void 0;
23
+ function K(e) {
24
+ return e == null ? e === void 0 ? vn : mn : He && He in Object(e) ? fn(e) : hn(e);
25
+ }
26
+ function Z(e) {
27
+ return e != null && typeof e == "object";
28
+ }
29
+ var yn = "[object Symbol]";
30
+ function Me(e) {
31
+ return typeof e == "symbol" || Z(e) && K(e) == yn;
32
+ }
33
+ function wt(e, t) {
34
+ for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; )
35
+ o[n] = t(e[n], n, e);
36
+ return o;
37
+ }
38
+ var q = Array.isArray, Ke = R ? R.prototype : void 0, Ze = Ke ? Ke.toString : void 0;
39
+ function Tt(e) {
40
+ if (typeof e == "string")
41
+ return e;
42
+ if (q(e))
43
+ return wt(e, Tt) + "";
44
+ if (Me(e))
45
+ return Ze ? Ze.call(e) : "";
46
+ var t = e + "";
47
+ return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
48
+ }
49
+ function he(e) {
50
+ var t = typeof e;
51
+ return e != null && (t == "object" || t == "function");
52
+ }
53
+ function bn(e) {
54
+ return e;
55
+ }
56
+ var $n = "[object AsyncFunction]", _n = "[object Function]", wn = "[object GeneratorFunction]", Tn = "[object Proxy]";
57
+ function jt(e) {
58
+ if (!he(e))
59
+ return !1;
60
+ var t = K(e);
61
+ return t == _n || t == wn || t == $n || t == Tn;
62
+ }
63
+ var be = k["__core-js_shared__"], qe = function() {
64
+ var e = /[^.]+$/.exec(be && be.keys && be.keys.IE_PROTO || "");
65
+ return e ? "Symbol(src)_1." + e : "";
66
+ }();
67
+ function jn(e) {
68
+ return !!qe && qe in e;
69
+ }
70
+ var xn = Function.prototype, On = xn.toString;
71
+ function W(e) {
72
+ if (e != null) {
73
+ try {
74
+ return On.call(e);
75
+ } catch {
76
+ }
77
+ try {
78
+ return e + "";
79
+ } catch {
80
+ }
81
+ }
82
+ return "";
83
+ }
84
+ var Sn = /[\\^$.*+?()[\]{}|]/g, An = /^\[object .+?Constructor\]$/, Cn = Function.prototype, In = Object.prototype, Pn = Cn.toString, Bn = In.hasOwnProperty, En = RegExp(
85
+ "^" + Pn.call(Bn).replace(Sn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
86
+ );
87
+ function Rn(e) {
88
+ if (!he(e) || jn(e))
89
+ return !1;
90
+ var t = jt(e) ? En : An;
91
+ return t.test(W(e));
92
+ }
93
+ function kn(e, t) {
94
+ return e == null ? void 0 : e[t];
95
+ }
96
+ function X(e, t) {
97
+ var n = kn(e, t);
98
+ return Rn(n) ? n : void 0;
99
+ }
100
+ var we = X(k, "WeakMap");
101
+ function Vn(e, t, n) {
102
+ switch (n.length) {
103
+ case 0:
104
+ return e.call(t);
105
+ case 1:
106
+ return e.call(t, n[0]);
107
+ case 2:
108
+ return e.call(t, n[0], n[1]);
109
+ case 3:
110
+ return e.call(t, n[0], n[1], n[2]);
111
+ }
112
+ return e.apply(t, n);
113
+ }
114
+ var Fn = 800, Mn = 16, Nn = Date.now;
115
+ function Dn(e) {
116
+ var t = 0, n = 0;
117
+ return function() {
118
+ var r = Nn(), o = Mn - (r - n);
119
+ if (n = r, o > 0) {
120
+ if (++t >= Fn)
121
+ return arguments[0];
122
+ } else
123
+ t = 0;
124
+ return e.apply(void 0, arguments);
125
+ };
126
+ }
127
+ function zn(e) {
128
+ return function() {
129
+ return e;
130
+ };
131
+ }
132
+ var de = function() {
133
+ try {
134
+ var e = X(Object, "defineProperty");
135
+ return e({}, "", {}), e;
136
+ } catch {
137
+ }
138
+ }(), Ln = de ? function(e, t) {
139
+ return de(e, "toString", {
140
+ configurable: !0,
141
+ enumerable: !1,
142
+ value: zn(t),
143
+ writable: !0
144
+ });
145
+ } : bn, Un = Dn(Ln);
146
+ function Gn(e, t) {
147
+ for (var n = -1, r = e == null ? 0 : e.length; ++n < r && t(e[n], n, e) !== !1; )
148
+ ;
149
+ return e;
150
+ }
151
+ var Hn = 9007199254740991, Kn = /^(?:0|[1-9]\d*)$/;
152
+ function Zn(e, t) {
153
+ var n = typeof e;
154
+ return t = t ?? Hn, !!t && (n == "number" || n != "symbol" && Kn.test(e)) && e > -1 && e % 1 == 0 && e < t;
155
+ }
156
+ function xt(e, t, n) {
157
+ t == "__proto__" && de ? de(e, t, {
158
+ configurable: !0,
159
+ enumerable: !0,
160
+ value: n,
161
+ writable: !0
162
+ }) : e[t] = n;
163
+ }
164
+ function Ot(e, t) {
165
+ return e === t || e !== e && t !== t;
166
+ }
167
+ var qn = Object.prototype, Wn = qn.hasOwnProperty;
168
+ function St(e, t, n) {
169
+ var r = e[t];
170
+ (!(Wn.call(e, t) && Ot(r, n)) || n === void 0 && !(t in e)) && xt(e, t, n);
171
+ }
172
+ function Xn(e, t, n, r) {
173
+ var o = !n;
174
+ n || (n = {});
175
+ for (var s = -1, a = t.length; ++s < a; ) {
176
+ var l = t[s], c = void 0;
177
+ c === void 0 && (c = e[l]), o ? xt(n, l, c) : St(n, l, c);
178
+ }
179
+ return n;
180
+ }
181
+ var We = Math.max;
182
+ function Yn(e, t, n) {
183
+ return t = We(t === void 0 ? e.length - 1 : t, 0), function() {
184
+ for (var r = arguments, o = -1, s = We(r.length - t, 0), a = Array(s); ++o < s; )
185
+ a[o] = r[t + o];
186
+ o = -1;
187
+ for (var l = Array(t + 1); ++o < t; )
188
+ l[o] = r[o];
189
+ return l[t] = n(a), Vn(e, this, l);
190
+ };
191
+ }
192
+ var Jn = 9007199254740991;
193
+ function At(e) {
194
+ return typeof e == "number" && e > -1 && e % 1 == 0 && e <= Jn;
195
+ }
196
+ function Qn(e) {
197
+ return e != null && At(e.length) && !jt(e);
198
+ }
199
+ var er = Object.prototype;
200
+ function tr(e) {
201
+ var t = e && e.constructor, n = typeof t == "function" && t.prototype || er;
202
+ return e === n;
203
+ }
204
+ function nr(e, t) {
205
+ for (var n = -1, r = Array(e); ++n < e; )
206
+ r[n] = t(n);
207
+ return r;
208
+ }
209
+ var rr = "[object Arguments]";
210
+ function Xe(e) {
211
+ return Z(e) && K(e) == rr;
212
+ }
213
+ var Ct = Object.prototype, or = Ct.hasOwnProperty, ar = Ct.propertyIsEnumerable, It = Xe(/* @__PURE__ */ function() {
214
+ return arguments;
215
+ }()) ? Xe : function(e) {
216
+ return Z(e) && or.call(e, "callee") && !ar.call(e, "callee");
217
+ };
218
+ function sr() {
219
+ return !1;
220
+ }
221
+ var Pt = typeof exports == "object" && exports && !exports.nodeType && exports, Ye = Pt && typeof module == "object" && module && !module.nodeType && module, ir = Ye && Ye.exports === Pt, Je = ir ? k.Buffer : void 0, lr = Je ? Je.isBuffer : void 0, Bt = lr || sr, cr = "[object Arguments]", ur = "[object Array]", dr = "[object Boolean]", fr = "[object Date]", pr = "[object Error]", gr = "[object Function]", hr = "[object Map]", mr = "[object Number]", vr = "[object Object]", yr = "[object RegExp]", br = "[object Set]", $r = "[object String]", _r = "[object WeakMap]", wr = "[object ArrayBuffer]", Tr = "[object DataView]", jr = "[object Float32Array]", xr = "[object Float64Array]", Or = "[object Int8Array]", Sr = "[object Int16Array]", Ar = "[object Int32Array]", Cr = "[object Uint8Array]", Ir = "[object Uint8ClampedArray]", Pr = "[object Uint16Array]", Br = "[object Uint32Array]", y = {};
222
+ y[jr] = y[xr] = y[Or] = y[Sr] = y[Ar] = y[Cr] = y[Ir] = y[Pr] = y[Br] = !0;
223
+ y[cr] = y[ur] = y[wr] = y[dr] = y[Tr] = y[fr] = y[pr] = y[gr] = y[hr] = y[mr] = y[vr] = y[yr] = y[br] = y[$r] = y[_r] = !1;
224
+ function Er(e) {
225
+ return Z(e) && At(e.length) && !!y[K(e)];
226
+ }
227
+ function Ne(e) {
228
+ return function(t) {
229
+ return e(t);
230
+ };
231
+ }
232
+ var Et = typeof exports == "object" && exports && !exports.nodeType && exports, oe = Et && typeof module == "object" && module && !module.nodeType && module, Rr = oe && oe.exports === Et, $e = Rr && $t.process, Q = function() {
233
+ try {
234
+ var e = oe && oe.require && oe.require("util").types;
235
+ return e || $e && $e.binding && $e.binding("util");
236
+ } catch {
237
+ }
238
+ }(), Qe = Q && Q.isTypedArray, kr = Qe ? Ne(Qe) : Er;
239
+ function Vr(e, t) {
240
+ var n = q(e), r = !n && It(e), o = !n && !r && Bt(e), s = !n && !r && !o && kr(e), a = n || r || o || s, l = a ? nr(e.length, String) : [], c = l.length;
241
+ for (var i in e)
242
+ a && // Safari 9 has enumerable `arguments.length` in strict mode.
243
+ (i == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
244
+ o && (i == "offset" || i == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
245
+ s && (i == "buffer" || i == "byteLength" || i == "byteOffset") || // Skip index properties.
246
+ Zn(i, c)) || l.push(i);
247
+ return l;
248
+ }
249
+ function Fr(e, t) {
250
+ return function(n) {
251
+ return e(t(n));
252
+ };
253
+ }
254
+ function Mr(e) {
255
+ var t = [];
256
+ if (e != null)
257
+ for (var n in Object(e))
258
+ t.push(n);
259
+ return t;
260
+ }
261
+ var Nr = Object.prototype, Dr = Nr.hasOwnProperty;
262
+ function zr(e) {
263
+ if (!he(e))
264
+ return Mr(e);
265
+ var t = tr(e), n = [];
266
+ for (var r in e)
267
+ r == "constructor" && (t || !Dr.call(e, r)) || n.push(r);
268
+ return n;
269
+ }
270
+ function Lr(e) {
271
+ return Qn(e) ? Vr(e) : zr(e);
272
+ }
273
+ var Ur = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Gr = /^\w*$/;
274
+ function Hr(e, t) {
275
+ if (q(e))
276
+ return !1;
277
+ var n = typeof e;
278
+ return n == "number" || n == "symbol" || n == "boolean" || e == null || Me(e) ? !0 : Gr.test(e) || !Ur.test(e) || t != null && e in Object(t);
279
+ }
280
+ var ae = X(Object, "create");
281
+ function Kr() {
282
+ this.__data__ = ae ? ae(null) : {}, this.size = 0;
283
+ }
284
+ function Zr(e) {
285
+ var t = this.has(e) && delete this.__data__[e];
286
+ return this.size -= t ? 1 : 0, t;
287
+ }
288
+ var qr = "__lodash_hash_undefined__", Wr = Object.prototype, Xr = Wr.hasOwnProperty;
289
+ function Yr(e) {
290
+ var t = this.__data__;
291
+ if (ae) {
292
+ var n = t[e];
293
+ return n === qr ? void 0 : n;
294
+ }
295
+ return Xr.call(t, e) ? t[e] : void 0;
296
+ }
297
+ var Jr = Object.prototype, Qr = Jr.hasOwnProperty;
298
+ function eo(e) {
299
+ var t = this.__data__;
300
+ return ae ? t[e] !== void 0 : Qr.call(t, e);
301
+ }
302
+ var to = "__lodash_hash_undefined__";
303
+ function no(e, t) {
304
+ var n = this.__data__;
305
+ return this.size += this.has(e) ? 0 : 1, n[e] = ae && t === void 0 ? to : t, this;
306
+ }
307
+ function H(e) {
308
+ var t = -1, n = e == null ? 0 : e.length;
309
+ for (this.clear(); ++t < n; ) {
310
+ var r = e[t];
311
+ this.set(r[0], r[1]);
312
+ }
313
+ }
314
+ H.prototype.clear = Kr;
315
+ H.prototype.delete = Zr;
316
+ H.prototype.get = Yr;
317
+ H.prototype.has = eo;
318
+ H.prototype.set = no;
319
+ function ro() {
320
+ this.__data__ = [], this.size = 0;
321
+ }
322
+ function me(e, t) {
323
+ for (var n = e.length; n--; )
324
+ if (Ot(e[n][0], t))
325
+ return n;
326
+ return -1;
327
+ }
328
+ var oo = Array.prototype, ao = oo.splice;
329
+ function so(e) {
330
+ var t = this.__data__, n = me(t, e);
331
+ if (n < 0)
332
+ return !1;
333
+ var r = t.length - 1;
334
+ return n == r ? t.pop() : ao.call(t, n, 1), --this.size, !0;
335
+ }
336
+ function io(e) {
337
+ var t = this.__data__, n = me(t, e);
338
+ return n < 0 ? void 0 : t[n][1];
339
+ }
340
+ function lo(e) {
341
+ return me(this.__data__, e) > -1;
342
+ }
343
+ function co(e, t) {
344
+ var n = this.__data__, r = me(n, e);
345
+ return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
346
+ }
347
+ function M(e) {
348
+ var t = -1, n = e == null ? 0 : e.length;
349
+ for (this.clear(); ++t < n; ) {
350
+ var r = e[t];
351
+ this.set(r[0], r[1]);
352
+ }
353
+ }
354
+ M.prototype.clear = ro;
355
+ M.prototype.delete = so;
356
+ M.prototype.get = io;
357
+ M.prototype.has = lo;
358
+ M.prototype.set = co;
359
+ var se = X(k, "Map");
360
+ function uo() {
361
+ this.size = 0, this.__data__ = {
362
+ hash: new H(),
363
+ map: new (se || M)(),
364
+ string: new H()
365
+ };
366
+ }
367
+ function fo(e) {
368
+ var t = typeof e;
369
+ return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
370
+ }
371
+ function ve(e, t) {
372
+ var n = e.__data__;
373
+ return fo(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
374
+ }
375
+ function po(e) {
376
+ var t = ve(this, e).delete(e);
377
+ return this.size -= t ? 1 : 0, t;
378
+ }
379
+ function go(e) {
380
+ return ve(this, e).get(e);
381
+ }
382
+ function ho(e) {
383
+ return ve(this, e).has(e);
384
+ }
385
+ function mo(e, t) {
386
+ var n = ve(this, e), r = n.size;
387
+ return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
388
+ }
389
+ function U(e) {
390
+ var t = -1, n = e == null ? 0 : e.length;
391
+ for (this.clear(); ++t < n; ) {
392
+ var r = e[t];
393
+ this.set(r[0], r[1]);
394
+ }
395
+ }
396
+ U.prototype.clear = uo;
397
+ U.prototype.delete = po;
398
+ U.prototype.get = go;
399
+ U.prototype.has = ho;
400
+ U.prototype.set = mo;
401
+ var vo = "Expected a function";
402
+ function De(e, t) {
403
+ if (typeof e != "function" || t != null && typeof t != "function")
404
+ throw new TypeError(vo);
405
+ var n = function() {
406
+ var r = arguments, o = t ? t.apply(this, r) : r[0], s = n.cache;
407
+ if (s.has(o))
408
+ return s.get(o);
409
+ var a = e.apply(this, r);
410
+ return n.cache = s.set(o, a) || s, a;
411
+ };
412
+ return n.cache = new (De.Cache || U)(), n;
413
+ }
414
+ De.Cache = U;
415
+ var yo = 500;
416
+ function bo(e) {
417
+ var t = De(e, function(r) {
418
+ return n.size === yo && n.clear(), r;
419
+ }), n = t.cache;
420
+ return t;
421
+ }
422
+ var $o = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, _o = /\\(\\)?/g, wo = bo(function(e) {
423
+ var t = [];
424
+ return e.charCodeAt(0) === 46 && t.push(""), e.replace($o, function(n, r, o, s) {
425
+ t.push(o ? s.replace(_o, "$1") : r || n);
426
+ }), t;
427
+ });
428
+ function To(e) {
429
+ return e == null ? "" : Tt(e);
430
+ }
431
+ function ze(e, t) {
432
+ return q(e) ? e : Hr(e, t) ? [e] : wo(To(e));
433
+ }
434
+ function Rt(e) {
435
+ if (typeof e == "string" || Me(e))
436
+ return e;
437
+ var t = e + "";
438
+ return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
439
+ }
440
+ function jo(e, t) {
441
+ t = ze(t, e);
442
+ for (var n = 0, r = t.length; e != null && n < r; )
443
+ e = e[Rt(t[n++])];
444
+ return n && n == r ? e : void 0;
445
+ }
446
+ function Le(e, t) {
447
+ for (var n = -1, r = t.length, o = e.length; ++n < r; )
448
+ e[o + n] = t[n];
449
+ return e;
450
+ }
451
+ var et = R ? R.isConcatSpreadable : void 0;
452
+ function xo(e) {
453
+ return q(e) || It(e) || !!(et && e && e[et]);
454
+ }
455
+ function Oo(e, t, n, r, o) {
456
+ var s = -1, a = e.length;
457
+ for (n || (n = xo), o || (o = []); ++s < a; ) {
458
+ var l = e[s];
459
+ n(l) ? Le(o, l) : o[o.length] = l;
460
+ }
461
+ return o;
462
+ }
463
+ function So(e) {
464
+ var t = e == null ? 0 : e.length;
465
+ return t ? Oo(e) : [];
466
+ }
467
+ function Ao(e) {
468
+ return Un(Yn(e, void 0, So), e + "");
469
+ }
470
+ var kt = Fr(Object.getPrototypeOf, Object), Co = "[object Object]", Io = Function.prototype, Po = Object.prototype, Vt = Io.toString, Bo = Po.hasOwnProperty, Eo = Vt.call(Object);
471
+ function Ro(e) {
472
+ if (!Z(e) || K(e) != Co)
473
+ return !1;
474
+ var t = kt(e);
475
+ if (t === null)
476
+ return !0;
477
+ var n = Bo.call(t, "constructor") && t.constructor;
478
+ return typeof n == "function" && n instanceof n && Vt.call(n) == Eo;
479
+ }
480
+ function ko(e, t, n) {
481
+ var r = -1, o = e.length;
482
+ t < 0 && (t = -t > o ? 0 : o + t), n = n > o ? o : n, n < 0 && (n += o), o = t > n ? 0 : n - t >>> 0, t >>>= 0;
483
+ for (var s = Array(o); ++r < o; )
484
+ s[r] = e[r + t];
485
+ return s;
486
+ }
487
+ function Vo() {
488
+ this.__data__ = new M(), this.size = 0;
489
+ }
490
+ function Fo(e) {
491
+ var t = this.__data__, n = t.delete(e);
492
+ return this.size = t.size, n;
493
+ }
494
+ function Mo(e) {
495
+ return this.__data__.get(e);
496
+ }
497
+ function No(e) {
498
+ return this.__data__.has(e);
499
+ }
500
+ var Do = 200;
501
+ function zo(e, t) {
502
+ var n = this.__data__;
503
+ if (n instanceof M) {
504
+ var r = n.__data__;
505
+ if (!se || r.length < Do - 1)
506
+ return r.push([e, t]), this.size = ++n.size, this;
507
+ n = this.__data__ = new U(r);
508
+ }
509
+ return n.set(e, t), this.size = n.size, this;
510
+ }
511
+ function te(e) {
512
+ var t = this.__data__ = new M(e);
513
+ this.size = t.size;
514
+ }
515
+ te.prototype.clear = Vo;
516
+ te.prototype.delete = Fo;
517
+ te.prototype.get = Mo;
518
+ te.prototype.has = No;
519
+ te.prototype.set = zo;
520
+ var Ft = typeof exports == "object" && exports && !exports.nodeType && exports, tt = Ft && typeof module == "object" && module && !module.nodeType && module, Lo = tt && tt.exports === Ft, nt = Lo ? k.Buffer : void 0;
521
+ nt && nt.allocUnsafe;
522
+ function Uo(e, t) {
523
+ return e.slice();
524
+ }
525
+ function Go(e, t) {
526
+ for (var n = -1, r = e == null ? 0 : e.length, o = 0, s = []; ++n < r; ) {
527
+ var a = e[n];
528
+ t(a, n, e) && (s[o++] = a);
529
+ }
530
+ return s;
531
+ }
532
+ function Mt() {
533
+ return [];
534
+ }
535
+ var Ho = Object.prototype, Ko = Ho.propertyIsEnumerable, rt = Object.getOwnPropertySymbols, Zo = rt ? function(e) {
536
+ return e == null ? [] : (e = Object(e), Go(rt(e), function(t) {
537
+ return Ko.call(e, t);
538
+ }));
539
+ } : Mt, qo = Object.getOwnPropertySymbols, Wo = qo ? function(e) {
540
+ for (var t = []; e; )
541
+ Le(t, Zo(e)), e = kt(e);
542
+ return t;
543
+ } : Mt;
544
+ function Xo(e, t, n) {
545
+ var r = t(e);
546
+ return q(e) ? r : Le(r, n(e));
547
+ }
548
+ function Nt(e) {
549
+ return Xo(e, Lr, Wo);
550
+ }
551
+ var Te = X(k, "DataView"), je = X(k, "Promise"), xe = X(k, "Set"), ot = "[object Map]", Yo = "[object Object]", at = "[object Promise]", st = "[object Set]", it = "[object WeakMap]", lt = "[object DataView]", Jo = W(Te), Qo = W(se), ea = W(je), ta = W(xe), na = W(we), V = K;
552
+ (Te && V(new Te(new ArrayBuffer(1))) != lt || se && V(new se()) != ot || je && V(je.resolve()) != at || xe && V(new xe()) != st || we && V(new we()) != it) && (V = function(e) {
553
+ var t = K(e), n = t == Yo ? e.constructor : void 0, r = n ? W(n) : "";
554
+ if (r)
555
+ switch (r) {
556
+ case Jo:
557
+ return lt;
558
+ case Qo:
559
+ return ot;
560
+ case ea:
561
+ return at;
562
+ case ta:
563
+ return st;
564
+ case na:
565
+ return it;
566
+ }
567
+ return t;
568
+ });
569
+ var ra = Object.prototype, oa = ra.hasOwnProperty;
570
+ function aa(e) {
571
+ var t = e.length, n = new e.constructor(t);
572
+ return t && typeof e[0] == "string" && oa.call(e, "index") && (n.index = e.index, n.input = e.input), n;
573
+ }
574
+ var ct = k.Uint8Array;
575
+ function Ue(e) {
576
+ var t = new e.constructor(e.byteLength);
577
+ return new ct(t).set(new ct(e)), t;
578
+ }
579
+ function sa(e, t) {
580
+ var n = Ue(e.buffer);
581
+ return new e.constructor(n, e.byteOffset, e.byteLength);
582
+ }
583
+ var ia = /\w*$/;
584
+ function la(e) {
585
+ var t = new e.constructor(e.source, ia.exec(e));
586
+ return t.lastIndex = e.lastIndex, t;
587
+ }
588
+ var ut = R ? R.prototype : void 0, dt = ut ? ut.valueOf : void 0;
589
+ function ca(e) {
590
+ return dt ? Object(dt.call(e)) : {};
591
+ }
592
+ function ua(e, t) {
593
+ var n = Ue(e.buffer);
594
+ return new e.constructor(n, e.byteOffset, e.length);
595
+ }
596
+ var da = "[object Boolean]", fa = "[object Date]", pa = "[object Map]", ga = "[object Number]", ha = "[object RegExp]", ma = "[object Set]", va = "[object String]", ya = "[object Symbol]", ba = "[object ArrayBuffer]", $a = "[object DataView]", _a = "[object Float32Array]", wa = "[object Float64Array]", Ta = "[object Int8Array]", ja = "[object Int16Array]", xa = "[object Int32Array]", Oa = "[object Uint8Array]", Sa = "[object Uint8ClampedArray]", Aa = "[object Uint16Array]", Ca = "[object Uint32Array]";
597
+ function Ia(e, t, n) {
598
+ var r = e.constructor;
599
+ switch (t) {
600
+ case ba:
601
+ return Ue(e);
602
+ case da:
603
+ case fa:
604
+ return new r(+e);
605
+ case $a:
606
+ return sa(e);
607
+ case _a:
608
+ case wa:
609
+ case Ta:
610
+ case ja:
611
+ case xa:
612
+ case Oa:
613
+ case Sa:
614
+ case Aa:
615
+ case Ca:
616
+ return ua(e);
617
+ case pa:
618
+ return new r();
619
+ case ga:
620
+ case va:
621
+ return new r(e);
622
+ case ha:
623
+ return la(e);
624
+ case ma:
625
+ return new r();
626
+ case ya:
627
+ return ca(e);
628
+ }
629
+ }
630
+ var Pa = "[object Map]";
631
+ function Ba(e) {
632
+ return Z(e) && V(e) == Pa;
633
+ }
634
+ var ft = Q && Q.isMap, Ea = ft ? Ne(ft) : Ba, Ra = "[object Set]";
635
+ function ka(e) {
636
+ return Z(e) && V(e) == Ra;
637
+ }
638
+ var pt = Q && Q.isSet, Va = pt ? Ne(pt) : ka, Dt = "[object Arguments]", Fa = "[object Array]", Ma = "[object Boolean]", Na = "[object Date]", Da = "[object Error]", zt = "[object Function]", za = "[object GeneratorFunction]", La = "[object Map]", Ua = "[object Number]", Lt = "[object Object]", Ga = "[object RegExp]", Ha = "[object Set]", Ka = "[object String]", Za = "[object Symbol]", qa = "[object WeakMap]", Wa = "[object ArrayBuffer]", Xa = "[object DataView]", Ya = "[object Float32Array]", Ja = "[object Float64Array]", Qa = "[object Int8Array]", es = "[object Int16Array]", ts = "[object Int32Array]", ns = "[object Uint8Array]", rs = "[object Uint8ClampedArray]", os = "[object Uint16Array]", as = "[object Uint32Array]", m = {};
639
+ m[Dt] = m[Fa] = m[Wa] = m[Xa] = m[Ma] = m[Na] = m[Ya] = m[Ja] = m[Qa] = m[es] = m[ts] = m[La] = m[Ua] = m[Lt] = m[Ga] = m[Ha] = m[Ka] = m[Za] = m[ns] = m[rs] = m[os] = m[as] = !0;
640
+ m[Da] = m[zt] = m[qa] = !1;
641
+ function le(e, t, n, r, o, s) {
642
+ var a;
643
+ if (n && (a = o ? n(e, r, o, s) : n(e)), a !== void 0)
644
+ return a;
645
+ if (!he(e))
646
+ return e;
647
+ var l = q(e);
648
+ if (l)
649
+ a = aa(e);
650
+ else {
651
+ var c = V(e), i = c == zt || c == za;
652
+ if (Bt(e))
653
+ return Uo(e);
654
+ if (c == Lt || c == Dt || i && !o)
655
+ a = {};
656
+ else {
657
+ if (!m[c])
658
+ return o ? e : {};
659
+ a = Ia(e, c);
660
+ }
661
+ }
662
+ s || (s = new te());
663
+ var u = s.get(e);
664
+ if (u)
665
+ return u;
666
+ s.set(e, a), Va(e) ? e.forEach(function(b) {
667
+ a.add(le(b, t, n, b, e, s));
668
+ }) : Ea(e) && e.forEach(function(b, d) {
669
+ a.set(d, le(b, t, n, d, e, s));
670
+ });
671
+ var p = Nt, j = l ? void 0 : p(e);
672
+ return Gn(j || e, function(b, d) {
673
+ j && (d = b, b = e[d]), St(a, d, le(b, t, n, d, e, s));
674
+ }), a;
675
+ }
676
+ function ss(e) {
677
+ var t = e == null ? 0 : e.length;
678
+ return t ? e[t - 1] : void 0;
679
+ }
680
+ function is(e, t) {
681
+ return t.length < 2 ? e : jo(e, ko(t, 0, -1));
682
+ }
683
+ function gt(e) {
684
+ return e == null;
685
+ }
686
+ var ls = Object.prototype, cs = ls.hasOwnProperty;
687
+ function us(e, t) {
688
+ t = ze(t, e);
689
+ var n = -1, r = t.length;
690
+ if (!r)
691
+ return !0;
692
+ for (var o = e == null || typeof e != "object" && typeof e != "function"; ++n < r; ) {
693
+ var s = t[n];
694
+ if (typeof s == "string") {
695
+ if (s === "__proto__" && !cs.call(e, "__proto__"))
696
+ return !1;
697
+ if (s === "constructor" && n + 1 < r && typeof t[n + 1] == "string" && t[n + 1] === "prototype") {
698
+ if (o && n === 0)
699
+ continue;
700
+ return !1;
701
+ }
702
+ }
703
+ }
704
+ var a = is(e, t);
705
+ return a == null || delete a[Rt(ss(t))];
706
+ }
707
+ function ds(e) {
708
+ return Ro(e) ? void 0 : e;
709
+ }
710
+ var fs = 1, ps = 2, gs = 4, hs = Ao(function(e, t) {
711
+ var n = {};
712
+ if (e == null)
713
+ return n;
714
+ var r = !1;
715
+ t = wt(t, function(s) {
716
+ return s = ze(s, e), r || (r = s.length > 1), s;
717
+ }), Xn(e, Nt(e), n), r && (n = le(n, fs | ps | gs, ds));
718
+ for (var o = t.length; o--; )
719
+ us(n, t[o]);
720
+ return n;
721
+ });
722
+ const ms = _({
723
+ name: "RoIcon",
724
+ inheritAttrs: !1
725
+ }), P = /* @__PURE__ */ _({
726
+ ...ms,
727
+ props: {
728
+ border: { type: Boolean },
729
+ fixedWidth: { type: Boolean },
730
+ flip: { type: [String, Boolean] },
731
+ icon: null,
732
+ mask: null,
733
+ maskId: null,
734
+ listItem: { type: Boolean },
735
+ pull: null,
736
+ pulse: { type: Boolean },
737
+ rotation: null,
738
+ rotateBy: { type: Boolean },
739
+ swapOpacity: { type: Boolean },
740
+ size: null,
741
+ spin: { type: Boolean },
742
+ transform: null,
743
+ symbol: { type: [Boolean, String] },
744
+ title: null,
745
+ titleId: null,
746
+ inverse: { type: Boolean },
747
+ bounce: { type: Boolean },
748
+ shake: { type: Boolean },
749
+ beat: { type: Boolean },
750
+ fade: { type: Boolean },
751
+ beatFade: { type: Boolean },
752
+ spinPulse: { type: Boolean },
753
+ spinReverse: { type: Boolean },
754
+ widthAuto: { type: Boolean },
755
+ type: null,
756
+ color: null
757
+ },
758
+ setup(e) {
759
+ const t = e, n = A(() => hs(t, ["type", "color"])), r = A(() => t.color ? { color: t.color } : {});
760
+ return (o, s) => (g(), v("i", Y({ class: "ro-icon" }, o.$attrs, {
761
+ style: r.value,
762
+ class: { [`ro-icon--${e.type}`]: e.type }
763
+ }), [
764
+ E(F(an), qt(Wt(n.value)), null, 16)
765
+ ], 16));
766
+ }
767
+ }), vs = ["disabled", "type", "autofocus"], ys = _({
768
+ name: "RoButton"
769
+ }), Oe = /* @__PURE__ */ _({
770
+ ...ys,
771
+ props: {
772
+ type: null,
773
+ size: null,
774
+ plain: { type: Boolean },
775
+ disabled: { type: Boolean },
776
+ round: { type: Boolean },
777
+ circle: { type: Boolean },
778
+ nativeType: { default: "button" },
779
+ autofocus: { type: Boolean },
780
+ icon: null,
781
+ loading: { type: Boolean }
782
+ },
783
+ setup(e, { expose: t }) {
784
+ const n = w();
785
+ return t({
786
+ ref: n
787
+ }), (r, o) => (g(), v("button", {
788
+ ref_key: "_ref",
789
+ ref: n,
790
+ class: I(["ro-button", {
791
+ [`ro-button--${e.type}`]: e.type,
792
+ [`ro-button--${e.size}`]: e.size,
793
+ "is-plain": e.plain,
794
+ "is-disabled": e.disabled,
795
+ "is-round": e.round,
796
+ "is-circle": e.circle,
797
+ "is-loading": e.loading
798
+ }]),
799
+ disabled: e.disabled || e.loading,
800
+ type: e.nativeType,
801
+ autofocus: e.autofocus
802
+ }, [
803
+ e.loading ? (g(), G(P, {
804
+ key: 0,
805
+ icon: "spinner",
806
+ spin: ""
807
+ })) : S("", !0),
808
+ e.icon ? (g(), G(P, {
809
+ key: 1,
810
+ icon: e.icon
811
+ }, null, 8, ["icon"])) : S("", !0),
812
+ C(r.$slots, "default")
813
+ ], 10, vs));
814
+ }
815
+ });
816
+ Oe.install = (e) => {
817
+ e.component("RoButton", Oe);
818
+ };
819
+ const Ut = Symbol("collapseContext"), bs = { class: "ro-collapse" }, $s = _({
820
+ name: "RoCollapse"
821
+ }), Se = /* @__PURE__ */ _({
822
+ ...$s,
823
+ props: {
824
+ modelValue: null,
825
+ accordion: { type: Boolean }
826
+ },
827
+ emits: ["update:modelValue", "change"],
828
+ setup(e, { emit: t }) {
829
+ const n = e, r = t, o = w(n.modelValue || []);
830
+ return z(
831
+ () => n.modelValue,
832
+ (a) => {
833
+ o.value = a || [];
834
+ }
835
+ ), n.accordion && o.value.length > 1 && console.warn("accordion mode only support one item open at a time"), Re(Ut, {
836
+ activeNames: o,
837
+ handleItemClick: (a) => {
838
+ if (n.accordion)
839
+ o.value = [o.value[0] === a ? "" : a];
840
+ else {
841
+ const l = o.value.indexOf(a);
842
+ l > -1 ? o.value.splice(l, 1) : o.value.push(a), r("update:modelValue", o.value), r("change", o.value);
843
+ }
844
+ }
845
+ }), (a, l) => (g(), v("div", bs, [
846
+ C(a.$slots, "default")
847
+ ]));
848
+ }
849
+ }), _s = ["id"], ws = { class: "ro-collapse-item__wrapper" }, Ts = ["id"], js = _({
850
+ name: "RoCollapseItem"
851
+ }), Ae = /* @__PURE__ */ _({
852
+ ...js,
853
+ props: {
854
+ name: null,
855
+ title: null,
856
+ disabled: { type: Boolean }
857
+ },
858
+ setup(e) {
859
+ const t = e, n = mt(Ut), r = A(() => n == null ? void 0 : n.activeNames.value.includes(t.name)), o = () => {
860
+ t.disabled || n == null || n.handleItemClick(t.name);
861
+ }, s = {
862
+ beforeEnter: (a) => {
863
+ a.style.height = "0px";
864
+ },
865
+ enter(a) {
866
+ a.style.overflow = "hidden", a.style.height = `${a.scrollHeight}px`;
867
+ },
868
+ afterEnter(a) {
869
+ a.style.height = "", a.style.overflow = "";
870
+ },
871
+ beforeLeave: (a) => {
872
+ a.style.height = `${a.scrollHeight}px`;
873
+ },
874
+ leave(a) {
875
+ a.style.height = "0px", a.style.overflow = "hidden";
876
+ },
877
+ afterLeave(a) {
878
+ a.style.height = "", a.style.overflow = "";
879
+ }
880
+ };
881
+ return (a, l) => (g(), v("div", {
882
+ class: I(["ro-collapse-item", { "is-disabled": e.disabled }])
883
+ }, [
884
+ T("div", {
885
+ class: I(["ro-collapse-item__header", { "is-disabled": e.disabled, "is-active": r.value }]),
886
+ id: `item-header-${e.name}`,
887
+ onClick: o
888
+ }, [
889
+ C(a.$slots, "title", {}, () => [
890
+ ke(J(e.title), 1)
891
+ ]),
892
+ E(P, {
893
+ icon: "arrow-right",
894
+ class: I(["header-angle", { "header-angle--rotate": r.value }])
895
+ }, null, 8, ["class"])
896
+ ], 10, _s),
897
+ E(Ve, Y(_e(s), { name: "slide" }), {
898
+ default: L(() => [
899
+ ce(T("div", ws, [
900
+ T("div", {
901
+ class: "ro-collapse-item__content",
902
+ id: `item-content-${e.name}`
903
+ }, [
904
+ C(a.$slots, "default")
905
+ ], 8, Ts)
906
+ ], 512), [
907
+ [vt, r.value]
908
+ ])
909
+ ]),
910
+ _: 3
911
+ }, 16)
912
+ ], 2));
913
+ }
914
+ });
915
+ Se.install = (e) => {
916
+ e.component("RoCollapse", Se);
917
+ };
918
+ Ae.install = (e) => {
919
+ e.component("RoCollapseItem", Ae);
920
+ };
921
+ const xs = (e, t) => {
922
+ const n = (r) => {
923
+ e.value && r.target && e.value && (e.value.contains(r.target) || t(r));
924
+ };
925
+ ee(() => {
926
+ document.addEventListener("click", n);
927
+ }), ge(() => {
928
+ document.removeEventListener("click", n);
929
+ });
930
+ }, Os = _({
931
+ name: "RoTooltip"
932
+ }), ie = /* @__PURE__ */ _({
933
+ ...Os,
934
+ props: {
935
+ content: null,
936
+ trigger: { default: "hover" },
937
+ placement: { default: "bottom" },
938
+ manual: { type: Boolean },
939
+ popperOptions: null,
940
+ transition: { default: "fade" }
941
+ },
942
+ emits: ["visible-change"],
943
+ setup(e, { expose: t, emit: n }) {
944
+ const r = w(!1), o = w(), s = w(), a = w(), l = e, c = n;
945
+ xs(a, () => {
946
+ l.trigger === "click" && r.value && !l.manual && d();
947
+ });
948
+ let i = null, u = N({}), p = N({});
949
+ const j = A(() => ({
950
+ placement: l.placement,
951
+ modifiers: [
952
+ {
953
+ name: "computeStyles",
954
+ options: {
955
+ gpuAcceleration: !1,
956
+ // 禁用 GPU 加速,使用 top/left 定位
957
+ adaptive: !1
958
+ // 禁用自适应
959
+ }
960
+ }
961
+ ],
962
+ ...l.popperOptions
963
+ })), b = () => {
964
+ r.value = !0, c("visible-change", !0);
965
+ }, d = () => {
966
+ r.value = !1, c("visible-change", !1);
967
+ }, x = () => {
968
+ r.value = !r.value, c("visible-change", r.value);
969
+ }, f = () => {
970
+ l.trigger === "hover" ? (u.mouseenter = b, p.mouseleave = d) : l.trigger === "click" && (u.click = x);
971
+ };
972
+ l.manual || f(), z(
973
+ () => l.manual,
974
+ (h) => {
975
+ h ? (u = N({}), p = N({})) : f();
976
+ }
977
+ ), z(
978
+ () => l.trigger,
979
+ (h, B) => {
980
+ h !== B && (u = N({}), p = N({}), f());
981
+ }
982
+ ), z(
983
+ r,
984
+ (h) => {
985
+ h && s.value && o.value && (i = sn(s.value, o.value, j.value));
986
+ },
987
+ { flush: "post" }
988
+ );
989
+ const O = () => {
990
+ i == null || i.destroy(), i = null;
991
+ };
992
+ return ge(() => {
993
+ i == null || i.destroy();
994
+ }), t({
995
+ show: b,
996
+ hide: d
997
+ }), (h, B) => (g(), v("div", Y({ class: "ro-tooltip" }, _e(F(p), !0), {
998
+ ref_key: "popperContainerNode",
999
+ ref: a
1000
+ }), [
1001
+ T("div", Y({
1002
+ class: "ro-tooltip__trigger",
1003
+ ref_key: "triggerNode",
1004
+ ref: s
1005
+ }, _e(F(u), !0)), [
1006
+ C(h.$slots, "default")
1007
+ ], 16),
1008
+ E(Ve, {
1009
+ name: e.transition,
1010
+ onAfterLeave: O
1011
+ }, {
1012
+ default: L(() => [
1013
+ r.value ? (g(), v("div", {
1014
+ key: 0,
1015
+ class: "ro-tooltip__content",
1016
+ ref_key: "popperNode",
1017
+ ref: o
1018
+ }, [
1019
+ C(h.$slots, "content", {}, () => [
1020
+ ke(J(e.content), 1)
1021
+ ])
1022
+ ], 512)) : S("", !0)
1023
+ ]),
1024
+ _: 3
1025
+ }, 8, ["name"])
1026
+ ], 16));
1027
+ }
1028
+ }), Gt = _({
1029
+ props: {
1030
+ vNode: {
1031
+ type: [String, Object],
1032
+ required: !0
1033
+ }
1034
+ },
1035
+ setup(e) {
1036
+ return () => e.vNode;
1037
+ }
1038
+ }), Ss = { class: "ro-dropdown" }, As = { class: "ro-dropdown__menu" }, Cs = {
1039
+ key: 0,
1040
+ role: "separator",
1041
+ class: "divided-placeholder"
1042
+ }, Is = ["onClick", "id"], Ps = _({
1043
+ name: "RoDropdown"
1044
+ }), Ce = /* @__PURE__ */ _({
1045
+ ...Ps,
1046
+ props: {
1047
+ content: null,
1048
+ trigger: null,
1049
+ placement: null,
1050
+ manual: { type: Boolean },
1051
+ popperOptions: null,
1052
+ transition: null,
1053
+ menuOptions: null,
1054
+ hideAfterClick: { type: Boolean, default: !0 }
1055
+ },
1056
+ emits: ["visible-change", "select"],
1057
+ setup(e, { expose: t, emit: n }) {
1058
+ const r = e, o = n, s = w(null), a = (c) => {
1059
+ o("visible-change", c);
1060
+ }, l = (c) => {
1061
+ var i;
1062
+ c.disabled || (o("select", c), r.hideAfterClick && ((i = s.value) == null || i.hide()));
1063
+ };
1064
+ return t({
1065
+ show: () => {
1066
+ var c;
1067
+ return (c = s.value) == null ? void 0 : c.show();
1068
+ },
1069
+ hide: () => {
1070
+ var c;
1071
+ return (c = s.value) == null ? void 0 : c.hide();
1072
+ }
1073
+ }), (c, i) => (g(), v("div", Ss, [
1074
+ E(ie, {
1075
+ trigger: e.trigger,
1076
+ placement: e.placement,
1077
+ "popper-options": e.popperOptions,
1078
+ manual: e.manual,
1079
+ onVisibleChange: a,
1080
+ ref_key: "tooltipRef",
1081
+ ref: s
1082
+ }, {
1083
+ content: L(() => [
1084
+ T("ul", As, [
1085
+ (g(!0), v(ue, null, yt(e.menuOptions, (u) => (g(), v(ue, {
1086
+ key: u.key
1087
+ }, [
1088
+ u.divided ? (g(), v("li", Cs)) : S("", !0),
1089
+ T("li", {
1090
+ class: I(["ro-dropdown__item", { "is-disabled": u.disabled, "is-divided": u.divided }]),
1091
+ onClick: (p) => l(u),
1092
+ id: `dropdown-item-${u.key}`
1093
+ }, [
1094
+ E(F(Gt), {
1095
+ vNode: u.label
1096
+ }, null, 8, ["vNode"])
1097
+ ], 10, Is)
1098
+ ], 64))), 128))
1099
+ ])
1100
+ ]),
1101
+ default: L(() => [
1102
+ C(c.$slots, "default")
1103
+ ]),
1104
+ _: 3
1105
+ }, 8, ["trigger", "placement", "popper-options", "manual"])
1106
+ ]));
1107
+ }
1108
+ });
1109
+ Ce.install = (e) => {
1110
+ e.component("RoDropdown", Ce);
1111
+ };
1112
+ const Ht = Symbol("formContextKey"), Bs = Symbol("formItemContextKey"), Es = { class: "ro-form" }, Rs = _({
1113
+ name: "RoForm"
1114
+ }), Ie = /* @__PURE__ */ _({
1115
+ ...Rs,
1116
+ props: {
1117
+ model: null,
1118
+ rules: null
1119
+ },
1120
+ setup(e, { expose: t }) {
1121
+ const n = e, r = [], o = (i) => {
1122
+ r.push(i);
1123
+ }, s = (i) => {
1124
+ i.prop && r.splice(r.indexOf(i), 1);
1125
+ }, a = (i = []) => {
1126
+ (i.length > 0 ? r.filter((p) => i.includes(p.prop)) : r).forEach((p) => p.resetField());
1127
+ }, l = (i = []) => {
1128
+ (i.length > 0 ? r.filter((p) => i.includes(p.prop)) : r).forEach((p) => p.clearValidate());
1129
+ }, c = async () => {
1130
+ let i = {};
1131
+ for (const u of r)
1132
+ try {
1133
+ await u.validate("");
1134
+ } catch (p) {
1135
+ i = {
1136
+ ...i,
1137
+ ...p.fields
1138
+ };
1139
+ }
1140
+ return Object.keys(i).length === 0 ? !0 : Promise.reject(i);
1141
+ };
1142
+ return Re(Ht, {
1143
+ ...n,
1144
+ addField: o,
1145
+ removeField: s
1146
+ }), t({
1147
+ validate: c,
1148
+ resetFields: a,
1149
+ clearValidate: l
1150
+ }), (i, u) => (g(), v("form", Es, [
1151
+ C(i.$slots, "default")
1152
+ ]));
1153
+ }
1154
+ }), ks = { class: "ro-form-item__label" }, Vs = { class: "ro-form-item__content" }, Fs = {
1155
+ key: 0,
1156
+ class: "ro-form-item__error-msg"
1157
+ }, Ms = _({
1158
+ name: "RoFormItem"
1159
+ }), Pe = /* @__PURE__ */ _({
1160
+ ...Ms,
1161
+ props: {
1162
+ label: null,
1163
+ prop: null
1164
+ },
1165
+ setup(e, { expose: t }) {
1166
+ const n = e, r = mt(Ht), o = N({
1167
+ state: "init",
1168
+ errorMsg: "",
1169
+ loading: !1
1170
+ });
1171
+ let s = null;
1172
+ const a = A(() => {
1173
+ const d = r == null ? void 0 : r.model;
1174
+ return d && n.prop && !gt(d[n.prop]) ? d[n.prop] : null;
1175
+ }), l = A(() => {
1176
+ const d = r == null ? void 0 : r.rules;
1177
+ return d && n.prop && d[n.prop] ? d[n.prop] : [];
1178
+ }), c = (d) => {
1179
+ const x = l.value;
1180
+ return x ? x.filter((f) => !f.trigger || !d ? !0 : f.trigger && f.trigger === d) : [];
1181
+ }, i = A(() => l.value ? l.value.some((d) => d.required) : !1), u = async (d) => {
1182
+ const x = n.prop, f = c(d);
1183
+ if (f.length === 0)
1184
+ return !0;
1185
+ if (x) {
1186
+ const O = new ln({
1187
+ [x]: f
1188
+ });
1189
+ return o.loading = !0, O.validate({ [x]: a.value }).then(() => {
1190
+ o.state = "success";
1191
+ }).catch((h) => {
1192
+ var $;
1193
+ const { errors: B } = h;
1194
+ return o.state = "error", o.errorMsg = B && B.length > 0 && (($ = B[0]) == null ? void 0 : $.message) || "", console.log(h.errors), Promise.reject(h);
1195
+ }).finally(() => {
1196
+ o.loading = !1;
1197
+ });
1198
+ }
1199
+ }, p = () => {
1200
+ o.state = "init", o.errorMsg = "", o.loading = !1;
1201
+ }, j = () => {
1202
+ p();
1203
+ const d = r == null ? void 0 : r.model;
1204
+ d && n.prop && !gt(d[n.prop]) && (d[n.prop] = s);
1205
+ }, b = {
1206
+ validate: u,
1207
+ prop: n.prop || "",
1208
+ clearValidate: p,
1209
+ resetField: j
1210
+ };
1211
+ return Re(Bs, b), ee(() => {
1212
+ n.prop && (r == null || r.addField(b), s = a.value);
1213
+ }), ge(() => {
1214
+ r == null || r.removeField(b);
1215
+ }), t({
1216
+ validateStatus: o,
1217
+ validate: u,
1218
+ resetField: j,
1219
+ clearValidate: p
1220
+ }), (d, x) => (g(), v("div", {
1221
+ class: I(["ro-form-item", {
1222
+ "is-error": o.state === "error",
1223
+ "is-success": o.state === "success",
1224
+ "is-loading": o.loading,
1225
+ "is-required": i.value
1226
+ }])
1227
+ }, [
1228
+ T("label", ks, [
1229
+ C(d.$slots, "label", { label: e.label }, () => [
1230
+ ke(J(e.label), 1)
1231
+ ])
1232
+ ]),
1233
+ T("div", Vs, [
1234
+ C(d.$slots, "default", { validate: u }),
1235
+ o.state === "error" ? (g(), v("div", Fs, J(o.errorMsg), 1)) : S("", !0)
1236
+ ])
1237
+ ], 2));
1238
+ }
1239
+ });
1240
+ Ie.install = (e) => {
1241
+ e.component("RoForm", Ie);
1242
+ };
1243
+ Pe.install = (e) => {
1244
+ e.component("RoFormItem", Pe);
1245
+ };
1246
+ P.install = (e) => {
1247
+ e.component("RoIcon", P);
1248
+ };
1249
+ const ht = w(0), Ns = (e = 2e3) => {
1250
+ const t = w(e), n = A(() => ht.value + t.value);
1251
+ return {
1252
+ currentZIndex: n,
1253
+ nextZIndex: () => (ht.value++, n.value),
1254
+ initialZIndex: t
1255
+ };
1256
+ };
1257
+ let Ds = 1;
1258
+ const D = Xt([]), gi = (e) => {
1259
+ const { nextZIndex: t } = Ns(), n = `message_${Ds++}`, r = document.createElement("div"), o = () => {
1260
+ const u = D.findIndex((p) => p.id === n);
1261
+ u !== -1 && (D.splice(u, 1), Ge(null, r));
1262
+ }, s = () => {
1263
+ const u = D.find((p) => p.id === n);
1264
+ u && (u.vm.exposed.visible.value = !1);
1265
+ }, a = {
1266
+ ...e,
1267
+ id: n,
1268
+ zIndex: t(),
1269
+ onDestory: o
1270
+ }, l = Yt(fe, a);
1271
+ Ge(l, r), document.body.appendChild(r.firstElementChild);
1272
+ const c = l.component, i = {
1273
+ id: n,
1274
+ vnode: l,
1275
+ vm: c,
1276
+ props: a,
1277
+ destory: s
1278
+ };
1279
+ return D.push(i), i;
1280
+ }, zs = (e) => {
1281
+ const t = D.findIndex((n) => n.id === e);
1282
+ if (console.log("idx", e, t, D.length), t <= 0)
1283
+ return 0;
1284
+ {
1285
+ const n = D[t - 1];
1286
+ return n == null ? void 0 : n.vm.exposed.bottomOffset.value;
1287
+ }
1288
+ }, hi = () => {
1289
+ D.forEach((e) => {
1290
+ e.destory();
1291
+ });
1292
+ };
1293
+ function Ls(e, t, n) {
1294
+ Jt(e) ? z(e, (r, o) => {
1295
+ o == null || o.removeEventListener(t, n), r == null || r.addEventListener(t, n);
1296
+ }) : ee(() => {
1297
+ e.addEventListener(t, n);
1298
+ }), Qt(() => {
1299
+ var r;
1300
+ (r = F(e)) == null || r.removeEventListener(t, n);
1301
+ });
1302
+ }
1303
+ const Us = { class: "ro-message__content" }, Gs = {
1304
+ key: 0,
1305
+ class: "ro-message__close"
1306
+ }, fe = /* @__PURE__ */ _({
1307
+ __name: "Message",
1308
+ props: {
1309
+ message: null,
1310
+ duration: { default: 3e3 },
1311
+ showClose: { type: Boolean },
1312
+ type: { default: "info" },
1313
+ onDestory: { type: Function },
1314
+ id: null,
1315
+ zIndex: null,
1316
+ offset: { default: 20 },
1317
+ transitionName: { default: "fade-up" }
1318
+ },
1319
+ setup(e, { expose: t }) {
1320
+ const n = e, r = w(!1), o = w(), s = w(0), a = A(() => zs(n.id)), l = A(() => n.offset + a.value), c = A(() => s.value + l.value), i = A(() => ({
1321
+ top: l.value + "px",
1322
+ zIndex: n.zIndex
1323
+ }));
1324
+ let u;
1325
+ function p() {
1326
+ n.duration !== 0 && (u = setTimeout(() => {
1327
+ r.value = !1;
1328
+ }, n.duration));
1329
+ }
1330
+ function j() {
1331
+ clearTimeout(u);
1332
+ }
1333
+ ee(async () => {
1334
+ r.value = !0, p();
1335
+ });
1336
+ function b(f) {
1337
+ f.code === "Escape" && (r.value = !1);
1338
+ }
1339
+ Ls(document, "keydown", b);
1340
+ function d() {
1341
+ n.onDestory();
1342
+ }
1343
+ function x() {
1344
+ s.value = o.value.getBoundingClientRect().height;
1345
+ }
1346
+ return t({
1347
+ bottomOffset: c,
1348
+ visible: r
1349
+ }), (f, O) => (g(), G(Ve, {
1350
+ name: e.transitionName,
1351
+ onAfterLeave: d,
1352
+ onEnter: x
1353
+ }, {
1354
+ default: L(() => [
1355
+ ce(T("div", {
1356
+ class: I(["ro-message", {
1357
+ [`ro-message--${e.type}`]: e.type,
1358
+ "is-close": e.showClose
1359
+ }]),
1360
+ role: "alert",
1361
+ ref_key: "messageRef",
1362
+ ref: o,
1363
+ style: bt(i.value),
1364
+ onMouseenter: j,
1365
+ onMouseleave: p
1366
+ }, [
1367
+ T("div", Us, [
1368
+ C(f.$slots, "default", {}, () => [
1369
+ e.message ? (g(), G(F(Gt), {
1370
+ key: 0,
1371
+ vNode: e.message
1372
+ }, null, 8, ["vNode"])) : S("", !0)
1373
+ ])
1374
+ ]),
1375
+ e.showClose ? (g(), v("div", Gs, [
1376
+ E(P, {
1377
+ onClick: O[0] || (O[0] = Fe((h) => r.value = !1, ["stop"])),
1378
+ icon: "xmark"
1379
+ })
1380
+ ])) : S("", !0)
1381
+ ], 38), [
1382
+ [vt, r.value]
1383
+ ])
1384
+ ]),
1385
+ _: 3
1386
+ }, 8, ["name"]));
1387
+ }
1388
+ });
1389
+ fe.install = (e) => {
1390
+ e.component("RoMessage", fe);
1391
+ };
1392
+ const Hs = {
1393
+ key: 0,
1394
+ class: "ro-input__prepend"
1395
+ }, Ks = { class: "ro-input__wrapper" }, Zs = {
1396
+ key: 0,
1397
+ class: "ro-input__prefix"
1398
+ }, qs = ["type", "disabled", "readonly", "autocomplete", "placeholder", "autofocus", "form"], Ws = {
1399
+ key: 1,
1400
+ class: "ro-input__append"
1401
+ }, Xs = ["disabled", "readonly", "autocomplete", "placeholder", "autofocus", "form"], Ys = _({
1402
+ name: "RoInput",
1403
+ inheritAttrs: !1
1404
+ }), pe = /* @__PURE__ */ _({
1405
+ ...Ys,
1406
+ props: {
1407
+ type: { default: "text" },
1408
+ modelValue: null,
1409
+ size: null,
1410
+ disabled: { type: Boolean },
1411
+ clearable: { type: Boolean },
1412
+ showPassword: { type: Boolean },
1413
+ placeholder: null,
1414
+ readonly: { type: Boolean },
1415
+ autocomplete: { default: "off" },
1416
+ autofocus: { type: Boolean },
1417
+ form: null
1418
+ },
1419
+ emits: ["update:modelValue", "input", "change", "focus", "blur", "clear"],
1420
+ setup(e, { expose: t, emit: n }) {
1421
+ const r = e, o = n, s = en(), a = w(r.modelValue), l = w(!1), c = w(!1), i = w(), u = A(
1422
+ () => r.clearable && !r.disabled && !!a.value && l.value
1423
+ ), p = A(() => r.showPassword && !r.disabled && !!a.value), j = () => {
1424
+ c.value = !c.value;
1425
+ }, b = () => {
1426
+ }, d = async () => {
1427
+ await rn(), i.value.focus();
1428
+ }, x = () => {
1429
+ o("update:modelValue", a.value), o("input", a.value);
1430
+ }, f = () => {
1431
+ o("change", a.value);
1432
+ }, O = ($) => {
1433
+ l.value = !0, o("focus", $);
1434
+ }, h = ($) => {
1435
+ console.log("blur triggered"), l.value = !1, o("blur", $);
1436
+ }, B = () => {
1437
+ console.log("clear triggered"), a.value = "", o("update:modelValue", ""), o("clear"), o("input", ""), o("change", "");
1438
+ };
1439
+ return z(
1440
+ () => r.modelValue,
1441
+ ($) => {
1442
+ a.value = $;
1443
+ }
1444
+ ), t({
1445
+ ref: i
1446
+ }), ($, ne) => (g(), v("div", {
1447
+ class: I(["ro-input", {
1448
+ [`ro-input--${e.type}`]: e.type,
1449
+ [`ro-input--${e.size}`]: e.size,
1450
+ "is-disabled": e.disabled,
1451
+ "is-prepend": $.$slots.prepend,
1452
+ "is-append": $.$slots.append,
1453
+ "is-prefix": $.$slots.prefix,
1454
+ "is-suffix": $.$slots.suffix,
1455
+ "is-focus": l.value
1456
+ }]),
1457
+ style: bt(F(s).style)
1458
+ }, [
1459
+ e.type !== "textarea" ? (g(), v(ue, { key: 0 }, [
1460
+ $.$slots.prepend ? (g(), v("div", Hs, [
1461
+ C($.$slots, "prepend")
1462
+ ])) : S("", !0),
1463
+ T("div", Ks, [
1464
+ $.$slots.prefix ? (g(), v("span", Zs, [
1465
+ C($.$slots, "prefix")
1466
+ ])) : S("", !0),
1467
+ ce(T("input", Y({
1468
+ class: "ro-input__inner",
1469
+ type: e.showPassword ? c.value ? "text" : "password" : e.type,
1470
+ ref_key: "inputRef",
1471
+ ref: i
1472
+ }, F(s), {
1473
+ disabled: e.disabled,
1474
+ readonly: e.readonly,
1475
+ autocomplete: e.autocomplete,
1476
+ placeholder: e.placeholder,
1477
+ autofocus: e.autofocus,
1478
+ form: e.form,
1479
+ "onUpdate:modelValue": ne[0] || (ne[0] = (ye) => a.value = ye),
1480
+ onInput: x,
1481
+ onChange: f,
1482
+ onFocus: O,
1483
+ onBlur: h
1484
+ }), null, 16, qs), [
1485
+ [tn, a.value]
1486
+ ]),
1487
+ $.$slots.suffix || u.value || p.value ? (g(), v("span", {
1488
+ key: 1,
1489
+ class: "ro-input__suffix",
1490
+ onClick: d
1491
+ }, [
1492
+ C($.$slots, "suffix"),
1493
+ u.value ? (g(), G(P, {
1494
+ key: 0,
1495
+ icon: "circle-xmark",
1496
+ class: "ro-input__clear",
1497
+ onClick: B,
1498
+ onMousedown: Fe(b, ["prevent"])
1499
+ })) : S("", !0),
1500
+ p.value && c.value ? (g(), G(P, {
1501
+ key: 1,
1502
+ icon: "eye",
1503
+ class: "ro-input__password",
1504
+ onClick: j
1505
+ })) : S("", !0),
1506
+ p.value && !c.value ? (g(), G(P, {
1507
+ key: 2,
1508
+ icon: "eye-slash",
1509
+ class: "ro-input__password",
1510
+ onClick: j
1511
+ })) : S("", !0)
1512
+ ])) : S("", !0)
1513
+ ]),
1514
+ $.$slots.append ? (g(), v("div", Ws, [
1515
+ C($.$slots, "append")
1516
+ ])) : S("", !0)
1517
+ ], 64)) : ce((g(), v("textarea", Y({
1518
+ key: 1,
1519
+ class: "ro-textarea__wrapper"
1520
+ }, F(s), {
1521
+ ref_key: "inputRef",
1522
+ ref: i,
1523
+ disabled: e.disabled,
1524
+ readonly: e.readonly,
1525
+ autocomplete: e.autocomplete,
1526
+ placeholder: e.placeholder,
1527
+ autofocus: e.autofocus,
1528
+ form: e.form,
1529
+ "onUpdate:modelValue": ne[1] || (ne[1] = (ye) => a.value = ye),
1530
+ onInput: x,
1531
+ onChange: f,
1532
+ onFocus: O,
1533
+ onBlur: h
1534
+ }), null, 16, Xs)), [
1535
+ [nn, a.value]
1536
+ ])
1537
+ ], 6));
1538
+ }
1539
+ });
1540
+ pe.install = (e) => {
1541
+ e.component("RoInput", pe);
1542
+ };
1543
+ const Js = { class: "ro-select__menu" }, Qs = ["id", "onClick"], ei = _({
1544
+ name: "RoSelect"
1545
+ }), Be = /* @__PURE__ */ _({
1546
+ ...ei,
1547
+ props: {
1548
+ modelValue: null,
1549
+ options: null,
1550
+ placeholder: null,
1551
+ disabled: { type: Boolean }
1552
+ },
1553
+ emits: ["change", "update:modelValue", "visible-change"],
1554
+ setup(e, { emit: t }) {
1555
+ const n = (f) => {
1556
+ if (!r.options) return null;
1557
+ const O = r.options.find((h) => h.value === f);
1558
+ return O || null;
1559
+ }, r = e, o = t, s = n(r.modelValue), a = w(), l = w(), c = w(), i = N({
1560
+ inputValue: s ? s.label : "",
1561
+ selectedOption: s
1562
+ }), u = w(!1), p = {
1563
+ modifiers: [
1564
+ {
1565
+ name: "offset",
1566
+ options: {
1567
+ offset: [0, 9]
1568
+ }
1569
+ },
1570
+ {
1571
+ name: "sameWidth",
1572
+ enabled: !0,
1573
+ fn: ({ state: f }) => {
1574
+ f.styles.popper.width = `${f.rects.reference.width}px`;
1575
+ },
1576
+ phase: "beforeWrite",
1577
+ requires: ["computeStyles"]
1578
+ }
1579
+ ]
1580
+ }, j = (f) => {
1581
+ u.value && c.value && f.target && (c.value.contains(f.target) || b(!1));
1582
+ }, b = (f) => {
1583
+ f ? a.value.show() : a.value.hide(), u.value = f, o("visible-change", f);
1584
+ }, d = () => {
1585
+ r.disabled || (u.value ? b(!1) : b(!0));
1586
+ }, x = (f) => {
1587
+ f.disabled || (i.inputValue = f.label, i.selectedOption = f, o("change", f.value), o("update:modelValue", f.value), b(!1), l.value.ref.focus());
1588
+ };
1589
+ return ee(() => {
1590
+ document.addEventListener("click", j);
1591
+ }), ge(() => {
1592
+ document.removeEventListener("click", j);
1593
+ }), (f, O) => (g(), v("div", {
1594
+ class: I(["ro-select", { "is-disabled": e.disabled }]),
1595
+ onClick: d,
1596
+ ref_key: "selectContainerRef",
1597
+ ref: c
1598
+ }, [
1599
+ E(ie, {
1600
+ placement: "bottom-start",
1601
+ ref_key: "tooltipRef",
1602
+ ref: a,
1603
+ popperOptions: p,
1604
+ manual: ""
1605
+ }, {
1606
+ content: L(() => [
1607
+ T("ul", Js, [
1608
+ (g(!0), v(ue, null, yt(e.options, (h, B) => {
1609
+ var $;
1610
+ return g(), v("li", {
1611
+ key: B,
1612
+ class: I(["ro-select__menu-item", {
1613
+ "is-disabled": h.disabled,
1614
+ "is-selected": (($ = i.selectedOption) == null ? void 0 : $.value) === h.value
1615
+ }]),
1616
+ id: `select-item-${h.value}`,
1617
+ onClick: Fe((ne) => x(h), ["stop"])
1618
+ }, J(h.label), 11, Qs);
1619
+ }), 128))
1620
+ ])
1621
+ ]),
1622
+ default: L(() => [
1623
+ E(pe, {
1624
+ modelValue: i.inputValue,
1625
+ "onUpdate:modelValue": O[0] || (O[0] = (h) => i.inputValue = h),
1626
+ disabled: e.disabled,
1627
+ placeholder: e.placeholder,
1628
+ ref_key: "inputRef",
1629
+ ref: l,
1630
+ readonly: ""
1631
+ }, {
1632
+ suffix: L(() => [
1633
+ E(P, {
1634
+ icon: "angle-down",
1635
+ class: I(["header-angle", { "is-active": u.value }])
1636
+ }, null, 8, ["class"])
1637
+ ]),
1638
+ _: 1
1639
+ }, 8, ["modelValue", "disabled", "placeholder"])
1640
+ ]),
1641
+ _: 1
1642
+ }, 512)
1643
+ ], 2));
1644
+ }
1645
+ });
1646
+ Be.install = (e) => {
1647
+ e.component("RoSelect", Be);
1648
+ };
1649
+ const ti = ["name", "disabled"], ni = { class: "ro-switch__core" }, ri = { class: "ro-switch__core-inner" }, oi = {
1650
+ key: 0,
1651
+ class: "ro-switch__core-inner-text"
1652
+ }, ai = _({
1653
+ name: "RoSwitch",
1654
+ inheritAttrs: !1
1655
+ }), Ee = /* @__PURE__ */ _({
1656
+ ...ai,
1657
+ props: {
1658
+ modelValue: { type: [Boolean, String, Number] },
1659
+ disabled: { type: Boolean },
1660
+ activeText: null,
1661
+ inactiveText: null,
1662
+ activeValue: { type: [Boolean, String, Number], default: !0 },
1663
+ inactiveValue: { type: [Boolean, String, Number], default: !1 },
1664
+ name: null,
1665
+ id: null,
1666
+ size: null
1667
+ },
1668
+ emits: ["update:modelValue", "change"],
1669
+ setup(e, { emit: t }) {
1670
+ const n = e, r = t, o = w(n.modelValue), s = w(), a = A(() => o.value === n.activeValue), l = () => {
1671
+ if (n.disabled) return;
1672
+ const c = a.value ? n.inactiveValue : n.activeValue;
1673
+ o.value = c, r("update:modelValue", c), r("change", c);
1674
+ };
1675
+ return ee(() => {
1676
+ s.value.checked = a.value;
1677
+ }), z(a, (c) => {
1678
+ s.value.checked = c;
1679
+ }), z(
1680
+ () => n.modelValue,
1681
+ (c) => {
1682
+ o.value = c;
1683
+ }
1684
+ ), (c, i) => (g(), v("div", {
1685
+ class: I(["ro-switch", {
1686
+ [`ro-switch--${e.size}`]: e.size,
1687
+ "is-disabled": e.disabled,
1688
+ "is-checked": a.value
1689
+ }]),
1690
+ onClick: l
1691
+ }, [
1692
+ T("input", {
1693
+ class: "ro-switch__input",
1694
+ type: "checkbox",
1695
+ role: "switch",
1696
+ ref_key: "input",
1697
+ ref: s,
1698
+ name: e.name,
1699
+ disabled: e.disabled,
1700
+ onKeydown: on(l, ["enter"])
1701
+ }, null, 40, ti),
1702
+ T("div", ni, [
1703
+ T("div", ri, [
1704
+ e.activeText || e.inactiveText ? (g(), v("span", oi, J(a.value ? e.activeText : e.inactiveText), 1)) : S("", !0)
1705
+ ]),
1706
+ i[0] || (i[0] = T("div", { class: "ro-switch__core-action" }, null, -1))
1707
+ ])
1708
+ ], 2));
1709
+ }
1710
+ });
1711
+ Ee.install = (e) => {
1712
+ e.component("RoSwitch", Ee);
1713
+ };
1714
+ ie.install = (e) => {
1715
+ e.component("RoTooltip", ie);
1716
+ };
1717
+ Kt.add(Zt);
1718
+ const si = [
1719
+ Oe,
1720
+ Se,
1721
+ Ae,
1722
+ Ce,
1723
+ Ie,
1724
+ Pe,
1725
+ P,
1726
+ fe,
1727
+ pe,
1728
+ Be,
1729
+ Ee,
1730
+ ie
1731
+ ], ii = (e) => {
1732
+ si.forEach((t) => {
1733
+ e.component(t.name, t);
1734
+ });
1735
+ }, mi = {
1736
+ install: ii
1737
+ };
1738
+ export {
1739
+ Se as Collapse,
1740
+ Ae as CollapseItem,
1741
+ Ce as Dropdown,
1742
+ Ie as Form,
1743
+ Pe as FormItem,
1744
+ P as Icon,
1745
+ pe as Input,
1746
+ fe as Message,
1747
+ Oe as RoButton,
1748
+ Be as Select,
1749
+ Ee as Switch,
1750
+ ie as Tooltip,
1751
+ hi as closeMessageAll,
1752
+ gi as createMessage,
1753
+ mi as default,
1754
+ ii as install
1755
+ };