@vaebe/ccui 2.0.0-beta.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.
- package/LICENSE +201 -0
- package/README.md +31 -0
- package/affix/ccui-cli.css +2 -0
- package/affix/index.es.js +132 -0
- package/affix/index.umd.js +1 -0
- package/alert/ccui-cli.css +2 -0
- package/alert/index.es.js +127 -0
- package/alert/index.umd.js +1 -0
- package/anchor/ccui-cli.css +2 -0
- package/anchor/index.es.js +160 -0
- package/anchor/index.umd.js +1 -0
- package/avatar/ccui-cli.css +2 -0
- package/avatar/index.es.js +235 -0
- package/avatar/index.umd.js +1 -0
- package/badge/ccui-cli.css +2 -0
- package/badge/index.es.js +146 -0
- package/badge/index.umd.js +1 -0
- package/breadcrumb/ccui-cli.css +2 -0
- package/breadcrumb/index.es.js +89 -0
- package/breadcrumb/index.umd.js +1 -0
- package/button/ccui-cli.css +2 -0
- package/button/index.es.js +1236 -0
- package/button/index.umd.js +1 -0
- package/button-3d/ccui-cli.css +2 -0
- package/button-3d/index.es.js +80 -0
- package/button-3d/index.umd.js +1 -0
- package/calendar/ccui-cli.css +2 -0
- package/calendar/index.es.js +450 -0
- package/calendar/index.umd.js +1 -0
- package/card/ccui-cli.css +2 -0
- package/card/index.es.js +78 -0
- package/card/index.umd.js +1 -0
- package/ccui-cli.css +2 -0
- package/check-box/ccui-cli.css +2 -0
- package/check-box/index.es.js +173 -0
- package/check-box/index.umd.js +1 -0
- package/collapse/ccui-cli.css +2 -0
- package/collapse/index.es.js +176 -0
- package/collapse/index.umd.js +1 -0
- package/config-provider/index.es.js +204 -0
- package/config-provider/index.umd.js +1 -0
- package/date-picker/ccui-cli.css +2 -0
- package/date-picker/index.es.js +2447 -0
- package/date-picker/index.umd.js +1 -0
- package/descriptions/ccui-cli.css +2 -0
- package/descriptions/index.es.js +175 -0
- package/descriptions/index.umd.js +1 -0
- package/divider/ccui-cli.css +2 -0
- package/divider/index.es.js +78 -0
- package/divider/index.umd.js +1 -0
- package/drawer/ccui-cli.css +2 -0
- package/drawer/index.es.js +1320 -0
- package/drawer/index.umd.js +1 -0
- package/dropdown/ccui-cli.css +2 -0
- package/dropdown/index.es.js +606 -0
- package/dropdown/index.umd.js +1 -0
- package/empty/ccui-cli.css +2 -0
- package/empty/index.es.js +173 -0
- package/empty/index.umd.js +1 -0
- package/flex/ccui-cli.css +2 -0
- package/flex/index.es.js +87 -0
- package/flex/index.umd.js +1 -0
- package/float-button/ccui-cli.css +2 -0
- package/float-button/index.es.js +169 -0
- package/float-button/index.umd.js +1 -0
- package/form/ccui-cli.css +2 -0
- package/form/index.es.js +752 -0
- package/form/index.umd.js +1 -0
- package/grid/ccui-cli.css +2 -0
- package/grid/index.es.js +207 -0
- package/grid/index.umd.js +1 -0
- package/icon/ccui-cli.css +2 -0
- package/icon/index.es.js +1228 -0
- package/icon/index.umd.js +1 -0
- package/image/ccui-cli.css +2 -0
- package/image/index.es.js +276 -0
- package/image/index.umd.js +1 -0
- package/index.d.ts +7 -0
- package/input/ccui-cli.css +2 -0
- package/input/index.es.js +1293 -0
- package/input/index.umd.js +1 -0
- package/input-number/ccui-cli.css +2 -0
- package/input-number/index.es.js +263 -0
- package/input-number/index.umd.js +1 -0
- package/layout/ccui-cli.css +2 -0
- package/layout/index.es.js +184 -0
- package/layout/index.umd.js +1 -0
- package/masonry/ccui-cli.css +2 -0
- package/masonry/index.es.js +119 -0
- package/masonry/index.umd.js +1 -0
- package/menu/ccui-cli.css +2 -0
- package/menu/index.es.js +385 -0
- package/menu/index.umd.js +1 -0
- package/message/ccui-cli.css +2 -0
- package/message/index.es.js +351 -0
- package/message/index.umd.js +1 -0
- package/modal/ccui-cli.css +2 -0
- package/modal/index.es.js +1553 -0
- package/modal/index.umd.js +1 -0
- package/notification/ccui-cli.css +2 -0
- package/notification/index.es.js +347 -0
- package/notification/index.umd.js +1 -0
- package/nuxt/components/category.js +2 -0
- package/nuxt/components/install.js +2 -0
- package/nuxt/components/status.js +2 -0
- package/nuxt/components/title.js +2 -0
- package/nuxt/index.js +13 -0
- package/package.json +53 -0
- package/pagination/ccui-cli.css +2 -0
- package/pagination/index.es.js +296 -0
- package/pagination/index.umd.js +1 -0
- package/popconfirm/ccui-cli.css +2 -0
- package/popconfirm/index.es.js +735 -0
- package/popconfirm/index.umd.js +1 -0
- package/popover/ccui-cli.css +2 -0
- package/popover/index.es.js +530 -0
- package/popover/index.umd.js +1 -0
- package/progress/ccui-cli.css +2 -0
- package/progress/index.es.js +167 -0
- package/progress/index.umd.js +1 -0
- package/radio/ccui-cli.css +2 -0
- package/radio/index.es.js +157 -0
- package/radio/index.umd.js +1 -0
- package/rate/ccui-cli.css +2 -0
- package/rate/index.es.js +115 -0
- package/rate/index.umd.js +1 -0
- package/result/ccui-cli.css +2 -0
- package/result/index.es.js +90 -0
- package/result/index.umd.js +1 -0
- package/segmented/ccui-cli.css +2 -0
- package/segmented/index.es.js +99 -0
- package/segmented/index.umd.js +1 -0
- package/select/ccui-cli.css +2 -0
- package/select/index.es.js +1885 -0
- package/select/index.umd.js +1 -0
- package/skeleton/ccui-cli.css +2 -0
- package/skeleton/index.es.js +117 -0
- package/skeleton/index.umd.js +1 -0
- package/slider/ccui-cli.css +2 -0
- package/slider/index.es.js +1071 -0
- package/slider/index.umd.js +1 -0
- package/space/ccui-cli.css +2 -0
- package/space/index.es.js +108 -0
- package/space/index.umd.js +1 -0
- package/spin/ccui-cli.css +2 -0
- package/spin/index.es.js +86 -0
- package/spin/index.umd.js +1 -0
- package/splitter/ccui-cli.css +2 -0
- package/splitter/index.es.js +198 -0
- package/splitter/index.umd.js +1 -0
- package/status/ccui-cli.css +2 -0
- package/status/index.es.js +44 -0
- package/status/index.umd.js +1 -0
- package/steps/ccui-cli.css +2 -0
- package/steps/index.es.js +118 -0
- package/steps/index.umd.js +1 -0
- package/switch/ccui-cli.css +2 -0
- package/switch/index.es.js +118 -0
- package/switch/index.umd.js +1 -0
- package/table/ccui-cli.css +2 -0
- package/table/index.es.js +553 -0
- package/table/index.umd.js +1 -0
- package/tabs/ccui-cli.css +2 -0
- package/tabs/index.es.js +128 -0
- package/tabs/index.umd.js +1 -0
- package/tag/ccui-cli.css +2 -0
- package/tag/index.es.js +116 -0
- package/tag/index.umd.js +1 -0
- package/theme/darkTheme.css +352 -0
- package/theme/theme.scss +703 -0
- package/timeline/ccui-cli.css +2 -0
- package/timeline/index.es.js +113 -0
- package/timeline/index.umd.js +1 -0
- package/tooltip/ccui-cli.css +2 -0
- package/tooltip/index.es.js +423 -0
- package/tooltip/index.umd.js +1 -0
- package/tree/ccui-cli.css +2 -0
- package/tree/index.es.js +810 -0
- package/tree/index.umd.js +1 -0
- package/typography/ccui-cli.css +2 -0
- package/typography/index.es.js +270 -0
- package/typography/index.umd.js +1 -0
- package/util/index.es.js +78 -0
- package/util/index.umd.js +1 -0
- package/vue-ccui.es.js +18989 -0
- package/vue-ccui.umd.js +1 -0
- package/watermark/ccui-cli.css +2 -0
- package/watermark/index.es.js +179 -0
- package/watermark/index.umd.js +1 -0
|
@@ -0,0 +1,1885 @@
|
|
|
1
|
+
import { autoUpdate as e, computePosition as t, flip as n, offset as r, shift as i } from "@floating-ui/dom";
|
|
2
|
+
import * as a from "vue";
|
|
3
|
+
import { Teleport as o, Transition as s, computed as c, defineComponent as l, getCurrentInstance as u, h as d, inject as f, nextTick as p, onMounted as m, onUnmounted as h, ref as g, shallowRef as _, watch as v } from "vue";
|
|
4
|
+
//#region \0rolldown/runtime.js
|
|
5
|
+
var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, x = Object.getOwnPropertyNames, S = Object.prototype.hasOwnProperty, C = (e, t) => {
|
|
6
|
+
let n = {};
|
|
7
|
+
for (var r in e) y(n, r, {
|
|
8
|
+
get: e[r],
|
|
9
|
+
enumerable: !0
|
|
10
|
+
});
|
|
11
|
+
return t || y(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
12
|
+
}, w = (e, t, n, r) => {
|
|
13
|
+
if (t && typeof t == "object" || typeof t == "function") for (var i = x(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !S.call(e, s) && s !== n && y(e, s, {
|
|
14
|
+
get: ((e) => t[e]).bind(null, s),
|
|
15
|
+
enumerable: !(r = b(t, s)) || r.enumerable
|
|
16
|
+
});
|
|
17
|
+
return e;
|
|
18
|
+
}, T = (e, t, n) => (w(e, t, "default"), n && w(n, t, "default"));
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
|
|
21
|
+
function E() {
|
|
22
|
+
return typeof window < "u";
|
|
23
|
+
}
|
|
24
|
+
function ee(e) {
|
|
25
|
+
return O(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
26
|
+
}
|
|
27
|
+
function D(e) {
|
|
28
|
+
var t;
|
|
29
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
30
|
+
}
|
|
31
|
+
function O(e) {
|
|
32
|
+
return E() ? e instanceof Node || e instanceof D(e).Node : !1;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region ../../node_modules/.pnpm/vue-demi@0.14.10_vue@3.5.33_typescript@5.9.3_/node_modules/vue-demi/lib/index.mjs
|
|
36
|
+
var k = /* @__PURE__ */ C({
|
|
37
|
+
Vue: () => a,
|
|
38
|
+
Vue2: () => void 0,
|
|
39
|
+
del: () => re,
|
|
40
|
+
install: () => te,
|
|
41
|
+
isVue2: () => !1,
|
|
42
|
+
isVue3: () => !0,
|
|
43
|
+
set: () => ne
|
|
44
|
+
});
|
|
45
|
+
import * as A from "vue";
|
|
46
|
+
T(k, A);
|
|
47
|
+
function te() {}
|
|
48
|
+
function ne(e, t, n) {
|
|
49
|
+
return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, n), n) : (e[t] = n, n);
|
|
50
|
+
}
|
|
51
|
+
function re(e, t) {
|
|
52
|
+
if (Array.isArray(e)) {
|
|
53
|
+
e.splice(t, 1);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
delete e[t];
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region ../../node_modules/.pnpm/@floating-ui+vue@1.1.9_vue@3.5.33_typescript@5.9.3_/node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs
|
|
60
|
+
function j(e) {
|
|
61
|
+
return typeof e == "object" && !!e && "$el" in e;
|
|
62
|
+
}
|
|
63
|
+
function M(e) {
|
|
64
|
+
if (j(e)) {
|
|
65
|
+
let t = e.$el;
|
|
66
|
+
return O(t) && ee(t) === "#comment" ? null : t;
|
|
67
|
+
}
|
|
68
|
+
return e;
|
|
69
|
+
}
|
|
70
|
+
function N(e) {
|
|
71
|
+
return typeof e == "function" ? e() : (0, k.unref)(e);
|
|
72
|
+
}
|
|
73
|
+
function ie(e) {
|
|
74
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
75
|
+
}
|
|
76
|
+
function ae(e, t) {
|
|
77
|
+
let n = ie(e);
|
|
78
|
+
return Math.round(t * n) / n;
|
|
79
|
+
}
|
|
80
|
+
function oe(e, n, r) {
|
|
81
|
+
r === void 0 && (r = {});
|
|
82
|
+
let i = r.whileElementsMounted, a = (0, k.computed)(() => N(r.open) ?? !0), o = (0, k.computed)(() => N(r.middleware)), s = (0, k.computed)(() => N(r.placement) ?? "bottom"), c = (0, k.computed)(() => N(r.strategy) ?? "absolute"), l = (0, k.computed)(() => N(r.transform) ?? !0), u = (0, k.computed)(() => M(e.value)), d = (0, k.computed)(() => M(n.value)), f = (0, k.ref)(0), p = (0, k.ref)(0), m = (0, k.ref)(c.value), h = (0, k.ref)(s.value), g = (0, k.shallowRef)({}), _ = (0, k.ref)(!1), v = (0, k.computed)(() => {
|
|
83
|
+
let e = {
|
|
84
|
+
position: m.value,
|
|
85
|
+
left: "0",
|
|
86
|
+
top: "0"
|
|
87
|
+
};
|
|
88
|
+
if (!d.value) return e;
|
|
89
|
+
let t = ae(d.value, f.value), n = ae(d.value, p.value);
|
|
90
|
+
return l.value ? {
|
|
91
|
+
...e,
|
|
92
|
+
transform: "translate(" + t + "px, " + n + "px)",
|
|
93
|
+
...ie(d.value) >= 1.5 && { willChange: "transform" }
|
|
94
|
+
} : {
|
|
95
|
+
position: m.value,
|
|
96
|
+
left: t + "px",
|
|
97
|
+
top: n + "px"
|
|
98
|
+
};
|
|
99
|
+
}), y;
|
|
100
|
+
function b() {
|
|
101
|
+
if (u.value == null || d.value == null) return;
|
|
102
|
+
let e = a.value;
|
|
103
|
+
t(u.value, d.value, {
|
|
104
|
+
middleware: o.value,
|
|
105
|
+
placement: s.value,
|
|
106
|
+
strategy: c.value
|
|
107
|
+
}).then((t) => {
|
|
108
|
+
f.value = t.x, p.value = t.y, m.value = t.strategy, h.value = t.placement, g.value = t.middlewareData, _.value = e !== !1;
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function x() {
|
|
112
|
+
typeof y == "function" && (y(), y = void 0);
|
|
113
|
+
}
|
|
114
|
+
function S() {
|
|
115
|
+
if (x(), i === void 0) {
|
|
116
|
+
b();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (u.value != null && d.value != null) {
|
|
120
|
+
y = i(u.value, d.value, b);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function C() {
|
|
125
|
+
a.value || (_.value = !1);
|
|
126
|
+
}
|
|
127
|
+
return (0, k.watch)([
|
|
128
|
+
o,
|
|
129
|
+
s,
|
|
130
|
+
c,
|
|
131
|
+
a
|
|
132
|
+
], b, { flush: "sync" }), (0, k.watch)([u, d], S, { flush: "sync" }), (0, k.watch)(a, C, { flush: "sync" }), (0, k.getCurrentScope)() && (0, k.onScopeDispose)(x), {
|
|
133
|
+
x: (0, k.shallowReadonly)(f),
|
|
134
|
+
y: (0, k.shallowReadonly)(p),
|
|
135
|
+
strategy: (0, k.shallowReadonly)(m),
|
|
136
|
+
placement: (0, k.shallowReadonly)(h),
|
|
137
|
+
middlewareData: (0, k.shallowReadonly)(g),
|
|
138
|
+
isPositioned: (0, k.shallowReadonly)(_),
|
|
139
|
+
floatingStyles: v,
|
|
140
|
+
update: b
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
//#endregion
|
|
144
|
+
//#region ../ccui/ui/form/src/form-types.ts
|
|
145
|
+
var se = Symbol("ccuiFormItem"), P = /^[a-z0-9]+(-[a-z0-9]+)*$/, F = (e, t, n, r = "") => {
|
|
146
|
+
let i = e.split(":");
|
|
147
|
+
if (e.slice(0, 1) === "@") {
|
|
148
|
+
if (i.length < 2 || i.length > 3) return null;
|
|
149
|
+
r = i.shift().slice(1);
|
|
150
|
+
}
|
|
151
|
+
if (i.length > 3 || !i.length) return null;
|
|
152
|
+
if (i.length > 1) {
|
|
153
|
+
let e = i.pop(), n = i.pop(), a = {
|
|
154
|
+
provider: i.length > 0 ? i[0] : r,
|
|
155
|
+
prefix: n,
|
|
156
|
+
name: e
|
|
157
|
+
};
|
|
158
|
+
return t && !I(a) ? null : a;
|
|
159
|
+
}
|
|
160
|
+
let a = i[0], o = a.split("-");
|
|
161
|
+
if (o.length > 1) {
|
|
162
|
+
let e = {
|
|
163
|
+
provider: r,
|
|
164
|
+
prefix: o.shift(),
|
|
165
|
+
name: o.join("-")
|
|
166
|
+
};
|
|
167
|
+
return t && !I(e) ? null : e;
|
|
168
|
+
}
|
|
169
|
+
if (n && r === "") {
|
|
170
|
+
let e = {
|
|
171
|
+
provider: r,
|
|
172
|
+
prefix: "",
|
|
173
|
+
name: a
|
|
174
|
+
};
|
|
175
|
+
return t && !I(e, n) ? null : e;
|
|
176
|
+
}
|
|
177
|
+
return null;
|
|
178
|
+
}, I = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
179
|
+
function L(e, t) {
|
|
180
|
+
let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
|
|
181
|
+
function a(e) {
|
|
182
|
+
if (n[e]) return i[e] = [];
|
|
183
|
+
if (!(e in i)) {
|
|
184
|
+
i[e] = null;
|
|
185
|
+
let t = r[e] && r[e].parent, n = t && a(t);
|
|
186
|
+
n && (i[e] = [t].concat(n));
|
|
187
|
+
}
|
|
188
|
+
return i[e];
|
|
189
|
+
}
|
|
190
|
+
return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
|
|
191
|
+
}
|
|
192
|
+
var R = Object.freeze({
|
|
193
|
+
left: 0,
|
|
194
|
+
top: 0,
|
|
195
|
+
width: 16,
|
|
196
|
+
height: 16
|
|
197
|
+
}), z = Object.freeze({
|
|
198
|
+
rotate: 0,
|
|
199
|
+
vFlip: !1,
|
|
200
|
+
hFlip: !1
|
|
201
|
+
}), B = Object.freeze({
|
|
202
|
+
...R,
|
|
203
|
+
...z
|
|
204
|
+
}), V = Object.freeze({
|
|
205
|
+
...B,
|
|
206
|
+
body: "",
|
|
207
|
+
hidden: !1
|
|
208
|
+
});
|
|
209
|
+
function ce(e, t) {
|
|
210
|
+
let n = {};
|
|
211
|
+
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
212
|
+
let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
213
|
+
return r && (n.rotate = r), n;
|
|
214
|
+
}
|
|
215
|
+
function H(e, t) {
|
|
216
|
+
let n = ce(e, t);
|
|
217
|
+
for (let r in V) r in z ? r in e && !(r in n) && (n[r] = z[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
218
|
+
return n;
|
|
219
|
+
}
|
|
220
|
+
function le(e, t, n) {
|
|
221
|
+
let r = e.icons, i = e.aliases || Object.create(null), a = {};
|
|
222
|
+
function o(e) {
|
|
223
|
+
a = H(r[e] || i[e], a);
|
|
224
|
+
}
|
|
225
|
+
return o(t), n.forEach(o), H(e, a);
|
|
226
|
+
}
|
|
227
|
+
function U(e, t) {
|
|
228
|
+
let n = [];
|
|
229
|
+
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
230
|
+
e.not_found instanceof Array && e.not_found.forEach((e) => {
|
|
231
|
+
t(e, null), n.push(e);
|
|
232
|
+
});
|
|
233
|
+
let r = L(e);
|
|
234
|
+
for (let i in r) {
|
|
235
|
+
let a = r[i];
|
|
236
|
+
a && (t(i, le(e, i, a)), n.push(i));
|
|
237
|
+
}
|
|
238
|
+
return n;
|
|
239
|
+
}
|
|
240
|
+
var ue = {
|
|
241
|
+
provider: "",
|
|
242
|
+
aliases: {},
|
|
243
|
+
not_found: {},
|
|
244
|
+
...R
|
|
245
|
+
};
|
|
246
|
+
function W(e, t) {
|
|
247
|
+
for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
248
|
+
return !0;
|
|
249
|
+
}
|
|
250
|
+
function G(e) {
|
|
251
|
+
if (typeof e != "object" || !e) return null;
|
|
252
|
+
let t = e;
|
|
253
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !W(e, ue)) return null;
|
|
254
|
+
let n = t.icons;
|
|
255
|
+
for (let e in n) {
|
|
256
|
+
let t = n[e];
|
|
257
|
+
if (!e || typeof t.body != "string" || !W(t, V)) return null;
|
|
258
|
+
}
|
|
259
|
+
let r = t.aliases || Object.create(null);
|
|
260
|
+
for (let e in r) {
|
|
261
|
+
let t = r[e], i = t.parent;
|
|
262
|
+
if (!e || typeof i != "string" || !n[i] && !r[i] || !W(t, V)) return null;
|
|
263
|
+
}
|
|
264
|
+
return t;
|
|
265
|
+
}
|
|
266
|
+
var de = Object.create(null);
|
|
267
|
+
function fe(e, t) {
|
|
268
|
+
return {
|
|
269
|
+
provider: e,
|
|
270
|
+
prefix: t,
|
|
271
|
+
icons: Object.create(null),
|
|
272
|
+
missing: /* @__PURE__ */ new Set()
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
function K(e, t) {
|
|
276
|
+
let n = de[e] || (de[e] = Object.create(null));
|
|
277
|
+
return n[t] || (n[t] = fe(e, t));
|
|
278
|
+
}
|
|
279
|
+
function pe(e, t) {
|
|
280
|
+
return G(t) ? U(t, (t, n) => {
|
|
281
|
+
n ? e.icons[t] = n : e.missing.add(t);
|
|
282
|
+
}) : [];
|
|
283
|
+
}
|
|
284
|
+
function me(e, t, n) {
|
|
285
|
+
try {
|
|
286
|
+
if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
|
|
287
|
+
} catch {}
|
|
288
|
+
return !1;
|
|
289
|
+
}
|
|
290
|
+
var q = !1;
|
|
291
|
+
function J(e) {
|
|
292
|
+
return typeof e == "boolean" && (q = e), q;
|
|
293
|
+
}
|
|
294
|
+
function he(e) {
|
|
295
|
+
let t = typeof e == "string" ? F(e, !0, q) : e;
|
|
296
|
+
if (t) {
|
|
297
|
+
let e = K(t.provider, t.prefix), n = t.name;
|
|
298
|
+
return e.icons[n] || (e.missing.has(n) ? null : void 0);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
function ge(e, t) {
|
|
302
|
+
let n = F(e, !0, q);
|
|
303
|
+
if (!n) return !1;
|
|
304
|
+
let r = K(n.provider, n.prefix);
|
|
305
|
+
return t ? me(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
306
|
+
}
|
|
307
|
+
function _e(e, t) {
|
|
308
|
+
if (typeof e != "object") return !1;
|
|
309
|
+
if (typeof t != "string" && (t = e.provider || ""), q && !t && !e.prefix) {
|
|
310
|
+
let t = !1;
|
|
311
|
+
return G(e) && (e.prefix = "", U(e, (e, n) => {
|
|
312
|
+
ge(e, n) && (t = !0);
|
|
313
|
+
})), t;
|
|
314
|
+
}
|
|
315
|
+
let n = e.prefix;
|
|
316
|
+
return I({
|
|
317
|
+
prefix: n,
|
|
318
|
+
name: "a"
|
|
319
|
+
}) ? !!pe(K(t, n), e) : !1;
|
|
320
|
+
}
|
|
321
|
+
var ve = Object.freeze({
|
|
322
|
+
width: null,
|
|
323
|
+
height: null
|
|
324
|
+
}), ye = Object.freeze({
|
|
325
|
+
...ve,
|
|
326
|
+
...z
|
|
327
|
+
}), be = /(-?[0-9.]*[0-9]+[0-9.]*)/g, xe = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
328
|
+
function Se(e, t, n) {
|
|
329
|
+
if (t === 1) return e;
|
|
330
|
+
if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
331
|
+
if (typeof e != "string") return e;
|
|
332
|
+
let r = e.split(be);
|
|
333
|
+
if (r === null || !r.length) return e;
|
|
334
|
+
let i = [], a = r.shift(), o = xe.test(a);
|
|
335
|
+
for (;;) {
|
|
336
|
+
if (o) {
|
|
337
|
+
let e = parseFloat(a);
|
|
338
|
+
isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
|
|
339
|
+
} else i.push(a);
|
|
340
|
+
if (a = r.shift(), a === void 0) return i.join("");
|
|
341
|
+
o = !o;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function Ce(e, t = "defs") {
|
|
345
|
+
let n = "", r = e.indexOf("<" + t);
|
|
346
|
+
for (; r >= 0;) {
|
|
347
|
+
let i = e.indexOf(">", r), a = e.indexOf("</" + t);
|
|
348
|
+
if (i === -1 || a === -1) break;
|
|
349
|
+
let o = e.indexOf(">", a);
|
|
350
|
+
if (o === -1) break;
|
|
351
|
+
n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
|
|
352
|
+
}
|
|
353
|
+
return {
|
|
354
|
+
defs: n,
|
|
355
|
+
content: e
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
function we(e, t) {
|
|
359
|
+
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
360
|
+
}
|
|
361
|
+
function Te(e, t, n) {
|
|
362
|
+
let r = Ce(e);
|
|
363
|
+
return we(r.defs, t + r.content + n);
|
|
364
|
+
}
|
|
365
|
+
var Ee = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
366
|
+
function De(e, t) {
|
|
367
|
+
let n = {
|
|
368
|
+
...B,
|
|
369
|
+
...e
|
|
370
|
+
}, r = {
|
|
371
|
+
...ye,
|
|
372
|
+
...t
|
|
373
|
+
}, i = {
|
|
374
|
+
left: n.left,
|
|
375
|
+
top: n.top,
|
|
376
|
+
width: n.width,
|
|
377
|
+
height: n.height
|
|
378
|
+
}, a = n.body;
|
|
379
|
+
[n, r].forEach((e) => {
|
|
380
|
+
let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
|
|
381
|
+
n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
|
|
382
|
+
let s;
|
|
383
|
+
switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
|
|
384
|
+
case 1:
|
|
385
|
+
s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
|
|
386
|
+
break;
|
|
387
|
+
case 2:
|
|
388
|
+
t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
|
|
389
|
+
break;
|
|
390
|
+
case 3:
|
|
391
|
+
s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = Te(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
|
|
395
|
+
});
|
|
396
|
+
let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
|
|
397
|
+
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = Se(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? Se(u, l / c) : s === "auto" ? l : s);
|
|
398
|
+
let f = {}, p = (e, t) => {
|
|
399
|
+
Ee(t) || (f[e] = t.toString());
|
|
400
|
+
};
|
|
401
|
+
p("width", u), p("height", d);
|
|
402
|
+
let m = [
|
|
403
|
+
i.left,
|
|
404
|
+
i.top,
|
|
405
|
+
c,
|
|
406
|
+
l
|
|
407
|
+
];
|
|
408
|
+
return f.viewBox = m.join(" "), {
|
|
409
|
+
attributes: f,
|
|
410
|
+
viewBox: m,
|
|
411
|
+
body: a
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
var Oe = /\sid="(\S+)"/g, Y = /* @__PURE__ */ new Map();
|
|
415
|
+
function ke(e) {
|
|
416
|
+
e = e.replace(/[0-9]+$/, "") || "a";
|
|
417
|
+
let t = Y.get(e) || 0;
|
|
418
|
+
return Y.set(e, t + 1), t ? `${e}${t}` : e;
|
|
419
|
+
}
|
|
420
|
+
function Ae(e) {
|
|
421
|
+
let t = [], n;
|
|
422
|
+
for (; n = Oe.exec(e);) t.push(n[1]);
|
|
423
|
+
if (!t.length) return e;
|
|
424
|
+
let r = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
425
|
+
return t.forEach((t) => {
|
|
426
|
+
let n = ke(t), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
427
|
+
e = e.replace(RegExp("([#;\"])(" + i + ")([\")]|\\.[a-z])", "g"), "$1" + n + r + "$3");
|
|
428
|
+
}), e = e.replace(new RegExp(r, "g"), ""), e;
|
|
429
|
+
}
|
|
430
|
+
var je = Object.create(null);
|
|
431
|
+
function Me(e, t) {
|
|
432
|
+
je[e] = t;
|
|
433
|
+
}
|
|
434
|
+
function Ne(e) {
|
|
435
|
+
return je[e] || je[""];
|
|
436
|
+
}
|
|
437
|
+
function Pe(e) {
|
|
438
|
+
let t;
|
|
439
|
+
if (typeof e.resources == "string") t = [e.resources];
|
|
440
|
+
else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
|
|
441
|
+
return {
|
|
442
|
+
resources: t,
|
|
443
|
+
path: e.path || "/",
|
|
444
|
+
maxURL: e.maxURL || 500,
|
|
445
|
+
rotate: e.rotate || 750,
|
|
446
|
+
timeout: e.timeout || 5e3,
|
|
447
|
+
random: e.random === !0,
|
|
448
|
+
index: e.index || 0,
|
|
449
|
+
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
for (var Fe = Object.create(null), X = ["https://api.simplesvg.com", "https://api.unisvg.com"], Z = []; X.length > 0;) X.length === 1 || Math.random() > .5 ? Z.push(X.shift()) : Z.push(X.pop());
|
|
453
|
+
Fe[""] = Pe({ resources: ["https://api.iconify.design"].concat(Z) });
|
|
454
|
+
function Ie(e, t) {
|
|
455
|
+
let n = Pe(t);
|
|
456
|
+
return n === null ? !1 : (Fe[e] = n, !0);
|
|
457
|
+
}
|
|
458
|
+
function Le(e) {
|
|
459
|
+
return Fe[e];
|
|
460
|
+
}
|
|
461
|
+
var Re = (() => {
|
|
462
|
+
let e;
|
|
463
|
+
try {
|
|
464
|
+
if (e = fetch, typeof e == "function") return e;
|
|
465
|
+
} catch {}
|
|
466
|
+
})();
|
|
467
|
+
function ze(e, t) {
|
|
468
|
+
let n = Le(e);
|
|
469
|
+
if (!n) return 0;
|
|
470
|
+
let r;
|
|
471
|
+
if (!n.maxURL) r = 0;
|
|
472
|
+
else {
|
|
473
|
+
let e = 0;
|
|
474
|
+
n.resources.forEach((t) => {
|
|
475
|
+
e = Math.max(e, t.length);
|
|
476
|
+
});
|
|
477
|
+
let i = t + ".json?icons=";
|
|
478
|
+
r = n.maxURL - e - n.path.length - i.length;
|
|
479
|
+
}
|
|
480
|
+
return r;
|
|
481
|
+
}
|
|
482
|
+
function Be(e) {
|
|
483
|
+
return e === 404;
|
|
484
|
+
}
|
|
485
|
+
var Ve = (e, t, n) => {
|
|
486
|
+
let r = [], i = ze(e, t), a = "icons", o = {
|
|
487
|
+
type: a,
|
|
488
|
+
provider: e,
|
|
489
|
+
prefix: t,
|
|
490
|
+
icons: []
|
|
491
|
+
}, s = 0;
|
|
492
|
+
return n.forEach((n, c) => {
|
|
493
|
+
s += n.length + 1, s >= i && c > 0 && (r.push(o), o = {
|
|
494
|
+
type: a,
|
|
495
|
+
provider: e,
|
|
496
|
+
prefix: t,
|
|
497
|
+
icons: []
|
|
498
|
+
}, s = n.length), o.icons.push(n);
|
|
499
|
+
}), r.push(o), r;
|
|
500
|
+
};
|
|
501
|
+
function He(e) {
|
|
502
|
+
if (typeof e == "string") {
|
|
503
|
+
let t = Le(e);
|
|
504
|
+
if (t) return t.path;
|
|
505
|
+
}
|
|
506
|
+
return "/";
|
|
507
|
+
}
|
|
508
|
+
var Ue = {
|
|
509
|
+
prepare: Ve,
|
|
510
|
+
send: (e, t, n) => {
|
|
511
|
+
if (!Re) {
|
|
512
|
+
n("abort", 424);
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
let r = He(t.provider);
|
|
516
|
+
switch (t.type) {
|
|
517
|
+
case "icons": {
|
|
518
|
+
let e = t.prefix, n = t.icons.join(","), i = new URLSearchParams({ icons: n });
|
|
519
|
+
r += e + ".json?" + i.toString();
|
|
520
|
+
break;
|
|
521
|
+
}
|
|
522
|
+
case "custom": {
|
|
523
|
+
let e = t.uri;
|
|
524
|
+
r += e.slice(0, 1) === "/" ? e.slice(1) : e;
|
|
525
|
+
break;
|
|
526
|
+
}
|
|
527
|
+
default:
|
|
528
|
+
n("abort", 400);
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
let i = 503;
|
|
532
|
+
Re(e + r).then((e) => {
|
|
533
|
+
let t = e.status;
|
|
534
|
+
if (t !== 200) {
|
|
535
|
+
setTimeout(() => {
|
|
536
|
+
n(Be(t) ? "abort" : "next", t);
|
|
537
|
+
});
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
return i = 501, e.json();
|
|
541
|
+
}).then((e) => {
|
|
542
|
+
if (typeof e != "object" || !e) {
|
|
543
|
+
setTimeout(() => {
|
|
544
|
+
e === 404 ? n("abort", e) : n("next", i);
|
|
545
|
+
});
|
|
546
|
+
return;
|
|
547
|
+
}
|
|
548
|
+
setTimeout(() => {
|
|
549
|
+
n("success", e);
|
|
550
|
+
});
|
|
551
|
+
}).catch(() => {
|
|
552
|
+
n("next", i);
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
};
|
|
556
|
+
function We(e, t) {
|
|
557
|
+
e.forEach((e) => {
|
|
558
|
+
let n = e.loaderCallbacks;
|
|
559
|
+
n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
function Ge(e) {
|
|
563
|
+
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
564
|
+
e.pendingCallbacksFlag = !1;
|
|
565
|
+
let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
566
|
+
if (!t.length) return;
|
|
567
|
+
let n = !1, r = e.provider, i = e.prefix;
|
|
568
|
+
t.forEach((t) => {
|
|
569
|
+
let a = t.icons, o = a.pending.length;
|
|
570
|
+
a.pending = a.pending.filter((t) => {
|
|
571
|
+
if (t.prefix !== i) return !0;
|
|
572
|
+
let o = t.name;
|
|
573
|
+
if (e.icons[o]) a.loaded.push({
|
|
574
|
+
provider: r,
|
|
575
|
+
prefix: i,
|
|
576
|
+
name: o
|
|
577
|
+
});
|
|
578
|
+
else if (e.missing.has(o)) a.missing.push({
|
|
579
|
+
provider: r,
|
|
580
|
+
prefix: i,
|
|
581
|
+
name: o
|
|
582
|
+
});
|
|
583
|
+
else return n = !0, !0;
|
|
584
|
+
return !1;
|
|
585
|
+
}), a.pending.length !== o && (n || We([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
|
|
586
|
+
});
|
|
587
|
+
}));
|
|
588
|
+
}
|
|
589
|
+
var Ke = 0;
|
|
590
|
+
function qe(e, t, n) {
|
|
591
|
+
let r = Ke++, i = We.bind(null, n, r);
|
|
592
|
+
if (!t.pending.length) return i;
|
|
593
|
+
let a = {
|
|
594
|
+
id: r,
|
|
595
|
+
icons: t,
|
|
596
|
+
callback: e,
|
|
597
|
+
abort: i
|
|
598
|
+
};
|
|
599
|
+
return n.forEach((e) => {
|
|
600
|
+
(e.loaderCallbacks ||= []).push(a);
|
|
601
|
+
}), i;
|
|
602
|
+
}
|
|
603
|
+
function Je(e) {
|
|
604
|
+
let t = {
|
|
605
|
+
loaded: [],
|
|
606
|
+
missing: [],
|
|
607
|
+
pending: []
|
|
608
|
+
}, n = Object.create(null);
|
|
609
|
+
e.sort((e, t) => e.provider === t.provider ? e.prefix === t.prefix ? e.name.localeCompare(t.name) : e.prefix.localeCompare(t.prefix) : e.provider.localeCompare(t.provider));
|
|
610
|
+
let r = {
|
|
611
|
+
provider: "",
|
|
612
|
+
prefix: "",
|
|
613
|
+
name: ""
|
|
614
|
+
};
|
|
615
|
+
return e.forEach((e) => {
|
|
616
|
+
if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
|
|
617
|
+
r = e;
|
|
618
|
+
let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] = K(i, a)), l;
|
|
619
|
+
l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
|
|
620
|
+
let u = {
|
|
621
|
+
provider: i,
|
|
622
|
+
prefix: a,
|
|
623
|
+
name: o
|
|
624
|
+
};
|
|
625
|
+
l.push(u);
|
|
626
|
+
}), t;
|
|
627
|
+
}
|
|
628
|
+
function Ye(e, t = !0, n = !1) {
|
|
629
|
+
let r = [];
|
|
630
|
+
return e.forEach((e) => {
|
|
631
|
+
let i = typeof e == "string" ? F(e, t, n) : e;
|
|
632
|
+
i && r.push(i);
|
|
633
|
+
}), r;
|
|
634
|
+
}
|
|
635
|
+
var Xe = {
|
|
636
|
+
resources: [],
|
|
637
|
+
index: 0,
|
|
638
|
+
timeout: 2e3,
|
|
639
|
+
rotate: 750,
|
|
640
|
+
random: !1,
|
|
641
|
+
dataAfterTimeout: !1
|
|
642
|
+
};
|
|
643
|
+
function Ze(e, t, n, r) {
|
|
644
|
+
let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
|
|
645
|
+
if (e.random) {
|
|
646
|
+
let t = e.resources.slice(0);
|
|
647
|
+
for (o = []; t.length > 1;) {
|
|
648
|
+
let e = Math.floor(Math.random() * t.length);
|
|
649
|
+
o.push(t[e]), t = t.slice(0, e).concat(t.slice(e + 1));
|
|
650
|
+
}
|
|
651
|
+
o = o.concat(t);
|
|
652
|
+
} else o = e.resources.slice(a).concat(e.resources.slice(0, a));
|
|
653
|
+
let s = Date.now(), c = "pending", l = 0, u, d = null, f = [], p = [];
|
|
654
|
+
typeof r == "function" && p.push(r);
|
|
655
|
+
function m() {
|
|
656
|
+
d &&= (clearTimeout(d), null);
|
|
657
|
+
}
|
|
658
|
+
function h() {
|
|
659
|
+
c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
|
|
660
|
+
e.status === "pending" && (e.status = "aborted");
|
|
661
|
+
}), f = [];
|
|
662
|
+
}
|
|
663
|
+
function g(e, t) {
|
|
664
|
+
t && (p = []), typeof e == "function" && p.push(e);
|
|
665
|
+
}
|
|
666
|
+
function _() {
|
|
667
|
+
return {
|
|
668
|
+
startTime: s,
|
|
669
|
+
payload: t,
|
|
670
|
+
status: c,
|
|
671
|
+
queriesSent: l,
|
|
672
|
+
queriesPending: f.length,
|
|
673
|
+
subscribe: g,
|
|
674
|
+
abort: h
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
function v() {
|
|
678
|
+
c = "failed", p.forEach((e) => {
|
|
679
|
+
e(void 0, u);
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
function y() {
|
|
683
|
+
f.forEach((e) => {
|
|
684
|
+
e.status === "pending" && (e.status = "aborted");
|
|
685
|
+
}), f = [];
|
|
686
|
+
}
|
|
687
|
+
function b(t, n, r) {
|
|
688
|
+
let i = n !== "success";
|
|
689
|
+
switch (f = f.filter((e) => e !== t), c) {
|
|
690
|
+
case "pending": break;
|
|
691
|
+
case "failed":
|
|
692
|
+
if (i || !e.dataAfterTimeout) return;
|
|
693
|
+
break;
|
|
694
|
+
default: return;
|
|
695
|
+
}
|
|
696
|
+
if (n === "abort") {
|
|
697
|
+
u = r, v();
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
if (i) {
|
|
701
|
+
u = r, f.length || (o.length ? x() : v());
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
if (m(), y(), !e.random) {
|
|
705
|
+
let n = e.resources.indexOf(t.resource);
|
|
706
|
+
n !== -1 && n !== e.index && (e.index = n);
|
|
707
|
+
}
|
|
708
|
+
c = "completed", p.forEach((e) => {
|
|
709
|
+
e(r);
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
function x() {
|
|
713
|
+
if (c !== "pending") return;
|
|
714
|
+
m();
|
|
715
|
+
let r = o.shift();
|
|
716
|
+
if (r === void 0) {
|
|
717
|
+
if (f.length) {
|
|
718
|
+
d = setTimeout(() => {
|
|
719
|
+
m(), c === "pending" && (y(), v());
|
|
720
|
+
}, e.timeout);
|
|
721
|
+
return;
|
|
722
|
+
}
|
|
723
|
+
v();
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
726
|
+
let i = {
|
|
727
|
+
status: "pending",
|
|
728
|
+
resource: r,
|
|
729
|
+
callback: (e, t) => {
|
|
730
|
+
b(i, e, t);
|
|
731
|
+
}
|
|
732
|
+
};
|
|
733
|
+
f.push(i), l++, d = setTimeout(x, e.rotate), n(r, t, i.callback);
|
|
734
|
+
}
|
|
735
|
+
return setTimeout(x), _;
|
|
736
|
+
}
|
|
737
|
+
function Qe(e) {
|
|
738
|
+
let t = {
|
|
739
|
+
...Xe,
|
|
740
|
+
...e
|
|
741
|
+
}, n = [];
|
|
742
|
+
function r() {
|
|
743
|
+
n = n.filter((e) => e().status === "pending");
|
|
744
|
+
}
|
|
745
|
+
function i(e, i, a) {
|
|
746
|
+
let o = Ze(t, e, i, (e, t) => {
|
|
747
|
+
r(), a && a(e, t);
|
|
748
|
+
});
|
|
749
|
+
return n.push(o), o;
|
|
750
|
+
}
|
|
751
|
+
function a(e) {
|
|
752
|
+
return n.find((t) => e(t)) || null;
|
|
753
|
+
}
|
|
754
|
+
return {
|
|
755
|
+
query: i,
|
|
756
|
+
find: a,
|
|
757
|
+
setIndex: (e) => {
|
|
758
|
+
t.index = e;
|
|
759
|
+
},
|
|
760
|
+
getIndex: () => t.index,
|
|
761
|
+
cleanup: r
|
|
762
|
+
};
|
|
763
|
+
}
|
|
764
|
+
function $e() {}
|
|
765
|
+
var et = Object.create(null);
|
|
766
|
+
function tt(e) {
|
|
767
|
+
if (!et[e]) {
|
|
768
|
+
let t = Le(e);
|
|
769
|
+
if (!t) return;
|
|
770
|
+
et[e] = {
|
|
771
|
+
config: t,
|
|
772
|
+
redundancy: Qe(t)
|
|
773
|
+
};
|
|
774
|
+
}
|
|
775
|
+
return et[e];
|
|
776
|
+
}
|
|
777
|
+
function nt(e, t, n) {
|
|
778
|
+
let r, i;
|
|
779
|
+
if (typeof e == "string") {
|
|
780
|
+
let t = Ne(e);
|
|
781
|
+
if (!t) return n(void 0, 424), $e;
|
|
782
|
+
i = t.send;
|
|
783
|
+
let a = tt(e);
|
|
784
|
+
a && (r = a.redundancy);
|
|
785
|
+
} else {
|
|
786
|
+
let t = Pe(e);
|
|
787
|
+
if (t) {
|
|
788
|
+
r = Qe(t);
|
|
789
|
+
let n = Ne(e.resources ? e.resources[0] : "");
|
|
790
|
+
n && (i = n.send);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
return !r || !i ? (n(void 0, 424), $e) : r.query(t, i, n)().abort;
|
|
794
|
+
}
|
|
795
|
+
function rt() {}
|
|
796
|
+
function it(e) {
|
|
797
|
+
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
798
|
+
e.iconsLoaderFlag = !1, Ge(e);
|
|
799
|
+
}));
|
|
800
|
+
}
|
|
801
|
+
function at(e) {
|
|
802
|
+
let t = [], n = [];
|
|
803
|
+
return e.forEach((e) => {
|
|
804
|
+
(e.match(P) ? t : n).push(e);
|
|
805
|
+
}), {
|
|
806
|
+
valid: t,
|
|
807
|
+
invalid: n
|
|
808
|
+
};
|
|
809
|
+
}
|
|
810
|
+
function Q(e, t, n) {
|
|
811
|
+
function r() {
|
|
812
|
+
let n = e.pendingIcons;
|
|
813
|
+
t.forEach((t) => {
|
|
814
|
+
n && n.delete(t), e.icons[t] || e.missing.add(t);
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
if (n && typeof n == "object") try {
|
|
818
|
+
if (!pe(e, n).length) {
|
|
819
|
+
r();
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
} catch (e) {
|
|
823
|
+
console.error(e);
|
|
824
|
+
}
|
|
825
|
+
r(), it(e);
|
|
826
|
+
}
|
|
827
|
+
function ot(e, t) {
|
|
828
|
+
e instanceof Promise ? e.then((e) => {
|
|
829
|
+
t(e);
|
|
830
|
+
}).catch(() => {
|
|
831
|
+
t(null);
|
|
832
|
+
}) : t(e);
|
|
833
|
+
}
|
|
834
|
+
function st(e, t) {
|
|
835
|
+
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
836
|
+
e.iconsQueueFlag = !1;
|
|
837
|
+
let { provider: t, prefix: n } = e, r = e.iconsToLoad;
|
|
838
|
+
if (delete e.iconsToLoad, !r || !r.length) return;
|
|
839
|
+
let i = e.loadIcon;
|
|
840
|
+
if (e.loadIcons && (r.length > 1 || !i)) {
|
|
841
|
+
ot(e.loadIcons(r, n, t), (t) => {
|
|
842
|
+
Q(e, r, t);
|
|
843
|
+
});
|
|
844
|
+
return;
|
|
845
|
+
}
|
|
846
|
+
if (i) {
|
|
847
|
+
r.forEach((r) => {
|
|
848
|
+
ot(i(r, n, t), (t) => {
|
|
849
|
+
Q(e, [r], t ? {
|
|
850
|
+
prefix: n,
|
|
851
|
+
icons: { [r]: t }
|
|
852
|
+
} : null);
|
|
853
|
+
});
|
|
854
|
+
});
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
857
|
+
let { valid: a, invalid: o } = at(r);
|
|
858
|
+
if (o.length && Q(e, o, null), !a.length) return;
|
|
859
|
+
let s = n.match(P) ? Ne(t) : null;
|
|
860
|
+
if (!s) {
|
|
861
|
+
Q(e, a, null);
|
|
862
|
+
return;
|
|
863
|
+
}
|
|
864
|
+
s.prepare(t, n, a).forEach((n) => {
|
|
865
|
+
nt(t, n, (t) => {
|
|
866
|
+
Q(e, n.icons, t);
|
|
867
|
+
});
|
|
868
|
+
});
|
|
869
|
+
}));
|
|
870
|
+
}
|
|
871
|
+
var ct = (e, t) => {
|
|
872
|
+
let n = Je(Ye(e, !0, J()));
|
|
873
|
+
if (!n.pending.length) {
|
|
874
|
+
let e = !0;
|
|
875
|
+
return t && setTimeout(() => {
|
|
876
|
+
e && t(n.loaded, n.missing, n.pending, rt);
|
|
877
|
+
}), () => {
|
|
878
|
+
e = !1;
|
|
879
|
+
};
|
|
880
|
+
}
|
|
881
|
+
let r = Object.create(null), i = [], a, o;
|
|
882
|
+
return n.pending.forEach((e) => {
|
|
883
|
+
let { provider: t, prefix: n } = e;
|
|
884
|
+
if (n === o && t === a) return;
|
|
885
|
+
a = t, o = n, i.push(K(t, n));
|
|
886
|
+
let s = r[t] || (r[t] = Object.create(null));
|
|
887
|
+
s[n] || (s[n] = []);
|
|
888
|
+
}), n.pending.forEach((e) => {
|
|
889
|
+
let { provider: t, prefix: n, name: i } = e, a = K(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
|
|
890
|
+
o.has(i) || (o.add(i), r[t][n].push(i));
|
|
891
|
+
}), i.forEach((e) => {
|
|
892
|
+
let t = r[e.provider][e.prefix];
|
|
893
|
+
t.length && st(e, t);
|
|
894
|
+
}), t ? qe(t, n, i) : rt;
|
|
895
|
+
};
|
|
896
|
+
function lt(e, t) {
|
|
897
|
+
let n = { ...e };
|
|
898
|
+
for (let e in t) {
|
|
899
|
+
let r = t[e], i = typeof r;
|
|
900
|
+
e in ve ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
|
|
901
|
+
}
|
|
902
|
+
return n;
|
|
903
|
+
}
|
|
904
|
+
var ut = /[\s,]+/;
|
|
905
|
+
function dt(e, t) {
|
|
906
|
+
t.split(ut).forEach((t) => {
|
|
907
|
+
switch (t.trim()) {
|
|
908
|
+
case "horizontal":
|
|
909
|
+
e.hFlip = !0;
|
|
910
|
+
break;
|
|
911
|
+
case "vertical":
|
|
912
|
+
e.vFlip = !0;
|
|
913
|
+
break;
|
|
914
|
+
}
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
function ft(e, t = 0) {
|
|
918
|
+
let n = e.replace(/^-?[0-9.]*/, "");
|
|
919
|
+
function r(e) {
|
|
920
|
+
for (; e < 0;) e += 4;
|
|
921
|
+
return e % 4;
|
|
922
|
+
}
|
|
923
|
+
if (n === "") {
|
|
924
|
+
let t = parseInt(e);
|
|
925
|
+
return isNaN(t) ? 0 : r(t);
|
|
926
|
+
} else if (n !== e) {
|
|
927
|
+
let t = 0;
|
|
928
|
+
switch (n) {
|
|
929
|
+
case "%":
|
|
930
|
+
t = 25;
|
|
931
|
+
break;
|
|
932
|
+
case "deg": t = 90;
|
|
933
|
+
}
|
|
934
|
+
if (t) {
|
|
935
|
+
let i = parseFloat(e.slice(0, e.length - n.length));
|
|
936
|
+
return isNaN(i) ? 0 : (i /= t, i % 1 == 0 ? r(i) : 0);
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
return t;
|
|
940
|
+
}
|
|
941
|
+
function pt(e, t) {
|
|
942
|
+
let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
|
|
943
|
+
for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
|
|
944
|
+
return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
|
|
945
|
+
}
|
|
946
|
+
function mt(e) {
|
|
947
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
948
|
+
}
|
|
949
|
+
function ht(e) {
|
|
950
|
+
return "data:image/svg+xml," + mt(e);
|
|
951
|
+
}
|
|
952
|
+
function gt(e) {
|
|
953
|
+
return "url(\"" + ht(e) + "\")";
|
|
954
|
+
}
|
|
955
|
+
var _t = {
|
|
956
|
+
...ye,
|
|
957
|
+
inline: !1
|
|
958
|
+
}, vt = {
|
|
959
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
960
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
961
|
+
"aria-hidden": !0,
|
|
962
|
+
role: "img"
|
|
963
|
+
}, yt = { display: "inline-block" }, bt = { backgroundColor: "currentColor" }, xt = { backgroundColor: "transparent" }, St = {
|
|
964
|
+
Image: "var(--svg)",
|
|
965
|
+
Repeat: "no-repeat",
|
|
966
|
+
Size: "100% 100%"
|
|
967
|
+
}, Ct = {
|
|
968
|
+
webkitMask: bt,
|
|
969
|
+
mask: bt,
|
|
970
|
+
background: xt
|
|
971
|
+
};
|
|
972
|
+
for (let e in Ct) {
|
|
973
|
+
let t = Ct[e];
|
|
974
|
+
for (let n in St) t[e + n] = St[n];
|
|
975
|
+
}
|
|
976
|
+
var wt = {};
|
|
977
|
+
["horizontal", "vertical"].forEach((e) => {
|
|
978
|
+
let t = e.slice(0, 1) + "Flip";
|
|
979
|
+
wt[e + "-flip"] = t, wt[e.slice(0, 1) + "-flip"] = t, wt[e + "Flip"] = t;
|
|
980
|
+
});
|
|
981
|
+
function Tt(e) {
|
|
982
|
+
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
983
|
+
}
|
|
984
|
+
var Et = (e, t) => {
|
|
985
|
+
let n = lt(_t, t), r = { ...vt }, i = t.mode || "svg", a = {}, o = t.style, s = typeof o == "object" && !(o instanceof Array) ? o : {};
|
|
986
|
+
for (let e in t) {
|
|
987
|
+
let i = t[e];
|
|
988
|
+
if (i !== void 0) switch (e) {
|
|
989
|
+
case "icon":
|
|
990
|
+
case "style":
|
|
991
|
+
case "onLoad":
|
|
992
|
+
case "mode":
|
|
993
|
+
case "ssr":
|
|
994
|
+
case "customise": break;
|
|
995
|
+
case "inline":
|
|
996
|
+
case "hFlip":
|
|
997
|
+
case "vFlip":
|
|
998
|
+
n[e] = i === !0 || i === "true" || i === 1;
|
|
999
|
+
break;
|
|
1000
|
+
case "flip":
|
|
1001
|
+
typeof i == "string" && dt(n, i);
|
|
1002
|
+
break;
|
|
1003
|
+
case "color":
|
|
1004
|
+
a.color = i;
|
|
1005
|
+
break;
|
|
1006
|
+
case "rotate":
|
|
1007
|
+
typeof i == "string" ? n[e] = ft(i) : typeof i == "number" && (n[e] = i);
|
|
1008
|
+
break;
|
|
1009
|
+
case "ariaHidden":
|
|
1010
|
+
case "aria-hidden":
|
|
1011
|
+
i !== !0 && i !== "true" && delete r["aria-hidden"];
|
|
1012
|
+
break;
|
|
1013
|
+
default: {
|
|
1014
|
+
let t = wt[e];
|
|
1015
|
+
t ? (i === !0 || i === "true" || i === 1) && (n[t] = !0) : _t[e] === void 0 && (r[e] = i);
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
1019
|
+
let c = De(e, n), l = c.attributes;
|
|
1020
|
+
if (n.inline && (a.verticalAlign = "-0.125em"), i === "svg") return r.style = {
|
|
1021
|
+
...a,
|
|
1022
|
+
...s
|
|
1023
|
+
}, Object.assign(r, l), r.innerHTML = Ae(c.body), d("svg", r);
|
|
1024
|
+
let { body: u, width: f, height: p } = e, m = i === "mask" || (i === "bg" ? !1 : u.indexOf("currentColor") !== -1), h = pt(u, {
|
|
1025
|
+
...l,
|
|
1026
|
+
width: f + "",
|
|
1027
|
+
height: p + ""
|
|
1028
|
+
});
|
|
1029
|
+
return r.style = {
|
|
1030
|
+
...a,
|
|
1031
|
+
"--svg": gt(h),
|
|
1032
|
+
width: Tt(l.width),
|
|
1033
|
+
height: Tt(l.height),
|
|
1034
|
+
...yt,
|
|
1035
|
+
...m ? bt : xt,
|
|
1036
|
+
...s
|
|
1037
|
+
}, d("span", r);
|
|
1038
|
+
};
|
|
1039
|
+
if (J(!0), Me("", Ue), typeof document < "u" && typeof window < "u") {
|
|
1040
|
+
let e = window;
|
|
1041
|
+
if (e.IconifyPreload !== void 0) {
|
|
1042
|
+
let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
|
|
1043
|
+
typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
|
|
1044
|
+
try {
|
|
1045
|
+
(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !_e(e)) && console.error(n);
|
|
1046
|
+
} catch {
|
|
1047
|
+
console.error(n);
|
|
1048
|
+
}
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
if (e.IconifyProviders !== void 0) {
|
|
1052
|
+
let t = e.IconifyProviders;
|
|
1053
|
+
if (typeof t == "object" && t) for (let e in t) {
|
|
1054
|
+
let n = "IconifyProviders[" + e + "] is invalid.";
|
|
1055
|
+
try {
|
|
1056
|
+
let r = t[e];
|
|
1057
|
+
if (typeof r != "object" || !r || r.resources === void 0) continue;
|
|
1058
|
+
Ie(e, r) || console.error(n);
|
|
1059
|
+
} catch {
|
|
1060
|
+
console.error(n);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
var Dt = {
|
|
1066
|
+
...B,
|
|
1067
|
+
body: ""
|
|
1068
|
+
}, Ot = l((e, { emit: t }) => {
|
|
1069
|
+
let n = g(null);
|
|
1070
|
+
function r() {
|
|
1071
|
+
n.value &&= (n.value.abort?.(), null);
|
|
1072
|
+
}
|
|
1073
|
+
let i = g(!!e.ssr), a = g(""), o = _(null);
|
|
1074
|
+
function s() {
|
|
1075
|
+
let i = e.icon;
|
|
1076
|
+
if (typeof i == "object" && i && typeof i.body == "string") return a.value = "", { data: i };
|
|
1077
|
+
let o;
|
|
1078
|
+
if (typeof i != "string" || (o = F(i, !1, !0)) === null) return null;
|
|
1079
|
+
let s = he(o);
|
|
1080
|
+
if (!s) {
|
|
1081
|
+
let e = n.value;
|
|
1082
|
+
return (!e || e.name !== i) && (s === null ? n.value = { name: i } : n.value = {
|
|
1083
|
+
name: i,
|
|
1084
|
+
abort: ct([o], c)
|
|
1085
|
+
}), null;
|
|
1086
|
+
}
|
|
1087
|
+
r(), a.value !== i && (a.value = i, p(() => {
|
|
1088
|
+
t("load", i);
|
|
1089
|
+
}));
|
|
1090
|
+
let l = e.customise;
|
|
1091
|
+
if (l) {
|
|
1092
|
+
s = Object.assign({}, s);
|
|
1093
|
+
let e = l(s.body, o.name, o.prefix, o.provider);
|
|
1094
|
+
typeof e == "string" && (s.body = e);
|
|
1095
|
+
}
|
|
1096
|
+
let u = ["iconify"];
|
|
1097
|
+
return o.prefix !== "" && u.push("iconify--" + o.prefix), o.provider !== "" && u.push("iconify--" + o.provider), {
|
|
1098
|
+
data: s,
|
|
1099
|
+
classes: u
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
function c() {
|
|
1103
|
+
let e = s();
|
|
1104
|
+
e ? e.data !== o.value?.data && (o.value = e) : o.value = null;
|
|
1105
|
+
}
|
|
1106
|
+
return i.value ? c() : m(() => {
|
|
1107
|
+
i.value = !0, c();
|
|
1108
|
+
}), v(() => e.icon, c), h(r), () => {
|
|
1109
|
+
let t = o.value;
|
|
1110
|
+
if (!t) return Et(Dt, e);
|
|
1111
|
+
let n = e;
|
|
1112
|
+
return t.classes && (n = {
|
|
1113
|
+
...e,
|
|
1114
|
+
class: t.classes.join(" ")
|
|
1115
|
+
}), Et({
|
|
1116
|
+
...B,
|
|
1117
|
+
...t.data
|
|
1118
|
+
}, n);
|
|
1119
|
+
};
|
|
1120
|
+
}, {
|
|
1121
|
+
props: [
|
|
1122
|
+
"icon",
|
|
1123
|
+
"mode",
|
|
1124
|
+
"ssr",
|
|
1125
|
+
"width",
|
|
1126
|
+
"height",
|
|
1127
|
+
"style",
|
|
1128
|
+
"color",
|
|
1129
|
+
"inline",
|
|
1130
|
+
"rotate",
|
|
1131
|
+
"hFlip",
|
|
1132
|
+
"horizontalFlip",
|
|
1133
|
+
"vFlip",
|
|
1134
|
+
"verticalFlip",
|
|
1135
|
+
"flip",
|
|
1136
|
+
"id",
|
|
1137
|
+
"ariaHidden",
|
|
1138
|
+
"customise",
|
|
1139
|
+
"title"
|
|
1140
|
+
],
|
|
1141
|
+
emits: ["load"]
|
|
1142
|
+
});
|
|
1143
|
+
//#endregion
|
|
1144
|
+
//#region ../ccui/ui/shared/hooks/use-icon.ts
|
|
1145
|
+
function kt(e) {
|
|
1146
|
+
return e.includes(":");
|
|
1147
|
+
}
|
|
1148
|
+
function At(e) {
|
|
1149
|
+
return e ? typeof e == "string" ? kt(e) ? d(Ot, { icon: e }) : d("i", { class: e }) : e : null;
|
|
1150
|
+
}
|
|
1151
|
+
//#endregion
|
|
1152
|
+
//#region ../ccui/ui/shared/hooks/use-namespace.ts
|
|
1153
|
+
function jt(e, t, n) {
|
|
1154
|
+
let r = e;
|
|
1155
|
+
return t && (r += `__${t}`), n && (r += `--${n}`), r;
|
|
1156
|
+
}
|
|
1157
|
+
function Mt(e, t = !1) {
|
|
1158
|
+
let n = t ? `.ccui-${e}` : `ccui-${e}`;
|
|
1159
|
+
return {
|
|
1160
|
+
b: () => jt(n),
|
|
1161
|
+
e: (e) => e ? jt(n, e) : "",
|
|
1162
|
+
m: (e) => e ? jt(n, "", e) : "",
|
|
1163
|
+
em: (e, t) => e && t ? jt(n, e, t) : "",
|
|
1164
|
+
is: (e) => `is-${e}`
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
//#endregion
|
|
1168
|
+
//#region ../ccui/ui/shared/hooks/use-virtual-list.ts
|
|
1169
|
+
function Nt(e, t) {
|
|
1170
|
+
let n = g(0), r = t.buffer ?? 4, i = c(() => e.value.length * t.itemHeight), a = c(() => Math.min(t.maxHeight, i.value));
|
|
1171
|
+
return {
|
|
1172
|
+
scrollTop: n,
|
|
1173
|
+
onScroll: (e) => {
|
|
1174
|
+
n.value = e.currentTarget.scrollTop;
|
|
1175
|
+
},
|
|
1176
|
+
visible: c(() => {
|
|
1177
|
+
let i = e.value;
|
|
1178
|
+
if (i.length === 0) return [];
|
|
1179
|
+
let o = Math.max(0, Math.floor(n.value / t.itemHeight) - r), s = Math.ceil(a.value / t.itemHeight) + r * 2, c = Math.min(i.length, o + s), l = [];
|
|
1180
|
+
for (let e = o; e < c; e += 1) l.push({
|
|
1181
|
+
index: e,
|
|
1182
|
+
data: i[e],
|
|
1183
|
+
top: e * t.itemHeight
|
|
1184
|
+
});
|
|
1185
|
+
return l;
|
|
1186
|
+
}),
|
|
1187
|
+
totalHeight: i,
|
|
1188
|
+
containerHeight: a,
|
|
1189
|
+
scrollToIndex: (e, r) => {
|
|
1190
|
+
if (!r) return;
|
|
1191
|
+
let i = e * t.itemHeight;
|
|
1192
|
+
i < n.value ? r.scrollTop = i : i + t.itemHeight > n.value + a.value && (r.scrollTop = i - a.value + t.itemHeight);
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
}
|
|
1196
|
+
//#endregion
|
|
1197
|
+
//#region ../ccui/ui/select/src/composables/use-select.ts
|
|
1198
|
+
var Pt = {
|
|
1199
|
+
label: "label",
|
|
1200
|
+
value: "value",
|
|
1201
|
+
disabled: "disabled",
|
|
1202
|
+
options: "options"
|
|
1203
|
+
};
|
|
1204
|
+
function Ft(e) {
|
|
1205
|
+
return e == null ? "" : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
|
|
1206
|
+
}
|
|
1207
|
+
function It(e) {
|
|
1208
|
+
return typeof e == "object" && !!e && "value" in e;
|
|
1209
|
+
}
|
|
1210
|
+
function Lt(e) {
|
|
1211
|
+
if (It(e)) return e.value;
|
|
1212
|
+
if (typeof e == "string" || typeof e == "number") return e;
|
|
1213
|
+
}
|
|
1214
|
+
function Rt(e) {
|
|
1215
|
+
if (Array.isArray(e)) return e.map(Lt).filter((e) => e !== void 0);
|
|
1216
|
+
if (e == null || e === "") return [];
|
|
1217
|
+
let t = Lt(e);
|
|
1218
|
+
return t === void 0 ? [] : [t];
|
|
1219
|
+
}
|
|
1220
|
+
function zt(e, t) {
|
|
1221
|
+
let n = e[t];
|
|
1222
|
+
return Array.isArray(n);
|
|
1223
|
+
}
|
|
1224
|
+
function Bt(e) {
|
|
1225
|
+
return e.mode ? e.mode : e.multiple ? "multiple" : "default";
|
|
1226
|
+
}
|
|
1227
|
+
function Vt(e, t, n) {
|
|
1228
|
+
return {
|
|
1229
|
+
raw: e,
|
|
1230
|
+
label: e[t.label],
|
|
1231
|
+
value: e[t.value],
|
|
1232
|
+
disabled: !!e[t.disabled],
|
|
1233
|
+
groupPath: n
|
|
1234
|
+
};
|
|
1235
|
+
}
|
|
1236
|
+
function Ht(e, t, n) {
|
|
1237
|
+
if (!t || n === !1) return e;
|
|
1238
|
+
if (typeof n == "function") return e.filter((e) => n(t, e.raw));
|
|
1239
|
+
let r = t.toLowerCase();
|
|
1240
|
+
return e.filter((e) => Ft(e.label).toLowerCase().includes(r) || Ft(e.value).toLowerCase().includes(r));
|
|
1241
|
+
}
|
|
1242
|
+
function Ut(e, t, n = [], r = []) {
|
|
1243
|
+
for (let i of e) if (zt(i, t.options)) {
|
|
1244
|
+
let e = [...n, i[t.label]];
|
|
1245
|
+
Ut(i[t.options], t, e, r);
|
|
1246
|
+
} else r.push(Vt(i, t, n));
|
|
1247
|
+
return r;
|
|
1248
|
+
}
|
|
1249
|
+
function Wt(e, t, n, r, i, a) {
|
|
1250
|
+
let o = !1;
|
|
1251
|
+
for (let s of e) if (zt(s, t.options)) {
|
|
1252
|
+
let e = s[t.options], c = a.length;
|
|
1253
|
+
a.push({
|
|
1254
|
+
type: "group",
|
|
1255
|
+
group: {
|
|
1256
|
+
label: s[t.label],
|
|
1257
|
+
depth: i
|
|
1258
|
+
}
|
|
1259
|
+
}), Wt(e, t, n, r, i + 1, a) ? o = !0 : a.splice(c, a.length - c);
|
|
1260
|
+
} else {
|
|
1261
|
+
let e = Ht([Vt(s, t, [])], n, r);
|
|
1262
|
+
for (let t of e) a.push({
|
|
1263
|
+
type: "option",
|
|
1264
|
+
option: t
|
|
1265
|
+
}), o = !0;
|
|
1266
|
+
}
|
|
1267
|
+
return o;
|
|
1268
|
+
}
|
|
1269
|
+
function Gt(e, t, n) {
|
|
1270
|
+
let r = c(() => ({
|
|
1271
|
+
...Pt,
|
|
1272
|
+
...e.fieldNames
|
|
1273
|
+
})), i = c(() => Bt(e)), a = c(() => i.value === "multiple" || i.value === "tags"), o = c(() => Ut(e.options, r.value)), s = c(() => Rt(e.modelValue)), l = c(() => {
|
|
1274
|
+
let e = /* @__PURE__ */ new Map();
|
|
1275
|
+
for (let t of o.value) e.set(t.value, t);
|
|
1276
|
+
return s.value.map((t) => e.get(t) || {
|
|
1277
|
+
raw: {
|
|
1278
|
+
[r.value.label]: t,
|
|
1279
|
+
[r.value.value]: t
|
|
1280
|
+
},
|
|
1281
|
+
label: t,
|
|
1282
|
+
value: t,
|
|
1283
|
+
disabled: !1,
|
|
1284
|
+
groupPath: []
|
|
1285
|
+
});
|
|
1286
|
+
}), u = (t) => {
|
|
1287
|
+
if (e.optionLabelProp) {
|
|
1288
|
+
let n = t.raw[e.optionLabelProp];
|
|
1289
|
+
if (n !== void 0) return n;
|
|
1290
|
+
}
|
|
1291
|
+
return t.label;
|
|
1292
|
+
}, d = c(() => {
|
|
1293
|
+
let e = l.value[0];
|
|
1294
|
+
return e ? u(e) : "";
|
|
1295
|
+
}), f = c(() => {
|
|
1296
|
+
let n = r.value, i = t.value.trim(), a = e.filterable || e.showSearch ? e.filterOption : !1, o = [];
|
|
1297
|
+
return Wt(e.options, n, i, a, 0, o), o;
|
|
1298
|
+
}), p = c(() => f.value.filter((e) => e.type === "option").map((e) => e.option)), m = c(() => new Set(s.value)), h = (t) => {
|
|
1299
|
+
if (t !== void 0) return e.labelInValue ? {
|
|
1300
|
+
value: t,
|
|
1301
|
+
label: o.value.find((e) => e.value === t)?.label ?? t
|
|
1302
|
+
} : t;
|
|
1303
|
+
}, g = (t) => {
|
|
1304
|
+
let r;
|
|
1305
|
+
r = t === void 0 ? void 0 : Array.isArray(t) ? e.labelInValue ? t.map((e) => h(e)) : t : e.labelInValue ? h(t) : t, n("update:modelValue", r), n("change", r);
|
|
1306
|
+
}, _ = () => !a.value || !e.maxCount || e.maxCount <= 0 ? !1 : s.value.length >= e.maxCount;
|
|
1307
|
+
return {
|
|
1308
|
+
addTagValue: (e) => {
|
|
1309
|
+
if (i.value !== "tags") return !1;
|
|
1310
|
+
let t = e.trim();
|
|
1311
|
+
return !t || s.value.includes(t) || _() ? !1 : (g(s.value.concat(t)), !0);
|
|
1312
|
+
},
|
|
1313
|
+
clearValue: () => {
|
|
1314
|
+
a.value ? g([]) : g(void 0);
|
|
1315
|
+
},
|
|
1316
|
+
displayLabelOf: u,
|
|
1317
|
+
fieldNames: r,
|
|
1318
|
+
isMultiple: a,
|
|
1319
|
+
mode: i,
|
|
1320
|
+
removeValue: (e) => {
|
|
1321
|
+
a.value && g(s.value.filter((t) => t !== e));
|
|
1322
|
+
},
|
|
1323
|
+
reorderTagValue: (e, t) => {
|
|
1324
|
+
if (!a.value) return;
|
|
1325
|
+
let n = [...s.value], r = n.indexOf(e), i = n.indexOf(t);
|
|
1326
|
+
r < 0 || i < 0 || r === i || (n.splice(r, 1), n.splice(i, 0, e), g(n));
|
|
1327
|
+
},
|
|
1328
|
+
selectOption: (e) => {
|
|
1329
|
+
if (e.disabled) return;
|
|
1330
|
+
if (!a.value) {
|
|
1331
|
+
g(e.value);
|
|
1332
|
+
return;
|
|
1333
|
+
}
|
|
1334
|
+
let t = s.value.includes(e.value);
|
|
1335
|
+
!t && _() || g(t ? s.value.filter((t) => t !== e.value) : s.value.concat(e.value));
|
|
1336
|
+
},
|
|
1337
|
+
selectedLabel: d,
|
|
1338
|
+
selectedOptions: l,
|
|
1339
|
+
selectedValueSet: m,
|
|
1340
|
+
selectedValues: s,
|
|
1341
|
+
visibleFlatOptions: f,
|
|
1342
|
+
visibleOptions: p
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
//#endregion
|
|
1346
|
+
//#region ../ccui/ui/select/src/select-types.ts
|
|
1347
|
+
var Kt = {
|
|
1348
|
+
modelValue: {
|
|
1349
|
+
type: [
|
|
1350
|
+
String,
|
|
1351
|
+
Number,
|
|
1352
|
+
Array,
|
|
1353
|
+
Object
|
|
1354
|
+
],
|
|
1355
|
+
default: void 0
|
|
1356
|
+
},
|
|
1357
|
+
options: {
|
|
1358
|
+
type: Array,
|
|
1359
|
+
default: () => []
|
|
1360
|
+
},
|
|
1361
|
+
fieldNames: {
|
|
1362
|
+
type: Object,
|
|
1363
|
+
default: () => ({})
|
|
1364
|
+
},
|
|
1365
|
+
mode: {
|
|
1366
|
+
type: String,
|
|
1367
|
+
default: void 0
|
|
1368
|
+
},
|
|
1369
|
+
placement: {
|
|
1370
|
+
type: String,
|
|
1371
|
+
default: "bottom"
|
|
1372
|
+
},
|
|
1373
|
+
filterOption: {
|
|
1374
|
+
type: [Boolean, Function],
|
|
1375
|
+
default: !0
|
|
1376
|
+
},
|
|
1377
|
+
popupClassName: {
|
|
1378
|
+
type: String,
|
|
1379
|
+
default: ""
|
|
1380
|
+
},
|
|
1381
|
+
getPopupContainer: {
|
|
1382
|
+
type: Function,
|
|
1383
|
+
default: void 0
|
|
1384
|
+
},
|
|
1385
|
+
popupAppendToBody: {
|
|
1386
|
+
type: Boolean,
|
|
1387
|
+
default: !1
|
|
1388
|
+
},
|
|
1389
|
+
placeholder: {
|
|
1390
|
+
type: String,
|
|
1391
|
+
default: "Please select"
|
|
1392
|
+
},
|
|
1393
|
+
disabled: {
|
|
1394
|
+
type: Boolean,
|
|
1395
|
+
default: !1
|
|
1396
|
+
},
|
|
1397
|
+
clearable: {
|
|
1398
|
+
type: Boolean,
|
|
1399
|
+
default: !1
|
|
1400
|
+
},
|
|
1401
|
+
clearIcon: {
|
|
1402
|
+
type: [String, Object],
|
|
1403
|
+
default: void 0
|
|
1404
|
+
},
|
|
1405
|
+
suffixIcon: {
|
|
1406
|
+
type: [String, Object],
|
|
1407
|
+
default: void 0
|
|
1408
|
+
},
|
|
1409
|
+
removeIcon: {
|
|
1410
|
+
type: [String, Object],
|
|
1411
|
+
default: void 0
|
|
1412
|
+
},
|
|
1413
|
+
multiple: {
|
|
1414
|
+
type: Boolean,
|
|
1415
|
+
default: !1
|
|
1416
|
+
},
|
|
1417
|
+
filterable: {
|
|
1418
|
+
type: Boolean,
|
|
1419
|
+
default: !1
|
|
1420
|
+
},
|
|
1421
|
+
loading: {
|
|
1422
|
+
type: Boolean,
|
|
1423
|
+
default: !1
|
|
1424
|
+
},
|
|
1425
|
+
size: {
|
|
1426
|
+
type: String,
|
|
1427
|
+
default: "default"
|
|
1428
|
+
},
|
|
1429
|
+
noDataText: {
|
|
1430
|
+
type: String,
|
|
1431
|
+
default: "No data"
|
|
1432
|
+
},
|
|
1433
|
+
loadingText: {
|
|
1434
|
+
type: String,
|
|
1435
|
+
default: "Loading..."
|
|
1436
|
+
},
|
|
1437
|
+
maxTagCount: {
|
|
1438
|
+
type: Number,
|
|
1439
|
+
default: 3
|
|
1440
|
+
},
|
|
1441
|
+
maxCount: {
|
|
1442
|
+
type: Number,
|
|
1443
|
+
default: 0
|
|
1444
|
+
},
|
|
1445
|
+
status: {
|
|
1446
|
+
type: String,
|
|
1447
|
+
default: ""
|
|
1448
|
+
},
|
|
1449
|
+
labelInValue: {
|
|
1450
|
+
type: Boolean,
|
|
1451
|
+
default: !1
|
|
1452
|
+
},
|
|
1453
|
+
autoFocus: {
|
|
1454
|
+
type: Boolean,
|
|
1455
|
+
default: !1
|
|
1456
|
+
},
|
|
1457
|
+
defaultActiveFirstOption: {
|
|
1458
|
+
type: Boolean,
|
|
1459
|
+
default: !0
|
|
1460
|
+
},
|
|
1461
|
+
highlightMatch: {
|
|
1462
|
+
type: Boolean,
|
|
1463
|
+
default: !1
|
|
1464
|
+
},
|
|
1465
|
+
virtualScroll: {
|
|
1466
|
+
type: Boolean,
|
|
1467
|
+
default: !1
|
|
1468
|
+
},
|
|
1469
|
+
virtualItemHeight: {
|
|
1470
|
+
type: Number,
|
|
1471
|
+
default: 32
|
|
1472
|
+
},
|
|
1473
|
+
virtualMaxHeight: {
|
|
1474
|
+
type: Number,
|
|
1475
|
+
default: 240
|
|
1476
|
+
},
|
|
1477
|
+
optionLabelProp: {
|
|
1478
|
+
type: String,
|
|
1479
|
+
default: ""
|
|
1480
|
+
},
|
|
1481
|
+
showSearch: {
|
|
1482
|
+
type: Boolean,
|
|
1483
|
+
default: !1
|
|
1484
|
+
},
|
|
1485
|
+
transitionName: {
|
|
1486
|
+
type: String,
|
|
1487
|
+
default: "ccui-select-fade"
|
|
1488
|
+
},
|
|
1489
|
+
tagsDraggable: {
|
|
1490
|
+
type: Boolean,
|
|
1491
|
+
default: !1
|
|
1492
|
+
},
|
|
1493
|
+
variant: {
|
|
1494
|
+
type: String,
|
|
1495
|
+
default: "outlined"
|
|
1496
|
+
},
|
|
1497
|
+
classNames: {
|
|
1498
|
+
type: Object,
|
|
1499
|
+
default: void 0
|
|
1500
|
+
},
|
|
1501
|
+
styles: {
|
|
1502
|
+
type: Object,
|
|
1503
|
+
default: void 0
|
|
1504
|
+
}
|
|
1505
|
+
}, qt = 0;
|
|
1506
|
+
function Jt(e, t) {
|
|
1507
|
+
if (!t) return Yt(e);
|
|
1508
|
+
let n = Yt(e), r = n.toLowerCase().indexOf(t.toLowerCase());
|
|
1509
|
+
return r < 0 ? n : d("span", null, [
|
|
1510
|
+
n.slice(0, r),
|
|
1511
|
+
d("mark", { class: "ccui-select__highlight" }, n.slice(r, r + t.length)),
|
|
1512
|
+
n.slice(r + t.length)
|
|
1513
|
+
]);
|
|
1514
|
+
}
|
|
1515
|
+
function Yt(e) {
|
|
1516
|
+
return e == null ? "" : typeof e == "string" ? e : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
|
|
1517
|
+
}
|
|
1518
|
+
var $ = /* @__PURE__ */ l({
|
|
1519
|
+
name: "CSelect",
|
|
1520
|
+
props: Kt,
|
|
1521
|
+
emits: [
|
|
1522
|
+
"update:modelValue",
|
|
1523
|
+
"change",
|
|
1524
|
+
"search",
|
|
1525
|
+
"visible-change",
|
|
1526
|
+
"clear",
|
|
1527
|
+
"focus",
|
|
1528
|
+
"blur"
|
|
1529
|
+
],
|
|
1530
|
+
setup(t, { emit: a, slots: l }) {
|
|
1531
|
+
let y = Mt("select"), b = u();
|
|
1532
|
+
qt += 1;
|
|
1533
|
+
let x = `${b?.uid ?? qt}-${qt}`, S = `ccui-select-listbox-${x}`, C = (e) => `ccui-select-option-${x}-${e}`, w = g(null), T = g(null), E = g(null), ee = g(null), D = _(!1), O = _(0), k = _(""), A = f(se, null), { addTagValue: te, clearValue: ne, displayLabelOf: re, isMultiple: j, mode: M, removeValue: N, reorderTagValue: ie, selectOption: ae, selectedLabel: P, selectedOptions: F, selectedValueSet: I, visibleFlatOptions: L, visibleOptions: R } = Gt(t, k, a), z = _(null), B = _(null), V = c(() => F.value.length > 0), ce = c(() => F.value.slice(0, t.maxTagCount)), H = c(() => Math.max(F.value.length - ce.value.length, 0)), le = c(() => t.filterable || t.showSearch), U = c(() => le.value || M.value === "tags"), ue = c(() => t.placement === "auto" ? "bottom-start" : `${t.placement}-start`), W = c(() => typeof document > "u" ? null : t.getPopupContainer ? t.getPopupContainer(w.value) : t.popupAppendToBody ? document.body : null), G = c(() => W.value !== null), { floatingStyles: de } = oe(w, T, {
|
|
1534
|
+
placement: ue,
|
|
1535
|
+
open: D,
|
|
1536
|
+
whileElementsMounted: e,
|
|
1537
|
+
middleware: [
|
|
1538
|
+
r(4),
|
|
1539
|
+
n(),
|
|
1540
|
+
i({ padding: 8 })
|
|
1541
|
+
],
|
|
1542
|
+
strategy: c(() => G.value ? "fixed" : "absolute")
|
|
1543
|
+
}), fe = c(() => A?.validateStatus.value ?? ""), K = c(() => t.status || fe.value), pe = c(() => ({
|
|
1544
|
+
[y.b()]: !0,
|
|
1545
|
+
[y.m(t.size)]: !!t.size,
|
|
1546
|
+
[y.m("open")]: D.value,
|
|
1547
|
+
[y.m("disabled")]: t.disabled,
|
|
1548
|
+
[y.m("multiple")]: j.value,
|
|
1549
|
+
[y.m("tags")]: M.value === "tags",
|
|
1550
|
+
[y.m(K.value)]: !!K.value,
|
|
1551
|
+
[y.m(`variant-${t.variant}`)]: !!t.variant
|
|
1552
|
+
})), me = c(() => t.virtualScroll && L.value.filter((e) => e.type === "option").length > 0), q = Nt(c(() => L.value), {
|
|
1553
|
+
itemHeight: t.virtualItemHeight,
|
|
1554
|
+
maxHeight: t.virtualMaxHeight
|
|
1555
|
+
}), J = (e) => {
|
|
1556
|
+
t.disabled || D.value === e || (D.value = e, a("visible-change", e), e && (t.defaultActiveFirstOption && (O.value = ge()), U.value && p(() => ee.value?.focus())), e || (k.value = "", A && A.validate("blur")));
|
|
1557
|
+
}, he = (e) => {
|
|
1558
|
+
let t = e.target;
|
|
1559
|
+
w.value?.contains(t) || T.value?.contains(t) || J(!1);
|
|
1560
|
+
};
|
|
1561
|
+
m(() => {
|
|
1562
|
+
document.addEventListener("mousedown", he), t.autoFocus && p(() => w.value?.focus());
|
|
1563
|
+
}), h(() => {
|
|
1564
|
+
document.removeEventListener("mousedown", he);
|
|
1565
|
+
});
|
|
1566
|
+
let ge = () => {
|
|
1567
|
+
let e = R.value.findIndex((e) => !e.disabled);
|
|
1568
|
+
return e < 0 ? 0 : e;
|
|
1569
|
+
};
|
|
1570
|
+
v(() => R.value.length, () => {
|
|
1571
|
+
t.defaultActiveFirstOption ? O.value = ge() : O.value = 0;
|
|
1572
|
+
}), v(() => t.modelValue, () => {
|
|
1573
|
+
A && A.validate("change");
|
|
1574
|
+
});
|
|
1575
|
+
let _e = (e) => {
|
|
1576
|
+
let t = R.value;
|
|
1577
|
+
if (t.length === 0) return 0;
|
|
1578
|
+
let n = O.value;
|
|
1579
|
+
for (let r = 1; r <= t.length; r += 1) {
|
|
1580
|
+
let i = (n + r * e + t.length) % t.length;
|
|
1581
|
+
if (!t[i].disabled) return i;
|
|
1582
|
+
}
|
|
1583
|
+
return n;
|
|
1584
|
+
}, ve = (e) => {
|
|
1585
|
+
let t = R.value;
|
|
1586
|
+
if (t.length === 0) return 0;
|
|
1587
|
+
if (e === 1) {
|
|
1588
|
+
for (let e = t.length - 1; e >= 0; --e) if (!t[e].disabled) return e;
|
|
1589
|
+
} else for (let e = 0; e < t.length; e += 1) if (!t[e].disabled) return e;
|
|
1590
|
+
return O.value;
|
|
1591
|
+
}, ye = (e) => {
|
|
1592
|
+
let n = Math.max(1, Math.floor(t.virtualMaxHeight / t.virtualItemHeight)), r = R.value;
|
|
1593
|
+
if (r.length === 0) return O.value;
|
|
1594
|
+
let i = O.value + e * n;
|
|
1595
|
+
for (i = Math.max(0, Math.min(r.length - 1, i)); i >= 0 && i < r.length && r[i].disabled;) i += e;
|
|
1596
|
+
return (i < 0 || i >= r.length) && (i = O.value), i;
|
|
1597
|
+
}, be = () => {
|
|
1598
|
+
if (!me.value || !E.value) return;
|
|
1599
|
+
let e = L.value, t = -1, n = 0;
|
|
1600
|
+
for (let r = 0; r < e.length; r += 1) if (e[r].type === "option" && (t += 1, t === O.value)) {
|
|
1601
|
+
n = r;
|
|
1602
|
+
break;
|
|
1603
|
+
}
|
|
1604
|
+
q.scrollToIndex(n, E.value);
|
|
1605
|
+
};
|
|
1606
|
+
v(O, () => {
|
|
1607
|
+
p(be);
|
|
1608
|
+
});
|
|
1609
|
+
let xe = (e) => {
|
|
1610
|
+
let t = e.target.value;
|
|
1611
|
+
k.value = t, a("search", t), J(!0);
|
|
1612
|
+
}, Se = (e) => {
|
|
1613
|
+
e.disabled || (ae(e), j.value || J(!1), U.value && (k.value = ""));
|
|
1614
|
+
}, Ce = (e) => {
|
|
1615
|
+
e.stopPropagation(), ne(), a("clear"), J(!1);
|
|
1616
|
+
}, we = (e, t) => {
|
|
1617
|
+
t.stopPropagation(), N(e);
|
|
1618
|
+
}, Te = () => {
|
|
1619
|
+
if (M.value !== "tags") return !1;
|
|
1620
|
+
let e = te(k.value);
|
|
1621
|
+
return e && (k.value = ""), e;
|
|
1622
|
+
}, Ee = (e) => {
|
|
1623
|
+
if (!t.disabled) {
|
|
1624
|
+
if (e.key === "Escape") {
|
|
1625
|
+
J(!1);
|
|
1626
|
+
return;
|
|
1627
|
+
}
|
|
1628
|
+
if (e.key === "Enter") {
|
|
1629
|
+
if (!D.value) {
|
|
1630
|
+
J(!0);
|
|
1631
|
+
return;
|
|
1632
|
+
}
|
|
1633
|
+
let e = R.value[O.value];
|
|
1634
|
+
if (e && (R.value.length > 0 || M.value !== "tags")) {
|
|
1635
|
+
Se(e);
|
|
1636
|
+
return;
|
|
1637
|
+
}
|
|
1638
|
+
M.value === "tags" && Te();
|
|
1639
|
+
return;
|
|
1640
|
+
}
|
|
1641
|
+
if (e.key === "Backspace" && j.value && !k.value && V.value) {
|
|
1642
|
+
let e = F.value[F.value.length - 1]?.value;
|
|
1643
|
+
e !== void 0 && N(e);
|
|
1644
|
+
return;
|
|
1645
|
+
}
|
|
1646
|
+
if (e.key === "Home" || e.key === "End") {
|
|
1647
|
+
e.preventDefault(), J(!0), O.value = ve(e.key === "Home" ? -1 : 1);
|
|
1648
|
+
return;
|
|
1649
|
+
}
|
|
1650
|
+
if (e.key === "PageUp" || e.key === "PageDown") {
|
|
1651
|
+
e.preventDefault(), J(!0), O.value = ye(e.key === "PageDown" ? 1 : -1);
|
|
1652
|
+
return;
|
|
1653
|
+
}
|
|
1654
|
+
e.key !== "ArrowDown" && e.key !== "ArrowUp" || (e.preventDefault(), J(!0), R.value.length !== 0 && (O.value = _e(e.key === "ArrowDown" ? 1 : -1)));
|
|
1655
|
+
}
|
|
1656
|
+
}, De = (e) => {
|
|
1657
|
+
a("focus", e);
|
|
1658
|
+
}, Oe = (e) => {
|
|
1659
|
+
a("blur", e);
|
|
1660
|
+
}, Y = (e) => d("input", {
|
|
1661
|
+
ref: ee,
|
|
1662
|
+
class: y.e("search"),
|
|
1663
|
+
value: k.value,
|
|
1664
|
+
placeholder: e,
|
|
1665
|
+
disabled: t.disabled,
|
|
1666
|
+
"aria-autocomplete": "list",
|
|
1667
|
+
"aria-controls": S,
|
|
1668
|
+
onInput: xe,
|
|
1669
|
+
onKeydown: Ee
|
|
1670
|
+
}), ke = () => {
|
|
1671
|
+
if (U.value && D.value) return Y(V.value ? Yt(P.value) : t.placeholder);
|
|
1672
|
+
let e = V.value ? l.selected ? l.selected({ option: F.value[0] }) : P.value : t.placeholder;
|
|
1673
|
+
return d("span", { class: V.value ? y.e("single") : y.e("placeholder") }, e);
|
|
1674
|
+
}, Ae = (e, n) => {
|
|
1675
|
+
if (!t.tagsDraggable || n.disabled) {
|
|
1676
|
+
e.preventDefault();
|
|
1677
|
+
return;
|
|
1678
|
+
}
|
|
1679
|
+
z.value = n.value, e.dataTransfer?.setData("text/plain", String(n.value));
|
|
1680
|
+
}, je = (e, n) => {
|
|
1681
|
+
!t.tagsDraggable || z.value === null || (e.preventDefault(), B.value = n.value);
|
|
1682
|
+
}, Me = (e, n) => {
|
|
1683
|
+
if (!t.tagsDraggable || z.value === null) return;
|
|
1684
|
+
e.preventDefault();
|
|
1685
|
+
let r = z.value;
|
|
1686
|
+
r !== n.value && ie(r, n.value), z.value = null, B.value = null;
|
|
1687
|
+
}, Ne = () => {
|
|
1688
|
+
z.value = null, B.value = null;
|
|
1689
|
+
}, Pe = (e) => {
|
|
1690
|
+
if (l.tag) return l.tag({
|
|
1691
|
+
option: e,
|
|
1692
|
+
onClose: (t) => we(e.value, t)
|
|
1693
|
+
});
|
|
1694
|
+
let n = re(e);
|
|
1695
|
+
return d("span", {
|
|
1696
|
+
class: [
|
|
1697
|
+
y.e("tag"),
|
|
1698
|
+
t.tagsDraggable && y.em("tag", "draggable"),
|
|
1699
|
+
B.value === e.value && y.em("tag", "drop-over"),
|
|
1700
|
+
z.value === e.value && y.em("tag", "dragging")
|
|
1701
|
+
],
|
|
1702
|
+
key: e.value,
|
|
1703
|
+
draggable: t.tagsDraggable && !e.disabled ? !0 : void 0,
|
|
1704
|
+
onDragstart: (t) => Ae(t, e),
|
|
1705
|
+
onDragover: (t) => je(t, e),
|
|
1706
|
+
onDrop: (t) => Me(t, e),
|
|
1707
|
+
onDragend: Ne
|
|
1708
|
+
}, [d("span", { class: y.e("tag-label") }, n), d("span", {
|
|
1709
|
+
class: y.e("tag-close"),
|
|
1710
|
+
onClick: (t) => we(e.value, t)
|
|
1711
|
+
}, l.removeIcon ? l.removeIcon() : At(t.removeIcon) ?? "x")]);
|
|
1712
|
+
}, Fe = (e = []) => d("div", { class: y.e("tags") }, [
|
|
1713
|
+
...ce.value.map(Pe),
|
|
1714
|
+
...H.value > 0 ? [d("span", {
|
|
1715
|
+
class: y.e("tag"),
|
|
1716
|
+
key: "__more"
|
|
1717
|
+
}, `+${H.value}`)] : [],
|
|
1718
|
+
...e
|
|
1719
|
+
]), X = () => V.value ? Fe(U.value && D.value ? [Y("")] : []) : U.value && D.value ? Y(t.placeholder) : d("span", { class: y.e("placeholder") }, t.placeholder), Z = (e, n) => {
|
|
1720
|
+
let r = I.value.has(e.value), i = t.highlightMatch ? Jt(e.label, k.value.trim()) : e.label, a = l.option ? l.option({
|
|
1721
|
+
option: e,
|
|
1722
|
+
selected: r
|
|
1723
|
+
}) : [d("span", null, i), r ? d("span", { class: y.e("check") }, "*") : null];
|
|
1724
|
+
return d("li", {
|
|
1725
|
+
key: e.value,
|
|
1726
|
+
id: C(n),
|
|
1727
|
+
class: [
|
|
1728
|
+
y.e("option"),
|
|
1729
|
+
n === O.value && y.em("option", "active"),
|
|
1730
|
+
r && y.em("option", "selected"),
|
|
1731
|
+
e.disabled && y.em("option", "disabled")
|
|
1732
|
+
],
|
|
1733
|
+
role: "option",
|
|
1734
|
+
"aria-selected": r,
|
|
1735
|
+
"aria-disabled": e.disabled || void 0,
|
|
1736
|
+
onMouseenter: () => {
|
|
1737
|
+
e.disabled || (O.value = n);
|
|
1738
|
+
},
|
|
1739
|
+
onClick: (t) => {
|
|
1740
|
+
t.stopPropagation(), Se(e);
|
|
1741
|
+
}
|
|
1742
|
+
}, a);
|
|
1743
|
+
}, Ie = () => {
|
|
1744
|
+
let e = L.value, t = -1, n = [];
|
|
1745
|
+
for (let r = 0; r < e.length; r += 1) {
|
|
1746
|
+
let i = e[r];
|
|
1747
|
+
if (i.type === "group" && i.group) {
|
|
1748
|
+
let e = i.group.depth * 12;
|
|
1749
|
+
n.push(d("li", {
|
|
1750
|
+
class: y.e("group-label"),
|
|
1751
|
+
key: `__group_${r}`,
|
|
1752
|
+
role: "presentation",
|
|
1753
|
+
style: e > 0 ? { paddingLeft: `${e}px` } : void 0
|
|
1754
|
+
}, i.group.label));
|
|
1755
|
+
} else i.type === "option" && i.option && (t += 1, n.push(Z(i.option, t)));
|
|
1756
|
+
}
|
|
1757
|
+
return n;
|
|
1758
|
+
}, Le = () => {
|
|
1759
|
+
let e = L.value, n = -1, r = [];
|
|
1760
|
+
for (let t of e) n += +(t.type === "option"), r.push(t.type === "option" ? n : -1);
|
|
1761
|
+
return q.visible.value.map(({ index: e, data: n, top: i }) => {
|
|
1762
|
+
let a = {
|
|
1763
|
+
position: "absolute",
|
|
1764
|
+
left: 0,
|
|
1765
|
+
right: 0,
|
|
1766
|
+
top: `${i}px`,
|
|
1767
|
+
height: `${t.virtualItemHeight}px`
|
|
1768
|
+
};
|
|
1769
|
+
if (n.type === "group" && n.group) {
|
|
1770
|
+
let t = n.group.depth * 12;
|
|
1771
|
+
return d("li", {
|
|
1772
|
+
key: `__group_${e}`,
|
|
1773
|
+
class: y.e("group-label"),
|
|
1774
|
+
role: "presentation",
|
|
1775
|
+
style: t > 0 ? {
|
|
1776
|
+
...a,
|
|
1777
|
+
paddingLeft: `${t}px`
|
|
1778
|
+
} : a
|
|
1779
|
+
}, n.group.label);
|
|
1780
|
+
}
|
|
1781
|
+
if (n.type === "option" && n.option) {
|
|
1782
|
+
let t = r[e], i = Z(n.option, t);
|
|
1783
|
+
return i.props && (i.props.style = a), i;
|
|
1784
|
+
}
|
|
1785
|
+
return null;
|
|
1786
|
+
});
|
|
1787
|
+
}, Re = () => me.value ? d("div", {
|
|
1788
|
+
ref: E,
|
|
1789
|
+
class: y.e("virtual"),
|
|
1790
|
+
style: {
|
|
1791
|
+
height: `${q.containerHeight.value}px`,
|
|
1792
|
+
overflow: "auto",
|
|
1793
|
+
position: "relative"
|
|
1794
|
+
},
|
|
1795
|
+
onScroll: q.onScroll
|
|
1796
|
+
}, d("ul", {
|
|
1797
|
+
id: S,
|
|
1798
|
+
class: y.e("list"),
|
|
1799
|
+
role: "listbox",
|
|
1800
|
+
style: {
|
|
1801
|
+
height: `${q.totalHeight.value}px`,
|
|
1802
|
+
position: "relative"
|
|
1803
|
+
}
|
|
1804
|
+
}, Le())) : d("ul", {
|
|
1805
|
+
id: S,
|
|
1806
|
+
class: y.e("list"),
|
|
1807
|
+
role: "listbox",
|
|
1808
|
+
ref: E
|
|
1809
|
+
}, Ie()), ze = () => {
|
|
1810
|
+
let e = [
|
|
1811
|
+
y.e("dropdown"),
|
|
1812
|
+
t.popupClassName,
|
|
1813
|
+
t.classNames?.popup
|
|
1814
|
+
].filter(Boolean), n = [de.value, t.styles?.popup];
|
|
1815
|
+
if (t.loading) return d("div", {
|
|
1816
|
+
ref: T,
|
|
1817
|
+
class: e,
|
|
1818
|
+
style: n
|
|
1819
|
+
}, d("div", { class: y.e("loading") }, t.loadingText));
|
|
1820
|
+
if (R.value.length === 0) {
|
|
1821
|
+
let r = l.empty ? l.empty() : t.noDataText;
|
|
1822
|
+
return d("div", {
|
|
1823
|
+
ref: T,
|
|
1824
|
+
class: e,
|
|
1825
|
+
style: n
|
|
1826
|
+
}, d("div", { class: y.e("empty") }, r));
|
|
1827
|
+
}
|
|
1828
|
+
return d("div", {
|
|
1829
|
+
ref: T,
|
|
1830
|
+
class: e,
|
|
1831
|
+
style: n
|
|
1832
|
+
}, Re());
|
|
1833
|
+
}, Be = () => {
|
|
1834
|
+
let e = D.value ? ze() : null, n = d(s, {
|
|
1835
|
+
name: t.transitionName,
|
|
1836
|
+
appear: !0
|
|
1837
|
+
}, { default: () => e });
|
|
1838
|
+
return G.value && W.value ? d(o, { to: W.value }, [n]) : n;
|
|
1839
|
+
}, Ve = c(() => {
|
|
1840
|
+
if (!(!D.value || R.value.length === 0)) return C(O.value);
|
|
1841
|
+
});
|
|
1842
|
+
return () => d("div", {
|
|
1843
|
+
ref: w,
|
|
1844
|
+
class: [pe.value, t.classNames?.root],
|
|
1845
|
+
style: t.styles?.root,
|
|
1846
|
+
tabindex: t.disabled ? void 0 : 0,
|
|
1847
|
+
role: "combobox",
|
|
1848
|
+
"aria-expanded": D.value,
|
|
1849
|
+
"aria-haspopup": "listbox",
|
|
1850
|
+
"aria-controls": S,
|
|
1851
|
+
"aria-disabled": t.disabled || void 0,
|
|
1852
|
+
"aria-activedescendant": Ve.value,
|
|
1853
|
+
onClick: () => J(!0),
|
|
1854
|
+
onKeydown: Ee,
|
|
1855
|
+
onFocus: De,
|
|
1856
|
+
onBlur: Oe
|
|
1857
|
+
}, [
|
|
1858
|
+
l.prefix ? d("span", { class: y.e("prefix") }, l.prefix()) : null,
|
|
1859
|
+
d("div", {
|
|
1860
|
+
class: [y.e("selector"), t.classNames?.selector],
|
|
1861
|
+
style: t.styles?.selector
|
|
1862
|
+
}, [d("div", { class: y.e("selection") }, j.value ? X() : ke()), t.clearable && V.value && !t.disabled ? d("span", {
|
|
1863
|
+
class: y.e("clear"),
|
|
1864
|
+
onClick: Ce
|
|
1865
|
+
}, l.clearIcon ? l.clearIcon() : At(t.clearIcon) ?? "x") : d("span", { class: y.e("arrow") }, l.suffixIcon ? l.suffixIcon() : At(t.suffixIcon) ?? "v")]),
|
|
1866
|
+
l.suffix ? d("span", { class: y.e("suffix") }, l.suffix()) : null,
|
|
1867
|
+
Be()
|
|
1868
|
+
]);
|
|
1869
|
+
}
|
|
1870
|
+
});
|
|
1871
|
+
//#endregion
|
|
1872
|
+
//#region ../ccui/ui/select/index.ts
|
|
1873
|
+
$.install = function(e) {
|
|
1874
|
+
e.component($.name, $);
|
|
1875
|
+
};
|
|
1876
|
+
var Xt = {
|
|
1877
|
+
title: "Select 选择器",
|
|
1878
|
+
category: "数据录入",
|
|
1879
|
+
status: "100%",
|
|
1880
|
+
install(e) {
|
|
1881
|
+
e.component($.name, $);
|
|
1882
|
+
}
|
|
1883
|
+
};
|
|
1884
|
+
//#endregion
|
|
1885
|
+
export { $ as Select, Xt as default };
|